- Timestamp:
- 2014-11-27T17:13:38+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2014/dev_CNRS_2014/NEMOGCM/NEMO/LIM_SRC_3/iceini.F90
r4901 r4902 66 66 ! 67 67 ! ! adequation jpk versus ice/snow layers/categories 68 IF( jpl > jpk .OR. jpm > jpk .OR.&69 jkmax > jpk .OR. nlay_s > jpk ) CALL ctl_stop( 'STOP',&68 IF( jpl > jpk .OR. (nlay_i+1) > jpk .OR. nlay_s > jpk ) & 69 & CALL ctl_stop( 'STOP', & 70 70 & 'ice_init: the 3rd dimension of workspace arrays is too small.', & 71 71 & 'use more ocean levels or less ice/snow layers/categories.' ) … … 174 174 !! limistate (only) and is changed to 99 m in ice_init 175 175 !!------------------------------------------------------------------ 176 INTEGER :: jl , jm! dummy loop index176 INTEGER :: jl ! dummy loop index 177 177 REAL(wp) :: zc1, zc2, zc3, zx1 ! local scalars 178 178 !!------------------------------------------------------------------ … … 185 185 ! 1) Ice thickness distribution parameters initialization 186 186 !------------------------------------------------------------------------------! 187 188 !- Types boundaries (integer)189 !----------------------------190 ice_cat_bounds(1,1) = 1191 ice_cat_bounds(1,2) = jpl192 193 !- Number of ice thickness categories in each ice type194 DO jm = 1, jpm195 ice_ncat_types(jm) = ice_cat_bounds(jm,2) - ice_cat_bounds(jm,1) + 1196 END DO197 198 !- Make the correspondence between thickness categories and ice types199 !---------------------------------------------------------------------200 DO jm = 1, jpm !over types201 DO jl = ice_cat_bounds(jm,1), ice_cat_bounds(jm,2) !over thickness categories202 ice_types(jl) = jm203 END DO204 END DO205 206 187 IF(lwp) THEN 207 WRITE(numout,*) ' Number of ice types jpm = ', jpm208 188 WRITE(numout,*) ' Number of ice categories jpl = ', jpl 209 DO jm = 1, jpm210 WRITE(numout,*) ' Ice type ', jm211 WRITE(numout,*) ' Number of thickness categories ', ice_ncat_types(jm)212 WRITE(numout,*) ' Thickness category boundaries ', ice_cat_bounds(jm,1:2)213 END DO214 WRITE(numout,*) 'Ice type vector', ice_types(1:jpl)215 WRITE(numout,*)216 189 ENDIF 217 190 … … 219 192 !---------------------------------- 220 193 hi_max(:) = 0._wp 221 hi_max_typ(:,:) = 0._wp 222 223 !- Type 1 - undeformed ice 224 zc1 = 3._wp / REAL( ice_cat_bounds(1,2) - ice_cat_bounds(1,1) + 1 , wp ) 194 195 zc1 = 3._wp / REAL( jpl, wp ) 225 196 zc2 = 10._wp * zc1 226 197 zc3 = 3._wp 227 198 228 DO jl = ice_cat_bounds(1,1), ice_cat_bounds(1,2)229 zx1 = REAL( jl-1 , wp ) / REAL( ice_cat_bounds(1,2) - ice_cat_bounds(1,1) + 1, wp )199 DO jl = 1, jpl 200 zx1 = REAL( jl-1, wp ) / REAL( jpl, wp ) 230 201 hi_max(jl) = hi_max(jl-1) + zc1 + zc2 * (1._wp + TANH( zc3 * (zx1 - 1._wp ) ) ) 231 202 END DO 232 203 233 !- Fill in the hi_max_typ vector, useful in other circumstances 234 ! Tricky trick: hi_max_typ is actually not used in the code and will be removed in a 235 ! next flyspray at this time, the tricky trick will also be removed (Martin, march 08) 236 DO jl = ice_cat_bounds(1,1), ice_cat_bounds(1,2) 237 hi_max_typ(jl,1) = hi_max(jl) 238 END DO 239 240 IF(lwp) WRITE(numout,*) ' Thickness category boundaries independently of ice type ' 204 IF(lwp) WRITE(numout,*) ' Thickness category boundaries ' 241 205 IF(lwp) WRITE(numout,*) ' hi_max ', hi_max(0:jpl) 242 206 243 IF(lwp) WRITE(numout,*) ' Thickness category boundaries inside ice types '244 IF(lwp) THEN245 DO jm = 1, jpm246 WRITE(numout,*) ' Type number ', jm247 WRITE(numout,*) ' hi_max_typ : ', hi_max_typ(0:ice_ncat_types(jm),jm)248 END DO249 ENDIF250 207 ! 251 208 DO jl = 1, jpl
Note: See TracChangeset
for help on using the changeset viewer.