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

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

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

revision 1.6 by heimbach, Fri Sep 28 12:31:31 2012 UTC revision 1.7 by dgoldberg, Thu Mar 7 15:21:26 2013 UTC
# Line 28  CEOP Line 28  CEOP
28  #ifdef ALLOW_STREAMICE  #ifdef ALLOW_STREAMICE
29    
30        INTEGER bi, bj, i, j        INTEGER bi, bj, i, j
31        _RL OD, rhoi, rhow        _RL OD, rhoi, rhow, delta, r, h, hf, i_r
32    #ifdef STREAMICE_SMOOTH_FLOATATION
33          _RL ETA_GL_STREAMICE
34          external ETA_GL_STREAMICE
35          _RL PHI_GL_STREAMICE
36          external PHI_GL_STREAMICE
37    #endif
38    
39        rhoi = streamice_density        rhoi = streamice_density
40        rhow = streamice_density_ocean_avg        rhow = streamice_density_ocean_avg
41          r=rhoi/rhow
42          i_r = 1/r
43          delta=1-r
44    
45  #ifdef USE_ALT_RLOW  
46        print *, "RLOWSI", R_low_si(20,1,1,1)  #ifdef STREAMICE_SMOOTH_FLOATATION
 #endif  
47    
48        DO bj = myByLo(myThid), myByHi(myThid)        DO bj = myByLo(myThid), myByHi(myThid)
49         DO bi = myBxLo(myThid), myBxHi(myThid)         DO bi = myBxLo(myThid), myBxHi(myThid)
50          DO j=1-Oly,sNy+Oly          DO j=1-Oly,sNy+Oly
51           DO i=1-Olx,sNx+Olx           DO i=1-Olx,sNx+Olx
52  #ifdef USE_ALT_RLOW            
53              if (STREAMICE_hmask(i,j,bi,bj).eq.1.0 .or.
54         &        STREAMICE_hmask(i,j,bi,bj).eq.2.0) THEN
55    
56               h = H_streamice(i,j,bi,bj)
57    
58    # ifdef USE_ALT_RLOW
59               hf = -1.0 * i_r * R_low_si (i,j,bi,bj)
60    # else
61               hf = -1.0 * i_r * R_low (i,j,bi,bj)
62    # endif
63    
64               surf_el_streamice(i,j,bi,bj) =
65         &      ETA_GL_STREAMICE (
66         &       h-hf,
67         &       delta,
68         &       1. _d 0,
69         &       delta*hf,
70         &       streamice_smooth_gl_width)
71    
72               base_el_streamice(i,j,bi,bj) =
73         &      surf_el_streamice(i,j,bi,bj) - h
74    
75               float_frac_streamice(i,j,bi,bj) =
76         &      PHI_GL_STREAMICE (
77         &       h-hf,
78         &       streamice_smooth_gl_width)
79    
80              ENDIF
81    
82             ENDDO
83            ENDDO
84           ENDDO
85          ENDDO
86    
87    #else
88    
89          DO bj = myByLo(myThid), myByHi(myThid)
90           DO bi = myBxLo(myThid), myBxHi(myThid)
91            DO j=1-Oly,sNy+Oly
92             DO i=1-Olx,sNx+Olx
93    # ifdef USE_ALT_RLOW
94            OD = -1.0 * R_low_si (i,j,bi,bj) -            OD = -1.0 * R_low_si (i,j,bi,bj) -
95       &     H_streamice(i,j,bi,bj) * rhoi/rhow       &     H_streamice(i,j,bi,bj) * rhoi/rhow
96  #else  # else
97            OD = -1.0 * R_low (i,j,bi,bj) -            OD = -1.0 * R_low (i,j,bi,bj) -
98       &     H_streamice(i,j,bi,bj) * rhoi/rhow       &     H_streamice(i,j,bi,bj) * rhoi/rhow
99  #endif  # endif
100    
101    
102            IF (OD .ge. 0. _d 0) THEN                      IF (OD .ge. 0. _d 0) THEN          
103    
104  c         ice thickness does not take up whole ocean column -> floating  c         ice thickness does not take up whole ocean column -> floating
105             float_frac_streamice(i,j,bi,bj) = 0.0             float_frac_streamice(i,j,bi,bj) = 0.0
106  #ifdef USE_ALT_RLOW  # ifdef USE_ALT_RLOW
107             base_el_streamice(i,j,bi,bj) = R_low_si(i,j,bi,bj)+OD             base_el_streamice(i,j,bi,bj) = R_low_si(i,j,bi,bj)+OD
108  #else  # else
109             base_el_streamice(i,j,bi,bj) = R_low(i,j,bi,bj)+OD             base_el_streamice(i,j,bi,bj) = R_low(i,j,bi,bj)+OD
110  #endif  # endif
111             surf_el_streamice(i,j,bi,bj) =             surf_el_streamice(i,j,bi,bj) =
112       &      (1-rhoi/rhow)*H_streamice(i,j,bi,bj)       &      (1-rhoi/rhow)*H_streamice(i,j,bi,bj)
113            ELSE            ELSE
114    
115    
116             float_frac_streamice(i,j,bi,bj) = 1.0             float_frac_streamice(i,j,bi,bj) = 1.0
117  #ifdef USE_ALT_RLOW  # ifdef USE_ALT_RLOW
118             base_el_streamice(i,j,bi,bj) = R_low_si(i,j,bi,bj)             base_el_streamice(i,j,bi,bj) = R_low_si(i,j,bi,bj)
119             surf_el_streamice(i,j,bi,bj) = R_low_si(i,j,bi,bj)             surf_el_streamice(i,j,bi,bj) = R_low_si(i,j,bi,bj)
120  #else  # else
121             base_el_streamice(i,j,bi,bj) = R_low(i,j,bi,bj)             base_el_streamice(i,j,bi,bj) = R_low(i,j,bi,bj)
122             surf_el_streamice(i,j,bi,bj) = R_low(i,j,bi,bj)             surf_el_streamice(i,j,bi,bj) = R_low(i,j,bi,bj)
123  #endif  # endif
124       &      + H_streamice(i,j,bi,bj)       &      + H_streamice(i,j,bi,bj)
125            ENDIF            ENDIF
126           ENDDO           ENDDO
# Line 79  c         ice thickness does not take up Line 128  c         ice thickness does not take up
128         ENDDO         ENDDO
129        ENDDO        ENDDO
130    
131    #endif
132    
133         _EXCH_XY_RL(float_frac_streamice, myThid )         _EXCH_XY_RL(float_frac_streamice, myThid )
134         _EXCH_XY_RL(base_el_streamice, myThid )         _EXCH_XY_RL(base_el_streamice, myThid )
135         _EXCH_XY_RL(surf_el_streamice, myThid )         _EXCH_XY_RL(surf_el_streamice, myThid )

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

  ViewVC Help
Powered by ViewVC 1.1.22