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

Ignore:
Timestamp:
2011-03-30T17:58:35+02:00 (13 years ago)
Author:
rblod
Message:

First attempt to put dynamic allocation on the trunk

File:
1 edited

Legend:

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

    r2528 r2715  
    66   !! History :  3.0  ! 2008-03  (M. Vancoppenolle) LIM-3 original code 
    77   !!            3.3  ! 2010-12  (G. Madec) add call to lim_thd_init and lim_thd_sal_init 
     8   !!            4.0  ! 2011-02  (G. Madec) dynamical allocation 
    89   !!---------------------------------------------------------------------- 
    910#if defined key_lim3 
     
    1314   !!   ice_init       : sea-ice model initialization 
    1415   !!---------------------------------------------------------------------- 
    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 
     16   USE phycst           ! physical constants 
     17   USE dom_oce          ! ocean domain 
     18   USE sbc_oce          ! Surface boundary condition: ocean fields 
     19   USE sbc_ice          ! Surface boundary condition: ice   fields 
     20   USE ice              ! LIM variables 
     21   USE par_ice          ! LIM parameters 
     22   USE dom_ice          ! LIM domain 
     23   USE thd_ice          ! LIM thermodynamical variables 
     24   USE limitd_me        ! LIM ice thickness distribution 
     25   USE limrhg           ! LIM dynamics 
     26   USE limmsh           ! LIM mesh 
     27   USE limistate        ! LIM initial state 
     28   USE limrst           ! LIM restart 
     29   USE limthd           ! LIM ice thermodynamics 
     30   USE limthd_sal       ! LIM ice thermodynamics: salinity 
     31   USE limvar           ! LIM variables 
     32   USE limsbc           ! LIM surface boundary condition 
     33   USE in_out_manager   ! I/O manager 
     34   USE lib_mpp          ! MPP library 
    2935 
    3036   IMPLICIT NONE 
    3137   PRIVATE 
    3238 
    33    PUBLIC   ice_init   ! called by opa.F90 
    34  
    35    !!---------------------------------------------------------------------- 
    36    !! NEMO/LIM3 3.3 , UCL - NEMO Consortium (2010) 
     39   PUBLIC   ice_init   ! called by sbcice_lim.F90 
     40 
     41   !!---------------------------------------------------------------------- 
     42   !! NEMO/LIM3 4.0 , UCL - NEMO Consortium (2011) 
    3743   !! $Id$ 
    3844   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
     
    4450      !!                  ***  ROUTINE ice_init  *** 
    4551      !! 
    46       !! ** purpose :    
     52      !! ** purpose :   Allocate all the dynamic arrays of the LIM-3 modules 
    4753      !!---------------------------------------------------------------------- 
    48       ! 
     54      INTEGER :: ierr 
     55      !!---------------------------------------------------------------------- 
     56 
     57      !                                ! Allocate the ice arrays 
     58      ierr =        ice_alloc       ()       ! ice variables 
     59      ierr = ierr + dom_ice_alloc   ()       ! domain 
     60      ierr = ierr + sbc_ice_alloc   ()       ! surface forcing 
     61      ierr = ierr + thd_ice_alloc   ()       ! thermodynamics 
     62      ierr = ierr + lim_itd_me_alloc()       ! ice thickness distribution - mechanics 
     63      ierr = ierr + lim_rhg_alloc   ()       ! dynamics 
     64      ! 
     65      IF( lk_mpp    )   CALL mpp_sum( ierr ) 
     66      IF( ierr /= 0 )   CALL ctl_stop('STOP', 'ice_init : unable to allocate ice arrays') 
     67      ! 
     68      !                                ! adequation jpk versus ice/snow layers/categories 
     69      IF( jpl   > jpk  .OR.  jpm    > jpk .OR.                                    & 
     70          jkmax > jpk  .OR.  nlay_s > jpk      )   CALL ctl_stop( 'STOP',         & 
     71         &     'ice_init: the 3rd dimension of workspace arrays is too small.',   & 
     72         &     'use more ocean levels or less ice/snow layers/categories.' ) 
     73 
    4974      !                                ! Open the namelist file  
    5075      CALL ctl_opn( numnam_ice, 'namelist_ice', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp ) 
    5176      ! 
    52       CALL ice_run                     ! namelist read some ice run parameters 
    53       ! 
    54       CALL lim_thd_init                ! namelist read ice thermodynics parameters 
    55       ! 
    56       CALL lim_thd_sal_init            ! namelist read ice salinity parameters 
     77      CALL ice_run                     ! set some ice run parameters 
     78      ! 
     79      CALL lim_thd_init                ! set ice thermodynics parameters 
     80      ! 
     81      CALL lim_thd_sal_init            ! set ice salinity parameters 
    5782      ! 
    5883      rdt_ice = nn_fsbc * rdttra(1)    ! sea-ice timestep 
     
    6085      CALL lim_msh                     ! ice mesh initialization 
    6186      ! 
    62       CALL lim_itd_ini                 ! initialize the ice thickness distribution 
     87      CALL lim_itd_ini                 ! ice thickness distribution initialization 
     88      ! 
     89      CALL lim_sbc_init                ! ice surface boundary condition    
     90 
    6391 
    6492      !                                ! Initial sea-ice state 
     
    94122      !! 
    95123      !! ** Method  :   Read the namicerun namelist and check the parameter  
    96       !!       values called at the first timestep (nit000) 
     124      !!              values called at the first timestep (nit000) 
    97125      !! 
    98126      !! ** input   :   Namelist namicerun 
Note: See TracChangeset for help on using the changeset viewer.