26 |
#include "PARAMS.h" |
#include "PARAMS.h" |
27 |
#include "GRID.h" |
#include "GRID.h" |
28 |
#include "THSICE_PARAMS.h" |
#include "THSICE_PARAMS.h" |
29 |
|
#ifdef ALLOW_MNC |
30 |
|
#include "MNC_PARAMS.h" |
31 |
|
#endif |
32 |
|
|
33 |
C !INPUT/OUTPUT PARAMETERS: |
C !INPUT/OUTPUT PARAMETERS: |
34 |
C === Routine arguments === |
C === Routine arguments === |
35 |
|
C myThid :: My Thread Id. number |
36 |
INTEGER myThid |
INTEGER myThid |
37 |
CEOP |
CEOP |
38 |
|
|
39 |
#ifdef ALLOW_THSICE |
#ifdef ALLOW_THSICE |
40 |
|
|
41 |
C === Local variables === |
C === Local variables === |
42 |
C msgBuf - Informational/error message buffer |
C msgBuf :: Informational/error message buffer |
43 |
C iUnit - Work variable for IO unit number |
C iUnit :: Work variable for IO unit number |
44 |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
45 |
INTEGER iUnit |
INTEGER iUnit |
46 |
|
|
50 |
& cpice, cpwater, |
& cpice, cpwater, |
51 |
& kice, ksnow, |
& kice, ksnow, |
52 |
& transcoef, Lfresh, qsnow, |
& transcoef, Lfresh, qsnow, |
53 |
& albColdSnow, albWarmSnow, albOldSnow, hNewSnowAge, |
& albColdSnow, albWarmSnow, tempSnowAlb, |
54 |
|
& albOldSnow, hNewSnowAge, snowAgTime, |
55 |
& albIceMax, albIceMin, hAlbIce, hAlbSnow, |
& albIceMax, albIceMin, hAlbIce, hAlbSnow, |
56 |
& i0, ksolar, |
& i0, ksolar, |
57 |
& saltice, S_winton, mu_Tf, |
& saltice, S_winton, mu_Tf, |
59 |
& himin, Terrmax, nitMaxTsf, hiMax, hsMax, |
& himin, Terrmax, nitMaxTsf, hiMax, hsMax, |
60 |
& iceMaskmax, iceMaskmin, himin0, |
& iceMaskmax, iceMaskmin, himin0, |
61 |
& frac_energy, hihig |
& frac_energy, hihig |
62 |
|
|
63 |
NAMELIST /THSICE_PARM01/ |
NAMELIST /THSICE_PARM01/ |
64 |
& startIceModel, stepFwd_oceMxL, |
& startIceModel, stepFwd_oceMxL, |
65 |
& thSIce_deltaT, ocean_deltaT, tauRelax_MxL, |
& thSIce_deltaT, ocean_deltaT, tauRelax_MxL, |
66 |
& hMxL_default, sMxL_default, vMxL_default, |
& hMxL_default, sMxL_default, vMxL_default, |
67 |
& stressReduction, |
& thSIce_diffK, thSIceAdvScheme, stressReduction, |
68 |
& thSIce_taveFreq, thSIce_diagFreq, thSIce_monFreq |
& thSIce_taveFreq, thSIce_diagFreq, thSIce_monFreq, |
69 |
|
& thSIce_tave_mnc, thSIce_snapshot_mnc, thSIce_mon_mnc, |
70 |
|
& thSIce_pickup_read_mnc, thSIce_pickup_write_mnc, |
71 |
|
& thSIceFract_InitFile, thSIceThick_InitFile, |
72 |
|
& thSIceSnowH_InitFile, thSIceSnowA_InitFile, |
73 |
|
& thSIceEnthp_InitFile, thSIceTsurf_InitFile |
74 |
|
|
75 |
_BEGIN_MASTER(myThid) |
_BEGIN_MASTER(myThid) |
76 |
|
|
77 |
WRITE(msgBuf,'(A)') ' THSICE_READPARMS: opening data.ice' |
WRITE(msgBuf,'(A)') ' THSICE_READPARMS: opening data.ice' |
78 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
79 |
& SQUEEZE_RIGHT , 1) |
& SQUEEZE_RIGHT , 1) |
80 |
|
|
81 |
CALL OPEN_COPY_DATA_FILE( |
CALL OPEN_COPY_DATA_FILE( |
82 |
I 'data.ice', 'THSICE_READPARMS', |
I 'data.ice', 'THSICE_READPARMS', |
83 |
O iUnit, |
O iUnit, |
97 |
qsnow = Lfresh |
qsnow = Lfresh |
98 |
albColdSnow= 0.85 _d 0 |
albColdSnow= 0.85 _d 0 |
99 |
albWarmSnow= 0.70 _d 0 |
albWarmSnow= 0.70 _d 0 |
100 |
|
tempSnowAlb= -10. _d 0 |
101 |
albOldSnow = 0.55 _d 0 |
albOldSnow = 0.55 _d 0 |
102 |
albIceMax = 0.65 _d 0 |
albIceMax = 0.65 _d 0 |
103 |
albIceMin = 0.20 _d 0 |
albIceMin = 0.20 _d 0 |
104 |
hAlbIce = 0.50 _d 0 |
hAlbIce = 0.50 _d 0 |
105 |
hAlbSnow = 0.30 _d 0 |
hAlbSnow = 0.30 _d 0 |
106 |
hNewSnowAge= 2. _d -3 |
hNewSnowAge= 2. _d -3 |
107 |
|
snowAgTime = 50. _d 0 * 86400. _d 0 |
108 |
i0 = 0.3 _d 0 |
i0 = 0.3 _d 0 |
109 |
ksolar = 1.5 _d 0 |
ksolar = 1.5 _d 0 |
110 |
saltice = 4. _d 0 |
saltice = 4. _d 0 |
125 |
C-- Default values (parameters) |
C-- Default values (parameters) |
126 |
stepFwd_oceMxL = .FALSE. |
stepFwd_oceMxL = .FALSE. |
127 |
startIceModel = 0 |
startIceModel = 0 |
128 |
thSIce_deltaT = deltaTtracer |
thSIce_deltaT = dTtracerLev(1) |
129 |
ocean_deltaT = deltaTtracer |
ocean_deltaT = dTtracerLev(1) |
130 |
tauRelax_MxL = 0. _d 0 |
tauRelax_MxL = 0. _d 0 |
131 |
hMxL_default = 50. _d 0 |
hMxL_default = 50. _d 0 |
132 |
sMxL_default = 35. _d 0 |
sMxL_default = 35. _d 0 |
133 |
vMxL_default = 5. _d -2 |
vMxL_default = 5. _d -2 |
134 |
|
thSIce_diffK = 0. _d 0 |
135 |
|
thSIceAdvScheme = 0 |
136 |
stressReduction = 1. _d 0 |
stressReduction = 1. _d 0 |
137 |
thSIce_taveFreq = taveFreq |
IF ( useSEAICE ) stressReduction = 0. _d 0 |
138 |
|
thSIce_taveFreq = taveFreq |
139 |
thSIce_diagFreq = dumpFreq |
thSIce_diagFreq = dumpFreq |
140 |
thSIce_monFreq = monitorFreq |
thSIce_monFreq = monitorFreq |
141 |
|
#ifdef ALLOW_MNC |
142 |
|
thSIce_tave_mnc = timeave_mnc |
143 |
|
thSIce_snapshot_mnc = snapshot_mnc |
144 |
|
thSIce_mon_mnc = monitor_mnc |
145 |
|
thSIce_pickup_read_mnc = pickup_read_mnc |
146 |
|
thSIce_pickup_write_mnc = pickup_write_mnc |
147 |
|
#else |
148 |
|
thSIce_tave_mnc = .FALSE. |
149 |
|
thSIce_snapshot_mnc = .FALSE. |
150 |
|
thSIce_mon_mnc = .FALSE. |
151 |
|
thSIce_pickup_read_mnc = .FALSE. |
152 |
|
thSIce_pickup_write_mnc = .FALSE. |
153 |
|
#endif |
154 |
|
thSIceFract_InitFile = ' ' |
155 |
|
thSIceThick_InitFile = ' ' |
156 |
|
thSIceSnowH_InitFile = ' ' |
157 |
|
thSIceSnowA_InitFile = ' ' |
158 |
|
thSIceEnthp_InitFile = ' ' |
159 |
|
thSIceTsurf_InitFile = ' ' |
160 |
|
|
161 |
|
|
162 |
C-- Read parameters from open data file |
C-- Read parameters from open data file |
163 |
READ(UNIT=iUnit,NML=THSICE_CONST) |
READ(UNIT=iUnit,NML=THSICE_CONST) |
177 |
Tmlt1=-mu_Tf*S_winton |
Tmlt1=-mu_Tf*S_winton |
178 |
rhoiw = rhosw - rhoi |
rhoiw = rhosw - rhoi |
179 |
|
|
180 |
|
C Set I/O parameters |
181 |
|
thSIce_tave_mdsio = .TRUE. |
182 |
|
thSIce_snapshot_mdsio = .TRUE. |
183 |
|
thSIce_mon_stdio = .TRUE. |
184 |
|
thSIce_pickup_write_mdsio = .TRUE. |
185 |
|
#ifdef ALLOW_MNC |
186 |
|
IF (useMNC) THEN |
187 |
|
IF ( .NOT.outputTypesInclusive |
188 |
|
& .AND. thSIce_tave_mnc ) thSIce_tave_mdsio = .FALSE. |
189 |
|
IF ( .NOT.outputTypesInclusive |
190 |
|
& .AND. thSIce_snapshot_mnc ) |
191 |
|
& thSIce_snapshot_mdsio = .FALSE. |
192 |
|
IF ( .NOT.outputTypesInclusive |
193 |
|
& .AND. thSIce_mon_mnc ) thSIce_mon_stdio = .FALSE. |
194 |
|
IF ( .NOT.outputTypesInclusive |
195 |
|
& .AND. thSIce_pickup_write_mnc ) |
196 |
|
& thSIce_pickup_write_mdsio = .FALSE. |
197 |
|
ENDIF |
198 |
|
#endif |
199 |
|
|
200 |
|
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
201 |
|
C-- Check parameter consistency: |
202 |
|
IF ( thSIceAdvScheme.EQ.0 .AND. thSIce_diffK.NE.0. ) THEN |
203 |
|
WRITE(msgBuf,'(2A)') |
204 |
|
& 'THSICE_READPARMS: to use thSIce_diffK, needs to select', |
205 |
|
& ' one advection scheme (thSIceAdvScheme<>0)' |
206 |
|
CALL PRINT_ERROR( msgBuf , myThid ) |
207 |
|
STOP 'ABNORMAL END: THSICE_READPARMS' |
208 |
|
ENDIF |
209 |
|
#ifndef ALLOW_GENERIC_ADVDIFF |
210 |
|
IF ( thSIceAdvScheme.NE.0 ) THEN |
211 |
|
WRITE(msgBuf,'(2A)') |
212 |
|
& 'THSICE_READPARMS: Need to compile "generic_advdiff" pkg', |
213 |
|
& ' in order to use thSIceAdvScheme' |
214 |
|
CALL PRINT_ERROR( msgBuf , myThid ) |
215 |
|
STOP 'ABNORMAL END: THSICE_READPARMS' |
216 |
|
ENDIF |
217 |
|
#endif /* ndef ALLOW_GENERIC_ADVDIFF */ |
218 |
|
|
219 |
|
IF ( useSEAICE .AND. stressReduction.NE.0. _d 0 ) THEN |
220 |
|
C-- If useSEAICE=.true., the stress is computed in seaice_model, |
221 |
|
C-- so that it does not need any further reduction |
222 |
|
WRITE(msgBuf,'(2A)') |
223 |
|
& 'THSICE_READPARMS: if useSEAICE, stress will be computed', |
224 |
|
& ' by SEAICE pkg => no reduction' |
225 |
|
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
226 |
|
& SQUEEZE_RIGHT , myThid) |
227 |
|
WRITE(msgBuf,'(A)') |
228 |
|
& 'THSICE_READPARMS: WARNING: reset stressReduction to zero' |
229 |
|
CALL PRINT_MESSAGE( msgBuf, errorMessageUnit, |
230 |
|
& SQUEEZE_RIGHT , myThid) |
231 |
|
stressReduction = 0. _d 0 |
232 |
|
ENDIF |
233 |
|
|
234 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
235 |
iUnit = standardMessageUnit |
iUnit = standardMessageUnit |
236 |
c iUnit = 88 |
c CALL MDSFINDUNIT( iUnit, mythid ) |
237 |
c OPEN(iUnit,file='thsice_check_params',status='unknown') |
c OPEN(iUnit,file='thsice_check_params',status='unknown') |
238 |
WRITE(iUnit,*) 'ThSI: rhos =',rhos |
WRITE(iUnit,*) 'ThSI: rhos =',rhos |
239 |
WRITE(iUnit,*) 'ThSI: rhoi =',rhoi |
WRITE(iUnit,*) 'ThSI: rhoi =',rhoi |
249 |
WRITE(iUnit,*) 'ThSI: qsnow =',qsnow |
WRITE(iUnit,*) 'ThSI: qsnow =',qsnow |
250 |
WRITE(iUnit,*) 'ThSI: albColdSnow=',albColdSnow |
WRITE(iUnit,*) 'ThSI: albColdSnow=',albColdSnow |
251 |
WRITE(iUnit,*) 'ThSI: albWarmSnow=',albWarmSnow |
WRITE(iUnit,*) 'ThSI: albWarmSnow=',albWarmSnow |
252 |
|
WRITE(iUnit,*) 'ThSI: tempSnowAlb=',tempSnowAlb |
253 |
WRITE(iUnit,*) 'ThSI: albOldSnow =',albOldSnow |
WRITE(iUnit,*) 'ThSI: albOldSnow =',albOldSnow |
254 |
WRITE(iUnit,*) 'ThSI: hNewSnowAge=',hNewSnowAge |
WRITE(iUnit,*) 'ThSI: hNewSnowAge=',hNewSnowAge |
255 |
|
WRITE(iUnit,*) 'ThSI: snowAgTime =',snowAgTime |
256 |
WRITE(iUnit,*) 'ThSI: albIceMax =',albIceMax |
WRITE(iUnit,*) 'ThSI: albIceMax =',albIceMax |
257 |
WRITE(iUnit,*) 'ThSI: albIceMin =',albIceMin |
WRITE(iUnit,*) 'ThSI: albIceMin =',albIceMin |
258 |
WRITE(iUnit,*) 'ThSI: hAlbIce =',hAlbIce |
WRITE(iUnit,*) 'ThSI: hAlbIce =',hAlbIce |
275 |
WRITE(iUnit,*) 'ThSI: frac_energy',frac_energy |
WRITE(iUnit,*) 'ThSI: frac_energy',frac_energy |
276 |
WRITE(iUnit,*) 'ThSI: hihig =',hihig |
WRITE(iUnit,*) 'ThSI: hihig =',hihig |
277 |
WRITE(iUnit,*) 'ThSI: stressReduction =',stressReduction |
WRITE(iUnit,*) 'ThSI: stressReduction =',stressReduction |
278 |
|
WRITE(iUnit,*) 'ThSI: thSIceAdvScheme =',thSIceAdvScheme |
279 |
|
WRITE(iUnit,*) 'ThSI: thSIce_diffK =',thSIce_diffK |
280 |
WRITE(iUnit,*) 'ThSI: thSIce_deltaT =',thSIce_deltaT |
WRITE(iUnit,*) 'ThSI: thSIce_deltaT =',thSIce_deltaT |
281 |
WRITE(iUnit,*) 'ThSI: ocean_deltaT =',ocean_deltaT |
WRITE(iUnit,*) 'ThSI: ocean_deltaT =',ocean_deltaT |
282 |
WRITE(iUnit,*) 'ThSI: stepFwd_oceMxL=',stepFwd_oceMxL |
WRITE(iUnit,*) 'ThSI: stepFwd_oceMxL=',stepFwd_oceMxL |
288 |
WRITE(iUnit,*) 'ThSI: thSIce_diagFreq=',thSIce_diagFreq |
WRITE(iUnit,*) 'ThSI: thSIce_diagFreq=',thSIce_diagFreq |
289 |
WRITE(iUnit,*) 'ThSI: thSIce_monFreq =',thSIce_monFreq |
WRITE(iUnit,*) 'ThSI: thSIce_monFreq =',thSIce_monFreq |
290 |
WRITE(iUnit,*) 'ThSI: startIceModel =',startIceModel |
WRITE(iUnit,*) 'ThSI: startIceModel =',startIceModel |
291 |
IF (iUnit.EQ.88) CLOSE(iUnit) |
IF (iUnit.NE.standardMessageUnit) CLOSE(iUnit) |
292 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
293 |
|
|
294 |
_END_MASTER(myThid) |
_END_MASTER(myThid) |
300 |
|
|
301 |
RETURN |
RETURN |
302 |
END |
END |
303 |
|
|