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 13305 for NEMO/trunk/src/OCE/SBC/sbcblk.F90 – NEMO

Ignore:
Timestamp:
2020-07-14T19:12:25+02:00 (4 years ago)
Author:
acc
Message:

Trunk changes required to avoid issues with the outer halo in ORCA2_ICE_PISCES,
REPRO_8_4 tests with nn_hls=2. These changes ensure that tmask and output
from sbc_blk are set correctly in the outer halo. Failure to set valid
values in the outer halo can generate NaNs? which lead to OOB errors in the
XRGB lookup table used for the TRC optics.See #2366 for details. With these
changes all variants of the ORCA2_ICE_PISCES SETTE test will complete. There
are still differences between the 1 and 2 halo width runs but running with:
no land suppression; partial land suppression or full land suppression does
not alter either set of results. Likewise setting ln_nnogather either true
or false does not alter results. Differences in run.stat start after 140
timesteps and differences in tracer.stat start after 60 timesteps between
the different halo width sets. Equivalent tests with ln_icebergs = F show no
differences in run.stat but halo-width dependent differences in tracer.stat
persist (now after 64 timesteps).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/src/OCE/SBC/sbcblk.F90

    r13295 r13305  
    568568      zwnd_j(:,:) = 0._wp 
    569569      CALL wnd_cyc( kt, zwnd_i, zwnd_j )    ! add analytical tropical cyclone (Vincent et al. JGR 2012) 
    570       DO_2D( 1, 1, 1, 1 ) 
     570      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    571571         zwnd_i(ji,jj) = pwndi(ji,jj) + zwnd_i(ji,jj) 
    572572         zwnd_j(ji,jj) = pwndj(ji,jj) + zwnd_j(ji,jj) 
     
    576576#else 
    577577      ! ... scalar wind module at T-point (not masked) 
    578       DO_2D( 1, 1, 1, 1 ) 
     578      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    579579         wndm(ji,jj) = SQRT(  pwndi(ji,jj) * pwndi(ji,jj) + pwndj(ji,jj) * pwndj(ji,jj)  ) 
    580580      END_2D 
     
    628628         !     use scalar version of gamma_moist() ... 
    629629         IF( ln_tpot ) THEN 
    630             DO_2D( 1, 1, 1, 1 ) 
     630            DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    631631               ztpot(ji,jj) = ptair(ji,jj) + gamma_moist( ptair(ji,jj), zqair(ji,jj) ) * rn_zqt 
    632632            END_2D 
     
    690690 
    691691      IF( ln_abl ) THEN         !==  ABL formulation  ==!   multiplication by rho_air and turbulent fluxes computation done in ablstp 
    692          DO_2D( 1, 1, 1, 1 ) 
     692         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    693693            zztmp = zU_zu(ji,jj) 
    694694            wndm(ji,jj)   = zztmp                   ! Store zU_zu in wndm to compute ustar2 in ablmod 
     
    710710         pevp(:,:) = pevp(:,:) * tmask(:,:,1) 
    711711 
    712          DO_2D( 1, 1, 1, 1 ) 
     712         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    713713            IF( wndm(ji,jj) > 0._wp ) THEN 
    714714               zztmp = taum(ji,jj) / wndm(ji,jj) 
     
    828828 
    829829      ! use scalar version of L_vap() for AGRIF compatibility 
    830       DO_2D( 1, 1, 1, 1 ) 
     830      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    831831         zqla(ji,jj) = - L_vap( ztskk(ji,jj) ) * pevp(ji,jj)    ! Latent Heat flux !!GS: possibility to add a global qla to avoid recomputation after abl update 
    832832      END_2D 
     
    933933      ! ------------------------------------------------------------ ! 
    934934      ! C-grid ice dynamics :   U & V-points (same as ocean) 
    935       DO_2D( 1, 1, 1, 1 ) 
     935      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    936936         wndm_ice(ji,jj) = SQRT( pwndi(ji,jj) * pwndi(ji,jj) + pwndj(ji,jj) * pwndj(ji,jj) ) 
    937937      END_2D 
     
    978978         zztmp1 = 11637800.0_wp 
    979979         zztmp2 =    -5897.8_wp 
    980          DO_2D( 1, 1, 1, 1 ) 
     980         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    981981            pcd_dui(ji,jj) = zcd_dui (ji,jj) 
    982982            pseni  (ji,jj) = wndm_ice(ji,jj) * Ch_ice(ji,jj) 
     
    12331233         ! 
    12341234         DO jl = 1, jpl 
    1235             DO_2D( 1, 1, 1, 1 ) 
     1235            DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    12361236               zhe = ( rn_cnd_s * phi(ji,jj,jl) + rcnd_i * phs(ji,jj,jl) ) * zfac                            ! Effective thickness 
    12371237               IF( zhe >=  zfac2 )   zgfac(ji,jj,jl) = MIN( 2._wp, 0.5_wp * ( 1._wp + LOG( zhe * zfac3 ) ) ) ! Enhanced conduction factor 
     
    12481248      ! 
    12491249      DO jl = 1, jpl 
    1250          DO_2D( 1, 1, 1, 1 ) 
     1250         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    12511251            ! 
    12521252            zkeff_h = zfac * zgfac(ji,jj,jl) / &                                    ! Effective conductivity of the snow-ice system divided by thickness 
Note: See TracChangeset for help on using the changeset viewer.