1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164
|
C Copyright 1981-2007 ECMWF
C
C Licensed under the GNU Lesser General Public License which
C incorporates the terms and conditions of version 3 of the GNU
C General Public License.
C See LICENSE and gpl-3.0.txt for details.
C
SUBROUTINE GETCONF( )
C
C---->
C**** GETCONF
C
C PURPOSE
C _______
C
C This routine looks for environment variable CONFIG_INTERP to
C decide how to handle legendre coefficients.
C
C INTERFACE
C _________
C
C CALL GETCONF( )
C
C Input parameters
C ________________
C
C None.
C
C Output parameters
C ________________
C
C Sets flags in common block JDCFLAGS (see nifld.common):
C
C LFILEIO, LMEMORY, LSHARED, LON_FLY, LMAPPED
C
C
C Common block usage
C __________________
C
C JDCNDBG, JDCFLAGS
C
C
C Method
C ______
C
C Looks for environment variable CONFIG_INTERP to decide how to
C handle legendre coefficients. The variable contains entries in
C the format:
C
C col 1
C |
C v
C FILEIO to read coefficents from a file one latitude at a time
C MEMORY to read all coefficents from a file into memory
C SHARED to read coefficents from a memory-mapped file
C ON_FLY to generate coefficents for each latitude 'on the fly'
C
C Externals
C _________
C
C JDEBUG - Checks environment variable to switch on/off debug
C INTLOG - Logs output messages
C GETENV - Get value of an environment variable
C
C
C Reference
C _________
C
C None.
C
C
C Comments
C ________
C
C None.
C
C
C AUTHOR
C ______
C
C J.D.Chambers ECMWF Jan 2000
C
C
C MODIFICATIONS
C _____________
C
C None.
C
C----<
C _______________________________________________________
C
C* Section 0. Definition of variables.
C _______________________________________________________
C
IMPLICIT NONE
#include "nifld.common"
#include "parim.h"
#include "jparams.h"
C
C Parameters
C
C Local variables
C
CHARACTER*20 CONFIG
INTEGER IBLANK
C
LOGICAL LDEBUG
SAVE LDEBUG
C
C -----------------------------------------------------------------|
C* Section 1. Initialization.
C -----------------------------------------------------------------|
C
100 CONTINUE
C
IF( LIFIRST ) THEN
C
LIFIRST = .FALSE.
C
CALL JDEBUG( )
LDEBUG = NDBG.GT.0
C
C Read the configuration information
C
CALL GETENV('CONFIG_INTERP', CONFIG)
IBLANK = INDEX(CONFIG, ' ')
IF( IBLANK.GT.6 ) THEN
C
IF( CONFIG(1:6).EQ.'FILEIO' ) LFILEIO = .TRUE.
IF( CONFIG(1:6).EQ.'MEMORY' ) LMEMORY = .TRUE.
IF( CONFIG(1:6).EQ.'SHARED' ) LSHARED = .TRUE.
IF( CONFIG(1:6).EQ.'ON_FLY' ) LON_FLY = .TRUE.
IF( CONFIG(1:6).EQ.'MAPPED' ) LMAPPED = .TRUE.
IF( LDEBUG ) THEN
CALL INTLOG(JP_DEBUG,
X 'GETCONF: Legendre coefficents via: '//CONFIG(1:6),JPQUIET)
ENDIF
ELSE
#ifdef _uxp__
IF( LDEBUG ) CALL INTLOG(JP_DEBUG,
X 'GETCONF: Default legendre coeff handling: MEMORY',JPQUIET)
LMEMORY = .TRUE.
#elif defined IBM_POWER4
IF( LDEBUG ) CALL INTLOG(JP_DEBUG,
X 'GETCONF: Default legendre coeff handling: MAPPED',JPQUIET)
LMAPPED = .TRUE.
#else
IF( LDEBUG ) CALL INTLOG(JP_DEBUG,
X 'GETCONF: Default legendre coeff handling: FILEIO',JPQUIET)
LFILEIO = .TRUE.
#endif
ENDIF
C
ENDIF
C
C -----------------------------------------------------------------|
C* Section 9. Return to calling routine.
C -----------------------------------------------------------------|
C
900 CONTINUE
C
RETURN
END
|