Re: NCL controlled by launchctl to schedule daily execution

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Wed Aug 28 2013 - 18:38:00 MDT

Hi Yu Cheng,
Does your .hluresfile set a larger value for wsMaximumSize than the value in the error message? If so, the problem is probably that launchctl runs using administrative user id (not as you). Therefore NCL would not
read the .hluresfile in your home directory. I would suggest setting wsMaximumSize explicitly in the script that needs to use it. You need to get the workspace object id in order to do this.

Here is an example of setting the wsMaximumSize:

setvalues NhlGetWorkspaceObjectId()
    "wsMaximumSize" : 300000000
end setvalues

Hope this helps.

On Aug 28, 2013, at 6:12 PM, YU CHENG <> wrote:

> 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:

ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
Received on Wed Aug 28 18:38:11 2013

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