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 12928 for NEMO/branches/2019/dev_r11078_OSMOSIS_IMMERSE_Nurser/src/OCE/TRA/trabbc.F90 – NEMO

Ignore:
Timestamp:
2020-05-14T21:46:00+02:00 (4 years ago)
Author:
smueller
Message:

Synchronizing with /NEMO/trunk@12925 (ticket #2170)

Location:
NEMO/branches/2019/dev_r11078_OSMOSIS_IMMERSE_Nurser
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r11078_OSMOSIS_IMMERSE_Nurser

    • Property svn:externals
      •  

        old new  
        66^/vendors/FCM@HEAD            ext/FCM 
        77^/vendors/IOIPSL@HEAD         ext/IOIPSL 
         8 
         9# SETTE 
         10^/utils/CI/sette@HEAD         sette 
  • NEMO/branches/2019/dev_r11078_OSMOSIS_IMMERSE_Nurser/src/OCE/TRA/trabbc.F90

    r12178 r12928  
    4444   TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf_qgh   ! structure of input qgh (file informations, fields read) 
    4545  
     46   !! * Substitutions 
     47#  include "do_loop_substitute.h90" 
    4648   !!---------------------------------------------------------------------- 
    4749   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
     
    5153CONTAINS 
    5254 
    53    SUBROUTINE tra_bbc( kt ) 
     55   SUBROUTINE tra_bbc( kt, Kmm, pts, Krhs ) 
    5456      !!---------------------------------------------------------------------- 
    5557      !!                  ***  ROUTINE tra_bbc  *** 
     
    6466      !!       ocean bottom can be computed once and is added to the temperature 
    6567      !!       trend juste above the bottom at each time step: 
    66       !!            ta = ta + Qsf / (rau0 rcp e3T) for k= mbkt 
     68      !!            ta = ta + Qsf / (rho0 rcp e3T) for k= mbkt 
    6769      !!       Where Qsf is the geothermal heat flux. 
    6870      !! 
     
    7375      !!              Emile-Geay and Madec, 2009, Ocean Science. 
    7476      !!---------------------------------------------------------------------- 
    75       INTEGER, INTENT(in) ::   kt   ! ocean time-step index 
     77      INTEGER,                                   INTENT(in   ) :: kt         ! ocean time-step index 
     78      INTEGER,                                   INTENT(in   ) :: Kmm, Krhs  ! time level indices 
     79      REAL(wp), DIMENSION(jpi,jpj,jpk,jpts,jpt), INTENT(inout) :: pts        ! active tracers and RHS of tracer equation 
    7680      ! 
    7781      INTEGER  ::   ji, jj    ! dummy loop indices 
     
    8387      IF( l_trdtra )   THEN         ! Save the input temperature trend 
    8488         ALLOCATE( ztrdt(jpi,jpj,jpk) ) 
    85          ztrdt(:,:,:) = tsa(:,:,:,jp_tem) 
     89         ztrdt(:,:,:) = pts(:,:,:,jp_tem,Krhs) 
    8690      ENDIF 
    8791      !                             !  Add the geothermal trend on temperature 
    88       DO jj = 2, jpjm1 
    89          DO ji = 2, jpim1 
    90             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)) 
    91          END DO 
    92       END DO 
     92      DO_2D_00_00 
     93         pts(ji,jj,mbkt(ji,jj),jp_tem,Krhs) = pts(ji,jj,mbkt(ji,jj),jp_tem,Krhs) + qgh_trd0(ji,jj) / e3t(ji,jj,mbkt(ji,jj),Kmm) 
     94      END_2D 
    9395      ! 
    94       CALL lbc_lnk( 'trabbc', tsa(:,:,:,jp_tem) , 'T', 1. ) 
     96      CALL lbc_lnk( 'trabbc', pts(:,:,:,jp_tem,Krhs) , 'T', 1. ) 
    9597      ! 
    9698      IF( l_trdtra ) THEN        ! Send the trend for diagnostics 
    97          ztrdt(:,:,:) = tsa(:,:,:,jp_tem) - ztrdt(:,:,:) 
    98          CALL trd_tra( kt, 'TRA', jp_tem, jptra_bbc, ztrdt ) 
     99         ztrdt(:,:,:) = pts(:,:,:,jp_tem,Krhs) - ztrdt(:,:,:) 
     100         CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_tem, jptra_bbc, ztrdt ) 
    99101         DEALLOCATE( ztrdt ) 
    100102      ENDIF 
    101103      ! 
    102       IF(ln_ctl)   CALL prt_ctl( tab3d_1=tsa(:,:,:,jp_tem), clinfo1=' bbc  - Ta: ', mask1=tmask, clinfo3='tra-ta' ) 
     104      CALL iom_put ( "hfgeou" , rho0_rcp * qgh_trd0(:,:) ) 
     105      IF(sn_cfctl%l_prtctl)   CALL prt_ctl( tab3d_1=pts(:,:,:,jp_tem,Krhs), clinfo1=' bbc  - Ta: ', mask1=tmask, clinfo3='tra-ta' ) 
    103106      ! 
    104107      IF( ln_timing )   CALL timing_stop('tra_bbc') 
     
    133136      !!---------------------------------------------------------------------- 
    134137      ! 
    135       REWIND( numnam_ref )              ! Namelist nambbc in reference namelist : Bottom momentum boundary condition 
    136138      READ  ( numnam_ref, nambbc, IOSTAT = ios, ERR = 901) 
    137139901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nambbc in reference namelist' ) 
    138140      ! 
    139       REWIND( numnam_cfg )              ! Namelist nambbc in configuration namelist : Bottom momentum boundary condition 
    140141      READ  ( numnam_cfg, nambbc, IOSTAT = ios, ERR = 902 ) 
    141142902   IF( ios >  0 )   CALL ctl_nam ( ios , 'nambbc in configuration namelist' ) 
     
    161162         CASE ( 1 )                          !* constant flux 
    162163            IF(lwp) WRITE(numout,*) '   ==>>>   constant heat flux  =   ', rn_geoflx_cst 
    163             qgh_trd0(:,:) = r1_rau0_rcp * rn_geoflx_cst 
     164            qgh_trd0(:,:) = r1_rho0_rcp * rn_geoflx_cst 
    164165            ! 
    165166         CASE ( 2 )                          !* variable geothermal heat flux : read the geothermal fluxes in mW/m2 
     
    178179 
    179180            CALL fld_read( nit000, 1, sf_qgh )                         ! Read qgh data 
    180             qgh_trd0(:,:) = r1_rau0_rcp * sf_qgh(1)%fnow(:,:,1) * 1.e-3 ! conversion in W/m2 
     181            qgh_trd0(:,:) = r1_rho0_rcp * sf_qgh(1)%fnow(:,:,1) * 1.e-3 ! conversion in W/m2 
    181182            ! 
    182183         CASE DEFAULT 
Note: See TracChangeset for help on using the changeset viewer.