[gradsusr] GrADS Loop Help

Martin V. Mathew vmartinmathew at gmail.com
Thu Jul 18 08:17:29 EDT 2013


Hi Emily

I have tested the script and fixed all the problems, it can now do all
required calculations. This program uses output of "q dim" command to
identify start point and end point of each month. The program uses a
compound variable to store the calculated data. Right now I don't know a
method to write values in a compound variable to a text file. Hence I am
only displaying the data to the terminal using say command. If you find a
means to write the data to text file, kindly convey it me. Please find
the attached script.


(1)  I would like to get max/min temps for multiple specific lat/long
> coordinates.  To do that would I just change the set lat and set lon
> lines?  Should I change then the x= and y= that come after the set lat and
> set lon definitions or leave those as is?
>
Commands 'set lon' and 'set x' do the same thing. Hence there is no need to
use both the commands.  In order to do the calculation for multiple lat/lon
coordinates you can either insert an additional while loop in the script or
otherwise change the set lat and set lon lines and run the script again.

> (2)  As of now when I run the script it says "Opening input file
> air.sig995.1948.nc" 63 times with the corresponding years but no
> numerical data is provided.  I haven't specified where to write the data to
> a table but shouldn't it still be displayed?
>
The modified script will display output data in the terminal. Please find a
means to write the data to an output file.
-- 
Martin V. Mathew
Research scholar
Centre for Oceans, Rivers, Atmosphere and Land Sciences (CORAL)
IIT Kharagpur
India.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20130718/82d3d744/attachment-0003.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pck_max_min_new.gs
Type: application/octet-stream
Size: 4424 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20130718/82d3d744/attachment-0003.obj 


More information about the gradsusr mailing list