Re: HDF to netcdf: TRMM satellite data for use with MET verification software

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Wed, 30 Jul 2008 13:18:59 -0600

Hi Erik,

[1] Have u run "ncl_filedump" on the TRMM-HDF file?
[2] Have u used "ncl_convert2nc" on the HDF file?

Take a look at these outputs.

Play with the unix "date" command which can be invoked
via the "systemfunc" function.

http://www.ncl.ucar.edu/Document/Functions/Built-in/systemfunc.shtml

     a = systemfunc("date")
     print(a)

If "x" is a variable and u want to assign an attribute:
     x_at_foo = systemfunc("date -ud 2008-07-29")

See also:

http://www.ncl.ucar.edu/Document/Functions/Built-in/ut_calendar.shtml

Good luck

Erik Noble wrote:
> Hi.
> Could I have a suggestion for creating “ init_time, init_time_ut,
> valid_time, valid_time_ut, accum_time,” as variable attributes? I am
> confused as to which of NCLS’s “Date Routines” to use.
>
> I pretty much understand everything else about creating the netcdf
> file-variable, but not assigning time attributes as date commands (email
> below is meant for context).
>
> WHAT AM I DOING: I ‘m converting TRMM HDF data to netcdf. I have to
> assign specific attributes so that a NCAR verification software package
> (MET) expects. MET expects users to have precip data in GRIB record format.
> WHY: TRMM is not available in GRIB.
>
>
> Thank you for the help.
> Erik
>
> To put into context
> Erik,
>
> Listed below is a NetCDF header dump of one of the output files from the
> METv1.1 test script for pcp_combine.
>
> Regarding (2), I'd suggest adding the same type of variable attributes
> that are listed here:
> - grib_code = 61
> - units = "kg/m^2" or "mm"
> - level = "SFC"
> - _FillValue = -9999.f
> - init_time = "20050807_000000"
> - init_time_ut = 1123372800
> - valid_time = "20050808_000000"
> - valid_time_ut = 1123459200
> - accum_time = "24 hours"
>
> The "_ut" times listed above are in unixtime - the number of seconds
> that have elapsed since Jan 1, 1970. A fancy "date" command can be used
> to give you the unixtime.
> For example, the unixtime corresponding to 8am on July 29, 2008 is given
> by the following command: date -ud '2008-07-29 UTC 08:00:00' +%s
>
> Regarding (3), please the following global attributes define the grid on
> which this data resides:
> - Projection = "Lambert Conformal" ;
> - p1_deg = "25.000000 degrees_north" ;
> - p2_deg = "25.000000 degrees_north" ;
> - p0_deg = "12.190000 degrees_north" ;
> - l0_deg = "-133.459000 degrees_east" ;
> - lcen_deg = "-95.000000 degrees_east" ;
> - d_km = "40.635000 km" ;
> - r_km = "6367.470000 km" ;
> - nx = "185 grid_points" ;
> - ny = "129 grid_points" ;
>
> This example is for a lat/lon grid. You could also use lambert
> conformal or polar stereographic. If you have a sample GRIB file
> already on the grid you're using, please send it to me, and I can help
> you figure out how to specify it in the NetCDF file.
>
> Hope that helps,
> John
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Jul 30 2008 - 13:18:59 MDT

This archive was generated by hypermail 2.2.0 : Wed Jul 30 2008 - 15:23:14 MDT