Changeset 3696 for trunk


Ignore:
Timestamp:
Mar 20, 2025, 9:02:16 AM (3 months ago)
Author:
emillour
Message:

Generic PCM:
Bug fix in the computation of rho() in calc_rayleigh
Made calc_rayleigh.F90 a module and commented out some prints
which swamped the standard output.
GM+EM

Location:
trunk/LMDZ.GENERIC
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.GENERIC/changelog.txt

    r3693 r3696  
    20402040why saved variables are not threadprivate, get rid of useless "return"
    20412041statement at the end of routines, etc.
     2042
     2043== 20/03/2025 == GM+EM
     2044Bug fix in the computation of rho() in calc_rayleigh
     2045Made calc_rayleigh.F90 a module and commented out some prints
     2046which swamped the standard output.
  • trunk/LMDZ.GENERIC/libf/phystd/calc_rayleigh.F90

    r3663 r3696  
     1module calc_rayleigh_mod
     2
     3implicit none
     4
     5contains
     6
    17      subroutine calc_rayleigh(qvar,muvar,PMID,TMID,tauray)
    28
     
    6773      character(len=10),parameter :: subname="rayleigh"
    6874      logical, save :: firstcall=.true.
    69      
     75!$OMP THREADPRIVATE(firstcall)     
     76
    7077      integer icantbewrong
    7178
     
    111118         ! Convert qvar mol/mol -> kg/kg
    112119         if((igas.eq.vgas).and.(maxval(QVAR(:)).ge.1.e-2))then
    113             print*,'variable gas is ',trim(gnom(igas)),' in Rayleigh scattering '
     120           ! print*,'variable gas is ',trim(gnom(igas)),' in Rayleigh scattering '
    114121            mass_frac(igas,:) = QVAR(:)*massmol(igas)/muvar(:)
    115122         elseif((igas/=vgas).and.(gfrac(igas).ge.1.e-2))then
    116123            mass_frac(igas,:) = gfrac(igas)*(1.-QVAR(:))*massmol(igas)/muvar(:)
    117124         else
    118             print*,'Ignoring ',trim(gnom(igas)),' in Rayleigh scattering '// &
    119             'as its mixing ratio is less than 0.01.'
     125           ! print*,'Ignoring ',trim(gnom(igas)),' in Rayleigh scattering '// &
     126           ! 'as its mixing ratio is less than 0.01.'
    120127            ! ignore variable gas in Rayleigh calculation
    121128            ! ignore gases of mixing ratio < 0.01 in Rayleigh calculation
     
    125132      enddo
    126133     
    127       ! ATTENTION, au delà de 60000 cm-1, pour toutes les molécules, il y a des singularités en lien avec la formule d'interpolation.
     134      ! WARNING, beyond 60000 cm-1, for all molecules, there are singularities due to the interpolation formula.
    128135     
    129136   
     
    188195                     P0(:) = pmid(:)*scalep
    189196                     lr = 0.589
    190                      rho(:) = mass_frac(igas,:)*muvar(:)/massmol(igas)*P0(:)/(8.314463*T0(:)/muvar(:)/1000.)
     197                     rho(:) = mass_frac(igas,:)*muvar(:)/massmol(igas)*P0(:)/(8.314463*T0(:)/(muvar(:)/1000.))
    191198                     rhos(:) = rho(:)/rhor
    192199                     ts(:) = T0(:)/Tr
     
    281288
    282289   end subroutine calc_rayleigh
     290
     291end module calc_rayleigh_mod
  • trunk/LMDZ.GENERIC/libf/phystd/optcv.F90

    r3693 r3696  
    1919  use tpindex_mod, only: tpindex
    2020  use interpolate_continuum_mod, only: interpolate_continuum
     21  use calc_rayleigh_mod, only: calc_rayleigh
    2122
    2223  implicit none
Note: See TracChangeset for help on using the changeset viewer.