New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 4921 for branches/2014/dev_r4650_UKMO13_CICE_changes_take2/NEMOGCM/NEMO/LIM_SRC_3/iceini.F90 – NEMO

Ignore:
Timestamp:
2014-11-28T14:59:01+01:00 (9 years ago)
Author:
timgraham
Message:

merged with revision 4879 of trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2014/dev_r4650_UKMO13_CICE_changes_take2/NEMOGCM/NEMO/LIM_SRC_3/iceini.F90

    r4624 r4921  
    6666      ! 
    6767      !                                ! 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',                     & 
    7070         &     'ice_init: the 3rd dimension of workspace arrays is too small.',   & 
    7171         &     'use more ocean levels or less ice/snow layers/categories.' ) 
     
    8989      CALL lim_itd_ini                 ! ice thickness distribution initialization 
    9090      ! 
     91      CALL lim_itd_me_init             ! ice thickness distribution initialization 
    9192      !                                ! Initial sea-ice state 
    9293      IF( .NOT. ln_rstart ) THEN              ! start from rest 
     
    173174      !!              limistate (only) and is changed to 99 m in ice_init 
    174175      !!------------------------------------------------------------------ 
    175       INTEGER  ::   jl, jm               ! dummy loop index 
     176      INTEGER  ::   jl                   ! dummy loop index 
    176177      REAL(wp) ::   zc1, zc2, zc3, zx1   ! local scalars 
    177178      !!------------------------------------------------------------------ 
     
    184185      ! 1) Ice thickness distribution parameters initialization     
    185186      !------------------------------------------------------------------------------! 
    186  
    187       !- Types boundaries (integer) 
    188       !---------------------------- 
    189       ice_cat_bounds(1,1) = 1 
    190       ice_cat_bounds(1,2) = jpl 
    191  
    192       !- Number of ice thickness categories in each ice type 
    193       DO jm = 1, jpm 
    194          ice_ncat_types(jm) = ice_cat_bounds(jm,2) - ice_cat_bounds(jm,1) + 1  
    195       END DO 
    196  
    197       !- Make the correspondence between thickness categories and ice types 
    198       !--------------------------------------------------------------------- 
    199       DO jm = 1, jpm       !over types 
    200          DO jl = ice_cat_bounds(jm,1), ice_cat_bounds(jm,2) !over thickness categories 
    201             ice_types(jl) = jm 
    202          END DO 
    203       END DO 
    204  
    205187      IF(lwp) THEN   
    206          WRITE(numout,*) ' Number of ice types jpm =      ', jpm 
    207188         WRITE(numout,*) ' Number of ice categories jpl = ', jpl 
    208          DO jm = 1, jpm 
    209             WRITE(numout,*) ' Ice type ', jm 
    210             WRITE(numout,*) ' Number of thickness categories ', ice_ncat_types(jm) 
    211             WRITE(numout,*) ' Thickness category boundaries  ', ice_cat_bounds(jm,1:2) 
    212          END DO 
    213          WRITE(numout,*) 'Ice type vector', ice_types(1:jpl) 
    214          WRITE(numout,*) 
    215189      ENDIF 
    216190 
     
    218192      !---------------------------------- 
    219193      hi_max(:) = 0._wp 
    220       hi_max_typ(:,:) = 0._wp 
    221  
    222       !- Type 1 - undeformed ice 
    223       zc1 =  3._wp / REAL( ice_cat_bounds(1,2) - ice_cat_bounds(1,1) + 1 , wp ) 
     194 
     195      zc1 =  3._wp / REAL( jpl, wp ) 
    224196      zc2 = 10._wp * zc1 
    225197      zc3 =  3._wp 
    226198 
    227       DO jl = ice_cat_bounds(1,1), ice_cat_bounds(1,2) 
    228          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 ) 
    229201         hi_max(jl) = hi_max(jl-1) + zc1 + zc2 * (1._wp + TANH( zc3 * (zx1 - 1._wp ) ) ) 
    230202      END DO 
    231203 
    232       !- Fill in the hi_max_typ vector, useful in other circumstances 
    233       ! Tricky trick: hi_max_typ is actually not used in the code and will be removed in a 
    234       ! next flyspray at this time, the tricky trick will also be removed (Martin, march 08) 
    235       DO jl = ice_cat_bounds(1,1), ice_cat_bounds(1,2) 
    236          hi_max_typ(jl,1) = hi_max(jl) 
    237       END DO 
    238  
    239       IF(lwp) WRITE(numout,*) ' Thickness category boundaries independently of ice type ' 
     204      IF(lwp) WRITE(numout,*) ' Thickness category boundaries ' 
    240205      IF(lwp) WRITE(numout,*) ' hi_max ', hi_max(0:jpl) 
    241206 
    242       IF(lwp) WRITE(numout,*) ' Thickness category boundaries inside ice types ' 
    243       IF(lwp) THEN  
    244          DO jm = 1, jpm 
    245             WRITE(numout,*) ' Type number ', jm 
    246             WRITE(numout,*) ' hi_max_typ : ', hi_max_typ(0:ice_ncat_types(jm),jm) 
    247          END DO 
    248       ENDIF 
    249207      ! 
    250208      DO jl = 1, jpl 
Note: See TracChangeset for help on using the changeset viewer.