Re: add date to a new nc file

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Wed Mar 07 2012 - 14:31:06 MST

For some general best practices on writing NetCDF files, from Unidata, the developers of NetCDF:

http://www.unidata.ucar.edu/software/netcdf/docs/BestPractices.html

For how to write NetCDF efficiently using NCL:

http://www.ncl.ucar.edu/Applications/method_2.shtml

Note that this contains a "creation_date" attribute which puts a timestamp on the file.

It uses

  fAtt@creation_date = systemfunc("date")

but you can get the format you want with:

  fAtt@creation_date = systemfunc("date +%Y-%m-%d_%T")

--Mary

On Mar 7, 2012, at 10:52 AM, Alexander Semenov wrote:

> Hi!
>
> Could you help me understand how to create a proper netCDF file. I need it to contain monthly average SST and SEA ICE. What I can't figure out is how to specify the date in the file. I need to be: yyyy-mm-dd_hh:00:00.
>
> --
> regards
>
> *******************************************************
> Alexander Semenov
>
> PhD Student - Research Assistant
> International Arctic Research Center
> Department of atmospheric sciences
> University of Alaska Fairbanks
>
> 930 Koyukuk dr, 408c3
> Fairbanks, AK, USA, 99775
> work phone +19074742672
>
> <Untitled.doc>_______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Mar 7 11:31:16 2012

This archive was generated by hypermail 2.1.8 : Tue Mar 13 2012 - 14:00:14 MDT