how obtain the date from a NetCdf file

Javier Peña javier.p at EREDA.COM
Wed Nov 4 11:26:56 EST 2009


Hello everyone,

I have a netcdf file from which I can obtain any of the variables with the
following script (for example to get u wind component):

* takes the values of the component or in a column
'reinit'
'sdfopen prueba.nc'
'set lat 41'
'set lon 359'
'set lev 1'
to = 1
* Write the variable to a file
* 'set gxout vector'
* 'set fwrite z: \ dummy.dat'
while (to <5)
'set t' to
tmp =''
tmp = subwrd (rerult, 4)
'd u', tmp = tmp%''subwrd (result, 4)
rrc = write ( 'c: \ prueba_c \ pruebas_archivo_ecmwf \ new_u.txt', tmp)
to = to + 1
endwhile

but my question is, can I get the date which belongs each variable value?
That is, if I have values for the velocity component u: 2.3, 3.4, 5.6, 3.9,
can I get a. txt what next?

Date                         U (m / s)
2009/12/06 00:00          2.3
2009/12/06 06:00          3.4
2009/12/06 18:00          5.6
2009/12/07 00:00          3.9

Thank you very much. Best regards.

Javier Peña
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20091104/dbeb856c/attachment.html 


More information about the gradsusr mailing list