Re: ncl_filedump crontab make error

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Fri Dec 21 2012 - 15:11:23 MST

Hi Ahmed,

In addition to setting NCARG_ROOT as Kyle suggested, you need to make sure $NCARG_ROOT/bin is on your search path.

This is what's causing it to complain about "ncargpath: command not found."

So, after the export for NCARG_ROOT, you also need:

   export PATH=$NCARG_ROOT/bin:$PATH

--Mary

On Dec 21, 2012, at 3:07 PM, Ahmed Lasheen wrote:

> Thanks for your reply.
> I tried your idea and I write a bash script that make export for NCARG_ROOT
> #!/bin/bash
> export NCARG_ROOT="/usr/local/ncl_6.0.0/"
> /usr/local/ncl_6.0.0/bin/ncl_filedump /home/ahmed/surface.grb
>
> But, it also give me the same the error.
>
>
> On Fri, Dec 21, 2012 at 11:32 PM, Kyle Griffin <ksgriffin2@wisc.edu> wrote:
> Ahmed,
>
> It's most likely a problem where you haven't set your NCARG_ROOT environmental variable by the time you call this command in the crontab. If you can source your default resource file for your user account or work a
>
> setenv NCARG_ROOT /path/to/ncarg/
>
> line into this same crontab entry, I would think that things should work better. If your resource file (for csh/tcsh, it's often .cshrc/.tcshrc) sources the PATH as well, you can simplify the command used to call ncl_filedump as well.
>
> In general, it's easier if you write a shell script to encapsulate all these commands, even if it is just 2-3 lines.
>
> Hope that helps...
>
>
> Kyle
>
> ----------------------------------------
> Kyle S. Griffin
> Department of Atmospheric and Oceanic Sciences
> University of Wisconsin - Madison
> 1225 W Dayton St, Madison, WI 53706
> Room 1421 Email: ksgriffin2@wisc.edu
>
>
>
> On Fri, Dec 21, 2012 at 3:17 PM, Ahmed Lasheen <ahmed4kernel@gmail.com> wrote:
> Hello all
> I am trying to write script that use ncl_filedump utilitty in operational way using the crontab utility.
>
> I found that the ncl_filedum make the following error
> ncargpath: Command not found.
> if: Missing file name.
>
> I opend the the ncl_filedump and it seems that the problem is with creating temporary file at line 339.
> set tmpdir = `ncargpath tmp`
> if (! -w $tmpdir) then
> echo "Temporary directory $tmpdir does not exist or is not writable; cannot proceed (check environment variable TMPDIR)"
> exit(1)
> endif
>
> If you want to try that you can put the following line in crontab
> * * * * * /usr/local/ncl_6.0.0/bin/ncl_filedump /home/ahmed/surface.grb >> /home/ahmed/log.`date +\%y\%m\%d\%H\%M` 2>&1
> with just change my home to your home name and also change the name of grib file.
>
> anybody knows a solution to that problem. I am using ncl 6.0.0 and Fedora linux.
> Thanks in advance
>
>
> --
> ===============
> Ahmed Lasheen
> Junior researcher at Cairo Numerical Weather Prediction Center (CNWPC)
> Egyptian Meteorological Authority(EMA)
> Cairo,Egypt
> ===============
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>
>
>
> --
> ===============
> Ahmed Lasheen
> Junior researcher at Cairo Numerical Weather Prediction Center (CNWPC)
> Egyptian Meteorological Authority(EMA)
> Cairo,Egypt
> ===============
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Dec 21 15:11:34 2012

This archive was generated by hypermail 2.1.8 : Fri Jan 04 2013 - 15:32:29 MST