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 15548 for NEMO/branches/2021/ticket2632_r14588_theta_sbcblk/src/OCE/TRA/traqsr.F90 – NEMO

Ignore:
Timestamp:
2021-11-28T18:59:49+01:00 (3 years ago)
Author:
gsamson
Message:

update branch to the head of the trunk (r15547); ticket #2632

Location:
NEMO/branches/2021/ticket2632_r14588_theta_sbcblk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2021/ticket2632_r14588_theta_sbcblk

    • Property svn:externals
      •  

        old new  
        99 
        1010# SETTE 
        11 ^/utils/CI/sette@14244        sette 
         11^/utils/CI/sette@HEAD        sette 
         12 
  • NEMO/branches/2021/ticket2632_r14588_theta_sbcblk/src/OCE/TRA/traqsr.F90

    r14215 r15548  
    108108      ! 
    109109      INTEGER  ::   ji, jj, jk               ! dummy loop indices 
    110       INTEGER  ::   irgb, isi, iei, isj, iej ! local integers 
     110      INTEGER  ::   irgb                    ! local integers 
    111111      REAL(wp) ::   zchl, zcoef, z1_2        ! local scalars 
    112112      REAL(wp) ::   zc0 , zc1 , zc2 , zc3    !    -         - 
     
    121121      IF( ln_timing )   CALL timing_start('tra_qsr') 
    122122      ! 
    123       IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
     123      IF( .NOT. l_istiled .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
    124124         IF( kt == nit000 ) THEN 
    125125            IF(lwp) WRITE(numout,*) 
     
    137137      !                         !  before qsr induced heat content  ! 
    138138      !                         !-----------------------------------! 
    139       IF( ntsi == Nis0 ) THEN ; isi = nn_hls ; ELSE ; isi = 0 ; ENDIF    ! Avoid double-counting when using tiling 
    140       IF( ntsj == Njs0 ) THEN ; isj = nn_hls ; ELSE ; isj = 0 ; ENDIF 
    141       IF( ntei == Nie0 ) THEN ; iei = nn_hls ; ELSE ; iei = 0 ; ENDIF 
    142       IF( ntej == Nje0 ) THEN ; iej = nn_hls ; ELSE ; iej = 0 ; ENDIF 
    143  
    144139      IF( kt == nit000 ) THEN          !==  1st time step  ==! 
    145140         IF( ln_rstart .AND. .NOT.l_1st_euler ) THEN    ! read in restart 
    146141            z1_2 = 0.5_wp 
    147             IF( ntile == 0 .OR. ntile == 1 )  THEN                        ! Do only on the first tile 
     142            IF( .NOT. l_istiled .OR. ntile == 1 )  THEN                        ! Do only on the first tile 
    148143               IF(lwp) WRITE(numout,*) '          nit000-1 qsr tracer content forcing field read in the restart file' 
    149144               CALL iom_get( numror, jpdom_auto, 'qsr_hc_b', qsr_hc_b )   ! before heat content trend due to Qsr flux 
     
    151146         ELSE                                           ! No restart or Euler forward at 1st time step 
    152147            z1_2 = 1._wp 
    153             DO_3D( isi, iei, isj, iej, 1, jpk ) 
     148            DO_3D_OVR( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpk ) 
    154149               qsr_hc_b(ji,jj,jk) = 0._wp 
    155150            END_3D 
     
    157152      ELSE                             !==  Swap of qsr heat content  ==! 
    158153         z1_2 = 0.5_wp 
    159          DO_3D( isi, iei, isj, iej, 1, jpk ) 
     154         DO_3D_OVR( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpk ) 
    160155            qsr_hc_b(ji,jj,jk) = qsr_hc(ji,jj,jk) 
    161156         END_3D 
     
    168163      CASE( np_BIO )                   !==  bio-model fluxes  ==! 
    169164         ! 
    170          DO_3D( isi, iei, isj, iej, 1, nksr ) 
     165         DO_3D_OVR( nn_hls, nn_hls, nn_hls, nn_hls, 1, nksr ) 
    171166            qsr_hc(ji,jj,jk) = r1_rho0_rcp * ( etot3(ji,jj,jk) - etot3(ji,jj,jk+1) ) 
    172167         END_3D 
     
    179174         ! 
    180175         IF( nqsr == np_RGBc ) THEN          !*  Variable Chlorophyll 
    181             IF( ntile == 0 .OR. ntile == 1 )  THEN                                         ! Do only for the full domain 
    182                IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 0 )            ! Use full domain 
     176            IF( .NOT. l_istiled .OR. ntile == 1 )  THEN                                         ! Do only for the full domain 
     177               IF( ln_tile ) CALL dom_tile_stop( ldhold=.TRUE. )             ! Use full domain 
    183178               CALL fld_read( kt, 1, sf_chl )         ! Read Chl data and provides it at the current time step 
    184                IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 1 )            ! Revert to tile domain 
     179               IF( ln_tile ) CALL dom_tile_start( ldhold=.TRUE. )            ! Revert to tile domain 
    185180            ENDIF 
    186181            ! 
     
    190185            ! most expensive calculations) 
    191186            ! 
    192             DO_2D( isi, iei, isj, iej ) 
     187            DO_2D_OVR( nn_hls, nn_hls, nn_hls, nn_hls ) 
    193188                       ! zlogc = log(zchl) 
    194189               zlogc = LOG ( MIN( 10. , MAX( 0.03, sf_chl(1)%fnow(ji,jj,1) ) ) ) 
     
    209204 
    210205! 
    211             DO_3D( isi, iei, isj, iej, 1, nksr + 1 ) 
     206            DO_3D_OVR( nn_hls, nn_hls, nn_hls, nn_hls, 1, nksr + 1 ) 
    212207               ! zchl    = ALOG( ze0(ji,jj) ) 
    213208               zlogc = ze0(ji,jj) 
     
    239234         ! 
    240235         zcoef  = ( 1. - rn_abs ) / 3._wp    !* surface equi-partition in R-G-B 
    241          DO_2D( isi, iei, isj, iej ) 
     236         DO_2D_OVR( nn_hls, nn_hls, nn_hls, nn_hls ) 
    242237            ze0(ji,jj) = rn_abs * qsr(ji,jj) 
    243238            ze1(ji,jj) = zcoef  * qsr(ji,jj) 
     
    250245         ! 
    251246         !                                    !* interior equi-partition in R-G-B depending on vertical profile of Chl 
    252          DO_3D( isi, iei, isj, iej, 2, nksr + 1 ) 
     247         DO_3D_OVR( nn_hls, nn_hls, nn_hls, nn_hls, 2, nksr + 1 ) 
    253248            ze3t = e3t(ji,jj,jk-1,Kmm) 
    254249            irgb = NINT( ztmp3d(ji,jj,jk) ) 
     
    264259         END_3D 
    265260         ! 
    266          DO_3D( isi, iei, isj, iej, 1, nksr )          !* now qsr induced heat content 
     261         DO_3D_OVR( nn_hls, nn_hls, nn_hls, nn_hls, 1, nksr )          !* now qsr induced heat content 
    267262            qsr_hc(ji,jj,jk) = r1_rho0_rcp * ( ztmp3d(ji,jj,jk) - ztmp3d(ji,jj,jk+1) ) 
    268263         END_3D 
     
    274269         zz0 =        rn_abs   * r1_rho0_rcp      ! surface equi-partition in 2-bands 
    275270         zz1 = ( 1. - rn_abs ) * r1_rho0_rcp 
    276          DO_3D( isi, iei, isj, iej, 1, nksr )          !* now qsr induced heat content 
     271         DO_3D_OVR( nn_hls, nn_hls, nn_hls, nn_hls, 1, nksr )          !* now qsr induced heat content 
    277272            zc0 = zz0 * EXP( -gdepw(ji,jj,jk  ,Kmm)*xsi0r ) + zz1 * EXP( -gdepw(ji,jj,jk  ,Kmm)*xsi1r ) 
    278273            zc1 = zz0 * EXP( -gdepw(ji,jj,jk+1,Kmm)*xsi0r ) + zz1 * EXP( -gdepw(ji,jj,jk+1,Kmm)*xsi1r ) 
     
    292287      ! 
    293288      ! sea-ice: store the 1st ocean level attenuation coefficient 
    294       DO_2D( isi, iei, isj, iej ) 
     289      DO_2D_OVR( nn_hls, nn_hls, nn_hls, nn_hls ) 
    295290         IF( qsr(ji,jj) /= 0._wp ) THEN   ;   fraqsr_1lev(ji,jj) = qsr_hc(ji,jj,1) / ( r1_rho0_rcp * qsr(ji,jj) ) 
    296291         ELSE                             ;   fraqsr_1lev(ji,jj) = 1._wp 
     
    298293      END_2D 
    299294      ! 
    300       ! TEMP: [tiling] This change not necessary and working array can use A2D(nn_hls) if using XIOS (subdomain support) 
    301       IF( ntile == 0 .OR. ntile == nijtile )  THEN                ! Do only for the full domain 
    302          IF( iom_use('qsr3d') ) THEN      ! output the shortwave Radiation distribution 
    303             ALLOCATE( zetot(jpi,jpj,jpk) ) 
    304             zetot(:,:,nksr+1:jpk) = 0._wp     ! below ~400m set to zero 
    305             DO jk = nksr, 1, -1 
    306                zetot(:,:,jk) = zetot(:,:,jk+1) + qsr_hc(:,:,jk) * rho0_rcp 
    307             END DO 
    308             CALL iom_put( 'qsr3d', zetot )   ! 3D distribution of shortwave Radiation 
    309             DEALLOCATE( zetot ) 
    310          ENDIF 
    311       ENDIF 
    312       ! 
    313       IF( ntile == 0 .OR. ntile == nijtile )  THEN                ! Do only on the last tile 
     295      IF( iom_use('qsr3d') ) THEN      ! output the shortwave Radiation distribution 
     296         ALLOCATE( zetot(A2D(nn_hls),jpk) ) 
     297         zetot(:,:,nksr+1:jpk) = 0._wp     ! below ~400m set to zero 
     298         DO_3DS(0, 0, 0, 0, nksr, 1, -1) 
     299            zetot(ji,jj,jk) = zetot(ji,jj,jk+1) + qsr_hc(ji,jj,jk) * rho0_rcp 
     300         END_3D 
     301         CALL iom_put( 'qsr3d', zetot )   ! 3D distribution of shortwave Radiation 
     302         DEALLOCATE( zetot ) 
     303      ENDIF 
     304      ! 
     305      IF( .NOT. l_istiled .OR. ntile == nijtile )  THEN                ! Do only on the last tile 
    314306         IF( lrst_oce ) THEN     ! write in the ocean restart file 
    315307            CALL iom_rstput( kt, nitrst, numrow, 'qsr_hc_b'   , qsr_hc      ) 
Note: See TracChangeset for help on using the changeset viewer.