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

    r2528 r2715  
    1414    
    1515   IMPLICIT NONE 
    16    PUBLIC  
     16   PRIVATE  
     17 
     18   PUBLIC agrif_oce_alloc ! routine called by nemo_init in nemogcm.F90 
    1719 
    1820   !                                              !!* Namelist namagrif: AGRIF parameters 
    1921   LOGICAL , PUBLIC ::   ln_spc_dyn    = .FALSE.   !: 
    2022   INTEGER , PUBLIC ::   nn_cln_update = 3         !: update frequency  
    21    REAL(wp), PUBLIC ::   rn_sponge_tra = rdt       !: sponge coeff. for tracers 
    22    REAL(wp), PUBLIC ::   rn_sponge_dyn = rdt       !: sponge coeff. for dynamics 
     23   REAL(wp), PUBLIC ::   rn_sponge_tra = 2800.     !: sponge coeff. for tracers 
     24   REAL(wp), PUBLIC ::   rn_sponge_dyn = 2800.     !: sponge coeff. for dynamics 
    2325 
    2426   !                                              !!! OLD namelist names 
     
    2931   LOGICAL , PUBLIC :: spongedoneT = .FALSE.   !: tracer   sponge layer indicator 
    3032   LOGICAL , PUBLIC :: spongedoneU = .FALSE.   !: dynamics sponge layer indicator 
    31    REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   spe1ur, spe2vr ,spbtr2, spe1ur2, spe2vr2, spbtr3   !: ??? 
     33 
     34   REAL(wp), PUBLIC, ALLOCATABLE, SAVE,  DIMENSION(:,:) ::   spe1ur , spe2vr , spbtr2   !: ??? 
     35   REAL(wp), PUBLIC, ALLOCATABLE, SAVE,  DIMENSION(:,:) ::   spe1ur2, spe2vr2, spbtr3   !: ??? 
     36    
     37   INTEGER :: tn_id, sn_id, tb_id, sb_id, ta_id, sa_id 
     38   INTEGER :: un_id, vn_id, ua_id, va_id 
     39   INTEGER :: e1u_id, e2v_id, sshn_id, gcb_id 
     40   INTEGER :: trn_id, trb_id, tra_id 
     41 
     42   !!---------------------------------------------------------------------- 
     43   !! NEMO/NST 3.3.1 , NEMO Consortium (2011) 
     44   !! $Id$ 
     45   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
     46   !!---------------------------------------------------------------------- 
     47CONTAINS  
     48 
     49   INTEGER FUNCTION agrif_oce_alloc() 
     50      !!---------------------------------------------------------------------- 
     51      !!                ***  FUNCTION agrif_oce_alloc  *** 
     52      !!---------------------------------------------------------------------- 
     53      ALLOCATE( spe1ur (jpi,jpj) , spe2vr (jpi,jpj) , spbtr2(jpi,jpj) ,      & 
     54         &      spe1ur2(jpi,jpj) , spe2vr2(jpi,jpj) , spbtr3(jpi,jpj) , STAT = agrif_oce_alloc )  
     55   END FUNCTION agrif_oce_alloc 
    3256 
    3357#endif 
    34    !!---------------------------------------------------------------------- 
    35    !! NEMO/NST 3.3 , NEMO Consortium (2010) 
    36    !! $Id$ 
    37    !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
    3858   !!====================================================================== 
    3959END MODULE agrif_oce 
Note: See TracChangeset for help on using the changeset viewer.