METplus configuration variables in MET config files #996
-
Hi, there, I've been told to generate a new discussion here. Currently I have METplus configuration files that work fine with the MET configuration files that work fine using METplus v4.0.0. However, I am told that it would be better for me to update my MET and METplus configuration files because of the change in the wrappers that allow me to remove the need to continue to maintain MET configuration files. I had sent George McCabe some of my configuration file examples some time ago in the met_help email, before we moved into the GitHub question area, and he asked me to post the question here so it's no longer in the met_help email help. Thanks for your assistance! Perry |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Hi @PerryShafran-NOAA. Thank you for your question. I understand that @georgemccabe is in the process of helping you with this issue and will follow up here as soon as he is able to. |
Beta Was this translation helpful? Give feedback.
-
Yes I am still waiting, and have not coordinated with @georgemccabe offline. Thanks for reminding us of the open discussion. |
Beta Was this translation helpful? Give feedback.
-
I reviewed your CAM config files and have come up with a list of changes to produce the same results using the wrapped MET config files in the METplus repo instead of your _cam MET config files. The use case example you provided reads in many METplus config files that contain the same variables, so I also made changes to how the final conf files are written to separate out the config variables that are specific to the user's environment and runtime (available in 4.1.0 in a PR related to issue #1147). This allowed me to create a conf file with only the variables needed to run your use case. I have attached that file here (cam_updated.conf.txt) so you can test it out. You will only need to pass in this file and your system conf file to run_metplus.py. Let me know if you notice differences that shouldn't be there (Note there were some default values in the old versions of the wrapped MET config files pre v4.0.0 that differed from the MET defaults. The "incorrect" defaults in the files you copied to create your cam config files. I will outline these differences below). Here is the list of the new METplus config variables I added:
I also changed the PB2NC_CONFIG_FILE and POINT_STAT_CONFIG_FILE values to point to the wrapped versions in the METplus repo. Starting in METplus 4.1.0 (beta2) these variables can simply be removed and the correct version will be used by default, but in 4.0.0 you need to explicitly set them:
Below are details on how I determined what settings to add to the METplus config files. Diffing MET Config FilesTo find these variables I ran the diff command on your PB2NCConfig_cam file and the default config file found in the MET install location under share/met/config. I scanned the differences using a few rules. Left arrows (<) are from the default version and right arrows (>) are from the user version. Settings to Ignore
Mismatched Default Values
Here is an example that I found: https://metplus.readthedocs.io/en/develop/Users_Guide/systemconfiguration.html#regrid-method-and-regrid-width
I also found that the pb_report_type in PB2NC was set to a list of values when the default is an empty list, which uses all reports. The old "incorrect" default was potentially filtering out data that you may want to use. Leaving it out of the METplus config will use the correct default, but if this filtering is still desired in your use case, you can set:
Differences that are configurable by METplus variables
This is a value that was changed from the default value. I searched for this line in the user config and saw that it is in the level_range dictionary. I navigated to the METplus User's Guide Python Wrappers PB2NC MET Configuration section and searched for the variable name to see if it is supported by the METplus wrappers. I found that the variable PB2NC_LEVEL_RANGE_END sets the level_range.end value, so I added it to the METplus config file:
I did the same for quality_mark_thresh, time_summary.step, and time_summary.width. Differences that are not supported by METplus variables
Combining multiple METplus config filesThe changes I made as part of issue #1147 (PR coming soon) separate the variables written to the final conf file that are specific to a use case from the runtime settings (such as CLOCK_TIME, all log settings, MET_INSTALL_DIR, INPUT/OUTPUT_BASE, etc.). This allows you to run METplus with a list of config files and the final config file that is generated (controlled by METPLUS_CONF but typically written to {OUTPUT_BASE}/metplus_final.conf) and easily pull out the settings that were actually used for the use case that do not pertain to the user's environment. The runtime variables are moved to the [runtime] section so they can still be reviewed for context. |
Beta Was this translation helpful? Give feedback.
Hi @PerryShafran-NOAA,
I reviewed your CAM config files and have come up with a list of changes to produce the same results using the wrapped MET config files in the METplus repo instead of your _cam MET config files. The use case example you provided reads in many METplus config files that contain the same variables, so I also made changes to how the final conf files are written to separate out the config variables that are specific to the user's environment and runtime (available in 4.1.0 in a PR related to issue #1147). This allowed me to create a conf file with only the variables needed to run your use case. I have attached that file here (cam_updated.conf.txt) so you can test it out.…