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

    r2528 r2715  
    55   !!====================================================================== 
    66   !! History :  2.0  ! 2004-01 (C. Ethe, G. Madec)  Original code 
     7   !!            4.0  ! 2011-02  (G. Madec) dynamical allocation 
    78   !!---------------------------------------------------------------------- 
    89#if defined key_lim3 
     
    2324   USE in_out_manager   ! I/O manager 
    2425   USE lbclnk           ! lateral boundary condition - MPP exchanges 
     26   USE lib_mpp          ! MPP library 
    2527 
    2628   IMPLICIT NONE 
     
    4547 
    4648   !!---------------------------------------------------------------------- 
    47    !! NEMO/LIM3 3.3 , UCL - NEMO Consortium (2010) 
     49   !! NEMO/LIM3 4.0 , UCL - NEMO Consortium (2011) 
    4850   !! $Id$ 
    4951   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
     
    6062      !!                or from arbitrary sea-ice conditions 
    6163      !!------------------------------------------------------------------- 
     64      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released 
     65      USE wrk_nemo, ONLY:   wrk_1d_1, wrk_1d_2, wrk_1d_3, wrk_1d_4 
     66      USE wrk_nemo, ONLY:   zidto => wrk_2d_1   ! ice indicator 
     67      ! 
    6268      INTEGER  ::   ji, jj, jk, jl             ! dummy loop indices 
    6369      REAL(wp) ::   zeps6, zeps, ztmelts, epsi06   ! local scalars 
    64       REAL(wp) ::  zvol, zare, zh, zh1, zh2, zh3, zan, zbn, zas, zbs  
    65       REAL(wp), DIMENSION(jpm)     ::   zgfactorn, zhin  
    66       REAL(wp), DIMENSION(jpm)     ::   zgfactors, zhis 
    67       REAL(wp), DIMENSION(jpi,jpj) ::   zidto      ! ice indicator 
    68       !-------------------------------------------------------------------- 
     70      REAL(wp) ::   zvol, zare, zh, zh1, zh2, zh3, zan, zbn, zas, zbs  
     71      REAL(wp), POINTER, DIMENSION(:) ::   zgfactorn, zhin  
     72      REAL(wp), POINTER, DIMENSION(:) ::   zgfactors, zhis 
     73      !-------------------------------------------------------------------- 
     74 
     75      IF(  wrk_in_use(1, 1,2)  ) THEN 
     76         CALL ctl_stop( 'lim_istate: requested workspace arrays unavailable' )   ;   RETURN 
     77      ENDIF 
     78      zgfactorn => wrk_1d_1(1:jpm)   ;   zhin => wrk_1d_3(1:jpm)   ! Set-up pointers to sub-arrays of workspaces 
     79      zgfactors => wrk_1d_2(1:jpm)   ;   zhis => wrk_1d_4(1:jpm) 
    6980 
    7081      !-------------------------------------------------------------------- 
     
    506517      CALL lbc_lnk( fsbbq  , 'T', 1. ) 
    507518      ! 
     519      IF( wrk_not_released(1, 1,2) )   CALL ctl_stop('lim_istate : failed to release workspace arrays') 
     520      ! 
    508521   END SUBROUTINE lim_istate 
    509522 
Note: See TracChangeset for help on using the changeset viewer.