while/endwhile, concatenating grib files, tmave, ave on particular day, greyscale

Brian Doty doty at COLA.IGES.ORG
Tue Jan 12 08:29:06 EST 2010


>
> unable to locate ENDWHILE statement for the WHILE statement at line  
> 3.  I have endwhile statement so I am not sure what is going on with  
> this script.  Can you help me with it?
>

there may be a special character somewhere in the while statement or  
the endwhile statement (looking at it in vi would show those  
usually).  also, the scripting language uses end-of-line (on unix, the  
"\n" character, or linefeed) as record delimiters.  Windows and unix  
use different conventions for this, so it can get confused in some  
cases.  You can also use the semicolon as a line delimiter in  
scripts.  So maybe try putting a semicolon at the end of the while  
statement and the endwhile statement.

tip:  you can combine statements on one line, eg:

     if (i>15); break; endif;

> Would concatenating 48 files and then opening the large file be  
> better for the server load than opening them all together as single  
> files?

It depends on the file system in use.  Traditional unix file systems  
don't seem to have noticeable overhead for opening and closing files.   
NFS mounted file systems can, in some cases, have more noticeable  
overhead.  Lustre can also have noticeable overhead for using many  
small files.  In spite of this, I still tend to use many small files  
for my own work, as I find it easier to manage the data, and mix-and- 
match stuff, that way.

> I was wondering about how to find the number of data points used to  
> calculate tmave.  For example when masking for SST values less than  
> 28 C, I would use:
>
> 'define sstmask = aave(sst,lon=120,lon=200,lat=-5,lat=5)'
> 'define sstmask = const(maskout(sstmask,(sstmask)-28),1)'
> 'd tmave(sstmask,uwnd,t=1,t=365)'
>
> How do I find the number of data points used in calculating tmave,  
> or where sst is less 28 C?
>

A combination of maskout, const, and sum should do it.

>
>                       I have daily Gridded Temp. data for 40 years.  
> I want to find out mean for 40 years on particular day (say for eg.  
> on 2nd June 1960-2004). How can i ? Please help.
>

Try the time increment option on ave, eg ave(temp, time=18jul1970,  
time=18jul2009, 1yr)

>  I tried the “Set display color greyscale white” option.

That command is invalid.  Try "set display grey white".  Also, if you  
are using gxps/gxeps for output, check the command line options for  
those utilities.



More information about the gradsusr mailing list