2 |
C $Name$ |
C $Name$ |
3 |
|
|
4 |
#include "THSICE_OPTIONS.h" |
#include "THSICE_OPTIONS.h" |
5 |
|
#ifdef ALLOW_AIM |
6 |
|
# include "AIM_OPTIONS.h" |
7 |
|
#endif |
8 |
|
|
9 |
CBOP |
CBOP |
10 |
C !ROUTINE: THSICE_INI_VARS |
C !ROUTINE: THSICE_INI_VARS |
25 |
#include "SIZE.h" |
#include "SIZE.h" |
26 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
27 |
#include "PARAMS.h" |
#include "PARAMS.h" |
|
#include "GRID.h" |
|
28 |
#include "FFIELDS.h" |
#include "FFIELDS.h" |
29 |
|
#include "DYNVARS.h" |
30 |
#include "THSICE_PARAMS.h" |
#include "THSICE_PARAMS.h" |
31 |
#include "THSICE_VARS.h" |
#include "THSICE_VARS.h" |
32 |
|
#ifdef ALLOW_AIM |
33 |
|
# include "AIM_FFIELDS.h" |
34 |
|
#endif |
35 |
|
|
36 |
C !INPUT/OUTPUT PARAMETERS: |
C !INPUT/OUTPUT PARAMETERS: |
37 |
C == Routine arguments == |
C == Routine arguments == |
38 |
C myThid - Number of this instance of INI_RBCS |
C myThid :: My Thread Id. number |
39 |
INTEGER myThid |
INTEGER myThid |
40 |
CEOP |
CEOP |
41 |
|
|
44 |
C bi,bj :: Loop counters |
C bi,bj :: Loop counters |
45 |
C i,j :: Loop counters |
C i,j :: Loop counters |
46 |
INTEGER bi, bj |
INTEGER bi, bj |
47 |
INTEGER I, J |
INTEGER i, j |
48 |
INTEGER prec |
INTEGER prec |
49 |
c CHARACTER*(MAX_LEN_FNAM) fn |
c CHARACTER*(MAX_LEN_FNAM) fn |
50 |
_RL v2Loc |
_RL v2Loc |
51 |
|
|
52 |
|
|
53 |
c set up ice arrays to zero if starting ice |
c set up ice arrays to zero if starting ice |
54 |
DO bj = myByLo(myThid), myByHi(myThid) |
DO bj = myByLo(myThid), myByHi(myThid) |
55 |
DO bi = myBxLo(myThid), myBxHi(myThid) |
DO bi = myBxLo(myThid), myBxHi(myThid) |
56 |
C- state variables : |
C- state variables : |
57 |
DO j=1-OLy,sNy+OLy |
DO j=1-OLy,sNy+OLy |
58 |
DO i=1-OLx,sNx+OLx |
DO i=1-OLx,sNx+OLx |
74 |
flxCndBt(i,j,bi,bj) = 0. _d 0 |
flxCndBt(i,j,bi,bj) = 0. _d 0 |
75 |
snowPrc(i,j,bi,bj) = 0. _d 0 |
snowPrc(i,j,bi,bj) = 0. _d 0 |
76 |
siceAlb(i,j,bi,bj) = 0. _d 0 |
siceAlb(i,j,bi,bj) = 0. _d 0 |
|
#ifdef COUPLE_MODEL |
|
|
dFdT(i,j,bi,bj) = 0. _d 0 |
|
|
#endif |
|
77 |
icFlxSW (i,j,bi,bj) = 0. _d 0 |
icFlxSW (i,j,bi,bj) = 0. _d 0 |
78 |
icFlxAtm(i,j,bi,bj) = 0. _d 0 |
icFlxAtm(i,j,bi,bj) = 0. _d 0 |
79 |
icFrwAtm(i,j,bi,bj) = 0. _d 0 |
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 |
ENDDO |
85 |
ENDDO |
ENDDO |
86 |
C- oceanic mixed layer state : |
C- oceanic mixed layer state : |
93 |
v2ocMxL(i,j,bi,bj) = v2Loc |
v2ocMxL(i,j,bi,bj) = v2Loc |
94 |
ENDDO |
ENDDO |
95 |
ENDDO |
ENDDO |
96 |
ENDDO |
#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 |
ENDDO |
109 |
|
ENDDO |
110 |
|
|
111 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
112 |
|
|
119 |
ELSE |
ELSE |
120 |
C-- Read initial conditions: |
C-- Read initial conditions: |
121 |
_BEGIN_MASTER( myThid ) |
_BEGIN_MASTER( myThid ) |
|
IF ( thSIceFract_InitFile .NE. ' ' ) THEN |
|
|
CALL READ_REC_XY_RL(thSIceFract_InitFile,iceMask,1,0,myThid) |
|
|
ENDIF |
|
122 |
IF ( thSIceThick_InitFile .NE. ' ' ) THEN |
IF ( thSIceThick_InitFile .NE. ' ' ) THEN |
123 |
CALL READ_REC_XY_RL(thSIceThick_InitFile,iceHeight,1,0,myThid) |
CALL READ_REC_XY_RL(thSIceThick_InitFile,iceHeight,1,0,myThid) |
124 |
ENDIF |
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 |
IF ( thSIceSnowH_InitFile .NE. ' ' ) THEN |
141 |
CALL READ_REC_XY_RL(thSIceSnowH_InitFile,snowHeight,1,0,myThid) |
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 |
ENDIF |
154 |
IF ( thSIceSnowA_InitFile .NE. ' ' ) THEN |
IF ( thSIceSnowA_InitFile .NE. ' ' ) THEN |
155 |
CALL READ_REC_XY_RL(thSIceSnowA_InitFile,snowAge,1,0,myThid) |
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 |
ENDIF |
169 |
IF ( thSIceEnthp_InitFile .NE. ' ' ) THEN |
IF ( thSIceEnthp_InitFile .NE. ' ' ) THEN |
170 |
CALL READ_REC_XY_RL(thSIceEnthp_InitFile,Qice1,1,0,myThid) |
CALL READ_REC_XY_RL(thSIceEnthp_InitFile,Qice1,1,0,myThid) |
171 |
CALL READ_REC_XY_RL(thSIceEnthp_InitFile,Qice2,2,0,myThid) |
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 |
ENDIF |
187 |
IF ( thSIceTsurf_InitFile .NE. ' ' ) THEN |
IF ( thSIceTsurf_InitFile .NE. ' ' ) THEN |
188 |
CALL READ_REC_XY_RS(thSIceTsurf_InitFile,Tsrf,1,0,myThid) |
CALL READ_REC_XY_RS(thSIceTsurf_InitFile,Tsrf,1,0,myThid) |
199 |
_EXCH_XY_R8(Qice1, myThid) |
_EXCH_XY_R8(Qice1, myThid) |
200 |
_EXCH_XY_R8(Qice2, myThid) |
_EXCH_XY_R8(Qice2, myThid) |
201 |
_EXCH_XY_R8(snowAge,myThid) |
_EXCH_XY_R8(snowAge,myThid) |
|
#ifdef COUPLE_MODEL |
|
|
_EXCH_XY_R8(dFdT, myThid) |
|
|
#endif |
|
202 |
|
|
|
#ifdef ATMOSPHERIC_LOADING |
|
203 |
C-- Initialise Sea-Ice Loading for SeaIce-Dynamics : |
C-- Initialise Sea-Ice Loading for SeaIce-Dynamics : |
204 |
IF ( useSEAICE ) THEN |
IF ( useSEAICE ) THEN |
205 |
DO bj = myByLo(myThid), myByHi(myThid) |
DO bj = myByLo(myThid), myByHi(myThid) |
214 |
ENDDO |
ENDDO |
215 |
ENDDO |
ENDDO |
216 |
ENDIF |
ENDIF |
|
#endif /* ATMOSPHERIC_LOADING */ |
|
217 |
|
|
218 |
#endif /* ALLOW_THSICE */ |
#endif /* ALLOW_THSICE */ |
219 |
|
|