[Met_help] [rt.rap.ucar.edu #57698] History for data masking for METv4.0

John Halley Gotway via RT met_help at ucar.edu
Thu Aug 2 10:16:06 MDT 2012


----------------------------------------------------------------
  Initial Request
----------------------------------------------------------------

Can you please give me an example of applying data masking in METv4.0?

----------------------------------------------------------------
  Complete Ticket History
----------------------------------------------------------------

Subject: data masking for METv4.0
From: John Halley Gotway
Time: Thu Aug 02 08:43:04 2012

Andy,

Try running the following commands from the top-level METv4.0
directory...

# This makes a plot of surface pressure in the sample data distributed
with MET.  I started with this just to see the range of values.

bin/plot_data_plane
data/sample_fcst/2005080700/wrfprs_ruc13_12.tm00_G212 sfc_pres.ps
'name = "PRES" ; level="Z0" ;'
gv sfc_pres.ps

# Edit the file "scripts/config/GridStatConfig_all" to include:

mask = {
   grid = [];
   poly = [ "data/sample_fcst/2005080700/wrfprs_ruc13_12.tm00_G212 {
name=\"PRES\"; level=\"Z0\"; } >80000" ];
};

# Then run Grid-Stat

bin/grid_stat \
  data/sample_fcst/2005080700/wrfprs_ruc13_12.tm00_G212 \
  data/sample_fcst/2005080712/wrfprs_ruc13_00.tm00_G212 \
  scripts/config/GridStatConfig_all \
  -outdir out/grid_stat -v 2

# Use ncview to see the masking region used:

ncview out/grid_stat/grid_stat_120000L_20050807_120000V_pairs.nc

So that's an example of using data masking in METv4.0.  Notice that I
had to use backslashes '\' in the poly string to escape the double
quotes.  That's kind of unfortunate.

If you're scripting this up, you may find it more convenient to make
use of environment variables:
   setenv POLY_FIELD 'name="PRES" ; level="Z0";'
   setenv POLY_THRESH '>80000'

And then in the Grid-Stat config file:
   poly = [ "data/sample_fcst/2005080700/wrfprs_ruc13_12.tm00_G212 {
${POLY_FIELD} } ${POLY_THRESH}" ];

Hopefully that'll get you going.  Just let me know if any more
questions come up.

Thanks,
John

------------------------------------------------
Subject: Re: [rt.rap.ucar.edu #57698] data masking for METv4.0
From: Andrew Newman
Time: Thu Aug 02 09:38:46 2012

Thanks a bunch John!  That looks like it will work perfectly.

Andy

On 08/02/2012 08:43 AM, John Halley Gotway via RT wrote:
> Andy,
>
> Try running the following commands from the top-level METv4.0
directory...
>
> # This makes a plot of surface pressure in the sample data
distributed with MET.  I started with this just to see the range of
values.
>
> bin/plot_data_plane
data/sample_fcst/2005080700/wrfprs_ruc13_12.tm00_G212 sfc_pres.ps
'name = "PRES" ; level="Z0" ;'
> gv sfc_pres.ps
>
> # Edit the file "scripts/config/GridStatConfig_all" to include:
>
> mask = {
>     grid = [];
>     poly = [ "data/sample_fcst/2005080700/wrfprs_ruc13_12.tm00_G212
{ name=\"PRES\"; level=\"Z0\"; } >80000" ];
> };
>
> # Then run Grid-Stat
>
> bin/grid_stat \
>    data/sample_fcst/2005080700/wrfprs_ruc13_12.tm00_G212 \
>    data/sample_fcst/2005080712/wrfprs_ruc13_00.tm00_G212 \
>    scripts/config/GridStatConfig_all \
>    -outdir out/grid_stat -v 2
>
> # Use ncview to see the masking region used:
>
> ncview out/grid_stat/grid_stat_120000L_20050807_120000V_pairs.nc
>
> So that's an example of using data masking in METv4.0.  Notice that
I had to use backslashes '\' in the poly string to escape the double
quotes.  That's kind of unfortunate.
>
> If you're scripting this up, you may find it more convenient to make
use of environment variables:
>     setenv POLY_FIELD 'name="PRES" ; level="Z0";'
>     setenv POLY_THRESH '>80000'
>
> And then in the Grid-Stat config file:
>     poly = [ "data/sample_fcst/2005080700/wrfprs_ruc13_12.tm00_G212
{ ${POLY_FIELD} } ${POLY_THRESH}" ];
>
> Hopefully that'll get you going.  Just let me know if any more
questions come up.
>
> Thanks,
> John

--
Andy Newman
NCAR/Advanced Study Program
P.O. Box 3000
Boulder, CO 80307-3000 USA
Ph: (303) 497-8456
Email: anewman at ucar.edu




------------------------------------------------


More information about the Met_help mailing list