[gradsusr] Gribmap
Goodson,Ron [Edm]
Ron.Goodson at EC.gc.ca
Tue Apr 27 11:21:18 EDT 2010
I saw the earlier note about changing directory to the file with the data. That might be required if your ctl file has a relative path to the data instead of absolute
dset ^myfile.
Sometimes these problems are because some environment variable is not set properly when the job is executed by cron.
The easieset thing to do to find out the error is in the cron file, set the output for stdout and stderr to a logfile, so you can see what error message is thrown.
/bin/myfile 1>log.txt 2>&1
1 > log.txt means send stdout to the file log.txt
2>&1 means send stderr (error messages) to the same file as stdout.
Ron Goodson
Prairie and Northern Meteorological Service of Canada Science Section Unité des Sciences, Région des Prairies et du Nord, Service Météorologique du Canada
Environment Canada
Room 200 ; 4999 - 98 Avenue
Edmonton Alberta T6B 2X3 Environnement Canada
Pièce 200 ; 4999 - 98 Avenue
Edmonton Alberta T6B 2X3
Telephone | Téléphone 780 951 8791
Email | Courriel ron.goodson at ec.gc.ca
________________________________
From: gradsusr-bounces at gradsusr.org [mailto:gradsusr-bounces at gradsusr.org] On Behalf Of Andrew Revering
Sent: April 26, 2010 11:19 PM
To: 'GrADS Users Forum'
Subject: [gradsusr] Gribmap
I'm new to Linux and I'm pulling my hair out trying to figure out why gribmap will not run when executed as a cron job.
In crontab I execute a .sh script that has something that looks like:
#!/bin/bash
/wrf/wrfems/util/grads/bin/grib2ctl.pl -verf /wrf/wrfems/runs/float/emsprd/grib/arw_0000.grib > /wrf/wrfems/runs/float/emsprd/grib/arw_0000.ctl
/wrf/wrfems/util/grads/bin/gribmap -I /wrf/wrfems/runs/float/emsprd/grib/arw_0000.ctl
The last line is the problem child. Note that the script is running, and the first line in the script (converting GRIB to a CTL file) works, but nothing happens when trying to execute the gribmap executable.
Also I should note that if I type that same line in the terminal it DOES work, just not in crontab.
Any ideas?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20100427/d893a773/attachment-0003.html
More information about the gradsusr
mailing list