/[MITgcm]/MITgcm/pkg/thsice/thsice_main.F
ViewVC logotype

Diff of /MITgcm/pkg/thsice/thsice_main.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.22 by heimbach, Thu Oct 21 02:10:34 2010 UTC revision 1.23 by gforget, Fri Dec 17 04:00:14 2010 UTC
# Line 28  C     === Global variables === Line 28  C     === Global variables ===
28  #include "DYNVARS.h"  #include "DYNVARS.h"
29  #include "FFIELDS.h"  #include "FFIELDS.h"
30  #include "THSICE_PARAMS.h"  #include "THSICE_PARAMS.h"
31    #include "THSICE_SIZE.h"
32  #include "THSICE_VARS.h"  #include "THSICE_VARS.h"
33  #ifdef ALLOW_AUTODIFF_TAMC  #ifdef ALLOW_AUTODIFF_TAMC
34  # include "tamc.h"  # include "tamc.h"
# Line 93  C      to be valid at the boundaries ( d Line 94  C      to be valid at the boundaries ( d
94            act3 = myThid - 1            act3 = myThid - 1
95            max3 = nTx*nTy            max3 = nTx*nTy
96            act4 = ikey_dynamics - 1            act4 = ikey_dynamics - 1
97            iicekey = (act1 + 1) + act2*max1            ticekey = (act1 + 1) + act2*max1
98       &                         + act3*max1*max2       &                         + act3*max1*max2
99       &                         + act4*max1*max2*max3       &                         + act4*max1*max2*max3
100  #endif /* ALLOW_AUTODIFF_TAMC */  #endif /* ALLOW_AUTODIFF_TAMC */
101    
102  #ifdef ALLOW_AUTODIFF_TAMC  #ifdef ALLOW_AUTODIFF_TAMC
103  CADJ STORE ocefwfx(:,:,bi,bj) = comlev1_bibj, key=iicekey, byte=isbyte  CADJ STORE ocefwfx(:,:,bi,bj) = comlev1_bibj, key=ticekey, byte=isbyte
104  CADJ STORE oceqnet(:,:,bi,bj) = comlev1_bibj, key=iicekey, byte=isbyte  CADJ STORE oceqnet(:,:,bi,bj) = comlev1_bibj, key=ticekey, byte=isbyte
105  CADJ STORE ocesflx(:,:,bi,bj) = comlev1_bibj, key=iicekey, byte=isbyte  CADJ STORE ocesflx(:,:,bi,bj) = comlev1_bibj, key=ticekey, byte=isbyte
106  # ifdef ALLOW_EXF  # ifdef ALLOW_EXF
107  CADJ STORE qsw(:,:,bi,bj) = comlev1_bibj, key=iicekey, byte=isbyte  CADJ STORE qsw(:,:,bi,bj) = comlev1_bibj, key=ticekey, byte=isbyte
108  # endif  # endif
109  #endif  #endif
110    
# Line 140  C--     Mixed layer thickness: take the Line 141  C--     Mixed layer thickness: take the
141          ENDIF          ENDIF
142    
143  #ifdef ALLOW_AUTODIFF_TAMC  #ifdef ALLOW_AUTODIFF_TAMC
144  CADJ STORE uvel (:,:,1,bi,bj) = comlev1_bibj, key=iicekey, byte=isbyte  CADJ STORE uvel (:,:,1,bi,bj) = comlev1_bibj, key=ticekey, byte=isbyte
145  CADJ STORE vvel (:,:,1,bi,bj) = comlev1_bibj, key=iicekey, byte=isbyte  CADJ STORE vvel (:,:,1,bi,bj) = comlev1_bibj, key=ticekey, byte=isbyte
146  #endif  #endif
147    
148          DO j = jMin, jMax          DO j = jMin, jMax
# Line 164  CADJ STORE vvel (:,:,1,bi,bj) = comlev1_ Line 165  CADJ STORE vvel (:,:,1,bi,bj) = comlev1_
165          ENDDO          ENDDO
166    
167  #ifdef ALLOW_AUTODIFF_TAMC  #ifdef ALLOW_AUTODIFF_TAMC
168  CADJ STORE iceMask(:,:,bi,bj) = comlev1_bibj, key = iicekey  CADJ STORE iceMask(:,:,bi,bj) = comlev1_bibj, key = ticekey
169  CADJ STORE iceHeight(:,:,bi,bj)  = comlev1_bibj, key = iicekey  CADJ STORE iceHeight(:,:,bi,bj)  = comlev1_bibj, key = ticekey
170  CADJ STORE snowHeight(:,:,bi,bj) = comlev1_bibj, key = iicekey  CADJ STORE snowHeight(:,:,bi,bj) = comlev1_bibj, key = ticekey
171  CADJ STORE Tsrf(:,:,bi,bj)    = comlev1_bibj, key = iicekey  CADJ STORE Tsrf(:,:,bi,bj)    = comlev1_bibj, key = ticekey
172  CADJ STORE Qice1(:,:,bi,bj)   = comlev1_bibj, key = iicekey  CADJ STORE Qice1(:,:,bi,bj)   = comlev1_bibj, key = ticekey
173  CADJ STORE Qice2(:,:,bi,bj)   = comlev1_bibj, key = iicekey  CADJ STORE Qice2(:,:,bi,bj)   = comlev1_bibj, key = ticekey
174  CADJ STORE snowAge(:,:,bi,bj) = comlev1_bibj, key = iicekey  CADJ STORE snowAge(:,:,bi,bj) = comlev1_bibj, key = ticekey
175  CADJ STORE snowPrc(:,:,bi,bj)  = comlev1_bibj, key = iicekey  CADJ STORE snowPrc(:,:,bi,bj)  = comlev1_bibj, key = ticekey
176    
177  CADJ STORE hOceMxL(:,:,bi,bj) = comlev1_bibj, key = iicekey  CADJ STORE hOceMxL(:,:,bi,bj) = comlev1_bibj, key = ticekey
178  CADJ STORE tOceMxL(:,:,bi,bj) = comlev1_bibj, key = iicekey  CADJ STORE tOceMxL(:,:,bi,bj) = comlev1_bibj, key = ticekey
179  CADJ STORE sOceMxL(:,:,bi,bj) = comlev1_bibj, key = iicekey  CADJ STORE sOceMxL(:,:,bi,bj) = comlev1_bibj, key = ticekey
180  CADJ STORE v2ocMxL(:,:,bi,bj) = comlev1_bibj, key = iicekey  CADJ STORE v2ocMxL(:,:,bi,bj) = comlev1_bibj, key = ticekey
181  #endif  #endif
182    
183  C-      do sea-ice advection before getting surface fluxes  C-      do sea-ice advection before getting surface fluxes
# Line 205  C Note: will inline this S/R once thSIce Line 206  C Note: will inline this S/R once thSIce
206  #endif  #endif
207    
208  #ifdef ALLOW_AUTODIFF_TAMC  #ifdef ALLOW_AUTODIFF_TAMC
209  CADJ STORE sheating(:,:,bi,bj) = comlev1_bibj, key = iicekey  CADJ STORE sheating(:,:,bi,bj) = comlev1_bibj, key = ticekey
210  CADJ STORE tice1(:,:,bi,bj) = comlev1_bibj, key = iicekey  CADJ STORE tice1(:,:,bi,bj) = comlev1_bibj, key = ticekey
211  CADJ STORE tice2(:,:,bi,bj) = comlev1_bibj, key = iicekey  CADJ STORE tice2(:,:,bi,bj) = comlev1_bibj, key = ticekey
212  #endif  #endif
213          CALL THSICE_STEP_TEMP(          CALL THSICE_STEP_TEMP(
214       I                     bi, bj, iMin, iMax, jMin, jMax,       I                     bi, bj, iMin, iMax, jMin, jMax,
215       I                     myTime, myIter, myThid )       I                     myTime, myIter, myThid )
216    
217  #ifdef ALLOW_AUTODIFF_TAMC  #ifdef ALLOW_AUTODIFF_TAMC
218  CADJ STORE empmr(:,:,bi,bj) = comlev1_bibj, key = iicekey  CADJ STORE empmr(:,:,bi,bj) = comlev1_bibj, key = ticekey
219  CADJ STORE qnet(:,:,bi,bj) = comlev1_bibj, key = iicekey  CADJ STORE qnet(:,:,bi,bj) = comlev1_bibj, key = ticekey
220  CADJ STORE iceMask(:,:,bi,bj) = comlev1_bibj, key = iicekey  CADJ STORE iceMask(:,:,bi,bj) = comlev1_bibj, key = ticekey
221  CADJ STORE iceHeight(:,:,bi,bj)  = comlev1_bibj, key = iicekey  CADJ STORE iceHeight(:,:,bi,bj)  = comlev1_bibj, key = ticekey
222  CADJ STORE snowHeight(:,:,bi,bj) = comlev1_bibj, key = iicekey  CADJ STORE snowHeight(:,:,bi,bj) = comlev1_bibj, key = ticekey
223  cphCADJ STORE Tsrf(:,:,bi,bj)    = comlev1_bibj, key = iicekey  cphCADJ STORE Tsrf(:,:,bi,bj)    = comlev1_bibj, key = ticekey
224  CADJ STORE Qice1(:,:,bi,bj)   = comlev1_bibj, key = iicekey  CADJ STORE Qice1(:,:,bi,bj)   = comlev1_bibj, key = ticekey
225  CADJ STORE Qice2(:,:,bi,bj)   = comlev1_bibj, key = iicekey  CADJ STORE Qice2(:,:,bi,bj)   = comlev1_bibj, key = ticekey
226  CADJ STORE snowAge(:,:,bi,bj) = comlev1_bibj, key = iicekey  CADJ STORE snowAge(:,:,bi,bj) = comlev1_bibj, key = ticekey
227  CADJ STORE sheating(:,:,bi,bj) = comlev1_bibj, key = iicekey  CADJ STORE sheating(:,:,bi,bj) = comlev1_bibj, key = ticekey
228  #endif  #endif
229    
230          CALL THSICE_STEP_FWD(          CALL THSICE_STEP_FWD(
# Line 240  c     ENDDO Line 241  c     ENDDO
241  C--   note: If useSEAICE=.true., the stress is computed in seaice_model,  C--   note: If useSEAICE=.true., the stress is computed in seaice_model,
242  C--   and stressReduction is always set to zero  C--   and stressReduction is always set to zero
243  #ifdef ALLOW_AUTODIFF_TAMC  #ifdef ALLOW_AUTODIFF_TAMC
244  CADJ STORE fu(:,:,bi,bj) = comlev1_bibj, key=iicekey, byte=isbyte  CADJ STORE fu(:,:,bi,bj) = comlev1_bibj, key=ticekey, byte=isbyte
245  CADJ STORE fv(:,:,bi,bj) = comlev1_bibj, key=iicekey, byte=isbyte  CADJ STORE fv(:,:,bi,bj) = comlev1_bibj, key=ticekey, byte=isbyte
246  #endif  #endif
247          IF ( stressReduction.GT. 0. _d 0 ) THEN          IF ( stressReduction.GT. 0. _d 0 ) THEN
248            DO j = jMin, jMax            DO j = jMin, jMax

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23

  ViewVC Help
Powered by ViewVC 1.1.22