[ncl-talk] Best way to add time dimension after using dim_avg_n_Wrap

Herbster, Christopher G. herbstec at erau.edu
Mon Oct 5 15:58:36 MDT 2015


Hi folks,

I have a gridded dataset that I am creating monthly averages at all lat/lon locations.

I have used the "addfiles" method to open all the files from a month that are valid at a particular UTC time, like 12 UTC for example.  The month I was working on is September, so there are 30 files at that time.

The input variable has these properties:

Variable: irwin_cdr
Type: short
Total Size: 33535800 bytes
            16767900 values
Number of Dimensions: 3
Dimensions and sizes:    [time | 30] x [lat | 601] x [lon | 930]

If I use the following code to get the averages at the locations, things work just fine, except that I no longer have a time reference for the data.

avg_ir = dim_avg_n_Wrap(irwin_cdr,0)

Variable: avg_ir
Type: float
Total Size: 2235720 bytes
            558930 values
Number of Dimensions: 2
Dimensions and sizes:    [lat | 601] x [lon | 930]

What I would like to do is assign a time to this monthly average before I write the data to a new NetCDF file.  That way I can open a group of files in an application, like the Unidata IDV, and animate the results.

When creating a monthly average what is the "best practice" method of assigning a time to the results?  I was thinking of just using the first time of the group of files (i.e. the first day of the month at that UTC hour), but if there is a standard I'd like to follow that.

Any guidance is welcome.

Thanks,
Chris Herbster

--

Dr. Christopher G. Herbster
Associate Professor
Director of Science and Technology
for the ERAU Weather Center
Applied Aviation Sciences
Embry-Riddle Aeronautical Univ.
600 S. Clyde Morris Blvd.
Daytona Beach, FL 32114-3900
 386.226.6444 Office
386.226.6446 Weather Center
http://wx.erau.edu/

Schedule at:  http://wx.erau.edu/faculty/herbster/Schedules/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20151005/eb74bcca/attachment.html 


More information about the ncl-talk mailing list