Changeset 4045 for LMDZ6


Ignore:
Timestamp:
Dec 7, 2021, 9:14:49 AM (3 years ago)
Author:
idelkadi
Message:

Correction in radlwsw_m.F90:
Addition of machine threshold to avoid a division by 0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/phylmd/radlwsw_m.F90

    r4031 r4045  
    335335  REAL(KIND=8) ZSWDIFFUSEBAND(klon,NSW), &  ! SW DN flux in diffuse albedo band
    336336               ZSWDIRECTBAND(klon,NSW)      ! SW DN flux in direct albedo band
     337  REAL(KIND=8) seuilmach
    337338#endif
    338339!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     
    506507  ZAEROSOL_OLD = 0.0
    507508  ZAEROSOL = 0.0
     509  seuilmach=tiny(seuilmach)
    508510#endif
    509511
     
    14531455      !--fraction of diffuse radiation in surface SW downward radiation
    14541456      DO i = 1, kdlon
    1455        IF (fract(i).GT.0.0) THEN
    14561457         zdir=SUM(PSFSWDIR(i,:))
    14571458         zdif=SUM(PSFSWDIF(i,:))
     1459       IF (fract(i).GT.0.0.and.(zdir+zdif).gt.seuilmach) THEN
    14581460         zsolswfdiff(i) = zdif/(zdir+zdif)
    14591461       ELSE  !--night
Note: See TracChangeset for help on using the changeset viewer.