/[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.1 - (hide annotations) (download)
Thu Sep 16 11:27:18 2004 UTC (19 years, 8 months ago) by mlosch
Branch: MAIN
CVS Tags: checkpoint55c_post, checkpoint55b_post, checkpoint55, checkpoint54f_post, checkpoint55a_post
o initial check-in of TKE-model of Gaspar et al. 1990

1 mlosch 1.1 C $Header: $
2     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     & GGL90mixingMaps, GGL90writeState,
37     & GGL90ck, GGL90ceps, GGL90alpha, GGL90m2,
38     & GGL90TKEmin, GGL90TKEbottom,
39     & GGL90mixingLengthMin, GGL90viscMax, GGL90diffMax,
40     & GGL90TKEFile
41     _BEGIN_MASTER(myThid)
42    
43     WRITE(msgBuf,'(A)') ' GGL90_READPARMS: opening data.ggl90'
44     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
45     & SQUEEZE_RIGHT , 1)
46    
47    
48     CALL OPEN_COPY_DATA_FILE(
49     I 'data.ggl90', 'GGL90_READPARMS',
50     O iUnit,
51     I myThid )
52    
53     C-- set default TKE vertical mixing parameters
54     GGL90dumpFreq = dumpFreq
55     GGL90taveFreq = taveFreq
56     GGL90mixingMaps = .FALSE.
57     GGL90writeState = .FALSE.
58     GGL90ck = 0.1 _d 0
59     GGL90ceps = 0.7 _d 0
60     GGL90alpha = 1.0 _d 0
61     GGL90m2 = 3.0 _d 0
62     GGL90TKEmin = 1.0 _d -11
63     GGL90TKEbottom = UNSET_RL
64     GGL90viscMax = 1.0 _d 0
65     GGL90diffMax = 1.0 _d 1
66     GGL90mixingLengthMin = 1.0 _d -08
67     GGL90TKEFile = ' '
68    
69     C-----------------------------------------------------------------------
70     C define some non-dimensional constants and
71     C the vertical mixing coefficients in m-k-s units
72     C-----------------------------------------------------------------------
73    
74     C-- Read settings from model parameter file "data.ggl90".
75     READ(UNIT=iUnit,NML=GGL90_PARM01,IOSTAT=errIO)
76     IF ( errIO .LT. 0 ) THEN
77     WRITE(msgBuf,'(A)')
78     & 'S/R INI_PARMS'
79     CALL PRINT_ERROR( msgBuf , 1)
80     WRITE(msgBuf,'(A)')
81     & 'Error reading numerical model '
82     CALL PRINT_ERROR( msgBuf , 1)
83     WRITE(msgBuf,'(A)')
84     & 'parameter file "data.ggl90"'
85     CALL PRINT_ERROR( msgBuf , 1)
86     WRITE(msgBuf,'(A)')
87     & 'Problem in namelist GGL90_PARM01'
88     CALL PRINT_ERROR( msgBuf , 1)
89     C CALL MODELDATA_EXAMPLE( myThid )
90     STOP 'ABNORMAL END: S/R GGL90_READPARMS'
91     ENDIF
92    
93     CLOSE(iUnit)
94    
95     WRITE(msgBuf,'(A)')
96     & ' GGL90_READPARMS: finished reading data.ggl90'
97     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
98     & SQUEEZE_RIGHT , 1)
99    
100     _END_MASTER(myThid)
101    
102     C-- Everyone else must wait for the parameters to be loaded
103     _BARRIER
104    
105     C Now set-up any remaining parameters that result from the input parameters
106     IF ( GGL90TKEbottom .EQ. UNSET_RL ) THEN
107     GGL90TKEbottom = GGL90TKEmin
108     ENDIF
109     IF ( GGL90TKEmin .LE. 0. ) THEN
110     WRITE(msgBuf,'(A)')
111     & 'GGL90TKEmin must be greater than zero'
112     CALL PRINT_ERROR( msgBuf , 1)
113     STOP 'ABNORMAL END: S/R GGL90_READPARMS'
114     ENDIF
115     IF ( GGL90TKEbottom .LT. 0. ) THEN
116     WRITE(msgBuf,'(A)')
117     & 'GGL90TKEbottom must not be less than zero'
118     CALL PRINT_ERROR( msgBuf , 1)
119     STOP 'ABNORMAL END: S/R GGL90_READPARMS'
120     ENDIF
121     IF ( GGL90mixingLengthMin .LE. 0. ) THEN
122     WRITE(msgBuf,'(A)')
123     & 'GGL90mixingLengthMin must be greater than zero'
124     CALL PRINT_ERROR( msgBuf , 1)
125     STOP 'ABNORMAL END: S/R GGL90_READPARMS'
126     ENDIF
127     IF ( GGL90viscMax .LE. 0. ) THEN
128     WRITE(msgBuf,'(A)') 'GGL90viscMax must be greater than zero'
129     CALL PRINT_ERROR( msgBuf , 1)
130     STOP 'ABNORMAL END: S/R GGL90_READPARMS'
131     ENDIF
132     IF ( GGL90diffMax .LE. 0. ) THEN
133     WRITE(msgBuf,'(A)') 'GGL90diffMax must be greater than zero'
134     CALL PRINT_ERROR( msgBuf , 1)
135     STOP 'ABNORMAL END: S/R GGL90_READPARMS'
136     ENDIF
137    
138     #endif /* ALLOW_GGL90 */
139    
140     return
141     end

  ViewVC Help
Powered by ViewVC 1.1.22