[Met_help] [rt.rap.ucar.edu #68903] History for MODE on custom gridded data

John Halley Gotway via RT met_help at ucar.edu
Wed Sep 10 13:31:54 MDT 2014


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

Hello,

I'm wanting to use MODE to verify a custom precipitation field, maximum hail size.  I have two netcdf files, one containing the forecasted max hail size at any point in the last 24 hours, and one containing observed max hail size for the same time period.  I have interpolated my data so these files are on the same grid.  When I try running MODE on these files using the following command,

/home/adamsr/met/METv4.1/bin/mode \
  /home/adamsr/hailcast/20110427/test_morr_13.7.2/wrfout_d02_hailsum.nc \
  /home/adamsr/hailcast/20110427/aer_obs/aerHailSize20110427L2c_wrfgrid.nc \
  ./MODEConfig_hailtest \
  -outdir . -v 5

I get the following error:

DEBUG 1: Default Config File: /home/adamsr/met/METv4.1/data/config/MODEConfig_default
DEBUG 1: Match Config File: ./MODEConfig_hailtest
DEBUG 1: Merge Config File: ./MODEConfig_hailtest
DEBUG 4: Met2dDataFileFactory::new_met_2d_data_file() -> created new Met2dDataFile object of type "FileType_NcMet".
NetCDF: Attribute not found

The config file is attached.

My next thought was that perhaps certain global attributes are required in the netcdf files, so I tried running them through the pcp_combine tool.  I don't want to sum multiple files, just write my single observation (or forecast) file out in hopefully the format used by the MODE command.  I used the following command:

/home/adamsr/met/METv4.1/bin/pcp_combine \
  -sum \
  00000000_000000 24 \
  20110428_060000 24 \
  ./wrfout_d02_20110427-28_hail.nc \
  -pcpdir /home/adamsr/hailcast/20110427/test_morr_13.7.2 \
  -pcprx wrfout_d02_hailsum.nc \
  -config 'name="MAX_HAIL"; level="(*,*)";' \
  -varname MAXHAIL \
  -v 5

but still got that same error:

DEBUG 2: Performing sum command: Init/In_Accum/Valid/Out_Accum Times = 00000000_000000/240000/20110428_060000/240000
DEBUG 2: Searching for 1 files with accumulation times of 240000 to sum to a total accumulation time of 240000.
DEBUG 4: Met2dDataFileFactory::new_met_2d_data_file() -> created new Met2dDataFile object of type "FileType_NcMet".
NetCDF: Attribute not found

The wrfout_d02_hailsum.nc contains nothing but the MAX_HAIL variable.

What are both of these tools looking for in my netcdf files that I don't have?  Lat/lon?  Other variables or attributes?

Thank you!

Dr. Becky Adams Selin
Staff Scientist, AER
16th Weather Squadron
Air Force Weather Agency


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

Subject: MODE on custom gridded data
From: John Halley Gotway
Time: Tue Sep 09 13:13:10 2014

Hello,

I see that you'd like to run MODE to compare gridded forecast and
observations of maximum hail size, and you're having trouble
formatting the
input NetCDF files in a way that MET can read them.  MET supports a
few
flavors of NetCDF...
 - Gridded NetCDF files following the CF-convention (support recently
added)
 - Gridded NetCDF output of the WRF pinterp utility
 - Internal MET formatted NetCDF file

When you pass MET a NetCDF file, it inspects the file to determine
it's
type.  If it's not CF-compliant or a pinterp file, it assumes it's the
3rd
type.  The 3rd type is basically just the output of pcp_combine tool.
Long
term we'd like to switch from using a custom format to just following
the
CF-convention.  But for now, that's what it is.

MET is expecting several global and variable attributes describing the
projection and timing information.  It's erroring out when it can't
find
one of the required attributes.  If you'd like, you could post a
sample
NetCDF file to our anonymous ftp site.  I could modify it so that MET
can
read it and send it back to you with a description of the changes.

Please follow these instructions for posting data to our ftp site:
   http://www.dtcenter.org/met/users/support/met_help.php#ftp

Thanks,
John Halley Gotway
met_help at ucar.edu

On Tue, Sep 9, 2014 at 11:09 AM, SELIN, REBECCA D CTR USAF AFWA 16
WS/WXE
via RT <met_help at ucar.edu> wrote:

>
> Tue Sep 09 11:09:36 2014: Request 68903 was acted upon.
> Transaction: Ticket created by rebecca.selin.ctr at us.af.mil
>        Queue: met_help
>      Subject: MODE on custom gridded data
>        Owner: Nobody
>   Requestors: rebecca.selin.ctr at us.af.mil
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=68903 >
>
>
> Hello,
>
> I'm wanting to use MODE to verify a custom precipitation field,
maximum
> hail size.  I have two netcdf files, one containing the forecasted
max hail
> size at any point in the last 24 hours, and one containing observed
max
> hail size for the same time period.  I have interpolated my data so
these
> files are on the same grid.  When I try running MODE on these files
using
> the following command,
>
> /home/adamsr/met/METv4.1/bin/mode \
>
/home/adamsr/hailcast/20110427/test_morr_13.7.2/wrfout_d02_hailsum.nc
\
>
/home/adamsr/hailcast/20110427/aer_obs/aerHailSize20110427L2c_wrfgrid.nc
> \
>   ./MODEConfig_hailtest \
>   -outdir . -v 5
>
> I get the following error:
>
> DEBUG 1: Default Config File:
> /home/adamsr/met/METv4.1/data/config/MODEConfig_default
> DEBUG 1: Match Config File: ./MODEConfig_hailtest
> DEBUG 1: Merge Config File: ./MODEConfig_hailtest
> DEBUG 4: Met2dDataFileFactory::new_met_2d_data_file() -> created new
> Met2dDataFile object of type "FileType_NcMet".
> NetCDF: Attribute not found
>
> The config file is attached.
>
> My next thought was that perhaps certain global attributes are
required in
> the netcdf files, so I tried running them through the pcp_combine
tool.  I
> don't want to sum multiple files, just write my single observation
(or
> forecast) file out in hopefully the format used by the MODE command.
I
> used the following command:
>
> /home/adamsr/met/METv4.1/bin/pcp_combine \
>   -sum \
>   00000000_000000 24 \
>   20110428_060000 24 \
>   ./wrfout_d02_20110427-28_hail.nc \
>   -pcpdir /home/adamsr/hailcast/20110427/test_morr_13.7.2 \
>   -pcprx wrfout_d02_hailsum.nc \
>   -config 'name="MAX_HAIL"; level="(*,*)";' \
>   -varname MAXHAIL \
>   -v 5
>
> but still got that same error:
>
> DEBUG 2: Performing sum command: Init/In_Accum/Valid/Out_Accum Times
=
> 00000000_000000/240000/20110428_060000/240000
> DEBUG 2: Searching for 1 files with accumulation times of 240000 to
sum to
> a total accumulation time of 240000.
> DEBUG 4: Met2dDataFileFactory::new_met_2d_data_file() -> created new
> Met2dDataFile object of type "FileType_NcMet".
> NetCDF: Attribute not found
>
> The wrfout_d02_hailsum.nc contains nothing but the MAX_HAIL
variable.
>
> What are both of these tools looking for in my netcdf files that I
don't
> have?  Lat/lon?  Other variables or attributes?
>
> Thank you!
>
> Dr. Becky Adams Selin
> Staff Scientist, AER
> 16th Weather Squadron
> Air Force Weather Agency
>
>

------------------------------------------------
Subject: RE: [rt.rap.ucar.edu #68903] MODE on custom gridded data
From: SELIN, REBECCA D CTR USAF AFWA 16 WS/WXE
Time: Tue Sep 09 13:35:57 2014

John,

Ah, I though that could perhaps be the issue.  That's why I was
attempting to run my file through the pcp_combine tool, so it would be
in the pcp_combine "format".  But if it's just a matter of adding a
couple global attributes, etc., that sounds simple enough too.  I
ftp'd my data (aerHailSize20110427L2c_wrfgrid.nc) into selin_data,
following the ftp instructions.

Thanks for the quick response!

Dr. Becky Adams Selin
Staff Scientist, AER
16th Weather Squadron
Air Force Weather Agency

________________________________________
From: John Halley Gotway via RT [met_help at ucar.edu]
Sent: Tuesday, September 09, 2014 2:13 PM
To: SELIN, REBECCA D CTR USAF AFWA 16 WS/WXE
Subject: Re: [rt.rap.ucar.edu #68903] MODE on custom gridded data

Hello,

I see that you'd like to run MODE to compare gridded forecast and
observations of maximum hail size, and you're having trouble
formatting the
input NetCDF files in a way that MET can read them.  MET supports a
few
flavors of NetCDF...
 - Gridded NetCDF files following the CF-convention (support recently
added)
 - Gridded NetCDF output of the WRF pinterp utility
 - Internal MET formatted NetCDF file

When you pass MET a NetCDF file, it inspects the file to determine
it's
type.  If it's not CF-compliant or a pinterp file, it assumes it's the
3rd
type.  The 3rd type is basically just the output of pcp_combine tool.
Long
term we'd like to switch from using a custom format to just following
the
CF-convention.  But for now, that's what it is.

MET is expecting several global and variable attributes describing the
projection and timing information.  It's erroring out when it can't
find
one of the required attributes.  If you'd like, you could post a
sample
NetCDF file to our anonymous ftp site.  I could modify it so that MET
can
read it and send it back to you with a description of the changes.

Please follow these instructions for posting data to our ftp site:
   http://www.dtcenter.org/met/users/support/met_help.php#ftp

Thanks,
John Halley Gotway
met_help at ucar.edu

On Tue, Sep 9, 2014 at 11:09 AM, SELIN, REBECCA D CTR USAF AFWA 16
WS/WXE
via RT <met_help at ucar.edu> wrote:

>
> Tue Sep 09 11:09:36 2014: Request 68903 was acted upon.
> Transaction: Ticket created by rebecca.selin.ctr at us.af.mil
>        Queue: met_help
>      Subject: MODE on custom gridded data
>        Owner: Nobody
>   Requestors: rebecca.selin.ctr at us.af.mil
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=68903 >
>
>
> Hello,
>
> I'm wanting to use MODE to verify a custom precipitation field,
maximum
> hail size.  I have two netcdf files, one containing the forecasted
max hail
> size at any point in the last 24 hours, and one containing observed
max
> hail size for the same time period.  I have interpolated my data so
these
> files are on the same grid.  When I try running MODE on these files
using
> the following command,
>
> /home/adamsr/met/METv4.1/bin/mode \
>
/home/adamsr/hailcast/20110427/test_morr_13.7.2/wrfout_d02_hailsum.nc
\
>
/home/adamsr/hailcast/20110427/aer_obs/aerHailSize20110427L2c_wrfgrid.nc
> \
>   ./MODEConfig_hailtest \
>   -outdir . -v 5
>
> I get the following error:
>
> DEBUG 1: Default Config File:
> /home/adamsr/met/METv4.1/data/config/MODEConfig_default
> DEBUG 1: Match Config File: ./MODEConfig_hailtest
> DEBUG 1: Merge Config File: ./MODEConfig_hailtest
> DEBUG 4: Met2dDataFileFactory::new_met_2d_data_file() -> created new
> Met2dDataFile object of type "FileType_NcMet".
> NetCDF: Attribute not found
>
> The config file is attached.
>
> My next thought was that perhaps certain global attributes are
required in
> the netcdf files, so I tried running them through the pcp_combine
tool.  I
> don't want to sum multiple files, just write my single observation
(or
> forecast) file out in hopefully the format used by the MODE command.
I
> used the following command:
>
> /home/adamsr/met/METv4.1/bin/pcp_combine \
>   -sum \
>   00000000_000000 24 \
>   20110428_060000 24 \
>   ./wrfout_d02_20110427-28_hail.nc \
>   -pcpdir /home/adamsr/hailcast/20110427/test_morr_13.7.2 \
>   -pcprx wrfout_d02_hailsum.nc \
>   -config 'name="MAX_HAIL"; level="(*,*)";' \
>   -varname MAXHAIL \
>   -v 5
>
> but still got that same error:
>
> DEBUG 2: Performing sum command: Init/In_Accum/Valid/Out_Accum Times
=
> 00000000_000000/240000/20110428_060000/240000
> DEBUG 2: Searching for 1 files with accumulation times of 240000 to
sum to
> a total accumulation time of 240000.
> DEBUG 4: Met2dDataFileFactory::new_met_2d_data_file() -> created new
> Met2dDataFile object of type "FileType_NcMet".
> NetCDF: Attribute not found
>
> The wrfout_d02_hailsum.nc contains nothing but the MAX_HAIL
variable.
>
> What are both of these tools looking for in my netcdf files that I
don't
> have?  Lat/lon?  Other variables or attributes?
>
> Thank you!
>
> Dr. Becky Adams Selin
> Staff Scientist, AER
> 16th Weather Squadron
> Air Force Weather Agency
>
>



------------------------------------------------
Subject: RE: [rt.rap.ucar.edu #68903] MODE on custom gridded data
From: SELIN, REBECCA D CTR USAF AFWA 16 WS/WXE
Time: Tue Sep 09 15:14:08 2014

John,

Is it just a matter of adding all the variable and global attributes
that are in the tutorial pcp_combine output?  i.e.
tutorial/out/pcp_combine/smaple_fcst_24L_20050900V_12A.nc.

Dr. Becky Adams Selin
Staff Scientist, AER
16th Weather Squadron
Air Force Weather Agency

________________________________________
From: SELIN, REBECCA D CTR USAF AFWA 16 WS/WXE
Sent: Tuesday, September 09, 2014 2:35 PM
To: met_help at ucar.edu
Subject: RE: [rt.rap.ucar.edu #68903] MODE on custom gridded data

John,

Ah, I though that could perhaps be the issue.  That's why I was
attempting to run my file through the pcp_combine tool, so it would be
in the pcp_combine "format".  But if it's just a matter of adding a
couple global attributes, etc., that sounds simple enough too.  I
ftp'd my data (aerHailSize20110427L2c_wrfgrid.nc) into selin_data,
following the ftp instructions.

Thanks for the quick response!

Dr. Becky Adams Selin
Staff Scientist, AER
16th Weather Squadron
Air Force Weather Agency

________________________________________
From: John Halley Gotway via RT [met_help at ucar.edu]
Sent: Tuesday, September 09, 2014 2:13 PM
To: SELIN, REBECCA D CTR USAF AFWA 16 WS/WXE
Subject: Re: [rt.rap.ucar.edu #68903] MODE on custom gridded data

Hello,

I see that you'd like to run MODE to compare gridded forecast and
observations of maximum hail size, and you're having trouble
formatting the
input NetCDF files in a way that MET can read them.  MET supports a
few
flavors of NetCDF...
 - Gridded NetCDF files following the CF-convention (support recently
added)
 - Gridded NetCDF output of the WRF pinterp utility
 - Internal MET formatted NetCDF file

When you pass MET a NetCDF file, it inspects the file to determine
it's
type.  If it's not CF-compliant or a pinterp file, it assumes it's the
3rd
type.  The 3rd type is basically just the output of pcp_combine tool.
Long
term we'd like to switch from using a custom format to just following
the
CF-convention.  But for now, that's what it is.

MET is expecting several global and variable attributes describing the
projection and timing information.  It's erroring out when it can't
find
one of the required attributes.  If you'd like, you could post a
sample
NetCDF file to our anonymous ftp site.  I could modify it so that MET
can
read it and send it back to you with a description of the changes.

Please follow these instructions for posting data to our ftp site:
   http://www.dtcenter.org/met/users/support/met_help.php#ftp

Thanks,
John Halley Gotway
met_help at ucar.edu

On Tue, Sep 9, 2014 at 11:09 AM, SELIN, REBECCA D CTR USAF AFWA 16
WS/WXE
via RT <met_help at ucar.edu> wrote:

>
> Tue Sep 09 11:09:36 2014: Request 68903 was acted upon.
> Transaction: Ticket created by rebecca.selin.ctr at us.af.mil
>        Queue: met_help
>      Subject: MODE on custom gridded data
>        Owner: Nobody
>   Requestors: rebecca.selin.ctr at us.af.mil
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=68903 >
>
>
> Hello,
>
> I'm wanting to use MODE to verify a custom precipitation field,
maximum
> hail size.  I have two netcdf files, one containing the forecasted
max hail
> size at any point in the last 24 hours, and one containing observed
max
> hail size for the same time period.  I have interpolated my data so
these
> files are on the same grid.  When I try running MODE on these files
using
> the following command,
>
> /home/adamsr/met/METv4.1/bin/mode \
>
/home/adamsr/hailcast/20110427/test_morr_13.7.2/wrfout_d02_hailsum.nc
\
>
/home/adamsr/hailcast/20110427/aer_obs/aerHailSize20110427L2c_wrfgrid.nc
> \
>   ./MODEConfig_hailtest \
>   -outdir . -v 5
>
> I get the following error:
>
> DEBUG 1: Default Config File:
> /home/adamsr/met/METv4.1/data/config/MODEConfig_default
> DEBUG 1: Match Config File: ./MODEConfig_hailtest
> DEBUG 1: Merge Config File: ./MODEConfig_hailtest
> DEBUG 4: Met2dDataFileFactory::new_met_2d_data_file() -> created new
> Met2dDataFile object of type "FileType_NcMet".
> NetCDF: Attribute not found
>
> The config file is attached.
>
> My next thought was that perhaps certain global attributes are
required in
> the netcdf files, so I tried running them through the pcp_combine
tool.  I
> don't want to sum multiple files, just write my single observation
(or
> forecast) file out in hopefully the format used by the MODE command.
I
> used the following command:
>
> /home/adamsr/met/METv4.1/bin/pcp_combine \
>   -sum \
>   00000000_000000 24 \
>   20110428_060000 24 \
>   ./wrfout_d02_20110427-28_hail.nc \
>   -pcpdir /home/adamsr/hailcast/20110427/test_morr_13.7.2 \
>   -pcprx wrfout_d02_hailsum.nc \
>   -config 'name="MAX_HAIL"; level="(*,*)";' \
>   -varname MAXHAIL \
>   -v 5
>
> but still got that same error:
>
> DEBUG 2: Performing sum command: Init/In_Accum/Valid/Out_Accum Times
=
> 00000000_000000/240000/20110428_060000/240000
> DEBUG 2: Searching for 1 files with accumulation times of 240000 to
sum to
> a total accumulation time of 240000.
> DEBUG 4: Met2dDataFileFactory::new_met_2d_data_file() -> created new
> Met2dDataFile object of type "FileType_NcMet".
> NetCDF: Attribute not found
>
> The wrfout_d02_hailsum.nc contains nothing but the MAX_HAIL
variable.
>
> What are both of these tools looking for in my netcdf files that I
don't
> have?  Lat/lon?  Other variables or attributes?
>
> Thank you!
>
> Dr. Becky Adams Selin
> Staff Scientist, AER
> 16th Weather Squadron
> Air Force Weather Agency
>
>



------------------------------------------------
Subject: MODE on custom gridded data
From: John Halley Gotway
Time: Tue Sep 09 15:36:35 2014

Yes, for each variable you could add the following attributes:

    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 ;
        APCP_12:init_time = "20050807_000000" ;
        APCP_12:init_time_ut = 1123372800 ;
        APCP_12:valid_time = "20050807_120000" ;
        APCP_12:valid_time_ut = 1123416000 ;
        APCP_12:accum_time = "120000" ;
        APCP_12:accum_time_sec = 43200 ;

However, MET actually only parses _FillValue, init_time_ut,
valid_time_ut,
and accum_time_sec.  I believe it also reads name, long_name, level,
and
units but they aren't required.

The projection information is define in the global attributes.  Here's
an
example of a lambert conformal projection:
        :Projection = "Lambert Conformal" ;
        :scale_lat_1 = "25.000000" ;
        :scale_lat_2 = "25.000000" ;
        :lat_pin = "12.190000" ;
        :lon_pin = "-133.459000" ;
        :x_pin = "0.000000" ;
        :y_pin = "0.000000" ;
        :lon_orient = "-95.000000" ;
        :d_km = "40.635000" ;
        :r_km = "6371.200000" ;
        :nx = "185" ;
        :ny = "129 grid_points" ;

Do you know the definition of the grid on which your data resides?  I
took
a look at the file but couldn't discern the grid definition.

It also needs the MET_version global attribute to trigger logic for
parsing
the projection info.
         :MET_version = "V5.0" ;

Lastly, unfortunately, it needs the dimensions to be named "lat" and
"lon".  Rename south_north to lat and west_east to lon.

Once you've made those changes, try plotting it in MET using:
   bin/plot_data_plane aerHailSize20110427L2c_wrfgrid.nc
aerHailSize20110427L2c_wrfgrid.ps 'name="MESH_hail"; level="(*,*)";'

Thanks,
John


On Tue, Sep 9, 2014 at 3:14 PM, SELIN, REBECCA D CTR USAF AFWA 16
WS/WXE
via RT <met_help at ucar.edu> wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=68903 >
>
> John,
>
> Is it just a matter of adding all the variable and global attributes
that
> are in the tutorial pcp_combine output?  i.e.
> tutorial/out/pcp_combine/smaple_fcst_24L_20050900V_12A.nc.
>
> Dr. Becky Adams Selin
> Staff Scientist, AER
> 16th Weather Squadron
> Air Force Weather Agency
>
> ________________________________________
> From: SELIN, REBECCA D CTR USAF AFWA 16 WS/WXE
> Sent: Tuesday, September 09, 2014 2:35 PM
> To: met_help at ucar.edu
> Subject: RE: [rt.rap.ucar.edu #68903] MODE on custom gridded data
>
> John,
>
> Ah, I though that could perhaps be the issue.  That's why I was
attempting
> to run my file through the pcp_combine tool, so it would be in the
> pcp_combine "format".  But if it's just a matter of adding a couple
global
> attributes, etc., that sounds simple enough too.  I ftp'd my data
> (aerHailSize20110427L2c_wrfgrid.nc) into selin_data, following the
ftp
> instructions.
>
> Thanks for the quick response!
>
> Dr. Becky Adams Selin
> Staff Scientist, AER
> 16th Weather Squadron
> Air Force Weather Agency
>
> ________________________________________
> From: John Halley Gotway via RT [met_help at ucar.edu]
> Sent: Tuesday, September 09, 2014 2:13 PM
> To: SELIN, REBECCA D CTR USAF AFWA 16 WS/WXE
> Subject: Re: [rt.rap.ucar.edu #68903] MODE on custom gridded data
>
> Hello,
>
> I see that you'd like to run MODE to compare gridded forecast and
> observations of maximum hail size, and you're having trouble
formatting the
> input NetCDF files in a way that MET can read them.  MET supports a
few
> flavors of NetCDF...
>  - Gridded NetCDF files following the CF-convention (support
recently
> added)
>  - Gridded NetCDF output of the WRF pinterp utility
>  - Internal MET formatted NetCDF file
>
> When you pass MET a NetCDF file, it inspects the file to determine
it's
> type.  If it's not CF-compliant or a pinterp file, it assumes it's
the 3rd
> type.  The 3rd type is basically just the output of pcp_combine
tool.  Long
> term we'd like to switch from using a custom format to just
following the
> CF-convention.  But for now, that's what it is.
>
> MET is expecting several global and variable attributes describing
the
> projection and timing information.  It's erroring out when it can't
find
> one of the required attributes.  If you'd like, you could post a
sample
> NetCDF file to our anonymous ftp site.  I could modify it so that
MET can
> read it and send it back to you with a description of the changes.
>
> Please follow these instructions for posting data to our ftp site:
>    http://www.dtcenter.org/met/users/support/met_help.php#ftp
>
> Thanks,
> John Halley Gotway
> met_help at ucar.edu
>
> On Tue, Sep 9, 2014 at 11:09 AM, SELIN, REBECCA D CTR USAF AFWA 16
WS/WXE
> via RT <met_help at ucar.edu> wrote:
>
> >
> > Tue Sep 09 11:09:36 2014: Request 68903 was acted upon.
> > Transaction: Ticket created by rebecca.selin.ctr at us.af.mil
> >        Queue: met_help
> >      Subject: MODE on custom gridded data
> >        Owner: Nobody
> >   Requestors: rebecca.selin.ctr at us.af.mil
> >       Status: new
> >  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=68903 >
> >
> >
> > Hello,
> >
> > I'm wanting to use MODE to verify a custom precipitation field,
maximum
> > hail size.  I have two netcdf files, one containing the forecasted
max
> hail
> > size at any point in the last 24 hours, and one containing
observed max
> > hail size for the same time period.  I have interpolated my data
so these
> > files are on the same grid.  When I try running MODE on these
files using
> > the following command,
> >
> > /home/adamsr/met/METv4.1/bin/mode \
> >
/home/adamsr/hailcast/20110427/test_morr_13.7.2/wrfout_d02_hailsum.nc
> \
> >
>
/home/adamsr/hailcast/20110427/aer_obs/aerHailSize20110427L2c_wrfgrid.nc
> > \
> >   ./MODEConfig_hailtest \
> >   -outdir . -v 5
> >
> > I get the following error:
> >
> > DEBUG 1: Default Config File:
> > /home/adamsr/met/METv4.1/data/config/MODEConfig_default
> > DEBUG 1: Match Config File: ./MODEConfig_hailtest
> > DEBUG 1: Merge Config File: ./MODEConfig_hailtest
> > DEBUG 4: Met2dDataFileFactory::new_met_2d_data_file() -> created
new
> > Met2dDataFile object of type "FileType_NcMet".
> > NetCDF: Attribute not found
> >
> > The config file is attached.
> >
> > My next thought was that perhaps certain global attributes are
required
> in
> > the netcdf files, so I tried running them through the pcp_combine
tool.
> I
> > don't want to sum multiple files, just write my single observation
(or
> > forecast) file out in hopefully the format used by the MODE
command.  I
> > used the following command:
> >
> > /home/adamsr/met/METv4.1/bin/pcp_combine \
> >   -sum \
> >   00000000_000000 24 \
> >   20110428_060000 24 \
> >   ./wrfout_d02_20110427-28_hail.nc \
> >   -pcpdir /home/adamsr/hailcast/20110427/test_morr_13.7.2 \
> >   -pcprx wrfout_d02_hailsum.nc \
> >   -config 'name="MAX_HAIL"; level="(*,*)";' \
> >   -varname MAXHAIL \
> >   -v 5
> >
> > but still got that same error:
> >
> > DEBUG 2: Performing sum command: Init/In_Accum/Valid/Out_Accum
Times =
> > 00000000_000000/240000/20110428_060000/240000
> > DEBUG 2: Searching for 1 files with accumulation times of 240000
to sum
> to
> > a total accumulation time of 240000.
> > DEBUG 4: Met2dDataFileFactory::new_met_2d_data_file() -> created
new
> > Met2dDataFile object of type "FileType_NcMet".
> > NetCDF: Attribute not found
> >
> > The wrfout_d02_hailsum.nc contains nothing but the MAX_HAIL
variable.
> >
> > What are both of these tools looking for in my netcdf files that I
don't
> > have?  Lat/lon?  Other variables or attributes?
> >
> > Thank you!
> >
> > Dr. Becky Adams Selin
> > Staff Scientist, AER
> > 16th Weather Squadron
> > Air Force Weather Agency
> >
> >
>
>
>
>

------------------------------------------------
Subject: RE: [rt.rap.ucar.edu #68903] MODE on custom gridded data
From: SELIN, REBECCA D CTR USAF AFWA 16 WS/WXE
Time: Wed Sep 10 08:58:01 2014

John,

I was able to successfully get the data to plot, but in the wrong
place.  Looks like I've gotten some of the global attributes for the
map projection wrong.  Could you point me in the right direction?

Here's the header from my generated netcdf file:

netcdf wrfout_d02_hailsum {
dimensions:
        lon = 300 ;
        lat = 300 ;
variables:
        float lat(lat, lon) ;
                lat:long_name = "latitude" ;
                lat:units = "degrees_north" ;
                lat:standard_name = "latitude" ;
        float lon(lat, lon) ;
                lon:long_name = "longitude" ;
                lon:units = "degrees_east" ;
                lon:standard_name = "longitude" ;
        double MAX_HAIL_24(lat, lon) ;
                MAX_HAIL_24:name = "MAX_HAIL_24" ;
                MAX_HAIL_24:long_name = "Maximum hail size" ;
                MAX_HAIL_24:level = "A24" ;
                MAX_HAIL_24:units = "mm" ;
                MAX_HAIL_24:_FillValue = -9999. ;
                MAX_HAIL_24:init_time = "20110427_000000" ;
                MAX_HAIL_24:init_time_ut = 1303862400 ;
                MAX_HAIL_24:valid_time = "20110428_060000" ;
                MAX_HAIL_24:valid_time_ut = 1303970400 ;
                MAX_HAIL_24:accum_time = "240000" ;
                MAX_HAIL_24:accum_time_sec = 86400 ;

// global attributes:
                :FileOrigins = "Hail file generated by yours truly,
Becky Selin" ;
                :MET_version = "V4.1" ;
                :MET_tool = "pcp_combine" ;
                :RunCommand = "Max: 24 files with maximum over
010000." ;
                :Projection = "Lambert Conformal" ;
                :scale_lat_1 = "30.000000" ;
                :scale_lat_2 = "60.000000" ;
                :lat_pin = "33.63914" ;
                :lon_pin = "-87.71869" ;
                :x_pin = "0.000000" ;
                :y_pin = "0.000000" ;
                :lon_orient = "-96.000000" ;
                :d_km = "4.000" ;
                :r_km = "6371.200000" ;
                :nx = "300" ;
                :ny = "300 grid_points" ;
}

And here's my projection information:
                :TITLE = " OUTPUT FROM *             PROGRAM:WRF/CHEM
V3.6_Pre2 MODEL" ;
                :START_DATE = "2011-04-27_00:00:00" ;
                :SIMULATION_START_DATE = "2011-04-27_00:00:00" ;
                :WEST-EAST_GRID_DIMENSION = 301 ;
                :SOUTH-NORTH_GRID_DIMENSION = 301 ;
                :BOTTOM-TOP_GRID_DIMENSION = 24 ;
                :DX = 4000.f ;
                :DY = 4000.f ;
                :GRID_ID = 2 ;
                :PARENT_ID = 1 ;
                :I_PARENT_START = 58 ;
                :J_PARENT_START = 30 ;
                :PARENT_GRID_RATIO = 5 ;
                :CEN_LAT = 33.63914f ;
                :CEN_LON = -87.71869f ;
                :TRUELAT1 = 30.f ;
                :TRUELAT2 = 60.f ;
                :MOAD_CEN_LAT = 34.23001f ;
                :STAND_LON = -96.f ;
                :POLE_LAT = 90.f ;
                :POLE_LON = 0.f ;



Dr. Becky Adams Selin
Staff Scientist, AER
16th Weather Squadron
Air Force Weather Agency

________________________________________
From: John Halley Gotway via RT [met_help at ucar.edu]
Sent: Tuesday, September 09, 2014 4:36 PM
To: SELIN, REBECCA D CTR USAF AFWA 16 WS/WXE
Subject: Re: [rt.rap.ucar.edu #68903] MODE on custom gridded data

Yes, for each variable you could add the following attributes:

    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 ;
        APCP_12:init_time = "20050807_000000" ;
        APCP_12:init_time_ut = 1123372800 ;
        APCP_12:valid_time = "20050807_120000" ;
        APCP_12:valid_time_ut = 1123416000 ;
        APCP_12:accum_time = "120000" ;
        APCP_12:accum_time_sec = 43200 ;

However, MET actually only parses _FillValue, init_time_ut,
valid_time_ut,
and accum_time_sec.  I believe it also reads name, long_name, level,
and
units but they aren't required.

The projection information is define in the global attributes.  Here's
an
example of a lambert conformal projection:
        :Projection = "Lambert Conformal" ;
        :scale_lat_1 = "25.000000" ;
        :scale_lat_2 = "25.000000" ;
        :lat_pin = "12.190000" ;
        :lon_pin = "-133.459000" ;
        :x_pin = "0.000000" ;
        :y_pin = "0.000000" ;
        :lon_orient = "-95.000000" ;
        :d_km = "40.635000" ;
        :r_km = "6371.200000" ;
        :nx = "185" ;
        :ny = "129 grid_points" ;

Do you know the definition of the grid on which your data resides?  I
took
a look at the file but couldn't discern the grid definition.

It also needs the MET_version global attribute to trigger logic for
parsing
the projection info.
         :MET_version = "V5.0" ;

Lastly, unfortunately, it needs the dimensions to be named "lat" and
"lon".  Rename south_north to lat and west_east to lon.

Once you've made those changes, try plotting it in MET using:
   bin/plot_data_plane aerHailSize20110427L2c_wrfgrid.nc
aerHailSize20110427L2c_wrfgrid.ps 'name="MESH_hail"; level="(*,*)";'

Thanks,
John


On Tue, Sep 9, 2014 at 3:14 PM, SELIN, REBECCA D CTR USAF AFWA 16
WS/WXE
via RT <met_help at ucar.edu> wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=68903 >
>
> John,
>
> Is it just a matter of adding all the variable and global attributes
that
> are in the tutorial pcp_combine output?  i.e.
> tutorial/out/pcp_combine/smaple_fcst_24L_20050900V_12A.nc.
>
> Dr. Becky Adams Selin
> Staff Scientist, AER
> 16th Weather Squadron
> Air Force Weather Agency
>
> ________________________________________
> From: SELIN, REBECCA D CTR USAF AFWA 16 WS/WXE
> Sent: Tuesday, September 09, 2014 2:35 PM
> To: met_help at ucar.edu
> Subject: RE: [rt.rap.ucar.edu #68903] MODE on custom gridded data
>
> John,
>
> Ah, I though that could perhaps be the issue.  That's why I was
attempting
> to run my file through the pcp_combine tool, so it would be in the
> pcp_combine "format".  But if it's just a matter of adding a couple
global
> attributes, etc., that sounds simple enough too.  I ftp'd my data
> (aerHailSize20110427L2c_wrfgrid.nc) into selin_data, following the
ftp
> instructions.
>
> Thanks for the quick response!
>
> Dr. Becky Adams Selin
> Staff Scientist, AER
> 16th Weather Squadron
> Air Force Weather Agency
>
> ________________________________________
> From: John Halley Gotway via RT [met_help at ucar.edu]
> Sent: Tuesday, September 09, 2014 2:13 PM
> To: SELIN, REBECCA D CTR USAF AFWA 16 WS/WXE
> Subject: Re: [rt.rap.ucar.edu #68903] MODE on custom gridded data
>
> Hello,
>
> I see that you'd like to run MODE to compare gridded forecast and
> observations of maximum hail size, and you're having trouble
formatting the
> input NetCDF files in a way that MET can read them.  MET supports a
few
> flavors of NetCDF...
>  - Gridded NetCDF files following the CF-convention (support
recently
> added)
>  - Gridded NetCDF output of the WRF pinterp utility
>  - Internal MET formatted NetCDF file
>
> When you pass MET a NetCDF file, it inspects the file to determine
it's
> type.  If it's not CF-compliant or a pinterp file, it assumes it's
the 3rd
> type.  The 3rd type is basically just the output of pcp_combine
tool.  Long
> term we'd like to switch from using a custom format to just
following the
> CF-convention.  But for now, that's what it is.
>
> MET is expecting several global and variable attributes describing
the
> projection and timing information.  It's erroring out when it can't
find
> one of the required attributes.  If you'd like, you could post a
sample
> NetCDF file to our anonymous ftp site.  I could modify it so that
MET can
> read it and send it back to you with a description of the changes.
>
> Please follow these instructions for posting data to our ftp site:
>    http://www.dtcenter.org/met/users/support/met_help.php#ftp
>
> Thanks,
> John Halley Gotway
> met_help at ucar.edu
>
> On Tue, Sep 9, 2014 at 11:09 AM, SELIN, REBECCA D CTR USAF AFWA 16
WS/WXE
> via RT <met_help at ucar.edu> wrote:
>
> >
> > Tue Sep 09 11:09:36 2014: Request 68903 was acted upon.
> > Transaction: Ticket created by rebecca.selin.ctr at us.af.mil
> >        Queue: met_help
> >      Subject: MODE on custom gridded data
> >        Owner: Nobody
> >   Requestors: rebecca.selin.ctr at us.af.mil
> >       Status: new
> >  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=68903 >
> >
> >
> > Hello,
> >
> > I'm wanting to use MODE to verify a custom precipitation field,
maximum
> > hail size.  I have two netcdf files, one containing the forecasted
max
> hail
> > size at any point in the last 24 hours, and one containing
observed max
> > hail size for the same time period.  I have interpolated my data
so these
> > files are on the same grid.  When I try running MODE on these
files using
> > the following command,
> >
> > /home/adamsr/met/METv4.1/bin/mode \
> >
/home/adamsr/hailcast/20110427/test_morr_13.7.2/wrfout_d02_hailsum.nc
> \
> >
>
/home/adamsr/hailcast/20110427/aer_obs/aerHailSize20110427L2c_wrfgrid.nc
> > \
> >   ./MODEConfig_hailtest \
> >   -outdir . -v 5
> >
> > I get the following error:
> >
> > DEBUG 1: Default Config File:
> > /home/adamsr/met/METv4.1/data/config/MODEConfig_default
> > DEBUG 1: Match Config File: ./MODEConfig_hailtest
> > DEBUG 1: Merge Config File: ./MODEConfig_hailtest
> > DEBUG 4: Met2dDataFileFactory::new_met_2d_data_file() -> created
new
> > Met2dDataFile object of type "FileType_NcMet".
> > NetCDF: Attribute not found
> >
> > The config file is attached.
> >
> > My next thought was that perhaps certain global attributes are
required
> in
> > the netcdf files, so I tried running them through the pcp_combine
tool.
> I
> > don't want to sum multiple files, just write my single observation
(or
> > forecast) file out in hopefully the format used by the MODE
command.  I
> > used the following command:
> >
> > /home/adamsr/met/METv4.1/bin/pcp_combine \
> >   -sum \
> >   00000000_000000 24 \
> >   20110428_060000 24 \
> >   ./wrfout_d02_20110427-28_hail.nc \
> >   -pcpdir /home/adamsr/hailcast/20110427/test_morr_13.7.2 \
> >   -pcprx wrfout_d02_hailsum.nc \
> >   -config 'name="MAX_HAIL"; level="(*,*)";' \
> >   -varname MAXHAIL \
> >   -v 5
> >
> > but still got that same error:
> >
> > DEBUG 2: Performing sum command: Init/In_Accum/Valid/Out_Accum
Times =
> > 00000000_000000/240000/20110428_060000/240000
> > DEBUG 2: Searching for 1 files with accumulation times of 240000
to sum
> to
> > a total accumulation time of 240000.
> > DEBUG 4: Met2dDataFileFactory::new_met_2d_data_file() -> created
new
> > Met2dDataFile object of type "FileType_NcMet".
> > NetCDF: Attribute not found
> >
> > The wrfout_d02_hailsum.nc contains nothing but the MAX_HAIL
variable.
> >
> > What are both of these tools looking for in my netcdf files that I
don't
> > have?  Lat/lon?  Other variables or attributes?
> >
> > Thank you!
> >
> > Dr. Becky Adams Selin
> > Staff Scientist, AER
> > 16th Weather Squadron
> > Air Force Weather Agency
> >
> >
>
>
>
>



------------------------------------------------
Subject: MODE on custom gridded data
From: John Halley Gotway
Time: Wed Sep 10 10:23:14 2014

Dr Selin,

OK, I believe I have it figured out.  Try using the following
projection
info:
                :Projection = "Lambert Conformal" ;
                :scale_lat_1 = "30.000000" ;
                :scale_lat_2 = "60.000000" ;
                :lat_pin = "33.63914" ;
                :lon_pin = "-87.71869" ;
                :x_pin = "150.000000" ;
                :y_pin = "150.000000" ;
                :lon_orient = "-96.000000" ;
                :d_km = "4.000" ;
                :r_km = "6371.200000" ;
                :nx = "300" ;
                :ny = "300 grid_points" ;

Notice that I've just changed the x_pin and y_pin to "150".  The
lat/lon
reference point you're using is originally named "CEN_LAT" and
"CEN_LON",
and is specifying the center of the grid.  In the MET lingo, lat_pin,
lon_pin defines a lat/lon reference point.  And x_pin, y_pin defines
the
grid location of that reference point.  (0, 0) puts it at the lower-
left
corner while (150,150) puts it in the center of the grid.

I've attached two images -
 (1) Showing your data plotted with the IDV visualization tool (
http://www.unidata.ucar.edu/software/idv/) run on the original NetCDF
file
you sent me
 (2) Showing the data plotted with the plot_data_plane tool after
updating
the projection info in the NetCDF file.

Looks like their locations match.

Hope that helps.

Thanks,
John


On Wed, Sep 10, 2014 at 8:58 AM, SELIN, REBECCA D CTR USAF AFWA 16
WS/WXE
via RT <met_help at ucar.edu> wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=68903 >
>
> John,
>
> I was able to successfully get the data to plot, but in the wrong
place.
> Looks like I've gotten some of the global attributes for the map
projection
> wrong.  Could you point me in the right direction?
>
> Here's the header from my generated netcdf file:
>
> netcdf wrfout_d02_hailsum {
> dimensions:
>         lon = 300 ;
>         lat = 300 ;
> variables:
>         float lat(lat, lon) ;
>                 lat:long_name = "latitude" ;
>                 lat:units = "degrees_north" ;
>                 lat:standard_name = "latitude" ;
>         float lon(lat, lon) ;
>                 lon:long_name = "longitude" ;
>                 lon:units = "degrees_east" ;
>                 lon:standard_name = "longitude" ;
>         double MAX_HAIL_24(lat, lon) ;
>                 MAX_HAIL_24:name = "MAX_HAIL_24" ;
>                 MAX_HAIL_24:long_name = "Maximum hail size" ;
>                 MAX_HAIL_24:level = "A24" ;
>                 MAX_HAIL_24:units = "mm" ;
>                 MAX_HAIL_24:_FillValue = -9999. ;
>                 MAX_HAIL_24:init_time = "20110427_000000" ;
>                 MAX_HAIL_24:init_time_ut = 1303862400 ;
>                 MAX_HAIL_24:valid_time = "20110428_060000" ;
>                 MAX_HAIL_24:valid_time_ut = 1303970400 ;
>                 MAX_HAIL_24:accum_time = "240000" ;
>                 MAX_HAIL_24:accum_time_sec = 86400 ;
>
> // global attributes:
>                 :FileOrigins = "Hail file generated by yours truly,
Becky
> Selin" ;
>                 :MET_version = "V4.1" ;
>                 :MET_tool = "pcp_combine" ;
>                 :RunCommand = "Max: 24 files with maximum over
010000." ;
>                 :Projection = "Lambert Conformal" ;
>                 :scale_lat_1 = "30.000000" ;
>                 :scale_lat_2 = "60.000000" ;
>                 :lat_pin = "33.63914" ;
>                 :lon_pin = "-87.71869" ;
>                 :x_pin = "0.000000" ;
>                 :y_pin = "0.000000" ;
>                 :lon_orient = "-96.000000" ;
>                 :d_km = "4.000" ;
>                 :r_km = "6371.200000" ;
>                 :nx = "300" ;
>                 :ny = "300 grid_points" ;
> }
>
> And here's my projection information:
>                 :TITLE = " OUTPUT FROM *
PROGRAM:WRF/CHEM
> V3.6_Pre2 MODEL" ;
>                 :START_DATE = "2011-04-27_00:00:00" ;
>                 :SIMULATION_START_DATE = "2011-04-27_00:00:00" ;
>                 :WEST-EAST_GRID_DIMENSION = 301 ;
>                 :SOUTH-NORTH_GRID_DIMENSION = 301 ;
>                 :BOTTOM-TOP_GRID_DIMENSION = 24 ;
>                 :DX = 4000.f ;
>                 :DY = 4000.f ;
>                 :GRID_ID = 2 ;
>                 :PARENT_ID = 1 ;
>                 :I_PARENT_START = 58 ;
>                 :J_PARENT_START = 30 ;
>                 :PARENT_GRID_RATIO = 5 ;
>                 :CEN_LAT = 33.63914f ;
>                 :CEN_LON = -87.71869f ;
>                 :TRUELAT1 = 30.f ;
>                 :TRUELAT2 = 60.f ;
>                 :MOAD_CEN_LAT = 34.23001f ;
>                 :STAND_LON = -96.f ;
>                 :POLE_LAT = 90.f ;
>                 :POLE_LON = 0.f ;
>
>
>
> Dr. Becky Adams Selin
> Staff Scientist, AER
> 16th Weather Squadron
> Air Force Weather Agency
>
> ________________________________________
> From: John Halley Gotway via RT [met_help at ucar.edu]
> Sent: Tuesday, September 09, 2014 4:36 PM
> To: SELIN, REBECCA D CTR USAF AFWA 16 WS/WXE
> Subject: Re: [rt.rap.ucar.edu #68903] MODE on custom gridded data
>
> Yes, for each variable you could add the following attributes:
>
>     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 ;
>         APCP_12:init_time = "20050807_000000" ;
>         APCP_12:init_time_ut = 1123372800 ;
>         APCP_12:valid_time = "20050807_120000" ;
>         APCP_12:valid_time_ut = 1123416000 ;
>         APCP_12:accum_time = "120000" ;
>         APCP_12:accum_time_sec = 43200 ;
>
> However, MET actually only parses _FillValue, init_time_ut,
valid_time_ut,
> and accum_time_sec.  I believe it also reads name, long_name, level,
and
> units but they aren't required.
>
> The projection information is define in the global attributes.
Here's an
> example of a lambert conformal projection:
>         :Projection = "Lambert Conformal" ;
>         :scale_lat_1 = "25.000000" ;
>         :scale_lat_2 = "25.000000" ;
>         :lat_pin = "12.190000" ;
>         :lon_pin = "-133.459000" ;
>         :x_pin = "0.000000" ;
>         :y_pin = "0.000000" ;
>         :lon_orient = "-95.000000" ;
>         :d_km = "40.635000" ;
>         :r_km = "6371.200000" ;
>         :nx = "185" ;
>         :ny = "129 grid_points" ;
>
> Do you know the definition of the grid on which your data resides?
I took
> a look at the file but couldn't discern the grid definition.
>
> It also needs the MET_version global attribute to trigger logic for
parsing
> the projection info.
>          :MET_version = "V5.0" ;
>
> Lastly, unfortunately, it needs the dimensions to be named "lat" and
> "lon".  Rename south_north to lat and west_east to lon.
>
> Once you've made those changes, try plotting it in MET using:
>    bin/plot_data_plane aerHailSize20110427L2c_wrfgrid.nc
> aerHailSize20110427L2c_wrfgrid.ps 'name="MESH_hail"; level="(*,*)";'
>
> Thanks,
> John
>
>
> On Tue, Sep 9, 2014 at 3:14 PM, SELIN, REBECCA D CTR USAF AFWA 16
WS/WXE
> via RT <met_help at ucar.edu> wrote:
>
> >
> > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=68903 >
> >
> > John,
> >
> > Is it just a matter of adding all the variable and global
attributes that
> > are in the tutorial pcp_combine output?  i.e.
> > tutorial/out/pcp_combine/smaple_fcst_24L_20050900V_12A.nc.
> >
> > Dr. Becky Adams Selin
> > Staff Scientist, AER
> > 16th Weather Squadron
> > Air Force Weather Agency
> >
> > ________________________________________
> > From: SELIN, REBECCA D CTR USAF AFWA 16 WS/WXE
> > Sent: Tuesday, September 09, 2014 2:35 PM
> > To: met_help at ucar.edu
> > Subject: RE: [rt.rap.ucar.edu #68903] MODE on custom gridded data
> >
> > John,
> >
> > Ah, I though that could perhaps be the issue.  That's why I was
> attempting
> > to run my file through the pcp_combine tool, so it would be in the
> > pcp_combine "format".  But if it's just a matter of adding a
couple
> global
> > attributes, etc., that sounds simple enough too.  I ftp'd my data
> > (aerHailSize20110427L2c_wrfgrid.nc) into selin_data, following the
ftp
> > instructions.
> >
> > Thanks for the quick response!
> >
> > Dr. Becky Adams Selin
> > Staff Scientist, AER
> > 16th Weather Squadron
> > Air Force Weather Agency
> >
> > ________________________________________
> > From: John Halley Gotway via RT [met_help at ucar.edu]
> > Sent: Tuesday, September 09, 2014 2:13 PM
> > To: SELIN, REBECCA D CTR USAF AFWA 16 WS/WXE
> > Subject: Re: [rt.rap.ucar.edu #68903] MODE on custom gridded data
> >
> > Hello,
> >
> > I see that you'd like to run MODE to compare gridded forecast and
> > observations of maximum hail size, and you're having trouble
formatting
> the
> > input NetCDF files in a way that MET can read them.  MET supports
a few
> > flavors of NetCDF...
> >  - Gridded NetCDF files following the CF-convention (support
recently
> > added)
> >  - Gridded NetCDF output of the WRF pinterp utility
> >  - Internal MET formatted NetCDF file
> >
> > When you pass MET a NetCDF file, it inspects the file to determine
it's
> > type.  If it's not CF-compliant or a pinterp file, it assumes it's
the
> 3rd
> > type.  The 3rd type is basically just the output of pcp_combine
tool.
> Long
> > term we'd like to switch from using a custom format to just
following the
> > CF-convention.  But for now, that's what it is.
> >
> > MET is expecting several global and variable attributes describing
the
> > projection and timing information.  It's erroring out when it
can't find
> > one of the required attributes.  If you'd like, you could post a
sample
> > NetCDF file to our anonymous ftp site.  I could modify it so that
MET can
> > read it and send it back to you with a description of the changes.
> >
> > Please follow these instructions for posting data to our ftp site:
> >    http://www.dtcenter.org/met/users/support/met_help.php#ftp
> >
> > Thanks,
> > John Halley Gotway
> > met_help at ucar.edu
> >
> > On Tue, Sep 9, 2014 at 11:09 AM, SELIN, REBECCA D CTR USAF AFWA 16
WS/WXE
> > via RT <met_help at ucar.edu> wrote:
> >
> > >
> > > Tue Sep 09 11:09:36 2014: Request 68903 was acted upon.
> > > Transaction: Ticket created by rebecca.selin.ctr at us.af.mil
> > >        Queue: met_help
> > >      Subject: MODE on custom gridded data
> > >        Owner: Nobody
> > >   Requestors: rebecca.selin.ctr at us.af.mil
> > >       Status: new
> > >  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=68903
> >
> > >
> > >
> > > Hello,
> > >
> > > I'm wanting to use MODE to verify a custom precipitation field,
maximum
> > > hail size.  I have two netcdf files, one containing the
forecasted max
> > hail
> > > size at any point in the last 24 hours, and one containing
observed max
> > > hail size for the same time period.  I have interpolated my data
so
> these
> > > files are on the same grid.  When I try running MODE on these
files
> using
> > > the following command,
> > >
> > > /home/adamsr/met/METv4.1/bin/mode \
> > >   /home/adamsr/hailcast/20110427/test_morr_13.7.2/
> wrfout_d02_hailsum.nc
> > \
> > >
> >
/home/adamsr/hailcast/20110427/aer_obs/aerHailSize20110427L2c_wrfgrid.nc
> > > \
> > >   ./MODEConfig_hailtest \
> > >   -outdir . -v 5
> > >
> > > I get the following error:
> > >
> > > DEBUG 1: Default Config File:
> > > /home/adamsr/met/METv4.1/data/config/MODEConfig_default
> > > DEBUG 1: Match Config File: ./MODEConfig_hailtest
> > > DEBUG 1: Merge Config File: ./MODEConfig_hailtest
> > > DEBUG 4: Met2dDataFileFactory::new_met_2d_data_file() -> created
new
> > > Met2dDataFile object of type "FileType_NcMet".
> > > NetCDF: Attribute not found
> > >
> > > The config file is attached.
> > >
> > > My next thought was that perhaps certain global attributes are
required
> > in
> > > the netcdf files, so I tried running them through the
pcp_combine tool.
> > I
> > > don't want to sum multiple files, just write my single
observation (or
> > > forecast) file out in hopefully the format used by the MODE
command.  I
> > > used the following command:
> > >
> > > /home/adamsr/met/METv4.1/bin/pcp_combine \
> > >   -sum \
> > >   00000000_000000 24 \
> > >   20110428_060000 24 \
> > >   ./wrfout_d02_20110427-28_hail.nc \
> > >   -pcpdir /home/adamsr/hailcast/20110427/test_morr_13.7.2 \
> > >   -pcprx wrfout_d02_hailsum.nc \
> > >   -config 'name="MAX_HAIL"; level="(*,*)";' \
> > >   -varname MAXHAIL \
> > >   -v 5
> > >
> > > but still got that same error:
> > >
> > > DEBUG 2: Performing sum command: Init/In_Accum/Valid/Out_Accum
Times =
> > > 00000000_000000/240000/20110428_060000/240000
> > > DEBUG 2: Searching for 1 files with accumulation times of 240000
to sum
> > to
> > > a total accumulation time of 240000.
> > > DEBUG 4: Met2dDataFileFactory::new_met_2d_data_file() -> created
new
> > > Met2dDataFile object of type "FileType_NcMet".
> > > NetCDF: Attribute not found
> > >
> > > The wrfout_d02_hailsum.nc contains nothing but the MAX_HAIL
variable.
> > >
> > > What are both of these tools looking for in my netcdf files that
I
> don't
> > > have?  Lat/lon?  Other variables or attributes?
> > >
> > > Thank you!
> > >
> > > Dr. Becky Adams Selin
> > > Staff Scientist, AER
> > > 16th Weather Squadron
> > > Air Force Weather Agency
> > >
> > >
> >
> >
> >
> >
>
>
>
>

------------------------------------------------
Subject: RE: [rt.rap.ucar.edu #68903] MODE on custom gridded data
From: SELIN, REBECCA D CTR USAF AFWA 16 WS/WXE
Time: Wed Sep 10 11:20:01 2014

Success!  Now I just have to figure out my MODE settings.  Thanks for
the help.

Dr. Becky Adams Selin
Staff Scientist, AER
16th Weather Squadron
Air Force Weather Agency

________________________________________
From: John Halley Gotway via RT [met_help at ucar.edu]
Sent: Wednesday, September 10, 2014 11:23 AM
To: SELIN, REBECCA D CTR USAF AFWA 16 WS/WXE
Subject: Re: [rt.rap.ucar.edu #68903] MODE on custom gridded data

Dr Selin,

OK, I believe I have it figured out.  Try using the following
projection
info:
                :Projection = "Lambert Conformal" ;
                :scale_lat_1 = "30.000000" ;
                :scale_lat_2 = "60.000000" ;
                :lat_pin = "33.63914" ;
                :lon_pin = "-87.71869" ;
                :x_pin = "150.000000" ;
                :y_pin = "150.000000" ;
                :lon_orient = "-96.000000" ;
                :d_km = "4.000" ;
                :r_km = "6371.200000" ;
                :nx = "300" ;
                :ny = "300 grid_points" ;

Notice that I've just changed the x_pin and y_pin to "150".  The
lat/lon
reference point you're using is originally named "CEN_LAT" and
"CEN_LON",
and is specifying the center of the grid.  In the MET lingo, lat_pin,
lon_pin defines a lat/lon reference point.  And x_pin, y_pin defines
the
grid location of that reference point.  (0, 0) puts it at the lower-
left
corner while (150,150) puts it in the center of the grid.

I've attached two images -
 (1) Showing your data plotted with the IDV visualization tool (
http://www.unidata.ucar.edu/software/idv/) run on the original NetCDF
file
you sent me
 (2) Showing the data plotted with the plot_data_plane tool after
updating
the projection info in the NetCDF file.

Looks like their locations match.

Hope that helps.

Thanks,
John


On Wed, Sep 10, 2014 at 8:58 AM, SELIN, REBECCA D CTR USAF AFWA 16
WS/WXE
via RT <met_help at ucar.edu> wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=68903 >
>
> John,
>
> I was able to successfully get the data to plot, but in the wrong
place.
> Looks like I've gotten some of the global attributes for the map
projection
> wrong.  Could you point me in the right direction?
>
> Here's the header from my generated netcdf file:
>
> netcdf wrfout_d02_hailsum {
> dimensions:
>         lon = 300 ;
>         lat = 300 ;
> variables:
>         float lat(lat, lon) ;
>                 lat:long_name = "latitude" ;
>                 lat:units = "degrees_north" ;
>                 lat:standard_name = "latitude" ;
>         float lon(lat, lon) ;
>                 lon:long_name = "longitude" ;
>                 lon:units = "degrees_east" ;
>                 lon:standard_name = "longitude" ;
>         double MAX_HAIL_24(lat, lon) ;
>                 MAX_HAIL_24:name = "MAX_HAIL_24" ;
>                 MAX_HAIL_24:long_name = "Maximum hail size" ;
>                 MAX_HAIL_24:level = "A24" ;
>                 MAX_HAIL_24:units = "mm" ;
>                 MAX_HAIL_24:_FillValue = -9999. ;
>                 MAX_HAIL_24:init_time = "20110427_000000" ;
>                 MAX_HAIL_24:init_time_ut = 1303862400 ;
>                 MAX_HAIL_24:valid_time = "20110428_060000" ;
>                 MAX_HAIL_24:valid_time_ut = 1303970400 ;
>                 MAX_HAIL_24:accum_time = "240000" ;
>                 MAX_HAIL_24:accum_time_sec = 86400 ;
>
> // global attributes:
>                 :FileOrigins = "Hail file generated by yours truly,
Becky
> Selin" ;
>                 :MET_version = "V4.1" ;
>                 :MET_tool = "pcp_combine" ;
>                 :RunCommand = "Max: 24 files with maximum over
010000." ;
>                 :Projection = "Lambert Conformal" ;
>                 :scale_lat_1 = "30.000000" ;
>                 :scale_lat_2 = "60.000000" ;
>                 :lat_pin = "33.63914" ;
>                 :lon_pin = "-87.71869" ;
>                 :x_pin = "0.000000" ;
>                 :y_pin = "0.000000" ;
>                 :lon_orient = "-96.000000" ;
>                 :d_km = "4.000" ;
>                 :r_km = "6371.200000" ;
>                 :nx = "300" ;
>                 :ny = "300 grid_points" ;
> }
>
> And here's my projection information:
>                 :TITLE = " OUTPUT FROM *
PROGRAM:WRF/CHEM
> V3.6_Pre2 MODEL" ;
>                 :START_DATE = "2011-04-27_00:00:00" ;
>                 :SIMULATION_START_DATE = "2011-04-27_00:00:00" ;
>                 :WEST-EAST_GRID_DIMENSION = 301 ;
>                 :SOUTH-NORTH_GRID_DIMENSION = 301 ;
>                 :BOTTOM-TOP_GRID_DIMENSION = 24 ;
>                 :DX = 4000.f ;
>                 :DY = 4000.f ;
>                 :GRID_ID = 2 ;
>                 :PARENT_ID = 1 ;
>                 :I_PARENT_START = 58 ;
>                 :J_PARENT_START = 30 ;
>                 :PARENT_GRID_RATIO = 5 ;
>                 :CEN_LAT = 33.63914f ;
>                 :CEN_LON = -87.71869f ;
>                 :TRUELAT1 = 30.f ;
>                 :TRUELAT2 = 60.f ;
>                 :MOAD_CEN_LAT = 34.23001f ;
>                 :STAND_LON = -96.f ;
>                 :POLE_LAT = 90.f ;
>                 :POLE_LON = 0.f ;
>
>
>
> Dr. Becky Adams Selin
> Staff Scientist, AER
> 16th Weather Squadron
> Air Force Weather Agency
>
> ________________________________________
> From: John Halley Gotway via RT [met_help at ucar.edu]
> Sent: Tuesday, September 09, 2014 4:36 PM
> To: SELIN, REBECCA D CTR USAF AFWA 16 WS/WXE
> Subject: Re: [rt.rap.ucar.edu #68903] MODE on custom gridded data
>
> Yes, for each variable you could add the following attributes:
>
>     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 ;
>         APCP_12:init_time = "20050807_000000" ;
>         APCP_12:init_time_ut = 1123372800 ;
>         APCP_12:valid_time = "20050807_120000" ;
>         APCP_12:valid_time_ut = 1123416000 ;
>         APCP_12:accum_time = "120000" ;
>         APCP_12:accum_time_sec = 43200 ;
>
> However, MET actually only parses _FillValue, init_time_ut,
valid_time_ut,
> and accum_time_sec.  I believe it also reads name, long_name, level,
and
> units but they aren't required.
>
> The projection information is define in the global attributes.
Here's an
> example of a lambert conformal projection:
>         :Projection = "Lambert Conformal" ;
>         :scale_lat_1 = "25.000000" ;
>         :scale_lat_2 = "25.000000" ;
>         :lat_pin = "12.190000" ;
>         :lon_pin = "-133.459000" ;
>         :x_pin = "0.000000" ;
>         :y_pin = "0.000000" ;
>         :lon_orient = "-95.000000" ;
>         :d_km = "40.635000" ;
>         :r_km = "6371.200000" ;
>         :nx = "185" ;
>         :ny = "129 grid_points" ;
>
> Do you know the definition of the grid on which your data resides?
I took
> a look at the file but couldn't discern the grid definition.
>
> It also needs the MET_version global attribute to trigger logic for
parsing
> the projection info.
>          :MET_version = "V5.0" ;
>
> Lastly, unfortunately, it needs the dimensions to be named "lat" and
> "lon".  Rename south_north to lat and west_east to lon.
>
> Once you've made those changes, try plotting it in MET using:
>    bin/plot_data_plane aerHailSize20110427L2c_wrfgrid.nc
> aerHailSize20110427L2c_wrfgrid.ps 'name="MESH_hail"; level="(*,*)";'
>
> Thanks,
> John
>
>
> On Tue, Sep 9, 2014 at 3:14 PM, SELIN, REBECCA D CTR USAF AFWA 16
WS/WXE
> via RT <met_help at ucar.edu> wrote:
>
> >
> > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=68903 >
> >
> > John,
> >
> > Is it just a matter of adding all the variable and global
attributes that
> > are in the tutorial pcp_combine output?  i.e.
> > tutorial/out/pcp_combine/smaple_fcst_24L_20050900V_12A.nc.
> >
> > Dr. Becky Adams Selin
> > Staff Scientist, AER
> > 16th Weather Squadron
> > Air Force Weather Agency
> >
> > ________________________________________
> > From: SELIN, REBECCA D CTR USAF AFWA 16 WS/WXE
> > Sent: Tuesday, September 09, 2014 2:35 PM
> > To: met_help at ucar.edu
> > Subject: RE: [rt.rap.ucar.edu #68903] MODE on custom gridded data
> >
> > John,
> >
> > Ah, I though that could perhaps be the issue.  That's why I was
> attempting
> > to run my file through the pcp_combine tool, so it would be in the
> > pcp_combine "format".  But if it's just a matter of adding a
couple
> global
> > attributes, etc., that sounds simple enough too.  I ftp'd my data
> > (aerHailSize20110427L2c_wrfgrid.nc) into selin_data, following the
ftp
> > instructions.
> >
> > Thanks for the quick response!
> >
> > Dr. Becky Adams Selin
> > Staff Scientist, AER
> > 16th Weather Squadron
> > Air Force Weather Agency
> >
> > ________________________________________
> > From: John Halley Gotway via RT [met_help at ucar.edu]
> > Sent: Tuesday, September 09, 2014 2:13 PM
> > To: SELIN, REBECCA D CTR USAF AFWA 16 WS/WXE
> > Subject: Re: [rt.rap.ucar.edu #68903] MODE on custom gridded data
> >
> > Hello,
> >
> > I see that you'd like to run MODE to compare gridded forecast and
> > observations of maximum hail size, and you're having trouble
formatting
> the
> > input NetCDF files in a way that MET can read them.  MET supports
a few
> > flavors of NetCDF...
> >  - Gridded NetCDF files following the CF-convention (support
recently
> > added)
> >  - Gridded NetCDF output of the WRF pinterp utility
> >  - Internal MET formatted NetCDF file
> >
> > When you pass MET a NetCDF file, it inspects the file to determine
it's
> > type.  If it's not CF-compliant or a pinterp file, it assumes it's
the
> 3rd
> > type.  The 3rd type is basically just the output of pcp_combine
tool.
> Long
> > term we'd like to switch from using a custom format to just
following the
> > CF-convention.  But for now, that's what it is.
> >
> > MET is expecting several global and variable attributes describing
the
> > projection and timing information.  It's erroring out when it
can't find
> > one of the required attributes.  If you'd like, you could post a
sample
> > NetCDF file to our anonymous ftp site.  I could modify it so that
MET can
> > read it and send it back to you with a description of the changes.
> >
> > Please follow these instructions for posting data to our ftp site:
> >    http://www.dtcenter.org/met/users/support/met_help.php#ftp
> >
> > Thanks,
> > John Halley Gotway
> > met_help at ucar.edu
> >
> > On Tue, Sep 9, 2014 at 11:09 AM, SELIN, REBECCA D CTR USAF AFWA 16
WS/WXE
> > via RT <met_help at ucar.edu> wrote:
> >
> > >
> > > Tue Sep 09 11:09:36 2014: Request 68903 was acted upon.
> > > Transaction: Ticket created by rebecca.selin.ctr at us.af.mil
> > >        Queue: met_help
> > >      Subject: MODE on custom gridded data
> > >        Owner: Nobody
> > >   Requestors: rebecca.selin.ctr at us.af.mil
> > >       Status: new
> > >  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=68903
> >
> > >
> > >
> > > Hello,
> > >
> > > I'm wanting to use MODE to verify a custom precipitation field,
maximum
> > > hail size.  I have two netcdf files, one containing the
forecasted max
> > hail
> > > size at any point in the last 24 hours, and one containing
observed max
> > > hail size for the same time period.  I have interpolated my data
so
> these
> > > files are on the same grid.  When I try running MODE on these
files
> using
> > > the following command,
> > >
> > > /home/adamsr/met/METv4.1/bin/mode \
> > >   /home/adamsr/hailcast/20110427/test_morr_13.7.2/
> wrfout_d02_hailsum.nc
> > \
> > >
> >
/home/adamsr/hailcast/20110427/aer_obs/aerHailSize20110427L2c_wrfgrid.nc
> > > \
> > >   ./MODEConfig_hailtest \
> > >   -outdir . -v 5
> > >
> > > I get the following error:
> > >
> > > DEBUG 1: Default Config File:
> > > /home/adamsr/met/METv4.1/data/config/MODEConfig_default
> > > DEBUG 1: Match Config File: ./MODEConfig_hailtest
> > > DEBUG 1: Merge Config File: ./MODEConfig_hailtest
> > > DEBUG 4: Met2dDataFileFactory::new_met_2d_data_file() -> created
new
> > > Met2dDataFile object of type "FileType_NcMet".
> > > NetCDF: Attribute not found
> > >
> > > The config file is attached.
> > >
> > > My next thought was that perhaps certain global attributes are
required
> > in
> > > the netcdf files, so I tried running them through the
pcp_combine tool.
> > I
> > > don't want to sum multiple files, just write my single
observation (or
> > > forecast) file out in hopefully the format used by the MODE
command.  I
> > > used the following command:
> > >
> > > /home/adamsr/met/METv4.1/bin/pcp_combine \
> > >   -sum \
> > >   00000000_000000 24 \
> > >   20110428_060000 24 \
> > >   ./wrfout_d02_20110427-28_hail.nc \
> > >   -pcpdir /home/adamsr/hailcast/20110427/test_morr_13.7.2 \
> > >   -pcprx wrfout_d02_hailsum.nc \
> > >   -config 'name="MAX_HAIL"; level="(*,*)";' \
> > >   -varname MAXHAIL \
> > >   -v 5
> > >
> > > but still got that same error:
> > >
> > > DEBUG 2: Performing sum command: Init/In_Accum/Valid/Out_Accum
Times =
> > > 00000000_000000/240000/20110428_060000/240000
> > > DEBUG 2: Searching for 1 files with accumulation times of 240000
to sum
> > to
> > > a total accumulation time of 240000.
> > > DEBUG 4: Met2dDataFileFactory::new_met_2d_data_file() -> created
new
> > > Met2dDataFile object of type "FileType_NcMet".
> > > NetCDF: Attribute not found
> > >
> > > The wrfout_d02_hailsum.nc contains nothing but the MAX_HAIL
variable.
> > >
> > > What are both of these tools looking for in my netcdf files that
I
> don't
> > > have?  Lat/lon?  Other variables or attributes?
> > >
> > > Thank you!
> > >
> > > Dr. Becky Adams Selin
> > > Staff Scientist, AER
> > > 16th Weather Squadron
> > > Air Force Weather Agency
> > >
> > >
> >
> >
> >
> >
>
>
>
>



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


More information about the Met_help mailing list