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_2/iceini_2.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_2/iceini_2.F90

    r2528 r2715  
    44   !!   Sea-ice model : LIM 2.0 Sea ice model Initialization 
    55   !!====================================================================== 
    6    !! History :   1.0  !  02-08  (G. Madec)  F90: Free form and modules 
    7    !!             2.0  !  03-08  (C. Ethe)  add ice_run 
    8    !!             3.3  !  09-05  (G.Garric, C. Bricaud) addition of the lim2_evp case 
     6   !! History :  1.0  ! 2002-08  (G. Madec)  F90: Free form and modules 
     7   !!            2.0  ! 2003-08  (C. Ethe)  add ice_run 
     8   !!            3.3  ! 2009-05  (G. Garric, C. Bricaud) addition of the lim2_evp case 
     9   !!            4.0  ! 2011-02  (G. Madec) dynamical allocation 
    910   !!---------------------------------------------------------------------- 
    1011#if defined key_lim2 
     
    1213   !!   'key_lim2' :                                  LIM 2.0 sea-ice model 
    1314   !!---------------------------------------------------------------------- 
    14    !!---------------------------------------------------------------------- 
    1515   !!   ice_init_2       : sea-ice model initialization 
    1616   !!   ice_run_2        : Definition some run parameter for ice model 
    1717   !!---------------------------------------------------------------------- 
     18   USE phycst           ! physical constants 
    1819   USE dom_oce          ! ocean domain 
    19    USE dom_ice_2        ! LIM2: ice domain 
    2020   USE sbc_oce          ! surface boundary condition: ocean 
    21    USE sbc_ice          ! surface boundary condition: ice 
    22    USE phycst           ! Define parameters for the routines 
    23    USE ice_2            ! LIM2: ice variable 
    24    USE limmsh_2         ! LIM2: mesh 
    25    USE limistate_2      ! LIM2: initial state 
    26    USE limrst_2         ! LIM2: restart 
     21   USE sbc_ice          ! LIM2 surface boundary condition 
     22   USE dom_ice_2        ! LIM2 ice domain 
     23   USE par_ice_2        ! LIM2 parameters 
     24   USE thd_ice_2        ! LIM2 thermodynamical variables 
     25   USE limrhg           ! LIM2 rheology 
     26   USE ice_2            ! LIM2 ice variable 
     27   USE limmsh_2         ! LIM2 mesh 
     28   USE limistate_2      ! LIM2 initial state 
     29   USE limrst_2         ! LIM2 restart 
     30   USE limsbc_2         ! LIM2 surface boundary condition 
    2731   USE in_out_manager   ! I/O manager 
    28        
     32   USE lib_mpp          ! MPP library 
     33 
    2934   IMPLICIT NONE 
    3035   PRIVATE 
     
    3338 
    3439   !!---------------------------------------------------------------------- 
    35    !! NEMO/LIM2 3.3 , UCL - NEMO Consortium (2010) 
     40   !! NEMO/LIM2 4.0 , UCL - NEMO Consortium (2011) 
    3641   !! $Id$  
    3742   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
     
    4550      !! ** purpose :   initialisation of LIM-2 domain and variables   
    4651      !!---------------------------------------------------------------------- 
     52      INTEGER :: ierr 
     53      !!---------------------------------------------------------------------- 
    4754      ! 
     55      IF(lwp) THEN 
     56         WRITE(numout,*) 
     57         WRITE(numout,*) 'ice_init_2 : LIM-2 sea-ice - initialization' 
     58         WRITE(numout,*) '~~~~~~~~~~~   ' 
     59      ENDIF 
     60      !                                ! Allocate the ice arrays 
     61      ierr =        ice_alloc_2    ()       ! ice variables 
     62      ierr = ierr + dom_ice_alloc_2()       ! domain 
     63      ierr = ierr + sbc_ice_alloc  ()       ! surface forcing 
     64      ierr = ierr + thd_ice_alloc_2()       ! thermodynamics 
     65#if ! defined key_lim2_vp 
     66      ierr = ierr + lim_rhg_alloc  () 
     67#endif 
     68      IF( lk_mpp    )   CALL mpp_sum( ierr ) 
     69      IF( ierr /= 0 )   CALL ctl_stop( 'STOP', 'ice_init_2 : unable to allocate ice arrays' ) 
     70 
     71      !                                ! adequation jpk versus ice/snow layers 
     72      IF( jpl > jpk  .OR.  jplayersp1 > jpk  )   CALL ctl_stop( 'STOP',           & 
     73         &     'ice_init: the 3rd dimension of workspace arrays is too small.',   & 
     74         &     'use more ocean levels or less ice layers/categories.' ) 
     75 
    4876      !                                ! Open the namelist file  
    4977      CALL ctl_opn( numnam_ice, 'namelist_ice', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp )  
     
    6189      ENDIF 
    6290      ! 
    63       tn_ice(:,:,1) = sist(:,:)        ! initialisation of ice temperature    
    64       fr_i  (:,:) = 1.0 - frld(:,:)    ! initialisation of sea-ice fraction     
     91      tn_ice(:,:,1) = sist(:,:)        ! ice temperature  known by the ocean 
     92      fr_i  (:,:)   = 1.0 - frld(:,:)  ! sea-ice fraction known by the ocean 
     93      ! 
     94      CALL lim_sbc_init_2              ! ice surface boundary condition    
     95      ! 
     96      IF( lk_lim2_vp )   THEN   ;   WRITE(numout,*) '                VP  rheology - B-grid case' 
     97      ELSE                      ;   WRITE(numout,*) '                EVP rheology - C-grid case' 
     98      ENDIF 
    6599      ! 
    66100   END SUBROUTINE ice_init_2 
Note: See TracChangeset for help on using the changeset viewer.