1 |
C $Header: /u/u3/gcmpack/MITgcm/pkg/seaice/seaice_readparms.F,v 1.11.2.1 2003/10/02 18:18:34 adcroft Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "SEAICE_OPTIONS.h" |
5 |
|
6 |
SUBROUTINE SEAICE_READPARMS( myThid ) |
7 |
C /==========================================================\ |
8 |
C | SUBROUTINE SEAICE_READPARMS | |
9 |
C | o Routine to read in file data.seaice | |
10 |
C \==========================================================/ |
11 |
IMPLICIT NONE |
12 |
|
13 |
C === Global variables === |
14 |
#include "SIZE.h" |
15 |
#include "EEPARAMS.h" |
16 |
#include "PARAMS.h" |
17 |
#include "GRID.h" |
18 |
#include "SEAICE_PARAMS.h" |
19 |
|
20 |
C === Routine arguments === |
21 |
C myThid - Number of this instance of SEAICE_READPARMS |
22 |
INTEGER myThid |
23 |
|
24 |
#ifdef ALLOW_SEAICE |
25 |
|
26 |
C === Local variables === |
27 |
C msgBuf - Informational/error meesage buffer |
28 |
C errIO - IO error flag |
29 |
C iUnit - Work variable for IO unit number |
30 |
|
31 |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
32 |
INTEGER errIO, iUnit |
33 |
|
34 |
C-- SEAICE parameters |
35 |
NAMELIST /SEAICE_PARM01/ |
36 |
& SEAICEwriteState, SEAICEuseDYNAMICS, SEAICEuseADI, |
37 |
& LAD, IMAX_TICE, NPSEUDO, |
38 |
& SEAICE_dumpFreq, SEAICE_taveFreq, SEAICE_initialHEFF, |
39 |
& SEAICE_drag, SEAICE_waterDrag, SEAICE_dryIceAlb, |
40 |
& SEAICE_wetIceAlb, SEAICE_drySnowAlb, SEAICE_wetSnowAlb, |
41 |
& SEAICE_waterAlbedo, SEAICE_strength, |
42 |
& SEAICE_sensHeat, SEAICE_latentWater, SEAICE_latentIce, |
43 |
& SEAICE_iceConduct, SEAICE_snowConduct, SEAICE_emissivity, |
44 |
& SEAICE_snowThick, SEAICE_shortwave, OCEAN_drag, |
45 |
& uwindFile, vwindFile, atempFile, aqhFile, lwdownFile, |
46 |
& swdownFile, precipFile, evapFile, runoffFile, HeffFile, |
47 |
& LSR_ERROR, DIFF1, A22, HO, |
48 |
& WindForcingStart, WindForcingEnd, WindForcingPeriod, |
49 |
& FluxForcingStart, FluxForcingEnd, FluxForcingPeriod, |
50 |
& SSTForcingStart, SSTForcingEnd, SSTForcingPeriod, |
51 |
& SSSForcingStart, SSSForcingEnd, SSSForcingPeriod, |
52 |
& StartingYear, EndingYear, |
53 |
& MAX_HEFF, MIN_ATEMP, MIN_LWDOWN, MAX_TICE, MIN_TICE, |
54 |
& SEAICE_EPS, SEAICE_EPS_SQ |
55 |
|
56 |
_BEGIN_MASTER(myThid) |
57 |
|
58 |
WRITE(msgBuf,'(A)') ' SEAICE_INIT: opening data.seaice' |
59 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
60 |
& SQUEEZE_RIGHT , 1) |
61 |
|
62 |
CALL OPEN_COPY_DATA_FILE( |
63 |
I 'data.seaice', 'SEAICE_INIT', |
64 |
O iUnit, |
65 |
I myThid ) |
66 |
|
67 |
C-- set default sea ice parameters |
68 |
SEAICEwriteState = .FALSE. |
69 |
#ifdef SEAICE_ALLOW_DYNAMICS |
70 |
SEAICEuseDYNAMICS = .TRUE. |
71 |
#else |
72 |
SEAICEuseDYNAMICS = .FALSE. |
73 |
#endif |
74 |
SEAICEuseADI = .FALSE. |
75 |
SEAICE_dumpFreq = dumpFreq |
76 |
SEAICE_taveFreq = taveFreq |
77 |
SEAICE_initialHEFF = ONE |
78 |
SEAICE_drag = 0.002 _d 0 |
79 |
OCEAN_drag = 0.001 _d 0 |
80 |
SEAICE_waterDrag = 5.5 _d 0 |
81 |
SEAICE_dryIceAlb = 0.75 _d 0 |
82 |
SEAICE_wetIceAlb = 0.66 _d 0 |
83 |
SEAICE_drySnowAlb = 0.84 _d 0 |
84 |
SEAICE_wetSnowAlb = 0.7 _d 0 |
85 |
SEAICE_waterAlbedo = 0.1 _d +00 |
86 |
SEAICE_strength = 2.75 _d +04 |
87 |
SEAICE_sensHeat = 2.284 _d +00 |
88 |
SEAICE_latentWater = 5.6875 _d +03 |
89 |
SEAICE_latentIce = 6.4474 _d +03 |
90 |
SEAICE_iceConduct = 2.1656 _d +00 |
91 |
SEAICE_snowConduct = 3.1 _d -01 |
92 |
SEAICE_emissivity = 5.5 _d -08 |
93 |
SEAICE_snowThick = 0.15 _d 0 |
94 |
SEAICE_shortwave = 0.30 _d 0 |
95 |
uwindFile = ' ' |
96 |
vwindFile = ' ' |
97 |
atempFile = ' ' |
98 |
aqhFile = ' ' |
99 |
lwdownFile = ' ' |
100 |
swdownFile = ' ' |
101 |
precipFile = ' ' |
102 |
evapFile = ' ' |
103 |
runoffFile = ' ' |
104 |
HeffFile = ' ' |
105 |
LAD = 2 |
106 |
IMAX_TICE = 10 |
107 |
NPSEUDO = -99999. |
108 |
LSR_ERROR = 0.0001 _d 0 |
109 |
DIFF1 = .002 _d 0 |
110 |
DIFF1 = 2.0*DIFF1 |
111 |
A22 = 0.15 _d 0 |
112 |
HO = 0.5 _d 0 |
113 |
C DOUBLE HO BECAUSE OF MOD IN GROWTH |
114 |
HO=2.0*HO |
115 |
WindForcingStart = -99999. |
116 |
WindForcingEnd = -99999. |
117 |
WindForcingPeriod = -99999. |
118 |
FluxForcingStart = -99999. |
119 |
FluxForcingEnd = -99999. |
120 |
FluxForcingPeriod = -99999. |
121 |
SSTForcingStart = -99999. |
122 |
SSTForcingEnd = -99999. |
123 |
SSTForcingPeriod = -99999. |
124 |
SSSForcingStart = -99999. |
125 |
SSSForcingEnd = -99999. |
126 |
SSSForcingPeriod = -99999. |
127 |
StartingYear = 1948. |
128 |
EndingYear = 2000. |
129 |
MAX_HEFF = 10. _d 0 |
130 |
MIN_ATEMP = -50. _d 0 |
131 |
MIN_LWDOWN = 60. _d 0 |
132 |
MAX_TICE = 30. _d 0 |
133 |
MIN_TICE = -50. _d 0 |
134 |
SEAICE_EPS = 1. _d -10 |
135 |
SEAICE_EPS_SQ = -99999. |
136 |
|
137 |
C-- Read settings from model parameter file "data.seaice". |
138 |
READ(UNIT=iUnit,NML=SEAICE_PARM01,IOSTAT=errIO) |
139 |
IF ( errIO .LT. 0 ) THEN |
140 |
WRITE(msgBuf,'(A)') |
141 |
& 'S/R INI_PARMS' |
142 |
CALL PRINT_ERROR( msgBuf , 1) |
143 |
WRITE(msgBuf,'(A)') |
144 |
& 'Error reading numerical model ' |
145 |
CALL PRINT_ERROR( msgBuf , 1) |
146 |
WRITE(msgBuf,'(A)') |
147 |
& 'parameter file "data.seaice"' |
148 |
CALL PRINT_ERROR( msgBuf , 1) |
149 |
WRITE(msgBuf,'(A)') |
150 |
& 'Problem in namelist SEAICE_PARM01' |
151 |
CALL PRINT_ERROR( msgBuf , 1) |
152 |
C CALL MODELDATA_EXAMPLE( myThid ) |
153 |
STOP 'ABNORMAL END: S/R SEAICE_INIT' |
154 |
ENDIF |
155 |
|
156 |
CLOSE(iUnit) |
157 |
|
158 |
WRITE(msgBuf,'(A)') ' SEAICE_INIT: finished reading data.seaice' |
159 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
160 |
& SQUEEZE_RIGHT , 1) |
161 |
|
162 |
_END_MASTER(myThid) |
163 |
|
164 |
C-- Everyone else must wait for the parameters to be loaded |
165 |
_BARRIER |
166 |
|
167 |
#ifndef SEAICE_EXTERNAL_FORCING |
168 |
IF ( FluxForcingStart .EQ. -99999. .OR. |
169 |
& FluxForcingEnd .EQ. -99999. .OR. |
170 |
& FluxForcingPeriod .EQ. -99999. ) THEN |
171 |
WRITE(msgBuf,'(A)') 'Specify FluxForcing* in data.seaice' |
172 |
CALL PRINT_ERROR( msgBuf , 1) |
173 |
STOP 'ABNORMAL END: S/R SEAICE_GET_FORCING' |
174 |
ENDIF |
175 |
IF ( WindForcingStart .EQ. -99999. ) |
176 |
& WindForcingStart = FluxForcingStart |
177 |
IF ( WindForcingEnd .EQ. -99999. ) |
178 |
& WindForcingEnd = FluxForcingEnd |
179 |
IF ( WindForcingPeriod .EQ. -99999. ) |
180 |
& WindForcingPeriod = FluxForcingPeriod |
181 |
IF ( SSTForcingStart .EQ. -99999. ) |
182 |
& SSTForcingStart = FluxForcingStart |
183 |
IF ( SSTForcingEnd .EQ. -99999. ) |
184 |
& SSTForcingEnd = FluxForcingEnd |
185 |
IF ( SSTForcingPeriod .EQ. -99999. ) |
186 |
& SSTForcingPeriod = FluxForcingPeriod |
187 |
IF ( SSSForcingStart .EQ. -99999. ) |
188 |
& SSSForcingStart = FluxForcingStart |
189 |
IF ( SSSForcingEnd .EQ. -99999. ) |
190 |
& SSSForcingEnd = FluxForcingEnd |
191 |
IF ( SSSForcingPeriod .EQ. -99999. ) |
192 |
& SSSForcingPeriod = FluxForcingPeriod |
193 |
#endif /* SEAICE_EXTERNAL_FORCING */ |
194 |
|
195 |
IF ( SEAICE_EPS_SQ .EQ. -99999. ) |
196 |
& SEAICE_EPS_SQ = SEAICE_EPS * SEAICE_EPS |
197 |
|
198 |
IF ( NPSEUDO .EQ. -99999. ) THEN |
199 |
IF ( SEAICEuseADI ) THEN |
200 |
NPSEUDO = 20 |
201 |
ELSE |
202 |
NPSEUDO = 1 |
203 |
ENDIF |
204 |
ENDIF |
205 |
|
206 |
#endif /* ALLOW_SEAICE */ |
207 |
|
208 |
return |
209 |
end |