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/trc_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/OPA_SRC/trc_oce.F90

    r2528 r2715  
    1313   USE in_out_manager  ! I/O manager 
    1414   USE dom_oce         ! ocean space and time domain 
     15   USE lib_mpp         ! MPP library 
    1516 
    1617   IMPLICIT NONE 
     
    2021   PUBLIC   trc_oce_rgb_read   ! routine called by traqsr.F90 
    2122   PUBLIC   trc_oce_ext_lev    ! function called by traqsr.F90 at least 
    22   
    23    REAL(wp), PUBLIC                          ::   r_si2   !: largest depth of extinction (blue & 0.01 mg.m-3)  (RGB) 
    24    REAL(wp), PUBLIC , DIMENSION(jpi,jpj,jpk) ::   etot3   !: light absortion coefficient 
     23   PUBLIC   trc_oce_alloc      ! function called by nemogcm.F90 
     24 
     25   REAL(wp), PUBLIC                                      ::   r_si2   !: largest depth of extinction (blue & 0.01 mg.m-3)  (RGB) 
     26   REAL(wp), PUBLIC, SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::   etot3   !: light absortion coefficient 
    2527 
    2628#if defined key_top && defined key_pisces 
     
    5355   !! NEMO/OPA 3.3 , NEMO Consortium (2010) 
    5456   !! $Id$  
    55    !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
    56    !!---------------------------------------------------------------------- 
    57  
     57   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
     58   !!---------------------------------------------------------------------- 
    5859CONTAINS 
     60 
     61   INTEGER FUNCTION trc_oce_alloc() 
     62      !!---------------------------------------------------------------------- 
     63      !!                  ***  trc_oce_alloc  *** 
     64      !!---------------------------------------------------------------------- 
     65      ALLOCATE( etot3(jpi,jpj,jpk)   , STAT= trc_oce_alloc ) 
     66      ! 
     67      IF( trc_oce_alloc /= 0 )   CALL ctl_warn('trc_oce_alloc: failed to allocate etot3 array') 
     68   END FUNCTION trc_oce_alloc 
     69 
    5970 
    6071   SUBROUTINE trc_oce_rgb( prgb ) 
     
    239250      ! 
    240251      ! It is not necessary to compute anything bellow the following depth 
    241       zhext = prldex * ( LOG(10.e0) * zprec + LOG(pqsr_frc) ) 
    242       
     252      zhext = prldex * ( LOG(10._wp) * zprec + LOG(pqsr_frc) ) 
     253      ! 
    243254      ! Level of light extinction 
    244255      pjl = jpkm1 
     
    250261   END FUNCTION trc_oce_ext_lev 
    251262 
    252  
    253263   !!====================================================================== 
    254264END MODULE trc_oce 
Note: See TracChangeset for help on using the changeset viewer.