Changeset 5864 for LMDZ6


Ignore:
Timestamp:
Nov 4, 2025, 10:09:28 AM (2 weeks ago)
Author:
acaubel
Message:

Modified to avoid rounding erreur that implies change of land fraction (temporary work around waiting for cleaner solution).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/phylmd/change_srf_frac_mod.f90

    r5285 r5864  
    139139! Normalize to force total fraction to be equal one
    140140       DO i= 1, klon
    141           tmpsum = SUM(pctsrf(i,:))
    142           DO nsrf = 1, nbsrf
    143              pctsrf(i,nsrf) = pctsrf(i,nsrf) / tmpsum
    144           END DO
     141         tmpsum = SUM(pctsrf(i,:))
     142         IF (tmpsum-1. > 1.e-14) THEN ! avoid rounding erreur that change land fraction
     143           DO nsrf = 1, nbsrf
     144              pctsrf(i,nsrf) = pctsrf(i,nsrf) / tmpsum
     145           END DO
     146         ENDIF
    145147       END DO
    146148
Note: See TracChangeset for help on using the changeset viewer.