3 |
|
|
4 |
#include "PACKAGES_CONFIG.h" |
#include "PACKAGES_CONFIG.h" |
5 |
#include "CPP_OPTIONS.h" |
#include "CPP_OPTIONS.h" |
6 |
|
|
7 |
CBOP |
CBOP |
8 |
C !ROUTINE: EXTERNAL_FORCING_SURF |
C !ROUTINE: EXTERNAL_FORCING_SURF |
9 |
C !INTERFACE: |
C !INTERFACE: |
10 |
SUBROUTINE EXTERNAL_FORCING_SURF( |
SUBROUTINE EXTERNAL_FORCING_SURF( |
11 |
I bi, bj, iMin, iMax, jMin, jMax, |
I bi, bj, iMin, iMax, jMin, jMax, |
12 |
I myTime, myIter, myThid ) |
I myTime, myIter, myThid ) |
13 |
C !DESCRIPTION: \bv |
C !DESCRIPTION: \bv |
14 |
C *==========================================================* |
C *==========================================================* |
15 |
C | SUBROUTINE EXTERNAL_FORCING_SURF |
C | SUBROUTINE EXTERNAL_FORCING_SURF |
16 |
C | o Determines forcing terms based on external fields |
C | o Determines forcing terms based on external fields |
17 |
C | relaxation terms etc. |
C | relaxation terms etc. |
18 |
C *==========================================================* |
C *==========================================================* |
19 |
C \ev |
C \ev |
20 |
|
|
31 |
#ifdef ALLOW_SEAICE |
#ifdef ALLOW_SEAICE |
32 |
#include "SEAICE.h" |
#include "SEAICE.h" |
33 |
#endif /* ALLOW_SEAICE */ |
#endif /* ALLOW_SEAICE */ |
34 |
|
#ifdef ALLOW_SHELFICE |
35 |
|
#include "SHELFICE.h" |
36 |
|
#endif /* ALLOW_SHELFICE */ |
37 |
C !INPUT/OUTPUT PARAMETERS: |
C !INPUT/OUTPUT PARAMETERS: |
38 |
C === Routine arguments === |
C === Routine arguments === |
39 |
C bi,bj :: tile indices |
C bi,bj :: tile indices |
41 |
C myTime :: Current time in simulation |
C myTime :: Current time in simulation |
42 |
C myIter :: Current iteration number in simulation |
C myIter :: Current iteration number in simulation |
43 |
C myThid :: Thread no. that called this routine. |
C myThid :: Thread no. that called this routine. |
|
_RL myTime |
|
|
INTEGER myIter |
|
|
INTEGER myThid |
|
44 |
INTEGER bi,bj |
INTEGER bi,bj |
45 |
INTEGER iMin, iMax |
INTEGER iMin, iMax |
46 |
INTEGER jMin, jMax |
INTEGER jMin, jMax |
47 |
|
_RL myTime |
48 |
|
INTEGER myIter |
49 |
|
INTEGER myThid |
50 |
|
|
51 |
C !LOCAL VARIABLES: |
C !LOCAL VARIABLES: |
52 |
C === Local variables === |
C === Local variables === |
53 |
|
C i,j :: loop indices |
54 |
|
C ks :: index of surface interface layer |
55 |
INTEGER i,j |
INTEGER i,j |
|
C number of surface interface layer |
|
56 |
INTEGER ks |
INTEGER ks |
57 |
CEOP |
CEOP |
58 |
|
#ifdef ALLOW_DIAGNOSTICS |
59 |
|
_RL tmpFac |
60 |
|
#endif /* ALLOW_DIAGNOSTICS */ |
61 |
|
|
62 |
if ( buoyancyRelation .eq. 'OCEANICP' ) then |
IF ( usingPCoords ) THEN |
63 |
ks = Nr |
ks = Nr |
64 |
else |
ELSE |
65 |
ks = 1 |
ks = 1 |
66 |
endif |
ENDIF |
67 |
|
|
68 |
|
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
69 |
|
|
70 |
|
IF ( doThetaClimRelax .OR. doSaltClimRelax ) THEN |
71 |
|
C-- Start with surface restoring term : |
72 |
|
|
73 |
|
DO j = jMin, jMax |
74 |
|
DO i = iMin, iMax |
75 |
|
#ifdef ALLOW_SEAICE |
76 |
|
C Do not restore under sea-ice |
77 |
|
C Heat Flux (restoring term) : |
78 |
|
surfaceForcingT(i,j,bi,bj) = |
79 |
|
& -lambdaThetaClimRelax(i,j,bi,bj) * (1-AREA(i,j,1,bi,bj)) |
80 |
|
& *(theta(i,j,ks,bi,bj)-SST(i,j,bi,bj)) |
81 |
|
& *drF(ks)*_hFacC(i,j,ks,bi,bj) |
82 |
|
C Salt Flux (restoring term) : |
83 |
|
surfaceForcingS(i,j,bi,bj) = |
84 |
|
& -lambdaSaltClimRelax(i,j,bi,bj) * (1-AREA(i,j,1,bi,bj)) |
85 |
|
& *(salt(i,j,ks,bi,bj)-SSS(i,j,bi,bj)) |
86 |
|
& *drF(ks)*_hFacC(i,j,ks,bi,bj) |
87 |
|
#else /* ifndef ALLOW_SEAICE */ |
88 |
|
C Heat Flux (restoring term) : |
89 |
|
surfaceForcingT(i,j,bi,bj) = |
90 |
|
& -lambdaThetaClimRelax(i,j,bi,bj) |
91 |
|
& *(theta(i,j,ks,bi,bj)-SST(i,j,bi,bj)) |
92 |
|
& *drF(ks)*_hFacC(i,j,ks,bi,bj) |
93 |
|
C Salt Flux (restoring term) : |
94 |
|
surfaceForcingS(i,j,bi,bj) = |
95 |
|
& -lambdaSaltClimRelax(i,j,bi,bj) |
96 |
|
& *(salt(i,j,ks,bi,bj)-SSS(i,j,bi,bj)) |
97 |
|
& *drF(ks)*_hFacC(i,j,ks,bi,bj) |
98 |
|
#endif /* ALLOW_SEAICE */ |
99 |
|
ENDDO |
100 |
|
ENDDO |
101 |
|
|
102 |
|
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
103 |
|
#ifdef NONLIN_FRSURF |
104 |
|
C- T,S surface forcing will be applied (thermodynamics) after the update |
105 |
|
C of surf.thickness (hFac): account for change in surf.thickness |
106 |
|
IF (staggerTimeStep.AND.nonlinFreeSurf.GT.0) THEN |
107 |
|
IF (select_rStar.GT.0) THEN |
108 |
|
# ifndef DISABLE_RSTAR_CODE |
109 |
|
DO j=jMin,jMax |
110 |
|
DO i=iMin,iMax |
111 |
|
surfaceForcingT(i,j,bi,bj) = surfaceForcingT(i,j,bi,bj) |
112 |
|
& * rStarExpC(i,j,bi,bj) |
113 |
|
surfaceForcingS(i,j,bi,bj) = surfaceForcingS(i,j,bi,bj) |
114 |
|
& * rStarExpC(i,j,bi,bj) |
115 |
|
ENDDO |
116 |
|
ENDDO |
117 |
|
# endif /* DISABLE_RSTAR_CODE */ |
118 |
|
ELSE |
119 |
|
DO j=jMin,jMax |
120 |
|
DO i=iMin,iMax |
121 |
|
IF (ks.EQ.ksurfC(i,j,bi,bj)) THEN |
122 |
|
surfaceForcingT(i,j,bi,bj) = surfaceForcingT(i,j,bi,bj) |
123 |
|
& *_recip_hFacC(i,j,ks,bi,bj)*hFac_surfC(i,j,bi,bj) |
124 |
|
surfaceForcingS(i,j,bi,bj) = surfaceForcingS(i,j,bi,bj) |
125 |
|
& *_recip_hFacC(i,j,ks,bi,bj)*hFac_surfC(i,j,bi,bj) |
126 |
|
ENDIF |
127 |
|
ENDDO |
128 |
|
ENDDO |
129 |
|
ENDIF |
130 |
|
ENDIF |
131 |
|
#endif /* NONLIN_FRSURF */ |
132 |
|
|
133 |
|
#ifdef ALLOW_DIAGNOSTICS |
134 |
|
IF ( useDiagnostics ) THEN |
135 |
|
|
136 |
|
C tRelax (temperature relaxation [W/m2], positive <-> increasing Theta) |
137 |
|
tmpFac = HeatCapacity_Cp*recip_horiVertRatio*rhoConst |
138 |
|
CALL DIAGNOSTICS_SCALE_FILL( |
139 |
|
& surfaceForcingT(1-OLx,1-OLy,bi,bj),tmpFac,1, |
140 |
|
& 'TRELAX ',0, 1,2,bi,bj,myThid) |
141 |
|
|
142 |
|
C sRelax (salt relaxation [g/m2/s], positive <-> increasing Salt) |
143 |
|
tmpFac = recip_horiVertRatio*rhoConst |
144 |
|
CALL DIAGNOSTICS_SCALE_FILL( |
145 |
|
& surfaceForcingS(1-OLx,1-OLy,bi,bj),tmpFac,1, |
146 |
|
& 'SRELAX ',0, 1,2,bi,bj,myThid) |
147 |
|
|
148 |
|
ENDIF |
149 |
|
#endif /* ALLOW_DIAGNOSTICS */ |
150 |
|
|
151 |
|
ELSE |
152 |
|
C-- No restoring for T & S : set surfaceForcingT,S to zero : |
153 |
|
|
154 |
|
DO j = jMin, jMax |
155 |
|
DO i = iMin, iMax |
156 |
|
surfaceForcingT(i,j,bi,bj) = 0. _d 0 |
157 |
|
surfaceForcingS(i,j,bi,bj) = 0. _d 0 |
158 |
|
ENDDO |
159 |
|
ENDDO |
160 |
|
|
161 |
|
C-- end restoring / no restoring block. |
162 |
|
ENDIF |
163 |
|
|
164 |
|
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
165 |
|
|
166 |
C-- Surface Fluxes : |
C-- Surface Fluxes : |
167 |
|
|
168 |
DO j = jMin, jMax |
DO j = jMin, jMax |
169 |
DO i = iMin, iMax |
DO i = iMin, iMax |
170 |
|
|
171 |
c Zonal wind stress fu: |
C Zonal wind stress fu: |
172 |
surfaceTendencyU(i,j,bi,bj) = |
surfaceForcingU(i,j,bi,bj) = |
173 |
& fu(i,j,bi,bj)*horiVertRatio*recip_rhoConst |
& fu(i,j,bi,bj)*horiVertRatio*recip_rhoConst |
174 |
& *recip_drF(ks)*recip_hFacW(i,j,ks,bi,bj) |
C Meridional wind stress fv: |
175 |
c Meridional wind stress fv: |
surfaceForcingV(i,j,bi,bj) = |
|
surfaceTendencyV(i,j,bi,bj) = |
|
176 |
& fv(i,j,bi,bj)*horiVertRatio*recip_rhoConst |
& fv(i,j,bi,bj)*horiVertRatio*recip_rhoConst |
177 |
& *recip_drF(ks)*recip_hFacS(i,j,ks,bi,bj) |
C Net heat flux Qnet: |
178 |
c Net heat flux Qnet: |
surfaceForcingT(i,j,bi,bj) = surfaceForcingT(i,j,bi,bj) |
179 |
surfaceTendencyT(i,j,bi,bj) = |
& - ( Qnet(i,j,bi,bj) |
180 |
& -Qnet(i,j,bi,bj)*recip_Cp*horiVertRatio*recip_rhoConst |
#ifdef SHORTWAVE_HEATING |
181 |
& *recip_drF(ks)*recip_hFacC(i,j,ks,bi,bj) |
& -Qsw(i,j,bi,bj) |
182 |
C Net Salt Flux : |
#endif |
183 |
surfaceTendencyS(i,j,bi,bj) = |
& ) *recip_Cp*horiVertRatio*recip_rhoConst |
184 |
|
C Net Salt Flux : |
185 |
|
surfaceForcingS(i,j,bi,bj) = surfaceForcingS(i,j,bi,bj) |
186 |
& -saltFlux(i,j,bi,bj)*horiVertRatio*recip_rhoConst |
& -saltFlux(i,j,bi,bj)*horiVertRatio*recip_rhoConst |
|
& *recip_drF(ks)*recip_hFacC(i,j,ks,bi,bj) |
|
187 |
|
|
188 |
ENDDO |
ENDDO |
189 |
ENDDO |
ENDDO |
190 |
|
|
191 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
192 |
C-- Fresh-water flux |
C-- Fresh-water flux |
193 |
|
|
194 |
|
C- Apply mask on Fresh-Water flux |
195 |
|
C (needed for SSH forcing, whether or not exactConserv is used) |
196 |
|
IF ( useRealFreshWaterFlux ) THEN |
197 |
|
DO j=1-OLy,sNy+OLy |
198 |
|
DO i=1-OLx,sNx+OLx |
199 |
|
EmPmR(i,j,bi,bj) = EmPmR(i,j,bi,bj)*maskH(i,j,bi,bj) |
200 |
|
ENDDO |
201 |
|
ENDDO |
202 |
|
ENDIF |
203 |
|
|
204 |
#ifdef EXACT_CONSERV |
#ifdef EXACT_CONSERV |
205 |
c NB: synchronous time step: PmEpR lag 1 time step behind EmPmR |
c NB: synchronous time step: PmEpR lag 1 time step behind EmPmR |
206 |
c to stay consitent with volume change (=d/dt etaH). |
c to stay consitent with volume change (=d/dt etaH). |
207 |
IF ( staggerTimeStep ) THEN |
IF ( staggerTimeStep ) THEN |
208 |
DO j=1,sNy |
DO j=1-OLy,sNy+OLy |
209 |
DO i=1,sNx |
DO i=1-OLx,sNx+OLx |
210 |
PmEpR(i,j,bi,bj) = -EmPmR(i,j,bi,bj) |
PmEpR(i,j,bi,bj) = -EmPmR(i,j,bi,bj) |
211 |
ENDDO |
ENDDO |
212 |
ENDDO |
ENDDO |
213 |
ENDIF |
ENDIF |
214 |
|
|
215 |
IF ( (nonlinFreeSurf.GT.0 .OR. buoyancyRelation.EQ.'OCEANICP') |
IF ( (nonlinFreeSurf.GT.0 .OR. usingPCoords) |
216 |
& .AND. useRealFreshWaterFlux ) THEN |
& .AND. useRealFreshWaterFlux ) THEN |
217 |
|
|
218 |
c- NonLin_FrSurf and RealFreshWaterFlux : PmEpR effectively changes |
c- NonLin_FrSurf and RealFreshWaterFlux : PmEpR effectively changes |
219 |
c the water column height ; temp., salt, (tracer) flux associated |
c the water column height ; temp., salt, (tracer) flux associated |
220 |
c with this input/output of water is added here to the surface tendency. |
c with this input/output of water is added here to the surface tendency. |
221 |
c |
c |
222 |
|
|
223 |
IF (temp_EvPrRn.NE.UNSET_RL) THEN |
IF (temp_EvPrRn.NE.UNSET_RL) THEN |
224 |
DO j = jMin, jMax |
DO j = jMin, jMax |
225 |
DO i = iMin, iMax |
DO i = iMin, iMax |
226 |
surfaceTendencyT(i,j,bi,bj) = surfaceTendencyT(i,j,bi,bj) |
surfaceForcingT(i,j,bi,bj) = surfaceForcingT(i,j,bi,bj) |
227 |
& + PmEpR(i,j,bi,bj) |
& + PmEpR(i,j,bi,bj) |
228 |
& *( temp_EvPrRn - theta(i,j,ks,bi,bj) ) |
& *( temp_EvPrRn - theta(i,j,ks,bi,bj) ) |
|
& *recip_drF(ks)*recip_hFacC(i,j,ks,bi,bj) |
|
229 |
& *convertEmP2rUnit |
& *convertEmP2rUnit |
230 |
ENDDO |
ENDDO |
231 |
ENDDO |
ENDDO |
234 |
IF (salt_EvPrRn.NE.UNSET_RL) THEN |
IF (salt_EvPrRn.NE.UNSET_RL) THEN |
235 |
DO j = jMin, jMax |
DO j = jMin, jMax |
236 |
DO i = iMin, iMax |
DO i = iMin, iMax |
237 |
surfaceTendencyS(i,j,bi,bj) = surfaceTendencyS(i,j,bi,bj) |
surfaceForcingS(i,j,bi,bj) = surfaceForcingS(i,j,bi,bj) |
238 |
& + PmEpR(i,j,bi,bj) |
& + PmEpR(i,j,bi,bj) |
239 |
& *( salt_EvPrRn - salt(i,j,ks,bi,bj) ) |
& *( salt_EvPrRn - salt(i,j,ks,bi,bj) ) |
|
& *recip_drF(ks)*recip_hFacC(i,j,ks,bi,bj) |
|
240 |
& *convertEmP2rUnit |
& *convertEmP2rUnit |
241 |
ENDDO |
ENDDO |
242 |
ENDDO |
ENDDO |
255 |
c- converts EmPmR to salinity tendency using surface local salinity |
c- converts EmPmR to salinity tendency using surface local salinity |
256 |
DO j = jMin, jMax |
DO j = jMin, jMax |
257 |
DO i = iMin, iMax |
DO i = iMin, iMax |
258 |
surfaceTendencyS(i,j,bi,bj) = surfaceTendencyS(i,j,bi,bj) |
surfaceForcingS(i,j,bi,bj) = surfaceForcingS(i,j,bi,bj) |
259 |
& + EmPmR(i,j,bi,bj)*salt(i,j,ks,bi,bj) |
& + EmPmR(i,j,bi,bj)*salt(i,j,ks,bi,bj) |
|
& *recip_drF(ks)*recip_hFacC(i,j,ks,bi,bj) |
|
260 |
& *convertEmP2rUnit |
& *convertEmP2rUnit |
261 |
ENDDO |
ENDDO |
262 |
ENDDO |
ENDDO |
263 |
ELSE |
ELSE |
264 |
c- converts EmPmR to virtual salt flux using uniform salinity (default=35) |
c- converts EmPmR to virtual salt flux using uniform salinity (default=35) |
265 |
DO j = jMin, jMax |
DO j = jMin, jMax |
266 |
DO i = iMin, iMax |
DO i = iMin, iMax |
267 |
surfaceTendencyS(i,j,bi,bj) = surfaceTendencyS(i,j,bi,bj) |
surfaceForcingS(i,j,bi,bj) = surfaceForcingS(i,j,bi,bj) |
268 |
& + EmPmR(i,j,bi,bj)*convertFW2Salt |
& + EmPmR(i,j,bi,bj)*convertFW2Salt |
|
& *recip_drF(ks)*recip_hFacC(i,j,ks,bi,bj) |
|
269 |
& *convertEmP2rUnit |
& *convertEmP2rUnit |
270 |
ENDDO |
ENDDO |
271 |
ENDDO |
ENDDO |
274 |
ENDIF |
ENDIF |
275 |
|
|
276 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
|
#ifdef NONLIN_FRSURF |
|
|
C- T,S surface tendencies will be applied (thermodynamics) after the update |
|
|
C of surf.thickness (hFac): account for change in surf.thickness |
|
|
IF (staggerTimeStep.AND.nonlinFreeSurf.GT.0) THEN |
|
|
IF (select_rStar.GT.0) THEN |
|
|
DO j=jMin,jMax |
|
|
DO i=iMin,iMax |
|
|
surfaceTendencyT(i,j,bi,bj) = surfaceTendencyT(i,j,bi,bj) |
|
|
& / rStarExpC(i,j,bi,bj) |
|
|
surfaceTendencyS(i,j,bi,bj) = surfaceTendencyS(i,j,bi,bj) |
|
|
& / rStarExpC(i,j,bi,bj) |
|
|
ENDDO |
|
|
ENDDO |
|
|
ELSE |
|
|
DO j=jMin,jMax |
|
|
DO i=iMin,iMax |
|
|
IF (ks.EQ.ksurfC(i,j,bi,bj)) THEN |
|
|
surfaceTendencyT(i,j,bi,bj) = surfaceTendencyT(i,j,bi,bj) |
|
|
& *hFacC(i,j,ks,bi,bj)/hFac_surfC(i,j,bi,bj) |
|
|
surfaceTendencyS(i,j,bi,bj) = surfaceTendencyS(i,j,bi,bj) |
|
|
& *hFacC(i,j,ks,bi,bj)/hFac_surfC(i,j,bi,bj) |
|
|
ENDIF |
|
|
ENDDO |
|
|
ENDDO |
|
|
ENDIF |
|
|
ENDIF |
|
|
#endif /* NONLIN_FRSURF */ |
|
|
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
|
|
|
|
|
C-- Add surface restoring term : |
|
|
|
|
|
IF ( doThetaClimRelax .OR. doSaltClimRelax ) THEN |
|
|
DO j = jMin, jMax |
|
|
DO i = iMin, iMax |
|
|
#ifdef ALLOW_SEAICE |
|
|
C Don't restore under sea-ice |
|
|
C Heat Flux (restoring term) : |
|
|
surfaceTendencyT(i,j,bi,bj) = surfaceTendencyT(i,j,bi,bj) |
|
|
& -lambdaThetaClimRelax * (1-AREA(i,j,1,bi,bj)) |
|
|
& *(theta(i,j,ks,bi,bj)-SST(i,j,bi,bj)) |
|
|
C Salt Flux (restoring term) : |
|
|
surfaceTendencyS(i,j,bi,bj) = surfaceTendencyS(i,j,bi,bj) |
|
|
& -lambdaSaltClimRelax * (1-AREA(i,j,1,bi,bj)) |
|
|
& *(salt(i,j,ks,bi,bj)-SSS(i,j,bi,bj)) |
|
|
#else /* ifndef ALLOW_SEAICE */ |
|
|
C Heat Flux (restoring term) : |
|
|
IF ( abs(yC(i,j,bi,bj)).LE.latBandClimRelax ) THEN |
|
|
surfaceTendencyT(i,j,bi,bj) = surfaceTendencyT(i,j,bi,bj) |
|
|
& -lambdaThetaClimRelax |
|
|
& *(theta(i,j,ks,bi,bj)-SST(i,j,bi,bj)) |
|
|
C Salt Flux (restoring term) : |
|
|
surfaceTendencyS(i,j,bi,bj) = surfaceTendencyS(i,j,bi,bj) |
|
|
& -lambdaSaltClimRelax |
|
|
& *(salt(i,j,ks,bi,bj)-SSS(i,j,bi,bj)) |
|
|
ENDIF |
|
|
#endif /* ALLOW_SEAICE */ |
|
|
ENDDO |
|
|
ENDDO |
|
|
ENDIF |
|
|
|
|
|
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
|
277 |
|
|
278 |
#ifdef ALLOW_PTRACERS |
#ifdef ALLOW_PTRACERS |
279 |
IF ( usePTRACERS ) THEN |
IF ( usePTRACERS ) THEN |
287 |
|
|
288 |
C-- Atmospheric surface Pressure loading : |
C-- Atmospheric surface Pressure loading : |
289 |
|
|
290 |
IF ( buoyancyRelation .EQ. 'OCEANIC' ) THEN |
IF ( usingZCoords ) THEN |
291 |
IF ( useRealFreshWaterFlux ) THEN |
IF ( useRealFreshWaterFlux ) THEN |
292 |
DO j = jMin, jMax |
DO j = jMin, jMax |
293 |
DO i = iMin, iMax |
DO i = iMin, iMax |
303 |
ENDDO |
ENDDO |
304 |
ENDDO |
ENDDO |
305 |
ENDIF |
ENDIF |
306 |
ELSEIF ( buoyancyRelation .eq. 'OCEANICP' ) THEN |
ELSEIF ( usingPCoords ) THEN |
307 |
C-- This is a hack used to read phi0surf from a file (ploadFile) |
C-- This is a hack used to read phi0surf from a file (ploadFile) |
308 |
C instead of computing it from bathymetry & density ref. profile. |
C instead of computing it from bathymetry & density ref. profile. |
309 |
C The true atmospheric P-loading is not yet implemented for P-coord |
C The true atmospheric P-loading is not yet implemented for P-coord |
317 |
|
|
318 |
#endif /* ATMOSPHERIC_LOADING */ |
#endif /* ATMOSPHERIC_LOADING */ |
319 |
|
|
320 |
|
#ifdef ALLOW_SHELFICE |
321 |
|
IF ( usingZCoords ) THEN |
322 |
|
IF ( useSHELFICE) THEN |
323 |
|
DO j = jMin, jMax |
324 |
|
DO i = iMin, iMax |
325 |
|
phi0surf(i,j,bi,bj) = phi0surf(i,j,bi,bj) |
326 |
|
& + shelficeLoadAnomaly(i,j,bi,bj)*recip_rhoConst |
327 |
|
ENDDO |
328 |
|
ENDDO |
329 |
|
ENDIF |
330 |
|
ENDIF |
331 |
|
#endif /* ALLOW_SHELFICE */ |
332 |
|
|
333 |
#ifdef ALLOW_EBM |
#ifdef ALLOW_EBM |
334 |
c-- Values for surfaceTendencyT, surfaceTendencyS |
c-- Values for surfaceForcingT, surfaceForcingS |
335 |
c are overwritten by those produced by EBM |
c are overwritten by those produced by EBM |
336 |
cph AD recomputation problems if these IF useEBM are used |
cph AD recomputation problems if these IF useEBM are used |
337 |
cph IF ( useEBM ) THEN |
cph IF ( useEBM ) THEN |
341 |
cph ENDIF |
cph ENDIF |
342 |
#endif |
#endif |
343 |
|
|
|
#ifdef ALLOW_TIMEAVE |
|
|
c IF ( taveFreq .NE. 0. _d 0 ) THEN |
|
|
c CALL TIMEAVE_SURF_FLUX( bi, bj, myTime, myIter, myThid) |
|
|
c ENDIF |
|
|
#endif /* ALLOW_TIMEAVE */ |
|
|
|
|
344 |
RETURN |
RETURN |
345 |
END |
END |