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 3148 for branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/LIM_SRC_3/limistate.F90 – NEMO

Ignore:
Timestamp:
2011-11-17T17:28:07+01:00 (12 years ago)
Author:
smasson
Message:

dev_NEMO_MERGE_2011: new dynamical allocation in LIM3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/LIM_SRC_3/limistate.F90

    r2977 r3148  
    2525   USE lbclnk           ! lateral boundary condition - MPP exchanges 
    2626   USE lib_mpp          ! MPP library 
     27   USE wrk_nemo_2       ! work arrays 
    2728 
    2829   IMPLICIT NONE 
     
    6263      !!                or from arbitrary sea-ice conditions 
    6364      !!------------------------------------------------------------------- 
    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       ! 
    6865      INTEGER  ::   ji, jj, jk, jl             ! dummy loop indices 
    6966      REAL(wp) ::   zeps6, zeps, ztmelts, epsi06   ! local scalars 
    7067      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(2, 1) .OR.  wrk_in_use(1, 1,2,3,4)  ) 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) 
     68      REAL(wp), POINTER, DIMENSION(:)   ::   zgfactorn, zhin  
     69      REAL(wp), POINTER, DIMENSION(:)   ::   zgfactors, zhis 
     70      REAL(wp), POINTER, DIMENSION(:,:) ::   zidto      ! ice indicator 
     71      !-------------------------------------------------------------------- 
     72 
     73      CALL wrk_alloc( jpm, zgfactorn, zgfactors, zhin, zhis ) 
     74      CALL wrk_alloc( jpi, jpj, zidto ) 
    8075 
    8176      !-------------------------------------------------------------------- 
     
    517512      CALL lbc_lnk( fsbbq  , 'T', 1. ) 
    518513      ! 
    519       IF( wrk_not_released(2, 1) .OR. wrk_not_released(1, 1,2,3,4) )   & 
    520          &   CALL ctl_stop('lim_istate : failed to release workspace arrays') 
     514      CALL wrk_dealloc( jpm, zgfactorn, zgfactors, zhin, zhis ) 
     515      CALL wrk_dealloc( jpi, jpj, zidto ) 
    521516      ! 
    522517   END SUBROUTINE lim_istate 
Note: See TracChangeset for help on using the changeset viewer.