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 15478 for NEMO/branches/UKMO/NEMO_4.0.4_penetrating_solar_no_neg – NEMO

Ignore:
Timestamp:
2021-11-08T12:00:43+01:00 (3 years ago)
Author:
timgraham
Message:

Functional change to prevent negative values

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/NEMO_4.0.4_penetrating_solar_no_neg/src/OCE/SBC/sbccpl.F90

    r14735 r15478  
    21312131         CASE ('coupled') 
    21322132            IF (ln_scale_ice_flux) THEN 
    2133                WHERE( a_i(:,:,:) > 0.0_wp ) zqtr_ice_top(:,:,:) = frcv(jpr_qtr)%z3(:,:,:) * a_i_last_couple(:,:,:) / a_i(:,:,:) 
     2133               WHERE( a_i(:,:,:) > 0.0_wp ) zqtr_ice_top(:,:,:) = MAX(0, frcv(jpr_qtr)%z3(:,:,:)) * a_i_last_couple(:,:,:) / a_i(:,:,:) 
    21342134               WHERE( a_i(:,:,:) <= 0.0_wp ) zqtr_ice_top(:,:,:) = 0.0_wp 
    21352135            ELSE 
    2136                zqtr_ice_top(:,:,:) = frcv(jpr_qtr)%z3(:,:,:) 
     2136               zqtr_ice_top(:,:,:) = MAX(0, frcv(jpr_qtr)%z3(:,:,:)) 
    21372137            ENDIF 
    21382138 
Note: See TracChangeset for help on using the changeset viewer.