[gradsusr] Problem with "write" instrinsic function in GRAD
Annibale Vecere
annibale.vecere at umeschool.it
Tue May 31 18:03:33 EDT 2016
Dear GRADS Users,
I'm trying to use the "write" intrinsic function to write on a file (.txt
or dat) the daily mean precipitation for every day derived from a
precipitation dataset (e.g. 2013 CMORPH daily precipitation estimates, see
below).
At this stage, I'm just trying to create the output file, which is a result
I'm not able to get yet.
I don't know for which reason, this function in one case works and in
another doesn't.
*Case 1*: I can run the script with no errors but the .txt file is not
generated within the defined current directory.
'sdfopen
http://iridl.ldeo.columbia.edu/SOURCES/.NOAA/.NCEP/.CPC/.CMORPH/.daily/.mean/.morphed/.cmorph/T/%2801%20Jan%202013%29%2831%20Dec%202013%29RANGEEDGES/dods
'
outfile='C:/OpenGrADS/Contents/Resources/SampleDatasets/CMORPH.txt'
'set gxout print'
'set prnopts %0.3f 5 1'
rc=write(outfile, 'LON LAT PREC')
*Case 2*: Take an example I found on the web and in this case I can
actually get the NCEP.txt file in my current directory.
'sdfopen http://monsoondata.org:9090/dods/rean2d'
outfile='C:/OpenGrADS/Contents/Resources/SampleDatasets/NCEP.txt'
'set gxout print'
'set prnopts %6.2f 5 1'
rc=write(outfile, 'LON LAT PREC')
The first example is related to a precipitation dataset which I'm
interested into, the second is an excerpt from a script I found on the web.
Could explain me why this happens?
Could you also provide me with some tested working scripts, which use this
function within a while loop (which is what I would need to extract the
mean daily precipitation from a given dataset)?
Thank you very much!
Kindest regards
Annibale
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20160601/0c8a56ab/attachment.html
More information about the gradsusr
mailing list