-
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 1815 level value #2190
Feature 1815 level value #2190
Conversation
…cur_time_index. Support value instead of offset for time and z level
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.
@hsoh-u I ran into an issue testing output pinterp NetCDF files.
ncdump -h $MET_TEST_INPUT/model_data/p_interp/wrfout_d01_2008-08-08_12\:00\:00_PLEV
...
float pressure(num_metgrid_levels) ;
pressure:long_name = "Pressure Levels" ;
pressure:standard_name = "air_pressure" ;
pressure:units = "hPa" ;
pressure:positive = "down" ;
...
float RH(Time, num_metgrid_levels, south_north, west_east) ;
RH:FieldType = 104 ;
RH:MemoryOrder = "XZY" ;
RH:description = "Relative Humidity" ;
RH:units = "%" ;
RH:stagger = "-" ;
RH:coordinates = "XLONG XLAT" ;
And I ran:
plot_data_plane \
/Volumes/d1/projects/MET/MET_unit_test/MET_test_input/model_data/p_interp/wrfout_d01_2008-08-08_12\:00\:00_PLEV \
plot.ps 'name="RH"; level="(@20080808_120000,@750,*,*)";' -v 7
Note that this should NOT actually work since "num_metgrid_levels" is NOT a coordinate variable. But requesting @750 (or really any other value) for the 2nd dim always results in index 0 being used for that dimension.
Could you please check the logic of this?
Only two cases are supported:
Above case is not supported yet but it's doable with supporting two cases:
|
In case of $MET_TEST_INPUT/model_data/p_interp/wrfout_d01_2008-08-08_12:00:00_PLEV, MET is looking for the variable "num_metgrid_levels" and "Time" (which is the same name of the dimension). "Time" variable is selected for time dimension. If not exists, MET is looking for the the first 1 dimension variable which has the dimension, "num_metgrid_levels". The "pressure" variable is selected for the vertical level. MET does not check if there two or more variables exist with the same condition.
|
Reassigning the review of this PR from @JohnHalleyGotway to @georgemccabe, since I'm unavailable today. Thanks @georgemccabe for taking a look at it. Please see the issues I ran into listed in this comment. @hsoh-u has made changes to fix them. |
@@ -292,7 +306,7 @@ | |||
<param> \ | |||
&DATA_DIR_MODEL;/nccf/GloTEC_TEC_2015_03_17.nc \ | |||
&OUTPUT_DIR;/plot_data_plane/plot_data_plane_NCCF_time.ps \ | |||
'name="TEC"; level="(20150317_000500,*,*)"; file_type=NETCDF_NCCF;' \ | |||
'name="TEC"; level="(@20150317_000500,*,*)"; file_type=NETCDF_NCCF;' \ |
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.
Do we still have tests that ensure that specifying the time value still works without the added @ symbol? If not, I think we should add at least 1 since that syntax is currently used by users.
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 reviewed the code changes. There are a lot of them! I didn't examine every change in detail, but they seemed to make sense and I didn't notice any obvious mistakes or bugs. I ran a few tests using different input files and verified that the expected logic appears to work properly. This is a great enhancement!
I made one in-line comment about making sure that there is still at least 1 unit test that ensures that the date string can be specified without the @ symbol prepended since that syntax is currently used by users. If there are no longer any tests that demonstrate this, I suggest that one is added. Otherwise, I approve.
I see that the automated tests flagged a difference due to new output from the new unit test. Once this PR is merged, the develop-ref branch should be updated to regenerate the truth dataset.
Updated and 3 test cases exist:
|
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.
Looks great, thanks! I approve!
See previous review for details.
Expected Differences
No differences except suppoort @NNN for vertical level and time.
New output (plot_data_plane/gtg_obs_forecast.20130730.i00.f00.NCCF_latlon_20000.ps) is added to unit test.
Do these changes introduce new tools, command line arguments, or configuration file options? [No]
If yes, please describe:
No, it's a change to the configuration.
Do these changes modify the structure of existing or add new output data types (e.g. statistic line types or NetCDF variables)? [No]
If yes, please describe:
Pull Request Testing
Input file with "axis"=Z
Input file without "axis"=Z, but with the same variable name with the dimension name for the vertical level ("lev")
Recommend testing for the reviewer(s) to perform, including the location of input datasets, and any additional instructions:
Do these changes include sufficient documentation updates, ensuring that no errors or warnings exist in the build of the documentation? [Yes]
Do these changes include sufficient testing updates? [Yes]
Will this PR result in changes to the test suite? [Yes]
If yes, describe the new output and/or changes to the existing output:
New unit test is added (plot_data_plane/gtg_obs_forecast.20130730.i00.f00.NCCF_latlon_20000.ps).
YYYYMMDD_HHMMDD is changed to @YYYYMMDD_HHMMDD at unit test definition file
Pull Request Checklist
See the METplus Workflow for details.
Select: Reviewer(s)
Select: Organization level software support Project or Repository level development cycle Project
Select: Milestone as the version that will include these changes