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/OPA_SRC/LDF/ldfeiv.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/OPA_SRC/LDF/ldfeiv.F90

    r2528 r2715  
    5353      !!             - wslpi, wslpj : i- and j-slopes of neutral surfaces at w-points.  
    5454      !!---------------------------------------------------------------------- 
     55      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released 
     56      USE wrk_nemo, ONLY:   zn  => wrk_2d_1 , zah   => wrk_2d_2   ! 2D workspace 
     57      USE wrk_nemo, ONLY:   zhw => wrk_2d_3 , zross => wrk_2d_4 
     58      ! 
    5559      INTEGER, INTENT(in) ::   kt   ! ocean time-step inedx 
    56       !! 
     60      ! 
    5761      INTEGER  ::   ji, jj, jk   ! dummy loop indices 
    5862      REAL(wp) ::   zfw, ze3w, zn2, zf20, zaht, zaht_min      ! temporary scalars 
    59       REAL(wp), DIMENSION(jpi,jpj) ::   zn, zah, zhw, zross   ! 2D workspace 
    6063      !!---------------------------------------------------------------------- 
    6164       
     65      IF( wrk_in_use(2, 1,2,3,4) ) THEN 
     66         CALL ctl_stop('ldf_eiv: requested workspace arrays are unavailable.')   ;   RETURN 
     67      ENDIF 
     68 
    6269      IF( kt == nit000 ) THEN 
    6370         IF(lwp) WRITE(numout,*) 
     
    235242      CALL iom_put( "aht2d"    , ahtw )   ! lateral eddy diffusivity 
    236243      CALL iom_put( "aht2d_eiv", aeiw )   ! EIV lateral eddy diffusivity 
     244      !   
     245      IF( wrk_not_released(2, 1,2,3,4) )   CALL ctl_stop('ldf_eiv: failed to release workspace arrays') 
    237246      ! 
    238247   END SUBROUTINE ldf_eiv 
     
    244253CONTAINS 
    245254   SUBROUTINE ldf_eiv( kt )       ! Empty routine 
     255      INTEGER :: kt 
    246256      WRITE(*,*) 'ldf_eiv: You should not have seen this print! error?', kt 
    247257   END SUBROUTINE ldf_eiv 
Note: See TracChangeset for help on using the changeset viewer.