1 |
gforget |
1.142 |
C $Header: /u/gcmpack/MITgcm/pkg/seaice/seaice_growth.F,v 1.141 2011/12/14 23:03:12 gforget Exp $ |
2 |
jmc |
1.91 |
C $Name: $ |
3 |
|
|
|
4 |
dimitri |
1.69 |
#include "SEAICE_OPTIONS.h" |
5 |
|
|
|
6 |
|
|
CBOP |
7 |
|
|
C !ROUTINE: SEAICE_GROWTH |
8 |
|
|
C !INTERFACE: |
9 |
|
|
SUBROUTINE SEAICE_GROWTH( myTime, myIter, myThid ) |
10 |
|
|
C !DESCRIPTION: \bv |
11 |
|
|
C *==========================================================* |
12 |
|
|
C | SUBROUTINE seaice_growth |
13 |
|
|
C | o Updata ice thickness and snow depth |
14 |
|
|
C *==========================================================* |
15 |
|
|
C \ev |
16 |
|
|
|
17 |
|
|
C !USES: |
18 |
|
|
IMPLICIT NONE |
19 |
|
|
C === Global variables === |
20 |
|
|
#include "SIZE.h" |
21 |
|
|
#include "EEPARAMS.h" |
22 |
|
|
#include "PARAMS.h" |
23 |
|
|
#include "DYNVARS.h" |
24 |
|
|
#include "GRID.h" |
25 |
|
|
#include "FFIELDS.h" |
26 |
heimbach |
1.117 |
#include "SEAICE_SIZE.h" |
27 |
dimitri |
1.69 |
#include "SEAICE_PARAMS.h" |
28 |
|
|
#include "SEAICE.h" |
29 |
heimbach |
1.117 |
#include "SEAICE_TRACER.h" |
30 |
dimitri |
1.69 |
#ifdef ALLOW_EXF |
31 |
|
|
# include "EXF_OPTIONS.h" |
32 |
|
|
# include "EXF_FIELDS.h" |
33 |
|
|
# include "EXF_PARAM.h" |
34 |
|
|
#endif |
35 |
|
|
#ifdef ALLOW_SALT_PLUME |
36 |
|
|
# include "SALT_PLUME.h" |
37 |
|
|
#endif |
38 |
|
|
#ifdef ALLOW_AUTODIFF_TAMC |
39 |
|
|
# include "tamc.h" |
40 |
|
|
#endif |
41 |
|
|
|
42 |
|
|
C !INPUT/OUTPUT PARAMETERS: |
43 |
|
|
C === Routine arguments === |
44 |
|
|
C myTime :: Simulation time |
45 |
|
|
C myIter :: Simulation timestep number |
46 |
|
|
C myThid :: Thread no. that called this routine. |
47 |
|
|
_RL myTime |
48 |
|
|
INTEGER myIter, myThid |
49 |
|
|
|
50 |
jmc |
1.104 |
C !FUNCTIONS: |
51 |
|
|
#ifdef ALLOW_DIAGNOSTICS |
52 |
|
|
LOGICAL DIAGNOSTICS_IS_ON |
53 |
|
|
EXTERNAL DIAGNOSTICS_IS_ON |
54 |
|
|
#endif |
55 |
|
|
|
56 |
dimitri |
1.69 |
C !LOCAL VARIABLES: |
57 |
|
|
C === Local variables === |
58 |
gforget |
1.89 |
C |
59 |
jmc |
1.91 |
C unit/sign convention: |
60 |
|
|
C Within the thermodynamic computation all stocks, except HSNOW, |
61 |
gforget |
1.89 |
C are in 'effective ice meters' units, and >0 implies more ice. |
62 |
jmc |
1.91 |
C This holds for stocks due to ocean and atmosphere heat, |
63 |
|
|
C at the outset of 'PART 2: determine heat fluxes/stocks' |
64 |
gforget |
1.89 |
C and until 'PART 7: determine ocean model forcing' |
65 |
|
|
C This strategy minimizes the need for multiplications/divisions |
66 |
jmc |
1.91 |
C by ice fraction, heat capacity, etc. The only conversions that |
67 |
|
|
C occurs are for the HSNOW (in effective snow meters) and |
68 |
|
|
C PRECIP (fresh water m/s). |
69 |
jmc |
1.104 |
C |
70 |
|
|
C HEFF is effective Hice thickness (m3/m2) |
71 |
|
|
C HSNOW is Heffective snow thickness (m3/m2) |
72 |
|
|
C HSALT is Heffective salt content (g/m2) |
73 |
|
|
C AREA is the seaice cover fraction (0<=AREA<=1) |
74 |
|
|
C Q denotes heat stocks -- converted to ice stocks (m3/m2) early on |
75 |
|
|
C |
76 |
|
|
C For all other stocks/increments, such as d_HEFFbyATMonOCN |
77 |
|
|
C or a_QbyATM_cover, the naming convention is as follows: |
78 |
|
|
C The prefix 'a_' means available, the prefix 'd_' means delta |
79 |
|
|
C (i.e. increment), and the prefix 'r_' means residual. |
80 |
|
|
C The suffix '_cover' denotes a value for the ice covered fraction |
81 |
|
|
C of the grid cell, whereas '_open' is for the open water fraction. |
82 |
|
|
C The main part of the name states what ice/snow stock is concerned |
83 |
|
|
C (e.g. QbyATM or HEFF), and how it is affected (e.g. d_HEFFbyATMonOCN |
84 |
|
|
C is the increment of HEFF due to the ATMosphere extracting heat from the |
85 |
|
|
C OCeaN surface, or providing heat to the OCeaN surface). |
86 |
gforget |
1.89 |
|
87 |
|
|
CEOP |
88 |
dimitri |
1.69 |
C i,j,bi,bj :: Loop counters |
89 |
|
|
INTEGER i, j, bi, bj |
90 |
|
|
C number of surface interface layer |
91 |
|
|
INTEGER kSurface |
92 |
|
|
C constants |
93 |
gforget |
1.80 |
_RL TBC, ICE2SNOW |
94 |
mlosch |
1.101 |
_RL QI, QS |
95 |
dimitri |
1.69 |
|
96 |
jmc |
1.91 |
C a_QbyATM_cover :: available heat (in W/m^2) due to the interaction of |
97 |
gforget |
1.75 |
C the atmosphere and the ocean surface - for ice covered water |
98 |
gforget |
1.89 |
C a_QbyATM_open :: same but for open water |
99 |
gforget |
1.84 |
C r_QbyATM_cover :: residual of a_QbyATM_cover after freezing/melting processes |
100 |
gforget |
1.89 |
C r_QbyATM_open :: same but for open water |
101 |
gforget |
1.76 |
_RL a_QbyATM_cover (1:sNx,1:sNy) |
102 |
|
|
_RL a_QbyATM_open (1:sNx,1:sNy) |
103 |
|
|
_RL r_QbyATM_cover (1:sNx,1:sNy) |
104 |
mlosch |
1.109 |
_RL r_QbyATM_open (1:sNx,1:sNy) |
105 |
gforget |
1.75 |
C a_QSWbyATM_open - short wave heat flux over ocean in W/m^2 |
106 |
|
|
C a_QSWbyATM_cover - short wave heat flux under ice in W/m^2 |
107 |
gforget |
1.76 |
_RL a_QSWbyATM_open (1:sNx,1:sNy) |
108 |
|
|
_RL a_QSWbyATM_cover (1:sNx,1:sNy) |
109 |
jmc |
1.91 |
C a_QbyOCN :: available heat (in in W/m^2) due to the |
110 |
gforget |
1.76 |
C interaction of the ice pack and the ocean surface |
111 |
jmc |
1.91 |
C r_QbyOCN :: residual of a_QbyOCN after freezing/melting |
112 |
gforget |
1.75 |
C processes have been accounted for |
113 |
gforget |
1.84 |
_RL a_QbyOCN (1:sNx,1:sNy) |
114 |
|
|
_RL r_QbyOCN (1:sNx,1:sNy) |
115 |
gforget |
1.76 |
|
116 |
jmc |
1.104 |
C conversion factors to go from Q (W/m2) to HEFF (ice meters) |
117 |
gforget |
1.76 |
_RL convertQ2HI, convertHI2Q |
118 |
jmc |
1.104 |
C conversion factors to go from precip (m/s) unit to HEFF (ice meters) |
119 |
gforget |
1.76 |
_RL convertPRECIP2HI, convertHI2PRECIP |
120 |
gforget |
1.75 |
|
121 |
jmc |
1.104 |
C ICE/SNOW stocks tendencies associated with the various melt/freeze processes |
122 |
dimitri |
1.113 |
_RL d_AREAbyATM (1:sNx,1:sNy) |
123 |
gforget |
1.112 |
_RL d_AREAbyOCN (1:sNx,1:sNy) |
124 |
dimitri |
1.113 |
_RL d_AREAbyICE (1:sNx,1:sNy) |
125 |
jmc |
1.104 |
|
126 |
dimitri |
1.113 |
c The change of mean ice thickness due to out-of-bounds values following |
127 |
|
|
c sea ice dyhnamics |
128 |
gforget |
1.87 |
_RL d_HEFFbyNEG (1:sNx,1:sNy) |
129 |
dimitri |
1.113 |
|
130 |
|
|
c The change of mean ice thickness due to turbulent ocean-sea ice heat fluxes |
131 |
|
|
_RL d_HEFFbyOCNonICE (1:sNx,1:sNy) |
132 |
|
|
|
133 |
jmc |
1.134 |
c The sum of mean ice thickness increments due to atmospheric fluxes over the open water |
134 |
dimitri |
1.114 |
c fraction and ice-covered fractions of the grid cell |
135 |
dimitri |
1.113 |
_RL d_HEFFbyATMonOCN (1:sNx,1:sNy) |
136 |
|
|
c The change of mean ice thickness due to flooding by snow |
137 |
gforget |
1.84 |
_RL d_HEFFbyFLOODING (1:sNx,1:sNy) |
138 |
jmc |
1.104 |
|
139 |
jmc |
1.134 |
c The mean ice thickness increments due to atmospheric fluxes over the open water |
140 |
dimitri |
1.114 |
c fraction and ice-covered fractions of the grid cell, respectively |
141 |
|
|
_RL d_HEFFbyATMonOCN_open(1:sNx,1:sNy) |
142 |
|
|
_RL d_HEFFbyATMonOCN_cover(1:sNx,1:sNy) |
143 |
|
|
|
144 |
gforget |
1.87 |
_RL d_HSNWbyNEG (1:sNx,1:sNy) |
145 |
dimitri |
1.113 |
_RL d_HSNWbyATMonSNW (1:sNx,1:sNy) |
146 |
|
|
_RL d_HSNWbyOCNonSNW (1:sNx,1:sNy) |
147 |
gforget |
1.84 |
_RL d_HSNWbyRAIN (1:sNx,1:sNy) |
148 |
jmc |
1.104 |
|
149 |
gforget |
1.84 |
_RL d_HFRWbyRAIN (1:sNx,1:sNy) |
150 |
mlosch |
1.109 |
C |
151 |
jmc |
1.134 |
C a_FWbySublim :: fresh water flux implied by latent heat of |
152 |
mlosch |
1.109 |
C sublimation to atmosphere, same sign convention |
153 |
|
|
C as EVAP (positive upward) |
154 |
|
|
_RL a_FWbySublim (1:sNx,1:sNy) |
155 |
gforget |
1.125 |
_RL r_FWbySublim (1:sNx,1:sNy) |
156 |
jmc |
1.134 |
#ifdef SEAICE_ADD_SUBLIMATION_TO_FWBUDGET |
157 |
mlosch |
1.109 |
_RL d_HEFFbySublim (1:sNx,1:sNy) |
158 |
|
|
_RL d_HSNWbySublim (1:sNx,1:sNy) |
159 |
ifenty |
1.136 |
#endif /* SEAICE_ADD_SUBLIMATION_TO_FWBUDGET */ |
160 |
|
|
|
161 |
|
|
C The latent heat flux which will sublimate all snow and ice |
162 |
|
|
C over one time step |
163 |
ifenty |
1.135 |
_RL latentHeatFluxMax (1:sNx,1:sNy) |
164 |
gforget |
1.71 |
|
165 |
gforget |
1.122 |
C actual ice thickness (with upper and lower limit) |
166 |
gforget |
1.83 |
_RL heffActual (1:sNx,1:sNy) |
167 |
dimitri |
1.69 |
C actual snow thickness |
168 |
gforget |
1.83 |
_RL hsnowActual (1:sNx,1:sNy) |
169 |
gforget |
1.122 |
C actual ice thickness (with lower limit only) Reciprocal |
170 |
|
|
_RL recip_heffActual (1:sNx,1:sNy) |
171 |
gforget |
1.123 |
C local value (=HO or HO_south) |
172 |
|
|
_RL HO_loc |
173 |
gforget |
1.87 |
|
174 |
|
|
C AREA_PRE :: hold sea-ice fraction field before any seaice-thermo update |
175 |
|
|
_RL AREApreTH (1:sNx,1:sNy) |
176 |
|
|
_RL HEFFpreTH (1:sNx,1:sNy) |
177 |
|
|
_RL HSNWpreTH (1:sNx,1:sNy) |
178 |
|
|
|
179 |
dimitri |
1.69 |
C wind speed |
180 |
gforget |
1.76 |
_RL UG (1:sNx,1:sNy) |
181 |
jmc |
1.104 |
#ifdef ALLOW_ATM_WIND |
182 |
dimitri |
1.69 |
_RL SPEED_SQ |
183 |
jmc |
1.104 |
#endif |
184 |
gforget |
1.96 |
|
185 |
ifenty |
1.131 |
C Regularization values squared |
186 |
|
|
_RL area_reg_sq, hice_reg_sq |
187 |
|
|
|
188 |
gforget |
1.96 |
C pathological cases thresholds |
189 |
gforget |
1.124 |
_RL heffTooHeavy |
190 |
dimitri |
1.69 |
|
191 |
ifenty |
1.135 |
_RL lhSublim |
192 |
|
|
|
193 |
jmc |
1.104 |
C temporary variables available for the various computations |
194 |
dimitri |
1.113 |
#ifdef SEAICE_GROWTH_LEGACY |
195 |
|
|
_RL tmpscal0 |
196 |
|
|
#endif |
197 |
|
|
_RL tmpscal1, tmpscal2, tmpscal3, tmpscal4 |
198 |
gforget |
1.76 |
_RL tmparr1 (1:sNx,1:sNy) |
199 |
gforget |
1.75 |
|
200 |
|
|
#ifdef ALLOW_SEAICE_FLOODING |
201 |
|
|
_RL hDraft |
202 |
|
|
#endif /* ALLOW_SEAICE_FLOODING */ |
203 |
jmc |
1.91 |
|
204 |
ifenty |
1.119 |
#ifdef SEAICE_VARIABLE_SALINITY |
205 |
gforget |
1.83 |
_RL saltFluxAdjust (1:sNx,1:sNy) |
206 |
gforget |
1.75 |
#endif |
207 |
|
|
|
208 |
mlosch |
1.98 |
INTEGER nDim |
209 |
dimitri |
1.69 |
#ifdef SEAICE_MULTICATEGORY |
210 |
mlosch |
1.98 |
INTEGER ilockey |
211 |
|
|
PARAMETER ( nDim = MULTDIM ) |
212 |
jmc |
1.104 |
INTEGER it |
213 |
|
|
_RL pFac |
214 |
|
|
_RL heffActualP (1:sNx,1:sNy) |
215 |
mlosch |
1.109 |
_RL a_QbyATMmult_cover (1:sNx,1:sNy) |
216 |
|
|
_RL a_QSWbyATMmult_cover(1:sNx,1:sNy) |
217 |
|
|
_RL a_FWbySublimMult (1:sNx,1:sNy) |
218 |
ifenty |
1.135 |
_RL latentHeatFluxMaxP (1:sNx,1:sNy) |
219 |
mlosch |
1.98 |
#else |
220 |
|
|
PARAMETER ( nDim = 1 ) |
221 |
|
|
#endif /* SEAICE_MULTICATEGORY */ |
222 |
dimitri |
1.69 |
|
223 |
gforget |
1.110 |
#ifdef MCPHEE_OCEAN_ICE_HEAT_FLUX |
224 |
jmc |
1.134 |
C Factor by which we increase the upper ocean friction velocity (u*) when |
225 |
dimitri |
1.113 |
C ice is absent in a grid cell (dimensionless) |
226 |
|
|
_RL MixedLayerTurbulenceFactor |
227 |
|
|
|
228 |
jmc |
1.134 |
c The Stanton number for the McPhee |
229 |
dimitri |
1.113 |
c ocean-ice heat flux parameterization (dimensionless) |
230 |
gforget |
1.110 |
_RL STANTON_NUMBER |
231 |
dimitri |
1.113 |
|
232 |
jmc |
1.134 |
c A typical friction velocity beneath sea ice for the |
233 |
dimitri |
1.113 |
c McPhee heat flux parameterization (m/s) |
234 |
gforget |
1.110 |
_RL USTAR_BASE |
235 |
dimitri |
1.113 |
|
236 |
|
|
_RL surf_theta |
237 |
gforget |
1.110 |
#endif |
238 |
|
|
|
239 |
gforget |
1.129 |
#ifdef ALLOW_SITRACER |
240 |
|
|
INTEGER iTr |
241 |
|
|
CHARACTER*8 diagName |
242 |
|
|
#endif |
243 |
dimitri |
1.69 |
#ifdef ALLOW_DIAGNOSTICS |
244 |
dimitri |
1.113 |
c Helper variables for diagnostics |
245 |
|
|
_RL DIAGarrayA (1:sNx,1:sNy) |
246 |
|
|
_RL DIAGarrayB (1:sNx,1:sNy) |
247 |
|
|
_RL DIAGarrayC (1:sNx,1:sNy) |
248 |
|
|
_RL DIAGarrayD (1:sNx,1:sNy) |
249 |
dimitri |
1.69 |
#endif |
250 |
|
|
|
251 |
jmc |
1.104 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
252 |
|
|
|
253 |
|
|
C =================================================================== |
254 |
|
|
C =================PART 0: constants and initializations============= |
255 |
|
|
C =================================================================== |
256 |
gforget |
1.88 |
|
257 |
dimitri |
1.69 |
IF ( buoyancyRelation .EQ. 'OCEANICP' ) THEN |
258 |
|
|
kSurface = Nr |
259 |
|
|
ELSE |
260 |
|
|
kSurface = 1 |
261 |
|
|
ENDIF |
262 |
|
|
|
263 |
ifenty |
1.131 |
|
264 |
jmc |
1.104 |
C Cutoff for iceload |
265 |
gforget |
1.92 |
heffTooHeavy=dRf(kSurface) / 5. _d 0 |
266 |
|
|
|
267 |
dimitri |
1.69 |
C FREEZING TEMP. OF SEA WATER (deg C) |
268 |
|
|
TBC = SEAICE_freeze |
269 |
gforget |
1.80 |
|
270 |
dimitri |
1.69 |
C RATIO OF SEA ICE DENSITY to SNOW DENSITY |
271 |
gforget |
1.80 |
ICE2SNOW = SEAICE_rhoIce/SEAICE_rhoSnow |
272 |
gforget |
1.85 |
|
273 |
dimitri |
1.69 |
C HEAT OF FUSION OF ICE (J/m^3) |
274 |
mlosch |
1.101 |
QI = SEAICE_rhoIce*SEAICE_lhFusion |
275 |
dimitri |
1.69 |
C HEAT OF FUSION OF SNOW (J/m^3) |
276 |
mlosch |
1.101 |
QS = SEAICE_rhoSnow*SEAICE_lhFusion |
277 |
ifenty |
1.131 |
|
278 |
ifenty |
1.135 |
C ICE LATENT HEAT CONSTANT |
279 |
|
|
lhSublim = SEAICE_lhEvap + SEAICE_lhFusion |
280 |
|
|
|
281 |
ifenty |
1.131 |
C regularization constants |
282 |
|
|
area_reg_sq = SEAICE_area_reg * SEAICE_area_reg |
283 |
|
|
hice_reg_sq = SEAICE_hice_reg * SEAICE_hice_reg |
284 |
gforget |
1.85 |
|
285 |
dimitri |
1.113 |
#ifdef MCPHEE_OCEAN_ICE_HEAT_FLUX |
286 |
jmc |
1.134 |
STANTON_NUMBER = 0.0056 _d 0 |
287 |
dimitri |
1.113 |
USTAR_BASE = 0.0125 _d 0 |
288 |
|
|
#endif |
289 |
|
|
|
290 |
jmc |
1.104 |
C conversion factors to go from Q (W/m2) to HEFF (ice meters) |
291 |
gforget |
1.84 |
convertQ2HI=SEAICE_deltaTtherm/QI |
292 |
gforget |
1.76 |
convertHI2Q=1/convertQ2HI |
293 |
jmc |
1.104 |
C conversion factors to go from precip (m/s) unit to HEFF (ice meters) |
294 |
gforget |
1.76 |
convertPRECIP2HI=SEAICE_deltaTtherm*rhoConstFresh/SEAICE_rhoIce |
295 |
|
|
convertHI2PRECIP=1./convertPRECIP2HI |
296 |
|
|
|
297 |
dimitri |
1.69 |
DO bj=myByLo(myThid),myByHi(myThid) |
298 |
|
|
DO bi=myBxLo(myThid),myBxHi(myThid) |
299 |
jmc |
1.104 |
|
300 |
dimitri |
1.69 |
#ifdef ALLOW_AUTODIFF_TAMC |
301 |
mlosch |
1.109 |
act1 = bi - myBxLo(myThid) |
302 |
|
|
max1 = myBxHi(myThid) - myBxLo(myThid) + 1 |
303 |
|
|
act2 = bj - myByLo(myThid) |
304 |
|
|
max2 = myByHi(myThid) - myByLo(myThid) + 1 |
305 |
|
|
act3 = myThid - 1 |
306 |
|
|
max3 = nTx*nTy |
307 |
|
|
act4 = ikey_dynamics - 1 |
308 |
|
|
iicekey = (act1 + 1) + act2*max1 |
309 |
|
|
& + act3*max1*max2 |
310 |
|
|
& + act4*max1*max2*max3 |
311 |
dimitri |
1.69 |
#endif /* ALLOW_AUTODIFF_TAMC */ |
312 |
gforget |
1.75 |
|
313 |
|
|
|
314 |
|
|
C array initializations |
315 |
|
|
C ===================== |
316 |
|
|
|
317 |
dimitri |
1.69 |
DO J=1,sNy |
318 |
|
|
DO I=1,sNx |
319 |
gforget |
1.90 |
a_QbyATM_cover (I,J) = 0.0 _d 0 |
320 |
|
|
a_QbyATM_open(I,J) = 0.0 _d 0 |
321 |
|
|
r_QbyATM_cover (I,J) = 0.0 _d 0 |
322 |
|
|
r_QbyATM_open (I,J) = 0.0 _d 0 |
323 |
jmc |
1.104 |
|
324 |
gforget |
1.71 |
a_QSWbyATM_open (I,J) = 0.0 _d 0 |
325 |
gforget |
1.90 |
a_QSWbyATM_cover (I,J) = 0.0 _d 0 |
326 |
jmc |
1.104 |
|
327 |
gforget |
1.90 |
a_QbyOCN (I,J) = 0.0 _d 0 |
328 |
|
|
r_QbyOCN (I,J) = 0.0 _d 0 |
329 |
jmc |
1.104 |
|
330 |
dimitri |
1.113 |
d_AREAbyATM(I,J) = 0.0 _d 0 |
331 |
|
|
d_AREAbyICE(I,J) = 0.0 _d 0 |
332 |
gforget |
1.112 |
d_AREAbyOCN(I,J) = 0.0 _d 0 |
333 |
jmc |
1.104 |
|
334 |
gforget |
1.123 |
d_HEFFbyNEG(I,J) = 0.0 _d 0 |
335 |
dimitri |
1.113 |
d_HEFFbyOCNonICE(I,J) = 0.0 _d 0 |
336 |
|
|
d_HEFFbyATMonOCN(I,J) = 0.0 _d 0 |
337 |
gforget |
1.84 |
d_HEFFbyFLOODING(I,J) = 0.0 _d 0 |
338 |
jmc |
1.104 |
|
339 |
dimitri |
1.114 |
d_HEFFbyATMonOCN_open(I,J) = 0.0 _d 0 |
340 |
|
|
d_HEFFbyATMonOCN_cover(I,J) = 0.0 _d 0 |
341 |
|
|
|
342 |
gforget |
1.123 |
d_HSNWbyNEG(I,J) = 0.0 _d 0 |
343 |
dimitri |
1.113 |
d_HSNWbyATMonSNW(I,J) = 0.0 _d 0 |
344 |
|
|
d_HSNWbyOCNonSNW(I,J) = 0.0 _d 0 |
345 |
gforget |
1.90 |
d_HSNWbyRAIN(I,J) = 0.0 _d 0 |
346 |
mlosch |
1.109 |
a_FWbySublim(I,J) = 0.0 _d 0 |
347 |
gforget |
1.125 |
r_FWbySublim(I,J) = 0.0 _d 0 |
348 |
jmc |
1.134 |
#ifdef SEAICE_ADD_SUBLIMATION_TO_FWBUDGET |
349 |
mlosch |
1.109 |
d_HEFFbySublim(I,J) = 0.0 _d 0 |
350 |
|
|
d_HSNWbySublim(I,J) = 0.0 _d 0 |
351 |
ifenty |
1.136 |
#endif /* SEAICE_ADD_SUBLIMATION_TO_FWBUDGET */ |
352 |
ifenty |
1.135 |
latentHeatFluxMax(I,J) = 0.0 _d 0 |
353 |
mlosch |
1.109 |
c |
354 |
gforget |
1.90 |
d_HFRWbyRAIN(I,J) = 0.0 _d 0 |
355 |
jmc |
1.104 |
|
356 |
gforget |
1.90 |
tmparr1(I,J) = 0.0 _d 0 |
357 |
jmc |
1.104 |
|
358 |
ifenty |
1.119 |
#ifdef SEAICE_VARIABLE_SALINITY |
359 |
gforget |
1.90 |
saltFluxAdjust(I,J) = 0.0 _d 0 |
360 |
dimitri |
1.69 |
#endif |
361 |
mlosch |
1.109 |
#ifdef SEAICE_MULTICATEGORY |
362 |
gforget |
1.90 |
a_QbyATMmult_cover(I,J) = 0.0 _d 0 |
363 |
|
|
a_QSWbyATMmult_cover(I,J) = 0.0 _d 0 |
364 |
mlosch |
1.109 |
a_FWbySublimMult(I,J) = 0.0 _d 0 |
365 |
ifenty |
1.135 |
latentHeatFluxMaxP(I,J) = 0.0 _d 0 |
366 |
mlosch |
1.109 |
#endif /* SEAICE_MULTICATEGORY */ |
367 |
dimitri |
1.69 |
ENDDO |
368 |
|
|
ENDDO |
369 |
gforget |
1.84 |
#ifdef ALLOW_MEAN_SFLUX_COST_CONTRIBUTION |
370 |
dimitri |
1.69 |
DO J=1-oLy,sNy+oLy |
371 |
|
|
DO I=1-oLx,sNx+oLx |
372 |
gforget |
1.90 |
frWtrAtm(I,J,bi,bj) = 0.0 _d 0 |
373 |
dimitri |
1.69 |
ENDDO |
374 |
|
|
ENDDO |
375 |
gforget |
1.84 |
#endif |
376 |
dimitri |
1.69 |
|
377 |
gforget |
1.87 |
|
378 |
jmc |
1.104 |
C ===================================================================== |
379 |
|
|
C ===========PART 1: treat pathological cases (post advdiff)=========== |
380 |
|
|
C ===================================================================== |
381 |
gforget |
1.88 |
|
382 |
jmc |
1.104 |
#ifdef SEAICE_GROWTH_LEGACY |
383 |
gforget |
1.88 |
|
384 |
jmc |
1.104 |
DO J=1,sNy |
385 |
|
|
DO I=1,sNx |
386 |
|
|
HEFFpreTH(I,J)=HEFFNM1(I,J,bi,bj) |
387 |
|
|
HSNWpreTH(I,J)=HSNOW(I,J,bi,bj) |
388 |
|
|
AREApreTH(I,J)=AREANM1(I,J,bi,bj) |
389 |
|
|
d_HEFFbyNEG(I,J)=0. _d 0 |
390 |
|
|
d_HSNWbyNEG(I,J)=0. _d 0 |
391 |
gforget |
1.128 |
#ifdef ALLOW_DIAGNOSTICS |
392 |
|
|
DIAGarrayA(I,J) = AREANM1(I,J,bi,bj) |
393 |
|
|
DIAGarrayB(I,J) = AREANM1(I,J,bi,bj) |
394 |
|
|
DIAGarrayC(I,J) = HEFFNM1(I,J,bi,bj) |
395 |
|
|
DIAGarrayD(I,J) = HSNOW(I,J,bi,bj) |
396 |
|
|
#endif |
397 |
jmc |
1.104 |
ENDDO |
398 |
|
|
ENDDO |
399 |
gforget |
1.88 |
|
400 |
jmc |
1.104 |
#else /* SEAICE_GROWTH_LEGACY */ |
401 |
gforget |
1.87 |
|
402 |
mlosch |
1.137 |
#if (defined ALLOW_AUTODIFF_TAMC && defined SEAICE_MODIFY_GROWTH_ADJ) |
403 |
gforget |
1.105 |
Cgf no dependency through pathological cases treatment |
404 |
mlosch |
1.137 |
IF ( SEAICEadjMODE.EQ.0 ) then |
405 |
gforget |
1.105 |
#endif |
406 |
|
|
|
407 |
jmc |
1.104 |
C 1) treat the case of negative values: |
408 |
gforget |
1.87 |
|
409 |
|
|
#ifdef ALLOW_AUTODIFF_TAMC |
410 |
gforget |
1.105 |
CADJ STORE heff(:,:,bi,bj) = comlev1_bibj, key = iicekey,byte=isbyte |
411 |
|
|
CADJ STORE hsnow(:,:,bi,bj) = comlev1_bibj, key = iicekey,byte=isbyte |
412 |
|
|
CADJ STORE area(:,:,bi,bj) = comlev1_bibj, key = iicekey,byte=isbyte |
413 |
gforget |
1.87 |
#endif /* ALLOW_AUTODIFF_TAMC */ |
414 |
|
|
DO J=1,sNy |
415 |
|
|
DO I=1,sNx |
416 |
gforget |
1.89 |
d_HEFFbyNEG(I,J)=MAX(-HEFF(I,J,bi,bj),0. _d 0) |
417 |
gforget |
1.87 |
HEFF(I,J,bi,bj)=HEFF(I,J,bi,bj)+d_HEFFbyNEG(I,J) |
418 |
gforget |
1.89 |
d_HSNWbyNEG(I,J)=MAX(-HSNOW(I,J,bi,bj),0. _d 0) |
419 |
gforget |
1.87 |
HSNOW(I,J,bi,bj)=HSNOW(I,J,bi,bj)+d_HSNWbyNEG(I,J) |
420 |
|
|
AREA(I,J,bi,bj)=MAX(AREA(I,J,bi,bj),0. _d 0) |
421 |
|
|
ENDDO |
422 |
|
|
ENDDO |
423 |
|
|
|
424 |
jmc |
1.104 |
C 1.25) treat the case of very thin ice: |
425 |
|
|
|
426 |
gforget |
1.92 |
#ifdef ALLOW_AUTODIFF_TAMC |
427 |
gforget |
1.105 |
CADJ STORE heff(:,:,bi,bj) = comlev1_bibj, key = iicekey,byte=isbyte |
428 |
gforget |
1.92 |
#endif /* ALLOW_AUTODIFF_TAMC */ |
429 |
|
|
DO J=1,sNy |
430 |
|
|
DO I=1,sNx |
431 |
mlosch |
1.140 |
tmpscal2=0. _d 0 |
432 |
|
|
tmpscal3=0. _d 0 |
433 |
gforget |
1.124 |
if (HEFF(I,J,bi,bj).LE.siEps) then |
434 |
gforget |
1.92 |
tmpscal2=-HEFF(I,J,bi,bj) |
435 |
|
|
tmpscal3=-HSNOW(I,J,bi,bj) |
436 |
gforget |
1.96 |
TICE(I,J,bi,bj)=celsius2K |
437 |
heimbach |
1.120 |
#ifdef SEAICE_AGE |
438 |
|
|
IceAgeTr(i,j,bi,bj,2)=0. _d 0 |
439 |
|
|
#endif /* SEAICE_AGE */ |
440 |
gforget |
1.92 |
endif |
441 |
|
|
HEFF(I,J,bi,bj)=HEFF(I,J,bi,bj)+tmpscal2 |
442 |
|
|
d_HEFFbyNEG(I,J)=d_HEFFbyNEG(I,J)+tmpscal2 |
443 |
|
|
HSNOW(I,J,bi,bj)=HSNOW(I,J,bi,bj)+tmpscal3 |
444 |
|
|
d_HSNWbyNEG(I,J)=d_HSNWbyNEG(I,J)+tmpscal3 |
445 |
|
|
ENDDO |
446 |
|
|
ENDDO |
447 |
|
|
|
448 |
jmc |
1.104 |
C 1.5) treat the case of area but no ice/snow: |
449 |
|
|
|
450 |
gforget |
1.90 |
#ifdef ALLOW_AUTODIFF_TAMC |
451 |
gforget |
1.105 |
CADJ STORE heff(:,:,bi,bj) = comlev1_bibj, key = iicekey,byte=isbyte |
452 |
|
|
CADJ STORE hsnow(:,:,bi,bj) = comlev1_bibj, key = iicekey,byte=isbyte |
453 |
gforget |
1.90 |
#endif /* ALLOW_AUTODIFF_TAMC */ |
454 |
|
|
DO J=1,sNy |
455 |
|
|
DO I=1,sNx |
456 |
|
|
IF ((HEFF(i,j,bi,bj).EQ.0. _d 0).AND. |
457 |
|
|
& (HSNOW(i,j,bi,bj).EQ.0. _d 0)) AREA(I,J,bi,bj)=0. _d 0 |
458 |
|
|
ENDDO |
459 |
|
|
ENDDO |
460 |
|
|
|
461 |
jmc |
1.104 |
C 2) treat the case of very small area: |
462 |
|
|
|
463 |
ifenty |
1.131 |
#ifndef DISABLE_AREA_FLOOR |
464 |
gforget |
1.87 |
#ifdef ALLOW_AUTODIFF_TAMC |
465 |
gforget |
1.105 |
CADJ STORE area(:,:,bi,bj) = comlev1_bibj, key = iicekey,byte=isbyte |
466 |
gforget |
1.87 |
#endif /* ALLOW_AUTODIFF_TAMC */ |
467 |
|
|
DO J=1,sNy |
468 |
|
|
DO I=1,sNx |
469 |
heimbach |
1.120 |
IF ((HEFF(i,j,bi,bj).GT.0).OR.(HSNOW(i,j,bi,bj).GT.0)) THEN |
470 |
|
|
#ifdef SEAICE_AGE |
471 |
ifenty |
1.131 |
IF (AREA(I,J,bi,bj).LT.SEAICE_area_floor) THEN |
472 |
heimbach |
1.120 |
IceAgeTr(i,j,bi,bj,1)=IceAgeTr(i,j,bi,bj,1) |
473 |
|
|
& + IceAgeTr(i,j,bi,bj,1) |
474 |
ifenty |
1.131 |
& *(SEAICE_area_floor-AREA(I,J,bi,bj)) / SEAICE_area_floor |
475 |
heimbach |
1.120 |
ENDIF |
476 |
|
|
#endif /* SEAICE_AGE */ |
477 |
ifenty |
1.131 |
AREA(I,J,bi,bj)=MAX(AREA(I,J,bi,bj),SEAICE_area_floor) |
478 |
heimbach |
1.120 |
ENDIF |
479 |
gforget |
1.87 |
ENDDO |
480 |
|
|
ENDDO |
481 |
ifenty |
1.131 |
#endif /* DISABLE_AREA_FLOOR */ |
482 |
gforget |
1.87 |
|
483 |
dimitri |
1.115 |
C 2.5) treat case of excessive ice cover, e.g., due to ridging: |
484 |
jmc |
1.104 |
|
485 |
gforget |
1.89 |
#ifdef ALLOW_AUTODIFF_TAMC |
486 |
gforget |
1.105 |
CADJ STORE area(:,:,bi,bj) = comlev1_bibj, key = iicekey,byte=isbyte |
487 |
gforget |
1.89 |
#endif /* ALLOW_AUTODIFF_TAMC */ |
488 |
|
|
DO J=1,sNy |
489 |
|
|
DO I=1,sNx |
490 |
gforget |
1.128 |
#ifdef ALLOW_DIAGNOSTICS |
491 |
|
|
DIAGarrayA(I,J) = AREA(I,J,bi,bj) |
492 |
|
|
#endif |
493 |
gforget |
1.127 |
#ifdef ALLOW_SITRACER |
494 |
|
|
SItrAREA(I,J,bi,bj,1)=AREA(I,J,bi,bj) |
495 |
|
|
#endif |
496 |
heimbach |
1.120 |
#ifdef SEAICE_AGE |
497 |
ifenty |
1.131 |
IF (AREA(I,J,bi,bj).GT.SEAICE_area_max) THEN |
498 |
heimbach |
1.120 |
IceAgeTr(i,j,bi,bj,1)=IceAgeTr(i,j,bi,bj,1) |
499 |
|
|
& - IceAgeTr(i,j,bi,bj,1) |
500 |
jmc |
1.134 |
& *(AREA(I,J,bi,bj)-SEAICE_area_max) / SEAICE_area_max |
501 |
heimbach |
1.120 |
ENDIF |
502 |
|
|
#endif /* SEAICE_AGE */ |
503 |
ifenty |
1.131 |
AREA(I,J,bi,bj)=MIN(AREA(I,J,bi,bj),SEAICE_area_max) |
504 |
gforget |
1.89 |
ENDDO |
505 |
|
|
ENDDO |
506 |
|
|
|
507 |
mlosch |
1.137 |
#if (defined ALLOW_AUTODIFF_TAMC && defined SEAICE_MODIFY_GROWTH_ADJ) |
508 |
|
|
ENDIF |
509 |
gforget |
1.105 |
#endif |
510 |
|
|
|
511 |
jmc |
1.104 |
C 3) store regularized values of heff, hsnow, area at the onset of thermo. |
512 |
gforget |
1.87 |
DO J=1,sNy |
513 |
|
|
DO I=1,sNx |
514 |
|
|
HEFFpreTH(I,J)=HEFF(I,J,bi,bj) |
515 |
|
|
HSNWpreTH(I,J)=HSNOW(I,J,bi,bj) |
516 |
|
|
AREApreTH(I,J)=AREA(I,J,bi,bj) |
517 |
gforget |
1.128 |
#ifdef ALLOW_DIAGNOSTICS |
518 |
|
|
DIAGarrayB(I,J) = AREA(I,J,bi,bj) |
519 |
|
|
DIAGarrayC(I,J) = HEFF(I,J,bi,bj) |
520 |
|
|
DIAGarrayD(I,J) = HSNOW(I,J,bi,bj) |
521 |
|
|
#endif |
522 |
gforget |
1.124 |
#ifdef ALLOW_SITRACER |
523 |
|
|
SItrHEFF(I,J,bi,bj,1)=HEFF(I,J,bi,bj) |
524 |
gforget |
1.127 |
SItrAREA(I,J,bi,bj,2)=AREA(I,J,bi,bj) |
525 |
gforget |
1.124 |
#endif |
526 |
gforget |
1.87 |
ENDDO |
527 |
|
|
ENDDO |
528 |
|
|
|
529 |
jmc |
1.104 |
C 4) treat sea ice salinity pathological cases |
530 |
ifenty |
1.119 |
#ifdef SEAICE_VARIABLE_SALINITY |
531 |
gforget |
1.87 |
#ifdef ALLOW_AUTODIFF_TAMC |
532 |
gforget |
1.105 |
CADJ STORE hsalt(:,:,bi,bj) = comlev1_bibj, key = iicekey,byte=isbyte |
533 |
|
|
CADJ STORE heff(:,:,bi,bj) = comlev1_bibj, key = iicekey,byte=isbyte |
534 |
gforget |
1.87 |
#endif /* ALLOW_AUTODIFF_TAMC */ |
535 |
|
|
DO J=1,sNy |
536 |
|
|
DO I=1,sNx |
537 |
|
|
IF ( (HSALT(I,J,bi,bj) .LT. 0.0).OR. |
538 |
|
|
& (HEFF(I,J,bi,bj) .EQ. 0.0) ) THEN |
539 |
|
|
saltFluxAdjust(I,J) = - HEFFM(I,J,bi,bj) * |
540 |
|
|
& HSALT(I,J,bi,bj) / SEAICE_deltaTtherm |
541 |
|
|
HSALT(I,J,bi,bj) = 0.0 _d 0 |
542 |
|
|
ENDIF |
543 |
|
|
ENDDO |
544 |
|
|
ENDDO |
545 |
ifenty |
1.119 |
#endif /* SEAICE_VARIABLE_SALINITY */ |
546 |
gforget |
1.87 |
|
547 |
jmc |
1.104 |
C 5) treat sea ice age pathological cases |
548 |
|
|
C ... |
549 |
heimbach |
1.120 |
|
550 |
|
|
#ifdef SEAICE_AGE |
551 |
|
|
|
552 |
|
|
#ifdef ALLOW_AUTODIFF_TAMC |
553 |
jmc |
1.134 |
CADJ STORE IceAgeTr(:,:,bi,bj,1) = comlev1_bibj, |
554 |
heimbach |
1.120 |
CADJ & key = iicekey,byte=isbyte |
555 |
jmc |
1.134 |
CADJ STORE IceAgeTr(:,:,bi,bj,2) = comlev1_bibj, |
556 |
heimbach |
1.120 |
CADJ & key = iicekey,byte=isbyte |
557 |
jmc |
1.134 |
CADJ STORE heff(:,:,bi,bj) = comlev1_bibj, |
558 |
heimbach |
1.120 |
CADJ & key = iicekey,byte=isbyte |
559 |
|
|
#endif /* ALLOW_AUTODIFF_TAMC */ |
560 |
|
|
DO J=1,sNy |
561 |
|
|
DO I=1,sNx |
562 |
|
|
IF (HEFF(i,j,bi,bj).EQ.0.) THEN |
563 |
|
|
IceAgeTr(i,j,bi,bj,1)=0. _d 0 |
564 |
|
|
IceAgeTr(i,j,bi,bj,2)=0. _d 0 |
565 |
|
|
ENDIF |
566 |
|
|
IF (IceAgeTr(i,j,bi,bj,1).LT.0.) IceAgeTr(i,j,bi,bj,1)=0. _d 0 |
567 |
|
|
IF (IceAgeTr(i,j,bi,bj,2).LT.0.) IceAgeTr(i,j,bi,bj,2)=0. _d 0 |
568 |
|
|
ENDDO |
569 |
|
|
ENDDO |
570 |
|
|
#endif /* SEAICE_AGE */ |
571 |
|
|
|
572 |
jmc |
1.104 |
#endif /* SEAICE_GROWTH_LEGACY */ |
573 |
jmc |
1.91 |
|
574 |
gforget |
1.128 |
#ifdef ALLOW_DIAGNOSTICS |
575 |
mlosch |
1.137 |
IF ( useDiagnostics ) THEN |
576 |
|
|
CALL DIAGNOSTICS_FILL(DIAGarrayA,'SIareaPR',0,1,3,bi,bj,myThid) |
577 |
|
|
CALL DIAGNOSTICS_FILL(DIAGarrayB,'SIareaPT',0,1,3,bi,bj,myThid) |
578 |
|
|
CALL DIAGNOSTICS_FILL(DIAGarrayC,'SIheffPT',0,1,3,bi,bj,myThid) |
579 |
|
|
CALL DIAGNOSTICS_FILL(DIAGarrayD,'SIhsnoPT',0,1,3,bi,bj,myThid) |
580 |
gforget |
1.129 |
#ifdef ALLOW_SITRACER |
581 |
mlosch |
1.137 |
DO iTr = 1, SItrMaxNum |
582 |
|
|
WRITE(diagName,'(A4,I2.2,A2)') 'SItr',iTr,'PT' |
583 |
|
|
if (SItrMate(iTr).EQ.'HEFF') then |
584 |
|
|
CALL DIAGNOSTICS_FRACT_FILL( |
585 |
|
|
I SItracer(1-OLx,1-OLy,bi,bj,iTr),HEFF(1-OLx,1-OLy,bi,bj), |
586 |
|
|
I ONE, 1, diagName,0,1,2,bi,bj,myThid ) |
587 |
|
|
else |
588 |
|
|
CALL DIAGNOSTICS_FRACT_FILL( |
589 |
|
|
I SItracer(1-OLx,1-OLy,bi,bj,iTr),AREA(1-OLx,1-OLy,bi,bj), |
590 |
|
|
I ONE, 1, diagName,0,1,2,bi,bj,myThid ) |
591 |
|
|
endif |
592 |
|
|
ENDDO |
593 |
gforget |
1.129 |
#endif |
594 |
mlosch |
1.137 |
ENDIF |
595 |
gforget |
1.128 |
#endif |
596 |
|
|
|
597 |
mlosch |
1.137 |
#if (defined ALLOW_AUTODIFF_TAMC && defined SEAICE_MODIFY_GROWTH_ADJ) |
598 |
gforget |
1.105 |
Cgf no additional dependency of air-sea fluxes to ice |
599 |
mlosch |
1.137 |
IF ( SEAICEadjMODE.GE.1 ) THEN |
600 |
|
|
DO J=1,sNy |
601 |
|
|
DO I=1,sNx |
602 |
|
|
HEFFpreTH(I,J) = 0. _d 0 |
603 |
|
|
HSNWpreTH(I,J) = 0. _d 0 |
604 |
|
|
AREApreTH(I,J) = 0. _d 0 |
605 |
|
|
ENDDO |
606 |
gforget |
1.105 |
ENDDO |
607 |
mlosch |
1.137 |
ENDIF |
608 |
gforget |
1.105 |
#endif |
609 |
dimitri |
1.69 |
|
610 |
jmc |
1.104 |
C 4) COMPUTE ACTUAL ICE/SNOW THICKNESS; USE MIN/MAX VALUES |
611 |
|
|
C TO REGULARIZE SEAICE_SOLVE4TEMP/d_AREA COMPUTATIONS |
612 |
dimitri |
1.69 |
|
613 |
|
|
#ifdef ALLOW_AUTODIFF_TAMC |
614 |
gforget |
1.105 |
CADJ STORE AREApreTH = comlev1_bibj, key = iicekey, byte = isbyte |
615 |
|
|
CADJ STORE HEFFpreTH = comlev1_bibj, key = iicekey, byte = isbyte |
616 |
|
|
CADJ STORE HSNWpreTH = comlev1_bibj, key = iicekey, byte = isbyte |
617 |
dimitri |
1.69 |
#endif /* ALLOW_AUTODIFF_TAMC */ |
618 |
|
|
DO J=1,sNy |
619 |
|
|
DO I=1,sNx |
620 |
ifenty |
1.131 |
|
621 |
mlosch |
1.137 |
IF (HEFFpreTH(I,J) .GT. ZERO) THEN |
622 |
gforget |
1.122 |
#ifdef SEAICE_GROWTH_LEGACY |
623 |
ifenty |
1.131 |
tmpscal1 = MAX(SEAICE_area_reg,AREApreTH(I,J)) |
624 |
|
|
hsnowActual(I,J) = HSNWpreTH(I,J)/tmpscal1 |
625 |
|
|
tmpscal2 = HEFFpreTH(I,J)/tmpscal1 |
626 |
|
|
heffActual(I,J) = MAX(tmpscal2,SEAICE_hice_reg) |
627 |
gforget |
1.122 |
#else |
628 |
ifenty |
1.131 |
cif regularize AREA with SEAICE_area_reg |
629 |
|
|
tmpscal1 = SQRT(AREApreTH(I,J)* AREApreTH(I,J) + area_reg_sq) |
630 |
|
|
|
631 |
jmc |
1.134 |
cif heffActual calculated with the regularized AREA |
632 |
ifenty |
1.131 |
tmpscal2 = HEFFpreTH(I,J) / tmpscal1 |
633 |
|
|
|
634 |
|
|
cif regularize heffActual with SEAICE_hice_reg (add lower bound) |
635 |
|
|
heffActual(I,J) = SQRT(tmpscal2 * tmpscal2 + hice_reg_sq) |
636 |
|
|
|
637 |
jmc |
1.134 |
cif hsnowActual calculated with the regularized AREA |
638 |
ifenty |
1.131 |
hsnowActual(I,J) = HSNWpreTH(I,J) / tmpscal1 |
639 |
gforget |
1.122 |
#endif |
640 |
ifenty |
1.131 |
|
641 |
jmc |
1.134 |
cif regularize the inverse of heffActual by hice_reg |
642 |
ifenty |
1.131 |
recip_heffActual(I,J) = AREApreTH(I,J) / |
643 |
|
|
& sqrt(HEFFpreTH(I,J)*HEFFpreTH(I,J) + hice_reg_sq) |
644 |
|
|
|
645 |
|
|
cif Do not regularize when HEFFpreTH = 0 |
646 |
mlosch |
1.137 |
ELSE |
647 |
ifenty |
1.131 |
heffActual(I,J) = ZERO |
648 |
|
|
hsnowActual(I,J) = ZERO |
649 |
|
|
recip_heffActual(I,J) = ZERO |
650 |
mlosch |
1.137 |
ENDIF |
651 |
ifenty |
1.131 |
|
652 |
dimitri |
1.69 |
ENDDO |
653 |
|
|
ENDDO |
654 |
|
|
|
655 |
mlosch |
1.137 |
#if (defined ALLOW_AUTODIFF_TAMC && defined SEAICE_MODIFY_GROWTH_ADJ) |
656 |
|
|
CALL ZERO_ADJ_1D( sNx*sNy, heffActual, myThid) |
657 |
|
|
CALL ZERO_ADJ_1D( sNx*sNy, hsnowActual, myThid) |
658 |
|
|
CALL ZERO_ADJ_1D( sNx*sNy, recip_heffActual, myThid) |
659 |
gforget |
1.95 |
#endif |
660 |
gforget |
1.87 |
|
661 |
ifenty |
1.135 |
C 5) COMPUTE MAXIMUM LATENT HEAT FLUXES FOR THE CURRENT ICE |
662 |
|
|
C AND SNOW THICKNESS |
663 |
|
|
|
664 |
|
|
DO J=1,sNy |
665 |
|
|
DO I=1,sNx |
666 |
|
|
c The latent heat flux over the sea ice which |
667 |
|
|
c will sublimate all of the snow and ice over one time |
668 |
|
|
c step (W/m^2) |
669 |
mlosch |
1.137 |
IF (HEFFpreTH(I,J) .GT. ZERO) THEN |
670 |
ifenty |
1.135 |
latentHeatFluxMax(I,J) = lhSublim / SEAICE_deltaTtherm * |
671 |
|
|
& (HEFFpreTH(I,J) * SEAICE_rhoIce + |
672 |
|
|
& HSNWpreTH(I,J) * SEAICE_rhoSnow)/AREApreTH(I,J) |
673 |
mlosch |
1.137 |
ELSE |
674 |
ifenty |
1.135 |
latentHeatFluxMax(I,J) = ZERO |
675 |
mlosch |
1.137 |
ENDIF |
676 |
ifenty |
1.135 |
ENDDO |
677 |
|
|
ENDDO |
678 |
|
|
|
679 |
dimitri |
1.113 |
|
680 |
jmc |
1.104 |
C =================================================================== |
681 |
|
|
C ================PART 2: determine heat fluxes/stocks=============== |
682 |
|
|
C =================================================================== |
683 |
gforget |
1.88 |
|
684 |
gforget |
1.75 |
C determine available heat due to the atmosphere -- for open water |
685 |
|
|
C ================================================================ |
686 |
|
|
|
687 |
|
|
C ocean surface/mixed layer temperature |
688 |
dimitri |
1.69 |
DO J=1,sNy |
689 |
|
|
DO I=1,sNx |
690 |
gforget |
1.83 |
TMIX(I,J,bi,bj)=theta(I,J,kSurface,bi,bj)+celsius2K |
691 |
dimitri |
1.69 |
ENDDO |
692 |
|
|
ENDDO |
693 |
|
|
|
694 |
gforget |
1.75 |
C wind speed from exf |
695 |
dimitri |
1.69 |
DO J=1,sNy |
696 |
|
|
DO I=1,sNx |
697 |
|
|
UG(I,J) = MAX(SEAICE_EPS,wspeed(I,J,bi,bj)) |
698 |
|
|
ENDDO |
699 |
|
|
ENDDO |
700 |
|
|
|
701 |
gforget |
1.105 |
#ifdef ALLOW_AUTODIFF_TAMC |
702 |
|
|
CADJ STORE qnet(:,:,bi,bj) = comlev1_bibj, key = iicekey,byte=isbyte |
703 |
|
|
CADJ STORE qsw(:,:,bi,bj) = comlev1_bibj, key = iicekey,byte=isbyte |
704 |
|
|
cCADJ STORE UG = comlev1_bibj, key = iicekey,byte=isbyte |
705 |
|
|
cCADJ STORE TMIX(:,:,bi,bj) = comlev1_bibj, key = iicekey,byte=isbyte |
706 |
|
|
#endif /* ALLOW_AUTODIFF_TAMC */ |
707 |
|
|
|
708 |
gforget |
1.75 |
CALL SEAICE_BUDGET_OCEAN( |
709 |
|
|
I UG, |
710 |
|
|
U TMIX, |
711 |
|
|
O a_QbyATM_open, a_QSWbyATM_open, |
712 |
|
|
I bi, bj, myTime, myIter, myThid ) |
713 |
|
|
|
714 |
|
|
C determine available heat due to the atmosphere -- for ice covered water |
715 |
|
|
C ======================================================================= |
716 |
dimitri |
1.69 |
|
717 |
gforget |
1.89 |
#ifdef ALLOW_ATM_WIND |
718 |
dimitri |
1.69 |
IF (useRelativeWind) THEN |
719 |
|
|
C Compute relative wind speed over sea ice. |
720 |
|
|
DO J=1,sNy |
721 |
|
|
DO I=1,sNx |
722 |
|
|
SPEED_SQ = |
723 |
|
|
& (uWind(I,J,bi,bj) |
724 |
|
|
& +0.5 _d 0*(uVel(i,j,kSurface,bi,bj) |
725 |
|
|
& +uVel(i+1,j,kSurface,bi,bj)) |
726 |
|
|
& -0.5 _d 0*(uice(i,j,bi,bj)+uice(i+1,j,bi,bj)))**2 |
727 |
|
|
& +(vWind(I,J,bi,bj) |
728 |
|
|
& +0.5 _d 0*(vVel(i,j,kSurface,bi,bj) |
729 |
|
|
& +vVel(i,j+1,kSurface,bi,bj)) |
730 |
|
|
& -0.5 _d 0*(vice(i,j,bi,bj)+vice(i,j+1,bi,bj)))**2 |
731 |
|
|
IF ( SPEED_SQ .LE. SEAICE_EPS_SQ ) THEN |
732 |
|
|
UG(I,J)=SEAICE_EPS |
733 |
|
|
ELSE |
734 |
|
|
UG(I,J)=SQRT(SPEED_SQ) |
735 |
|
|
ENDIF |
736 |
|
|
ENDDO |
737 |
|
|
ENDDO |
738 |
|
|
ENDIF |
739 |
gforget |
1.89 |
#endif |
740 |
gforget |
1.75 |
|
741 |
mlosch |
1.98 |
#ifdef ALLOW_AUTODIFF_TAMC |
742 |
heimbach |
1.138 |
CADJ STORE tice(:,:,bi,bj) |
743 |
heimbach |
1.139 |
CADJ & = comlev1_bibj, key = iicekey, byte = isbyte |
744 |
gforget |
1.105 |
CADJ STORE hsnowActual = comlev1_bibj, key = iicekey, byte = isbyte |
745 |
mlosch |
1.137 |
CADJ STORE heffActual = comlev1_bibj, key = iicekey, byte = isbyte |
746 |
|
|
CADJ STORE UG = comlev1_bibj, key = iicekey, byte = isbyte |
747 |
mlosch |
1.98 |
# ifdef SEAICE_MULTICATEGORY |
748 |
heimbach |
1.138 |
CADJ STORE tices(:,:,:,bi,bj) |
749 |
heimbach |
1.139 |
CADJ & = comlev1_bibj, key = iicekey, byte = isbyte |
750 |
mlosch |
1.98 |
# endif /* SEAICE_MULTICATEGORY */ |
751 |
|
|
#endif /* ALLOW_AUTODIFF_TAMC */ |
752 |
|
|
|
753 |
mlosch |
1.109 |
C-- Start loop over multi-categories, if SEAICE_MULTICATEGORY is undefined |
754 |
|
|
C nDim = 1, and there is only one loop iteration |
755 |
gforget |
1.99 |
#ifdef SEAICE_MULTICATEGORY |
756 |
mlosch |
1.98 |
DO IT=1,nDim |
757 |
|
|
#ifdef ALLOW_AUTODIFF_TAMC |
758 |
jmc |
1.104 |
C Why do we need this store directive when we have just stored |
759 |
mlosch |
1.98 |
C TICES before the loop? |
760 |
|
|
ilockey = (iicekey-1)*nDim + IT |
761 |
dimitri |
1.69 |
CADJ STORE tices(:,:,it,bi,bj) = comlev1_multdim, |
762 |
|
|
CADJ & key = ilockey, byte = isbyte |
763 |
|
|
#endif /* ALLOW_AUTODIFF_TAMC */ |
764 |
mlosch |
1.98 |
pFac = (2.0 _d 0*real(IT)-1.0 _d 0)/nDim |
765 |
dimitri |
1.69 |
DO J=1,sNy |
766 |
|
|
DO I=1,sNx |
767 |
mlosch |
1.98 |
heffActualP(I,J)= heffActual(I,J)*pFac |
768 |
ifenty |
1.135 |
#ifdef SEAICE_ADD_SUBLIMATION_TO_FWBUDGET |
769 |
|
|
latentHeatFluxMaxP(I,J) = latentHeatFluxMax(I,J)*pFac |
770 |
|
|
#endif |
771 |
dimitri |
1.69 |
TICE(I,J,bi,bj)=TICES(I,J,IT,bi,bj) |
772 |
|
|
ENDDO |
773 |
|
|
ENDDO |
774 |
jmc |
1.70 |
CALL SEAICE_SOLVE4TEMP( |
775 |
gforget |
1.83 |
I UG, heffActualP, hsnowActual, |
776 |
ifenty |
1.135 |
#ifdef SEAICE_ADD_SUBLIMATION_TO_FWBUDGET |
777 |
|
|
I latentHeatFluxMaxP, |
778 |
|
|
#endif |
779 |
dimitri |
1.69 |
U TICE, |
780 |
gforget |
1.71 |
O a_QbyATMmult_cover, a_QSWbyATMmult_cover, |
781 |
mlosch |
1.109 |
O a_FWbySublimMult, |
782 |
dimitri |
1.69 |
I bi, bj, myTime, myIter, myThid ) |
783 |
|
|
DO J=1,sNy |
784 |
|
|
DO I=1,sNx |
785 |
gforget |
1.75 |
C average over categories |
786 |
mlosch |
1.109 |
a_QbyATM_cover (I,J) = a_QbyATM_cover(I,J) |
787 |
mlosch |
1.98 |
& + a_QbyATMmult_cover(I,J)/nDim |
788 |
jmc |
1.104 |
a_QSWbyATM_cover (I,J) = a_QSWbyATM_cover(I,J) |
789 |
mlosch |
1.98 |
& + a_QSWbyATMmult_cover(I,J)/nDim |
790 |
jmc |
1.134 |
a_FWbySublim (I,J) = a_FWbySublim(I,J) |
791 |
mlosch |
1.109 |
& + a_FWbySublimMult(I,J)/nDim |
792 |
dimitri |
1.69 |
TICES(I,J,IT,bi,bj) = TICE(I,J,bi,bj) |
793 |
|
|
ENDDO |
794 |
|
|
ENDDO |
795 |
|
|
ENDDO |
796 |
gforget |
1.99 |
#else |
797 |
|
|
CALL SEAICE_SOLVE4TEMP( |
798 |
|
|
I UG, heffActual, hsnowActual, |
799 |
ifenty |
1.135 |
#ifdef SEAICE_ADD_SUBLIMATION_TO_FWBUDGET |
800 |
|
|
I latentHeatFluxMax, |
801 |
|
|
#endif |
802 |
gforget |
1.99 |
U TICE, |
803 |
mlosch |
1.109 |
O a_QbyATM_cover, a_QSWbyATM_cover, a_FWbySublim, |
804 |
gforget |
1.99 |
I bi, bj, myTime, myIter, myThid ) |
805 |
|
|
#endif /* SEAICE_MULTICATEGORY */ |
806 |
dimitri |
1.69 |
C-- End loop over multi-categories |
807 |
|
|
|
808 |
ifenty |
1.135 |
#ifdef ALLOW_DIAGNOSTICS |
809 |
|
|
DO J=1,sNy |
810 |
|
|
DO I=1,sNx |
811 |
|
|
c The actual latent heat flux realized by SOLVE4TEMP |
812 |
|
|
DIAGarrayA(I,J) = a_FWbySublim(I,J) * lhSublim |
813 |
|
|
ENDDO |
814 |
|
|
ENDDO |
815 |
|
|
|
816 |
|
|
cif The actual vs. maximum latent heat flux |
817 |
|
|
IF ( useDiagnostics ) THEN |
818 |
|
|
CALL DIAGNOSTICS_FILL(DIAGarrayA, |
819 |
|
|
& 'SIactLHF',0,1,3,bi,bj,myThid) |
820 |
|
|
CALL DIAGNOSTICS_FILL(latentHeatFluxMax, |
821 |
|
|
& 'SImaxLHF',0,1,3,bi,bj,myThid) |
822 |
|
|
ENDIF |
823 |
|
|
#endif |
824 |
|
|
|
825 |
|
|
|
826 |
jmc |
1.104 |
C switch heat fluxes from W/m2 to 'effective' ice meters |
827 |
gforget |
1.83 |
DO J=1,sNy |
828 |
|
|
DO I=1,sNx |
829 |
mlosch |
1.109 |
a_QbyATM_cover(I,J) = a_QbyATM_cover(I,J) |
830 |
gforget |
1.87 |
& * convertQ2HI * AREApreTH(I,J) |
831 |
mlosch |
1.109 |
a_QSWbyATM_cover(I,J) = a_QSWbyATM_cover(I,J) |
832 |
gforget |
1.87 |
& * convertQ2HI * AREApreTH(I,J) |
833 |
mlosch |
1.109 |
a_QbyATM_open(I,J) = a_QbyATM_open(I,J) |
834 |
gforget |
1.87 |
& * convertQ2HI * ( ONE - AREApreTH(I,J) ) |
835 |
mlosch |
1.109 |
a_QSWbyATM_open(I,J) = a_QSWbyATM_open(I,J) |
836 |
gforget |
1.87 |
& * convertQ2HI * ( ONE - AREApreTH(I,J) ) |
837 |
jmc |
1.104 |
C and initialize r_QbyATM_cover/r_QbyATM_open |
838 |
mlosch |
1.109 |
r_QbyATM_cover(I,J)=a_QbyATM_cover(I,J) |
839 |
|
|
r_QbyATM_open(I,J)=a_QbyATM_open(I,J) |
840 |
jmc |
1.134 |
C Convert fresh water flux by sublimation to 'effective' ice meters. |
841 |
mlosch |
1.109 |
C Negative sublimation is resublimation and will be added as snow. |
842 |
|
|
a_FWbySublim(I,J) = SEAICE_deltaTtherm/SEAICE_rhoIce |
843 |
|
|
& * a_FWbySublim(I,J)*AREApreTH(I,J) |
844 |
gforget |
1.125 |
r_FWbySublim(I,J)=a_FWbySublim(I,J) |
845 |
gforget |
1.83 |
ENDDO |
846 |
|
|
ENDDO |
847 |
gforget |
1.75 |
|
848 |
ifenty |
1.135 |
|
849 |
mlosch |
1.137 |
#if (defined ALLOW_AUTODIFF_TAMC && defined SEAICE_MODIFY_GROWTH_ADJ) |
850 |
jmc |
1.134 |
Cgf no additional dependency through ice cover |
851 |
mlosch |
1.137 |
IF ( SEAICEadjMODE.GE.3 ) THEN |
852 |
|
|
DO J=1,sNy |
853 |
|
|
DO I=1,sNx |
854 |
|
|
a_QbyATM_cover(I,J) = 0. _d 0 |
855 |
|
|
r_QbyATM_cover(I,J) = 0. _d 0 |
856 |
|
|
a_QSWbyATM_cover(I,J) = 0. _d 0 |
857 |
|
|
ENDDO |
858 |
gforget |
1.105 |
ENDDO |
859 |
mlosch |
1.137 |
ENDIF |
860 |
gforget |
1.105 |
#endif |
861 |
|
|
|
862 |
jmc |
1.91 |
C determine available heat due to the ice pack tying the |
863 |
gforget |
1.75 |
C underlying surface water temperature to freezing point |
864 |
|
|
C ====================================================== |
865 |
|
|
|
866 |
dimitri |
1.69 |
#ifdef ALLOW_AUTODIFF_TAMC |
867 |
gforget |
1.105 |
CADJ STORE theta(:,:,:,bi,bj) = comlev1_bibj,key=iicekey,byte=isbyte |
868 |
dimitri |
1.69 |
#endif |
869 |
gforget |
1.72 |
|
870 |
dimitri |
1.69 |
DO J=1,sNy |
871 |
|
|
DO I=1,sNx |
872 |
dimitri |
1.113 |
|
873 |
dimitri |
1.69 |
#ifdef SEAICE_VARIABLE_FREEZING_POINT |
874 |
|
|
TBC = -0.0575 _d 0*salt(I,J,kSurface,bi,bj) + 0.0901 _d 0 |
875 |
|
|
#endif /* SEAICE_VARIABLE_FREEZING_POINT */ |
876 |
gforget |
1.110 |
|
877 |
|
|
#ifdef MCPHEE_OCEAN_ICE_HEAT_FLUX |
878 |
dimitri |
1.113 |
|
879 |
|
|
c Bound the ocean temperature to be at or above the freezing point. |
880 |
|
|
surf_theta = max(theta(I,J,kSurface,bi,bj), TBC) |
881 |
|
|
#ifdef GRADIENT_MIXED_LAYER_TURBULENCE_FACTOR |
882 |
jmc |
1.134 |
MixedLayerTurbulenceFactor = 12.5 _d 0 - |
883 |
dimitri |
1.113 |
& 11.5 _d 0 *AREApreTH(I,J) |
884 |
jmc |
1.134 |
#else |
885 |
dimitri |
1.113 |
c If ice is present, MixedLayerTurbulenceFactor = 1.0, else 12.50 |
886 |
|
|
IF (AREApreTH(I,J) .GT. 0. _d 0) THEN |
887 |
|
|
MixedLayerTurbulenceFactor = ONE |
888 |
|
|
ELSE |
889 |
|
|
MixedLayerTurbulenceFactor = 12.5 _d 0 |
890 |
|
|
ENDIF |
891 |
|
|
#endif /* GRADIENT_MIXED_LAYER_TURBULENCE_FACTOR */ |
892 |
|
|
|
893 |
|
|
c The turbulent ocean-ice heat flux |
894 |
|
|
a_QbyOCN(I,J) = -STANTON_NUMBER * USTAR_BASE * rhoConst * |
895 |
|
|
& HeatCapacity_Cp *(surf_theta - TBC)* |
896 |
ifenty |
1.118 |
& MixedLayerTurbulenceFactor*maskC(i,j,kSurface,bi,bj) |
897 |
dimitri |
1.113 |
|
898 |
|
|
c The turbulent ocean-ice heat flux converted to meters |
899 |
|
|
c of potential ice melt |
900 |
|
|
a_QbyOCN(I,J) = a_QbyOCN(I,J) * convertQ2HI |
901 |
|
|
|
902 |
jmc |
1.134 |
c by design a_QbyOCN .LE. 0. so that initial ice growth cannot |
903 |
gforget |
1.121 |
c be triggered by this term, which Ian says is better for adjoint |
904 |
jmc |
1.134 |
#else |
905 |
dimitri |
1.113 |
|
906 |
gforget |
1.110 |
IF ( theta(I,J,kSurface,bi,bj) .GE. TBC ) THEN |
907 |
|
|
tmpscal1 = SEAICE_availHeatFrac |
908 |
|
|
ELSE |
909 |
|
|
tmpscal1 = SEAICE_availHeatFracFrz |
910 |
|
|
ENDIF |
911 |
jmc |
1.134 |
tmpscal1 = tmpscal1 |
912 |
ifenty |
1.118 |
& * dRf(kSurface) * maskC(i,j,kSurface,bi,bj) |
913 |
gforget |
1.110 |
|
914 |
|
|
a_QbyOCN(i,j) = -tmpscal1 * (HeatCapacity_Cp*rhoConst/QI) |
915 |
|
|
& * (theta(I,J,kSurface,bi,bj)-TBC) |
916 |
dimitri |
1.113 |
|
917 |
|
|
#endif /* MCPHEE_OCEAN_ICE_HEAT_FLUX */ |
918 |
|
|
|
919 |
|
|
r_QbyOCN(i,j) = a_QbyOCN(i,j) |
920 |
|
|
|
921 |
gforget |
1.72 |
ENDDO |
922 |
|
|
ENDDO |
923 |
jmc |
1.134 |
|
924 |
mlosch |
1.137 |
#if (defined ALLOW_AUTODIFF_TAMC && defined SEAICE_MODIFY_GROWTH_ADJ) |
925 |
|
|
CALL ZERO_ADJ_1D( sNx*sNy, r_QbyOCN, myThid) |
926 |
gforget |
1.96 |
#endif |
927 |
gforget |
1.88 |
|
928 |
|
|
|
929 |
jmc |
1.104 |
C =================================================================== |
930 |
|
|
C =========PART 3: determine effective thicknesses increments======== |
931 |
|
|
C =================================================================== |
932 |
gforget |
1.88 |
|
933 |
gforget |
1.125 |
C compute snow/ice tendency due to sublimation |
934 |
|
|
C ============================================ |
935 |
gforget |
1.75 |
|
936 |
mlosch |
1.109 |
#ifdef SEAICE_ADD_SUBLIMATION_TO_FWBUDGET |
937 |
|
|
#ifdef ALLOW_AUTODIFF_TAMC |
938 |
|
|
CADJ STORE hsnow(:,:,bi,bj) = comlev1_bibj,key=iicekey,byte=isbyte |
939 |
gforget |
1.125 |
CADJ STORE r_FWbySublim = comlev1_bibj,key=iicekey,byte=isbyte |
940 |
mlosch |
1.109 |
#endif /* ALLOW_AUTODIFF_TAMC */ |
941 |
|
|
DO J=1,sNy |
942 |
|
|
DO I=1,sNx |
943 |
gforget |
1.125 |
C First sublimate/deposite snow |
944 |
|
|
tmpscal2 = MIN(r_FWbySublim(I,J),HSNOW(I,J,bi,bj)/ICE2SNOW) |
945 |
|
|
d_HSNWbySublim(I,J) = - tmpscal2 * ICE2SNOW |
946 |
|
|
HSNOW(I,J,bi,bj) = HSNOW(I,J,bi,bj) - tmpscal2*ICE2SNOW |
947 |
|
|
r_FWbySublim(I,J) = r_FWbySublim(I,J) - tmpscal2 |
948 |
|
|
ENDDO |
949 |
|
|
ENDDO |
950 |
|
|
#ifdef ALLOW_AUTODIFF_TAMC |
951 |
|
|
CADJ STORE heff(:,:,bi,bj) = comlev1_bibj,key=iicekey,byte=isbyte |
952 |
|
|
CADJ STORE r_FWbySublim = comlev1_bibj,key=iicekey,byte=isbyte |
953 |
|
|
#endif /* ALLOW_AUTODIFF_TAMC */ |
954 |
|
|
DO J=1,sNy |
955 |
|
|
DO I=1,sNx |
956 |
|
|
C If anything is left, sublimate ice |
957 |
|
|
tmpscal2 = MIN(r_FWbySublim(I,J),HEFF(I,J,bi,bj)) |
958 |
|
|
d_HEFFbySublim(I,J) = - tmpscal2 |
959 |
|
|
HEFF(I,J,bi,bj) = HEFF(I,J,bi,bj) - tmpscal2 |
960 |
|
|
r_FWbySublim(I,J) = r_FWbySublim(I,J) - tmpscal2 |
961 |
mlosch |
1.109 |
ENDDO |
962 |
|
|
ENDDO |
963 |
gforget |
1.133 |
DO J=1,sNy |
964 |
|
|
DO I=1,sNx |
965 |
|
|
C If anything is left, it will be evaporated from the ocean rather than sublimated. |
966 |
|
|
C Since a_QbyATM_cover was computed for sublimation, not simple evapation, we need to |
967 |
|
|
C remove the fusion part for the residual (that happens to be precisely r_FWbySublim). |
968 |
|
|
a_QbyATM_cover(I,J) = a_QbyATM_cover(I,J)-r_FWbySublim(I,J) |
969 |
|
|
r_QbyATM_cover(I,J) = r_QbyATM_cover(I,J)-r_FWbySublim(I,J) |
970 |
|
|
ENDDO |
971 |
|
|
ENDDO |
972 |
mlosch |
1.109 |
#endif /* SEAICE_ADD_SUBLIMATION_TO_FWBUDGET */ |
973 |
|
|
|
974 |
ifenty |
1.135 |
C compute ice thickness tendency due to ice-ocean interaction |
975 |
|
|
C =========================================================== |
976 |
|
|
|
977 |
|
|
#ifdef ALLOW_AUTODIFF_TAMC |
978 |
|
|
CADJ STORE heff(:,:,bi,bj) = comlev1_bibj,key=iicekey,byte=isbyte |
979 |
|
|
CADJ STORE r_QbyOCN = comlev1_bibj,key=iicekey,byte=isbyte |
980 |
|
|
#endif /* ALLOW_AUTODIFF_TAMC */ |
981 |
|
|
|
982 |
|
|
DO J=1,sNy |
983 |
|
|
DO I=1,sNx |
984 |
|
|
d_HEFFbyOCNonICE(I,J)=MAX(r_QbyOCN(i,j), -HEFF(I,J,bi,bj)) |
985 |
|
|
r_QbyOCN(I,J)=r_QbyOCN(I,J)-d_HEFFbyOCNonICE(I,J) |
986 |
|
|
HEFF(I,J,bi,bj)=HEFF(I,J,bi,bj) + d_HEFFbyOCNonICE(I,J) |
987 |
|
|
#ifdef ALLOW_SITRACER |
988 |
|
|
SItrHEFF(I,J,bi,bj,2)=HEFF(I,J,bi,bj) |
989 |
|
|
#endif |
990 |
|
|
ENDDO |
991 |
|
|
ENDDO |
992 |
|
|
|
993 |
gforget |
1.125 |
C compute snow melt tendency due to snow-atmosphere interaction |
994 |
|
|
C ================================================================== |
995 |
|
|
|
996 |
dimitri |
1.69 |
#ifdef ALLOW_AUTODIFF_TAMC |
997 |
gforget |
1.105 |
CADJ STORE hsnow(:,:,bi,bj) = comlev1_bibj,key=iicekey,byte=isbyte |
998 |
|
|
CADJ STORE r_QbyATM_cover = comlev1_bibj,key=iicekey,byte=isbyte |
999 |
dimitri |
1.69 |
#endif /* ALLOW_AUTODIFF_TAMC */ |
1000 |
gforget |
1.75 |
|
1001 |
dimitri |
1.69 |
DO J=1,sNy |
1002 |
|
|
DO I=1,sNx |
1003 |
gforget |
1.105 |
tmpscal1=MAX(r_QbyATM_cover(I,J)*ICE2SNOW,-HSNOW(I,J,bi,bj)) |
1004 |
|
|
tmpscal2=MIN(tmpscal1,0. _d 0) |
1005 |
|
|
#ifdef SEAICE_MODIFY_GROWTH_ADJ |
1006 |
|
|
Cgf no additional dependency through snow |
1007 |
mlosch |
1.137 |
IF ( SEAICEadjMODE.GE.2 ) tmpscal2 = 0. _d 0 |
1008 |
gforget |
1.105 |
#endif |
1009 |
dimitri |
1.113 |
d_HSNWbyATMonSNW(I,J)= tmpscal2 |
1010 |
gforget |
1.105 |
HSNOW(I,J,bi,bj) = HSNOW(I,J,bi,bj) + tmpscal2 |
1011 |
|
|
r_QbyATM_cover(I,J)=r_QbyATM_cover(I,J) - tmpscal2/ICE2SNOW |
1012 |
dimitri |
1.69 |
ENDDO |
1013 |
|
|
ENDDO |
1014 |
|
|
|
1015 |
gforget |
1.89 |
C compute ice thickness tendency due to the atmosphere |
1016 |
|
|
C ==================================================== |
1017 |
gforget |
1.75 |
|
1018 |
mlosch |
1.109 |
#ifdef ALLOW_AUTODIFF_TAMC |
1019 |
|
|
CADJ STORE heff(:,:,bi,bj) = comlev1_bibj,key=iicekey,byte=isbyte |
1020 |
|
|
CADJ STORE r_QbyATM_cover = comlev1_bibj,key=iicekey,byte=isbyte |
1021 |
gforget |
1.105 |
#endif /* ALLOW_AUTODIFF_TAMC */ |
1022 |
gforget |
1.75 |
|
1023 |
jmc |
1.104 |
Cgf note: this block is not actually tested by lab_sea |
1024 |
|
|
Cgf where all experiments start in January. So even though |
1025 |
|
|
Cgf the v1.81=>v1.82 revision would change results in |
1026 |
|
|
Cgf warming conditions, the lab_sea results were not changed. |
1027 |
gforget |
1.82 |
|
1028 |
dimitri |
1.69 |
DO J=1,sNy |
1029 |
|
|
DO I=1,sNx |
1030 |
dimitri |
1.113 |
|
1031 |
gforget |
1.111 |
#ifdef SEAICE_GROWTH_LEGACY |
1032 |
gforget |
1.84 |
tmpscal2 = MAX(-HEFF(I,J,bi,bj),r_QbyATM_cover(I,J)) |
1033 |
gforget |
1.111 |
#else |
1034 |
|
|
tmpscal2 = MAX(-HEFF(I,J,bi,bj),r_QbyATM_cover(I,J)+ |
1035 |
jmc |
1.134 |
c Limit ice growth by potential melt by ocean |
1036 |
gforget |
1.111 |
& AREApreTH(I,J) * r_QbyOCN(I,J)) |
1037 |
dimitri |
1.113 |
#endif /* SEAICE_GROWTH_LEGACY */ |
1038 |
|
|
|
1039 |
dimitri |
1.114 |
d_HEFFbyATMonOCN_cover(I,J)=tmpscal2 |
1040 |
|
|
d_HEFFbyATMonOCN(I,J)=d_HEFFbyATMonOCN(I,J)+tmpscal2 |
1041 |
gforget |
1.89 |
r_QbyATM_cover(I,J)=r_QbyATM_cover(I,J)-tmpscal2 |
1042 |
|
|
HEFF(I,J,bi,bj) = HEFF(I,J,bi,bj) + tmpscal2 |
1043 |
dimitri |
1.113 |
|
1044 |
gforget |
1.124 |
#ifdef ALLOW_SITRACER |
1045 |
|
|
SItrHEFF(I,J,bi,bj,3)=HEFF(I,J,bi,bj) |
1046 |
|
|
#endif |
1047 |
gforget |
1.74 |
ENDDO |
1048 |
|
|
ENDDO |
1049 |
dimitri |
1.69 |
|
1050 |
jmc |
1.91 |
C attribute precip to fresh water or snow stock, |
1051 |
gforget |
1.75 |
C depending on atmospheric conditions. |
1052 |
|
|
C ================================================= |
1053 |
dimitri |
1.69 |
#ifdef ALLOW_ATM_TEMP |
1054 |
gforget |
1.105 |
#ifdef ALLOW_AUTODIFF_TAMC |
1055 |
|
|
CADJ STORE a_QbyATM_cover = comlev1_bibj,key=iicekey,byte=isbyte |
1056 |
|
|
CADJ STORE PRECIP(:,:,bi,bj) = comlev1_bibj,key=iicekey,byte=isbyte |
1057 |
|
|
CADJ STORE AREApreTH = comlev1_bibj,key=iicekey,byte=isbyte |
1058 |
|
|
#endif /* ALLOW_AUTODIFF_TAMC */ |
1059 |
gforget |
1.74 |
DO J=1,sNy |
1060 |
|
|
DO I=1,sNx |
1061 |
jmc |
1.104 |
C possible alternatives to the a_QbyATM_cover criterium |
1062 |
gforget |
1.89 |
c IF (TICE(I,J,bi,bj) .LT. TMIX) THEN |
1063 |
|
|
c IF (atemp(I,J,bi,bj) .LT. celsius2K) THEN |
1064 |
|
|
IF ( a_QbyATM_cover(I,J).GE. 0. _d 0 ) THEN |
1065 |
gforget |
1.73 |
C add precip as snow |
1066 |
gforget |
1.84 |
d_HFRWbyRAIN(I,J)=0. _d 0 |
1067 |
|
|
d_HSNWbyRAIN(I,J)=convertPRECIP2HI*ICE2SNOW* |
1068 |
gforget |
1.87 |
& PRECIP(I,J,bi,bj)*AREApreTH(I,J) |
1069 |
jmc |
1.91 |
ELSE |
1070 |
jmc |
1.104 |
C add precip to the fresh water bucket |
1071 |
gforget |
1.84 |
d_HFRWbyRAIN(I,J)=-convertPRECIP2HI* |
1072 |
gforget |
1.87 |
& PRECIP(I,J,bi,bj)*AREApreTH(I,J) |
1073 |
gforget |
1.84 |
d_HSNWbyRAIN(I,J)=0. _d 0 |
1074 |
dimitri |
1.69 |
ENDIF |
1075 |
jmc |
1.91 |
HSNOW(I,J,bi,bj) = HSNOW(I,J,bi,bj) + d_HSNWbyRAIN(I,J) |
1076 |
dimitri |
1.69 |
ENDDO |
1077 |
|
|
ENDDO |
1078 |
jmc |
1.104 |
Cgf note: this does not affect air-sea heat flux, |
1079 |
|
|
Cgf since the implied air heat gain to turn |
1080 |
|
|
Cgf rain to snow is not a surface process. |
1081 |
gforget |
1.74 |
#endif /* ALLOW_ATM_TEMP */ |
1082 |
dimitri |
1.69 |
|
1083 |
gforget |
1.89 |
C compute snow melt due to heat available from ocean. |
1084 |
gforget |
1.75 |
C ================================================================= |
1085 |
dimitri |
1.69 |
|
1086 |
jmc |
1.104 |
Cgf do we need to keep this comment and cpp bracket? |
1087 |
|
|
Cph( very sensitive bit here by JZ |
1088 |
dimitri |
1.69 |
#ifndef SEAICE_EXCLUDE_FOR_EXACT_AD_TESTING |
1089 |
gforget |
1.105 |
#ifdef ALLOW_AUTODIFF_TAMC |
1090 |
|
|
CADJ STORE HSNOW(:,:,bi,bj) = comlev1_bibj,key=iicekey,byte=isbyte |
1091 |
|
|
CADJ STORE r_QbyOCN = comlev1_bibj,key=iicekey,byte=isbyte |
1092 |
|
|
#endif /* ALLOW_AUTODIFF_TAMC */ |
1093 |
dimitri |
1.69 |
DO J=1,sNy |
1094 |
|
|
DO I=1,sNx |
1095 |
gforget |
1.105 |
tmpscal1=MAX(r_QbyOCN(i,j)*ICE2SNOW, -HSNOW(I,J,bi,bj)) |
1096 |
|
|
tmpscal2=MIN(tmpscal1,0. _d 0) |
1097 |
|
|
#ifdef SEAICE_MODIFY_GROWTH_ADJ |
1098 |
|
|
Cgf no additional dependency through snow |
1099 |
|
|
if ( SEAICEadjMODE.GE.2 ) tmpscal2 = 0. _d 0 |
1100 |
|
|
#endif |
1101 |
dimitri |
1.113 |
d_HSNWbyOCNonSNW(I,J) = tmpscal2 |
1102 |
gforget |
1.84 |
r_QbyOCN(I,J)=r_QbyOCN(I,J) |
1103 |
dimitri |
1.113 |
& -d_HSNWbyOCNonSNW(I,J)/ICE2SNOW |
1104 |
|
|
HSNOW(I,J,bi,bj) = HSNOW(I,J,bi,bj)+d_HSNWbyOCNonSNW(I,J) |
1105 |
dimitri |
1.69 |
ENDDO |
1106 |
|
|
ENDDO |
1107 |
gforget |
1.75 |
#endif /* SEAICE_EXCLUDE_FOR_EXACT_AD_TESTING */ |
1108 |
jmc |
1.104 |
Cph) |
1109 |
gforget |
1.90 |
|
1110 |
|
|
C gain of new ice over open water |
1111 |
|
|
C =============================== |
1112 |
|
|
#ifndef SEAICE_GROWTH_LEGACY |
1113 |
|
|
#ifdef ALLOW_AUTODIFF_TAMC |
1114 |
gforget |
1.105 |
CADJ STORE heff(:,:,bi,bj) = comlev1_bibj,key=iicekey,byte=isbyte |
1115 |
|
|
CADJ STORE r_QbyATM_open = comlev1_bibj,key=iicekey,byte=isbyte |
1116 |
|
|
CADJ STORE r_QbyOCN = comlev1_bibj,key=iicekey,byte=isbyte |
1117 |
dimitri |
1.113 |
CADJ STORE a_QSWbyATM_cover = comlev1_bibj,key=iicekey,byte=isbyte |
1118 |
gforget |
1.105 |
CADJ STORE a_QSWbyATM_open = comlev1_bibj,key=iicekey,byte=isbyte |
1119 |
|
|
#endif /* ALLOW_AUTODIFF_TAMC */ |
1120 |
gforget |
1.90 |
DO J=1,sNy |
1121 |
|
|
DO I=1,sNx |
1122 |
dimitri |
1.113 |
#ifdef SEAICE_DO_OPEN_WATER_GROWTH |
1123 |
jmc |
1.134 |
c Initial ice growth is triggered by open water |
1124 |
gforget |
1.111 |
c heat flux overcoming potential melt by ocean |
1125 |
jmc |
1.134 |
tmpscal1=r_QbyATM_open(I,J)+r_QbyOCN(i,j) * |
1126 |
gforget |
1.111 |
& (1.0 _d 0 - AREApreTH(i,J)) |
1127 |
|
|
c Penetrative shortwave flux beyond first layer |
1128 |
gforget |
1.121 |
c that is therefore not available to ice growth/melt |
1129 |
gforget |
1.111 |
tmpscal2=SWFRACB * a_QSWbyATM_open(I,J) |
1130 |
|
|
#ifdef SEAICE_DO_OPEN_WATER_MELT |
1131 |
|
|
C allow not only growth but also melt by open ocean heat flux |
1132 |
|
|
tmpscal3=MAX(tmpscal1-tmpscal2, -HEFF(I,J,bi,bj)) |
1133 |
|
|
#else |
1134 |
|
|
tmpscal3=MAX(tmpscal1-tmpscal2, 0. _d 0) |
1135 |
|
|
#endif /* SEAICE_DO_OPEN_WATER_MELT */ |
1136 |
dimitri |
1.114 |
d_HEFFbyATMonOCN_open(I,J)=tmpscal3 |
1137 |
dimitri |
1.113 |
d_HEFFbyATMonOCN(I,J)=d_HEFFbyATMonOCN(I,J)+tmpscal3 |
1138 |
gforget |
1.90 |
r_QbyATM_open(I,J)=r_QbyATM_open(I,J)-tmpscal3 |
1139 |
jmc |
1.134 |
HEFF(I,J,bi,bj) = HEFF(I,J,bi,bj) + tmpscal3 |
1140 |
dimitri |
1.113 |
#endif /* SEAICE_DO_OPEN_WATER_GROWTH */ |
1141 |
gforget |
1.90 |
ENDDO |
1142 |
|
|
ENDDO |
1143 |
|
|
#endif /* SEAICE_GROWTH_LEGACY */ |
1144 |
|
|
|
1145 |
gforget |
1.124 |
#ifdef ALLOW_SITRACER |
1146 |
|
|
DO J=1,sNy |
1147 |
|
|
DO I=1,sNx |
1148 |
|
|
c needs to be here to allow use also with LEGACY branch |
1149 |
|
|
SItrHEFF(I,J,bi,bj,4)=HEFF(I,J,bi,bj) |
1150 |
|
|
ENDDO |
1151 |
|
|
ENDDO |
1152 |
|
|
#endif |
1153 |
|
|
|
1154 |
gforget |
1.87 |
C convert snow to ice if submerged. |
1155 |
|
|
C ================================= |
1156 |
|
|
|
1157 |
gforget |
1.89 |
#ifndef SEAICE_GROWTH_LEGACY |
1158 |
jmc |
1.104 |
C note: in legacy, this process is done at the end |
1159 |
gforget |
1.87 |
#ifdef ALLOW_SEAICE_FLOODING |
1160 |
gforget |
1.105 |
#ifdef ALLOW_AUTODIFF_TAMC |
1161 |
|
|
CADJ STORE heff(:,:,bi,bj) = comlev1_bibj,key=iicekey,byte=isbyte |
1162 |
|
|
CADJ STORE hsnow(:,:,bi,bj) = comlev1_bibj,key=iicekey,byte=isbyte |
1163 |
|
|
#endif /* ALLOW_AUTODIFF_TAMC */ |
1164 |
gforget |
1.87 |
IF ( SEAICEuseFlooding ) THEN |
1165 |
|
|
DO J=1,sNy |
1166 |
|
|
DO I=1,sNx |
1167 |
gforget |
1.105 |
hDraft = (HSNOW(I,J,bi,bj)*SEAICE_rhoSnow |
1168 |
gforget |
1.87 |
& +HEFF(I,J,bi,bj)*SEAICE_rhoIce)/rhoConst |
1169 |
|
|
tmpscal1 = MAX( 0. _d 0, hDraft - HEFF(I,J,bi,bj)) |
1170 |
|
|
d_HEFFbyFLOODING(I,J)=tmpscal1 |
1171 |
|
|
HEFF(I,J,bi,bj) = HEFF(I,J,bi,bj)+d_HEFFbyFLOODING(I,J) |
1172 |
|
|
HSNOW(I,J,bi,bj) = HSNOW(I,J,bi,bj)- |
1173 |
jmc |
1.91 |
& d_HEFFbyFLOODING(I,J)*ICE2SNOW |
1174 |
gforget |
1.87 |
ENDDO |
1175 |
|
|
ENDDO |
1176 |
|
|
ENDIF |
1177 |
|
|
#endif /* ALLOW_SEAICE_FLOODING */ |
1178 |
|
|
#endif /* SEAICE_GROWTH_LEGACY */ |
1179 |
|
|
|
1180 |
jmc |
1.104 |
C =================================================================== |
1181 |
|
|
C ==========PART 4: determine ice cover fraction increments=========- |
1182 |
|
|
C =================================================================== |
1183 |
gforget |
1.75 |
|
1184 |
dimitri |
1.69 |
#ifdef ALLOW_AUTODIFF_TAMC |
1185 |
dimitri |
1.113 |
CADJ STORE d_HEFFbyATMonOCN = comlev1_bibj,key=iicekey,byte=isbyte |
1186 |
dimitri |
1.114 |
CADJ STORE d_HEFFbyATMonOCN_cover = comlev1_bibj,key=iicekey,byte=isbyte |
1187 |
|
|
CADJ STORE d_HEFFbyATMonOCN_open = comlev1_bibj,key=iicekey,byte=isbyte |
1188 |
dimitri |
1.113 |
CADJ STORE d_HEFFbyOCNonICE = comlev1_bibj,key=iicekey,byte=isbyte |
1189 |
ifenty |
1.131 |
CADJ STORE recip_heffActual = comlev1_bibj,key=iicekey,byte=isbyte |
1190 |
heimbach |
1.138 |
cph( |
1191 |
|
|
cphCADJ STORE d_AREAbyATM = comlev1_bibj,key=iicekey,byte=isbyte |
1192 |
|
|
cphCADJ STORE d_AREAbyICE = comlev1_bibj,key=iicekey,byte=isbyte |
1193 |
|
|
cphCADJ STORE d_AREAbyOCN = comlev1_bibj,key=iicekey,byte=isbyte |
1194 |
|
|
cph) |
1195 |
gforget |
1.105 |
CADJ STORE a_QbyATM_open = comlev1_bibj,key=iicekey,byte=isbyte |
1196 |
|
|
CADJ STORE heffActual = comlev1_bibj,key=iicekey,byte=isbyte |
1197 |
|
|
CADJ STORE AREApreTH = comlev1_bibj,key=iicekey,byte=isbyte |
1198 |
|
|
CADJ STORE HEFF(:,:,bi,bj) = comlev1_bibj,key=iicekey,byte=isbyte |
1199 |
|
|
CADJ STORE HSNOW(:,:,bi,bj) = comlev1_bibj,key=iicekey,byte=isbyte |
1200 |
|
|
CADJ STORE AREA(:,:,bi,bj) = comlev1_bibj,key=iicekey,byte=isbyte |
1201 |
dimitri |
1.69 |
#endif /* ALLOW_AUTODIFF_TAMC */ |
1202 |
|
|
|
1203 |
|
|
DO J=1,sNy |
1204 |
|
|
DO I=1,sNx |
1205 |
jmc |
1.104 |
|
1206 |
gforget |
1.123 |
IF ( YC(I,J,bi,bj) .LT. ZERO ) THEN |
1207 |
|
|
HO_loc=HO_south |
1208 |
|
|
ELSE |
1209 |
|
|
HO_loc=HO |
1210 |
dimitri |
1.113 |
ENDIF |
1211 |
|
|
|
1212 |
gforget |
1.123 |
C compute contraction/expansion from melt/growth |
1213 |
dimitri |
1.113 |
#ifdef SEAICE_GROWTH_LEGACY |
1214 |
|
|
|
1215 |
jmc |
1.104 |
C compute heff after ice melt by ocn: |
1216 |
gforget |
1.123 |
tmpscal0=HEFF(I,J,bi,bj) - d_HEFFbyATMonOCN(I,J) |
1217 |
jmc |
1.104 |
C compute available heat left after snow melt by atm: |
1218 |
|
|
tmpscal1= a_QbyATM_open(I,J)+a_QbyATM_cover(I,J) |
1219 |
dimitri |
1.113 |
& - d_HSNWbyATMonSNW(I,J)/ICE2SNOW |
1220 |
jmc |
1.104 |
C (cannot melt more than all the ice) |
1221 |
|
|
tmpscal2 = MAX(-tmpscal0,tmpscal1) |
1222 |
|
|
tmpscal3 = MIN(ZERO,tmpscal2) |
1223 |
|
|
C gain of new ice over open water |
1224 |
gforget |
1.123 |
tmpscal4=MAX(ZERO,a_QbyATM_open(I,J)) |
1225 |
|
|
C compute cover fraction tendency |
1226 |
jmc |
1.134 |
d_AREAbyATM(I,J)=tmpscal4/HO_loc+HALF*tmpscal3 |
1227 |
gforget |
1.123 |
& *AREApreTH(I,J) /(tmpscal0+.00001 _d 0) |
1228 |
jmc |
1.104 |
|
1229 |
dimitri |
1.113 |
#else /* SEAICE_GROWTH_LEGACY */ |
1230 |
|
|
|
1231 |
gforget |
1.123 |
# ifdef FENTY_AREA_EXPANSION_CONTRACTION |
1232 |
|
|
|
1233 |
|
|
C the various volume tendency terms |
1234 |
|
|
|
1235 |
|
|
C Part 1: expansion/contraction of ice cover in open-water areas. |
1236 |
mlosch |
1.137 |
d_AREAbyATM(I,J) = 0. _d 0 |
1237 |
mlosch |
1.140 |
IF (d_HEFFbyATMOnOCN_open(I,J) .GT. ZERO) then |
1238 |
gforget |
1.123 |
C Ice cover is all created from open ocean-water air-sea heat fluxes |
1239 |
mlosch |
1.140 |
d_AREAbyATM(I,J)=d_HEFFbyATMOnOCN_open(I,J)/HO_loc |
1240 |
gforget |
1.123 |
ELSEIF (AREApreTH(I,J) .GT. ZERO) THEN |
1241 |
|
|
C that can also act to remove ice cover. |
1242 |
mlosch |
1.140 |
d_AREAbyATM(i,J) = HALF*d_HEFFbyATMOnOCN_open(I,J) |
1243 |
|
|
& *recip_heffActual(I,J) |
1244 |
gforget |
1.123 |
ENDIF |
1245 |
|
|
|
1246 |
|
|
C Part 2: contraction from ice thinning from above |
1247 |
mlosch |
1.137 |
d_AREAbyICE(I,J) = 0. _d 0 |
1248 |
mlosch |
1.140 |
if (d_HEFFbyATMOnOCN_cover(I,J) .LE. ZERO) |
1249 |
|
|
& d_AREAbyICE(I,J) = HALF * d_HEFFbyATMOnOCN_cover(I,J) |
1250 |
|
|
& * recip_heffActual(I,J) |
1251 |
gforget |
1.123 |
|
1252 |
|
|
C Part 3: contraction from ice thinning from below |
1253 |
mlosch |
1.137 |
d_AREAbyOCN(I,J) = 0. _d 0 |
1254 |
mlosch |
1.140 |
if (d_HEFFbyOCNonICE(I,J) .LE.ZERO) d_AREAbyOCN(I,J) = |
1255 |
|
|
& HALF * d_HEFFbyOCNonICE(I,J)* recip_heffActual(I,J) |
1256 |
gforget |
1.123 |
|
1257 |
|
|
# else /* FENTY_AREA_EXPANSION_CONTRACTION */ |
1258 |
|
|
|
1259 |
|
|
# ifdef SEAICE_OCN_MELT_ACT_ON_AREA |
1260 |
jmc |
1.104 |
C ice cover reduction by joint OCN+ATM melt |
1261 |
dimitri |
1.113 |
tmpscal3 = MIN( 0. _d 0 , |
1262 |
dimitri |
1.114 |
& d_HEFFbyATMonOCN(I,J)+d_HEFFbyOCNonICE(I,J) ) |
1263 |
gforget |
1.123 |
# else |
1264 |
dimitri |
1.113 |
C ice cover reduction by ATM melt only -- as in legacy code |
1265 |
dimitri |
1.114 |
tmpscal3 = MIN( 0. _d 0 , d_HEFFbyATMonOCN(I,J) ) |
1266 |
gforget |
1.123 |
# endif |
1267 |
gforget |
1.89 |
C gain of new ice over open water |
1268 |
dimitri |
1.113 |
|
1269 |
gforget |
1.123 |
# ifdef SEAICE_DO_OPEN_WATER_GROWTH |
1270 |
jmc |
1.104 |
C the one effectively used to increment HEFF |
1271 |
gforget |
1.123 |
tmpscal4 = MAX(ZERO,d_HEFFbyATMonOCN_open(I,J)) |
1272 |
|
|
# else |
1273 |
jmc |
1.104 |
C the virtual one -- as in legcy code |
1274 |
gforget |
1.90 |
tmpscal4 = MAX(ZERO,a_QbyATM_open(I,J)) |
1275 |
gforget |
1.123 |
# endif |
1276 |
dimitri |
1.113 |
|
1277 |
jmc |
1.104 |
C compute cover fraction tendency |
1278 |
gforget |
1.123 |
d_AREAbyATM(I,J)=tmpscal4/HO_loc+ |
1279 |
|
|
& HALF*tmpscal3*recip_heffActual(I,J) |
1280 |
|
|
|
1281 |
|
|
# endif /* FENTY_AREA_EXPANSION_CONTRACTION */ |
1282 |
gforget |
1.112 |
|
1283 |
gforget |
1.123 |
#endif /* SEAICE_GROWTH_LEGACY */ |
1284 |
gforget |
1.112 |
|
1285 |
jmc |
1.104 |
C apply tendency |
1286 |
gforget |
1.90 |
IF ( (HEFF(i,j,bi,bj).GT.0. _d 0).OR. |
1287 |
|
|
& (HSNOW(i,j,bi,bj).GT.0. _d 0) ) THEN |
1288 |
jmc |
1.134 |
AREA(I,J,bi,bj)=max(0. _d 0, |
1289 |
ifenty |
1.131 |
& min( SEAICE_area_max, AREA(I,J,bi,bj) |
1290 |
|
|
& +d_AREAbyATM(I,J) + d_AREAbyOCN(I,J) + d_AREAbyICE(I,J) )) |
1291 |
gforget |
1.90 |
ELSE |
1292 |
|
|
AREA(I,J,bi,bj)=0. _d 0 |
1293 |
|
|
ENDIF |
1294 |
gforget |
1.127 |
#ifdef ALLOW_SITRACER |
1295 |
|
|
SItrAREA(I,J,bi,bj,3)=AREA(I,J,bi,bj) |
1296 |
|
|
#endif |
1297 |
dimitri |
1.69 |
ENDDO |
1298 |
|
|
ENDDO |
1299 |
|
|
|
1300 |
mlosch |
1.137 |
#if (defined ALLOW_AUTODIFF_TAMC && defined SEAICE_MODIFY_GROWTH_ADJ) |
1301 |
jmc |
1.134 |
Cgf 'bulk' linearization of area=f(HEFF) |
1302 |
mlosch |
1.137 |
IF ( SEAICEadjMODE.GE.1 ) THEN |
1303 |
|
|
DO J=1,sNy |
1304 |
|
|
DO I=1,sNx |
1305 |
gforget |
1.105 |
C AREA(I,J,bi,bj) = 0.1 _d 0 * HEFF(I,J,bi,bj) |
1306 |
mlosch |
1.137 |
AREA(I,J,bi,bj) = AREApreTH(I,J) + 0.1 _d 0 * |
1307 |
gforget |
1.105 |
& ( HEFF(I,J,bi,bj) - HEFFpreTH(I,J) ) |
1308 |
mlosch |
1.137 |
ENDDO |
1309 |
gforget |
1.105 |
ENDDO |
1310 |
mlosch |
1.137 |
ENDIF |
1311 |
gforget |
1.105 |
#endif |
1312 |
|
|
|
1313 |
jmc |
1.104 |
C =================================================================== |
1314 |
|
|
C =============PART 5: determine ice salinity increments============= |
1315 |
|
|
C =================================================================== |
1316 |
gforget |
1.88 |
|
1317 |
ifenty |
1.119 |
#ifndef SEAICE_VARIABLE_SALINITY |
1318 |
mlosch |
1.137 |
# if (defined ALLOW_AUTODIFF_TAMC && defined ALLOW_SALT_PLUME) |
1319 |
gforget |
1.107 |
CADJ STORE d_HEFFbyNEG = comlev1_bibj,key=iicekey,byte=isbyte |
1320 |
dimitri |
1.113 |
CADJ STORE d_HEFFbyOCNonICE = comlev1_bibj,key=iicekey,byte=isbyte |
1321 |
|
|
CADJ STORE d_HEFFbyATMonOCN = comlev1_bibj,key=iicekey,byte=isbyte |
1322 |
dimitri |
1.114 |
CADJ STORE d_HEFFbyATMonOCN_open = comlev1_bibj,key=iicekey,byte=isbyte |
1323 |
|
|
CADJ STORE d_HEFFbyATMonOCN_cover = comlev1_bibj,key=iicekey,byte=isbyte |
1324 |
gforget |
1.107 |
CADJ STORE d_HEFFbyFLOODING = comlev1_bibj,key=iicekey,byte=isbyte |
1325 |
gforget |
1.141 |
CADJ STORE d_HEFFbySublim = comlev1_bibj,key=iicekey,byte=isbyte |
1326 |
gforget |
1.107 |
CADJ STORE salt(:,:,kSurface,bi,bj) = comlev1_bibj, |
1327 |
|
|
CADJ & key = iicekey, byte = isbyte |
1328 |
mlosch |
1.137 |
# endif /* ALLOW_AUTODIFF_TAMC and ALLOW_SALT_PLUME */ |
1329 |
gforget |
1.106 |
DO J=1,sNy |
1330 |
|
|
DO I=1,sNx |
1331 |
|
|
Cgf note: flooding does count negatively |
1332 |
jmc |
1.134 |
tmpscal1 = d_HEFFbyNEG(I,J) + d_HEFFbyOCNonICE(I,J) + |
1333 |
dimitri |
1.113 |
& d_HEFFbyATMonOCN(I,J) - d_HEFFbyFLOODING(I,J) |
1334 |
gforget |
1.141 |
#ifdef SEAICE_ADD_SUBLIMATION_TO_FWBUDGET |
1335 |
|
|
& + d_HEFFbySublim(I,J) |
1336 |
|
|
#endif |
1337 |
gforget |
1.106 |
tmpscal2 = tmpscal1 * SIsal0 * HEFFM(I,J,bi,bj) |
1338 |
ifenty |
1.118 |
& /SEAICE_deltaTtherm * SEAICE_rhoIce |
1339 |
gforget |
1.107 |
saltFlux(I,J,bi,bj) = tmpscal2 |
1340 |
gforget |
1.106 |
#ifdef ALLOW_SALT_PLUME |
1341 |
|
|
tmpscal3 = tmpscal1*salt(I,j,kSurface,bi,bj)*HEFFM(I,J,bi,bj) |
1342 |
ifenty |
1.118 |
& /SEAICE_deltaTtherm * SEAICE_rhoIce |
1343 |
gforget |
1.106 |
saltPlumeFlux(I,J,bi,bj) = MAX( tmpscal3-tmpscal2 , 0. _d 0) |
1344 |
gforget |
1.126 |
& *SPsalFRAC |
1345 |
gforget |
1.106 |
#endif /* ALLOW_SALT_PLUME */ |
1346 |
|
|
ENDDO |
1347 |
|
|
ENDDO |
1348 |
|
|
#endif |
1349 |
|
|
|
1350 |
gforget |
1.88 |
#ifdef ALLOW_ATM_TEMP |
1351 |
ifenty |
1.119 |
#ifdef SEAICE_VARIABLE_SALINITY |
1352 |
dimitri |
1.69 |
|
1353 |
gforget |
1.87 |
#ifdef SEAICE_GROWTH_LEGACY |
1354 |
gforget |
1.88 |
# ifdef ALLOW_AUTODIFF_TAMC |
1355 |
gforget |
1.105 |
CADJ STORE hsalt(:,:,bi,bj) = comlev1_bibj,key=iicekey,byte=isbyte |
1356 |
gforget |
1.88 |
# endif /* ALLOW_AUTODIFF_TAMC */ |
1357 |
dimitri |
1.69 |
DO J=1,sNy |
1358 |
|
|
DO I=1,sNx |
1359 |
|
|
C set HSALT = 0 if HSALT < 0 and compute salt to remove from ocean |
1360 |
|
|
IF ( HSALT(I,J,bi,bj) .LT. 0.0 ) THEN |
1361 |
|
|
saltFluxAdjust(I,J) = - HEFFM(I,J,bi,bj) * |
1362 |
|
|
& HSALT(I,J,bi,bj) / SEAICE_deltaTtherm |
1363 |
|
|
HSALT(I,J,bi,bj) = 0.0 _d 0 |
1364 |
|
|
ENDIF |
1365 |
|
|
ENDDO |
1366 |
|
|
ENDDO |
1367 |
gforget |
1.87 |
#endif /* SEAICE_GROWTH_LEGACY */ |
1368 |
dimitri |
1.69 |
|
1369 |
|
|
#ifdef ALLOW_AUTODIFF_TAMC |
1370 |
gforget |
1.105 |
CADJ STORE hsalt(:,:,bi,bj) = comlev1_bibj,key=iicekey,byte=isbyte |
1371 |
dimitri |
1.69 |
#endif /* ALLOW_AUTODIFF_TAMC */ |
1372 |
|
|
|
1373 |
|
|
DO J=1,sNy |
1374 |
|
|
DO I=1,sNx |
1375 |
jmc |
1.104 |
C sum up the terms that affect the salt content of the ice pack |
1376 |
dimitri |
1.114 |
tmpscal1=d_HEFFbyOCNonICE(I,J)+d_HEFFbyATMonOCN(I,J) |
1377 |
dimitri |
1.113 |
|
1378 |
jmc |
1.104 |
C recompute HEFF before thermodyncamic updates (which is not AREApreTH in legacy code) |
1379 |
gforget |
1.87 |
tmpscal2=HEFF(I,J,bi,bj)-tmpscal1-d_HEFFbyFLOODING(I,J) |
1380 |
gforget |
1.84 |
C tmpscal1 > 0 : m of sea ice that is created |
1381 |
|
|
IF ( tmpscal1 .GE. 0.0 ) THEN |
1382 |
dimitri |
1.69 |
saltFlux(I,J,bi,bj) = |
1383 |
gforget |
1.87 |
& HEFFM(I,J,bi,bj)/SEAICE_deltaTtherm |
1384 |
ifenty |
1.119 |
& *SIsalFRAC*salt(I,j,kSurface,bi,bj) |
1385 |
ifenty |
1.118 |
& *tmpscal1*SEAICE_rhoIce |
1386 |
dimitri |
1.69 |
#ifdef ALLOW_SALT_PLUME |
1387 |
|
|
C saltPlumeFlux is defined only during freezing: |
1388 |
|
|
saltPlumeFlux(I,J,bi,bj)= |
1389 |
gforget |
1.87 |
& HEFFM(I,J,bi,bj)/SEAICE_deltaTtherm |
1390 |
ifenty |
1.119 |
& *(1-SIsalFRAC)*salt(I,j,kSurface,bi,bj) |
1391 |
ifenty |
1.118 |
& *tmpscal1*SEAICE_rhoIce |
1392 |
gforget |
1.126 |
& *SPsalFRAC |
1393 |
dimitri |
1.69 |
C if SaltPlumeSouthernOcean=.FALSE. turn off salt plume in Southern Ocean |
1394 |
|
|
IF ( .NOT. SaltPlumeSouthernOcean ) THEN |
1395 |
|
|
IF ( YC(I,J,bi,bj) .LT. 0.0 _d 0 ) |
1396 |
|
|
& saltPlumeFlux(i,j,bi,bj) = 0.0 _d 0 |
1397 |
|
|
ENDIF |
1398 |
jmc |
1.104 |
#endif /* ALLOW_SALT_PLUME */ |
1399 |
dimitri |
1.69 |
|
1400 |
gforget |
1.84 |
C tmpscal1 < 0 : m of sea ice that is melted |
1401 |
dimitri |
1.69 |
ELSE |
1402 |
|
|
saltFlux(I,J,bi,bj) = |
1403 |
gforget |
1.87 |
& HEFFM(I,J,bi,bj)/SEAICE_deltaTtherm |
1404 |
|
|
& *HSALT(I,J,bi,bj) |
1405 |
|
|
& *tmpscal1/tmpscal2 |
1406 |
dimitri |
1.69 |
#ifdef ALLOW_SALT_PLUME |
1407 |
|
|
saltPlumeFlux(i,j,bi,bj) = 0.0 _d 0 |
1408 |
|
|
#endif /* ALLOW_SALT_PLUME */ |
1409 |
|
|
ENDIF |
1410 |
|
|
C update HSALT based on surface saltFlux |
1411 |
|
|
HSALT(I,J,bi,bj) = HSALT(I,J,bi,bj) + |
1412 |
|
|
& saltFlux(I,J,bi,bj) * SEAICE_deltaTtherm |
1413 |
|
|
saltFlux(I,J,bi,bj) = |
1414 |
|
|
& saltFlux(I,J,bi,bj) + saltFluxAdjust(I,J) |
1415 |
gforget |
1.87 |
#ifdef SEAICE_GROWTH_LEGACY |
1416 |
dimitri |
1.69 |
C set HSALT = 0 if HEFF = 0 and compute salt to dump into ocean |
1417 |
|
|
IF ( HEFF(I,J,bi,bj) .EQ. 0.0 ) THEN |
1418 |
|
|
saltFlux(I,J,bi,bj) = saltFlux(I,J,bi,bj) - |
1419 |
|
|
& HEFFM(I,J,bi,bj) * HSALT(I,J,bi,bj) / |
1420 |
|
|
& SEAICE_deltaTtherm |
1421 |
|
|
HSALT(I,J,bi,bj) = 0.0 _d 0 |
1422 |
|
|
#ifdef ALLOW_SALT_PLUME |
1423 |
|
|
saltPlumeFlux(i,j,bi,bj) = 0.0 _d 0 |
1424 |
|
|
#endif /* ALLOW_SALT_PLUME */ |
1425 |
|
|
ENDIF |
1426 |
gforget |
1.87 |
#endif /* SEAICE_GROWTH_LEGACY */ |
1427 |
dimitri |
1.69 |
ENDDO |
1428 |
|
|
ENDDO |
1429 |
ifenty |
1.119 |
#endif /* SEAICE_VARIABLE_SALINITY */ |
1430 |
dimitri |
1.69 |
#endif /* ALLOW_ATM_TEMP */ |
1431 |
|
|
|
1432 |
gforget |
1.75 |
|
1433 |
jmc |
1.104 |
C ======================================================================= |
1434 |
|
|
C =====LEGACY PART 5.5: treat pathological cases, then do flooding ====== |
1435 |
|
|
C ======================================================================= |
1436 |
gforget |
1.72 |
|
1437 |
gforget |
1.87 |
#ifdef SEAICE_GROWTH_LEGACY |
1438 |
|
|
|
1439 |
jmc |
1.91 |
C treat values of ice cover fraction oustide |
1440 |
gforget |
1.75 |
C the [0 1] range, and other such issues. |
1441 |
|
|
C =========================================== |
1442 |
|
|
|
1443 |
jmc |
1.104 |
Cgf note: this part cannot be heat and water conserving |
1444 |
gforget |
1.76 |
|
1445 |
dimitri |
1.69 |
#ifdef ALLOW_AUTODIFF_TAMC |
1446 |
|
|
CADJ STORE area(:,:,bi,bj) = comlev1_bibj, |
1447 |
|
|
CADJ & key = iicekey, byte = isbyte |
1448 |
|
|
CADJ STORE heff(:,:,bi,bj) = comlev1_bibj, |
1449 |
|
|
CADJ & key = iicekey, byte = isbyte |
1450 |
|
|
#endif /* ALLOW_AUTODIFF_TAMC */ |
1451 |
|
|
DO J=1,sNy |
1452 |
|
|
DO I=1,sNx |
1453 |
|
|
C NOW SET AREA(I,J,bi,bj)=0 WHERE NO ICE IS |
1454 |
|
|
AREA(I,J,bi,bj)=MIN(AREA(I,J,bi,bj) |
1455 |
|
|
& ,HEFF(I,J,bi,bj)/.0001 _d 0) |
1456 |
|
|
ENDDO |
1457 |
|
|
ENDDO |
1458 |
gforget |
1.75 |
|
1459 |
dimitri |
1.69 |
#ifdef ALLOW_AUTODIFF_TAMC |
1460 |
|
|
CADJ STORE area(:,:,bi,bj) = comlev1_bibj, |
1461 |
|
|
CADJ & key = iicekey, byte = isbyte |
1462 |
|
|
#endif /* ALLOW_AUTODIFF_TAMC */ |
1463 |
|
|
DO J=1,sNy |
1464 |
|
|
DO I=1,sNx |
1465 |
|
|
C NOW TRUNCATE AREA |
1466 |
|
|
AREA(I,J,bi,bj)=MIN(ONE,AREA(I,J,bi,bj)) |
1467 |
|
|
ENDDO |
1468 |
|
|
ENDDO |
1469 |
gforget |
1.75 |
|
1470 |
dimitri |
1.69 |
#ifdef ALLOW_AUTODIFF_TAMC |
1471 |
|
|
CADJ STORE area(:,:,bi,bj) = comlev1_bibj, |
1472 |
|
|
CADJ & key = iicekey, byte = isbyte |
1473 |
|
|
CADJ STORE hsnow(:,:,bi,bj) = comlev1_bibj, |
1474 |
|
|
CADJ & key = iicekey, byte = isbyte |
1475 |
|
|
#endif /* ALLOW_AUTODIFF_TAMC */ |
1476 |
|
|
DO J=1,sNy |
1477 |
|
|
DO I=1,sNx |
1478 |
|
|
AREA(I,J,bi,bj) = MAX(ZERO,AREA(I,J,bi,bj)) |
1479 |
|
|
HSNOW(I,J,bi,bj) = MAX(ZERO,HSNOW(I,J,bi,bj)) |
1480 |
|
|
AREA(I,J,bi,bj) = AREA(I,J,bi,bj)*HEFFM(I,J,bi,bj) |
1481 |
|
|
HEFF(I,J,bi,bj) = HEFF(I,J,bi,bj)*HEFFM(I,J,bi,bj) |
1482 |
|
|
#ifdef SEAICE_CAP_HEFF |
1483 |
mlosch |
1.97 |
C This is not energy conserving, but at least it conserves fresh water |
1484 |
mlosch |
1.103 |
tmpscal0 = -MAX(HEFF(I,J,bi,bj)-MAX_HEFF,0. _d 0) |
1485 |
|
|
d_HEFFbyNeg(I,J) = d_HEFFbyNeg(I,J) + tmpscal0 |
1486 |
|
|
HEFF(I,J,bi,bj) = HEFF(I,J,bi,bj) + tmpscal0 |
1487 |
dimitri |
1.69 |
#endif /* SEAICE_CAP_HEFF */ |
1488 |
|
|
HSNOW(I,J,bi,bj) = HSNOW(I,J,bi,bj)*HEFFM(I,J,bi,bj) |
1489 |
|
|
ENDDO |
1490 |
|
|
ENDDO |
1491 |
|
|
|
1492 |
gforget |
1.75 |
C convert snow to ice if submerged. |
1493 |
|
|
C ================================= |
1494 |
|
|
|
1495 |
dimitri |
1.69 |
#ifdef ALLOW_SEAICE_FLOODING |
1496 |
|
|
IF ( SEAICEuseFlooding ) THEN |
1497 |
|
|
DO J=1,sNy |
1498 |
|
|
DO I=1,sNx |
1499 |
|
|
hDraft = (HSNOW(I,J,bi,bj)*SEAICE_rhoSnow |
1500 |
gforget |
1.85 |
& +HEFF(I,J,bi,bj)*SEAICE_rhoIce)/rhoConst |
1501 |
jmc |
1.86 |
tmpscal1 = MAX( 0. _d 0, hDraft - HEFF(I,J,bi,bj)) |
1502 |
gforget |
1.84 |
d_HEFFbyFLOODING(I,J)=tmpscal1 |
1503 |
|
|
HEFF(I,J,bi,bj) = HEFF(I,J,bi,bj)+d_HEFFbyFLOODING(I,J) |
1504 |
|
|
HSNOW(I,J,bi,bj) = HSNOW(I,J,bi,bj)- |
1505 |
jmc |
1.91 |
& d_HEFFbyFLOODING(I,J)*ICE2SNOW |
1506 |
dimitri |
1.69 |
ENDDO |
1507 |
|
|
ENDDO |
1508 |
|
|
ENDIF |
1509 |
|
|
#endif /* ALLOW_SEAICE_FLOODING */ |
1510 |
|
|
|
1511 |
gforget |
1.87 |
#endif /* SEAICE_GROWTH_LEGACY */ |
1512 |
gforget |
1.75 |
|
1513 |
gforget |
1.124 |
#ifdef ALLOW_SITRACER |
1514 |
|
|
DO J=1,sNy |
1515 |
|
|
DO I=1,sNx |
1516 |
|
|
c needs to be here to allow use also with LEGACY branch |
1517 |
|
|
SItrHEFF(I,J,bi,bj,5)=HEFF(I,J,bi,bj) |
1518 |
|
|
ENDDO |
1519 |
|
|
ENDDO |
1520 |
|
|
#endif |
1521 |
gforget |
1.75 |
|
1522 |
jmc |
1.104 |
C =================================================================== |
1523 |
|
|
C ===============PART 6: determine ice age increments================ |
1524 |
|
|
C =================================================================== |
1525 |
gforget |
1.75 |
|
1526 |
dimitri |
1.69 |
#ifdef SEAICE_AGE |
1527 |
|
|
C Sources and sinks for sea ice age: |
1528 |
|
|
C assume that a) freezing: new ice fraction forms with zero age |
1529 |
|
|
C b) melting: ice fraction vanishes with current age |
1530 |
|
|
DO J=1,sNy |
1531 |
|
|
DO I=1,sNx |
1532 |
heimbach |
1.120 |
C-- increase age as time passes |
1533 |
|
|
IceAgeTr(i,j,bi,bj,1)=IceAgeTr(i,j,bi,bj,1) |
1534 |
|
|
& +SEAICE_deltaTtherm*AREApreTH(i,j) |
1535 |
|
|
IceAgeTr(i,j,bi,bj,2)=IceAgeTr(i,j,bi,bj,2) |
1536 |
|
|
& +SEAICE_deltaTtherm*HEFFpreTH(i,j) |
1537 |
|
|
C-- account for ice melt |
1538 |
|
|
IF (AREApreTH(i,j).GT.AREA(i,j,bi,bj)) THEN |
1539 |
|
|
IceAgeTr(i,j,bi,bj,1)=IceAgeTr(i,j,bi,bj,1) |
1540 |
|
|
& *AREA(i,j,bi,bj)/AREApreTH(i,j) |
1541 |
|
|
ENDIF |
1542 |
|
|
IF (HEFFpreTH(i,j).GT.HEFF(i,j,bi,bj)) THEN |
1543 |
|
|
IceAgeTr(i,j,bi,bj,2)=IceAgeTr(i,j,bi,bj,2) |
1544 |
|
|
& *HEFF(i,j,bi,bj)/HEFFpreTH(i,j) |
1545 |
|
|
ENDIF |
1546 |
dimitri |
1.69 |
ENDDO |
1547 |
|
|
ENDDO |
1548 |
|
|
#endif /* SEAICE_AGE */ |
1549 |
|
|
|
1550 |
gforget |
1.88 |
|
1551 |
jmc |
1.104 |
C =================================================================== |
1552 |
|
|
C ==============PART 7: determine ocean model forcing================ |
1553 |
|
|
C =================================================================== |
1554 |
gforget |
1.88 |
|
1555 |
jmc |
1.91 |
C compute net heat flux leaving/entering the ocean, |
1556 |
gforget |
1.88 |
C accounting for the part used in melt/freeze processes |
1557 |
|
|
C ===================================================== |
1558 |
|
|
|
1559 |
|
|
DO J=1,sNy |
1560 |
|
|
DO I=1,sNx |
1561 |
gforget |
1.89 |
QNET(I,J,bi,bj) = r_QbyATM_cover(I,J) + r_QbyATM_open(I,J) |
1562 |
jmc |
1.134 |
#ifndef SEAICE_GROWTH_LEGACY |
1563 |
|
|
C in principle a_QSWbyATM_cover should always be included here, however |
1564 |
gforget |
1.121 |
C for backward compatibility it is left out of the LEGACY branch |
1565 |
dimitri |
1.113 |
& + a_QSWbyATM_cover(I,J) |
1566 |
gforget |
1.125 |
#endif /* SEAICE_GROWTH_LEGACY */ |
1567 |
dimitri |
1.113 |
& - ( d_HEFFbyOCNonICE(I,J) + |
1568 |
|
|
& d_HSNWbyOCNonSNW(I,J)/ICE2SNOW + |
1569 |
jmc |
1.91 |
& d_HEFFbyNEG(I,J) + |
1570 |
gforget |
1.88 |
& d_HSNWbyNEG(I,J)/ICE2SNOW ) |
1571 |
|
|
& * maskC(I,J,kSurface,bi,bj) |
1572 |
|
|
QSW(I,J,bi,bj) = a_QSWbyATM_cover(I,J) + a_QSWbyATM_open(I,J) |
1573 |
|
|
ENDDO |
1574 |
|
|
ENDDO |
1575 |
|
|
|
1576 |
jmc |
1.104 |
C switch heat fluxes from 'effective' ice meters to W/m2 |
1577 |
gforget |
1.88 |
C ====================================================== |
1578 |
gforget |
1.83 |
|
1579 |
|
|
DO J=1,sNy |
1580 |
|
|
DO I=1,sNx |
1581 |
|
|
QNET(I,J,bi,bj) = QNET(I,J,bi,bj)*convertHI2Q |
1582 |
|
|
QSW(I,J,bi,bj) = QSW(I,J,bi,bj)*convertHI2Q |
1583 |
|
|
ENDDO |
1584 |
|
|
ENDDO |
1585 |
jmc |
1.91 |
|
1586 |
gforget |
1.142 |
#ifdef SEAICE_HEAT_CONSERV_FIX |
1587 |
|
|
#ifndef SEAICE_GROWTH_LEGACY |
1588 |
|
|
c Unlike for evap and precip, the temperature of gained/lost |
1589 |
|
|
c ocean liquid water due to melt/freeze of solid water cannot be chosen |
1590 |
|
|
c to be e.g. the ocean SST. It must be done at 0degC. The fix below anticipates |
1591 |
|
|
c on external_forcing_surf.F and applies the correction to QNET. |
1592 |
|
|
IF ((convertFW2Salt.EQ.-1.).OR.(temp_EvPrRn.EQ.UNSET_RL)) THEN |
1593 |
|
|
c I leave alone the exotic case when onvertFW2Salt.NE.-1 and temp_EvPrRn.NE.UNSET_RL and |
1594 |
|
|
c the small error of the synchronous time stepping case (see external_forcing_surf.F). |
1595 |
|
|
DO J=1,sNy |
1596 |
|
|
DO I=1,sNx |
1597 |
|
|
c store unaltered QNET for diagnostic purposes |
1598 |
|
|
DIAGarrayA(I,J)=-QNET(I,J,bi,bj) |
1599 |
|
|
c compute the ocean water going to ice/snow, in precip units |
1600 |
|
|
tmpscal3=rhoConstFresh*maskC(I,J,kSurface,bi,bj)* |
1601 |
|
|
& ( d_HSNWbyATMonSNW(I,J)/ICE2SNOW |
1602 |
|
|
& + d_HSNWbyOCNonSNW(I,J)/ICE2SNOW |
1603 |
|
|
& + d_HEFFbyOCNonICE(I,J) + d_HEFFbyATMonOCN(I,J) |
1604 |
|
|
& + d_HEFFbyNEG(I,J) + d_HSNWbyNEG(I,J)/ICE2SNOW ) |
1605 |
|
|
& * convertHI2PRECIP |
1606 |
|
|
c factor in the heat content that external_forcing_surf.F |
1607 |
|
|
c will associate with EMPMR, and remove it from QNET, so that |
1608 |
|
|
c melt/freez water is in effect consistently gained/lost at 0degC |
1609 |
|
|
IF (temp_EvPrRn.NE.UNSET_RL) THEN |
1610 |
|
|
QNET(I,J,bi,bj)=QNET(I,J,bi,bj) - tmpscal3* |
1611 |
|
|
& HeatCapacity_Cp * temp_EvPrRn |
1612 |
|
|
ELSE |
1613 |
|
|
QNET(I,J,bi,bj)=QNET(I,J,bi,bj) - tmpscal3* |
1614 |
|
|
& HeatCapacity_Cp * theta(I,J,kSurface,bi,bj) |
1615 |
|
|
ENDIF |
1616 |
|
|
ENDDO |
1617 |
|
|
ENDDO |
1618 |
|
|
#ifdef ALLOW_DIAGNOSTICS |
1619 |
|
|
c temporary (?) output of unaltered QNET using SDIAG6 |
1620 |
|
|
CALL DIAGNOSTICS_FILL(DIAGarrayA, |
1621 |
|
|
& 'SDIAG6 ',0,1,3,bi,bj,myThid) |
1622 |
|
|
#endif |
1623 |
|
|
ENDIF |
1624 |
|
|
#endif |
1625 |
|
|
#endif |
1626 |
|
|
|
1627 |
jmc |
1.91 |
C compute net fresh water flux leaving/entering |
1628 |
gforget |
1.88 |
C the ocean, accounting for fresh/salt water stocks. |
1629 |
|
|
C ================================================== |
1630 |
|
|
|
1631 |
|
|
#ifdef ALLOW_ATM_TEMP |
1632 |
|
|
DO J=1,sNy |
1633 |
|
|
DO I=1,sNx |
1634 |
dimitri |
1.113 |
tmpscal1= d_HSNWbyATMonSNW(I,J)/ICE2SNOW |
1635 |
mlosch |
1.109 |
& +d_HFRWbyRAIN(I,J) |
1636 |
dimitri |
1.113 |
& +d_HSNWbyOCNonSNW(I,J)/ICE2SNOW |
1637 |
|
|
& +d_HEFFbyOCNonICE(I,J) |
1638 |
|
|
& +d_HEFFbyATMonOCN(I,J) |
1639 |
mlosch |
1.109 |
& +d_HEFFbyNEG(I,J) |
1640 |
|
|
& +d_HSNWbyNEG(I,J)/ICE2SNOW |
1641 |
|
|
#ifdef SEAICE_ADD_SUBLIMATION_TO_FWBUDGET |
1642 |
gforget |
1.133 |
C If r_FWbySublim>0, then it is evaporated from ocean. |
1643 |
gforget |
1.125 |
& +r_FWbySublim(I,J) |
1644 |
mlosch |
1.109 |
#endif /* SEAICE_ADD_SUBLIMATION_TO_FWBUDGET */ |
1645 |
gforget |
1.88 |
EmPmR(I,J,bi,bj) = maskC(I,J,kSurface,bi,bj)*( |
1646 |
|
|
& ( EVAP(I,J,bi,bj)-PRECIP(I,J,bi,bj) ) |
1647 |
|
|
& * ( ONE - AREApreTH(I,J) ) |
1648 |
|
|
#ifdef ALLOW_RUNOFF |
1649 |
|
|
& - RUNOFF(I,J,bi,bj) |
1650 |
mlosch |
1.109 |
#endif /* ALLOW_RUNOFF */ |
1651 |
gforget |
1.88 |
& + tmpscal1*convertHI2PRECIP |
1652 |
|
|
& )*rhoConstFresh |
1653 |
|
|
ENDDO |
1654 |
|
|
ENDDO |
1655 |
|
|
|
1656 |
|
|
#ifdef ALLOW_MEAN_SFLUX_COST_CONTRIBUTION |
1657 |
|
|
DO J=1,sNy |
1658 |
|
|
DO I=1,sNx |
1659 |
|
|
frWtrAtm(I,J,bi,bj) = maskC(I,J,kSurface,bi,bj)*( |
1660 |
|
|
& PRECIP(I,J,bi,bj) |
1661 |
|
|
& - EVAP(I,J,bi,bj) |
1662 |
|
|
& *( ONE - AREApreTH(I,J) ) |
1663 |
|
|
& + RUNOFF(I,J,bi,bj) |
1664 |
|
|
& )*rhoConstFresh |
1665 |
jmc |
1.134 |
#ifdef SEAICE_ADD_SUBLIMATION_TO_FWBUDGET |
1666 |
gforget |
1.133 |
& - a_FWbySublim(I,J) * SEAICE_rhoIce / SEAICE_deltaTtherm |
1667 |
|
|
#endif /* SEAICE_ADD_SUBLIMATION_TO_FWBUDGET */ |
1668 |
gforget |
1.88 |
ENDDO |
1669 |
|
|
ENDDO |
1670 |
|
|
#endif |
1671 |
|
|
#endif /* ALLOW_ATM_TEMP */ |
1672 |
|
|
|
1673 |
gforget |
1.96 |
#ifdef SEAICE_DEBUG |
1674 |
mlosch |
1.137 |
CALL PLOT_FIELD_XYRL( QSW,'Current QSW ', myIter, myThid ) |
1675 |
|
|
CALL PLOT_FIELD_XYRL( QNET,'Current QNET ', myIter, myThid ) |
1676 |
|
|
CALL PLOT_FIELD_XYRL( EmPmR,'Current EmPmR ', myIter, myThid ) |
1677 |
gforget |
1.96 |
#endif /* SEAICE_DEBUG */ |
1678 |
gforget |
1.88 |
|
1679 |
|
|
C Sea Ice Load on the sea surface. |
1680 |
|
|
C ================================= |
1681 |
|
|
|
1682 |
gforget |
1.105 |
#ifdef ALLOW_AUTODIFF_TAMC |
1683 |
|
|
CADJ STORE heff(:,:,bi,bj) = comlev1_bibj,key=iicekey,byte=isbyte |
1684 |
|
|
CADJ STORE hsnow(:,:,bi,bj) = comlev1_bibj,key=iicekey,byte=isbyte |
1685 |
|
|
#endif /* ALLOW_AUTODIFF_TAMC */ |
1686 |
|
|
|
1687 |
gforget |
1.88 |
IF ( useRealFreshWaterFlux ) THEN |
1688 |
|
|
DO J=1,sNy |
1689 |
|
|
DO I=1,sNx |
1690 |
gforget |
1.92 |
#ifdef SEAICE_CAP_ICELOAD |
1691 |
|
|
tmpscal1 = HEFF(I,J,bi,bj)*SEAICE_rhoIce |
1692 |
|
|
& + HSNOW(I,J,bi,bj)*SEAICE_rhoSnow |
1693 |
jmc |
1.94 |
tmpscal2 = min(tmpscal1,heffTooHeavy*rhoConst) |
1694 |
|
|
#else |
1695 |
gforget |
1.92 |
tmpscal2 = HEFF(I,J,bi,bj)*SEAICE_rhoIce |
1696 |
|
|
& + HSNOW(I,J,bi,bj)*SEAICE_rhoSnow |
1697 |
|
|
#endif |
1698 |
|
|
sIceLoad(i,j,bi,bj) = tmpscal2 |
1699 |
gforget |
1.88 |
ENDDO |
1700 |
|
|
ENDDO |
1701 |
|
|
ENDIF |
1702 |
|
|
|
1703 |
gforget |
1.125 |
C =================================================================== |
1704 |
|
|
C ======================PART 8: diagnostics========================== |
1705 |
|
|
C =================================================================== |
1706 |
|
|
|
1707 |
|
|
#ifdef ALLOW_DIAGNOSTICS |
1708 |
|
|
IF ( useDiagnostics ) THEN |
1709 |
gforget |
1.130 |
tmpscal1=1. _d 0 / SEAICE_deltaTtherm |
1710 |
|
|
CALL DIAGNOSTICS_SCALE_FILL(a_QbyATM_cover, |
1711 |
|
|
& tmpscal1,1,'SIaQbATC',0,1,3,bi,bj,myThid) |
1712 |
|
|
CALL DIAGNOSTICS_SCALE_FILL(a_QbyATM_open, |
1713 |
|
|
& tmpscal1,1,'SIaQbATO',0,1,3,bi,bj,myThid) |
1714 |
|
|
CALL DIAGNOSTICS_SCALE_FILL(a_QbyOCN, |
1715 |
|
|
& tmpscal1,1,'SIaQbOCN',0,1,3,bi,bj,myThid) |
1716 |
|
|
CALL DIAGNOSTICS_SCALE_FILL(d_HEFFbyOCNonICE, |
1717 |
|
|
& tmpscal1,1,'SIdHbOCN',0,1,3,bi,bj,myThid) |
1718 |
|
|
CALL DIAGNOSTICS_SCALE_FILL(d_HEFFbyATMonOCN_cover, |
1719 |
|
|
& tmpscal1,1,'SIdHbATC',0,1,3,bi,bj,myThid) |
1720 |
|
|
CALL DIAGNOSTICS_SCALE_FILL(d_HEFFbyATMonOCN_open, |
1721 |
|
|
& tmpscal1,1,'SIdHbATO',0,1,3,bi,bj,myThid) |
1722 |
|
|
CALL DIAGNOSTICS_SCALE_FILL(d_HEFFbyFLOODING, |
1723 |
|
|
& tmpscal1,1,'SIdHbFLO',0,1,3,bi,bj,myThid) |
1724 |
|
|
CALL DIAGNOSTICS_SCALE_FILL(d_HSNWbyOCNonSNW, |
1725 |
|
|
& tmpscal1,1,'SIdSbOCN',0,1,3,bi,bj,myThid) |
1726 |
|
|
CALL DIAGNOSTICS_SCALE_FILL(d_HSNWbyATMonSNW, |
1727 |
|
|
& tmpscal1,1,'SIdSbATC',0,1,3,bi,bj,myThid) |
1728 |
|
|
CALL DIAGNOSTICS_SCALE_FILL(d_AREAbyATM, |
1729 |
|
|
& tmpscal1,1,'SIdAbATO',0,1,3,bi,bj,myThid) |
1730 |
|
|
CALL DIAGNOSTICS_SCALE_FILL(d_AREAbyICE, |
1731 |
|
|
& tmpscal1,1,'SIdAbATC',0,1,3,bi,bj,myThid) |
1732 |
|
|
CALL DIAGNOSTICS_SCALE_FILL(d_AREAbyOCN, |
1733 |
jmc |
1.134 |
& tmpscal1,1,'SIdAbOCN',0,1,3,bi,bj,myThid) |
1734 |
gforget |
1.125 |
CALL DIAGNOSTICS_SCALE_FILL(r_QbyATM_open, |
1735 |
gforget |
1.130 |
& convertHI2Q,1, 'SIqneto ',0,1,3,bi,bj,myThid) |
1736 |
gforget |
1.125 |
CALL DIAGNOSTICS_SCALE_FILL(r_QbyATM_cover, |
1737 |
gforget |
1.130 |
& convertHI2Q,1, 'SIqneti ',0,1,3,bi,bj,myThid) |
1738 |
gforget |
1.125 |
C three that actually need intermediate storage |
1739 |
|
|
DO J=1,sNy |
1740 |
|
|
DO I=1,sNx |
1741 |
jmc |
1.134 |
DIAGarrayA(I,J) = maskC(I,J,kSurface,bi,bj) |
1742 |
gforget |
1.125 |
& * d_HSNWbyRAIN(I,J)*SEAICE_rhoSnow/SEAICE_deltaTtherm |
1743 |
gforget |
1.128 |
DIAGarrayB(I,J) = AREA(I,J,bi,bj)-AREApreTH(I,J) |
1744 |
gforget |
1.125 |
ENDDO |
1745 |
|
|
ENDDO |
1746 |
gforget |
1.130 |
CALL DIAGNOSTICS_FILL(DIAGarrayA, |
1747 |
|
|
& 'SIsnPrcp',0,1,3,bi,bj,myThid) |
1748 |
|
|
CALL DIAGNOSTICS_SCALE_FILL(DIAGarrayB, |
1749 |
|
|
& tmpscal1,1,'SIdA ',0,1,3,bi,bj,myThid) |
1750 |
gforget |
1.132 |
C |
1751 |
|
|
DO J=1,sNy |
1752 |
|
|
DO I=1,sNx |
1753 |
jmc |
1.134 |
CML If I consider the atmosphere above the ice, the surface flux |
1754 |
|
|
CML which is relevant for the air temperature dT/dt Eq |
1755 |
gforget |
1.132 |
CML accounts for sensible and radiation (with different treatment |
1756 |
|
|
CML according to wave-length) fluxes but not for "latent heat flux", |
1757 |
|
|
CML since it does not contribute to heating the air. |
1758 |
|
|
CML So this diagnostic is only good for heat budget calculations within |
1759 |
|
|
CML the ice-ocean system. |
1760 |
|
|
DIAGarrayA(I,J) = maskC(I,J,kSurface,bi,bj)*convertHI2Q*( |
1761 |
|
|
#ifndef SEAICE_GROWTH_LEGACY |
1762 |
|
|
& a_QSWbyATM_cover(I,J) + |
1763 |
jmc |
1.134 |
#endif /* SEAICE_GROWTH_LEGACY */ |
1764 |
gforget |
1.132 |
& a_QbyATM_cover(I,J) + a_QbyATM_open(I,J) ) |
1765 |
|
|
C |
1766 |
|
|
DIAGarrayB(I,J) = maskC(I,J,kSurface,bi,bj) * |
1767 |
|
|
& a_FWbySublim(I,J) * SEAICE_rhoIce / SEAICE_deltaTtherm |
1768 |
|
|
C |
1769 |
|
|
DIAGarrayC(I,J) = maskC(I,J,kSurface,bi,bj)*( |
1770 |
|
|
& PRECIP(I,J,bi,bj) |
1771 |
|
|
& - EVAP(I,J,bi,bj)*( ONE - AREApreTH(I,J) ) |
1772 |
|
|
#ifdef ALLOW_RUNOFF |
1773 |
|
|
& + RUNOFF(I,J,bi,bj) |
1774 |
|
|
#endif /* ALLOW_RUNOFF */ |
1775 |
|
|
& )*rhoConstFresh |
1776 |
jmc |
1.134 |
#ifdef SEAICE_ADD_SUBLIMATION_TO_FWBUDGET |
1777 |
gforget |
1.132 |
& - a_FWbySublim(I,J) * SEAICE_rhoIce / SEAICE_deltaTtherm |
1778 |
|
|
#endif /* SEAICE_ADD_SUBLIMATION_TO_FWBUDGET */ |
1779 |
|
|
ENDDO |
1780 |
|
|
ENDDO |
1781 |
|
|
CALL DIAGNOSTICS_FILL(DIAGarrayA, |
1782 |
|
|
& 'SIatmQnt',0,1,3,bi,bj,myThid) |
1783 |
|
|
CALL DIAGNOSTICS_FILL(DIAGarrayB, |
1784 |
|
|
& 'SIfwSubl',0,1,3,bi,bj,myThid) |
1785 |
|
|
CALL DIAGNOSTICS_FILL(DIAGarrayC, |
1786 |
|
|
& 'SIatmFW ',0,1,3,bi,bj,myThid) |
1787 |
|
|
C |
1788 |
mlosch |
1.137 |
DO J=1,sNy |
1789 |
|
|
DO I=1,sNx |
1790 |
jmc |
1.134 |
C the actual Freshwater flux of sublimated ice, >0 decreases ice |
1791 |
mlosch |
1.137 |
DIAGarrayA(I,J) = maskC(I,J,kSurface,bi,bj) |
1792 |
jmc |
1.134 |
& * (a_FWbySublim(I,J)-r_FWbySublim(I,J)) |
1793 |
gforget |
1.132 |
& * SEAICE_rhoIce / SEAICE_deltaTtherm |
1794 |
ifenty |
1.135 |
c the residual Freshwater flux of sublimated ice |
1795 |
mlosch |
1.137 |
DIAGarrayC(I,J) = maskC(I,J,kSurface,bi,bj) |
1796 |
ifenty |
1.135 |
& * r_FWbySublim(I,J) |
1797 |
|
|
& * SEAICE_rhoIce / SEAICE_deltaTtherm |
1798 |
gforget |
1.132 |
C the latent heat flux |
1799 |
jmc |
1.134 |
#ifdef SEAICE_ADD_SUBLIMATION_TO_FWBUDGET |
1800 |
mlosch |
1.137 |
tmpscal1= EVAP(I,J,bi,bj)*( ONE - AREApreTH(I,J) ) |
1801 |
|
|
& + r_FWbySublim(I,J)*convertHI2PRECIP |
1802 |
|
|
tmpscal2= ( a_FWbySublim(I,J)-r_FWbySublim(I,J) ) |
1803 |
|
|
& * convertHI2PRECIP |
1804 |
gforget |
1.132 |
#else |
1805 |
mlosch |
1.137 |
tmpscal1= EVAP(I,J,bi,bj)*( ONE - AREApreTH(I,J) ) |
1806 |
|
|
tmpscal2= 0. _d 0 |
1807 |
gforget |
1.132 |
#endif |
1808 |
mlosch |
1.137 |
tmpscal3= SEAICE_lhEvap+SEAICE_lhFusion |
1809 |
|
|
DIAGarrayB(I,J) = -maskC(I,J,kSurface,bi,bj)*rhoConstFresh |
1810 |
|
|
& * ( tmpscal1*SEAICE_lhEvap + tmpscal2*tmpscal3 ) |
1811 |
|
|
ENDDO |
1812 |
gforget |
1.132 |
ENDDO |
1813 |
mlosch |
1.137 |
CALL DIAGNOSTICS_FILL(DIAGarrayA,'SIacSubl',0,1,3,bi,bj,myThid) |
1814 |
|
|
CALL DIAGNOSTICS_FILL(DIAGarrayC,'SIrsSubl',0,1,3,bi,bj,myThid) |
1815 |
|
|
CALL DIAGNOSTICS_FILL(DIAGarrayB,'SIhl ',0,1,3,bi,bj,myThid) |
1816 |
gforget |
1.142 |
|
1817 |
|
|
#ifdef SEAICE_HEAT_CONSERV_FIX |
1818 |
|
|
DO J=1,sNy |
1819 |
|
|
DO I=1,sNx |
1820 |
|
|
c compute ice/snow water going to atm, in precip units |
1821 |
|
|
tmpscal1 = rhoConstFresh*maskC(I,J,kSurface,bi,bj) |
1822 |
|
|
& * convertHI2PRECIP * ( - d_HSNWbyRAIN(I,J)/ICE2SNOW |
1823 |
|
|
& + a_FWbySublim(I,J) - r_FWbySublim(I,J) ) |
1824 |
|
|
c compute ocean water going to atm, in precip units |
1825 |
|
|
tmpscal2=rhoConstFresh*maskC(I,J,kSurface,bi,bj)* |
1826 |
|
|
& ( ( EVAP(I,J,bi,bj)-PRECIP(I,J,bi,bj) ) |
1827 |
|
|
& * ( ONE - AREApreTH(I,J) ) - RUNOFF(I,J,bi,bj) |
1828 |
|
|
& + ( d_HFRWbyRAIN(I,J) + r_FWbySublim(I,J) ) |
1829 |
|
|
& *convertHI2PRECIP ) |
1830 |
|
|
c factor in the advected specific energy (referenced to 0 for 0deC liquid water) |
1831 |
|
|
tmpscal1= - tmpscal1* |
1832 |
|
|
& ( -SEAICE_lhFusion + HeatCapacity_Cp * ZERO ) |
1833 |
|
|
IF (temp_EvPrRn.NE.UNSET_RL) THEN |
1834 |
|
|
tmpscal2= - tmpscal2* |
1835 |
|
|
& ( ZERO + HeatCapacity_Cp * temp_EvPrRn ) |
1836 |
|
|
ELSE |
1837 |
|
|
tmpscal2= - tmpscal2* |
1838 |
|
|
& ( ZERO + HeatCapacity_Cp * theta(I,J,kSurface,bi,bj) ) |
1839 |
|
|
ENDIF |
1840 |
|
|
c add to SIatmQnt, leading to SItflux, which is analogous to TFLUX |
1841 |
|
|
DIAGarrayA(I,J)=maskC(I,J,kSurface,bi,bj)*convertHI2Q*( |
1842 |
|
|
#ifndef SEAICE_GROWTH_LEGACY |
1843 |
|
|
& a_QSWbyATM_cover(I,J) + |
1844 |
|
|
#endif |
1845 |
|
|
& a_QbyATM_cover(I,J) + a_QbyATM_open(I,J) ) |
1846 |
|
|
& -tmpscal1-tmpscal2 |
1847 |
|
|
ENDDO |
1848 |
|
|
ENDDO |
1849 |
|
|
CALL DIAGNOSTICS_FILL(DIAGarrayA, |
1850 |
|
|
c until SItflux is added to diags, output it using SDIAG5 |
1851 |
|
|
& 'SDIAG5 ',0,1,3,bi,bj,myThid) |
1852 |
|
|
#endif |
1853 |
|
|
|
1854 |
gforget |
1.125 |
ENDIF |
1855 |
gforget |
1.132 |
#endif /* ALLOW_DIAGNOSTICS */ |
1856 |
gforget |
1.142 |
|
1857 |
gforget |
1.88 |
C close bi,bj loops |
1858 |
dimitri |
1.69 |
ENDDO |
1859 |
|
|
ENDDO |
1860 |
mlosch |
1.137 |
|
1861 |
dimitri |
1.69 |
RETURN |
1862 |
|
|
END |