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 1175 for trunk/NEMO/TOP_SRC/TRP/trcbbc.F90 – NEMO

Ignore:
Timestamp:
2008-09-11T18:26:34+02:00 (16 years ago)
Author:
cetlod
Message:

update transport modules to take into account new trends organization, see ticket:248

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/TOP_SRC/TRP/trcbbc.F90

    r1152 r1175  
    44   !! Ocean passive tracers:  bottom boundary condition 
    55   !!====================================================================== 
    6 #if  defined key_top  &&  defined key_trcbbc 
    7    !!---------------------------------------------------------------------- 
    8    !!   'key_top' and 'key_trcbbc'       TOP model and geothermal heat flux 
     6   !! History :  8.1  !  99-10  (G. Madec)  original code 
     7   !!            8.5  !  02-08  (G. Madec)  free form + modules 
     8   !!                 !  02-11  (A. Bozec)  trc_bbc_init 
     9   !!            9.0  !  04-03  (C. Ethe)  adpated for passive tracers 
     10   !!                 !  07-02  (C. Deltel)  Diagnose ML trends for passive tracers 
     11   !!---------------------------------------------------------------------- 
     12#if defined key_top && defined key_trcbbc 
     13   !!---------------------------------------------------------------------- 
     14   !!   'key_trcbbc'                                  geothermal heat flux 
    915   !!---------------------------------------------------------------------- 
    1016   !!   trc_bbc      : update the tracer trend at ocean bottom  
    1117   !!   trc_bbc_init : initialization of geothermal heat flux trend 
    1218   !!---------------------------------------------------------------------- 
    13    !! * Modules used 
    1419   USE oce_trc             ! ocean dynamics and active tracers variables 
    15    USE trp_trc                 ! ocean passive tracers variables 
     20   USE trc                 ! ocean passive tracers variables 
    1621   USE prtctl_trc          ! Print control for debbuging 
    17   
     22   USE trdmld_trc 
     23   USE trdmld_trc_oce      
     24 
    1825   IMPLICIT NONE 
    1926   PRIVATE 
    2027 
    21    !! * Accessibility 
    2228   PUBLIC trc_bbc          ! routine called by trcstp.F90 
    2329 
    24    !! to be transfert in the namelist ???!    
     30   !! >>>>>>>>>>>>>>>>>>>>>>>>> MOVE TO NAMELIST >>>>>>>>>>>>>>>>>>>>>>>>>> 
    2531   LOGICAL, PUBLIC, PARAMETER ::   lk_trcbbc = .TRUE.   !: bbc flag 
    26  
    27    !! * Module variables 
    28    INTEGER ::                       & !!! ** bbc namelist (nambbc) ** 
    29       ngeo_trc_flux = 1                    ! Geothermal flux (0:no flux, 1:constant flux, 
    30       !                                !                  2:read in file ) 
    31    REAL(wp) ::                      & !!! ** bbc namlist ** 
    32       ngeo_trc_flux_const = 86.4e-3        ! Constant value of geothermal heat flux 
    33  
    34    INTEGER, DIMENSION(jpi,jpj) ::   & 
    35       nbotlevt                         ! ocean bottom level index at T-pt 
    36    REAL(wp), DIMENSION(jpi,jpj) ::  & 
    37       qgh_trd                          ! geothermal heating trend 
    38   
     32    
     33   INTEGER ::   ngeo_trc_flux = 1              !!! ** bbc namelist (nambbc) ** 
     34   !                                           ! Geothermal flux (0:no flux, 1:constant flux, 
     35   !                                           !                  2:read in file ) 
     36   REAL(wp) ::   ngeo_trc_flux_const = 86.4e-3 !!! ** bbc namlist ** 
     37   !                                           ! Constant value of geothermal heat flux 
     38 
     39   INTEGER, DIMENSION(jpi,jpj) ::   nbotlevt   ! ocean bottom level index at T-pt 
     40   REAL(wp), DIMENSION(jpi,jpj) ::   qgh_trd   ! geothermal heating trend 
     41   !! <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
     42 
    3943   !! * Substitutions 
    4044#  include "top_substitute.h90" 
    4145   !!---------------------------------------------------------------------- 
    4246   !!  TOP 1.0 , LOCEAN-IPSL (2005)  
    43    !! $Id$  
    44    !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt  
     47   !! $Header: /home/opalod/NEMOCVSROOT/NEMO/TOP_SRC/TRP/trcbbc.F90,v 1.11 2006/09/12 11:10:13 opalod Exp $  
     48   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 
    4549   !!---------------------------------------------------------------------- 
    4650 
     
    6872      !! References : 
    6973      !!      Stein, C. A., and S. Stein, 1992, Nature, 359, 123-129. 
    70       !! 
    71       !! History : 
    72       !!   8.1  !  99-10  (G. Madec)  original code 
    73       !!   8.5  !  02-08  (G. Madec)  free form + modules 
    74       !!   9.0  !  04-03  (C. Ethe)  adpated for passive tracers 
    75       !!---------------------------------------------------------------------- 
    76       !! * Arguments 
    77       INTEGER, INTENT( in ) ::   kt    ! ocean time-step index 
    78  
    79       !! * Local declarations 
     74      !!---------------------------------------------------------------------- 
     75      INTEGER, INTENT( in ) ::   kt                         ! ocean time-step index 
     76 
    8077#if defined key_vectopt_loop   &&   ! defined key_mpp_omp 
    81       INTEGER ::   ji, jn                  ! dummy loop indices 
    82 #else 
    83       INTEGER ::   ji, jj, jn              ! dummy loop indices 
    84 #endif 
    85       REAL(wp) ::   ztra                ! temporary scalar 
     78      INTEGER ::   ji, jn                                   ! dummy loop indices 
     79#else 
     80      INTEGER ::   ji, jj, jn                               ! dummy loop indices 
     81#endif 
     82      REAL(wp) ::   ztra                                    ! temporary scalar 
    8683      CHARACTER (len=22) :: charout 
     84      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::   ztrtrd   ! trends 
    8785      !!---------------------------------------------------------------------- 
    8886 
    8987      ! 0. Initialization 
     88      ! ----------------- 
     89 
    9090      IF( kt == nittrc000 )   CALL trc_bbc_init 
    9191 
     92      IF( l_trdtrc ) ALLOCATE( ztrtrd(jpi,jpj,jpk) ) 
     93 
     94 
    9295      ! 1. Add the geothermal heat flux trend on temperature 
     96      ! ---------------------------------------------------- 
    9397 
    9498      SELECT CASE ( ngeo_trc_flux ) 
     
    96100      CASE ( 1:2 )                !  geothermal heat flux 
    97101 
    98          DO jn = 1, jptra 
     102         !                                                       ! =========== 
     103         DO jn = 1, jptra                                        ! tracer loop 
     104            !                                                    ! =========== 
     105!CDIR COLLAPSE 
     106            IF( l_trdtrc )  ztrtrd(:,:,:) = tra(:,:,:,jn)  ! save trends 
     107 
     108 
    99109#if defined key_vectopt_loop   &&   ! defined key_mpp_omp 
    100110            DO ji = jpi+2, jpij-jpi-1   ! vector opt. (forced unrolling) 
     
    108118            END DO 
    109119#endif 
    110          END DO 
    111  
    112          IF(ln_ctl)   THEN  ! print mean trends (used for debugging) 
     120             
     121            IF( l_trdtrc ) THEN 
     122!CDIR COLLAPSE 
     123               ztrtrd(:,:,:) = tra(:,:,:,jn) - ztrtrd(:,:,:) 
     124               IF (luttrd(jn)) CALL trd_mod_trc(ztrtrd, jn, jptrc_trd_bbc, kt) 
     125            END IF 
     126 
     127            !                                                    ! =========== 
     128         END DO                                                  ! tracer loop 
     129         !                                                       ! =========== 
     130 
     131         IF( l_trdtrc ) DEALLOCATE( ztrtrd ) 
     132 
     133         IF( ln_ctl ) THEN     ! print mean trends (used for debugging) 
    113134            WRITE(charout, FMT="('bbc')") 
    114135            CALL prt_ctl_trc_info(charout) 
     
    128149      !!      bottom ocean level 
    129150      !! 
    130       !! ** Method  :   Read the namtrabbc namelist and check the parameters. 
     151      !! ** Method  :   Read the namtopbbc namelist and check the parameters. 
    131152      !!      called at the first time step (nittrc000) 
    132153      !! 
    133       !! ** Input   : - Namlist namtrcbbc 
     154      !! ** Input   : - Namlist namtopbbc 
    134155      !!              - NetCDF file  : passivetrc_geothermal_heating.nc  
    135156      !!                               ( if necessary ) 
     
    137158      !! ** Action  : - compute the heat geothermal trend qgh_trd 
    138159      !!              - compute the bottom ocean level nbotlevt 
    139       !! 
    140       !! history : 
    141       !!  8.5  ! 02-11 (A. Bozec) original code 
    142       !!---------------------------------------------------------------------- 
    143       !! * Modules used 
     160      !!---------------------------------------------------------------------- 
    144161      USE iom 
    145162 
    146       !! * local declarations 
    147163      CHARACTER (len=32) ::   clname 
    148164      INTEGER  ::   ji, jj              ! dummy loop indices 
    149165      INTEGER  ::   inum = 11           ! temporary logical unit 
    150166 
    151       NAMELIST/namtrcbbc/ngeo_trc_flux, ngeo_trc_flux_const  
     167      NAMELIST/namtopbbc/ngeo_trc_flux, ngeo_trc_flux_const  
    152168      !!---------------------------------------------------------------------- 
    153169 
    154170      ! Read Namelist nambbc : bottom momentum boundary condition 
    155       REWIND ( numnamtra ) 
    156       READ   ( numnamtra, namtrcbbc ) 
     171      REWIND ( numnat ) 
     172      READ   ( numnat, namtopbbc ) 
    157173 
    158174      ! Control print 
Note: See TracChangeset for help on using the changeset viewer.