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 7351 for branches/2016/dev_INGV_UKMO_2016/NEMOGCM/NEMO/OPA_SRC/TRA/trabbc.F90 – NEMO

Ignore:
Timestamp:
2016-11-28T17:04:10+01:00 (7 years ago)
Author:
emanuelaclementi
Message:

ticket #1805 step 3: /2016/dev_INGV_UKMO_2016 aligned to the trunk at revision 7161

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2016/dev_INGV_UKMO_2016/NEMOGCM/NEMO/OPA_SRC/TRA/trabbc.F90

    r5397 r7351  
    1212 
    1313   !!---------------------------------------------------------------------- 
    14    !!   tra_bbc      : update the tracer trend at ocean bottom  
    15    !!   tra_bbc_init : initialization of geothermal heat flux trend 
     14   !!   tra_bbc       : update the tracer trend at ocean bottom  
     15   !!   tra_bbc_init  : initialization of geothermal heat flux trend 
    1616   !!---------------------------------------------------------------------- 
    17    USE oce             ! ocean variables 
    18    USE dom_oce         ! domain: ocean 
    19    USE phycst          ! physical constants 
    20    USE trd_oce         ! trends: ocean variables 
    21    USE trdtra          ! trends manager: tracers  
    22    USE in_out_manager  ! I/O manager 
    23    USE iom             ! I/O manager 
    24    USE fldread         ! read input fields 
    25    USE lbclnk            ! ocean lateral boundary conditions (or mpp link) 
    26    USE lib_mpp           ! distributed memory computing library 
    27    USE prtctl          ! Print control 
    28    USE wrk_nemo        ! Memory Allocation 
    29    USE timing          ! Timing 
     17   USE oce            ! ocean variables 
     18   USE dom_oce        ! domain: ocean 
     19   USE phycst         ! physical constants 
     20   USE trd_oce        ! trends: ocean variables 
     21   USE trdtra         ! trends manager: tracers  
     22   ! 
     23   USE in_out_manager ! I/O manager 
     24   USE iom            ! xIOS  
     25   USE fldread        ! read input fields 
     26   USE lbclnk         ! ocean lateral boundary conditions (or mpp link) 
     27   USE lib_mpp        ! distributed memory computing library 
     28   USE prtctl         ! Print control 
     29   USE wrk_nemo       ! Memory Allocation 
     30   USE timing         ! Timing 
    3031 
    3132   IMPLICIT NONE 
     
    4041   REAL(wp)        ::   rn_geoflx_cst !  Constant value of geothermal heat flux 
    4142 
    42    REAL(wp), PUBLIC, DIMENSION(:,:), ALLOCATABLE ::   qgh_trd0   ! geothermal heating trend 
    43    TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf_qgh              ! structure of input qgh (file informations, fields read) 
     43   REAL(wp), PUBLIC , ALLOCATABLE, DIMENSION(:,:) ::   qgh_trd0   ! geothermal heating trend 
     44 
     45   TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf_qgh   ! structure of input qgh (file informations, fields read) 
    4446  
    45    !! * Substitutions 
    46 #  include "domzgr_substitute.h90" 
    4747   !!---------------------------------------------------------------------- 
    4848   !! NEMO/OPA 3.3 , NEMO Consortium (2010) 
     
    6868      !!       Where Qsf is the geothermal heat flux. 
    6969      !! 
    70       !! ** Action  : - update the temperature trends (ta) with the trend of 
    71       !!                the ocean bottom boundary condition 
     70      !! ** Action  : - update the temperature trends with geothermal heating trend 
     71      !!              - send the trend for further diagnostics (ln_trdtra=T) 
    7272      !! 
    7373      !! References : Stein, C. A., and S. Stein, 1992, Nature, 359, 123-129. 
     
    7575      !!---------------------------------------------------------------------- 
    7676      INTEGER, INTENT(in) ::   kt   ! ocean time-step index 
    77       !! 
    78       INTEGER  ::   ji, jj, ik    ! dummy loop indices 
    79       REAL(wp) ::   zqgh_trd      ! geothermal heat flux trend 
     77      ! 
     78      INTEGER  ::   ji, jj    ! dummy loop indices 
    8079      REAL(wp), POINTER, DIMENSION(:,:,:) ::   ztrdt 
    8180      !!---------------------------------------------------------------------- 
     
    8382      IF( nn_timing == 1 )  CALL timing_start('tra_bbc') 
    8483      ! 
    85       IF( l_trdtra )   THEN         ! Save ta and sa trends 
    86          CALL wrk_alloc( jpi, jpj, jpk, ztrdt ) 
     84      IF( l_trdtra )   THEN         ! Save the input temperature trend 
     85         CALL wrk_alloc( jpi,jpj,jpk,  ztrdt ) 
    8786         ztrdt(:,:,:) = tsa(:,:,:,jp_tem) 
    8887      ENDIF 
    89       ! 
    90       !                             !  Add the geothermal heat flux trend on temperature 
     88      !                             !  Add the geothermal trend on temperature 
    9189      DO jj = 2, jpjm1 
    9290         DO ji = 2, jpim1 
    93             ik = mbkt(ji,jj) 
    94             zqgh_trd = qgh_trd0(ji,jj) / fse3t(ji,jj,ik) 
    95             tsa(ji,jj,ik,jp_tem) = tsa(ji,jj,ik,jp_tem) + zqgh_trd 
     91            tsa(ji,jj,mbkt(ji,jj),jp_tem) = tsa(ji,jj,mbkt(ji,jj),jp_tem) + qgh_trd0(ji,jj) / e3t_n(ji,jj,mbkt(ji,jj)) 
    9692         END DO 
    9793      END DO 
     
    9995      CALL lbc_lnk( tsa(:,:,:,jp_tem) , 'T', 1. ) 
    10096      ! 
    101       IF( l_trdtra ) THEN        ! Save the geothermal heat flux trend for diagnostics 
     97      IF( l_trdtra ) THEN        ! Send the trend for diagnostics 
    10298         ztrdt(:,:,:) = tsa(:,:,:,jp_tem) - ztrdt(:,:,:) 
    10399         CALL trd_tra( kt, 'TRA', jp_tem, jptra_bbc, ztrdt ) 
    104          CALL wrk_dealloc( jpi, jpj, jpk, ztrdt ) 
     100         CALL wrk_dealloc( jpi,jpj,jpk,  ztrdt ) 
    105101      ENDIF 
    106102      ! 
     
    127123      !! ** Action  : - read/fix the geothermal heat qgh_trd0 
    128124      !!---------------------------------------------------------------------- 
    129       USE iom 
    130       !! 
    131125      INTEGER  ::   ji, jj              ! dummy loop indices 
    132126      INTEGER  ::   inum                ! temporary logical unit 
     
    139133      NAMELIST/nambbc/ln_trabbc, nn_geoflx, rn_geoflx_cst, sn_qgh, cn_dir  
    140134      !!---------------------------------------------------------------------- 
    141  
     135      ! 
    142136      REWIND( numnam_ref )              ! Namelist nambbc in reference namelist : Bottom momentum boundary condition 
    143137      READ  ( numnam_ref, nambbc, IOSTAT = ios, ERR = 901) 
    144 901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nambbc in reference namelist', lwp ) 
    145  
     138901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nambbc in reference namelist', lwp ) 
     139      ! 
    146140      REWIND( numnam_cfg )              ! Namelist nambbc in configuration namelist : Bottom momentum boundary condition 
    147141      READ  ( numnam_cfg, nambbc, IOSTAT = ios, ERR = 902 ) 
    148 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nambbc in configuration namelist', lwp ) 
     142902   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nambbc in configuration namelist', lwp ) 
    149143      IF(lwm) WRITE ( numond, nambbc ) 
    150  
     144      ! 
    151145      IF(lwp) THEN                     ! Control print 
    152146         WRITE(numout,*) 
     
    159153         WRITE(numout,*) 
    160154      ENDIF 
    161  
     155      ! 
    162156      IF( ln_trabbc ) THEN             !==  geothermal heating  ==! 
    163157         ! 
     
    190184            WRITE(ctmp1,*) '     bad flag value for nn_geoflx = ', nn_geoflx 
    191185            CALL ctl_stop( ctmp1 ) 
    192             ! 
    193186         END SELECT 
    194187         ! 
Note: See TracChangeset for help on using the changeset viewer.