Project

General

Profile

problem converting GrADs ctl to netcdf (pdef)

Added by Ahmed Tawfik almost 14 years ago

Hi All

I was wondering if someone can help me in converting a GrADs file to netcdf format? The input data are on a curvilinear (Lambert projection) grid so in the ctl file there is the line pdef.
Is there a way to convert this to a netcdf file using GrADs? Am I using the appropriate command? Any guidance on how to perform this conversion would be much appreciated.

I have copied the command I used, the error statement, and the contents of the ctl file below:

$> cdo -f nc import_binary O3.2003080100.ctl OZONE.nc

Open Error: Unknown keyword in description file
--> The invalid description file record is:
--> pdef 78 48 lcc 46.00 5.00 39.00 24.00 30.00 60.00 5.00 60000. 60000.
The data file was not opened.

cdo import_binary (Abort): Open failed!

$> vi O3.2003080100.ctl

dset ^O3.2003080100
title RegCM chemistry/tracor variables
options big_endian
undef -1.e34
pdef 78 48 lcc 46.00 5.00 39.00 24.00 30.00 60.00 5.00 60000. 60000.
xdef 292 linear -33.87 0.2703
ydef 117 linear 29.01 0.2703
zdef 18 levels 1008.43 998.80 984.35 960.27 926.56 883.21 830.23 767.62 695.38 618.32 541.26 464.20 387.14 310.08 237.83 175.22 122.24 74.08
tdef 720 linear 1z01aug2003 1hr
vars 8
O3 18 0 tracer mix. rat (Kg/Kg)
colb__O3 0 99 columnburden inst(mg/m2)
wdlsc_O3 0 99 wet dep lgscale(mg/m2/d)
wdcvc_O3 0 99 wet dep convect(mg/m2/d)
sdrdp_O3 0 99 surf dry depos.(mg/m2/d)
xgasc_O3 0 99 chem gas conv. (mg/m2/d)
xaquc_O3 0 99 chem aqu conv. (mg/m2/d)
emiss_O3 0 99 surf emission (mg/m2/d)
endvars

- Ahmed T.


Replies (1)

RE: problem converting GrADs ctl to netcdf (pdef) - Added by Stefan Fronzek almost 14 years ago

Dear Ahmed,

I think you should be able to do it in Grads with the sdfwrite command (http://grads.iges.org/grads/gadoc/gradcomdsdfwrite.html).

regars,
Stefan

    (1-1/1)