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 592 for trunk/NEMO/OPA_SRC/TRA/trabbc.F90 – NEMO

Ignore:
Timestamp:
2007-02-09T10:15:25+01:00 (17 years ago)
Author:
opalod
Message:

nemo_v2_update_001 : CT : - add non linear free surface (variable volume) with new cpp key key_vvl

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/OPA_SRC/TRA/trabbc.F90

    r541 r592  
    3737 
    3838   INTEGER , DIMENSION(jpi,jpj) ::   nbotlevt   ! ocean bottom level index at T-pt 
    39    REAL(wp), DIMENSION(jpi,jpj) ::   qgh_trd    ! geothermal heating trend 
     39   REAL(wp), DIMENSION(jpi,jpj) ::   qgh_trd0   ! geothermal heating trend 
    4040  
    4141   !! * Substitutions 
     
    8080      INTEGER ::   ji, jj   ! dummy loop indices 
    8181#endif 
     82      REAL(wp) ::   zqgh_trd  ! geothermal heat flux trend 
    8283      !!---------------------------------------------------------------------- 
    8384 
     
    9697#if defined key_vectopt_loop   &&   ! defined key_mpp_omp 
    9798         DO ji = jpi+2, jpij-jpi-1   ! vector opt. (forced unrolling) 
    98             ta(ji,1,nbotlevt(ji,1)) = ta(ji,1,nbotlevt(ji,1)) + qgh_trd(ji,1) 
     99            zqgh_trd = ro0cpr * qgh_trd0(ji,1) / fse3t(ji,1,nbotlevt(ji,1) ) 
     100            ta(ji,1,nbotlevt(ji,1)) = ta(ji,1,nbotlevt(ji,1)) + zqgh_trd 
    99101         END DO 
    100102#else 
    101103         DO jj = 2, jpjm1 
    102104            DO ji = 2, jpim1 
    103                ta(ji,jj,nbotlevt(ji,jj)) = ta(ji,jj,nbotlevt(ji,jj)) + qgh_trd(ji,jj) 
     105               zqgh_trd = ro0cpr * qgh_trd0(ji,jj) / fse3t(ji,jj,nbotlevt(ji,jj)) 
     106               ta(ji,jj,nbotlevt(ji,jj)) = ta(ji,jj,nbotlevt(ji,jj)) + zqgh_trd 
    104107            END DO 
    105108         END DO 
     
    131134      !!              - NetCDF file  : geothermal_heating.nc ( if necessary ) 
    132135      !! 
    133       !! ** Action  : - compute the heat geothermal trend qgh_trd 
     136      !! ** Action  : - read/fix the geothermal heat qgh_trd0 
    134137      !!              - compute the bottom ocean level nbotlevt 
    135138      !!---------------------------------------------------------------------- 
     
    162165      END DO 
    163166 
    164  
    165167      SELECT CASE ( ngeo_flux )      ! initialization of geothermal heat flux 
    166168      ! 
     
    171173      CASE ( 1 )                ! constant flux 
    172174         IF(lwp) WRITE(numout,*) '             *** constant heat flux  =   ', ngeo_flux_const 
    173          qgh_trd(:,:) = ngeo_flux_const 
     175         qgh_trd0(:,:) = ngeo_flux_const 
    174176         ! 
    175177      CASE ( 2 )                ! variable geothermal heat flux 
     
    178180         IF(lwp) WRITE(numout,*) '             *** variable geothermal heat flux' 
    179181         CALL iom_open ( 'geothermal_heating.nc', inum ) 
    180          CALL iom_get ( inum, jpdom_data, 'heatflow', qgh_trd ) 
     182         CALL iom_get ( inum, jpdom_data, 'heatflow', qgh_trd0 ) 
    181183         CALL iom_close (inum) 
    182184         ! 
    183          qgh_trd(:,:) = qgh_trd(:,:) * 1.e-3 ! conversion in W/m2 
     185         qgh_trd0(:,:) = qgh_trd0(:,:) * 1.e-3 ! conversion in W/m2 
    184186         ! 
    185187      CASE DEFAULT 
     
    189191      END SELECT 
    190192 
    191       ! geothermal heat flux trend 
    192  
    193       SELECT CASE ( ngeo_flux ) 
    194       ! 
    195       CASE ( 1:2 )                !  geothermal heat flux 
    196 #if defined key_vectopt_loop   &&   ! defined key_mpp_omp 
    197          DO ji = 1, jpij   ! vector opt. (forced unrolling) 
    198             qgh_trd(ji,1) = ro0cpr * qgh_trd(ji,1) / fse3t(ji,1,nbotlevt(ji,1) ) 
    199          END DO 
    200 #else 
    201          DO jj = 1, jpj 
    202             DO ji = 1, jpi 
    203                qgh_trd(ji,jj) = ro0cpr * qgh_trd(ji,jj) / fse3t(ji,jj,nbotlevt(ji,jj)) 
    204             END DO 
    205          END DO 
    206 #endif 
    207       END SELECT 
    208       ! 
     193 
    209194   END SUBROUTINE tra_bbc_init 
    210195 
Note: See TracChangeset for help on using the changeset viewer.