Hi Marco,
You need to read the environmental variable with
getenv("Variable_Name"), try with:
opt_at_fout = getenv("INST_DIR")+"/TRN_"+\
abs_var(var_ix,2)+"_"+reg_ix+"_range.txt"
but you will need to export the variable on your shell script first.
--Álvaro.
Marco Pastore wrote:
> Hi all.
>
> I am trying to run my script using crontab and one .sh script as "pilot".
> In the script i set the NCARG_ROOT environment variable, and another
> variable INST_DIR , thath i use in the scripts as "path".
> I don't have problems, except if i use "write matrix":
>
> This is the error thath i recieve as system mail :
> Message 1:
> From pastore_at_brachetto1c.bo.cmcc.it Wed Oct 22 13:42:06 2008
> Return-Path: <pastore_at_brachetto1c.bo.cmcc.it>
> Date: Wed, 22 Oct 2008 13:42:06 GMT
> From: pastore_at_brachetto1c.bo.cmcc.it
> To: pastore_at_brachetto1c.bo.cmcc.it
> Subject: cron: sh /home/pastore/AFS_SITE_4/afs_pilot.sh
> Status: RO
>
> open: No such file or directory
> apparent state: unit 31 named $INST_DIR/TRN_T_5_range.txt
> lately reading sequential formatted external IO
> /home/pastore/AFS_SITE_4/afs_pilot.sh: line 13: 11118
> Aborted /usr/local/bin/ncl ENV=2
> /home/pastore/AFS_SITE_4/N4_afs_regions_main.ncl
> >/home/pastore/AFS_SITE_4/afs_pilot.log
>
> And this is the part of my scripts, where it abends:
>
> if (today_weekday.eq.3) then ; Write ranges to file
> if TS.eq."A" then
> _log("Write data on ascii file");
> fmtf = "3f7.2" ; output format (Fortran notation)
> opt = True
> opt_at_fout = "$INST_DIR/TRN_"+abs_var(var_ix,2)+"_"+reg_ix+"_range.txt"
> write_matrix(trn_range,fmtf,opt)
> end if _log("Write
> data on ascii file: DONE") end if
>
> Do you have suggestions for me ?
>
> Thanks !!
>
> Ciao, Marco
>
-- Álvaro M. Valdebenito B. alvaro.valdebenito_at_met.no Air Pollution Section/Research Department Tel. +47-2296 3397 Norwegian Meteorological Institute http:\\www.met.no P.O. Box 43 Blindern, 0313 Oslo, NORWAY http:\\www.emep.int/CWF _______________________________________________ ncl-talk mailing list List instructions, subscriber options, unsubscribe: http://mailman.ucar.edu/mailman/listinfo/ncl-talkReceived on Wed Oct 22 2008 - 09:26:47 MDT
This archive was generated by hypermail 2.2.0 : Wed Oct 22 2008 - 13:49:07 MDT