1 |
C $Header: /u/gcmpack/MITgcm/pkg/thsice/thsice_ini_vars.F,v 1.16 2008/05/23 21:29:33 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 "THSICE_PARAMS.h" |
30 |
#include "THSICE_VARS.h" |
31 |
#ifdef ALLOW_AIM |
32 |
# include "AIM_FFIELDS.h" |
33 |
#endif |
34 |
|
35 |
C !INPUT/OUTPUT PARAMETERS: |
36 |
C == Routine arguments == |
37 |
C myThid :: My Thread Id. number |
38 |
INTEGER myThid |
39 |
CEOP |
40 |
|
41 |
#ifdef ALLOW_THSICE |
42 |
C == Local variables == |
43 |
C bi,bj :: Loop counters |
44 |
C i,j :: Loop counters |
45 |
INTEGER bi, bj |
46 |
INTEGER i, j |
47 |
INTEGER prec |
48 |
c CHARACTER*(MAX_LEN_FNAM) fn |
49 |
_RL v2Loc |
50 |
_RL Tf |
51 |
|
52 |
c set up ice arrays to zero if starting ice |
53 |
DO bj = myByLo(myThid), myByHi(myThid) |
54 |
DO bi = myBxLo(myThid), myBxHi(myThid) |
55 |
C- state variables : |
56 |
DO j=1-OLy,sNy+OLy |
57 |
DO i=1-OLx,sNx+OLx |
58 |
iceMask(i,j,bi,bj) = 0. _d 0 |
59 |
iceHeight(i,j,bi,bj)= 0. _d 0 |
60 |
snowHeight(i,j,bi,bj)=0. _d 0 |
61 |
Tsrf(i,j,bi,bj) = 0. _d 0 |
62 |
Tice1(i,j,bi,bj) = 0. _d 0 |
63 |
Tice2(i,j,bi,bj) = 0. _d 0 |
64 |
Qice1(i,j,bi,bj) = 0. _d 0 |
65 |
Qice2(i,j,bi,bj) = 0. _d 0 |
66 |
snowAge(i,j,bi,bj) = 0. _d 0 |
67 |
ENDDO |
68 |
ENDDO |
69 |
C- fluxes : |
70 |
DO j=1-OLy,sNy+OLy |
71 |
DO i=1-OLx,sNx+OLx |
72 |
sHeating(i,j,bi,bj) = 0. _d 0 |
73 |
flxCndBt(i,j,bi,bj) = 0. _d 0 |
74 |
snowPrc(i,j,bi,bj) = 0. _d 0 |
75 |
siceAlb(i,j,bi,bj) = 0. _d 0 |
76 |
icFlxSW (i,j,bi,bj) = 0. _d 0 |
77 |
icFlxAtm(i,j,bi,bj) = 0. _d 0 |
78 |
icFrwAtm(i,j,bi,bj) = 0. _d 0 |
79 |
C- needed when using advection/diffusion: |
80 |
oceFWfx(i,j,bi,bj) = 0. _d 0 |
81 |
oceSflx(i,j,bi,bj) = 0. _d 0 |
82 |
oceQnet(i,j,bi,bj) = 0. _d 0 |
83 |
ENDDO |
84 |
ENDDO |
85 |
C- oceanic mixed layer state : |
86 |
v2Loc = vMxL_default*vMxL_default |
87 |
DO j=1-OLy,sNy+OLy |
88 |
DO i=1-OLx,sNx+OLx |
89 |
hOceMxL(i,j,bi,bj) = hMxL_default |
90 |
tOceMxL(i,j,bi,bj) = 0. _d 0 |
91 |
sOceMxL(i,j,bi,bj) = sMxL_default |
92 |
v2ocMxL(i,j,bi,bj) = v2Loc |
93 |
ENDDO |
94 |
ENDDO |
95 |
#ifdef ALLOW_AIM |
96 |
IF ( useAIM ) THEN |
97 |
C- Mask mixed layer depth : depth is used in thsice slab_ocean |
98 |
C and this mask is used in thsice_advdiff and if coupled |
99 |
DO j=1-OLy,sNy+OLy |
100 |
DO i=1-OLx,sNx+OLx |
101 |
IF ( aim_landFr(i,j,bi,bj).EQ.1. _d 0 ) |
102 |
& hOceMxL(i,j,bi,bj) = 0. |
103 |
ENDDO |
104 |
ENDDO |
105 |
ENDIF |
106 |
#endif /* ALLOW_AIM */ |
107 |
ENDDO |
108 |
ENDDO |
109 |
|
110 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
111 |
|
112 |
IF ( startIceModel.LE.0 .AND. nIter0.NE.0 ) THEN |
113 |
C-- Read ice pickup fields |
114 |
_BARRIER |
115 |
prec=precFloat64 |
116 |
CALL THSICE_READ_PICKUP( prec, nIter0, myThid ) |
117 |
|
118 |
ELSE |
119 |
C-- Read initial conditions: |
120 |
_BARRIER |
121 |
IF ( thSIceFract_InitFile .NE. ' ' ) THEN |
122 |
CALL READ_REC_XY_RL(thSIceFract_InitFile,iceMask,1,0,myThid) |
123 |
ENDIF |
124 |
IF ( thSIceThick_InitFile .NE. ' ' ) THEN |
125 |
CALL READ_REC_XY_RL(thSIceThick_InitFile,iceHeight,1,0,myThid) |
126 |
ENDIF |
127 |
IF ( thSIceSnowH_InitFile .NE. ' ' ) THEN |
128 |
CALL READ_REC_XY_RL(thSIceSnowH_InitFile,snowHeight,1,0,myThid) |
129 |
ENDIF |
130 |
IF ( thSIceSnowA_InitFile .NE. ' ' ) THEN |
131 |
CALL READ_REC_XY_RL(thSIceSnowA_InitFile,snowAge,1,0,myThid) |
132 |
ENDIF |
133 |
IF ( thSIceEnthp_InitFile .NE. ' ' ) THEN |
134 |
CALL READ_REC_XY_RL(thSIceEnthp_InitFile,Qice1,1,0,myThid) |
135 |
CALL READ_REC_XY_RL(thSIceEnthp_InitFile,Qice2,2,0,myThid) |
136 |
ENDIF |
137 |
IF ( thSIceTsurf_InitFile .NE. ' ' ) THEN |
138 |
CALL READ_REC_XY_RS(thSIceTsurf_InitFile,Tsrf,1,0,myThid) |
139 |
ENDIF |
140 |
IF ( thSIceEnthp_InitFile .EQ. ' ' ) THEN |
141 |
_BARRIER |
142 |
C- enthalpy of new ice in J/kg, taken from thsice_extend.F with Tf beeing |
143 |
C the freezing Temp of seawater computed from a fixed salinity (31.5 psu) |
144 |
C Tf = -mu_Tf*salinity = -1.70 deg C; Qice1 ~ 3.2e5; Qice2 ~ 3.4e5 |
145 |
Tf = -1.70 _d 0 |
146 |
DO bj = myByLo(myThid), myByHi(myThid) |
147 |
DO bi = myBxLo(myThid), myBxHi(myThid) |
148 |
DO j=1-OLy,sNy+OLy |
149 |
DO i=1-OLx,sNx+OLx |
150 |
IF (iceMask(i,j,bi,bj) .NE. 0. _d 0) THEN |
151 |
Qice1(i,j,bi,bj) = -cpWater*Tmlt1 |
152 |
& + cpIce *(Tmlt1-Tf) + Lfresh*(1. _d 0-Tmlt1/Tf) |
153 |
Qice2(i,j,bi,bj) = -cpIce *Tf + Lfresh |
154 |
ENDIF |
155 |
ENDDO |
156 |
ENDDO |
157 |
ENDDO |
158 |
ENDDO |
159 |
ENDIF |
160 |
ENDIF |
161 |
|
162 |
_EXCH_XY_R8(iceMask,myThid) |
163 |
_EXCH_XY_R8(iceHeight, myThid) |
164 |
_EXCH_XY_R8(snowHeight,myThid) |
165 |
_EXCH_XY_R8(Tsrf, myThid) |
166 |
_EXCH_XY_R8(Tice1, myThid) |
167 |
_EXCH_XY_R8(Tice2, myThid) |
168 |
_EXCH_XY_R8(Qice1, myThid) |
169 |
_EXCH_XY_R8(Qice2, myThid) |
170 |
_EXCH_XY_R8(snowAge,myThid) |
171 |
|
172 |
C-- Initialise Sea-Ice Loading for SeaIce-Dynamics : |
173 |
IF ( useSEAICE ) THEN |
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 |
sIceLoad(i,j,bi,bj) = ( snowHeight(i,j,bi,bj)*rhos |
179 |
& + iceHeight(i,j,bi,bj)*rhoi |
180 |
& )*iceMask(i,j,bi,bj) |
181 |
ENDDO |
182 |
ENDDO |
183 |
ENDDO |
184 |
ENDDO |
185 |
ENDIF |
186 |
|
187 |
#endif /* ALLOW_THSICE */ |
188 |
|
189 |
RETURN |
190 |
END |