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 2528 for trunk/NEMOGCM/NEMO/LIM_SRC_3/iceini.F90 – NEMO

Ignore:
Timestamp:
2010-12-27T18:33:53+01:00 (13 years ago)
Author:
rblod
Message:

Update NEMOGCM from branch nemo_v3_3_beta

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/LIM_SRC_3/iceini.F90

    r2477 r2528  
    44   !!   Sea-ice model : LIM Sea ice model Initialization 
    55   !!====================================================================== 
     6   !! History :  3.0  ! 2008-03  (M. Vancoppenolle) LIM-3 original code 
     7   !!            3.3  ! 2010-12  (G. Madec) add call to lim_thd_init and lim_thd_sal_init 
     8   !!---------------------------------------------------------------------- 
    69#if defined key_lim3 
    710   !!---------------------------------------------------------------------- 
     
    1013   !!   ice_init       : sea-ice model initialization 
    1114   !!---------------------------------------------------------------------- 
    12    USE dom_oce 
    13    USE in_out_manager 
    14    USE sbc_oce         ! Surface boundary condition: ocean fields 
    15    USE sbc_ice         ! Surface boundary condition: ice fields 
    16    USE phycst          ! Define parameters for the routines 
    17    USE ice 
    18    USE limmsh 
    19    USE limistate 
    20    USE limthd         ! LIM: ice thermodynamics  
    21    USE limthd_sal     ! LIM: ice thermodynamics: salinity  
    22    USE limrst 
    23    USE par_ice 
    24    USE limvar 
    25    USE lib_mpp 
     15   USE phycst         ! physical constants 
     16   USE dom_oce        ! ocean domain 
     17   USE sbc_oce        ! Surface boundary condition: ocean fields 
     18   USE sbc_ice        ! Surface boundary condition: ice fields 
     19   USE ice            ! LIM: sea-ice variables 
     20   USE limmsh         ! LIM: mesh 
     21   USE limistate      ! LIM: initial state 
     22   USE limrst         ! LIM: restart 
     23   USE limthd         ! LIM: ice thermodynamics 
     24   USE limthd_sal     ! LIM: ice thermodynamics: salinity 
     25   USE par_ice        ! LIM: sea-ice parameters 
     26   USE limvar         ! LIM: variables 
     27   USE in_out_manager ! I/O manager 
     28   USE lib_mpp        ! MPP library 
    2629 
    2730   IMPLICIT NONE 
    2831   PRIVATE 
    2932 
    30    PUBLIC ice_init                 ! called by opa.F90 
    31    !!---------------------------------------------------------------------- 
    32    !!   LIM 3.0,  UCL-ASTR-LOCEAN-IPSL (2008)  
     33   PUBLIC   ice_init   ! called by opa.F90 
     34 
     35   !!---------------------------------------------------------------------- 
     36   !! NEMO/LIM3 3.3 , UCL - NEMO Consortium (2010) 
    3337   !! $Id$ 
    34    !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt  
    35    !!---------------------------------------------------------------------- 
    36  
     38   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
     39   !!---------------------------------------------------------------------- 
    3740CONTAINS 
    3841 
     
    4245      !! 
    4346      !! ** purpose :    
    44       !! 
    45       !! History : 
    46       !!   2.0  !  02-08  (G. Madec)  F90: Free form and modules 
    47       !!   3.0  !  08-03  (M. Vancop) ITD, salinity, EVP-C 
    4847      !!---------------------------------------------------------------------- 
    49  
    50       ! Open the namelist file  
     48      ! 
     49      !                                ! Open the namelist file  
    5150      CALL ctl_opn( numnam_ice, 'namelist_ice', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp ) 
    52  
    53       CALL ice_run                    !  read in namelist some run parameters 
     51      ! 
     52      CALL ice_run                     ! namelist read some ice run parameters 
    5453      ! 
    5554      CALL lim_thd_init                ! namelist read ice thermodynics parameters 
     
    6362      CALL lim_itd_ini                 ! initialize the ice thickness distribution 
    6463 
    65      !                                ! Initial sea-ice state 
     64      !                                ! Initial sea-ice state 
    6665      IF( .NOT.ln_rstart ) THEN              ! start from rest 
    6766         numit = 0 
     
    7978      fr_i(:,:) = at_i(:,:)           ! initialisation of sea-ice fraction 
    8079      ! 
    81       nstart = numit  + nn_fsbc 
    82       nitrun = nitend - nit000 + 1 
    83       nlast  = numit  + nitrun 
     80      nstart = numit  + nn_fsbc       
     81      nitrun = nitend - nit000 + 1  
     82      nlast  = numit  + nitrun  
    8483      ! 
    8584      IF( nstock == 0  )   nstock = nlast + 1 
    86  
     85      ! 
    8786   END SUBROUTINE ice_init 
     87 
    8888 
    8989   SUBROUTINE ice_run 
     
    9797      !! 
    9898      !! ** input   :   Namelist namicerun 
    99       !! 
    100       !! history : 
    101       !!   2.0  !  03-08 (C. Ethe)  Original code 
    102       !!   3.0  !  08-03 (M. Vancop) LIM3 
    10399      !!------------------------------------------------------------------- 
    104100      NAMELIST/namicerun/ cn_icerst_in, cn_icerst_out, ln_limdyn, acrit, hsndif, hicdif, cai, cao, ln_nicep 
    105101      !!------------------------------------------------------------------- 
    106  
    107       !                                           ! Read Namelist namicerun  
    108       REWIND ( numnam_ice ) 
    109       READ   ( numnam_ice , namicerun ) 
    110  
     102      !                     
     103      REWIND( numnam_ice )                ! Read Namelist namicerun  
     104      READ  ( numnam_ice , namicerun ) 
     105      ! 
    111106      IF( lk_mpp .AND. ln_nicep ) THEN 
    112107         ln_nicep = .FALSE. 
    113108         CALL ctl_warn( 'ice_run : specific control print for LIM3 desactivated with MPI' ) 
    114109      ENDIF        
    115  
    116       IF(lwp) THEN 
     110      ! 
     111      IF(lwp) THEN                        ! control print 
    117112         WRITE(numout,*) 
    118113         WRITE(numout,*) 'ice_run : ice share parameters for dynamics/advection/thermo of sea-ice' 
     
    124119         WRITE(numout,*) '   atmospheric drag over sea ice                           = ', cai 
    125120         WRITE(numout,*) '   atmospheric drag over ocean                             = ', cao 
    126          WRITE(numout,*) '   Several ice points in the ice or not in ocean.output = ', ln_nicep 
    127       ENDIF 
    128  
     121         WRITE(numout,*) '   Several ice points in the ice or not in ocean.output    = ', ln_nicep 
     122      ENDIF 
     123      ! 
    129124   END SUBROUTINE ice_run 
     125 
    130126 
    131127   SUBROUTINE lim_itd_ini 
    132128      !!------------------------------------------------------------------ 
    133129      !!                ***  ROUTINE lim_itd_ini *** 
    134       !! ** Purpose : 
    135       !!            Initializes the ice thickness distribution 
    136       !! ** Method  : 
    137       !!            Very simple. Currently there are no ice types in the 
    138       !!            model... 
    139       !! 
    140       !! ** Arguments : 
    141       !!           kideb , kiut : Starting and ending points on which the 
    142       !!                         the computation is applied 
    143       !! 
    144       !! ** Inputs / Ouputs : (global commons) 
    145       !! 
    146       !! ** External : 
    147       !! 
    148       !! ** References : 
    149       !! 
    150       !! ** History : 
    151       !!           (12-2005) Martin Vancoppenolle 
    152       !! 
     130      !! 
     131      !! ** Purpose :   Initializes the ice thickness distribution 
     132      !! ** Method  :   ... 
    153133      !!------------------------------------------------------------------ 
    154       !! * Arguments 
    155  
    156       !! * Local variables 
    157       INTEGER ::   jl,       &   ! ice category dummy loop index 
    158          jm            ! ice types    dummy loop index 
    159  
    160       REAL(wp)  ::           &  ! constant values 
    161          zeps      =  1.0e-10,   & ! 
    162          zc1                 ,   & ! 
    163          zc2                 ,   & ! 
    164          zc3                 ,   & ! 
    165          zx1 
    166  
     134      INTEGER  ::   jl, jm               ! dummy loop index 
     135      REAL(wp) ::   zc1, zc2, zc3, zx1   ! local scalars 
     136      !!------------------------------------------------------------------ 
     137 
     138      IF(lwp) WRITE(numout,*) 
    167139      IF(lwp) WRITE(numout,*) 'lim_itd_ini : Initialization of ice thickness distribution ' 
    168140      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~' 
    169  
    170       !!-- End of declarations 
    171       !!------------------------------------------------------------------------------ 
    172141 
    173142      !------------------------------------------------------------------------------! 
     
    207176      !- Thickness categories boundaries  
    208177      !---------------------------------- 
    209       hi_max(:) = 0.0 
    210       hi_max_typ(:,:) = 0.0 
     178      hi_max(:) = 0._wp 
     179      hi_max_typ(:,:) = 0._wp 
    211180 
    212181      !- Type 1 - undeformed ice 
    213       zc1 = 3./REAL(ice_cat_bounds(1,2)-ice_cat_bounds(1,1)+1) 
    214       zc2 = 10.0*zc1 
    215       zc3 = 3.0 
     182      zc1 =  3._wp / REAL( ice_cat_bounds(1,2) - ice_cat_bounds(1,1) + 1 , wp ) 
     183      zc2 = 10._wp * zc1 
     184      zc3 =  3._wp 
    216185 
    217186      DO jl = ice_cat_bounds(1,1), ice_cat_bounds(1,2) 
    218          zx1 = REAL(jl-1) / REAL(ice_cat_bounds(1,2)-ice_cat_bounds(1,1)+1) 
    219          hi_max(jl) = hi_max(jl-1) + zc1 + zc2 * (1.0 + TANH ( zc3 * (zx1 - 1.0 ) ) ) 
     187         zx1 = REAL( jl-1 , wp ) / REAL( ice_cat_bounds(1,2) - ice_cat_bounds(1,1) + 1 , wp ) 
     188         hi_max(jl) = hi_max(jl-1) + zc1 + zc2 * (1._wp + TANH( zc3 * (zx1 - 1._wp ) ) ) 
    220189      END DO 
    221190 
    222191      !- Fill in the hi_max_typ vector, useful in other circumstances 
    223       ! Tricky trick 
    224       ! hi_max_typ is actually not used in the code and will be removed in a 
    225       ! next flyspray at this time, the tricky trick will also be removed 
    226       ! Martin, march 08 
     192      ! Tricky trick: hi_max_typ is actually not used in the code and will be removed in a 
     193      ! next flyspray at this time, the tricky trick will also be removed (Martin, march 08) 
    227194      DO jl = ice_cat_bounds(1,1), ice_cat_bounds(1,2) 
    228195         hi_max_typ(jl,1) = hi_max(jl) 
     
    239206         END DO 
    240207      ENDIF 
    241  
     208      ! 
    242209      DO jl = 1, jpl 
    243          hi_mean(jl) = ( hi_max(jl) + hi_max(jl-1) ) / 2.0 
    244       END DO 
    245  
     210         hi_mean(jl) = ( hi_max(jl) + hi_max(jl-1) ) * 0.5_wp 
     211      END DO 
     212      ! 
    246213      tn_ice(:,:,:) = t_su(:,:,:) 
    247  
     214      ! 
    248215   END SUBROUTINE lim_itd_ini 
    249216 
     
    255222   SUBROUTINE ice_init        ! Empty routine 
    256223   END SUBROUTINE ice_init 
    257  
    258    SUBROUTINE lim_itd_ini 
    259    END SUBROUTINE lim_itd_ini 
    260224#endif 
    261225 
Note: See TracChangeset for help on using the changeset viewer.