/[MITgcm]/MITgcm/pkg/ggl90/ggl90_readparms.F
ViewVC logotype

Annotation of /MITgcm/pkg/ggl90/ggl90_readparms.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.3 - (hide annotations) (download)
Tue Jun 6 16:18:18 2006 UTC (17 years, 11 months ago) by mlosch
Branch: MAIN
Changes since 1.2: +6 -3 lines
 add additional parameter following David's suggestion, interestingly
 ggl90 seems to be quite insensitive to any change in parameters ...

1 mlosch 1.3 C $Header: /u/gcmpack/MITgcm/pkg/ggl90/ggl90_readparms.F,v 1.2 2004/09/27 08:02:04 mlosch Exp $
2 mlosch 1.1 C $Name: $
3     #include "GGL90_OPTIONS.h"
4    
5     SUBROUTINE GGL90_READPARMS( myThid )
6     C /==========================================================\
7     C | SUBROUTINE GGL90_READPARMS |
8     C | o Routine to read in file data.ggl90 |
9     C \==========================================================/
10     IMPLICIT NONE
11    
12     C === Global variables ===
13     #include "SIZE.h"
14     #include "EEPARAMS.h"
15     #include "PARAMS.h"
16     #include "GRID.h"
17     #include "GGL90.h"
18    
19     C === Routine arguments ===
20     C myThid - Number of this instance of GGL90_READPARMS
21     INTEGER myThid
22    
23     #ifdef ALLOW_GGL90
24    
25     C === Local variables ===
26     C msgBuf - Informational/error meesage buffer
27     C errIO - IO error flag
28     C iUnit - Work variable for IO unit number
29    
30     CHARACTER*(MAX_LEN_MBUF) msgBuf
31     INTEGER errIO, iUnit
32    
33     C-- GGL90 vertical mixing parameters
34     NAMELIST /GGL90_PARM01/
35     & GGL90dumpFreq, GGL90taveFreq,
36 mlosch 1.2 & GGL90diffTKEh,
37 mlosch 1.1 & GGL90mixingMaps, GGL90writeState,
38     & GGL90ck, GGL90ceps, GGL90alpha, GGL90m2,
39 mlosch 1.3 & GGL90TKEmin, GGL90TKEsurfMin, GGL90TKEbottom,
40 mlosch 1.1 & GGL90mixingLengthMin, GGL90viscMax, GGL90diffMax,
41     & GGL90TKEFile
42     _BEGIN_MASTER(myThid)
43    
44     WRITE(msgBuf,'(A)') ' GGL90_READPARMS: opening data.ggl90'
45     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
46     & SQUEEZE_RIGHT , 1)
47    
48    
49     CALL OPEN_COPY_DATA_FILE(
50     I 'data.ggl90', 'GGL90_READPARMS',
51     O iUnit,
52     I myThid )
53    
54     C-- set default TKE vertical mixing parameters
55     GGL90dumpFreq = dumpFreq
56     GGL90taveFreq = taveFreq
57     GGL90mixingMaps = .FALSE.
58     GGL90writeState = .FALSE.
59     GGL90ck = 0.1 _d 0
60     GGL90ceps = 0.7 _d 0
61     GGL90alpha = 1.0 _d 0
62 mlosch 1.3 C Blanke and Delecluse (1993, JPO) use
63     GGL90m2 = 3.75 _d 0
64 mlosch 1.1 GGL90TKEmin = 1.0 _d -11
65 mlosch 1.3 C Blanke and Delecluse (1993, JPO) use
66     GGL90TKEsurfMin = 1.0 _d -04
67 mlosch 1.1 GGL90TKEbottom = UNSET_RL
68     GGL90viscMax = 1.0 _d 0
69     GGL90diffMax = 1.0 _d 1
70 mlosch 1.2 GGL90diffTKEh = 0.0 _d 0
71 mlosch 1.1 GGL90mixingLengthMin = 1.0 _d -08
72     GGL90TKEFile = ' '
73    
74     C-----------------------------------------------------------------------
75     C define some non-dimensional constants and
76     C the vertical mixing coefficients in m-k-s units
77     C-----------------------------------------------------------------------
78    
79     C-- Read settings from model parameter file "data.ggl90".
80     READ(UNIT=iUnit,NML=GGL90_PARM01,IOSTAT=errIO)
81     IF ( errIO .LT. 0 ) THEN
82     WRITE(msgBuf,'(A)')
83     & 'S/R INI_PARMS'
84     CALL PRINT_ERROR( msgBuf , 1)
85     WRITE(msgBuf,'(A)')
86     & 'Error reading numerical model '
87     CALL PRINT_ERROR( msgBuf , 1)
88     WRITE(msgBuf,'(A)')
89     & 'parameter file "data.ggl90"'
90     CALL PRINT_ERROR( msgBuf , 1)
91     WRITE(msgBuf,'(A)')
92     & 'Problem in namelist GGL90_PARM01'
93     CALL PRINT_ERROR( msgBuf , 1)
94     C CALL MODELDATA_EXAMPLE( myThid )
95     STOP 'ABNORMAL END: S/R GGL90_READPARMS'
96     ENDIF
97    
98     CLOSE(iUnit)
99    
100     WRITE(msgBuf,'(A)')
101     & ' GGL90_READPARMS: finished reading data.ggl90'
102     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
103     & SQUEEZE_RIGHT , 1)
104    
105     _END_MASTER(myThid)
106    
107     C-- Everyone else must wait for the parameters to be loaded
108     _BARRIER
109    
110     C Now set-up any remaining parameters that result from the input parameters
111     IF ( GGL90TKEbottom .EQ. UNSET_RL ) THEN
112     GGL90TKEbottom = GGL90TKEmin
113     ENDIF
114     IF ( GGL90TKEmin .LE. 0. ) THEN
115     WRITE(msgBuf,'(A)')
116     & 'GGL90TKEmin must be greater than zero'
117     CALL PRINT_ERROR( msgBuf , 1)
118     STOP 'ABNORMAL END: S/R GGL90_READPARMS'
119     ENDIF
120     IF ( GGL90TKEbottom .LT. 0. ) THEN
121     WRITE(msgBuf,'(A)')
122     & 'GGL90TKEbottom must not be less than zero'
123     CALL PRINT_ERROR( msgBuf , 1)
124     STOP 'ABNORMAL END: S/R GGL90_READPARMS'
125     ENDIF
126     IF ( GGL90mixingLengthMin .LE. 0. ) THEN
127     WRITE(msgBuf,'(A)')
128     & 'GGL90mixingLengthMin must be greater than zero'
129     CALL PRINT_ERROR( msgBuf , 1)
130     STOP 'ABNORMAL END: S/R GGL90_READPARMS'
131     ENDIF
132     IF ( GGL90viscMax .LE. 0. ) THEN
133     WRITE(msgBuf,'(A)') 'GGL90viscMax must be greater than zero'
134     CALL PRINT_ERROR( msgBuf , 1)
135     STOP 'ABNORMAL END: S/R GGL90_READPARMS'
136     ENDIF
137     IF ( GGL90diffMax .LE. 0. ) THEN
138     WRITE(msgBuf,'(A)') 'GGL90diffMax must be greater than zero'
139     CALL PRINT_ERROR( msgBuf , 1)
140     STOP 'ABNORMAL END: S/R GGL90_READPARMS'
141     ENDIF
142    
143     #endif /* ALLOW_GGL90 */
144    
145     return
146     end

  ViewVC Help
Powered by ViewVC 1.1.22