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_update.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_update.F90

    r2528 r2715  
    2929      !!   *** ROUTINE Agrif_Update_Trc *** 
    3030      !!--------------------------------------------- 
     31      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released 
     32      USE wrk_nemo, ONLY: wrk_4d_1 
     33      !! 
    3134      INTEGER, INTENT(in) :: kt 
     35      REAL(wp), POINTER, DIMENSION(:,:,:,:) :: ztra 
     36 
    3237   
    33       REAL(wp), DIMENSION(jpi,jpj,jpk,jptra) :: ztra 
    34  
    3538      IF ((Agrif_NbStepint() .NE. (Agrif_irhot()-1)).AND.(kt /= 0)) RETURN 
    3639 
    3740#if defined TWO_WAY 
     41      IF( wrk_in_use(4, 1) ) THEN 
     42         CALL ctl_stop('Agrif_Update_trc : requested workspace arrays unavailable') 
     43         RETURN 
     44      ENDIF 
     45      ztra =>  wrk_4d_1(:,:,:,jptra) 
     46 
    3847      Agrif_UseSpecialValueInUpdate = .TRUE. 
    3948      Agrif_SpecialValueFineGrid = 0. 
    4049  
    4150     IF (MOD(nbcline_trc,nbclineupdate) == 0) THEN 
    42          CALL Agrif_Update_Variable(ztra,trn, procname=updateTRC) 
     51         CALL Agrif_Update_Variable(ztra,trn_id, procname=updateTRC) 
    4352      ELSE 
    44          CALL Agrif_Update_Variable(ztra,trn,locupdate=(/0,2/), procname=updateTRC) 
     53         CALL Agrif_Update_Variable(ztra,trn_id,locupdate=(/0,2/), procname=updateTRC) 
    4554      ENDIF 
    4655 
    4756      Agrif_UseSpecialValueInUpdate = .FALSE. 
    4857      nbcline_trc = nbcline_trc + 1 
     58 
     59      IF( wrk_not_released(4, 1) ) THEN 
     60         CALL ctl_stop('Agrif_Update_trc : failed to release workspace arrays.') 
     61         RETURN 
     62      ENDIF 
    4963#endif 
    5064 
Note: See TracChangeset for help on using the changeset viewer.