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/TOP_SRC/C14b/trcini_c14b.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/TOP_SRC/C14b/trcini_c14b.F90

    r2528 r2715  
    44   !! TOP :   initialisation of the C14 bomb tracer 
    55   !!====================================================================== 
    6    !! History : Original ! 2005-10  (Z. Lachkar)  
    7    !!               2.0  ! 2007-12  (C. Ethe )  
     6   !! History :  1.0  ! 2005-10  (Z. Lachkar) Original code 
     7   !!            2.0  ! 2007-12  (C. Ethe)  
    88   !!---------------------------------------------------------------------- 
    99#if defined key_c14b 
     
    1717   USE trc             ! TOP variables 
    1818   USE trcsms_c14b     ! C14 sms trends 
    19    USE in_out_manager  ! I/O manager 
    2019 
    2120   IMPLICIT NONE 
     
    2423   PUBLIC   trc_ini_c14b   ! called by trcini.F90 module 
    2524 
    26    INTEGER  ::   &     ! With respect to data file !! 
    27      jpybeg = 1765 , & !: starting year for C14 
    28      jpyend = 2002     !: ending year for C14 
    29  
    30    INTEGER  ::   &    
    31       nrec   ,  & ! number of year in CO2 Concentrations file 
    32       nmaxrec  
    33  
    34    INTEGER  ::   inum1, inum2               ! unit number 
    35  
    36    REAL(wp) ::     & 
    37      ys40 = -40. ,    &             ! 40 degrees south 
    38      ys20 = -20. ,    &             ! 20 degrees south 
    39      yn20 =  20. ,    &             ! 20 degrees north 
    40      yn40 =  40.                    ! 40 degrees north 
    41  
    42    !!--------------------------------------------------------------------- 
     25   !                             ! With respect to data file !! 
     26   INTEGER  ::   jpybeg = 1765   ! starting year for C14 
     27   INTEGER  ::   jpyend = 2002   ! ending year for C14 
     28   INTEGER  ::   nrec            ! number of year in CO2 Concentrations file 
     29   INTEGER  ::   nmaxrec  
     30   INTEGER  ::   inum1, inum2    ! unit number 
     31 
     32   REAL(wp) ::   ys40 = -40.     ! 40 degrees south 
     33   REAL(wp) ::   ys20 = -20.     ! 20 degrees south 
     34   REAL(wp) ::   yn20 =  20.     ! 20 degrees north 
     35   REAL(wp) ::   yn40 =  40.     ! 40 degrees north 
     36 
     37   !!---------------------------------------------------------------------- 
    4338   !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
    4439   !! $Id$  
    45    !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
    46    !!---------------------------------------------------------------------- 
    47  
     40   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
     41   !!---------------------------------------------------------------------- 
    4842CONTAINS 
    4943 
     
    5953      !!---------------------------------------------------------------------- 
    6054 
    61       !  Control consitency 
    62       CALL trc_ctl_c14b 
     55      !                     ! Allocate C14b arrays 
     56      IF( trc_sms_c14b_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'trc_ini_c14b : unable to allocate C14b arrays' ) 
     57 
     58      CALL trc_ctl_c14b     !  Control consitency 
    6359 
    6460      IF(lwp) WRITE(numout,*) '' 
     
    6965      ! Initialization of boundaries conditions 
    7066      ! ---------------------------------------  
    71       qtr_c14(:,:) = 0.e0 
     67      qtr_c14(:,:) = 0._wp 
    7268       
    7369      ! Initialization of qint in case of  no restart  
     
    7874            WRITE(numout,*) 'Initialization de qint ; No restart : qint equal zero ' 
    7975         ENDIF 
    80          trn     (:,:,:,jpc14) = 0.e0 
    81          qint_c14(:,:        ) = 0.e0 
     76         trn     (:,:,:,jpc14) = 0._wp 
     77         qint_c14(:,:        ) = 0._wp 
    8278      ENDIF 
    8379 
     
    156152                 fareaz(ji,jj,3) = 0. 
    157153            ENDIF 
    158           END DO 
    159         END DO 
    160  
     154         END DO 
     155      END DO 
    161156      ! 
    162157      IF(lwp) WRITE(numout,*) 'Initialization of C14 bomb tracer done' 
    163158      IF(lwp) WRITE(numout,*) ' ' 
    164  
     159      ! 
    165160   END SUBROUTINE trc_ini_c14b 
    166     
     161 
     162 
    167163   SUBROUTINE trc_ctl_c14b 
    168164      !!---------------------------------------------------------------------- 
     
    179175      ! Check number of tracers 
    180176      ! -----------------------    
    181       IF( jp_c14b > 1) CALL ctl_stop( ' Change jp_c14b to be equal 1 in par_c14b.F90' ) 
     177      IF( jp_c14b > 1)   CALL ctl_stop( ' Change jp_c14b to be equal 1 in par_c14b.F90' ) 
    182178 
    183179      ! Check tracer names 
    184180      ! ------------------ 
    185       IF ( ctrcnm(jpc14) /= 'C14B' ) THEN 
    186            ctrcnm(jpc14)  = 'C14B' 
    187            ctrcnl(jpc14)  = 'Bomb C14 concentration' 
     181      IF( ctrcnm(jpc14) /= 'C14B' ) THEN 
     182          ctrcnm(jpc14)  = 'C14B' 
     183          ctrcnl(jpc14)  = 'Bomb C14 concentration' 
    188184      ENDIF 
    189185 
     
    197193      ! ------------------ 
    198194      IF( ctrcun(jpc14) /= 'ration' ) THEN 
    199           ctrcun(jpc14) = 'ration' 
     195          ctrcun(jpc14)  = 'ration' 
    200196          IF(lwp) THEN 
    201197             CALL ctl_warn( ' we force tracer unit' ) 
     
    206202      ! 
    207203   END SUBROUTINE trc_ctl_c14b 
     204    
    208205#else 
    209206   !!---------------------------------------------------------------------- 
Note: See TracChangeset for help on using the changeset viewer.