Ignore:
Timestamp:
Apr 22, 2024, 3:03:22 AM (8 months ago)
Author:
yjaziri
Message:

GENERIC PCM:

  • Cosmetic + clarifying some variables and comments in chemistry
  • add controle variable for actinique UV flux in photochemistry and output surface UV flux in diagspecUV.nc

YJ

Location:
trunk/LMDZ.GENERIC/libf/aeronostd
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.GENERIC/libf/aeronostd/calchim_asis.F90

    r3155 r3309  
    55                         pu,pdu,pv,pdv,surfdust,surfice,icount,zdtchim)
    66
    7       use tracer_h, only: mmol, noms, nesp, is_chim
    8 
    9       use conc_mod, only: mmean ! mean molecular mass of the atmosphere
     7      use tracer_h,         only: mmol, noms, nesp, is_chim
     8
     9      use conc_mod,         only: mmean ! mean molecular mass of the atmosphere
    1010      USE comcstfi_mod
    1111      use callkeys_mod
     
    1414      use chimiedata_h
    1515      use radcommon_h,      only: glat
    16       use wstats_mod, only: wstats
     16      use wstats_mod,       only: wstats
    1717
    1818      implicit none
     
    256256!        chemistry in lower atmosphere
    257257
    258 !         if (photochem) then
    259 
    260258            call photochemistry_asis(nlayer,ngrid,                         &
    261259                                ig,lswitch,zycol,szacol,fractcol,ptimestep,&
     
    338336! value of parameter 'output' to trigger writting of outputs
    339337! is set above at the declaration of the variable.
    340       if (photochem .and. output) then
     338      if (output) then
    341339
    342340            ! photoloysis
     
    417415            endif
    418416         endif ! end depos
     417
     418         if (jonline .and. output_writediagspecUV) then
     419
     420            !flux at the surface
     421            call writediagspecUV(ngrid,"flux","flux(lon,lat,band)","photon.s-1.nm-1.cm-2",3,fluxUV(:,:,1))
     422
     423         endif ! end jonline
    419424
    420425      end if ! of if (output)
  • trunk/LMDZ.GENERIC/libf/aeronostd/chimiedata_h.F90

    r2542 r3309  
    5656      real, save, allocatable :: albedo_snow_chim(:)    ! albedo snow on chemistry wavelenght grid
    5757      real, save, allocatable :: albedo_co2_ice_chim(:) ! albedo co2 ice on chemistry wavelenght grid
     58      real, save, allocatable :: fluxUV(:,:,:)          ! total actinic flux at each ngrid, wavelength and altitude (photon.s-1.nm-1.cm-2)
    5859
    5960!--------------------------------------------
  • trunk/LMDZ.GENERIC/libf/aeronostd/photochemistry_asis.F90

    r2553 r3309  
    137137     allocate(albedo_snow_chim(nw))
    138138     allocate(albedo_co2_ice_chim(nw))
     139     allocate(fluxUV(ngrid,nw,nlayer))
     140     fluxUV(:,:,:) = 0.
    139141    ! Step 1 : Initialisation of the Spectral Albedos.
    140142     DO iw=1,nw
  • trunk/LMDZ.GENERIC/libf/aeronostd/photolysis_mod.F90

    r2553 r3309  
    3232    ! solar flux
    3333 
    34     real, allocatable, save :: f(:)            !  solar flux (photon.s-1.nm-1.cm-2) at 1 au
     34    real, allocatable, save :: fstar1AU(:)     ! stellar flux (photon.s-1.nm-1.cm-2) at 1 au
    3535 
    3636    ! cross-sections and quantum yields
     
    6969    call gridw(nw,wl,wc,wu,mopt)
    7070 
    71     allocate(f(nw))
     71    allocate(fstar1AU(nw))
    7272 
    7373    ! read and grid solar flux data
    7474   
    75     call rdsolarflux(nw,wl,wc,f)
     75    call rdsolarflux(nw,wl,wc,fstar1AU)
    7676 
    7777    ! read maximum wavelength until photochemical heating is calculated
     
    474474    !==============================================================================
    475475   
    476     subroutine rdsolarflux(nw,wl,wc,f)
     476    subroutine rdsolarflux(nw,wl,wc,fstar1AU)
    477477 
    478478        !     Read and re-grid solar flux data.           
     
    490490        !     output
    491491 
    492         real, dimension(nw) :: f  ! solar flux (photon.s-1.nm-1.cm-2)
     492        real, dimension(nw) :: fstar1AU  ! stellar flux (photon.s-1.nm-1.cm-2)
    493493 
    494494        !     local
     
    568568        ! 5.039e11 = 1.e-4*1e-9/(hc = 6.62e-34*2.998e8)
    569569 
    570         ! f need to be in photon.s-1.nm-1.cm-2
     570        ! fstar1AU need to be in photon.s-1.nm-1.cm-2
    571571        DO iw = 1, nw-1
    572572           !f(iw) = yg1(iw)*wc(iw)*5.039e11  ! If yg1 in w.m-2.nm-1
    573            f(iw) = yg1(iw)
     573           fstar1AU(iw) = yg1(iw)
    574574        ENDDO
    575575 
  • trunk/LMDZ.GENERIC/libf/aeronostd/photolysis_online.F

    r3291 r3309  
    2020      use photolysis_mod
    2121      use tracer_h
    22       use chimiedata_h, only: indexchim
     22      use chimiedata_h, only: indexchim, fluxUV
    2323      use types_asis,   only: nb_phot_hv_max, nb_phot_max, jlabel,
    2424     $                        reactions
     
    4545      real (kind = 8), dimension(nlayer,nb_phot_max) :: e_phot      ! photolysis rates by energie (J.mol-1.s-1)
    4646 
    47 !     solar flux at mars
    48 
    49       real, dimension(nw) :: fmars                                  ! solar flux (w.m-2.nm-1)
     47!     stellar flux at planet
     48
     49      real, dimension(nw) :: fplanet                                ! stellar flux (photon.s-1.nm-1.cm-2) at planet
    5050      real :: factor
    5151
     
    198198      call sphers(nlev,zalt,sza,dsdh,nid)
    199199
    200 !==== solar flux at mars
     200!==== stellar flux at planet
    201201
    202202      factor = (1./dist_sol)**2.
    203203      do iw = 1,nw-1
    204          fmars(iw) = f(iw)*factor
     204         fplanet(iw) = fstar1AU(iw)*factor
    205205      end do
    206206
     
    229229
    230230         do ilay = 1,nlayer
    231            saflux(ilay) = fmars(iw)*(fdir(ilay) + fdn(ilay) + fup(ilay))
     231           saflux(ilay) = fplanet(iw)*
     232     $                     (fdir(ilay) + fdn(ilay) + fup(ilay))
     233           fluxUV(ig,iw,ilay) = saflux(ilay)
    232234         end do
    233235
Note: See TracChangeset for help on using the changeset viewer.