[Met_help] [rt.rap.ucar.edu #57596] History for input data format

John Halley Gotway via RT met_help at ucar.edu
Thu Aug 23 08:16:57 MDT 2012


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

Hi,
 
I am having problems getting started with MET4.0. I want to use the
grid-stat and mode tools to verify daily precipitation forecasts over the
US. The problem is in preparing the data in the right format
 
For verification, I have daily gridded precipitation on a regular  0.5 deg
lat/lon grid.
I use IDL and can save the data in netcdf 
 
My questions are:
1) I tried first running the gen-poly-mask tool to create the verification
masking region.
does gen-poly-mask tool only accept the input file in grib1? 
I tried using it with the observation in netcdf but it crashed as:
 
bin/gen_poly_mask   cpc.grid.nc        /data/poly/CONUS.poly  conus.poly.nc
DEBUG 1: Input Data File:       cpc.grid.nc
DEBUG 1: Input Mask File:      /data/poly/CONUS.poly
ERROR  : 
ERROR  : read_netcdf_grid_v2() -> Projection type Lat/Lon Projection not
currently supported.
ERROR  :
 
The ncdump of the observation is:
 
netcdf cpc.grid {
dimensions:
        lon = 150 ;
        lat = 56 ;
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" ;
        float APCP_24(lat, lon) ;
                APCP_24:long_name = "Total precipitation" ;
                APCP_24:units = "mm day^-1" ;
 
// global attributes:
                :Title = "CPC Uni precipitation " ;
                :Time = "9 January 2005" ;
                :Projection = "Lat/Lon Projection" ;
                :nx = "56" ;
                :ny = "151 grid_points" ;
}
 
 
2) is there a tool to convert from netcdf to grib1?
 
3) is there a set of specific attributes that I need to save in the netcdf
file?
 
Thanks,
 
Charles.
 
*====================================================*
Dr. Charles Jones
Researcher
Earth Research Institute (ERI)
University of California, Santa Barbara, CA 93106-3060
 
phone: (805) 893-5824
fax:   (805) 893-2578
email:  <mailto:cjones at icess.ucsb.edu> cjones at eri.ucsb.edu
URL:   <http://www.icess.ucsb.edu/asr/> http://www.eri.ucsb.edu/asr/
|=====================================================*
 


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

Subject: Re: [rt.rap.ucar.edu #57596] input data format
From: John Halley Gotway
Time: Thu Jul 26 07:53:26 2012

Charles,

I'm confident we can get you up and running in short order.

First, I notice that the name of the example file you sent includes
"CPC".  And I'm wondering if you're actually using the gridded Climate
Prediction Center 1/8th degree precipitation analysis over
CONUS.  If that's the case, and you have that CPC data in it's native
binary format, you may be able to use some FORTRAN code that's posted
at the NOAA NCO branch website for a tool called "grbrfc8":
    http://www.nco.ncep.noaa.gov/pmb/codes/nwprod/sorc/nam_cpc2grbrfc8.fd/grbrfc8.f

We have used that tool to convert that data from it's native binary to
GRIB, and then used that GRIB data in MET.

However, if that's not the data you're using, you can continue
pursuing the NetCDF route via IDL.  Yes, your guess is correct - there
are some required global and variable attributes that must be
present for MET to parse the data.  The simplest example of that is to
just look at the NetCDF output of the PCP-Combine tool that's
generated when you run the test scripts:

    ncdump -h
METv4.0/out/pcp_combine/sample_fcst_12L_2005080712V_12A.nc

But that's for a Lambert Conformal projects and you're using a Lat/Lon
one.  So listed below is an example of a NetCDF header for data on a
lat/lon projection:

netcdf ex_latlon {
dimensions:
         lat = 60 ;
         lon = 120 ;
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" ;
         float APCP_01(lat, lon) ;
                 APCP_01:name = "APCP_01" ;
                 APCP_01:long_name = "Total precipitation" ;
                 APCP_01:level = "A1" ;
                 APCP_01:units = "kg/m^2" ;
                 APCP_01:_FillValue = -9999.f ;
                 APCP_01:init_time = "20050807_110000" ;
                 APCP_01:init_time_ut = 1123412400 ;
                 APCP_01:valid_time = "20050807_120000" ;
                 APCP_01:valid_time_ut = 1123416000 ;
                 APCP_01:accum_time = "010000" ;
                 APCP_01:accum_time_sec = 3600 ;

// global attributes:
                 :FileOrigins = "File ex_latlon.nc generated
20120726_134701 UTC on host rambler by the MET pcp_combine tool" ;
                 :MET_version = "V4.0" ;
                 :MET_tool = "pcp_combine" ;
                 :RunCommand = "Addition: 1 files." ;
                 :Projection = "LatLon" ;
                 :lat_ll = "25.000000 degrees_north" ;
                 :lon_ll = "-130.000000 degrees_east" ;
                 :delta_lat = "0.500000 degrees" ;
                 :delta_lon = "0.500000 degrees" ;
                 :Nlat = "60 grid_points" ;
                 :Nlon = "120 grid_points" ;
}

Here's what's required:

- The dimensions should be named lat and lon.
- The lat and lon variables are actually not used by MET, but it's
fine if they're present.
- The variable attributes should contain the "name" and "level"
attributes.  In this example "A1" means that this is precip
accumulated over 1 hour.
- The variable attributes should contain timing information:
init_time_ut, valid_time_ut, and accum_time_sec for the initialization
and valid times in unixtime (date +%s) and the accumulation interval
as a number of seconds.
- The global attributes should contain "MET_version" so that MET knows
how to parse the projection information.
- The global attributes for a lat/lon projection are: Projection,
lat_ll, lon_ll, delat_lat, delta_lon, Nlat, and Nlon (pretty self-
explanatory).

Give that a shot and just let me know if you get stuck.

Thanks,
John Halley Gotway
met_help at ucar.edu


On 07/25/2012 07:49 PM, cjones via RT wrote:
>
> Wed Jul 25 19:49:16 2012: Request 57596 was acted upon.
> Transaction: Ticket created by cjones at icess.ucsb.edu
>         Queue: met_help
>       Subject: input data format
>         Owner: Nobody
>    Requestors: cjones at icess.ucsb.edu
>        Status: new
>   Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=57596 >
>
>
> Hi,
>
> I am having problems getting started with MET4.0. I want to use the
> grid-stat and mode tools to verify daily precipitation forecasts
over the
> US. The problem is in preparing the data in the right format
>
> For verification, I have daily gridded precipitation on a regular
0.5 deg
> lat/lon grid.
> I use IDL and can save the data in netcdf
>
> My questions are:
> 1) I tried first running the gen-poly-mask tool to create the
verification
> masking region.
> does gen-poly-mask tool only accept the input file in grib1?
> I tried using it with the observation in netcdf but it crashed as:
>
> bin/gen_poly_mask   cpc.grid.nc        /data/poly/CONUS.poly
conus.poly.nc
> DEBUG 1: Input Data File:       cpc.grid.nc
> DEBUG 1: Input Mask File:      /data/poly/CONUS.poly
> ERROR  :
> ERROR  : read_netcdf_grid_v2() -> Projection type Lat/Lon Projection
not
> currently supported.
> ERROR  :
>
> The ncdump of the observation is:
>
> netcdf cpc.grid {
> dimensions:
>          lon = 150 ;
>          lat = 56 ;
> 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" ;
>          float APCP_24(lat, lon) ;
>                  APCP_24:long_name = "Total precipitation" ;
>                  APCP_24:units = "mm day^-1" ;
>
> // global attributes:
>                  :Title = "CPC Uni precipitation " ;
>                  :Time = "9 January 2005" ;
>                  :Projection = "Lat/Lon Projection" ;
>                  :nx = "56" ;
>                  :ny = "151 grid_points" ;
> }
>
>
> 2) is there a tool to convert from netcdf to grib1?
>
> 3) is there a set of specific attributes that I need to save in the
netcdf
> file?
>
> Thanks,
>
> Charles.
>
> *====================================================*
> Dr. Charles Jones
> Researcher
> Earth Research Institute (ERI)
> University of California, Santa Barbara, CA 93106-3060
>
> phone: (805) 893-5824
> fax:   (805) 893-2578
> email:  <mailto:cjones at icess.ucsb.edu> cjones at eri.ucsb.edu
> URL:   <http://www.icess.ucsb.edu/asr/> http://www.eri.ucsb.edu/asr/
> |=====================================================*
>
>


------------------------------------------------
Subject: RE: [rt.rap.ucar.edu #57596] input data format
From: cjones
Time: Thu Jul 26 19:24:30 2012

Hi John,
Thanks for the information!
Yes I am using CPC gridded precipitation but downgraded to 0.5 deg
lat/lon to be consistent with my WRF simulation.
I followed your tips and used IDL to save one cpc precipitation map in
netcdf.  I then ran gen_poly_mask to generate the mask and it worked
fine.
I am now writing some IDL code to transform the WRF forecasts to the
CPC grid and save as netcdf. I will then test the grid-stat tool.

Cheers,

Charles.

*====================================================*
Dr. Charles Jones
Researcher
Earth Research Institute (ERI)
University of California, Santa Barbara, CA 93106-3060

phone: (805) 893-5824
fax:   (805) 893-2578
email: cjones at eri.ucsb.edu
URL:  http://www.eri.ucsb.edu/asr/
|=====================================================*


-----Original Message-----
From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
Sent: Thursday, July 26, 2012 6:53 AM
To: cjones at icess.ucsb.edu
Subject: Re: [rt.rap.ucar.edu #57596] input data format

Charles,

I'm confident we can get you up and running in short order.

First, I notice that the name of the example file you sent includes
"CPC".  And I'm wondering if you're actually using the gridded Climate
Prediction Center 1/8th degree precipitation analysis over CONUS.  If
that's the case, and you have that CPC data in it's native binary
format, you may be able to use some FORTRAN code that's posted at the
NOAA NCO branch website for a tool called "grbrfc8":
    http://www.nco.ncep.noaa.gov/pmb/codes/nwprod/sorc/nam_cpc2grbrfc8.fd/grbrfc8.f

We have used that tool to convert that data from it's native binary to
GRIB, and then used that GRIB data in MET.

However, if that's not the data you're using, you can continue
pursuing the NetCDF route via IDL.  Yes, your guess is correct - there
are some required global and variable attributes that must be present
for MET to parse the data.  The simplest example of that is to just
look at the NetCDF output of the PCP-Combine tool that's generated
when you run the test scripts:

    ncdump -h
METv4.0/out/pcp_combine/sample_fcst_12L_2005080712V_12A.nc

But that's for a Lambert Conformal projects and you're using a Lat/Lon
one.  So listed below is an example of a NetCDF header for data on a
lat/lon projection:

netcdf ex_latlon {
dimensions:
         lat = 60 ;
         lon = 120 ;
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" ;
         float APCP_01(lat, lon) ;
                 APCP_01:name = "APCP_01" ;
                 APCP_01:long_name = "Total precipitation" ;
                 APCP_01:level = "A1" ;
                 APCP_01:units = "kg/m^2" ;
                 APCP_01:_FillValue = -9999.f ;
                 APCP_01:init_time = "20050807_110000" ;
                 APCP_01:init_time_ut = 1123412400 ;
                 APCP_01:valid_time = "20050807_120000" ;
                 APCP_01:valid_time_ut = 1123416000 ;
                 APCP_01:accum_time = "010000" ;
                 APCP_01:accum_time_sec = 3600 ;

// global attributes:
                 :FileOrigins = "File ex_latlon.nc generated
20120726_134701 UTC on host rambler by the MET pcp_combine tool" ;
                 :MET_version = "V4.0" ;
                 :MET_tool = "pcp_combine" ;
                 :RunCommand = "Addition: 1 files." ;
                 :Projection = "LatLon" ;
                 :lat_ll = "25.000000 degrees_north" ;
                 :lon_ll = "-130.000000 degrees_east" ;
                 :delta_lat = "0.500000 degrees" ;
                 :delta_lon = "0.500000 degrees" ;
                 :Nlat = "60 grid_points" ;
                 :Nlon = "120 grid_points" ; }

Here's what's required:

- The dimensions should be named lat and lon.
- The lat and lon variables are actually not used by MET, but it's
fine if they're present.
- The variable attributes should contain the "name" and "level"
attributes.  In this example "A1" means that this is precip
accumulated over 1 hour.
- The variable attributes should contain timing information:
init_time_ut, valid_time_ut, and accum_time_sec for the initialization
and valid times in unixtime (date +%s) and the accumulation interval
as a number of seconds.
- The global attributes should contain "MET_version" so that MET knows
how to parse the projection information.
- The global attributes for a lat/lon projection are: Projection,
lat_ll, lon_ll, delat_lat, delta_lon, Nlat, and Nlon (pretty self-
explanatory).

Give that a shot and just let me know if you get stuck.

Thanks,
John Halley Gotway
met_help at ucar.edu


On 07/25/2012 07:49 PM, cjones via RT wrote:
>
> Wed Jul 25 19:49:16 2012: Request 57596 was acted upon.
> Transaction: Ticket created by cjones at icess.ucsb.edu
>         Queue: met_help
>       Subject: input data format
>         Owner: Nobody
>    Requestors: cjones at icess.ucsb.edu
>        Status: new
>   Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=57596
> >
>
>
> Hi,
>
> I am having problems getting started with MET4.0. I want to use the
> grid-stat and mode tools to verify daily precipitation forecasts
over
> the US. The problem is in preparing the data in the right format
>
> For verification, I have daily gridded precipitation on a regular
0.5
> deg lat/lon grid.
> I use IDL and can save the data in netcdf
>
> My questions are:
> 1) I tried first running the gen-poly-mask tool to create the
> verification masking region.
> does gen-poly-mask tool only accept the input file in grib1?
> I tried using it with the observation in netcdf but it crashed as:
>
> bin/gen_poly_mask   cpc.grid.nc        /data/poly/CONUS.poly
conus.poly.nc
> DEBUG 1: Input Data File:       cpc.grid.nc
> DEBUG 1: Input Mask File:      /data/poly/CONUS.poly
> ERROR  :
> ERROR  : read_netcdf_grid_v2() -> Projection type Lat/Lon Projection
> not currently supported.
> ERROR  :
>
> The ncdump of the observation is:
>
> netcdf cpc.grid {
> dimensions:
>          lon = 150 ;
>          lat = 56 ;
> 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" ;
>          float APCP_24(lat, lon) ;
>                  APCP_24:long_name = "Total precipitation" ;
>                  APCP_24:units = "mm day^-1" ;
>
> // global attributes:
>                  :Title = "CPC Uni precipitation " ;
>                  :Time = "9 January 2005" ;
>                  :Projection = "Lat/Lon Projection" ;
>                  :nx = "56" ;
>                  :ny = "151 grid_points" ; }
>
>
> 2) is there a tool to convert from netcdf to grib1?
>
> 3) is there a set of specific attributes that I need to save in the
netcdf
> file?
>
> Thanks,
>
> Charles.
>
> *====================================================*
> Dr. Charles Jones
> Researcher
> Earth Research Institute (ERI)
> University of California, Santa Barbara, CA 93106-3060
>
> phone: (805) 893-5824
> fax:   (805) 893-2578
> email:  <mailto:cjones at icess.ucsb.edu> cjones at eri.ucsb.edu
> URL:   <http://www.icess.ucsb.edu/asr/> http://www.eri.ucsb.edu/asr/
> |=====================================================*
>
>




------------------------------------------------
Subject: input data format
From: cjones
Time: Fri Jul 27 20:40:25 2012

Hi John,
This is my situation so far.
1) I can save the CPC precipitation data in the correct netcdf  format
2) I am trying now to use UPP/copygb to convert the WRF simulation to
grib1 and interpolated to the same lat/lon grid as the CPC data
(I suppose that's the easiest way to prepare the data for grid-stat
and mode tools)

However, my WRF simulation is 15 days long saved every 1h and all in
one netcdf file.
all forecasts are in one file   wrfout_d02_2004-12-29_00:00:00

If I set the run_unipost script as:

#--- EDIT HERE
--------------------------------------------------------
# startdate = Forecast start date
# fhr =  first forecast hour to be post-processed
# lastfhr = last forecast hour to be post-processed
# incrementhr = the incement (in hours) between forecast files
#----------------------------------------------------------------------

export startdate=2004122900

export fhr=00
export lastfhr=00
export incrementhr=01

it works fine and outputs the first forecast

if I try:

export startdate=2004122900

export fhr=00
export lastfhr=03
export incrementhr=01

it crashes because it does not find a file ../wrfprd/wrfout_d02_2004-
12-29_01:00:00

The UPP documentation says that UPP can be run across multiple
forecast times in a single output file to extract a specified hour.

Do you have any suggestions?
I attached the run_unipost script

Thanks,

Charles.

*====================================================*
Dr. Charles Jones
Researcher
Earth Research Institute (ERI)
University of California, Santa Barbara, CA 93106-3060

phone: (805) 893-5824
fax:   (805) 893-2578
email: cjones at eri.ucsb.edu
URL:  http://www.eri.ucsb.edu/asr/
|=====================================================*


-----Original Message-----
From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
Sent: Thursday, July 26, 2012 6:53 AM
To: cjones at icess.ucsb.edu
Subject: Re: [rt.rap.ucar.edu #57596] input data format

Charles,

I'm confident we can get you up and running in short order.

First, I notice that the name of the example file you sent includes
"CPC".  And I'm wondering if you're actually using the gridded Climate
Prediction Center 1/8th degree precipitation analysis over CONUS.  If
that's the case, and you have that CPC data in it's native binary
format, you may be able to use some FORTRAN code that's posted at the
NOAA NCO branch website for a tool called "grbrfc8":
    http://www.nco.ncep.noaa.gov/pmb/codes/nwprod/sorc/nam_cpc2grbrfc8.fd/grbrfc8.f

We have used that tool to convert that data from it's native binary to
GRIB, and then used that GRIB data in MET.

However, if that's not the data you're using, you can continue
pursuing the NetCDF route via IDL.  Yes, your guess is correct - there
are some required global and variable attributes that must be present
for MET to parse the data.  The simplest example of that is to just
look at the NetCDF output of the PCP-Combine tool that's generated
when you run the test scripts:

    ncdump -h
METv4.0/out/pcp_combine/sample_fcst_12L_2005080712V_12A.nc

But that's for a Lambert Conformal projects and you're using a Lat/Lon
one.  So listed below is an example of a NetCDF header for data on a
lat/lon projection:

netcdf ex_latlon {
dimensions:
         lat = 60 ;
         lon = 120 ;
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" ;
         float APCP_01(lat, lon) ;
                 APCP_01:name = "APCP_01" ;
                 APCP_01:long_name = "Total precipitation" ;
                 APCP_01:level = "A1" ;
                 APCP_01:units = "kg/m^2" ;
                 APCP_01:_FillValue = -9999.f ;
                 APCP_01:init_time = "20050807_110000" ;
                 APCP_01:init_time_ut = 1123412400 ;
                 APCP_01:valid_time = "20050807_120000" ;
                 APCP_01:valid_time_ut = 1123416000 ;
                 APCP_01:accum_time = "010000" ;
                 APCP_01:accum_time_sec = 3600 ;

// global attributes:
                 :FileOrigins = "File ex_latlon.nc generated
20120726_134701 UTC on host rambler by the MET pcp_combine tool" ;
                 :MET_version = "V4.0" ;
                 :MET_tool = "pcp_combine" ;
                 :RunCommand = "Addition: 1 files." ;
                 :Projection = "LatLon" ;
                 :lat_ll = "25.000000 degrees_north" ;
                 :lon_ll = "-130.000000 degrees_east" ;
                 :delta_lat = "0.500000 degrees" ;
                 :delta_lon = "0.500000 degrees" ;
                 :Nlat = "60 grid_points" ;
                 :Nlon = "120 grid_points" ; }

Here's what's required:

- The dimensions should be named lat and lon.
- The lat and lon variables are actually not used by MET, but it's
fine if they're present.
- The variable attributes should contain the "name" and "level"
attributes.  In this example "A1" means that this is precip
accumulated over 1 hour.
- The variable attributes should contain timing information:
init_time_ut, valid_time_ut, and accum_time_sec for the initialization
and valid times in unixtime (date +%s) and the accumulation interval
as a number of seconds.
- The global attributes should contain "MET_version" so that MET knows
how to parse the projection information.
- The global attributes for a lat/lon projection are: Projection,
lat_ll, lon_ll, delat_lat, delta_lon, Nlat, and Nlon (pretty self-
explanatory).

Give that a shot and just let me know if you get stuck.

Thanks,
John Halley Gotway
met_help at ucar.edu


On 07/25/2012 07:49 PM, cjones via RT wrote:
>
> Wed Jul 25 19:49:16 2012: Request 57596 was acted upon.
> Transaction: Ticket created by cjones at icess.ucsb.edu
>         Queue: met_help
>       Subject: input data format
>         Owner: Nobody
>    Requestors: cjones at icess.ucsb.edu
>        Status: new
>   Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=57596
> >
>
>
> Hi,
>
> I am having problems getting started with MET4.0. I want to use the
> grid-stat and mode tools to verify daily precipitation forecasts
over
> the US. The problem is in preparing the data in the right format
>
> For verification, I have daily gridded precipitation on a regular
0.5
> deg lat/lon grid.
> I use IDL and can save the data in netcdf
>
> My questions are:
> 1) I tried first running the gen-poly-mask tool to create the
> verification masking region.
> does gen-poly-mask tool only accept the input file in grib1?
> I tried using it with the observation in netcdf but it crashed as:
>
> bin/gen_poly_mask   cpc.grid.nc        /data/poly/CONUS.poly
conus.poly.nc
> DEBUG 1: Input Data File:       cpc.grid.nc
> DEBUG 1: Input Mask File:      /data/poly/CONUS.poly
> ERROR  :
> ERROR  : read_netcdf_grid_v2() -> Projection type Lat/Lon Projection
> not currently supported.
> ERROR  :
>
> The ncdump of the observation is:
>
> netcdf cpc.grid {
> dimensions:
>          lon = 150 ;
>          lat = 56 ;
> 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" ;
>          float APCP_24(lat, lon) ;
>                  APCP_24:long_name = "Total precipitation" ;
>                  APCP_24:units = "mm day^-1" ;
>
> // global attributes:
>                  :Title = "CPC Uni precipitation " ;
>                  :Time = "9 January 2005" ;
>                  :Projection = "Lat/Lon Projection" ;
>                  :nx = "56" ;
>                  :ny = "151 grid_points" ; }
>
>
> 2) is there a tool to convert from netcdf to grib1?
>
> 3) is there a set of specific attributes that I need to save in the
netcdf
> file?
>
> Thanks,
>
> Charles.
>
> *====================================================*
> Dr. Charles Jones
> Researcher
> Earth Research Institute (ERI)
> University of California, Santa Barbara, CA 93106-3060
>
> phone: (805) 893-5824
> fax:   (805) 893-2578
> email:  <mailto:cjones at icess.ucsb.edu> cjones at eri.ucsb.edu
> URL:   <http://www.icess.ucsb.edu/asr/> http://www.eri.ucsb.edu/asr/
> |=====================================================*
>
>



------------------------------------------------
Subject: Re: [rt.rap.ucar.edu #57596] input data format
From: John Halley Gotway
Time: Mon Jul 30 07:03:49 2012

Charles,

Support for running UPP is generally provided through
wrfhelp at ucar.edu, but I can offer one suggestion.  Since you have
multiple output times in a single file, I believe you should be using
the script
named "run_unipost_frames".  I diffed "run_unipost" and
"run_unipost_frames" and I see one big difference in the creation of
the "itag" file, in the former it is uses the forecast lead time to
construct the wrfout file name to be used, while in the latter, it
uses the initialization time for it.  So I think that'll address the
error you're seeing.

Hope that gets you going in the right direction.

Thanks,
John

On 07/27/2012 08:40 PM, cjones via RT wrote:
>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=57596 >
>
> Hi John,
> This is my situation so far.
> 1) I can save the CPC precipitation data in the correct netcdf
format
> 2) I am trying now to use UPP/copygb to convert the WRF simulation
to grib1 and interpolated to the same lat/lon grid as the CPC data
> (I suppose that's the easiest way to prepare the data for grid-stat
and mode tools)
>
> However, my WRF simulation is 15 days long saved every 1h and all in
one netcdf file.
> all forecasts are in one file   wrfout_d02_2004-12-29_00:00:00
>
> If I set the run_unipost script as:
>
> #--- EDIT HERE
--------------------------------------------------------
> # startdate = Forecast start date
> # fhr =  first forecast hour to be post-processed
> # lastfhr = last forecast hour to be post-processed
> # incrementhr = the incement (in hours) between forecast files
>
#----------------------------------------------------------------------
>
> export startdate=2004122900
>
> export fhr=00
> export lastfhr=00
> export incrementhr=01
>
> it works fine and outputs the first forecast
>
> if I try:
>
> export startdate=2004122900
>
> export fhr=00
> export lastfhr=03
> export incrementhr=01
>
> it crashes because it does not find a file
../wrfprd/wrfout_d02_2004-12-29_01:00:00
>
> The UPP documentation says that UPP can be run across multiple
forecast times in a single output file to extract a specified hour.
>
> Do you have any suggestions?
> I attached the run_unipost script
>
> Thanks,
>
> Charles.
>
> *====================================================*
> Dr. Charles Jones
> Researcher
> Earth Research Institute (ERI)
> University of California, Santa Barbara, CA 93106-3060
>
> phone: (805) 893-5824
> fax:   (805) 893-2578
> email: cjones at eri.ucsb.edu
> URL:  http://www.eri.ucsb.edu/asr/
> |=====================================================*
>
>
> -----Original Message-----
> From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> Sent: Thursday, July 26, 2012 6:53 AM
> To: cjones at icess.ucsb.edu
> Subject: Re: [rt.rap.ucar.edu #57596] input data format
>
> Charles,
>
> I'm confident we can get you up and running in short order.
>
> First, I notice that the name of the example file you sent includes
"CPC".  And I'm wondering if you're actually using the gridded Climate
Prediction Center 1/8th degree precipitation analysis over CONUS.  If
that's the case, and you have that CPC data in it's native binary
format, you may be able to use some FORTRAN code that's posted at the
NOAA NCO branch website for a tool called "grbrfc8":
>
http://www.nco.ncep.noaa.gov/pmb/codes/nwprod/sorc/nam_cpc2grbrfc8.fd/grbrfc8.f
>
> We have used that tool to convert that data from it's native binary
to GRIB, and then used that GRIB data in MET.
>
> However, if that's not the data you're using, you can continue
pursuing the NetCDF route via IDL.  Yes, your guess is correct - there
are some required global and variable attributes that must be present
for MET to parse the data.  The simplest example of that is to just
look at the NetCDF output of the PCP-Combine tool that's generated
when you run the test scripts:
>
>      ncdump -h
METv4.0/out/pcp_combine/sample_fcst_12L_2005080712V_12A.nc
>
> But that's for a Lambert Conformal projects and you're using a
Lat/Lon one.  So listed below is an example of a NetCDF header for
data on a lat/lon projection:
>
> netcdf ex_latlon {
> dimensions:
>           lat = 60 ;
>           lon = 120 ;
> 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" ;
>           float APCP_01(lat, lon) ;
>                   APCP_01:name = "APCP_01" ;
>                   APCP_01:long_name = "Total precipitation" ;
>                   APCP_01:level = "A1" ;
>                   APCP_01:units = "kg/m^2" ;
>                   APCP_01:_FillValue = -9999.f ;
>                   APCP_01:init_time = "20050807_110000" ;
>                   APCP_01:init_time_ut = 1123412400 ;
>                   APCP_01:valid_time = "20050807_120000" ;
>                   APCP_01:valid_time_ut = 1123416000 ;
>                   APCP_01:accum_time = "010000" ;
>                   APCP_01:accum_time_sec = 3600 ;
>
> // global attributes:
>                   :FileOrigins = "File ex_latlon.nc generated
20120726_134701 UTC on host rambler by the MET pcp_combine tool" ;
>                   :MET_version = "V4.0" ;
>                   :MET_tool = "pcp_combine" ;
>                   :RunCommand = "Addition: 1 files." ;
>                   :Projection = "LatLon" ;
>                   :lat_ll = "25.000000 degrees_north" ;
>                   :lon_ll = "-130.000000 degrees_east" ;
>                   :delta_lat = "0.500000 degrees" ;
>                   :delta_lon = "0.500000 degrees" ;
>                   :Nlat = "60 grid_points" ;
>                   :Nlon = "120 grid_points" ; }
>
> Here's what's required:
>
> - The dimensions should be named lat and lon.
> - The lat and lon variables are actually not used by MET, but it's
fine if they're present.
> - The variable attributes should contain the "name" and "level"
attributes.  In this example "A1" means that this is precip
accumulated over 1 hour.
> - The variable attributes should contain timing information:
init_time_ut, valid_time_ut, and accum_time_sec for the initialization
and valid times in unixtime (date +%s) and the accumulation interval
as a number of seconds.
> - The global attributes should contain "MET_version" so that MET
knows how to parse the projection information.
> - The global attributes for a lat/lon projection are: Projection,
lat_ll, lon_ll, delat_lat, delta_lon, Nlat, and Nlon (pretty self-
explanatory).
>
> Give that a shot and just let me know if you get stuck.
>
> Thanks,
> John Halley Gotway
> met_help at ucar.edu
>
>
> On 07/25/2012 07:49 PM, cjones via RT wrote:
>>
>> Wed Jul 25 19:49:16 2012: Request 57596 was acted upon.
>> Transaction: Ticket created by cjones at icess.ucsb.edu
>>          Queue: met_help
>>        Subject: input data format
>>          Owner: Nobody
>>     Requestors: cjones at icess.ucsb.edu
>>         Status: new
>>    Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=57596
>>>
>>
>>
>> Hi,
>>
>> I am having problems getting started with MET4.0. I want to use the
>> grid-stat and mode tools to verify daily precipitation forecasts
over
>> the US. The problem is in preparing the data in the right format
>>
>> For verification, I have daily gridded precipitation on a regular
0.5
>> deg lat/lon grid.
>> I use IDL and can save the data in netcdf
>>
>> My questions are:
>> 1) I tried first running the gen-poly-mask tool to create the
>> verification masking region.
>> does gen-poly-mask tool only accept the input file in grib1?
>> I tried using it with the observation in netcdf but it crashed as:
>>
>> bin/gen_poly_mask   cpc.grid.nc        /data/poly/CONUS.poly
conus.poly.nc
>> DEBUG 1: Input Data File:       cpc.grid.nc
>> DEBUG 1: Input Mask File:      /data/poly/CONUS.poly
>> ERROR  :
>> ERROR  : read_netcdf_grid_v2() -> Projection type Lat/Lon
Projection
>> not currently supported.
>> ERROR  :
>>
>> The ncdump of the observation is:
>>
>> netcdf cpc.grid {
>> dimensions:
>>           lon = 150 ;
>>           lat = 56 ;
>> 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" ;
>>           float APCP_24(lat, lon) ;
>>                   APCP_24:long_name = "Total precipitation" ;
>>                   APCP_24:units = "mm day^-1" ;
>>
>> // global attributes:
>>                   :Title = "CPC Uni precipitation " ;
>>                   :Time = "9 January 2005" ;
>>                   :Projection = "Lat/Lon Projection" ;
>>                   :nx = "56" ;
>>                   :ny = "151 grid_points" ; }
>>
>>
>> 2) is there a tool to convert from netcdf to grib1?
>>
>> 3) is there a set of specific attributes that I need to save in the
netcdf
>> file?
>>
>> Thanks,
>>
>> Charles.
>>
>> *====================================================*
>> Dr. Charles Jones
>> Researcher
>> Earth Research Institute (ERI)
>> University of California, Santa Barbara, CA 93106-3060
>>
>> phone: (805) 893-5824
>> fax:   (805) 893-2578
>> email:  <mailto:cjones at icess.ucsb.edu> cjones at eri.ucsb.edu
>> URL:   <http://www.icess.ucsb.edu/asr/>
http://www.eri.ucsb.edu/asr/
>> |=====================================================*
>>
>>
>
>


------------------------------------------------
Subject: input data format
From: cjones
Time: Wed Aug 01 00:20:45 2012

Hi John,

I wrote some IDL code and transformed the WRF forecast to the CPC
precipitation latlon grid.
In the process, I computed the daily totals for both fields and saved
them as netcdf
I have a question.

The verification is the daily CPC precipitation, 0.5deg latlon, on
2005 01 09
WRF was initialized on 2005 01 01 00 UTC and the forecast is valid on
2005 01 09
grid_stat ran fine; no errors.

However, the dates and lead time in the output files don't match what
I have in the input  netcdf files. Somehow, instead of dates it
created a number like 19700101_000049 etc and lead time is always 0

I attached ncdumps of the cpc and wrf files as well the config file
and one of the output files from grid_stat

Is there something wrong in the way I saved the netcdf or the config
file?

Thanks for the help.

Cheers,

Charles.

*====================================================*
Dr. Charles Jones
Researcher
Earth Research Institute (ERI)
University of California, Santa Barbara, CA 93106-3060

phone: (805) 893-5824
fax:   (805) 893-2578
email: cjones at eri.ucsb.edu
URL:  http://www.eri.ucsb.edu/asr/
|=====================================================*


-----Original Message-----
From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
Sent: Thursday, July 26, 2012 6:53 AM
To: cjones at icess.ucsb.edu
Subject: Re: [rt.rap.ucar.edu #57596] input data format

Charles,

I'm confident we can get you up and running in short order.

First, I notice that the name of the example file you sent includes
"CPC".  And I'm wondering if you're actually using the gridded Climate
Prediction Center 1/8th degree precipitation analysis over CONUS.  If
that's the case, and you have that CPC data in it's native binary
format, you may be able to use some FORTRAN code that's posted at the
NOAA NCO branch website for a tool called "grbrfc8":
    http://www.nco.ncep.noaa.gov/pmb/codes/nwprod/sorc/nam_cpc2grbrfc8.fd/grbrfc8.f

We have used that tool to convert that data from it's native binary to
GRIB, and then used that GRIB data in MET.

However, if that's not the data you're using, you can continue
pursuing the NetCDF route via IDL.  Yes, your guess is correct - there
are some required global and variable attributes that must be present
for MET to parse the data.  The simplest example of that is to just
look at the NetCDF output of the PCP-Combine tool that's generated
when you run the test scripts:

    ncdump -h
METv4.0/out/pcp_combine/sample_fcst_12L_2005080712V_12A.nc

But that's for a Lambert Conformal projects and you're using a Lat/Lon
one.  So listed below is an example of a NetCDF header for data on a
lat/lon projection:

netcdf ex_latlon {
dimensions:
         lat = 60 ;
         lon = 120 ;
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" ;
         float APCP_01(lat, lon) ;
                 APCP_01:name = "APCP_01" ;
                 APCP_01:long_name = "Total precipitation" ;
                 APCP_01:level = "A1" ;
                 APCP_01:units = "kg/m^2" ;
                 APCP_01:_FillValue = -9999.f ;
                 APCP_01:init_time = "20050807_110000" ;
                 APCP_01:init_time_ut = 1123412400 ;
                 APCP_01:valid_time = "20050807_120000" ;
                 APCP_01:valid_time_ut = 1123416000 ;
                 APCP_01:accum_time = "010000" ;
                 APCP_01:accum_time_sec = 3600 ;

// global attributes:
                 :FileOrigins = "File ex_latlon.nc generated
20120726_134701 UTC on host rambler by the MET pcp_combine tool" ;
                 :MET_version = "V4.0" ;
                 :MET_tool = "pcp_combine" ;
                 :RunCommand = "Addition: 1 files." ;
                 :Projection = "LatLon" ;
                 :lat_ll = "25.000000 degrees_north" ;
                 :lon_ll = "-130.000000 degrees_east" ;
                 :delta_lat = "0.500000 degrees" ;
                 :delta_lon = "0.500000 degrees" ;
                 :Nlat = "60 grid_points" ;
                 :Nlon = "120 grid_points" ; }

Here's what's required:

- The dimensions should be named lat and lon.
- The lat and lon variables are actually not used by MET, but it's
fine if they're present.
- The variable attributes should contain the "name" and "level"
attributes.  In this example "A1" means that this is precip
accumulated over 1 hour.
- The variable attributes should contain timing information:
init_time_ut, valid_time_ut, and accum_time_sec for the initialization
and valid times in unixtime (date +%s) and the accumulation interval
as a number of seconds.
- The global attributes should contain "MET_version" so that MET knows
how to parse the projection information.
- The global attributes for a lat/lon projection are: Projection,
lat_ll, lon_ll, delat_lat, delta_lon, Nlat, and Nlon (pretty self-
explanatory).

Give that a shot and just let me know if you get stuck.

Thanks,
John Halley Gotway
met_help at ucar.edu


On 07/25/2012 07:49 PM, cjones via RT wrote:
>
> Wed Jul 25 19:49:16 2012: Request 57596 was acted upon.
> Transaction: Ticket created by cjones at icess.ucsb.edu
>         Queue: met_help
>       Subject: input data format
>         Owner: Nobody
>    Requestors: cjones at icess.ucsb.edu
>        Status: new
>   Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=57596
> >
>
>
> Hi,
>
> I am having problems getting started with MET4.0. I want to use the
> grid-stat and mode tools to verify daily precipitation forecasts
over
> the US. The problem is in preparing the data in the right format
>
> For verification, I have daily gridded precipitation on a regular
0.5
> deg lat/lon grid.
> I use IDL and can save the data in netcdf
>
> My questions are:
> 1) I tried first running the gen-poly-mask tool to create the
> verification masking region.
> does gen-poly-mask tool only accept the input file in grib1?
> I tried using it with the observation in netcdf but it crashed as:
>
> bin/gen_poly_mask   cpc.grid.nc        /data/poly/CONUS.poly
conus.poly.nc
> DEBUG 1: Input Data File:       cpc.grid.nc
> DEBUG 1: Input Mask File:      /data/poly/CONUS.poly
> ERROR  :
> ERROR  : read_netcdf_grid_v2() -> Projection type Lat/Lon Projection
> not currently supported.
> ERROR  :
>
> The ncdump of the observation is:
>
> netcdf cpc.grid {
> dimensions:
>          lon = 150 ;
>          lat = 56 ;
> 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" ;
>          float APCP_24(lat, lon) ;
>                  APCP_24:long_name = "Total precipitation" ;
>                  APCP_24:units = "mm day^-1" ;
>
> // global attributes:
>                  :Title = "CPC Uni precipitation " ;
>                  :Time = "9 January 2005" ;
>                  :Projection = "Lat/Lon Projection" ;
>                  :nx = "56" ;
>                  :ny = "151 grid_points" ; }
>
>
> 2) is there a tool to convert from netcdf to grib1?
>
> 3) is there a set of specific attributes that I need to save in the
netcdf
> file?
>
> Thanks,
>
> Charles.
>
> *====================================================*
> Dr. Charles Jones
> Researcher
> Earth Research Institute (ERI)
> University of California, Santa Barbara, CA 93106-3060
>
> phone: (805) 893-5824
> fax:   (805) 893-2578
> email:  <mailto:cjones at icess.ucsb.edu> cjones at eri.ucsb.edu
> URL:   <http://www.icess.ucsb.edu/asr/> http://www.eri.ucsb.edu/asr/
> |=====================================================*
>
>



------------------------------------------------
Subject: input data format
From: cjones
Time: Wed Aug 01 00:20:45 2012

VERSION MODEL FCST_LEAD FCST_VALID_BEG  FCST_VALID_END  OBS_LEAD
OBS_VALID_BEG   OBS_VALID_END   FCST_VAR FCST_LEV OBS_VAR OBS_LEV
OBTYPE VX_MASK INTERP_MTHD INTERP_PNTS FCST_THRESH OBS_THRESH
COV_THRESH ALPHA LINE_TYPE TOTAL F_RATE  H_RATE  O_RATE
V4.0    WRF   000000    19700101_000049 19700101_000049 000000
19700101_000049 19700101_000049 APCP_24  A24      APCP_24 A24
MC_PCP FULL    UW_MEAN     1           >0.000      >0.000     NA
NA    FHO       9000  0.30967 0.19478 0.21833
V4.0    WRF   000000    19700101_000049 19700101_000049 000000
19700101_000049 19700101_000049 APCP_24  A24      APCP_24 A24
MC_PCP FULL    UW_MEAN     1           >=5.000     >=5.000    NA
NA    FHO       9000  0.08678 0.04144 0.06900
V4.0    WRF   000000    19700101_000049 19700101_000049 000000
19700101_000049 19700101_000049 APCP_24  A24      APCP_24 A24
MC_PCP CONUS   UW_MEAN     1           >0.000      >0.000     NA
NA    FHO       3389  0.82237 0.51726 0.57982
V4.0    WRF   000000    19700101_000049 19700101_000049 000000
19700101_000049 19700101_000049 APCP_24  A24      APCP_24 A24
MC_PCP CONUS   UW_MEAN     1           >=5.000     >=5.000    NA
NA    FHO       3389  0.23045 0.11006 0.18324

------------------------------------------------
Subject: Re: [rt.rap.ucar.edu #57596] input data format
From: John Halley Gotway
Time: Wed Aug 01 08:01:57 2012

Charles,

I compared the NetCDF headers you sent to the NetCDF headers for the
output of the pcp_combine tool, and I noticed a subtle difference in
the variable attributes.  In your data, the unixtime and
seconds of accumulation variable attributes are stored as strings (see
the quotes):
    APCP_24:init_time_ut = "1105228800" ;
    APCP_24:valid_time_ut = "1105228800" ;
    APCP_24:accum_time_sec = "86400" ;

But in the output of pcp_combine, they're stored as numbers (no
quotes):
    APCP_12:init_time_ut = 1123372800 ;
    APCP_12:valid_time_ut = 1123416000 ;
    APCP_12:accum_time_sec = 43200 ;

I tested out what happens when you store them as strings, and the
behavior you describe occurs - times close to 1970 (the beginning of
unixtime).  So when MET parses those variable attributes as
numbers, it looks like those strings evaluate to something pretty
close to zero.

For now, just write those 3 attributes out as numbers, but I'll look
to see if there's a way of enhancing MET to produce a helpful warning
or error message in this case.

Thanks,
John




On 08/01/2012 12:20 AM, cjones via RT wrote:
>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=57596 >
>
> Hi John,
>
> I wrote some IDL code and transformed the WRF forecast to the CPC
precipitation latlon grid.
> In the process, I computed the daily totals for both fields and
saved them as netcdf
> I have a question.
>
> The verification is the daily CPC precipitation, 0.5deg latlon, on
2005 01 09
> WRF was initialized on 2005 01 01 00 UTC and the forecast is valid
on 2005 01 09
> grid_stat ran fine; no errors.
>
> However, the dates and lead time in the output files don't match
what I have in the input  netcdf files. Somehow, instead of dates it
created a number like 19700101_000049 etc and lead time is always 0
>
> I attached ncdumps of the cpc and wrf files as well the config file
and one of the output files from grid_stat
>
> Is there something wrong in the way I saved the netcdf or the config
file?
>
> Thanks for the help.
>
> Cheers,
>
> Charles.
>
> *====================================================*
> Dr. Charles Jones
> Researcher
> Earth Research Institute (ERI)
> University of California, Santa Barbara, CA 93106-3060
>
> phone: (805) 893-5824
> fax:   (805) 893-2578
> email: cjones at eri.ucsb.edu
> URL:  http://www.eri.ucsb.edu/asr/
> |=====================================================*
>
>
> -----Original Message-----
> From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> Sent: Thursday, July 26, 2012 6:53 AM
> To: cjones at icess.ucsb.edu
> Subject: Re: [rt.rap.ucar.edu #57596] input data format
>
> Charles,
>
> I'm confident we can get you up and running in short order.
>
> First, I notice that the name of the example file you sent includes
"CPC".  And I'm wondering if you're actually using the gridded Climate
Prediction Center 1/8th degree precipitation analysis over CONUS.  If
that's the case, and you have that CPC data in it's native binary
format, you may be able to use some FORTRAN code that's posted at the
NOAA NCO branch website for a tool called "grbrfc8":
>
http://www.nco.ncep.noaa.gov/pmb/codes/nwprod/sorc/nam_cpc2grbrfc8.fd/grbrfc8.f
>
> We have used that tool to convert that data from it's native binary
to GRIB, and then used that GRIB data in MET.
>
> However, if that's not the data you're using, you can continue
pursuing the NetCDF route via IDL.  Yes, your guess is correct - there
are some required global and variable attributes that must be present
for MET to parse the data.  The simplest example of that is to just
look at the NetCDF output of the PCP-Combine tool that's generated
when you run the test scripts:
>
>      ncdump -h
METv4.0/out/pcp_combine/sample_fcst_12L_2005080712V_12A.nc
>
> But that's for a Lambert Conformal projects and you're using a
Lat/Lon one.  So listed below is an example of a NetCDF header for
data on a lat/lon projection:
>
> netcdf ex_latlon {
> dimensions:
>           lat = 60 ;
>           lon = 120 ;
> 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" ;
>           float APCP_01(lat, lon) ;
>                   APCP_01:name = "APCP_01" ;
>                   APCP_01:long_name = "Total precipitation" ;
>                   APCP_01:level = "A1" ;
>                   APCP_01:units = "kg/m^2" ;
>                   APCP_01:_FillValue = -9999.f ;
>                   APCP_01:init_time = "20050807_110000" ;
>                   APCP_01:init_time_ut = 1123412400 ;
>                   APCP_01:valid_time = "20050807_120000" ;
>                   APCP_01:valid_time_ut = 1123416000 ;
>                   APCP_01:accum_time = "010000" ;
>                   APCP_01:accum_time_sec = 3600 ;
>
> // global attributes:
>                   :FileOrigins = "File ex_latlon.nc generated
20120726_134701 UTC on host rambler by the MET pcp_combine tool" ;
>                   :MET_version = "V4.0" ;
>                   :MET_tool = "pcp_combine" ;
>                   :RunCommand = "Addition: 1 files." ;
>                   :Projection = "LatLon" ;
>                   :lat_ll = "25.000000 degrees_north" ;
>                   :lon_ll = "-130.000000 degrees_east" ;
>                   :delta_lat = "0.500000 degrees" ;
>                   :delta_lon = "0.500000 degrees" ;
>                   :Nlat = "60 grid_points" ;
>                   :Nlon = "120 grid_points" ; }
>
> Here's what's required:
>
> - The dimensions should be named lat and lon.
> - The lat and lon variables are actually not used by MET, but it's
fine if they're present.
> - The variable attributes should contain the "name" and "level"
attributes.  In this example "A1" means that this is precip
accumulated over 1 hour.
> - The variable attributes should contain timing information:
init_time_ut, valid_time_ut, and accum_time_sec for the initialization
and valid times in unixtime (date +%s) and the accumulation interval
as a number of seconds.
> - The global attributes should contain "MET_version" so that MET
knows how to parse the projection information.
> - The global attributes for a lat/lon projection are: Projection,
lat_ll, lon_ll, delat_lat, delta_lon, Nlat, and Nlon (pretty self-
explanatory).
>
> Give that a shot and just let me know if you get stuck.
>
> Thanks,
> John Halley Gotway
> met_help at ucar.edu
>
>
> On 07/25/2012 07:49 PM, cjones via RT wrote:
>>
>> Wed Jul 25 19:49:16 2012: Request 57596 was acted upon.
>> Transaction: Ticket created by cjones at icess.ucsb.edu
>>          Queue: met_help
>>        Subject: input data format
>>          Owner: Nobody
>>     Requestors: cjones at icess.ucsb.edu
>>         Status: new
>>    Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=57596
>>>
>>
>>
>> Hi,
>>
>> I am having problems getting started with MET4.0. I want to use the
>> grid-stat and mode tools to verify daily precipitation forecasts
over
>> the US. The problem is in preparing the data in the right format
>>
>> For verification, I have daily gridded precipitation on a regular
0.5
>> deg lat/lon grid.
>> I use IDL and can save the data in netcdf
>>
>> My questions are:
>> 1) I tried first running the gen-poly-mask tool to create the
>> verification masking region.
>> does gen-poly-mask tool only accept the input file in grib1?
>> I tried using it with the observation in netcdf but it crashed as:
>>
>> bin/gen_poly_mask   cpc.grid.nc        /data/poly/CONUS.poly
conus.poly.nc
>> DEBUG 1: Input Data File:       cpc.grid.nc
>> DEBUG 1: Input Mask File:      /data/poly/CONUS.poly
>> ERROR  :
>> ERROR  : read_netcdf_grid_v2() -> Projection type Lat/Lon
Projection
>> not currently supported.
>> ERROR  :
>>
>> The ncdump of the observation is:
>>
>> netcdf cpc.grid {
>> dimensions:
>>           lon = 150 ;
>>           lat = 56 ;
>> 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" ;
>>           float APCP_24(lat, lon) ;
>>                   APCP_24:long_name = "Total precipitation" ;
>>                   APCP_24:units = "mm day^-1" ;
>>
>> // global attributes:
>>                   :Title = "CPC Uni precipitation " ;
>>                   :Time = "9 January 2005" ;
>>                   :Projection = "Lat/Lon Projection" ;
>>                   :nx = "56" ;
>>                   :ny = "151 grid_points" ; }
>>
>>
>> 2) is there a tool to convert from netcdf to grib1?
>>
>> 3) is there a set of specific attributes that I need to save in the
netcdf
>> file?
>>
>> Thanks,
>>
>> Charles.
>>
>> *====================================================*
>> Dr. Charles Jones
>> Researcher
>> Earth Research Institute (ERI)
>> University of California, Santa Barbara, CA 93106-3060
>>
>> phone: (805) 893-5824
>> fax:   (805) 893-2578
>> email:  <mailto:cjones at icess.ucsb.edu> cjones at eri.ucsb.edu
>> URL:   <http://www.icess.ucsb.edu/asr/>
http://www.eri.ucsb.edu/asr/
>> |=====================================================*
>>
>>
>
>


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


More information about the Met_help mailing list