[ncl-talk] how to use crontab to run a ncl job

yang yang yang.yang816 at gmail.com
Thu Sep 17 17:54:58 MDT 2020


Dear Sir/Madam:

I would like to auto-run a bash script using crontab on a linux HPC.
The bash script looks as below. Only the ncl job cannot be done. However,
if I run it manually, it can be run without any problem. Can you please
tell me how to make the right setting so that my bash script can be run
successfully using crontab? Thank you very much!
Regards
Ed
 #!/bin/bash
module load NCL/6.4.0-GCC-7.1.0
NCARG_ROOT=/opt/nesi/CS500_centos7_skl/NCL/6.4.0-GCC-7.1.0
export NCARG_ROOT
PATH=$PATH:/opt/nesi/CS500_centos7_skl/NCL/6.4.0-GCC-7.1.0
export PATH
cd /home/yangy/NZLAM4_READ_STA/STATION_LW_SW
#dir="$(date -d "1 day ago" +'%Y%m%d')"
dir="$(date +'%Y%m%d')"
echo "$dir"
[ ! -d $dir ] && mkdir $dir
#cp * $dir
cd /nesi/project/niwa00004/yangy/NZLAM4_READ_STA/STATION_LW_SW/$dir
rm *.nc *.dat
cd
/niwa/oper/ecox_oper/cylc-run/nzlam_4km/share/cycle/"$dir"T12/member_1/output
cp escape*.nc
/nesi/project/niwa00004/yangy/NZLAM4_READ_STA/STATION_LW_SW/$dir
cd /nesi/project/niwa00004/yangy/NZLAM4_READ_STA/STATION_LW_SW
cp read_STA_LW_12.ncl
/nesi/project/niwa00004/yangy/NZLAM4_READ_STA/STATION_LW_SW/"$dir"
cd /nesi/project/niwa00004/yangy/NZLAM4_READ_STA/STATION_LW_SW/"$dir"
ncl
/nesi/project/niwa00004/yangy/NZLAM4_READ_STA/STATION_LW_SW/"$dir"/read_STA_LW_12.ncl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200918/84911839/attachment.html>


More information about the ncl-talk mailing list