[gradsusr] Problems with the automation of GRADS.

Huddleston, John Huddleston at cira.colostate.edu
Tue Jan 11 12:14:42 EST 2011


Juan

The cron environment is not always the same as your login (csh,bash,sh) environment; so, put the full path to grads in your cron script e.g.

/usr/local/bin/grads  -lbc  << EOF
open autoteste1.ctl
run gen.gs<http://gen.gs>
EOF

John Huddleston, PhD
Cooperative Institute for Research in the Atmosphere

From: gradsusr-bounces at gradsusr.org [mailto:gradsusr-bounces at gradsusr.org] On Behalf Of Juan Jose Amides Figueroa Urbano
Sent: Tuesday, January 11, 2011 9:57 AM
To: gradsusr at gradsusr.org
Subject: [gradsusr] Problems with the automation of GRADS.

I'm working on automating the GrADS run through a script ".sh" and crontab in linux environment, Ubuntu 10.04 LTS, when the script is run manually with the console generates the images, but when it runs automatically with crontab does not generate the images, any help?

This is the script for crontab:

#!/bin/sh
cd /home/jjfigueroa/WRF_CPM/ARWpost
grads -l << EOF
open autoteste1.ctl
run gen.gs<http://gen.gs>

This is the script for GrADS called "gen.gs<http://gen.gs>:

'set mpdset hires'
'set display color white'
'set rbcols 0 11 5 13 3 10 7 12 8 2'
'c'
t = 1
while (t <= 41)
'set t 't''
'set gxout shaded'
'd t2-273.15'
'cbarn'
'set gxout contour'
'd t2-273.15'
'q time'
x1=sublin(result,1)
t1=subwrd(x1,3)
te2=subwrd(x1,5)
'draw title TEMPERATURA PARA 't1' EN CELSIUS'
'printim /home/jjfigueroa/WRF/SALIDAS/temp't'.png'
'c'
t= t+1
endwhile

Thanks

Juan José Amides Figueroa Urbano
Servicio Meteorológico Nacional
Servicio Nacional de Estudios Territoriales (SNET)
Ministerio de Medio Ambiente y Recursos Naturales (MARN)
Tel: (503) 2233-9544

jn 3:16

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20110111/62632727/attachment-0003.html 


More information about the gradsusr mailing list