/[MITgcm]/MITgcm/pkg/thsice/thsice_ini_vars.F
ViewVC logotype

Contents of /MITgcm/pkg/thsice/thsice_ini_vars.F

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


Revision 1.13 - (show annotations) (download)
Thu May 22 15:54:37 2008 UTC (15 years, 11 months ago) by dimitri
Branch: MAIN
Changes since 1.12: +6 -2 lines
Changed snow thickness initialization because it is "actual" not "effective"
snow thickness.  Also added some comments.

1 C $Header: /u/gcmpack/MITgcm/pkg/thsice/thsice_ini_vars.F,v 1.12 2008/05/22 01:59:51 dimitri Exp $
2 C $Name: $
3
4 #include "THSICE_OPTIONS.h"
5 #ifdef ALLOW_AIM
6 # include "AIM_OPTIONS.h"
7 #endif
8
9 CBOP
10 C !ROUTINE: THSICE_INI_VARS
11 C !INTERFACE:
12 SUBROUTINE THSICE_INI_VARS( myThid )
13
14 C !DESCRIPTION: \bv
15 C *==========================================================*
16 C | S/R THSICE_INI_VARS
17 C | o initialize THermo_SeaICE variables
18 C *==========================================================*
19 C \ev
20
21 C !USES:
22 IMPLICIT NONE
23
24 C === Global variables ===
25 #include "SIZE.h"
26 #include "EEPARAMS.h"
27 #include "PARAMS.h"
28 #include "FFIELDS.h"
29 #include "DYNVARS.h"
30 #include "THSICE_PARAMS.h"
31 #include "THSICE_VARS.h"
32 #ifdef ALLOW_AIM
33 # include "AIM_FFIELDS.h"
34 #endif
35
36 C !INPUT/OUTPUT PARAMETERS:
37 C == Routine arguments ==
38 C myThid :: My Thread Id. number
39 INTEGER myThid
40 CEOP
41
42 #ifdef ALLOW_THSICE
43 C == Local variables ==
44 C bi,bj :: Loop counters
45 C i,j :: Loop counters
46 INTEGER bi, bj
47 INTEGER i, j
48 INTEGER prec
49 c CHARACTER*(MAX_LEN_FNAM) fn
50 _RL v2Loc
51
52
53 c set up ice arrays to zero if starting ice
54 DO bj = myByLo(myThid), myByHi(myThid)
55 DO bi = myBxLo(myThid), myBxHi(myThid)
56 C- state variables :
57 DO j=1-OLy,sNy+OLy
58 DO i=1-OLx,sNx+OLx
59 iceMask(i,j,bi,bj) = 0. _d 0
60 iceHeight(i,j,bi,bj)= 0. _d 0
61 snowHeight(i,j,bi,bj)=0. _d 0
62 Tsrf(i,j,bi,bj) = 0. _d 0
63 Tice1(i,j,bi,bj) = 0. _d 0
64 Tice2(i,j,bi,bj) = 0. _d 0
65 Qice1(i,j,bi,bj) = 0. _d 0
66 Qice2(i,j,bi,bj) = 0. _d 0
67 snowAge(i,j,bi,bj) = 0. _d 0
68 ENDDO
69 ENDDO
70 C- fluxes :
71 DO j=1-OLy,sNy+OLy
72 DO i=1-OLx,sNx+OLx
73 sHeating(i,j,bi,bj) = 0. _d 0
74 flxCndBt(i,j,bi,bj) = 0. _d 0
75 snowPrc(i,j,bi,bj) = 0. _d 0
76 siceAlb(i,j,bi,bj) = 0. _d 0
77 icFlxSW (i,j,bi,bj) = 0. _d 0
78 icFlxAtm(i,j,bi,bj) = 0. _d 0
79 icFrwAtm(i,j,bi,bj) = 0. _d 0
80 C- needed when using advection/diffusion:
81 oceFWfx(i,j,bi,bj) = 0. _d 0
82 oceSflx(i,j,bi,bj) = 0. _d 0
83 oceQnet(i,j,bi,bj) = 0. _d 0
84 ENDDO
85 ENDDO
86 C- oceanic mixed layer state :
87 v2Loc = vMxL_default*vMxL_default
88 DO j=1-OLy,sNy+OLy
89 DO i=1-OLx,sNx+OLx
90 hOceMxL(i,j,bi,bj) = hMxL_default
91 tOceMxL(i,j,bi,bj) = 0. _d 0
92 sOceMxL(i,j,bi,bj) = sMxL_default
93 v2ocMxL(i,j,bi,bj) = v2Loc
94 ENDDO
95 ENDDO
96 #ifdef ALLOW_AIM
97 IF ( useAIM ) THEN
98 C- Mask mixed layer depth : depth is used in thsice slab_ocean
99 C and this mask is used in thsice_advdiff and if coupled
100 DO j=1-OLy,sNy+OLy
101 DO i=1-OLx,sNx+OLx
102 IF ( aim_landFr(i,j,bi,bj).EQ.1. _d 0 )
103 & hOceMxL(i,j,bi,bj) = 0.
104 ENDDO
105 ENDDO
106 ENDIF
107 #endif /* ALLOW_AIM */
108 ENDDO
109 ENDDO
110
111 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
112
113 IF ( startIceModel.LE.0 .AND. nIter0.NE.0 ) THEN
114 C-- Read ice pickup fields
115 _BARRIER
116 prec=precFloat64
117 CALL THSICE_READ_PICKUP( prec, nIter0, myThid )
118
119 ELSE
120 C-- Read initial conditions:
121 _BEGIN_MASTER( myThid )
122 IF ( thSIceThick_InitFile .NE. ' ' ) THEN
123 CALL READ_REC_XY_RL(thSIceThick_InitFile,iceHeight,1,0,myThid)
124 ENDIF
125 IF ( thSIceFract_InitFile .NE. ' ' ) THEN
126 CALL READ_REC_XY_RL(thSIceFract_InitFile,iceMask,1,0,myThid)
127 ELSE
128 C default to 100% ice concentration when thickness is non-zero
129 DO bj = myByLo(myThid), myByHi(myThid)
130 DO bi = myBxLo(myThid), myBxHi(myThid)
131 DO j=1-OLy,sNy+OLy
132 DO i=1-OLx,sNx+OLx
133 IF (iceHeight(i,j,bi,bj) .NE. 0. _d 0)
134 & iceMask(i,j,bi,bj) = 1. _d 0
135 ENDDO
136 ENDDO
137 ENDDO
138 ENDDO
139 ENDIF
140 IF ( thSIceSnowH_InitFile .NE. ' ' ) THEN
141 CALL READ_REC_XY_RL(thSIceSnowH_InitFile,snowHeight,1,0,myThid)
142 ELSE
143 C default to <= 20 cm snow thickness where there is ice
144 DO bj = myByLo(myThid), myByHi(myThid)
145 DO bi = myBxLo(myThid), myBxHi(myThid)
146 DO j=1-OLy,sNy+OLy
147 DO i=1-OLx,sNx+OLx
148 snowHeight(i,j,bi,bj) = 0.2 _d 0
149 ENDDO
150 ENDDO
151 ENDDO
152 ENDDO
153 ENDIF
154 IF ( thSIceSnowA_InitFile .NE. ' ' ) THEN
155 CALL READ_REC_XY_RL(thSIceSnowA_InitFile,snowAge,1,0,myThid)
156 ELSE
157 C default to 3 days for snow age
158 DO bj = myByLo(myThid), myByHi(myThid)
159 DO bi = myBxLo(myThid), myBxHi(myThid)
160 DO j=1-OLy,sNy+OLy
161 DO i=1-OLx,sNx+OLx
162 IF (snowHeight(i,j,bi,bj) .NE. 0. _d 0)
163 & snowAge(i,j,bi,bj) = 259200. _d 0
164 ENDDO
165 ENDDO
166 ENDDO
167 ENDDO
168 ENDIF
169 IF ( thSIceEnthp_InitFile .NE. ' ' ) THEN
170 CALL READ_REC_XY_RL(thSIceEnthp_InitFile,Qice1,1,0,myThid)
171 CALL READ_REC_XY_RL(thSIceEnthp_InitFile,Qice2,2,0,myThid)
172 ELSE
173 C default to 3.4e5 J/kg for enthalpy where there is sea ice
174 DO bj = myByLo(myThid), myByHi(myThid)
175 DO bi = myBxLo(myThid), myBxHi(myThid)
176 DO j=1-OLy,sNy+OLy
177 DO i=1-OLx,sNx+OLx
178 IF (iceMask(i,j,bi,bj) .NE. 0. _d 0) THEN
179 Qice1(i,j,bi,bj) = 3.4 _d 5
180 Qice2(i,j,bi,bj) = 3.4 _d 5
181 ENDIF
182 ENDDO
183 ENDDO
184 ENDDO
185 ENDDO
186 ENDIF
187 IF ( thSIceTsurf_InitFile .NE. ' ' ) THEN
188 CALL READ_REC_XY_RS(thSIceTsurf_InitFile,Tsrf,1,0,myThid)
189 ENDIF
190 _END_MASTER(myThid)
191 ENDIF
192
193 _EXCH_XY_R8(iceMask,myThid)
194 _EXCH_XY_R8(iceHeight, myThid)
195 _EXCH_XY_R8(snowHeight,myThid)
196 _EXCH_XY_R8(Tsrf, myThid)
197 _EXCH_XY_R8(Tice1, myThid)
198 _EXCH_XY_R8(Tice2, myThid)
199 _EXCH_XY_R8(Qice1, myThid)
200 _EXCH_XY_R8(Qice2, myThid)
201 _EXCH_XY_R8(snowAge,myThid)
202
203 C-- Initialise Sea-Ice Loading for SeaIce-Dynamics :
204 IF ( useSEAICE ) THEN
205 DO bj = myByLo(myThid), myByHi(myThid)
206 DO bi = myBxLo(myThid), myBxHi(myThid)
207 DO j=1-OLy,sNy+OLy
208 DO i=1-OLx,sNx+OLx
209 sIceLoad(i,j,bi,bj) = ( snowHeight(i,j,bi,bj)*rhos
210 & + iceHeight(i,j,bi,bj)*rhoi
211 & )*iceMask(i,j,bi,bj)
212 ENDDO
213 ENDDO
214 ENDDO
215 ENDDO
216 ENDIF
217
218 #endif /* ALLOW_THSICE */
219
220 RETURN
221 END

  ViewVC Help
Powered by ViewVC 1.1.22