NCL controlled by launchctl to schedule daily execution

From: YU CHENG <mikadofasan_at_nyahnyahspammersnyahnyah>
Date: Wed Aug 28 2013 - 18:12:07 MDT

Hi everyone,

I'm currently working on a project to plot out daily MODIS SST and Real Time Ocean forecast SST and SSH. Since i'm going to the sea, and don't have stable internet during that period, I wanted to schedule this job at the same time of every single day.
I used python to control the process including downloading, plotting, tar and send to my dropbox/share directory. My system is Mac OS X 10.8.4, I use launchctl to control the scheduled job.

However, I can execute the python script without any problem. But when it is called by launchctl, there is a problem.

part of my scripts:
os.system('/Users/yucheng/Documents/app/ncl/bin/ncl modis_sst.ncl') # Plot Daily MODIS SST
os.system('/Users/yucheng/Documents/app/ncl/bin/ncl meteor_daily_final.ncl') # Plot GHRSST and RTOFS

Nothing specific, just calling ncl using absolute path to execute my ncl files. But NCL just can't plot correctly, showing library not found, I tried to change the PATH of $load lines within the scripts, But the problem is still there. I further thought it is the problem of environmental var $NCARG_ROOT, cause it is first set when I log in to bash_shell. Therefore I tried to set it using launchctl. After this change, my ncl file works now, but just plot out a white background without shading showing this message:

fatal:ContourPlotDraw: Workspace reallocation would exceed maximum size 100000000
fatal:ContourPlotDraw: draw error
warning:WorkstationDeactivate: workstation not active or not opened

I already changed the .hluresfile, but this is not the value I set either.

Anybody has experience with ncl working well with launchctl? My python codes and ncl codes work perfectly, just not with the launchctl…
It is probably not very relevant to NCL, but still. There must be somewhere within NCL calling $NCARG_ROOT but I haven't changed. But still, $NCARG_ROOT is now a universal variable….

Thank you!

Yu Cheng

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Aug 28 18:12:19 2013

This archive was generated by hypermail 2.1.8 : Fri Aug 30 2013 - 14:04:57 MDT