/[MITgcm]/MITgcm_contrib/jscott/code_changed/thsice_readparms.F
ViewVC logotype

Annotation of /MITgcm_contrib/jscott/code_changed/thsice_readparms.F

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


Revision 1.3 - (hide annotations) (download)
Tue Aug 21 15:59:49 2007 UTC (19 years ago) by jscott
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
remove obsolete directory

1 jscott 1.3 C $Header: /u/gcmpack/MITgcm_contrib/jscott/code_changed/thsice_readparms.F,v 1.2 2007/05/01 19:38:38 jscott Exp $
2 jscott 1.1 C $Name: $
3    
4     #include "THSICE_OPTIONS.h"
5    
6     CBOP
7     C !ROUTINE: THSICE_READPARMS
8     C !INTERFACE:
9     SUBROUTINE THSICE_READPARMS( myThid )
10    
11     C !DESCRIPTION: \bv
12     C *==========================================================*
13     C | S/R THSICE_READPARMS
14     C | o Routine to initialize THSICE parameters and constants
15     C *==========================================================*
16     C | Initialize Th-Sea-ICE parameters, read in data.ice
17     C *==========================================================*
18     C \ev
19    
20     C !USES:
21     IMPLICIT NONE
22    
23     C === Global variables ===
24     #include "SIZE.h"
25     #include "EEPARAMS.h"
26     #include "PARAMS.h"
27     #include "GRID.h"
28     #include "THSICE_PARAMS.h"
29     #ifdef ALLOW_MNC
30     #include "MNC_PARAMS.h"
31     #endif
32    
33     C !INPUT/OUTPUT PARAMETERS:
34     C === Routine arguments ===
35     INTEGER myThid
36     CEOP
37    
38     #ifdef ALLOW_THSICE
39    
40     C === Local variables ===
41     C msgBuf - Informational/error message buffer
42     C iUnit - Work variable for IO unit number
43     CHARACTER*(MAX_LEN_MBUF) msgBuf
44     INTEGER iUnit
45    
46     C-- Th-Sea-ICE parameter
47     NAMELIST /THSICE_CONST/
48     & rhos, rhoi, rhosw, rhofw,
49     & cpice, cpwater,
50     & kice, ksnow,
51     & transcoef, Lfresh, qsnow,
52 jscott 1.2 & albColdSnow, albWarmSnow, tempSnowAlb,
53     & albOldSnow, hNewSnowAge, snowAgTime,
54 jscott 1.1 & albIceMax, albIceMin, hAlbIce, hAlbSnow,
55     & i0, ksolar,
56     & saltice, S_winton, mu_Tf,
57     & Tf0kel,
58     & himin, Terrmax, nitMaxTsf, hiMax, hsMax,
59     & iceMaskmax, iceMaskmin, himin0,
60     & frac_energy, hihig
61    
62     NAMELIST /THSICE_PARM01/
63     & startIceModel, stepFwd_oceMxL,
64     & thSIce_deltaT, thSIce_dtTemp,
65     & ocean_deltaT, tauRelax_MxL,
66     & hMxL_default, sMxL_default, vMxL_default,
67     & stressReduction,
68     & 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)
76    
77     WRITE(msgBuf,'(A)') ' THSICE_READPARMS: opening data.ice'
78     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
79     & SQUEEZE_RIGHT , 1)
80    
81     CALL OPEN_COPY_DATA_FILE(
82     I 'data.ice', 'THSICE_READPARMS',
83     O iUnit,
84     I myThid )
85    
86     C-- Default values (constants)
87     rhos = 330. _d 0
88     rhoi = 900. _d 0
89     rhosw = rhoConst
90     rhofw = rhoConstFresh
91     cpice = 2106. _d 0
92     cpwater = HeatCapacity_Cp
93     kice = 2.03 _d 0
94     ksnow = 0.30 _d 0
95     transcoef=0.006 _d 0
96     Lfresh = 3.34 _d 5
97     qsnow = Lfresh
98     albColdSnow= 0.85 _d 0
99     albWarmSnow= 0.70 _d 0
100 jscott 1.2 tempSnowAlb= -10. _d 0
101 jscott 1.1 albOldSnow = 0.55 _d 0
102     albIceMax = 0.65 _d 0
103     albIceMin = 0.20 _d 0
104     hAlbIce = 0.50 _d 0
105     hAlbSnow = 0.30 _d 0
106     hNewSnowAge= 2. _d -3
107     snowAgTime = 50. _d 0 * 86400. _d 0
108     i0 = 0.3 _d 0
109     ksolar = 1.5 _d 0
110     saltice = 4. _d 0
111     S_winton = 1. _d 0
112     mu_Tf = 0.054 _d 0
113     Tf0kel = celsius2K
114     himin = 0.01 _d 0
115     Terrmax = 5.0 _d -1
116     nitMaxTsf= 20
117     hiMax = 10. _d 0
118     hsMax = 10. _d 0
119     iceMaskmax = 1. _d 0
120     iceMaskmin = .1 _d 0
121     himin0 = 0.2 _d 0
122     frac_energy= .4 _d 0
123     hihig = 2.5 _d 0
124    
125     C-- Default values (parameters)
126     stepFwd_oceMxL = .FALSE.
127     startIceModel = 0
128     thSIce_deltaT = dTtracerLev(1)
129     thSIce_dtTemp = dTtracerLev(1)
130     ocean_deltaT = dTtracerLev(1)
131     tauRelax_MxL = 0. _d 0
132     hMxL_default = 50. _d 0
133     sMxL_default = 35. _d 0
134     vMxL_default = 5. _d -2
135     stressReduction = 1. _d 0
136     IF ( useSEAICE ) stressReduction = 0. _d 0
137     thSIce_taveFreq = taveFreq
138     thSIce_diagFreq = dumpFreq
139     thSIce_monFreq = monitorFreq
140     #ifdef ALLOW_MNC
141     thSIce_tave_mnc = timeave_mnc
142     thSIce_snapshot_mnc = snapshot_mnc
143     thSIce_mon_mnc = monitor_mnc
144     thSIce_pickup_read_mnc = pickup_read_mnc
145     thSIce_pickup_write_mnc = pickup_write_mnc
146     #else
147     thSIce_tave_mnc = .FALSE.
148     thSIce_snapshot_mnc = .FALSE.
149     thSIce_mon_mnc = .FALSE.
150     thSIce_pickup_read_mnc = .FALSE.
151     thSIce_pickup_write_mnc = .FALSE.
152     #endif
153     thSIceFract_InitFile = ' '
154     thSIceThick_InitFile = ' '
155     thSIceSnowH_InitFile = ' '
156     thSIceSnowA_InitFile = ' '
157     thSIceEnthp_InitFile = ' '
158     thSIceTsurf_InitFile = ' '
159    
160    
161     C-- Read parameters from open data file
162     READ(UNIT=iUnit,NML=THSICE_CONST)
163     WRITE(msgBuf,'(A)') ' THSICE_READPARMS: read THSICE_CONST'
164     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
165     & SQUEEZE_RIGHT , 1)
166    
167     READ(UNIT=iUnit,NML=THSICE_PARM01)
168     WRITE(msgBuf,'(A)') ' THSICE_READPARMS: read THSICE_PARM01'
169     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
170     & SQUEEZE_RIGHT , 1)
171    
172     C-- Close the open data file
173     CLOSE(iUnit)
174    
175     C- Define other constants (from previous ones):
176     Tmlt1=-mu_Tf*S_winton
177     rhoiw = rhosw - rhoi
178    
179     C Set I/O parameters
180     thSIce_tave_mdsio = .TRUE.
181     thSIce_snapshot_mdsio = .TRUE.
182     thSIce_mon_stdio = .TRUE.
183     thSIce_pickup_write_mdsio = .TRUE.
184     #ifdef ALLOW_MNC
185     IF (useMNC) THEN
186     IF ( .NOT.outputTypesInclusive
187     & .AND. thSIce_tave_mnc ) thSIce_tave_mdsio = .FALSE.
188     IF ( .NOT.outputTypesInclusive
189     & .AND. thSIce_snapshot_mnc )
190     & thSIce_snapshot_mdsio = .FALSE.
191     IF ( .NOT.outputTypesInclusive
192     & .AND. thSIce_mon_mnc ) thSIce_mon_stdio = .FALSE.
193     IF ( .NOT.outputTypesInclusive
194     & .AND. thSIce_pickup_write_mnc )
195     & thSIce_pickup_write_mdsio = .FALSE.
196     ENDIF
197     #endif
198    
199     C-- Check parameter consistency:
200     IF ( useSEAICE .AND. stressReduction.NE.0. _d 0 ) THEN
201     C-- If useSEAICE=.true., the stress is computed in seaice_model,
202     C-- so that it does not need any further reduction
203     WRITE(msgBuf,'(2A)')
204     & 'THSICE_READPARMS: if useSEAICE, stress will be computed',
205     & ' by SEAICE pkg => no reduction'
206     CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
207     & SQUEEZE_RIGHT , myThid)
208     WRITE(msgBuf,'(A)')
209     & 'THSICE_READPARMS: WARNING: reset stressReduction to zero'
210     CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
211     & SQUEEZE_RIGHT , myThid)
212     stressReduction = 0. _d 0
213     ENDIF
214    
215     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
216     iUnit = standardMessageUnit
217     c CALL MDSFINDUNIT( iUnit, mythid )
218     c OPEN(iUnit,file='thsice_check_params',status='unknown')
219     WRITE(iUnit,*) 'ThSI: rhos =',rhos
220     WRITE(iUnit,*) 'ThSI: rhoi =',rhoi
221     WRITE(iUnit,*) 'ThSI: rhosw =',rhosw
222     WRITE(iUnit,*) 'ThSI: rhofw =',rhofw
223     WRITE(iUnit,*) 'ThSI: rhoiw =',rhoiw
224     WRITE(iUnit,*) 'ThSI: cpice =',cpice
225     WRITE(iUnit,*) 'ThSI: cpwater =',cpwater
226     WRITE(iUnit,*) 'ThSI: kice =',kice
227     WRITE(iUnit,*) 'ThSI: ksnow =',ksnow
228     WRITE(iUnit,*) 'ThSI: transcoef=',transcoef
229     WRITE(iUnit,*) 'ThSI: Lfresh =',Lfresh
230     WRITE(iUnit,*) 'ThSI: qsnow =',qsnow
231     WRITE(iUnit,*) 'ThSI: albColdSnow=',albColdSnow
232     WRITE(iUnit,*) 'ThSI: albWarmSnow=',albWarmSnow
233 jscott 1.2 WRITE(iUnit,*) 'ThSI: tempSnowAlb=',tempSnowAlb
234 jscott 1.1 WRITE(iUnit,*) 'ThSI: albOldSnow =',albOldSnow
235 jscott 1.2 WRITE(iUnit,*) 'ThSI: hNewSnowAge=',hNewSnowAge
236     WRITE(iUnit,*) 'ThSI: snowAgTime =',snowAgTime
237 jscott 1.1 WRITE(iUnit,*) 'ThSI: albIceMax =',albIceMax
238     WRITE(iUnit,*) 'ThSI: albIceMin =',albIceMin
239     WRITE(iUnit,*) 'ThSI: hAlbIce =',hAlbIce
240     WRITE(iUnit,*) 'ThSI: hAlbSnow =',hAlbSnow
241     WRITE(iUnit,*) 'ThSI: i0 =',i0
242     WRITE(iUnit,*) 'ThSI: ksolar =',ksolar
243     WRITE(iUnit,*) 'ThSI: saltice =',saltice
244     WRITE(iUnit,*) 'ThSI: S_winton=',S_winton
245     WRITE(iUnit,*) 'ThSI: mu_Tf =',mu_Tf
246     WRITE(iUnit,*) 'ThSI: Tf0kel =',Tf0kel
247     WRITE(iUnit,*) 'ThSI: Tmlt1 =',Tmlt1
248     WRITE(iUnit,*) 'ThSI: himin =',himin
249     WRITE(iUnit,*) 'ThSI: Terrmax =',Terrmax
250     WRITE(iUnit,*) 'ThSI: nitMaxTsf=',nitMaxTsf
251     WRITE(iUnit,*) 'ThSI: hiMax =',hiMax
252     WRITE(iUnit,*) 'ThSI: hsMax =',hsMax
253     WRITE(iUnit,*) 'ThSI: iceMaskmax=',iceMaskmax
254     WRITE(iUnit,*) 'ThSI: iceMaskmin=',iceMaskmin
255     WRITE(iUnit,*) 'ThSI: himin0 =',himin0
256     WRITE(iUnit,*) 'ThSI: frac_energy',frac_energy
257     WRITE(iUnit,*) 'ThSI: hihig =',hihig
258     WRITE(iUnit,*) 'ThSI: stressReduction =',stressReduction
259     WRITE(iUnit,*) 'ThSI: thSIce_deltaT =',thSIce_deltaT
260     WRITE(iUnit,*) 'ThSI: ocean_deltaT =',ocean_deltaT
261     WRITE(iUnit,*) 'ThSI: stepFwd_oceMxL=',stepFwd_oceMxL
262     WRITE(iUnit,*) 'ThSI: tauRelax_MxL =',tauRelax_MxL
263     WRITE(iUnit,*) 'ThSI: hMxL_default =',hMxL_default
264     WRITE(iUnit,*) 'ThSI: sMxL_default =',sMxL_default
265     WRITE(iUnit,*) 'ThSI: vMxL_default =',vMxL_default
266     WRITE(iUnit,*) 'ThSI: thSIce_taveFreq=',thSIce_taveFreq
267     WRITE(iUnit,*) 'ThSI: thSIce_diagFreq=',thSIce_diagFreq
268     WRITE(iUnit,*) 'ThSI: thSIce_monFreq =',thSIce_monFreq
269     WRITE(iUnit,*) 'ThSI: startIceModel =',startIceModel
270     IF (iUnit.NE.standardMessageUnit) CLOSE(iUnit)
271     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
272    
273     _END_MASTER(myThid)
274    
275     C-- Everyone else must wait for the parameters to be loaded
276     _BARRIER
277    
278     #endif /* ALLOW_THSICE */
279    
280     RETURN
281     END
282    

  ViewVC Help
Powered by ViewVC 1.1.22