GridDiag wrapper output #1476
|
I'm trying to debug a GridDiag wrapper but the only error line I get is I am at a complete loss as to how to fix this. I have a sense it's because the format strings are wrong but there is no hint of what it is trying to construct given the info I provide so I have no idea which direction to try next. Most of the options/combinations I've tried do not have any effect. What I can say is that GridDiag works as I've tried it without using the wrapper. Forecast files are called 20190302T000Z_*.nc and obs files are called *_20190302.nc The wrapper is set up as follows The init time begin and end times, increment, and last init hour.INIT_TIME_FMT = %Y%m%d%H This is the step-size. Increment in seconds from the begin time to the end timeINIT_INCREMENT = 1H LEAD_SEQ = begin_end_incr(1,24,1) LOG_GRID_DIAG_VERBOSITY = 4 frequency to run the tool; valid options include:RUN_ONCE, RUN_ONCE_PER_INIT_OR_VALID, RUN_ONCE_PER_LEAD, RUN_ONCE_FOR_EACHGRID_DIAG_RUNTIME_FREQ = RUN_ONCE_PER_LEAD GRID_DIAG_DESC = India_km4p4_RA1T Configuration fileGRID_DIAG_CONFIG_FILE =GridDiag_joint.ltng BOTH_VAR1_NAME = "number_of_lightning_flashes" FCST_GRID_DIAG_INPUT_DIR = {INPUT_BASE_FC}/forecast_sequential GRID_DIAG_OUTPUT_DIR = {OUTPUT_BASE}/lightning [filename_templates] FCST_GRID_DIAG_INPUT_TEMPLATE = {init?fmt=%Y%m%d}T0000Z_model.nc GRID_DIAG_OUTPUT_TEMPLATE = grid_diag_model_{valid?fmt=%Y%m%d%02H}.nc I don't get to the point where it echoes the MET command that it tries to run as in this example from PCPcombine. I don't know if this line exists for GridDiag but it would be useful if it could be added? I could at least see what kind of filename it's trying to build... 03/03 15:34:25.542 metplus INFO: COMMAND: pcp_combine -v 5 -add /scratch/prods_op_gl-mn_20220201_00.nc 'name="stratiform_rainfall_amount"; level="(0,,),(1:,,)";' -name "stratiform_rainfall_amount" /scratch/METplus/output/met_tool_wrapper/PCPCombine/PCPCombine_subtract/global/prods_op_gl-mn_2022020100_f006_A06.nc Referring to the grid_diag output I can get when not running with the wrapper, can I confirm that the final bin contains all data that are bigger than the range specified... the code gives a warning: Further on, there may be clues as to why the wrapper fails. The observation files were based on the model forecast.. and a dummy file was used to construct the metadata... is this the problem perhaps? One might need (or want) to override some or all of the time info in the file and use the time info in the filename instead. Here I want to ignore the date but keep the hour. Clearly the MET tool doesn't care, but the METplus wrapper does. |
Replies: 1 comment 4 replies
|
Hi @mpm-meto, GridDiag wrapper does not read separate FCST and OBS data like other MET tools do. The config variable to set to read in files is GRID_DIAG_INPUT_TEMPLATE, not FCST_GRID_DIAG_INPUT_TEMPLATE and OBS_GRID_DIAG_INPUT_TEMPLATE. Setting You will want to pass in the templates to read as a list:
If there was a common parent directory for all of the file templates, you could set that in GRID_DIAG_INPUT_DIR. Some other things I noticed about your configuration that I should mention:
Since your use case is only running a single init time and 24 forecast leads, you should use:
The valid time will be computed properly for each init/lead combination. |
Hi @mpm-meto,
GridDiag wrapper does not read separate FCST and OBS data like other MET tools do. The config variable to set to read in files is GRID_DIAG_INPUT_TEMPLATE, not FCST_GRID_DIAG_INPUT_TEMPLATE and OBS_GRID_DIAG_INPUT_TEMPLATE. Setting
LOG_LEVEL = DEBUGin your user config file may have given you a hint as to why you could not find any files, but I did notice that there was no check if GRID_DIAG_INPUT_TEMPLATE is not set to report a useful error message. I just added that so it will be available for the upcoming 4.1.0 release. This should make it more clear why it couldn't find any files.You will want to pass in the templates to read as a list:
GRID_DIAG_INPUT_TEMPLATE = {INPUT…