Ignore:
Timestamp:
Oct 25, 2025, 3:21:13 PM (7 weeks ago)
Author:
tbertrand
Message:

PLUTO PCM : correcting a bug in hazecloud (wrong lyman alpha fluxes due to mu0 being negative during nighttime) + cleaning routines
TB

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.PLUTO/libf/phypluto/hazecloud.F90

    r3934 r3936  
    164164         flym_ipm(1)=flym_ipm(1)*pfluxuv/5.
    165165      ELSE IF (.not.diurnal) THEN
    166          mu_sol(:) = mu0(:)
     166         mu_sol(:) = max(mu0(:),0.)
    167167         mu_ipm(:) = max(mu_sol(:), 0.5)
    168          flym_ipm(:)= mu0(:)*72.5e10
     168         flym_ipm(:)= mu_sol(:)*72.5e10
    169169      ELSE ! case with full fit to Gladstone et al. results
    170170!     1)  get longitude/latitude (in radian) of anti-subsolar point (max de mu0 - 180)
     
    182182        DO ig=1,ngrid
    183183        ! calculation of cosinus of incident angle for IPM flux
    184           mu_sol(ig) = mu0(ig)
     184          mu_sol(ig) = max(mu0(ig),0.)
    185185          mu_ipm(ig) = max(mu_sol(ig), 0.5)
    186           IF (mu0(ig).LT.1.e-4) THEN ! Daytime
     186          IF (mu_sol(ig).LE.0.) THEN ! Nighttime
    187187           ! Distance to subsolar point
    188188           dist=acos(sin(latitude(ig))*sin(latit)+cos(latitude(ig))*    &
     
    191191           flym_ipm(ig)=(valmin_dl-valmin)/(90.**puis)*(dist)**puis  &
    192192                                +valmin
    193           ELSE ! Nightime
    194            flym_ipm(ig)= mu0(ig)*(valmax-valmin_dl)+valmin_dl
     193          ELSE ! Daytime
     194           flym_ipm(ig)= mu_sol(ig)*(valmax-valmin_dl)+valmin_dl
    195195          ENDIF
    196196          ! Proportional to lyman alpha solar flux (reference 2015 : 5e11 ph/cm2/s) ?
Note: See TracChangeset for help on using the changeset viewer.