[Met_help] [rt.rap.ucar.edu #95402] History for obs dictionary for unit specification?
John Halley Gotway via RT
met_help at ucar.edu
Fri Jun 19 12:40:57 MDT 2020
----------------------------------------------------------------
Initial Request
----------------------------------------------------------------
Hey John,
Long time no talk. Hope you and your family are doing alright through quarantine.,
I have a question about the OBS_UNITS column in the _cnt.txt files that are produced by point_Stat. How can I get something in here other than unknown?
I am using a netcdf file produced by ascii2nc, so a sample obs-field line looks like this:
587 obs = {
588 field = [
589 {name="t";desc ="MIDEAST_Nest2a0427x0307";level=["P100.0-100.0"];},
I am not seeing anything in the user guide that enables me to add an additional column (or change an existing one) to include details about units in the pre-ascii2nc ascii file so that units can be in the netcdf file. I don't even see a netcdf variable that contains details about units (maybe I am overlooking it). Hopefully it is as simple as adding another key to the obs-field dictionary. Any help would be overly appreciated!
Thank you,
Justin
----------------------------------------------------------------
Complete Ticket History
----------------------------------------------------------------
Subject: obs dictionary for unit specification?
From: John Halley Gotway
Time: Fri May 29 10:29:56 2020
Hello Justin,
We're doing alright. School just ended and I now have 3 kids without
any
remote school or summer camps! So ask me again in 3 months how I'm
doing ;)
That's a good question about populating the OBS_UNITS output column
from
Point-Stat. The FCST_UNITS and OBS_UNITS columns are rather new. They
were
added about a year ago in MET version 8.1 (
https://dtcenter.org/community-code/model-evaluation-tools-met/met-
version-8-1#notes).
When processing gridded data (e.g. gridded forecast in Point-Stat or
gridded forecast and observations in Grid-Stat), MET extracts the
units
from the NetCDF variable attribute or GRIB1/2 tables and writes those
unit
strings to the output. But you're correct in noting that no units are
included for point observations. Nor can I think of a good way to
specify
them!
We do have this enhancement documented that would apply here:
https://github.com/NCAR/MET/issues/1020
This work has not yet begun, but this would give you a way of
specifying
the units for the obs in the configuration file. For example, you
could say:
obs = {
field = [
{
name = "TMP";
level = [ "P500" ];
set_attrs = { units = "K"; }
},
{
name = "HGT";
level = [ "P500" ];
set_attrs = { units = "MSL"; }
}
];
}
If we get this functionality implemented in met-9.1, do you think that
would suffice? It still puts the handling of units in the user's
hands, but
gives you a way to document what units you used.
Thanks,
John
On Fri, May 29, 2020 at 9:59 AM Tsu, Mr. Justin via RT
<met_help at ucar.edu>
wrote:
>
> Fri May 29 09:59:24 2020: Request 95402 was acted upon.
> Transaction: Ticket created by justin.tsu at nrlmry.navy.mil
> Queue: met_help
> Subject: obs dictionary for unit specification?
> Owner: Nobody
> Requestors: justin.tsu at nrlmry.navy.mil
> Status: new
> Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=95402 >
>
>
> Hey John,
>
> Long time no talk. Hope you and your family are doing alright
through
> quarantine.,
>
> I have a question about the OBS_UNITS column in the _cnt.txt files
that
> are produced by point_Stat. How can I get something in here other
than
> unknown?
> I am using a netcdf file produced by ascii2nc, so a sample obs-field
line
> looks like this:
>
> 587 obs = {
> 588 field = [
> 589 {name="t";desc ="MIDEAST_Nest2a0427x0307";level=["P100.0-
100.0"];},
>
> I am not seeing anything in the user guide that enables me to add an
> additional column (or change an existing one) to include details
about
> units in the pre-ascii2nc ascii file so that units can be in the
netcdf
> file. I don't even see a netcdf variable that contains details
about units
> (maybe I am overlooking it). Hopefully it is as simple as adding
another
> key to the obs-field dictionary. Any help would be overly
appreciated!
>
> Thank you,
> Justin
>
>
------------------------------------------------
Subject: RE: [rt.rap.ucar.edu #95402] obs dictionary for unit specification?
From: Tsu, Mr. Justin
Time: Fri May 29 10:41:08 2020
Haha well just hearing from you in three months will be a good sign
that you've survived!
That would be fantastic. It's simple, easy to implement and
intuitive! Which netcdf attribute are you speaking of when you say
that MET extracts unit information and writes them as a string in the
output?
Thanks,
Justin
-----Original Message-----
From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
Sent: Friday, May 29, 2020 9:30 AM
To: Tsu, Mr. Justin
Subject: Re: [rt.rap.ucar.edu #95402] obs dictionary for unit
specification?
Hello Justin,
We're doing alright. School just ended and I now have 3 kids without
any
remote school or summer camps! So ask me again in 3 months how I'm
doing ;)
That's a good question about populating the OBS_UNITS output column
from
Point-Stat. The FCST_UNITS and OBS_UNITS columns are rather new. They
were
added about a year ago in MET version 8.1 (
https://dtcenter.org/community-code/model-evaluation-tools-met/met-
version-8-1#notes).
When processing gridded data (e.g. gridded forecast in Point-Stat or
gridded forecast and observations in Grid-Stat), MET extracts the
units
from the NetCDF variable attribute or GRIB1/2 tables and writes those
unit
strings to the output. But you're correct in noting that no units are
included for point observations. Nor can I think of a good way to
specify
them!
We do have this enhancement documented that would apply here:
https://github.com/NCAR/MET/issues/1020
This work has not yet begun, but this would give you a way of
specifying
the units for the obs in the configuration file. For example, you
could say:
obs = {
field = [
{
name = "TMP";
level = [ "P500" ];
set_attrs = { units = "K"; }
},
{
name = "HGT";
level = [ "P500" ];
set_attrs = { units = "MSL"; }
}
];
}
If we get this functionality implemented in met-9.1, do you think that
would suffice? It still puts the handling of units in the user's
hands, but
gives you a way to document what units you used.
Thanks,
John
On Fri, May 29, 2020 at 9:59 AM Tsu, Mr. Justin via RT
<met_help at ucar.edu>
wrote:
>
> Fri May 29 09:59:24 2020: Request 95402 was acted upon.
> Transaction: Ticket created by justin.tsu at nrlmry.navy.mil
> Queue: met_help
> Subject: obs dictionary for unit specification?
> Owner: Nobody
> Requestors: justin.tsu at nrlmry.navy.mil
> Status: new
> Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=95402 >
>
>
> Hey John,
>
> Long time no talk. Hope you and your family are doing alright
through
> quarantine.,
>
> I have a question about the OBS_UNITS column in the _cnt.txt files
that
> are produced by point_Stat. How can I get something in here other
than
> unknown?
> I am using a netcdf file produced by ascii2nc, so a sample obs-field
line
> looks like this:
>
> 587 obs = {
> 588 field = [
> 589 {name="t";desc ="MIDEAST_Nest2a0427x0307";level=["P100.0-
100.0"];},
>
> I am not seeing anything in the user guide that enables me to add an
> additional column (or change an existing one) to include details
about
> units in the pre-ascii2nc ascii file so that units can be in the
netcdf
> file. I don't even see a netcdf variable that contains details
about units
> (maybe I am overlooking it). Hopefully it is as simple as adding
another
> key to the obs-field dictionary. Any help would be overly
appreciated!
>
> Thank you,
> Justin
>
>
------------------------------------------------
Subject: obs dictionary for unit specification?
From: John Halley Gotway
Time: Fri May 29 10:53:56 2020
For example, let's say you've run pcp_combine to change the precip
accumulation interval. So this is gridded NetCDF output... not the
NetCDF
point observation files created by ascii2nc and pb2nc. Here's a
snippet of
that NetCDF header:
ncdump -h out/pcp_combine/sample_fcst_12L_2005080712V_12A.nc
...
float APCP_12(lat, lon) ;
APCP_12:name = "APCP_12" ;
APCP_12:long_name = "Total precipitation" ;
APCP_12:level = "A12" ;
APCP_12:units = "kg/m^2" ;
APCP_12:_FillValue = -9999.f ;
...
When you pass this file as input to Point-Stat or Grid-Stat, MET reads
the
"units" variable attribute (APCP_12:units = "kg/m^2" ;) and uses that
string to populate the "FCST_UNITS" or "OBS_UNITS" output column. The
same
is true when passing gridded data via python embedding. Here's that
"read_NRL_binary.py" example on the MET website:
https://dtcenter.org/sites/default/files/community-code/met/python-
scripts/read_NRL_binary.py.txt
The "units" attribute ('units': 'UNKNOWN') defines the string which
populates the FCST_UNITS or OBS_UNITS columns.
John
On Fri, May 29, 2020 at 10:41 AM Tsu, Mr. Justin via RT
<met_help at ucar.edu>
wrote:
>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=95402 >
>
> Haha well just hearing from you in three months will be a good sign
that
> you've survived!
>
> That would be fantastic. It's simple, easy to implement and
intuitive!
> Which netcdf attribute are you speaking of when you say that MET
extracts
> unit information and writes them as a string in the output?
>
> Thanks,
> Justin
> -----Original Message-----
> From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> Sent: Friday, May 29, 2020 9:30 AM
> To: Tsu, Mr. Justin
> Subject: Re: [rt.rap.ucar.edu #95402] obs dictionary for unit
> specification?
>
> Hello Justin,
>
> We're doing alright. School just ended and I now have 3 kids without
any
> remote school or summer camps! So ask me again in 3 months how I'm
doing ;)
>
> That's a good question about populating the OBS_UNITS output column
from
> Point-Stat. The FCST_UNITS and OBS_UNITS columns are rather new.
They were
> added about a year ago in MET version 8.1 (
>
> https://dtcenter.org/community-code/model-evaluation-tools-met/met-
version-8-1#notes
> ).
> When processing gridded data (e.g. gridded forecast in Point-Stat or
> gridded forecast and observations in Grid-Stat), MET extracts the
units
> from the NetCDF variable attribute or GRIB1/2 tables and writes
those unit
> strings to the output. But you're correct in noting that no units
are
> included for point observations. Nor can I think of a good way to
specify
> them!
>
> We do have this enhancement documented that would apply here:
> https://github.com/NCAR/MET/issues/1020
>
> This work has not yet begun, but this would give you a way of
specifying
> the units for the obs in the configuration file. For example, you
could
> say:
>
> obs = {
> field = [
> {
> name = "TMP";
> level = [ "P500" ];
> set_attrs = { units = "K"; }
> },
> {
> name = "HGT";
> level = [ "P500" ];
> set_attrs = { units = "MSL"; }
> }
> ];
> }
>
> If we get this functionality implemented in met-9.1, do you think
that
> would suffice? It still puts the handling of units in the user's
hands, but
> gives you a way to document what units you used.
>
> Thanks,
> John
>
> On Fri, May 29, 2020 at 9:59 AM Tsu, Mr. Justin via RT
<met_help at ucar.edu>
> wrote:
>
> >
> > Fri May 29 09:59:24 2020: Request 95402 was acted upon.
> > Transaction: Ticket created by justin.tsu at nrlmry.navy.mil
> > Queue: met_help
> > Subject: obs dictionary for unit specification?
> > Owner: Nobody
> > Requestors: justin.tsu at nrlmry.navy.mil
> > Status: new
> > Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=95402 >
> >
> >
> > Hey John,
> >
> > Long time no talk. Hope you and your family are doing alright
through
> > quarantine.,
> >
> > I have a question about the OBS_UNITS column in the _cnt.txt files
that
> > are produced by point_Stat. How can I get something in here other
than
> > unknown?
> > I am using a netcdf file produced by ascii2nc, so a sample obs-
field line
> > looks like this:
> >
> > 587 obs = {
> > 588 field = [
> > 589 {name="t";desc ="MIDEAST_Nest2a0427x0307";level=["P100.0-
100.0"];},
> >
> > I am not seeing anything in the user guide that enables me to add
an
> > additional column (or change an existing one) to include details
about
> > units in the pre-ascii2nc ascii file so that units can be in the
netcdf
> > file. I don't even see a netcdf variable that contains details
about
> units
> > (maybe I am overlooking it). Hopefully it is as simple as adding
another
> > key to the obs-field dictionary. Any help would be overly
appreciated!
> >
> > Thank you,
> > Justin
> >
> >
>
>
>
>
------------------------------------------------
More information about the Met_help
mailing list