Reading and interpolating WOA monthly climatology files for Grid_Stat #1604
-
I used the following GRID_STAT_CLIMO_MEAN setup in my METplus 4.0.0 configuration file to read in WOA monthly climatology files, regrid them to match OBS grids, and interpolate them to the VALID date: GRID_STAT_CLIMO_MEAN_FIELD = {name = "t_an"; level = "(0,0,,)";} --- please note star,star may not show up in the text When I ran METplus, it pointed to the correct climatology file, but it can't read the WOA file with the following error message in the log file: ERROR : DictionaryEntry::dict_value() -> bad type The CLIMO_MEAN dictionary is outputted in the log file as: metplus INFO: METPLUS_CLIMO_MEAN_DICT=climo_mean = {file_name = ["/lfs/h2/emc/vpppg/noscrub/Lichuan.Chen/Global/climo/WOA18/woa18_decav_t05_04.nc"];field = ["{name="t_an"; level="(0,0,,)";}"];regrid = {method = BILIN;width = 2;vld_thresh = 0.5;}time_interp_method = DW_MEAN;day_interval = 31;hour_interval = 6;} --- I just noticed that the field didn't show up the same as I posted. There are backslashes before the " in the log text, so it's field = ["{name= backslash"t_an backslash"; level=backslash"(0,0,star,star)backslash";}"]; In which, the syntax for the field looks a bit strange to me. Is this correct? My FCST and OBS are both netCDF files with the following fields: metplus INFO: METPLUS_FCST_FIELD=field = [{ name="sst"; level="(0,,)"; }]; --- it should be "(0,star,star)" WOA SST data are 4-dimensional: (time, depth, lat, lon), different from FCST and OBS, which are 3-dimensional: (time, lat, lon). Is it a problem? I can run Grid_Stat and generate CNT stat files using FCST and OBS without CLIMO_MEAN. I also can read WOA climatology files using plot_data_plane with 'name = "t_an"; level = "(0,0,,)";' to create SST maps. Is there anything I missed in setting up CLIMO_MEAN? Thanks for your help! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 16 replies
-
Hi @GwenChen-NOAA, You have configured METplus correctly to read the climo mean field. However, enhancements made for METplus 4.1.0 fix the incorrect formatting that you are seeing with the quotation marks in the climo_mean field value. If you are able to upgrade to using version 4.1.0, I recommend making that switch to remedy this issue. If you must continue to use 4.0.0, then you should be able to get around this issue by using the GRID_STAT_MET_CONFIG_OVERRIDES variable instead of GRID_STAT_CLIMO_MEAN_FIELD. You would set something like this:
This will add this text to the end of the MET configuration file and override the value that way. On a related note, there is an open GitHub issue #1599 that is slated to be completed in the next development cycle (METplus 5.0.0-beta1 tentatively scheduled for 6/22) that will allow you set the field information this way:
The METplus wrapper logic will properly format the values into the correct format that is expected by the MET config file. Please let me know if you have any other issues or questions. Thanks. |
Beta Was this translation helpful? Give feedback.
-
Hi @GwenChen-NOAA, thank you for sending your data and the documentation. It looks like the units for the time variable is "months since 1955-01-01 00:00:00" and while that is technically a valid time unit for CF-compliance, the MET tools do not support it. We often recommend using the MET plot_data_plane tool to check if MET can read new input files properly. Running this command:
outputs this warning:
You can also run plot_data_plane with the "-v 4" argument to raise the logging verbosity. The grid and time information that is parsed from the file is output at the DEBUG 4 level. Fortunately you can override the attributes that are read parsed by MET using the set_attr_* variables. In this case, you would want to set the valid time using set_attr_valid. You can use the filename template syntax to get the current valid time you are processing:
Search for "set_attr" on this page to see all of the available attributes that you can override. Let me know if that works for you. |
Beta Was this translation helpful? Give feedback.
Hi @GwenChen-NOAA, thank you for sending your data and the documentation. It looks like the units for the time variable is "months since 1955-01-01 00:00:00" and while that is technically a valid time unit for CF-compliance, the MET tools do not support it. We often recommend using the MET plot_data_plane tool to check if MET can read new input files properly. Running this command:
plot_data_plane woa18_decav_t05_04.nc out.nc 'name="t_an"; level="(0,0,*,*)";'
outputs this warning:
You can also run plot_data_plane with the "-v 4" argument to raise the logging verbosi…