[gradsusr] Printing a lot of maps from NetCDF file

Krzysiek krzyba at o2.pl
Thu May 12 18:10:22 EDT 2011


Thank's Jim! It works perfectly.

Best regards,

Chris


W dniu 2011-05-12 22:37, James T. Potemra pisze:
> Hi Chris:
>
> Sure, all you have to do is add a loop for time, go from 1 to 365, then
> use your title variable (ymd) as you image name,
>
> 'reinit'
> 'sdfopen /cygdrive/c/ab.nc'
> *i = 1
> while ( i<=365 )
>     'set t 'i*
>     'set lon -20 40'
>     'set lat 30 70'
>     'set gxout contour'
>     'set cint 5'
>     'set clab forced'
>     'set ccolor 1'
>     'set cthick 10'
>     'set map 1'
>     'set timelab off'
>     'set grads off'
>     'set cterp on'
>     'set csmooth on'
>     'd slp/100'
>     'q time'
>     res=subwrd(result,3)
>     ymd=substr(res,4,12)
>     say ymd
>     'draw title 'ymd
>     *'printim 'ymd'.png x1024 y768 white'
>     i = i + 1
>     'clear'
> endwhile
> *
> I think this should work.
>
> Jim
>
> Krzysiek wrote:
>> Dear Grads Users,
>> I have just created a simple script:
>>
>> 'reinit'
>> 'sdfopen /cygdrive/c/ab.nc'
>> 'set lon -20 40'
>> 'set lat 30 70'
>> 'set gxout contour'
>> 'set cint 5'
>> 'set clab forced'
>> 'set ccolor 1'
>> 'set cthick 10'
>> 'set map 1'
>> 'set timelab off'
>> 'set grads off'
>> 'set cterp on'
>> 'set csmooth on'
>> 'd slp/100'
>> 'q time'
>> res=subwrd(result,3)
>> ymd=substr(res,4,12)
>> say ymd
>> 'draw title 'ymd
>> 'printim slp.png x1024 y768 white'
>> return
>>
>> NetCDF file contain daily data from 1jan1990 to 31dec1990 and I would
>> like to print (at one go) maps which concern all days (365 maps, png
>> format). Moreover, this files should be named by the title of particular
>> map (I arranged in script date format like 01JAN1990, 02JAN1990
>> ......etc.).
>> If anyone knows how to change my scripts in order to do what I want?
>>
>> Regards
>>
>> Chris
>>
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr
>>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>



More information about the gradsusr mailing list