/[MITgcm]/MITgcm_contrib/dgoldberg/streamice/streamice_advect_thickness.F
ViewVC logotype

Diff of /MITgcm_contrib/dgoldberg/streamice/streamice_advect_thickness.F

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

revision 1.4 by dgoldberg, Tue Sep 4 21:11:44 2012 UTC revision 1.7 by dgoldberg, Thu Mar 7 15:12:19 2013 UTC
# Line 36  C     === Global variables === Line 36  C     === Global variables ===
36        INTEGER i, j, bi, bj        INTEGER i, j, bi, bj
37        _RL thick_bd        _RL thick_bd
38        _RL SLOPE_LIMITER        _RL SLOPE_LIMITER
39        _RL sec_per_year, time_step_loc, MR        _RL sec_per_year, time_step_loc, MR, SMB, TMB
40        CHARACTER*(MAX_LEN_MBUF) msgBuf        CHARACTER*(MAX_LEN_MBUF) msgBuf
41        external SLOPE_LIMITER        external SLOPE_LIMITER
42    
# Line 44  C     === Global variables === Line 44  C     === Global variables ===
44    
45        time_step_loc = time_step / sec_per_year        time_step_loc = time_step / sec_per_year
46    
47          PRINT *, "time_step_loc ", time_step_loc
48    
49  #ifdef ALLOW_AUTODIFF_TAMC  #ifdef ALLOW_AUTODIFF_TAMC
50  CADJ STORE streamice_hmask  = comlev1, key=ikey_dynamics  CADJ STORE streamice_hmask  = comlev1, key=ikey_dynamics
51  #endif  #endif
# Line 52  CADJ STORE streamice_hmask  = comlev1, k Line 54  CADJ STORE streamice_hmask  = comlev1, k
54         DO bi=myBxLo(myThid),myBxHi(myThid)         DO bi=myBxLo(myThid),myBxHi(myThid)
55          DO j=1-OLy,sNy+OLy          DO j=1-OLy,sNy+OLy
56           DO i=1-OLx,sNx+OLx           DO i=1-OLx,sNx+OLx
57              H_streamice_prev(i,j,bi,bj) =
58         &     H_streamice(i,j,bi,bj)
59            hflux_x_SI (i,j,bi,bj) = 0. _d 0            hflux_x_SI (i,j,bi,bj) = 0. _d 0
60            hflux_y_SI (i,j,bi,bj) = 0. _d 0            hflux_y_SI (i,j,bi,bj) = 0. _d 0
61            hflux_x_SI2 (i,j,bi,bj) = 0. _d 0            hflux_x_SI2 (i,j,bi,bj) = 0. _d 0
# Line 71  CADJ STORE streamice_hmask  = comlev1, k Line 75  CADJ STORE streamice_hmask  = comlev1, k
75        ENDDO        ENDDO
76    
77    
   
78  #ifdef ALLOW_AUTODIFF_TAMC  #ifdef ALLOW_AUTODIFF_TAMC
79  CADJ STORE h_after_uflux_si = comlev1, key=ikey_dynamics  CADJ STORE h_after_uflux_si = comlev1, key=ikey_dynamics
80  CADJ STORE streamice_hmask  = comlev1, key=ikey_dynamics  CADJ STORE streamice_hmask  = comlev1, key=ikey_dynamics
# Line 136  CADJ STORE streamice_hmask  = comlev1, k Line 139  CADJ STORE streamice_hmask  = comlev1, k
139       &       STREAMICE_hmask(i,j,bi,bj).eq.2.0) THEN       &       STREAMICE_hmask(i,j,bi,bj).eq.2.0) THEN
140               MR = (1.-float_frac_streamice(i,j,bi,bj)) *               MR = (1.-float_frac_streamice(i,j,bi,bj)) *
141       &             BDOT_STREAMICE(i,j,bi,bj)       &             BDOT_STREAMICE(i,j,bi,bj)
142               IF (MR * time_step_loc .gt.               SMB = ADOT_STREAMICE(i,j,bi,bj)
143       &         H_streamice (i,j,bi,bj)) THEN               TMB = SMB - MR
144                 IF ((TMB.lt.0.0) .and.
145         &         (MR * time_step_loc .gt.
146         &          H_streamice (i,j,bi,bj))) THEN
147                  H_streamice (i,j,bi,bj) = 0. _d 0                  H_streamice (i,j,bi,bj) = 0. _d 0
148                  STREAMICE_hmask(i,j,bi,bj) = 0.                  STREAMICE_hmask(i,j,bi,bj) = 0.
149               ELSE               ELSE
150                 H_streamice (i,j,bi,bj) =                 H_streamice (i,j,bi,bj) =
151       &          H_streamice (i,j,bi,bj) - MR       &          H_streamice (i,j,bi,bj) + TMB * time_step_loc
152               ENDIF               ENDIF
153             ENDIF             ENDIF
154           ENDDO           ENDDO

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.22