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 15043 for NEMO/branches/2021/ticket2696_icb_halo1_halo2_compatibility/src/OCE/ICB/icbthm.F90 – NEMO

Ignore:
Timestamp:
2021-06-22T13:26:16+02:00 (3 years ago)
Author:
acc
Message:

#2696 .A possible fix for obtaining identical results with icebergs active and with either
nn_hls=1 or nn_hls=2. This solution works by ensuring the real-valued iceberg position
calculations are done with identical numbers in both cases. Iceberg positions are stored
as a continuous local grid-cell value and a factor of (nn_hls-1) is subtracted from
initial positions to ensure equivalence in both cases. This factor needs to be added
back whenever iceberg positions are converted to local indices. The changes in this
commit are enough to ensure a full ORCA2_ICE_PISCES SETTE test is passed in both case
(992 timesteps) and provides identical results. Suitability of this solution for inclusion
in the trunk needs to be discussed and verified on other platforms and compilers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2021/ticket2696_icb_halo1_halo2_compatibility/src/OCE/ICB/icbthm.F90

    r14773 r15043  
    113113         zyj  = pt%yj 
    114114         ii  = INT( zxi + 0.5 )                            ! T-cell of the berg 
    115          ii  = mi1( ii ) 
     115         ii  = mi1( ii + (nn_hls-1) ) 
    116116         ij  = INT( zyj + 0.5 )               
    117          ij  = mj1( ij ) 
     117         ij  = mj1( ij + (nn_hls-1) ) 
    118118         zVol = zT * zW * zL 
    119119 
     
    203203            zLbits   = MIN( zL, zW, zT, 40._wp )                                     ! assume bergy bits are smallest dimension or 40 meters 
    204204            zAbits   = ( zMbits / rn_rho_bergs ) / zLbits                            ! Effective bottom area (assuming T=Lbits) 
    205             zMbb     = MAX( 0.58_wp*(zdvo**0.8_wp)*(zSST+2._wp) /   & 
     205            zMbb     = MAX( 0.58_wp*(zdvob**0.8_wp)*(zSST+2._wp) /   & 
    206206               &                              ( zLbits**0.2_wp ) , 0._wp ) * z1_rday ! Basal turbulent melting (for bits) 
    207207            zMbb     = rn_rho_bergs * zAbits * zMbb                                  ! in kg/s 
Note: See TracChangeset for help on using the changeset viewer.