[gradsusr] write 4-d data using fwrite in grads
Jennifer Adams
jma at cola.iges.org
Wed Jun 29 08:02:37 EDT 2011
You have to loop over T and then Z and write out one 2-D grid at a
time. Something like this:
'set gxout fwrite'
'set fwrite -ap myfile.dat'
t=10
while (t<=200)
'set t 't
z=1
while (z<=17)
'set z 'z
'd var'
z=z+1
endwhile
t=t+1
endwhile
'disable fwrite'
--Jennifer
On Jun 28, 2011, at 12:58 PM, DHRUBA wrote:
> How to extract 4-d binary file from nedcdf file in grads?
> the nc file has both the dimension of level(z) and time(t). I want
> to get data for a specific time range for all levels for all lon and
> lat. How to do that?
> When I am giving 'set z 1 17' and 'set t 10 200' (for eg.)...it is
> showing too many variables to vary.
>
> What to do??
>
> --
> With best regards,
>
> Dhruba.
>
> ****************************************************************
> Dhrubajyoti Samanta
> PhD Scholar
> Centre for Oceans, Rivers, Atmosphere and Land Sciences (CORAL)
> Indian Institute of Technology Kharagpur
> Kharagpur, West Bengal
> India - 721 302
> Ph.: +91 99329 08496 (Mob)
> +91 3222-281291 (Lab)
> *****************************************************************
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
--
Jennifer M. Adams
IGES/COLA
4041 Powder Mill Road, Suite 302
Calverton, MD 20705
jma at cola.iges.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20110629/c18b94aa/attachment-0003.html
More information about the gradsusr
mailing list