-
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 #1283 mvmode mods #2569
Conversation
…e web and update local data
…data in memory, and implemented masking fields using superobjects.. a first cut, much more to clean up
… plus checks for the multivar_logic, both to make sure things are of the correct length and in bounds
…mode enum to distinguish single mode from multivar 1st and 2nd pass
…s of mode multivar to not do merging and matching
…e_flag=THRESH when logic includes a union
…nged to multivar mode naming
…re unimplemented situations and error exit for those
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 have no suggested changes. This looks good.
…nfig_constants.h. Make each error message consistently begin with 1 newline and end with 2. Use lookup_bool_array() defined in dictionary.cc and remove the redefinition in mode_conf_info.cc
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.
@davidalbo I think there's an issue with the convolution radius and thresholds being applied when defining the objects for each of the components. The config file settings indicate that the conv_radius = 2;
and conv_thresh = >=5.0;
. However, I don't see those settings in the output.
Downloading the differences flagged in this GHA run, I see the following.
All of the TRUTH
data reports the expected convolution radius and threshold:
cat `find ./ -name "*_obj_TRUTH.txt"` | awk '{print $12,$13}' | sort -ru
FCST_RAD FCST_THR
2 >=5.0
While the newly generated OUTPUT
data reports what I'm guessing are default convolution radius and threshold values:
cat `find ./ -name "*_obj_OUTPUT.txt"` | awk '{print $12,$13}' | sort -ru
FCST_RAD FCST_THR
0 !=-9999
I realize that the output file NAMES have changed, but I don't think the object definition criteria or geometry should change. Based on what I'm seeing, perhaps the logic for parsing the convolution radius and threshold from the input configuration file isn't working as expected?
Please take another look at this.
@davidalbo note that running
So perhaps they're being parsed and use correctly but not written to the output file correctly? Another thing that's throwing me for a loop is the PostScript output. All of these PostScript files:
Show the same super objects. I was kind of expecting the ALPHA would show me the first object, BETA would show me the second, and GAMMA would show me the third. But I think I understand why they don't. This is displaying the raw intensity values for the ALPHA, BETA, and GAMMA input fields. It just so happens that our raw input data is so uninteresting (0's or 100's), that it's causing a little confusion for me. |
@JohnHalleyGotway I believe I've found and fixed the incorrect conv radius and thresh in the output problem. As for the other concern, I think |
…ecified in output files for multivariate mode
Dave, Tracy and I met briefly and have the following requests:
And:
|
For 2. above, I think for individual intensities this is already in place. Looking at Tracy's test case output I see for WIND: units = m/s and level = Z10, and for VIS: units = m and level = LO. For the unit test it seems that units = NA, this comes from the input data, and level = (,) from the config, which is what we see in the Alpha, Beta, Gamma individual intensity output txt files. For the super object only case (no intensities), I'm setting units = NA and level to LO because the inputs can be a mix of different values. For the Tracy test case, the inputs that made the super objects have units m/s, m and levels LO and Z10. What values should go into the txt file in this case? I went with NA and LO arbitrarily, open for suggestions. |
Dave, I'm glad to hear that you're getting meaningful units/level strings from Tracy. I do understand what you're saying, but there is some difference occurring. When MET reads data from NetCDF files the units and level variable attributes (if present) are used to define those strings. For example:
Running this through traditional MODE, it grabs the level and units strings from here. So I would expect to see those same strings in the output from multi-variate MODE. |
Might this be an artifact from the presence of |
Dave, this line of code is relevant. The users requests
So this is how traditional MODE is populating the FCST_LEV and FCST_UNITS columns. |
I have implemented a fix for this. I do not understand why the case from Tracy without wildcards did hold onto units and levels between pass1 (simple objects) and pass2 (super object masked), whereas the unit test with wildcard did not, but the fix does work for both tests. I'm grabbing the units/levels during the first pass where they are correct, saving them, and using them in the second pass. |
… to variable names in output files, display full raw field in netcdf and postscript output files, changed unit test to include matching
…for internal consistency.
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 approve of these changes. Thanks @davidalbo!
I downloaded/reviewed the diff files and see that you made all the changes I previously requested. I reviewed several of the source code changes and did make a small commit to the branch with whitespace tweaks for consistent code formatting. But I didn't review every change in the 50 modified files. But the output looks great.
I'll go ahead and merge this PR and proceed with cutting the MET-11.1.0-RC1 release.
Co-authored-by: John Halley Gotway <johnhg@ucar.edu> Co-authored-by: jprestop <jpresto@ucar.edu> Co-authored-by: Seth Linden <linden@seneca.rap.ucar.edu> Co-authored-by: Daniel Adriaansen <dadriaan@ucar.edu> Co-authored-by: John and Cindy <halleygotway@Halleys-Mac-mini.local> Co-authored-by: rgbullock <bullock@ucar.edu> Co-authored-by: Randy Bullock <bullock@seneca.rap.ucar.edu> Co-authored-by: Dave Albo <dave@seneca.rap.ucar.edu> Co-authored-by: davidalbo <dave@ucar.edu> Co-authored-by: Julie Prestopnik <jpresto@ucar.edu> Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com> Co-authored-by: Lisa Goodrich <lisag@ucar.edu> Co-authored-by: Howard Soh <hsoh@seneca.rap.ucar.edu> Co-authored-by: hsoh-u <hsoh@ucar.edu> Co-authored-by: lisagoodrich <33230218+lisagoodrich@users.noreply.github.com> Co-authored-by: Seth Linden <linden@ucar.edu> Co-authored-by: metplus-bot <97135045+metplus-bot@users.noreply.github.com> Co-authored-by: j-opatz <59586397+j-opatz@users.noreply.github.com> fix #2449 develop pdf (#2464) fix #2402 develop sonarqube (#2468) fix #2426 develop buoy (#2475) fix 2518 dtypes appf docs (#2519) fix 2531 compilation errors (#2533) fix #2531 compilation_errors_configure (#2535) fix #2514 develop clang (#2563) fix #2575 develop python_convert (#2576)
Expected Differences
Do these changes introduce new tools, command line arguments, or configuration file options? [Yes]
3 new config options:
multivar_intensity, multivar_name, multivar_level.
The latter 2 can be set independently for fcst and obs dictionaries.Do these changes modify the structure of existing or add new output data types (e.g. statistic line types or NetCDF variables)? [No]
But.. the output file organization (no more numbered subdirectories) and file naming has changed.
**Changes to be aware of that have not been 'vetted' by anyone or seem possibly incomplete, and are things the reviewer might want to consider before approving:
level=(*,*)
. The output files names now include the levels. I replaced(*,*)
with-X,X-
in those output names, as the wildcard characters are problematic for file names. Do wildcards in levels make sense for multivariate mode? (The unit test for mvmode does have the wildcard levels, and does run and produce output with the wildcards).Pull Request Testing
Describe testing already performed for these changes:
Extensive testing on a test case provided by @hertneky . Unit tests have been run manually.
Recommend testing for the reviewer(s) to perform, including the location of input datasets, and any additional instructions:
Have a look in
/scratch/dave/mvmode_test_for_pull_request
. In that directory two .bsh files can be run.run-multi.bsh
should run a setup with intensities computed for the last 2 fields, with output going to subdirectoryoutput
.run-super.bsh
should run a setup with no intensities, just superobject output, into subdirectoryoutput-super
Do these changes include sufficient documentation updates, ensuring that no errors or warnings exist in the build of the documentation? [No] It might work, but not sure.
Do these changes include sufficient testing updates? [Not quite] More testing of traditional mode would be good, as would testing on a variety of multivar examples.
Will this PR result in changes to the test suite? [Yes]
If yes, describe the new output and/or changes to the existing output:
Unit test output file names have changed, and additional unit testing is now in place. The test is
internal/test_unit/xml/unit_mode_multivar.xml
, which now runs two instances of multivariate mode.New output files that should replace what were previously the output files for this test:
mode_Fcst_ALPHA-X,X-_Obs_ALPHA-X,X-_300000L_20120410_180000V_060000A_cts.txt
mode_Fcst_ALPHA-X,X-_Obs_ALPHA-X,X-_300000L_20120410_180000V_060000A_obj.nc
mode_Fcst_ALPHA-X,X-_Obs_ALPHA-X,X-_300000L_20120410_180000V_060000A_obj.txt
mode_Fcst_ALPHA-X,X-_Obs_ALPHA-X,X-_300000L_20120410_180000V_060000A.ps
mode_Fcst_BETA-X,X-_Obs_BETA-X,X-_300000L_20120410_180000V_060000A_cts.txt
mode_Fcst_BETA-X,X-_Obs_BETA-X,X-_300000L_20120410_180000V_060000A_obj.nc
mode_Fcst_BETA-X,X-_Obs_BETA-X,X-_300000L_20120410_180000V_060000A_obj.txt
mode_Fcst_BETA-X,X-_Obs_BETA-X,X-_300000L_20120410_180000V_060000A.ps
mode_Fcst_GAMMA-X,X-_Obs_GAMMA-X,X-_300000L_20120410_180000V_060000A_cts.txt
mode_Fcst_GAMMA-X,X-_Obs_GAMMA-X,X-_300000L_20120410_180000V_060000A_obj.nc
mode_Fcst_GAMMA-X,X-_Obs_GAMMA-X,X-_300000L_20120410_180000V_060000A_obj.txt
mode_Fcst_GAMMA-X,X-_Obs_GAMMA-X,X-_300000L_20120410_180000V_060000A.ps
mode_Fcst_Super_LO_Obs_Super_LO_300000L_20120410_180000V_060000A_cts.txt
mode_Fcst_Super_LO_Obs_Super_LO_300000L_20120410_180000V_060000A_obj.nc
mode_Fcst_Super_LO_Obs_Super_LO_300000L_20120410_180000V_060000A_obj.txt
mode_Fcst_Super_LO_Obs_Super_LO_300000L_20120410_180000V_060000A.ps
These files are here:
/scratch/dave/mvmode_test/unit_test_output/
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