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 3155 for branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfddm.F90 – NEMO

Ignore:
Timestamp:
2011-11-18T12:40:14+01:00 (13 years ago)
Author:
smasson
Message:

dev_NEMO_MERGE_2011: new dynamical allocation in LDF and ZDF

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfddm.F90

    r2715 r3155  
    2121   USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
    2222   USE prtctl          ! Print control 
    23    USE lib_mpp            ! MPP library 
     23   USE lib_mpp         ! MPP library 
     24   USE wrk_nemo_2      ! work arrays 
    2425 
    2526   IMPLICIT NONE 
     
    9192      !! References :   Merryfield et al., JPO, 29, 1124-1142, 1999. 
    9293      !!---------------------------------------------------------------------- 
    93       USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released 
    94       USE wrk_nemo, ONLY:   zmsks  => wrk_2d_1 , zmskf  => wrk_2d_2 , zmskd1 => wrk_2d_3   ! 2D workspace 
    95       USE wrk_nemo, ONLY:   zmskd2 => wrk_2d_4 , zmskd3 => wrk_2d_5                        !  -      - 
    96       ! 
    9794      INTEGER, INTENT(in) ::   kt   ! ocean time-step indexocean time step 
    9895      ! 
     
    10198      REAL(wp) ::   zavft, zavfs    !    -         - 
    10299      REAL(wp) ::   zavdt, zavds    !    -         - 
    103       !!---------------------------------------------------------------------- 
    104  
    105       IF( wrk_in_use(2, 1,2,3,4,5) ) THEN 
    106          CALL ctl_stop('zdf_ddm: Requested workspace arrays already in use')   ;   RETURN 
    107       ENDIF 
     100      REAL(wp), POINTER, DIMENSION(:,:) ::   zmsks, zmskf, zmskd1, zmskd2, zmskd3 
     101      !!---------------------------------------------------------------------- 
     102 
     103      CALL wrk_alloc( jpi,jpj, zmsks, zmskf, zmskd1, zmskd2, zmskd3 ) 
    108104 
    109105      !                                                ! =============== 
     
    197193      ENDIF 
    198194      ! 
    199       IF( wrk_not_released(2, 1,2,3,4,5) )   CALL ctl_stop('zdf_ddm: Release of workspace arrays failed') 
     195      CALL wrk_dealloc( jpi,jpj, zmsks, zmskf, zmskd1, zmskd2, zmskd3 ) 
    200196      ! 
    201197   END SUBROUTINE zdf_ddm 
Note: See TracChangeset for help on using the changeset viewer.