Hi Group,
I have a question regarding running NCL commands in batch mode. I'd like
to create an NCL script that is called from the cron. The NCL script reads
ASCII data. The ASCII data file name changes dynamically as wall clock
time progresses -- in this case the file name contains a pseudo-Unix time
stamp which indicates the valid time of the data.
For example, at 1000 UTC a file named 2000091810_surface.dat exists on my
system (it contains surface data from 1000 UTC). I'd like my NCL script
(called from the cron) to plot this data. Then at 1100 UTC a file named
2000091811_surface.dat exits (containing surface data from 1100 UTC) --
I'd like to automatically plot this data too, and so on.
I've looked at the GSUN guide examples, and played around a bit with NCL
itself. It seems as though the only way I can get my NCL script to
recognize dynamically changing file names, is to generate a 'wrapper'
script which dynamically creates appropriate file names/locations, then
sets an environment variable indicating the location of the file. For
example, here's some pseudo-code from a wrapper script:
get system date
create file name/location string from system date
setenv $FILE_LOCATION
ncl < my_ncl_script.ncl
unsetenv $FILE_LOCATION
Then in my NCL script I have an asciiread call that looks like:
surface_dat = asciiread($FILE_LOCATION,(/1000,5/),"float")
Is there a better option than what I've described above?
Thanks for your time,
Daran
__________________________________________________________________
Daran L. Rife
Associate Scientist
National Center for Atmospheric Research
Research Applications Program
P.O. Box 3000
Boulder CO, 80307-3000
303.497.8398
drife@ucar.edu
__________________________________________________________________
This archive was generated by hypermail 2b29 : Mon Sep 18 2000 - 14:06:23 MDT