[Met_help] [rt.rap.ucar.edu #80207] History for multiply/divide fields by a constant
John Halley Gotway via RT
met_help at ucar.edu
Wed Apr 19 13:27:53 MDT 2017
----------------------------------------------------------------
Initial Request
----------------------------------------------------------------
Good Morning,
I have a general question. In my analysis files I have
geopotential and in my model output I have geopotential
height. I have grib1 files. Is there any way in MET to divide
a field by a constant say 9.8?
Thanks,
Sherrie Fredrick
----------------------------------------------------------------
Complete Ticket History
----------------------------------------------------------------
Subject: multiply/divide fields by a constant
From: John Halley Gotway
Time: Wed Apr 19 12:40:12 2017
Sherrie,
MET does not currently provide a way for your to preform operations on
your
data. This idea has actually come up in the past... to allow the user
to
define simple derivation equations in the configuration files, but we
haven't had time or funding to add it.
Here a couple of things to consider:
(1) If you're doing categorical verification (i.e. using thresholds to
define events), this is easy. Just set "cat_thresh" separately in the
"fcst" and "obs" sections of the config file to define thresholds in
the
units for that field. But this logic doesn't help when computing
continuous statistics, like RMSE.
(2) Data in GRIB files are pretty difficult to modify, but it's pretty
easy
in NetCDF files. You could run the GRIB file through the
"pcp_combine"
tool using the "-add" option to essentially reformat that field into
NetCDF. Then you could modify the values in whatever way you'd like.
The
NCO tools provide methods for doing simple math on the command line.
Or
you could write a script in whatever language you prefer to get the
job
done.
Let's say I have a GRIB file named sample.grib. Here's how you could
run
pcp_combine on 500mb TMP to basically reformat it:
pcp_combine -add sample.grib 'name="TMP"; level="P500";'
tmp_p500.nc
Hope that helps.
Thanks,
John
On Wed, Apr 19, 2017 at 11:03 AM, Sherrie Fredrick - NOAA Affiliate
via RT <
met_help at ucar.edu> wrote:
>
> Wed Apr 19 11:03:43 2017: Request 80207 was acted upon.
> Transaction: Ticket created by sherrie.fredrick at noaa.gov
> Queue: met_help
> Subject: multiply/divide fields by a constant
> Owner: Nobody
> Requestors: sherrie.fredrick at noaa.gov
> Status: new
> Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=80207 >
>
>
> Good Morning,
>
> I have a general question. In my analysis files I have
> geopotential and in my model output I have geopotential
> height. I have grib1 files. Is there any way in MET to divide
> a field by a constant say 9.8?
>
> Thanks,
> Sherrie Fredrick
>
>
------------------------------------------------
Subject: multiply/divide fields by a constant
From: Sherrie Fredrick - NOAA Affiliate
Time: Wed Apr 19 13:14:29 2017
Thanks John,
I hope you have a great day. Thanks for answering all of
my questions.
I think the climate data operators may have a way to do it.
Sherrie
On Wed, Apr 19, 2017 at 12:40 PM, John Halley Gotway via RT <
met_help at ucar.edu> wrote:
> Sherrie,
>
> MET does not currently provide a way for your to preform operations
on your
> data. This idea has actually come up in the past... to allow the
user to
> define simple derivation equations in the configuration files, but
we
> haven't had time or funding to add it.
>
> Here a couple of things to consider:
>
> (1) If you're doing categorical verification (i.e. using thresholds
to
> define events), this is easy. Just set "cat_thresh" separately in
the
> "fcst" and "obs" sections of the config file to define thresholds in
the
> units for that field. But this logic doesn't help when computing
> continuous statistics, like RMSE.
>
> (2) Data in GRIB files are pretty difficult to modify, but it's
pretty easy
> in NetCDF files. You could run the GRIB file through the
"pcp_combine"
> tool using the "-add" option to essentially reformat that field into
> NetCDF. Then you could modify the values in whatever way you'd
like. The
> NCO tools provide methods for doing simple math on the command line.
Or
> you could write a script in whatever language you prefer to get the
job
> done.
>
> Let's say I have a GRIB file named sample.grib. Here's how you
could run
> pcp_combine on 500mb TMP to basically reformat it:
> pcp_combine -add sample.grib 'name="TMP"; level="P500";'
tmp_p500.nc
>
> Hope that helps.
>
> Thanks,
> John
>
> On Wed, Apr 19, 2017 at 11:03 AM, Sherrie Fredrick - NOAA Affiliate
via RT
> <
> met_help at ucar.edu> wrote:
>
> >
> > Wed Apr 19 11:03:43 2017: Request 80207 was acted upon.
> > Transaction: Ticket created by sherrie.fredrick at noaa.gov
> > Queue: met_help
> > Subject: multiply/divide fields by a constant
> > Owner: Nobody
> > Requestors: sherrie.fredrick at noaa.gov
> > Status: new
> > Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=80207 >
> >
> >
> > Good Morning,
> >
> > I have a general question. In my analysis files I have
> > geopotential and in my model output I have geopotential
> > height. I have grib1 files. Is there any way in MET to divide
> > a field by a constant say 9.8?
> >
> > Thanks,
> > Sherrie Fredrick
> >
> >
>
>
------------------------------------------------
More information about the Met_help
mailing list