cmor
cmor copied to clipboard
in PrePARE, report the name of the file which gives errors
When PrePARE scans multiple files, it does not report which ones contained the errors. It would be good to show this information.
I tried running PrePARE on a directory that had some files with errors in them and got the following output.
C Traceback:
! In function:
!!!!!!!!!!!!!!!!!!!!!!!!!
!
! Error: Your filename
! "ta_Amon_PCMDI-test-1-0_piControl-withism_r11i1p1f1_grBZ6b7U15259.nc"
! does not match the CMIP6 requirement.
!
! Your output filename should be:
! "ta_Amon_PCMDI-test-1-0_piControl-withism_r11i1p1f1_gr_200801-200812.nc"
!
! and should follow this template:
!"<variable_id><table><source_id><experiment_id><member_id><grid_label>"
!
! See your Control Vocabulary file.(Tables/CMIP6_CV.json)
!
!
!!!!!!!!!!!!!!!!!!!!!!!!!
└──> :: CV FAIL :: /home/mauzey1/git/cmor/CMIP6/ISMIP6/PCMDI/PCMDI-test-1-0/piControl-withism/r11i1p1f1/Amon/ta/gr/v20200108/ta_Amon_PCMDI-test-1-0_piControl-withism_r11i1p1f1_grBZ6b7U15259.nc
=====================================================================================
Your file contains "cell_methods":"time: mean" and
CMIP6 tables requires "cell_methods":"area: time: mean".
=====================================================================================
└──> :: CV FAIL :: /home/mauzey1/git/cmor/CMIP6/CMIP6/ISMIP6/PCMDI/PCMDI-test-1-0/piControl-withism/r3i1p1f1/Amon/tas/gn/v20200108/tas_Amon_PCMDI-test-1-0_piControl-withism_r3i1p1f1_gn_198001-198012.nc
C Traceback:
! In function:
!!!!!!!!!!!!!!!!!!!!!!!!!
!
! Error: Your filename
! "tas_Amon_PCMDI-test-1-0_piControl-withism_r3i1p1f1_gnPf4pVv15296.nc"
! does not match the CMIP6 requirement.
!
! Your output filename should be:
! "tas_Amon_PCMDI-test-1-0_piControl-withism_r3i1p1f1_gn_200801-200812.nc"
!
! and should follow this template:
!"<variable_id><table><source_id><experiment_id><member_id><grid_label>"
!
! See your Control Vocabulary file.(Tables/CMIP6_CV.json)
!
!
!!!!!!!!!!!!!!!!!!!!!!!!!
└──> :: CV FAIL :: /home/mauzey1/git/cmor/CMIP6/CMIP6/ISMIP6/PCMDI/PCMDI-test-1-0/piControl-withism/r3i1p1f1/Amon/tas/gn/v20200108/tas_Amon_PCMDI-test-1-0_piControl-withism_r3i1p1f1_gnPf4pVv15296.nc
=====================================================================================
Your file contains "cell_methods":"time: mean" and
CMIP6 tables requires "cell_methods":"area: time: mean".
=====================================================================================
└──> :: CV FAIL :: /home/mauzey1/git/cmor/CMIP6/CMIP6/ISMIP6/PCMDI/PCMDI-test-1-0/piControl-withism/r3i1p1f1/Amon/tas/gn/v20200108/tas_Amon_PCMDI-test-1-0_piControl-withism_r3i1p1f1_gn_197901-197912.nc
Number of files scanned: 67
Number of file with error(s): 4
The file name that had the error is listed below the error message next to the └──> :: CV FAIL ::
. Have there been cases where a file error doesn't name the file in PrePARE?
@alaniwi @durack1 @taylor13 I am not sure what more should be done here. PrePARE is already listing the names of the files that have errors. #589 adds file names to errors that previously had them missing. Maybe there should be a list of files that had an error at the bottom of the output?
Example:
Number of files scanned: 67
Number of file with error(s): 4
Files with errors:
/home/mauzey1/git/cmor/CMIP6/ISMIP6/PCMDI/PCMDI-test-1-0/piControl-withism/r11i1p1f1/Amon/ta/gr/v20200108/ta_Amon_PCMDI-test-1-0_piControl-withism_r11i1p1f1_grBZ6b7U15259.nc
/home/mauzey1/git/cmor/CMIP6/CMIP6/ISMIP6/PCMDI/PCMDI-test-1-0/piControl-withism/r3i1p1f1/Amon/tas/gn/v20200108/tas_Amon_PCMDI-test-1-0_piControl-withism_r3i1p1f1_gn_198001-198012.nc
/home/mauzey1/git/cmor/CMIP6/CMIP6/ISMIP6/PCMDI/PCMDI-test-1-0/piControl-withism/r3i1p1f1/Amon/tas/gn/v20200108/tas_Amon_PCMDI-test-1-0_piControl-withism_r3i1p1f1_gnPf4pVv15296.nc
/home/mauzey1/git/cmor/CMIP6/CMIP6/ISMIP6/PCMDI/PCMDI-test-1-0/piControl-withism/r3i1p1f1/Amon/tas/gn/v20200108/tas_Amon_PCMDI-test-1-0_piControl-withism_r3i1p1f1_gn_197901-197912.nc
I don't see a need to summarize in that way, but if @alaniwi can explain why it would be useful, then we might consider implementing it. Also, @sashakames might have a view on this.
@alaniwi this issue has been stale for 4 years, so will close. If some additional tweaks are required please comment and reopen