Environment Variables for the I/O API

Standard I/O API environment variables

The following are standard environment variables supported or used by the I/O API. These should be set using setenv, for example, if you are using csh). The following environment variable is used by grid-description and grid manipulation utility routines such as DSCGRID() and DSCOORD().

The following environment variable controls whether routines GETDBLE(), GETMENU(), GETNUM(), GETREAL(), GETSTR(), GETYN(), PROMPTFFILE(), and PROMPTMFILE(), prompt the user for the value requested, or not. Setting PROMPTFLAG to "N" can be used, in conjunction with the selection of "smart" defaults within programs, to make it easier to write scripts for running various programs.

OpenMP Parallel Control

Generally, all OpenMP parallel programs use environment variable OMP_NUM_THREADS to control how many parallel threads/processors are used for program execution. In particular, this applies to "m3tools" programs M3AGMASK, M3AGMAX, M3COMBO, M3TPROC and VERTINTEGRAL for I/O API version 3.1 later than Nov. 21, 2013, and programs built with I/O API routines BILIN(), BMATVEC(), DMATVEC, CBARNES1(), and CBARNESN() using I/O API versions later than Sept. 12, 2014.

I/O API Environment-Variable Routines

Routines ENVDBLE() , ENVINT() , ENVREAL() , ENVSTR() , ENVYN() and ENVLIST() can be used from programs to find the values of environment values of types DOUBLE PRECISION, INTEGER, REAL, CHARACTER STRING, LOGICAL, and comma-delimmited-list respectively, log the value retrieved, convert it to the indicated type, and return it to the caller.

Routine NAMEVAL(), which performs a similar function for CHARACTER STRINGs, but does not log the transaction, is used internally by the I/O API; this should not be used by modeling codes, for log-integrity reasons.

Routine SETENVVAR() can be used to set environment variables for the currently-executing program.


Previous Section: Logical Names

Next Section: Grids and Coordinate Systems

Up: Conventions

To: Models-3/EDSS I/O API: The Help Pages