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/NST_SRC/agrif_top_interp.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/NST_SRC/agrif_top_interp.F90

    r2528 r2715  
    66   USE sol_oce 
    77   USE agrif_oce 
     8   USE agrif_top_sponge 
    89   USE trc 
     10   USE lib_mpp 
    911 
    1012   IMPLICIT NONE 
     
    1315   PUBLIC Agrif_trc 
    1416 
    15    !!---------------------------------------------------------------------- 
     17#  include "domzgr_substitute.h90"   
     18#  include "vectopt_loop_substitute.h90" 
     19  !!---------------------------------------------------------------------- 
    1620   !! NEMO/NST 3.3 , NEMO Consortium (2010) 
    1721   !! $Id$ 
     
    2529      !!   *** ROUTINE Agrif_trc *** 
    2630      !!--------------------------------------------- 
    27 #  include "domzgr_substitute.h90"   
    28 #  include "vectopt_loop_substitute.h90" 
     31      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released 
     32      USE wrk_nemo, ONLY: wrk_4d_1 
    2933       
    3034      INTEGER :: ji,jj,jk,jn 
     
    3236      REAL(wp) :: alpha1, alpha2, alpha3, alpha4 
    3337      REAL(wp) :: alpha5, alpha6, alpha7 
    34       REAL(wp), DIMENSION(jpi,jpj,jpk,jptra) :: ztra 
    35        
     38      REAL(wp), POINTER, DIMENSION(:,:,:,:) :: ztra 
     39            
    3640      IF (Agrif_Root()) RETURN 
     41 
     42      IF( wrk_in_use(4, 1) ) THEN 
     43         CALL ctl_stop('Agrif_trc : requested workspace arrays unavailable') 
     44         RETURN 
     45      ENDIF 
     46      ztra =>  wrk_4d_1(:,:,:,jptra) 
    3747 
    3848      Agrif_SpecialValue=0. 
     
    4050      ztra = 0.e0 
    4151 
    42       CALL Agrif_Bc_variable(ztra,trn) 
     52      CALL Agrif_Bc_variable(ztra,trn_id, procname = interptrn ) 
    4353      Agrif_UseSpecialValue = .FALSE. 
    4454 
     
    131141      ENDIF 
    132142 
     143      IF( wrk_not_released(4, 1) ) THEN 
     144         CALL ctl_stop('Agrif_trc : failed to release workspace arrays.') 
     145         RETURN 
     146      ENDIF 
     147 
    133148   END SUBROUTINE Agrif_trc 
    134149 
Note: See TracChangeset for help on using the changeset viewer.