Changeset 3691 for trunk/LMDZ.PLUTO


Ignore:
Timestamp:
Mar 17, 2025, 5:41:41 PM (5 months ago)
Author:
afalco
Message:

Pluto: added HCN;
some comments about what variables actually do in optcv.
AF

Location:
trunk/LMDZ.PLUTO/libf/phypluto
Files:
4 edited

Legend:

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

    r3669 r3691  
    4040            ! ignore variable gas in cpp calculation
    4141         else
    42             ! all values at 300 K from Engineering Toolbox
     42            !  Fill in specific heat cp (J/mol/K) for each gas
    4343            if(igas.eq.igas_CO2)then
    4444               mugaz_c = mugaz_c + 44.01*gfrac(igas)
     
    6565               ! C2H2 https://encyclopedia.airliquide.com/fr/acetylene
    6666               mugaz_c = mugaz_c + 26.04*gfrac(igas)
    67             ! GG MODIF JAN2019
    6867            elseif(igas.eq.igas_C2H4)then
    6968               mugaz_c = mugaz_c + 28.054*gfrac(igas)
     
    7574            elseif(igas.eq.igas_HCl)then
    7675               mugaz_c = mugaz_c + 36.46*gfrac(igas)
     76            elseif(igas.eq.igas_HCN)then
     77               mugaz_c = mugaz_c + 35.85*gfrac(igas)
    7778            elseif(igas.eq.igas_HF)then
    7879               mugaz_c = mugaz_c + 20.01*gfrac(igas)
     
    124125            elseif(igas.eq.igas_C2H4)then
    125126               ! https://www.engineeringtoolbox.com/ethylene-ethene-C2H4-properties-d_2104.html
    126                cpp_c   = cpp_c   + 1.53*gfrac(igas)*28.054/mugaz_c
     127               cpp_c   = cpp_c   + 1.295*gfrac(igas)*28.054/mugaz_c
    127128            !!!!! MODIF GG JAN 2019  (check source values !!)
    128129            elseif(igas.eq.igas_CO)then
     
    131132               cpp_c   = cpp_c   + 0.6909*gfrac(igas)*60.07/mugaz_c
    132133            elseif(igas.eq.igas_HCl)then
     134               cpp_c   = cpp_c   + 1.7087*gfrac(igas)*36.46/mugaz_c
     135            elseif(igas.eq.igas_HCN)then
    133136               cpp_c   = cpp_c   + 1.7087*gfrac(igas)*36.46/mugaz_c
    134137            elseif(igas.eq.igas_HF)then
  • trunk/LMDZ.PLUTO/libf/phypluto/gases_h.F90

    r3669 r3691  
    3232      integer :: igas_C2H4
    3333      integer :: igas_C2H6
    34 !! GG MODIF Jan 2019
    3534      integer :: igas_OCS
    3635      integer :: igas_HCl
     36      integer :: igas_HCN
    3737      integer :: igas_HF
    3838!!$OMP THREADPRIVATE(ngasmx,vgas,gnom,gfrac,&
  • trunk/LMDZ.PLUTO/libf/phypluto/optcv.F90

    r3686 r3691  
    2121
    2222  !==================================================================
    23   !     
     23  !
    2424  !     Purpose
    2525  !     -------
    2626  !     Calculates shortwave optical constants at each level.
    27   !     
     27  !
    2828  !     Authors
    2929  !     -------
    3030  !     Adapted from the NASA Ames code by R. Wordsworth (2009)
    31   !     
     31  !
    3232  !==================================================================
    33   !     
    34   !     THIS SUBROUTINE SETS THE OPTICAL CONSTANTS IN THE VISUAL 
     33  !
     34  !     THIS SUBROUTINE SETS THE OPTICAL CONSTANTS IN THE VISUAL
    3535  !     IT CALCULATES FOR EACH LAYER, FOR EACH SPECTRAL INTERVAL IN THE VISUAL
    3636  !     LAYER: WBAR, DTAU, COSBAR
    3737  !     LEVEL: TAU
    38   !     
     38  !
    3939  !     TAUV(L,NW,NG) is the cumulative optical depth at the top of radiation code
    4040  !     layer L. NW is spectral wavelength interval, ng the Gauss point index.
    41   !     
     41  !
    4242  !     TLEV(L) - Temperature at the layer boundary
    4343  !     PLEV(L) - Pressure at the layer boundary (i.e. level)
    44   !     GASV(NT,NPS,NW,NG) - Visible k-coefficients 
    45   !     
     44  !     GASV(NT,NPS,NW,NG) - Visible k-coefficients
     45  !
    4646  !-------------------------------------------------------------------
    4747
     
    6161  real*8,intent(in) :: GVAER(L_LEVELS,L_NSPECTV,NAERKIND)
    6262  real*8,intent(in) :: TAUAERO(L_LEVELS,NAERKIND)
    63  
     63
    6464  ! local arrays (saved for convenience as need be allocated)
    6565  real*8,save,allocatable :: TAUAEROLK(:,:,:)
    6666  real*8,save,allocatable :: TAEROS(:,:,:)
    67 !$OMP THREADPRIVATE(TAUAEROLK,TAEROS) 
     67!$OMP THREADPRIVATE(TAUAEROLK,TAEROS)
    6868
    6969  integer L, NW, NG, K, LK, IAER
    7070  integer MT(L_LEVELS), MP(L_LEVELS), NP(L_LEVELS)
    7171  real*8  ANS, TAUGAS
    72   real*8,intent(in) :: TAURAY(L_NSPECTV)
    73   real*8  TRAY(L_LEVELS,L_NSPECTV)
     72  real*8,intent(in) :: TAURAY(L_NSPECTV) ! Rayleigh scattering
     73  real*8  TRAY(L_LEVELS,L_NSPECTV) ! Rayleigh scattering
    7474  real*8  DPR(L_LEVELS), U(L_LEVELS)
    7575  real*8  LCOEF(4), LKCOEF(L_LEVELS,4)
     
    8787  real*8  KCOEF(4)
    8888  integer NVAR(L_LEVELS)
    89  
     89
    9090  ! temporary variables to reduce memory access time to gasv
    9191  real*8 tmpk(2,2)
     
    130130
    131131  taugsurf(:,:) = 0.0
    132   dpr(:)        = 0.0
     132  dpr(:)        = 0.0 ! pressure difference between levels
    133133  lkcoef(:,:)   = 0.0
    134   DTAUKV(:,:,:) = 0.0 
     134  DTAUKV(:,:,:) = 0.0
    135135
    136136  do K=2,L_LEVELS
     
    140140     if(kastprof)then
    141141        dz(k) = dpr(k)*(1000.0d0*8.3145d0/muvar(k))*TMID(K)/(g*PMID(K))
    142         U(k)  = Cmk*DPR(k)*mugaz/muvar(k) 
     142        U(k)  = Cmk*DPR(k)*mugaz/muvar(k)
    143143     else
    144144        dz(k) = dpr(k)*R*TMID(K)/(glat_ig*PMID(K))*mugaz/muvar(k)
    145         U(k)  = Cmk*DPR(k)*mugaz/muvar(k)     ! only Cmk line in optci.F 
     145        U(k)  = Cmk*DPR(k)*mugaz/muvar(k)     ! only Cmk line in optci.F
    146146            !JL13 the mugaz/muvar factor takes into account water meanmolecular weight if water is present
    147147     endif
     
    160160            !   The tauaero and tauray are thus set to 0 (a small value for rayleigh because the code crashes otherwise)
    161161            !   in the 4 first semilayers in optcv, but not optci.
    162             !   This solves random variations of the sw heating at the model top. 
     162            !   This solves random variations of the sw heating at the model top.
    163163  do iaer=1,naerkind
    164164     do NW=1,L_NSPECTV
     
    169169     end do
    170170  end do
    171  
     171
    172172  ! Rayleigh scattering
    173173  do NW=1,L_NSPECTV
     
    177177     end do                    ! levels
    178178  end do
    179  
     179
    180180  !     we ignore K=1...
    181181  do K=2,L_LEVELS
     
    221221
    222222                 ! then cross-interactions with other gases  !AF24: removed
    223                  
     223
    224224            !   elseif(igas.eq.igas_H2O.and.T_cont.gt.100.0)then  !AF24: removed
    225                  
     225
    226226              endif
    227227              DCONT = DCONT + dtemp
     
    242242
    243243           if(L_REFVAR.eq.1)then ! added by RW for special no variable case
    244            
     244
    245245              ! JVO 2017 : added tmpk because the repeated calls to gasi/v increased dramatically
    246246              ! the execution time of optci/v -> ~ factor 2 on the whole radiative
     
    252252                tmpk = GASV(MT(K):MT(K)+1,MP(K):MP(K)+1,1,NW,NG)
    253253              ENDIF
    254              
     254
    255255              KCOEF(1) = tmpk(1,1) ! KCOEF(1) = GASV(MT(K),MP(K),1,NW,NG)
    256256              KCOEF(2) = tmpk(1,2) ! KCOEF(2) = GASV(MT(K),MP(K)+1,1,NW,NG)
     
    274274              KCOEF(3) = tmpkvar(2,2,1) + WRATIO(K) *  &
    275275                        ( tmpkvar(2,2,2)-tmpkvar(2,2,1) )
    276              
     276
    277277              KCOEF(4) = tmpkvar(2,1,1) + WRATIO(K) *  &
    278278                        ( tmpkvar(2,1,2)-tmpkvar(2,1,1) )
     
    289289
    290290           TAUGSURF(NW,NG) = TAUGSURF(NW,NG) + TAUGAS + DCONT
    291            DTAUKV(K,nw,ng) = TAUGAS & 
     291           DTAUKV(K,nw,ng) = TAUGAS &
    292292                             + DRAYAER & ! DRAYAER includes all scattering contributions
    293293                             + DCONT ! For parameterized continuum aborption
     
    312312            !   but not in the visible
    313313            !   The tauaero is thus set to 0 in the 4 first semilayers in optcv, but not optci.
    314             !   This solves random variations of the sw heating at the model top. 
     314            !   This solves random variations of the sw heating at the model top.
    315315  do iaer=1,naerkind
    316316    DO NW=1,L_NSPECTV
     
    331331        COSBV(L,NW,1:L_NGAUSS) = atemp(L,NW)/btemp(L,NW)
    332332     END DO ! L vertical loop
    333      
     333
    334334     ! Last level
    335335     L           = L_NLAYRAD
     
    340340     btemp(L,NW) = btemp(L,NW) + TRAY(K,NW)
    341341     COSBV(L,NW,1:L_NGAUSS) = atemp(L,NW)/btemp(L,NW)
    342      
    343      
     342
     343
    344344  END DO                    ! NW spectral loop
    345345
     
    367367  ! Total extinction optical depths
    368368  DO NG=1,L_NGAUSS ! full gauss loop
    369      DO NW=1,L_NSPECTV       
     369     DO NW=1,L_NSPECTV
    370370        TAUV(1,NW,NG)=0.0D0
    371371        TAUCUMV(1,NW,NG)=0.0D0
    372        
     372
    373373        DO K=2,L_LEVELS
    374374           TAUCUMV(K,NW,NG)=TAUCUMV(K-1,NW,NG)+DTAUKV(K,NW,NG)
     
    379379        END DO
    380380        TAUV(L,NW,NG)=TAUCUMV(2*L_NLAYRAD+1,NW,NG)
    381      END DO           
     381     END DO
    382382  END DO ! end full gauss loop
    383383
  • trunk/LMDZ.PLUTO/libf/phypluto/su_gases.F90

    r3669 r3691  
    118118           igas_HCl=igas
    119119           count=count+1
     120        elseif (trim(gnom(igas)).eq."HCN") then
     121           igas_HCN=igas
     122           count=count+1
    120123        elseif (trim(gnom(igas)).eq."HF") then
    121124           igas_HF=igas
Note: See TracChangeset for help on using the changeset viewer.