Re: NCL_DEF_SCRIPTS_DIR

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Tue Mar 15 2011 - 12:31:30 MDT

Hi Oliver,

We will look into this. I definitely appreciate that there should be some way to ensure that scripts are loaded in a definable order.
 -dave

On Mar 15, 2011, at 4:53 AM, <Oliver.Fuhrer@meteoswiss.ch> wrote:

> Dear NCL team,
>
> As you might know, we have developed a library of scripts we use to visualize COSMO model output. The way this works is that we set the NCL_DEF_SCRIPTS_DIR=${HOME}/ncl/startup environment variable and inside the startup directory we have the following links...
>
> 100.ncl -> /usr/lib/ncarg/nclscripts/csm/gsn_code.ncl
> 110.ncl -> /usr/lib/ncarg/nclscripts/csm/gsn_csm.ncl
> 120.ncl -> /usr/lib/ncarg/nclscripts/csm/contributed.ncl
> 200.ncl -> /usr/share/ncarg/cosmolib/src/constants.ncl
> 210.ncl -> /usr/share/ncarg/cosmolib/src/grib_keys_cosmo.ncl
> 220.ncl -> /usr/share/ncarg/cosmolib/src/utilities.ncl
> 230.ncl -> /usr/share/ncarg/cosmolib/src/cosmolib.ncl
>
> ...which load the library and its dependencies automatically when the user launches NCL. These scripts need to be loaded in alphabetical order (thus the strange names of the links) and if they are loaded in the wrong order errors will occur as certain functions will not be defined upon load. I have been seeing problems on several platforms since NCL is using the readdir() command to loop over all files in the directory set by NCL_DEF_SCRIPTS_DIR. This command does not guarantee alphabetical order (even though it usually gives alphabetical order if the links are created in alphabetical order). It seems that on several platforms, the readdir() actually gives a different order. I have tried putting the "load" commands inside the scripts being loaded, but it seems that NCL does not support recursive loads. Is there any chance we could convince NCL to parse the scripts in this directory in alphabetical order?
>
> Kind regards,
> Oli
>
> _______________________________________________
> 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 Tue Mar 15 12:31:38 2011

This archive was generated by hypermail 2.1.8 : Wed Mar 16 2011 - 09:22:37 MDT