Help for land-sea masking #1145
-
I have created a bitmapped nectdf with land-sea masking over India. What is the command syntax to use this 'mask file' in grid_stat command Thanks and regards |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Hello Saji, I see you have a question about how to use the output of the Gen-Vx-Mask tool in the MET statistics tools, like Grid-Stat. Good news, this is very easy. Just list the path to that NetCDF data file in the "mask.poly" entry of the Grid-Stat configuration file. By way of example, please take a look at this line of a sample Grid-Stat config file: The "mask.poly" entry is an array of strings which indicate the paths to files. Those can be paths to the NetCDF output of Gen-Vx-Mask or polyline files themselves. In general, we recommend running Gen-Vx-Mask first rather than reprocessing the polyline file each time you run Grid-Stat. If the polyline contains many points or the grid is dense, re-defining that mask in each run of Grid-Stat can be slow. Here's the documentation about the mask dictionary: Note that Grid-Stat will read and apply the land/sea mask from that Gen-Vx-Mask output file. In the resulting .stat output files, you'll see that the VX_MASK column is set to the NetCDF variable name from the Gen-Vx-Mask output. The default variable name "data_mask" isn't very descriptive. When you run Gen-Vx-Mask, I'd recommend using the "-name" command line argument to set that output variable name to something more descriptive. And then that'll ultimately show up in the VX_MASK column of the Grid-Stat output. |
Beta Was this translation helpful? Give feedback.
-
Hi
Thanks for the clarification. But I am doing data masking and dont have a
poly file with lat/long values to create the ocean mask.
I created a mask file with the ocean values 0 and land values 1 using a
python program and used this mask file for grid_stat tool within the
config file in the format given below (Met version 7).
mask = {
grid = [ "FULL" ];
poly = [ "/home/saji/bigbang/LIGHTNING_verify/stats/oceanmask.nc" ];
};
It is running fine and creating grid_stat output with double output, first
with original nomask stats and below it is repeated with different values.
Is this second is the masked statistics (only over land and ocean masked).
How can we avoid writing double output stats? Or any other changes in
config file is required?
Thanks in advance
Saji
|
Beta Was this translation helpful? Give feedback.
-
Dear John
Thanks a lot for your confirmation. Yes this is working now.
Thanks again
Saji
|
Beta Was this translation helpful? Give feedback.
Hello Saji, I see you have a question about how to use the output of the Gen-Vx-Mask tool in the MET statistics tools, like Grid-Stat. Good news, this is very easy. Just list the path to that NetCDF data file in the "mask.poly" entry of the Grid-Stat configuration file. By way of example, please take a look at this line of a sample Grid-Stat config file:
https://github.com/dtcenter/MET/blob/fb666bc3289e2bf49ccfc85e716ab812e10a7628/met/scripts/config/GridStatConfig_APCP_12#L80
The "mask.poly" entry is an array of strings which indicate the paths to files. Those can be paths to the NetCDF output of Gen-Vx-Mask or polyline files themselves. In general, we recommend running Gen-Vx-Mask first …