-
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
Enhance Multivariate MODE to generate object statistics for each input field requested by the user. #1283
Comments
A visual would be good @hertneky. |
@hertneky @JohnHalleyGotway .. reality check. Is this correct? For an individual input: So you could for example end up with 2 objects from the first run, but 1 from the second run (that contains both of the first run objects within it. |
The first part sounds good to me. I am having trouble with the last sentence. If 2 super objects are identified in the 1st run, then you would still have 2 super objects in the 2nd run, but they may or may not be merged (identified as a cluster). Am I understanding that correctly? |
Hi @hertneky, This is before the superobject step, it's the individual input data.. The inner ones are the 'simple' objects (is that the right terminology?) that come from using the conv_thresh, the outer one is the simple object that comes from using a more generous threshold, the merge_thresh. For example: { name="WIND"; level="Z10"; conv_radius = 5; conv_thresh = >=8.9408; merge_thresh = >=6.7056; merge_flag = THRESH; }, Two objects when >=8.9408, one object when >= 6.7056. |
@davidalbo Yes these images are correct for merging. I just want to reiterate that the merge_thresh will only be used for merging. They don't make the super objects bigger in the end. The super objects are the same after the 2nd pass, but may or may not be considered part of a cluster. After the determining the super object clusters using the super_merge_thresh_object, that larger super_merge_thresh_object is not saved in any output. |
@hertneky understood. I've finally gotten the 'super_merge_thresh_object's to get created and I put in some code to output them as netCDF and look at them, and they seem reasonable. I did run into a problem with the first input in your original example. For the forecast the field is PrecipFlag, and you did not specify a merge_thresh or merge_flag. The code uses a default in that case, which is merge_flag=THRESH and merge_thresh = ">=1.25". This was causing problems because then my code tried to make bigger objects using these settings, which makes no sense. I added merge_flag=NONE explicitly for those fields, and that fixed it. I'd have thought the default would be merge_flag=NONE, but... does not seem to be the case. |
@davidalbo So when merge_flag is not set, it defaults to THRESH with a value of >=1.25. Is that just for the multivariate case or does that work for single MODE as well? I would have thought the default would be NONE if not specified as well. It doesn't make sense to me to have it default to THRESH with some arbitrary value, but perhaps there was some reason behind that. I don't know.
|
@hertneky What you say for at least 2 and 3 is what I've been implementing. Right now I'm at the exact place where I'm trying to do the merging for option 2 or 3. I think I need to be reminded exactly what the merge algorithm should do, and how that compares to what happens for merging in the non-multivar mode situation. This is so I can use existing code as much as possible. I might need a tag up, but you can try a comment if you want. |
@davidalbo A tag-up may be needed. So the algorithm..
|
@hertneky is it true that simple objects produced by mode have unique integer numbers associated with them? It must be true based on the output that gets produced. I need some way to tell if a super object is within a particular super merge object. The code as is right now represents super objects as binary yes/no on a grid, so there is no information about individual objects. If you agree that unique integers must be in there somewhere, I'll start backing up in the design and looking for those integers. |
Yes, to visualize this for example, one of the outputs in the nc file is fcst/obs_obj_id. These are IDs assigned to each simple object. If there are 4 objects, then the unique IDs are 1-4 (left image). This output is from the individual MODE run for visibility. This should also be applied to the super objects. In the object ASCII output, the IDS are also listed (to the right of the images). The 1st 4 lines correspond to the images of the FCST objects. The 1st column is the simple object IDs and the 2nd column is the clusters. Objects 1/2 were clustered (merged), objects 3/4 were not part of a cluster (denoted by CF000). |
do_fcst_convolution(); |
Notes for discussion today may 30: when merge_flag is not set, it defaults to THRESH with a value of >=1.25. This seems wrong and should be change for both multivar mode and single var mode to... 'no merging'. Correct? For the '2nd pass' (individual inputs masked to be inside super objects), which of these steps can be skipped? Did I implement this, which is also part of the 2nd pass, and is it correct?:
I'd like to talk through the expected behavior for the case where all the intensity flags are set FALSE. It would be a mode-like run for simple objects that have no intensities, they are just binary yes/no. |
@hertneky what about merging when settings are all FALSE for intensities? It can be done and should give the same results as the 'not all FALSE' option. Does it make sense scientifically to merge? |
@davidalbo It still makes sense to merge objects, even if no object intensity info is requested. The merging should be the same as if the user requested intensities. |
@JohnHalleyGotway @hertneky I'm modifying the unit tests. With intensity flags set TRUE, I'm getting output file names like the following, all in one output directory:
The unit test mode config file has:
Previously (the way the unit test is set up now) the output files went to numbered subdirectories with file names, for example, this is the same file with the old name:
I'm wondering about |
@JohnHalleyGotway eventually I'm going to want two unit tests, one with [TRUE, TRUE, TRUE] one with [FALSE, FALSE, FALSE]. The expected output files need to be put somewhere for the unit test to be able to compare them to the test output. The output file names and organization has changed, so all of that needs updating. THis is the one piece that's not in the MET repo, is that correct? |
@hertneky Could you have different multivar_logic for forecasts and for obs? Maybe a different number of input fields for obs than forecasts? What would that do to the intensity flags? If intensity flag 2 and 3 are TRUE, right now it is fcst field 2 is compared to obs field 2, fcst field 3 compared to obs field 3. Is it good enough for now to require equal number of fcst and obs inputs, and the same multivar_logic for fcst and obs? And the comparisons as indicated? |
…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
Release Acceptance Testing SummaryVersion: METplus-5.1.0-rc1 |
@hertneky, we discussed this on Slack but for traceability on this thread here is what we discovered:
|
Release Acceptance Testing SummaryVersion: METplus-5.1.0-rc1 |
Describe the Enhancement
I am repurposing this existing issue to better define the multi-variate MODE enhancements that are needed.
While the existing
MODEMultivarConfig_default
file exists in the repository, it is NOT actually read by Multi-Variate MODE! In all cases, MODEConfig_default is read instead. Need to understand why, and either update MODE to read it in the right circumstances or just remove it from the repo.If
MODEMultivarConfig_default
is retained, modify thenc_pairs_flag
setting in it to specify it as a dictionary, just like it is specified in MODEConfig_default. This is needed to make the logic of the MODE wrapper clear and consistent.Make large updates to the multi-variate logic, as described below.
f_super.nc
ando_super.nc
. However, it does not actually write out any object statistics.multivar_intensity_flag = [ TRUE, TRUE, FALSE ];
(default will be FALSE for all)multivar_intensity_flag
booleans:multivar_intensity_flag
booleans are false, run MODE once on the binary 0/1 super objects to generate geometric object statistics and write them to the output "*_obj.txt" file.multivar_intensity_flag
boolean flag that is true, run MODE once substituting in the raw intensity values for the corresponding fcst/obs fields. The object definition has already been performed, but we're just regenerating the statistics using the intensities for those fields. Write the output to the "*_obj.txt" output file. For any FALSE booleans, the intensity statistics will contain missing values.nc_pairs_flag
option and write intensity values to the NetCDF file, as requested by the user.multivar_name="";
to change the name of the multivariate mode output as listed in the ascii file output, for example. (default will be "super")multivar_name = "blizzard";
and we request intensity output for visibility, our ascii file(s) should append this to the FCST_VAR and OBS_VAR names e.g. blizzard_vis/vis_blizzard (preferred order?)Time Estimate
Estimate the amount of work required here.
Issues should represent approximately 1 to 3 days of work.
Sub-Issues
Consider breaking the enhancement down into sub-issues.
Relevant Deadlines
List relevant project deadlines here or state NONE.
Funding Source
2700042 WPC
Define the Metadata
Assignee
Labels
Projects and Milestone
Define Related Issue(s)
Consider the impact to the other METplus components.
Related to MET Issues:
Enhancement Checklist
See the METplus Workflow for details.
Branch name:
feature_<Issue Number>_<Description>
Pull request:
feature <Issue Number> <Description>
Select: Reviewer(s) and Linked issues
Select: Repository level development cycle Project for the next official release
Select: Milestone as the next official version
The text was updated successfully, but these errors were encountered: