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/SOL/solsor.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/SOL/solsor.F90

    r2528 r2715  
    3232   !! NEMO/OPA 3.3 , NEMO Consortium (2010) 
    3333   !! $Id$  
    34    !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
     34   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
    3535   !!---------------------------------------------------------------------- 
    36  
    3736CONTAINS 
    3837       
     
    5857      !!                Beare and Stevens 1997 Ann. Geophysicae 15, 1369-1377 
    5958      !!---------------------------------------------------------------------- 
     59      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released 
     60      USE wrk_nemo, ONLY:   ztab => wrk_2d_1    ! 2D workspace 
     61      !! 
    6062      INTEGER, INTENT(inout) ::   kindic   ! solver indicator, < 0 if the convergence is not reached: 
    6163      !                                    ! the model is stopped in step (set to zero before the call of solsor) 
    6264      !! 
    63       INTEGER  ::   ji, jj, jn               ! dummy loop indices 
    64       INTEGER  ::   ishift, icount 
    65       INTEGER  ::   ijmppodd, ijmppeven, ijpr2d 
    66       REAL(wp) ::   ztmp, zres, zres2 
    67       REAL(wp), DIMENSION(jpi,jpj) ::ztab 
     65      INTEGER  ::   ji, jj, jn       ! dummy loop indices 
     66      INTEGER  ::   ishift, icount, ijmppodd, ijmppeven, ijpr2d   ! local integers 
     67      REAL(wp) ::   ztmp, zres, zres2                             ! local scalars 
    6868      !!---------------------------------------------------------------------- 
    6969       
     70      IF( wrk_in_use(2, 1) )THEN 
     71         CALL ctl_stop('sol_sor: requested workspace array is unavailable')   ;   RETURN 
     72      ENDIF 
     73 
    7074      ijmppeven = MOD( nimpp+njmpp+jpr2di+jpr2dj   , 2 ) 
    7175      ijmppodd  = MOD( nimpp+njmpp+jpr2di+jpr2dj+1 , 2 ) 
     
    163167      !  ------------- 
    164168      CALL lbc_lnk_e( gcx, c_solver_pt, 1. )    ! boundary conditions 
     169      !  
     170      IF( wrk_not_released(2, 1) )   CALL ctl_stop('sol_sor: failed to release workspace array') 
    165171      ! 
    166172   END SUBROUTINE sol_sor 
Note: See TracChangeset for help on using the changeset viewer.