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/limdia.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/limdia.F90

    r2528 r2715  
    5252 
    5353   REAL(wp), DIMENSION(jpinfmx) ::   vinfom     ! temporary working space 
    54    REAL(wp), DIMENSION(jpi,jpj) ::   aire       ! masked grid cell area 
     54   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   aire       ! masked grid cell area 
    5555 
    5656   !! * Substitutions 
     
    6767      !!                  ***  ROUTINE lim_dia  *** 
    6868      !!    
    69       !! ** Purpose : Computation and outputs on file ice.evolu  
    70       !!      the temporal evolution of some key variables 
     69      !! ** Purpose :   Computation and outputs on file ice.evolu  
     70      !!              the temporal evolution of some key variables 
    7171      !!------------------------------------------------------------------- 
    7272      INTEGER  ::   jv, ji, jj, jl   ! dummy loop indices 
     
    410410      !!------------------------------------------------------------------- 
    411411      INTEGER  ::   jv    ! dummy loop indice 
    412       INTEGER  ::   ntot , ndeb , irecl   ! local integers 
     412      INTEGER  ::   ierr, ntot , ndeb , irecl   ! local integers 
    413413      REAL(wp) ::   zxx0, zxx1    ! local scalars 
    414414      CHARACTER(len=jpchinf) ::   titinf 
     
    431431      ENDIF 
    432432 
    433       aire(:,:) = area(:,:) * tms(:,:) * tmask_i(:,:)      ! masked grid cell area (interior domain only) 
     433      ALLOCATE( aire(jpi,jpj) , STAT=ierr )      ! masked grid cell area (interior domain only) 
     434      IF( lk_mpp    )   CALL mpp_sum( ierr ) 
     435      IF( ierr /= 0 )   CALL ctl_stop( 'STOP', 'lim_dia_init_2 : unable to allocate arrays' ) 
     436      aire(:,:) = area(:,:) * tms(:,:) * tmask_i(:,:) 
    434437 
    435438      ! Titles of ice key variables : 
    436439      titvar(1) = 'NoIt'  ! iteration number 
    437440      titvar(2) = 'T yr'  ! time step in years 
    438       nbvt = 2            ! number of time variables 
     441      nbvt      = 2       ! number of time variables 
    439442 
    440443      titvar(3) = 'AI_N'  ! sea ice area in the northern Hemisp.(10^12 km2) 
Note: See TracChangeset for help on using the changeset viewer.