/[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.2 by heimbach, Wed May 2 02:36:01 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        _RL sec_per_year, time_step_loc, MR, SMB, TMB
40          CHARACTER*(MAX_LEN_MBUF) msgBuf
41        external SLOPE_LIMITER        external SLOPE_LIMITER
42    
43        sec_per_year = 365.*86400.        sec_per_year = 365.*86400.
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 51  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 69  CADJ STORE streamice_hmask  = comlev1, k Line 74  CADJ STORE streamice_hmask  = comlev1, k
74         ENDDO         ENDDO
75        ENDDO        ENDDO
76    
 !       PRINT *, "H in last row ", H_streamice(81,20,1,1)  
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
# Line 81  CADJ STORE streamice_hmask  = comlev1, k Line 85  CADJ STORE streamice_hmask  = comlev1, k
85       O   h_after_uflux_SI,       O   h_after_uflux_SI,
86       I   time_step_loc )       I   time_step_loc )
87    
88  !       PRINT *, "H in last row ", H_streamice(81,20,1,1)  
89    
90        DO bj=myByLo(myThid),myByHi(myThid)        DO bj=myByLo(myThid),myByHi(myThid)
91         DO bi=myBxLo(myThid),myBxHi(myThid)         DO bi=myBxLo(myThid),myBxHi(myThid)
# Line 104  CADJ STORE streamice_hmask  = comlev1, k Line 108  CADJ STORE streamice_hmask  = comlev1, k
108       O   h_after_vflux_SI,       O   h_after_vflux_SI,
109       I   time_step_loc )       I   time_step_loc )
110    
111  !       PRINT *, "H in last row ", H_streamice(81,20,1,1)  
112    
113        DO bj=myByLo(myThid),myByHi(myThid)        DO bj=myByLo(myThid),myByHi(myThid)
114         DO bi=myBxLo(myThid),myBxHi(myThid)         DO bi=myBxLo(myThid),myBxHi(myThid)
# Line 119  CADJ STORE streamice_hmask  = comlev1, k Line 123  CADJ STORE streamice_hmask  = comlev1, k
123         ENDDO         ENDDO
124        ENDDO        ENDDO
125    
126  !       PRINT *, "H in last row ", H_streamice(81,20,1,1)  
127    
128        CALL STREAMICE_ADV_FRONT ( myThid, time_step_loc )        CALL STREAMICE_ADV_FRONT ( myThid, time_step_loc )
129    
 !       PRINT *, "H in last row ", H_streamice(81,20,1,1)  
130    
131        _EXCH_XY_RL( H_streamice, myThid )  ! NOW WE APPLY MELT RATES !!
132        _EXCH_XY_RL( area_shelf_streamice, myThid )  ! THIS MAY BE MOVED TO A SEPARATE SUBROUTINE
       _EXCH_XY_RL( STREAMICE_hmask, myThid )  
         
       PRINT *, "END STREAMICE_ADVECT_THICKNESS"  
133    
134          DO bj=myByLo(myThid),myByHi(myThid)
135           DO bi=myBxLo(myThid),myBxHi(myThid)
136            DO j=1-OLy,sNy+OLy
137             DO i=1-OLx,sNx+OLx
138               IF (STREAMICE_hmask(i,j,bi,bj).eq.1.0 .or.
139         &       STREAMICE_hmask(i,j,bi,bj).eq.2.0) THEN
140                 MR = (1.-float_frac_streamice(i,j,bi,bj)) *
141         &             BDOT_STREAMICE(i,j,bi,bj)
142                 SMB = ADOT_STREAMICE(i,j,bi,bj)
143                 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
148                    STREAMICE_hmask(i,j,bi,bj) = 0.
149                 ELSE
150                   H_streamice (i,j,bi,bj) =
151         &          H_streamice (i,j,bi,bj) + TMB * time_step_loc
152                 ENDIF
153               ENDIF
154             ENDDO
155            ENDDO
156           ENDDO
157          ENDDO    
158    
159          
160          WRITE(msgBuf,'(A)') 'END STREAMICE_ADVECT_THICKNESS'
161           CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
162         &                     SQUEEZE_RIGHT , 1)
163          
164  #endif  #endif
165        END        END
166    

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

  ViewVC Help
Powered by ViewVC 1.1.22