/[MITgcm]/MITgcm_contrib/dgoldberg/shelfice/shelfice_thermodynamics.F
ViewVC logotype

Diff of /MITgcm_contrib/dgoldberg/shelfice/shelfice_thermodynamics.F

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

revision 1.1 by dgoldberg, Wed Aug 27 19:26:17 2014 UTC revision 1.2 by dgoldberg, Sun Dec 14 18:48:40 2014 UTC
# Line 2  C $Header$ Line 2  C $Header$
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:
# Line 33  C     === Global variables === Line 40  C     === Global variables ===
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"
# Line 115  C     drKp1, recip_drLoc Line 123  C     drKp1, recip_drLoc
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)
# Line 127  C     re-initialize here again, curtesy Line 135  C     re-initialize here again, curtesy
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
# Line 143  C     instead of etastar = sqrt(1+zetaN* Line 151  C     instead of etastar = sqrt(1+zetaN*
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
# Line 154  C     instead of etastar = sqrt(1+zetaN* Line 162  C     instead of etastar = sqrt(1+zetaN*
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    
# Line 214  C     where this value is part of the pr Line 222  C     where this value is part of the pr
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)
# Line 527  C     endif (not) useISOMIPTD Line 538  C     endif (not) useISOMIPTD
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    
# Line 556  c     IF ( SHELFICEloadAnomalyFile .EQ. Line 567  c     IF ( SHELFICEloadAnomalyFile .EQ.
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',
# Line 577  C     Transfer coefficients Line 587  C     Transfer coefficients
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    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.22