1 |
C $Header: /u/gcmpack/MITgcm/pkg/aim_v23/aim_sice_impl.F,v 1.2 2004/06/24 23:43:11 jmc Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "AIM_OPTIONS.h" |
5 |
c#ifdef ALLOW_THSICE |
6 |
c#include "THSICE_OPTIONS.h" |
7 |
c#endif |
8 |
|
9 |
CBOP |
10 |
C !ROUTINE: AIM_SICE_IMPL |
11 |
C !INTERFACE: |
12 |
SUBROUTINE AIM_SICE_IMPL( |
13 |
I FMASK, netSW, sFlx, |
14 |
I Shf0, dShf, Evp0, dEvp, Slr0, dSlr, |
15 |
U Tsurf, SHF, EVAP, SLRU, |
16 |
O dTsurf, |
17 |
I bi, bj, myTime, myIter, myThid) |
18 |
|
19 |
C !DESCRIPTION: \bv |
20 |
C *==========================================================* |
21 |
C | S/R AIM_SICE_IMPL |
22 |
C | o AIM Interface to the implicit part of the sea-ice model |
23 |
C *==========================================================* |
24 |
C \ev |
25 |
|
26 |
C !USES: |
27 |
IMPLICIT NONE |
28 |
|
29 |
C == Global variables === |
30 |
C-- size for MITgcm & Physics package : |
31 |
#include "AIM_SIZE.h" |
32 |
|
33 |
#include "EEPARAMS.h" |
34 |
#include "PARAMS.h" |
35 |
|
36 |
#include "AIM_FFIELDS.h" |
37 |
#include "com_physcon.h" |
38 |
c #include "com_physvar.h" |
39 |
|
40 |
#ifdef ALLOW_THSICE |
41 |
c#include "THSICE_SIZE.h" |
42 |
c#include "THSICE_PARAMS.h" |
43 |
c#include "THSICE_VARS.h" |
44 |
#endif |
45 |
|
46 |
C !INPUT/OUTPUT PARAMETERS: |
47 |
C == Routine arguments == |
48 |
C FMASK :: sea-ice fraction [0-1] |
49 |
C netSW :: net Short Wave surf. flux (+=down) [W/m2] |
50 |
C sFlx :: net heat flux (+=down) except SW, function of surf. temp Ts: |
51 |
C 0: Flux(Ts=0.oC) ; 1: Flux(Ts^n) ; 2: d.Flux/d.Ts(Ts^n) |
52 |
C Shf0 :: sensible heat flux over freezing surf. |
53 |
C dShf :: sensible heat flux derivative relative to surf. temp |
54 |
C Evp0 :: evaporation computed over freezing surface (Ts=0.oC) |
55 |
C dEvp :: evaporation derivative relative to surf. temp |
56 |
C Slr0 :: upward long wave radiation over freezing surf. |
57 |
C Tsurf :: surface temperature (2-dim) |
58 |
C SHF :: sensible heat flux (2-dim) |
59 |
C EVAP :: evaporation [g/(m^2 s)] (2-dim) |
60 |
C SLRU :: sfc lw radiation (upward flux) (2-dim) |
61 |
C dTsurf :: surf. temp change after 1 implicit time step [oC] |
62 |
C bi,bj :: Tile index |
63 |
C myTime :: Current time of simulation ( s ) |
64 |
C myIter :: Current iteration number in simulation |
65 |
C myThid :: Number of this instance of the routine |
66 |
_RL FMASK(NGP), netSW(NGP), sFlx(NGP,0:2) |
67 |
_RL Shf0(NGP), dShf(NGP), Evp0(NGP), dEvp(NGP) |
68 |
_RL Slr0(NGP), dSlr(NGP) |
69 |
_RL Tsurf(NGP), SHF(NGP), EVAP(NGP), SLRU(NGP) |
70 |
_RL dTsurf(NGP) |
71 |
INTEGER bi, bj, myIter, myThid |
72 |
_RL myTime |
73 |
CEOP |
74 |
|
75 |
#ifdef ALLOW_AIM |
76 |
#ifdef ALLOW_THSICE |
77 |
C == Local variables == |
78 |
C J :: loop counters |
79 |
INTEGER J |
80 |
|
81 |
C-- Physics tendency term |
82 |
|
83 |
IF ( useThSIce ) THEN |
84 |
|
85 |
DO J=1,NGP |
86 |
C- total surface downward heat flux : |
87 |
|
88 |
C- initialize temp. changes and fresh water flux : |
89 |
dTsurf(J) = 0. |
90 |
ENDDO |
91 |
|
92 |
CALL THSICE_IMPL_TEMP( |
93 |
I netSW, sFlx, |
94 |
O dTsurf, |
95 |
I bi, bj, myTime, myIter, myThid) |
96 |
|
97 |
C- Update Surf.Temp., Evap, Upward SW according to surf. temp. changes |
98 |
DO J=1,NGP |
99 |
IF ( dTsurf(J) .GT. 999. ) THEN |
100 |
dTsurf(J)= tFreeze - Tsurf(J) |
101 |
Tsurf(J) = tFreeze |
102 |
SHF (J) = Shf0(J) |
103 |
EVAP(J) = Evp0(J) |
104 |
SLRU(J) = Slr0(J) |
105 |
ELSE |
106 |
Tsurf(J) = Tsurf(J)+ dTsurf(J) |
107 |
SHF (J) = SHF (J) + dTsurf(J)*dShf(J) |
108 |
EVAP(J) = EVAP(J) + dTsurf(J)*dEvp(J) |
109 |
SLRU(J) = SLRU(J) + dTsurf(J)*dSlr(J) |
110 |
ENDIF |
111 |
ENDDO |
112 |
|
113 |
ENDIF |
114 |
|
115 |
#endif /* ALLOW_THSICE */ |
116 |
#endif /* ALLOW_AIM */ |
117 |
|
118 |
RETURN |
119 |
END |