2 |
C $Name$ |
C $Name$ |
3 |
|
|
4 |
#include "SHELFICE_OPTIONS.h" |
#include "SHELFICE_OPTIONS.h" |
5 |
|
#ifdef ALLOW_AUTODIFF |
6 |
|
# include "AUTODIFF_OPTIONS.h" |
7 |
|
#endif |
8 |
|
#ifdef ALLOW_CTRL |
9 |
|
# include "CTRL_OPTIONS.h" |
10 |
|
#endif |
11 |
#ifdef ALLOW_STREAMICE |
#ifdef ALLOW_STREAMICE |
12 |
# include "STREAMICE_OPTIONS.h" |
# include "STREAMICE_OPTIONS.h" |
13 |
#endif |
#endif |
14 |
|
|
15 |
|
|
16 |
CBOP |
CBOP |
17 |
C !ROUTINE: SHELFICE_THERMODYNAMICS |
C !ROUTINE: SHELFICE_THERMODYNAMICS |
18 |
C !INTERFACE: |
C !INTERFACE: |
40 |
#include "DYNVARS.h" |
#include "DYNVARS.h" |
41 |
#include "FFIELDS.h" |
#include "FFIELDS.h" |
42 |
#include "SHELFICE.h" |
#include "SHELFICE.h" |
43 |
|
#include "SHELFICE_COST.h" |
44 |
#ifdef ALLOW_AUTODIFF |
#ifdef ALLOW_AUTODIFF |
45 |
# include "CTRL_SIZE.h" |
# include "CTRL_SIZE.h" |
46 |
# include "ctrl.h" |
# include "ctrl.h" |
123 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
124 |
|
|
125 |
#ifdef SHI_ALLOW_GAMMAFRICT |
#ifdef SHI_ALLOW_GAMMAFRICT |
126 |
#ifdef ALLOW_AUTODIFF_TAMC |
#ifdef ALLOW_AUTODIFF |
127 |
C re-initialize here again, curtesy to TAF |
C re-initialize here again, curtesy to TAF |
128 |
DO bj = myByLo(myThid), myByHi(myThid) |
DO bj = myByLo(myThid), myByHi(myThid) |
129 |
DO bi = myBxLo(myThid), myBxHi(myThid) |
DO bi = myBxLo(myThid), myBxHi(myThid) |
135 |
ENDDO |
ENDDO |
136 |
ENDDO |
ENDDO |
137 |
ENDDO |
ENDDO |
138 |
#endif /* ALLOW_AUTODIFF_TAMC */ |
#endif /* ALLOW_AUTODIFF */ |
139 |
IF ( SHELFICEuseGammaFrict ) THEN |
IF ( SHELFICEuseGammaFrict ) THEN |
140 |
C Implement friction velocity-dependent transfer coefficient |
C Implement friction velocity-dependent transfer coefficient |
141 |
C of Holland and Jenkins, JPO, 1999 |
C of Holland and Jenkins, JPO, 1999 |
151 |
etastar = 1. _d 0 |
etastar = 1. _d 0 |
152 |
gammaTurbConst = 1. _d 0 / (2. _d 0 * shiZetaN*etastar) |
gammaTurbConst = 1. _d 0 / (2. _d 0 * shiZetaN*etastar) |
153 |
& - recip_shiKarman |
& - recip_shiKarman |
154 |
#ifdef ALLOW_AUTODIFF_TAMC |
#ifdef ALLOW_AUTODIFF |
155 |
DO bj = myByLo(myThid), myByHi(myThid) |
DO bj = myByLo(myThid), myByHi(myThid) |
156 |
DO bi = myBxLo(myThid), myBxHi(myThid) |
DO bi = myBxLo(myThid), myBxHi(myThid) |
157 |
DO J = 1-OLy,sNy+OLy |
DO J = 1-OLy,sNy+OLy |
162 |
ENDDO |
ENDDO |
163 |
ENDDO |
ENDDO |
164 |
ENDDO |
ENDDO |
165 |
#endif /* ALLOW_AUTODIFF_TAMC */ |
#endif /* ALLOW_AUTODIFF */ |
166 |
ENDIF |
ENDIF |
167 |
#endif /* SHI_ALLOW_GAMMAFRICT */ |
#endif /* SHI_ALLOW_GAMMAFRICT */ |
168 |
|
|
222 |
ENDDO |
ENDDO |
223 |
ENDDO |
ENDDO |
224 |
ENDDO |
ENDDO |
225 |
CALL CTRL_GET_GEN ( |
#ifdef ALLOW_CTRL |
226 |
|
if (useCTRL) CALL CTRL_GET_GEN ( |
227 |
& xx_shifwflx_file, xx_shifwflxstartdate, xx_shifwflxperiod, |
& xx_shifwflx_file, xx_shifwflxstartdate, xx_shifwflxperiod, |
228 |
& maskSHI, xx_shifwflx_loc, xx_shifwflx0, xx_shifwflx1, |
& maskSHI, xx_shifwflx_loc, xx_shifwflx0, xx_shifwflx1, |
229 |
& xx_shifwflx_dummy, |
& xx_shifwflx_dummy, |
230 |
& xx_shifwflx_remo_intercept, xx_shifwflx_remo_slope, |
& xx_shifwflx_remo_intercept, xx_shifwflx_remo_slope, |
231 |
|
& wshifwflx, |
232 |
& myTime, myIter, myThid ) |
& myTime, myIter, myThid ) |
233 |
|
#endif |
234 |
#endif /* ALLOW_SHIFWFLX_CONTROL */ |
#endif /* ALLOW_SHIFWFLX_CONTROL */ |
235 |
DO bj = myByLo(myThid), myByHi(myThid) |
DO bj = myByLo(myThid), myByHi(myThid) |
236 |
DO bi = myBxLo(myThid), myBxHi(myThid) |
DO bi = myBxLo(myThid), myBxHi(myThid) |
538 |
if (streamice_hmask(i,j,bi,bj).eq.1 .or. |
if (streamice_hmask(i,j,bi,bj).eq.1 .or. |
539 |
& streamice_hmask(i,j,bi,bj).eq.2) then |
& streamice_hmask(i,j,bi,bj).eq.2) then |
540 |
|
|
541 |
shelficeMass(i,j,bi,bj) = |
shelficeMass(i,j,bi,bj) = |
542 |
& H_streamice(I,J,bi,bj) * streamice_density |
& H_streamice(I,J,bi,bj) * streamice_density |
543 |
|
|
544 |
endif |
endif |
545 |
|
|
567 |
ENDDO |
ENDDO |
568 |
c ENDIF |
c ENDIF |
569 |
#endif /* ndef ALLOW_AUTODIFF */ |
#endif /* ndef ALLOW_AUTODIFF */ |
570 |
print *, "GOT HERE 0" |
|
571 |
#ifdef ALLOW_DIAGNOSTICS |
#ifdef ALLOW_DIAGNOSTICS |
572 |
IF ( useDiagnostics ) THEN |
IF ( useDiagnostics ) THEN |
|
print *, "GOT HERE 1" |
|
573 |
CALL DIAGNOSTICS_FILL_RS(shelfIceFreshWaterFlux,'SHIfwFlx', |
CALL DIAGNOSTICS_FILL_RS(shelfIceFreshWaterFlux,'SHIfwFlx', |
574 |
& 0,1,0,1,1,myThid) |
& 0,1,0,1,1,myThid) |
575 |
CALL DIAGNOSTICS_FILL_RS(shelfIceHeatFlux, 'SHIhtFlx', |
CALL DIAGNOSTICS_FILL_RS(shelfIceHeatFlux, 'SHIhtFlx', |
587 |
& 0,1,0,1,1,myThid) |
& 0,1,0,1,1,myThid) |
588 |
CALL DIAGNOSTICS_FILL(shiTransCoeffS,'SHIgammS', |
CALL DIAGNOSTICS_FILL(shiTransCoeffS,'SHIgammS', |
589 |
& 0,1,0,1,1,myThid) |
& 0,1,0,1,1,myThid) |
|
print *, "GOT HERE 2" |
|
590 |
ENDIF |
ENDIF |
591 |
#endif /* ALLOW_DIAGNOSTICS */ |
#endif /* ALLOW_DIAGNOSTICS */ |
592 |
|
|