-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature 1020 set_attrs #1406
Feature 1020 set_attrs #1406
Conversation
…f the set_attrs dictionary config entries. Still need to add code to parse those entries and update the tests and documentation.
…dictionary members.
…units to the OBS_UNITS output column instead of writing a constant NA string.
…name_attr() for example returns SetAttrsName, if set, and simply Name otherwise.
…st_var, set_obs_var, set_fcst_level, set_obs_level, set_fcst_units, and set_obs_units with calls to the corresponding attrs access function. Still many more updates to the code required.
…lation interval read from the data.
…in a DataPlane object using the contents of a set_attr Dictionary stored in a VarInfo object.
… always having to type out grid.nx()*grid.ny().
… object. And parse that grid in the set_dict() function. The huge drawback here is that the grid may be specified as a named grid or using a grid specification string... but it cannot be defined as the path to a gridded data file. The library dependency logic is just too complex, and I'd need to move a lot of code around to make this work. For now, just leave that feature out.
…d spec parsed from the file. Also, update the process_data_plane() function to handle updating the metadata and grid defintions.
…le, parse them as set_attrs.set_name instead of set_name from the set_attrs dictionary. That makes setting up the config file more flexible.
…evel_attr, and units_attr instead of name(), level_name(), and units(). This change should be made everywhere NetCDF output files are written.
…in name, level, and units.
…rs functionality.
…ttrs dictionary.
…nd units() with calls to name_attr(), level_attr(), and units_attr().
…nits() with calls to name_attr(), level_attr(), and units_attr().
… units() with calls to name_attr(), level_attr(), and units_attr().
…eplace calls to name(), level_name(), and units() with calls to name_attr(), level_attr(), and units_attr().
…el_name(), and units() with calls to name_attr(), level_attr(), and units_attr().
…d units() with calls to name_attr(), level_attr(), and units_attr().
…rning about setting a header column to a null string.
…time issues I found on dakota.
…ng all of these metadata modifiers into a set_attrs dictionary, I'm now parsing them all as individual entries. See #1020 issue comments for more details.
…into feature_1020_set_attrs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had issues building from this branch on my laptop, so I added a single docker image for this specific feature branch. I was able to run a METplus use case (GridStat.conf) in docker. I changed the GridStatConfig file to write a raw NC file. I added a couple set_attrs values to the forecast data (based on the unit test example) and reran. The level value updated to "TROPO" as expected, but the long name appears to be different than the explicit value I provided.
My configuration:
FCST_FIELD={ name="APCP"; level="A03"; cat_thresh=[ gt12.7,gt25.4,gt50.8,gt76.2 ]; set_attr_level = "TROPO"; set_attr_long_name = "Temperature at the tropopause"; }
netcdf grid_stat_WRF_APCP_vs_MC_PCP_APCP_03_120000L_20050807_120000V_pairs {
dimensions:
lat = 129 ;
lon = 185 ;
variables:
float FCST_APCP_03_TROPO_FULL(lat, lon) ;
FCST_APCP_03_TROPO_FULL:name = "FCST_APCP_03_TROPO_FULL" ;
FCST_APCP_03_TROPO_FULL:long_name = "APCP_03 at TROPO" ;
FCST_APCP_03_TROPO_FULL:level = "TROPO" ;
The value was overwritten by at instead of my value.
So good news, you are able to add set_attrs items to a METplus config via:
FCST_VAR1_OPTIONS = set_attr_level = "TROPO"; set_attr_long_name = "Temperature at the tropopause";
but bad news, not all of the options may be working as expected.
Hey George, I’m not surprised by the long name behavior you describe. I think I realized that I wasn’t actually checking for that when setting up the long name in Grid-Star matched pairs file. Here’s the issue... each variable can result in multiple output fields in that file. The code constructs the long name to differentiate between them... and it wasn’t immediately obvious to me how to use the user-defined long name in that context... but I could try. |
…e user-specified long_name string in the NetCDF matched pairs file from Grid-Stat.
OK George, I update Grid-Stat to include the user-specified long_name string in the NetCDF matched pairs output file from Grid-Stat. |
OK, the changes look good to me as far as I can tell. I will let you merge the changes so you can control the differences that will come up from the tests. |
Will do. Thanks George.
John
…On Wed, Jul 8, 2020 at 1:23 PM George McCabe ***@***.***> wrote:
OK, the changes look good to me as far as I can tell. I will let you merge
the changes so you can control the differences that will come up from the
tests.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1406 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFA4HKAR34Z4KHQASXLUNRTR2STQXANCNFSM4OQIAHWQ>
.
|
After merging the latest version of develop in feature_1020_set_attrs, I ran a regression test in kiowa:/d1/projects/MET/MET_pull_requests/met-9.1_beta2/feature_1020/regression
The only differences should new set_attr output files generated by Grid-Stat.
Please read the last comment on #1020 which explains the change I had to make, replacing set_attr_... bareword entries instead of grouping them together into a set_attrs dictionary.