[gradsusr] Gribmap

Andrew Revering andy at f5data.com
Wed Apr 28 00:15:23 EDT 2010


Thanks for the help guys. this lead me down the right road at least. the
problem was a linux newb issue.

 

at the top of my script file I had:

 

#!/bin/bash

 

and I should have had

 

#!/bin/csh

 

Making that change fixed my problem. I don't really know what the bash and
csh mean but my life is good now.

When it's csh it won't let me write out a log file, but that's alright.

 

 

From: gradsusr-bounces at gradsusr.org [mailto:gradsusr-bounces at gradsusr.org]
On Behalf Of Goodson,Ron [Edm]
Sent: Tuesday, April 27, 2010 10:24 AM
To: GrADS Users Forum
Subject: Re: [gradsusr] Gribmap

 

p.s. --> and sometimes its a permission problem that when run from cron,
there is no permission to write to the directory you are using.

 

eithe way, I sure its something you will solve - and wil be obvious once you
know the answer.

Ron Goodson            

 

  _____  

From: Goodson,Ron [Edm] 
Sent: April 27, 2010 9:21 AM
To: 'GrADS Users Forum'
Subject: RE: [gradsusr] Gribmap

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.

 

  _____  

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/00c966b3/attachment-0003.html 


More information about the gradsusr mailing list