binary to nc

Farshid Daryabor fdaryabor at GOOGLEMAIL.COM
Wed Oct 7 23:38:49 EDT 2009


Hi
Yes My friend of course. First you must make sure your Grads is version 2
above, because "sdfwrite" and "ncks (is under linux)" commands are under
version 2 above. For "ncks" make sure working , anyway you can install NCO
(Netcdf Operator) over your machine. Then
for convert binary to netcdf, first you must write a  ".ctl" file as follow:

dset ^EMP.dat
title evaporation mines prescripton
undef -9999
xdef 360 linear 360 1
ydef 180 linear 180 1
zdef 1 levels 0
tdef 12 linear 05z16jan1960 1mo
vars 1
EMP 0 1 emp
endvars

AND Script for convert as follow:

'reinit'
'open /home/.../binary2netcdf.ctl'
'set lon 0 360'
'set lat 180 359'
'set lev 0 0'
'set t 1 last'
'set e 1 last'
'define emp=var'
'set sdfwrite /home/.../data.nc'
'sdfwrite emp'

Please let me know.
Best Regards
F.Daryabor

F.Daryabor
Center for Tropical and Climate Change System
Faculty of Science and Technology
National University of Malaysia
Selangor
Bangi, 43600
Malaysia



2009/10/7 MARIA ELISA SIQUEIRA SILVA <elisasiq at usp.br>

> Hello,
>
> does anybody know how to convert binary data in netcdf?
> Is there a program?
>
> thanks
> Elisa
>
>
> --
> Maria Elisa Siqueira Silva
> Laboratório de Climatologia e Biogeografia - LCB
> Depto Geografia - FFLCH - USP
> Av. Prof. Lineu Prestes, 338 - Cidade Universitária
> São Paulo - SP
> 05508-900
> (11) 3091-3769
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20091008/232d4be5/attachment.html 


More information about the gradsusr mailing list