gen_vx_mask to generate template mask #1551
-
Hello MET team! I am very new to MET at this stage. There are a number of us that the Bureau of Meteorology that are undertaking training in MET/METplus and I have begun trying to use the tools on some of our data. I have been able to use plot_data_plane and pcp_combine to generate 3 hourly precipitation accumulations from some of our ensemble model outputs and radar observations. However, our radar network does not cover the entire model domain - with the unobserved areas masked out. I plan to use grid_stat to continue my exploration of MET. However, due to the masked area in the observations, I thought I might need to generate a mask file that would then be passed into other tools to mask out the unobserved regions. Is this assumption correct? I attempted to produce such a mask file using the following: gen_vx_mask -type data \ This produces a mask.nc that is the same as the obs.nc with the missing data value altered to MET's -9999, with the observation values retained. This is not what I was expecting. I was expecting either a binary mask, or the forecast values with the mask applied (NOTE: first time using the tool!). I do receive the following warning: WARNING: apply_data_mask() -> since "-thresh" was not used to specify a threshold for data masking, the raw data values will be written. I tried to add: '-thresh 0' to the above call assuming it might help generate a binary mask and get the following error: ERROR : Dictionary::lookup_thresh() -> lookup failed for name "threshold" My questions are:
I have attached example data and logs. Thanks in advance, Shaun |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi @shaunlcooper, we're glad to hear that BOM is getting up and running with METplus, and we're happy to help! Thanks for sending along sample data to illustrate your questions. Whenever getting going with new data in MET, I always start by running the plot_data_plane tool to visualize. Here's what I see in the forecast.nc and obs.nc files you sent:
I understand that you only want to compute stats at grid points where the forecast and observations both contain valid data.
That's why the minimum value in the plot of the obs above is 0, and not -32768. MET is correctly interpreting that as missing data. Please run Grid-Stat to compare forecast.nc to obs.nc and it'll only use grid points where both the forecast and observations contain valid data. Basically, it'll ignore the obs bad data points just like you want it to.
However, it does NOT correctly extract the timing info from the obs file. Instead, it just uses the default valid time of unixtime 0 (which is 19700101):
I see that the file specifies the start_time and valid_time, however, I believe that according to CF-1.7 conventions, "valid_time" should actually just be named "time". When I rename valid_time to time, plot_data_plane does parse it, as expected:
It isn't clear to me whether setting standard_name = "time"; complies with the CF convention. If you believe so, I could ask a team member to take a closer look.
And the output file just contains the same data as obs.nc. So Gen-Vx-Mask supports several types of mask definition. The "-type data" option tells it to read a field of data and apply some threshold, specified using the "-thresh" command line option. If no threshold is specified, it just write the un-thresholded input values to the output (in some circumstances, that actually is useful). For example, you could run:
And the resulting mask of 0's and 1's are all the points where the obs precip is strictly greater than 0. I'd recommend reading through the Gen-Vx-Mask chapter of the user's guide and stepping through the online tutorial section about it. In particular, if you're interested in points close to radars, you may find the circle masking type to be of use. Please don't hesitate to ask if more questions or issues arise in your use of MET. We've also recently been recording a series of 1-hour METplus Training videos. Just click on each session name to see the embedded recording. We covered Gen-Vx-Mask in the December 14, 2021 session. |
Beta Was this translation helpful? Give feedback.
Hi @shaunlcooper, we're glad to hear that BOM is getting up and running with METplus, and we're happy to help! Thanks for sending along sample data to illustrate your questions.
Whenever getting going with new data in MET, I always start by running the plot_data_plane tool to visualize. Here's what I see in the forecast.nc and obs.nc files you sent:
And here's the result:
I understand that you only want to compute stats at grid points where the forecast and observations both co…