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/limdia_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/limdia_2.F90

    r2528 r2715  
    1212   !!   'key_lim2' :                                  LIM 2.0 sea-ice model 
    1313   !!---------------------------------------------------------------------- 
    14    !!---------------------------------------------------------------------- 
    1514   !!   lim_dia_2      : computation of the time evolution of keys var. 
    1615   !!   lim_dia_init_2 : initialization and namelist read 
     
    2423   USE limistate_2     ! 
    2524   USE in_out_manager  ! I/O manager 
     25   USE lib_mpp         ! MPP library 
    2626 
    2727   IMPLICIT NONE 
     
    2929 
    3030   PUBLIC               lim_dia_2          ! called by sbc_ice_lim_2 
     31 
    3132   INTEGER, PUBLIC ::   ntmoy   = 1 ,   &  !: instantaneous values of ice evolution or averaging ntmoy 
    3233      &                 ninfo   = 1        !: frequency of ouputs on file ice_evolu in case of averaging 
     
    5253   REAL(wp)                     ::   epsi06 = 1.e-06      ! ??? 
    5354   REAL(wp), DIMENSION(jpinfmx) ::   vinfom               ! temporary working space 
    54    REAL(wp), DIMENSION(jpi,jpj) ::   aire                 ! masked grid cell area 
     55   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   aire                 ! masked grid cell area 
    5556 
    5657   !! * Substitutions 
     
    6162   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
    6263   !!---------------------------------------------------------------------- 
    63  
    6464CONTAINS 
    6565 
     
    173173       !!------------------------------------------------------------------- 
    174174       CHARACTER(len=jpchinf) ::   titinf 
    175        INTEGER  ::   jv            ! dummy loop indice 
    176        INTEGER  ::   ntot , ndeb  
    177        INTEGER  ::   nv            ! indice of variable  
    178        REAL(wp) ::   zxx0, zxx1    ! temporary scalars 
     175       INTEGER  ::   jv   ! dummy loop indice 
     176       INTEGER  ::   ntot , ndeb, nv, ierr   ! local integer 
     177       REAL(wp) ::   zxx0, zxx1              ! local scalars 
    179178 
    180179       NAMELIST/namicedia/fmtinf, nfrinf, ninfo, ntmoy 
    181180       !!------------------------------------------------------------------- 
    182181 
    183        ! Read Namelist namicedia 
    184        REWIND ( numnam_ice ) 
    185        READ   ( numnam_ice  , namicedia ) 
     182       REWIND( numnam_ice )                     ! Read Namelist namicedia 
     183       READ  ( numnam_ice  , namicedia ) 
    186184        
    187        IF(lwp) THEN 
     185       IF(lwp) THEN                             ! control print 
    188186          WRITE(numout,*) 
    189187          WRITE(numout,*) 'lim_dia_init_2 : ice parameters for ice diagnostics ' 
     
    195193       ENDIF 
    196194 
    197        ! masked grid cell area 
     195       ALLOCATE( aire(jpi,jpj) , STAT=ierr )    ! masked grid cell area 
     196       IF( lk_mpp    )   CALL mpp_sum( ierr ) 
     197       IF( ierr /= 0 )   CALL ctl_stop( 'STOP', 'lim_dia_init_2 : unable to allocate standard arrays' ) 
    198198       aire(:,:) = area(:,:) * tms(:,:) 
    199199 
    200        ! Titles of ice key variables : 
    201        nv = 1 
     200       nv = 1                                   ! Titles of ice key variables 
    202201       titvar(nv) = 'NoIt'  ! iteration number 
    203202       nv = nv + 1 
    204203       titvar(nv) = 'T yr'  ! time step in years 
    205         
    206204       nbvt = nv - 1 
    207  
    208205       nv = nv + 1   ;   titvar(nv) = 'AEFN' ! sea ice area in the northern Hemisp.(10^12 km2) 
    209206       nv = nv + 1   ;   titvar(nv) = 'AEFS' ! sea ice area in the southern Hemisp.(10^12 km2) 
Note: See TracChangeset for help on using the changeset viewer.