NCL_DEF_SCRIPTS_DIR

From: <Oliver.Fuhrer_at_nyahnyahspammersnyahnyah>
Date: Tue Mar 15 2011 - 04:53:07 MDT

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
Received on Tue Mar 15 04:54:00 2011

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