Changeset 3932 for trunk


Ignore:
Timestamp:
Oct 23, 2025, 11:51:31 AM (3 months ago)
Author:
tbertrand
Message:

PLUTO PCM: Allow 1D model to be run with empirical seasonal cycles of N2 and CH4 (change in pressure and CH4 abundance with time)
TB

Location:
trunk/LMDZ.PLUTO/libf/phypluto
Files:
2 added
5 edited

Legend:

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

    r3894 r3932  
    88      logical,save :: callconduct,callmolvis,callmoldiff
    99!$OMP THREADPRIVATE(callconduct,callmolvis,callmoldiff)
    10       logical,save :: season,diurnal,lwrite
    11 !$OMP THREADPRIVATE(season,diurnal,lwrite)
     10      logical,save :: season,diurnal,lwrite,evol1d
     11!$OMP THREADPRIVATE(season,diurnal,lwrite,evol1d)
    1212      logical,save :: callgasvis,continuum,graybody
    1313!$OMP THREADPRIVATE(callgasvis,continuum,graybody)
  • trunk/LMDZ.PLUTO/libf/phypluto/hazecloud.F90

    r3929 r3932  
    99      use geometry_mod, only: longitude, latitude ! in radians
    1010      use callkeys_mod, only: hazeconservch4, haze_ch4proffix, diurnal, tcon_ch4, k_ch4, &
    11                               ncratio_ch4,triton
     11                              ncratio_ch4,triton,global1d
    1212      use datafile_mod, only: datadir
     13      use write_output_mod, only: write_output
    1314
    1415      implicit none
     
    2324!     ngrid                 Number of vertical columns
    2425!     nlayer                Number of layers
     26!     nq                    Number of tracers
    2527!     pplay(ngrid,nlayer)   Pressure layers
    2628!     pplev(ngrid,nlayer+1) Pressure levels
    27 !
     29!     zzlay(ngrid,nlayer+1) mid layer altitude
     30!     ptimestep             Physical timestep
     31!     zday, mu0             day clock, cos(incident flux angle)
     32!     pq, pdq               tracer MMR and tendency
     33!     pdist_sol, declin     Sun-planet distance, subsolar latitude
     34!     pfluxuv               Lyman alpha flux at Earth
     35
    2836!     Outputs
    2937!     -------
    30 !
     38!     zdqhaze               Tendency on tracers MMR haze
     39!     zdqphot_prec          Photolysis rate for haze precursors
     40!     zdqphot_ch4           Photolysis rate for CH4
     41!     zdqconv_prec          Tendency for haze formation and precursor destruction
     42
    3143!     Both
    3244!     ----
     
    4355
    4456      INTEGER ngrid, nlayer, nq
    45 !      REAL lati(ngrid)
    46 !      REAL long(ngrid)
    47 !      REAL declin
    4857      LOGICAL firstcall
    4958      SAVE firstcall
     
    5564      REAL,INTENT(IN) :: pq(ngrid,nlayer,nq)
    5665      REAL,INTENT(IN) :: pdq(ngrid,nlayer,nq)
    57 !      REAL,INTENT(IN) :: mmol(nq)
    5866      REAL,INTENT(IN) :: pdist_sol    ! distance SUN-pluto in AU
    59       REAL,INTENT(IN) :: pfluxuv    ! Lyman alpha flux at specific Ls (ph/cm2/s)
     67      REAL,INTENT(IN) :: pfluxuv    ! Lyman alpha flux at Earth at specific Ls (ph/cm2/s)
    6068      REAL,INTENT(IN) :: mu0(ngrid)  ! cosinus of solar incident flux
    61       REAL,INTENT(IN) :: declin    ! distance SUN-pluto in AU
     69      REAL,INTENT(IN) :: declin    ! Subsolar latitude
    6270      REAL,INTENT(OUT) :: zdqhaze(ngrid,nlayer,nq) ! Final tendancy
    63 !      REAL,INTENT(OUT) :: zdqhaze_col(ngrid) ! Final tendancy haze prod
     71      REAL,INTENT(OUT) :: zdqphot_ch4(ngrid,nlayer) ! tendancy due to photolysis of ch4
     72      REAL,INTENT(OUT) :: zdqphot_prec(ngrid,nlayer) ! tendancy due to photolysis of ch4
     73      REAL,INTENT(OUT) :: zdqconv_prec(ngrid,nlayer) ! tendancy due to conversion of
     74                                    ! prec_haze into haze
    6475!-----------------------------------------------------------------------
    6576!     Local variables
     
    7990
    8091      REAL gradflux(nlayer)      ! gradient flux Lyman alpha ph.m-2.s-1
    81       REAL zdqphot_ch4(ngrid,nlayer) ! tendancy due to photolysis of ch4
    82       REAL zdqphot_prec(ngrid,nlayer) ! tendancy due to photolysis of ch4
    83       REAL zdqconv_prec(ngrid,nlayer) ! tendancy due to conversion of
    84                                     ! prec_haze into haze
    8592      REAL kch4     ! fraction of Carbon from ch4 directly dissociated
    8693                    ! by prec_haze
     
    104111      REAL dist
    105112      REAL long2
    106 !-----------------------------------------------------------------------
    107 
    108 !---------------- INPUT ------------------------------------------------
     113
     114      ! Diagnostics (temporary)
     115      REAL fluxlym_sol_tot(ngrid)
     116      REAL fluxlym_ipm_tot(ngrid)
     117
     118!-----------------------------------------------------------------------
     119!     Input parameters
    109120
    110121      avogadro =  6.022141e23
    111       sigch4 = 1.85e-17 ! aborption cross section ch4 cm-2 mol-1
    112 !! Initial Solar flux Lyman alpha on Earth (1AU)
    113       flym_sol_earth=pfluxuv*1.e15        ! ph.m-2.s-1     -> 5e+11 ph.cm-2.s-1
    114 !! Initial Solar flux Lyman alpha on Pluto
     122      sigch4 = 1.85e-17 ! aborption cross section of ch4 in cm-2 mol-1
     123      ! Initial Solar flux Lyman alpha at Earth (1AU)
     124      flym_sol_earth=pfluxuv*1.e15  ! ph.m-2.s-1         -> about 5e+11 ph.cm-2.s-1
     125      ! Initial Solar flux Lyman alpha on Pluto
    115126      flym_sol_pluto=flym_sol_earth/(pdist_sol*pdist_sol)    ! ph.m-2.s-1
    116 ! option decrease by 12% the initial IPM flux to account for Interplanetary H absorption:
    117 ! Fig 3 Gladstone et al 2014 : Lyalpha at Pluto
     127      ! option decrease by 12% the initial Solar Lyman alpha flux to account for Interplanetary H absorption:
     128      ! Cf Fig 3 Gladstone et al 2014 : Lyalpha at Pluto
    118129      flym_sol_pluto=flym_sol_pluto*0.878
    119130
    120 !!!!  Top of atm. Incident IPM (Interplanetary) flux Lyman alpha ph.m-2.s-1
    121 ! fit Fig. 4 in Randall Gladstone et al. (2015)
    122 ! -- New version : Integration over semi sphere of Gladstone data.
    123 !                  Fit of results
    124 
    125       IF (ngrid.eq.1) THEN
    126          flym_ipm(1)=75.e10
    127          mu_ipm(1) = 0.5 !max(mu0(1), 0.5)
    128          mu_sol(1)=0.25
     131      ! Time constant of conversion in aerosol [second]
     132      ! To be explored: 1.E5 - 1.E9
     133      tcon= tcon_ch4
     134      ! Parameter of conversion precurseur to haze
     135      kch4=k_ch4
     136      ncratio=ncratio_ch4 ! boost for haze considering nitrogen contribution
     137                          ! ratio n/c : =0.25 if there is 1N for 3C
     138      IF (firstcall) then
     139        write(*,*) 'hazecloud: haze parameters:'
     140        write(*,*) 'tcon, kch4, ncratio = ' , tcon, kch4, ncratio
     141        firstcall=.false.
     142      ENDIF
     143      ! note: mu0 = cos(solar zenith angle)
     144      ! max(mu0) at lat = declin
     145
     146!-----------------------------------------------------------------------
     147!     Total IPM Lyman alpha flux at top of atmosphere
     148
     149      !  Top of atm. Incident IPM (Interplanetary) flux Lyman alpha ph.m-2.s-1
     150      !  fit Fig. 4 in Randall Gladstone et al. (2015)
     151      !  Integration over semi sphere of Gladstone data.
     152      !  145 R averaged over the sky
     153      !  72.5 R in average over the visible hemisphere
     154      IF (ngrid.eq.1.and..not.global1d) THEN
     155         mu_sol(1) = mu0(1)       
     156         mu_ipm(1) = max(mu_sol(1), 0.5)
     157         flym_ipm(1)=mu0(1)*72.5e10
     158      ELSE IF (ngrid.eq.1.and.global1d) THEN
     159         mu_sol(1) = mu0(1)      ! Full visible disk
     160         mu_ipm(1) = mu0(1)/2.   ! Full sphere (day+night)
     161         flym_ipm(1)=mu_ipm(1)*145.e10
     162         ! Proportional to lyman alpha solar flux (reference 2015 : 5e11 ph/cm2/s) ?
     163         ! In theory, IPM flux remains relatively constant further than 15 AU
     164         flym_ipm(1)=flym_ipm(1)*pfluxuv/5.
    129165      ELSE IF (.not.diurnal) THEN
    130          flym_ipm(:)= mu0(:)*75.e10
    131166         mu_sol(:) = mu0(:)
    132167         mu_ipm(:) = max(mu_sol(:), 0.5)
    133       ELSE
    134 !     1)  get longitude/latitude (rad) of anti-subsolar point (max de mu0 - 180)
     168         flym_ipm(:)= mu0(:)*72.5e10
     169      ELSE ! case with full fit to Gladstone et al. results
     170!     1)  get longitude/latitude (in radian) of anti-subsolar point (max de mu0 - 180)
    135171        longit=-(zday-int(zday))*2.*pi
    136172        IF (longit.LE.-pi) THEN
     
    143179        valmin_dl=74.5e10  ! daylight minimum value
    144180        puis=3.5
    145 
    146181!     3) Loop for each location and fit
    147182        DO ig=1,ngrid
     
    149184          mu_sol(ig) = mu0(ig)
    150185          mu_ipm(ig) = max(mu_sol(ig), 0.5)
    151           IF (mu0(ig).LT.1.e-4) THEN
     186          IF (mu0(ig).LT.1.e-4) THEN ! Daytime
     187           ! Distance to subsolar point
    152188           dist=acos(sin(latitude(ig))*sin(latit)+cos(latitude(ig))*    &
    153189                        cos(latit)*cos(longit-longitude(ig)))*180/pi
     
    155191           flym_ipm(ig)=(valmin_dl-valmin)/(90.**puis)*(dist)**puis  &
    156192                                +valmin
    157           ELSE
     193          ELSE ! Nightime
    158194           flym_ipm(ig)= mu0(ig)*(valmax-valmin_dl)+valmin_dl
    159195          ENDIF
    160           ! proportional to lyman alpha solar flux (reference 2015 : 5e11 ph/cm2/s)
    161           flym_ipm(ig)=flym_ipm(ig)*pfluxuv/5.
     196          ! Proportional to lyman alpha solar flux (reference 2015 : 5e11 ph/cm2/s) ?
     197          ! In theory, IPM flux remains relatively constant further than 15 AU
     198          ! flym_ipm(ig)=flym_ipm(ig)*pfluxuv/5.
    162199        ENDDO  ! nlayer
    163200
    164 
    165201      ENDIF ! ngrid
    166 !---
     202
     203!-----------------------------------------------------------------------
     204!     Methane profile
    167205
    168206      ! If fixed profile of CH4 gas
     
    179217        close(115)
    180218      endif
     219      ! Initialization:
    181220      vmrch4(:,:)=0.
    182221
    183 !! Time constant of conversion in aerosol [second]
    184 !! To be explore: 1.E3; 1.E5; 1.E7; 1.E9
    185       tcon= tcon_ch4
    186 !! Parameter of conversion precurseur to haze
    187       kch4=k_ch4
    188       ncratio=ncratio_ch4 ! boost for haze considering nitrogen contribution
    189                           ! ratio n/c : =0.25 if there is 1N for 3C
    190       IF (firstcall) then
    191         write(*,*) 'hazecloud: haze parameters:'
    192         write(*,*) 'tcon, kch4, ncratio = ' , tcon, kch4, ncratio
    193         firstcall=.false.
    194       ENDIF
    195 ! note: mu0 = cos(solar zenith angle)
    196 ! max(mu0) = declin
    197 
    198 !!----------------------------------------------------------
    199 !!----------------------------------------------------------
     222      ! Diagnostics (temporary)
     223      fluxlym_sol_tot(:)=flym_sol_pluto*mu_sol(:)
     224      fluxlym_ipm_tot(:)=flym_ipm(:)
     225      call write_output("fluxlym_sol","solar lyman alpha flux","",fluxlym_sol_tot)
     226      call write_output("fluxlym_ipm","IPM lyman alpha flux","",fluxlym_ipm_tot)
     227!-----------------------------------------------------------------------
     228!     Main Loop
    200229
    201230      DO ig=1,ngrid
    202231
     232        !! Initializations
    203233        zq_ch4(ig,:)=0.
    204234        zq_prec(ig,:)=0.
     
    210240        gradflux(:)=0.
    211241        fluxlym_sol(1:nlayer)=0.
     242
    212243        fluxlym_sol(nlayer+1)=flym_sol_pluto*mu_sol(ig) !
    213244        fluxlym_ipm(nlayer+1)= flym_ipm(ig)
    214245
    215         !! Interpolate on the model vertical grid
     246        !! Interpolate CH4 MMR on the model vertical grid
    216247        if (haze_ch4proffix) then
    217248            CALL interp_line(levdat,vmrdat,Nfine, &
     
    220251
    221252        DO l=nlayer,1,-1
     253
    222254          !! Actualisation tracer ch4 and prec_haze
    223255          if (haze_ch4proffix) then
     
    229261          endif
    230262         
     263          zq_prec(ig,l)=pq(ig,l,igcm_prec_haze)+    &
     264                                  pdq(ig,l,igcm_prec_haze)*ptimestep
     265
     266          !! Sanity check
    231267          if (zq_ch4(ig,l).lt.0.) then
    232268                zq_ch4(ig,l)=0.
    233269          endif
    234270
    235           zq_prec(ig,l)=pq(ig,l,igcm_prec_haze)+    &
    236                                   pdq(ig,l,igcm_prec_haze)*ptimestep
    237 
    238           !! Calculation optical depth ch4 in Lyman alpha for each layer l
     271          !! Calculation of CH4 optical depth in Lyman alpha for each layer l
    239272          tauch4(l)=sigch4*1.e-4*avogadro*   &
    240273                   (zq_ch4(ig,l)/(mmol(igcm_ch4_gas)*1.e-3))* &
    241274                   (pplev(ig,l)-pplev(ig,l+1))/g
     275
    242276          !! Calculation of Flux in each layer l
    243277          if (mu_sol(ig).gt.1.e-6) then
     
    249283          gradflux(l)=fluxlym_sol(l+1)-fluxlym_sol(l) &
    250284                                + fluxlym_ipm(l+1)-fluxlym_ipm(l)
     285
    251286          !! tendancy on ch4
    252287          !! considering 1 photon destroys 1 ch4 by photolysis
     
    254289            gradflux(l)*g/(pplev(ig,l)-pplev(ig,l+1))
    255290
    256           !! tendency of prec created by photolysis of ch4
     291          !! tendency of precursors created by photolysis of ch4
    257292          zdqphot_prec(ig,l)=-zdqphot_ch4(ig,l)
    258293
    259           !! update precurseur zq_prec
     294          !! update of precursors mass: zq_prec
    260295          zq_prec(ig,l)=zq_prec(ig,l)+    &
    261296                                  zdqphot_prec(ig,l)*ptimestep
     
    269304        ENDDO  ! nlayer
    270305
    271         !! Final tendancy for prec_haze and haze
    272 
     306        !! Final tendancy for prec_haze, haze and CH4
    273307        DO iq=1,nq
    274308           tname=noms(iq)
    275            !print*, 'TB17 tname=',tname,tname(1:4)
    276309           if (tname(1:4).eq."haze") then
    277310              zdqhaze(ig,:,iq) = -zdqconv_prec(ig,:)*    &
     
    280313              zdqhaze(ig,:,igcm_prec_haze)= zdqphot_prec(ig,:) + &
    281314                                          zdqconv_prec(ig,:)
    282 
    283315           else if (noms(iq).eq."ch4_gas".and.(.not.hazeconservch4).and.(.not.haze_ch4proffix)) then
    284316              zdqhaze(ig,:,igcm_ch4_gas)= zdqphot_ch4(ig,:)
     
    288320      ENDDO   ! ngrid
    289321
    290 
    291       !! tendency kg/m2/s for haze column:
    292 !      zdqhaze_col(:)=0.
    293 !      DO ig=1,ngrid
    294 !         DO l=1,nlayer
    295 !            zdqhaze_col(ig)=zdqhaze_col(ig)+zdqhaze(ig,l,igcm_haze)* &
    296 !                           (pplev(ig,l)-pplev(ig,l+1))/g
    297 !         ENDDO
    298 !      ENDDO
    299 
    300322      end subroutine hazecloud
    301323
  • trunk/LMDZ.PLUTO/libf/phypluto/inifis_mod.F90

    r3894 r3932  
    213213     if (is_master) write(*,*) trim(rname)//": season = ",season
    214214
     215     evol1d=.false. ! default value
     216     call getin_p("evol1d",evol1d)
     217     if (is_master) write(*,*) trim(rname)//": evol1d = ",evol1d
     218
    215219     if (is_master) then
    216220       write(*,*) trim(rname)//": Fast mode (nogcm) ?"
     
    13511355     call getin_p("kmixmin",kmixmin)
    13521356     if (is_master) write(*,*)trim(rname)//": kmixmin = ",kmixmin
     1357     kmix_proffix=.false.  ! default value
     1358     call getin_p("kmix_proffix",kmix_proffix)
     1359     if (is_master) write(*,*)trim(rname)//": kmix_proffix = ",kmix_proffix
    13531360
    13541361     if (is_master) write(*,*)'Predefined Cp from dynamics is ',cpp,'J kg^-1 K^-1'
  • trunk/LMDZ.PLUTO/libf/phypluto/lymalpha.F90

    r3632 r3932  
    1717!     Outputs
    1818!     -------
     19!     pflux               Lyman alpha flux
    1920!
    2021!     Both
     
    3334!-----------------------------------------------------------------------
    3435!     Local variables
    35       REAL :: vectls
    36       REAL :: vectflux
    3736      LOGICAL,SAVE :: firstcall=.true.
    3837!$OMP THREADPRIVATE(firstcall)
     
    4039      !!read lyman alpha flux
    4140      integer Nfine
    42       parameter(Nfine=13281)
     41      parameter(Nfine=9047)
    4342      integer ifine
    4443      character(len=100) :: file_path
  • trunk/LMDZ.PLUTO/libf/phypluto/physiq_mod.F90

    r3931 r3932  
    6666                              tracer, UseTurbDiff,                            &
    6767                              global1d, szangle,                              &
    68                               callmufi
     68                              callmufi, evol1d
    6969      use check_fields_mod, only: check_physics_fields
    7070      use conc_mod, only: rnew, cpnew, ini_conc_mod
     
    362362      real zdqmoldiff(ngrid,nlayer,nq)
    363363
     364      REAL zqch4evol(nlayer)
     365
    364366      ! Haze relatated tendancies
    365367      REAL zdqhaze(ngrid,nlayer,nq)
     
    379381      REAL flym_ipm(ngrid)      ! Incident IPM (Interplanetary) flux Lyman alpha ph.m-2.s-1
    380382      REAL zfluxuv                     ! Lyman alpha flux at 1AU
     383      REAL pss                   ! evolving surface pressure in 1D
    381384
    382385      REAL array_zero1(ngrid)
     
    736739      end if
    737740
    738 !    Get Lyman alpha flux at specific Ls
     741      ! Get Lyman alpha flux at specific Ls
    739742      if (callmufi.or.haze) then
    740743         call lymalpha(zls,zfluxuv)
     
    14381441                   ptimestep,pplev,zdqc,zdqsc,'CH4',' n2cond')
    14391442        endif
     1443      endif
     1444
     1445      ! Apply empiric surface pressure change in 1D when
     1446      ! evol1D is active (seasonal evolution of pressure)
     1447      if (ngrid.eq.1.and.season.and.evol1d) then
     1448         ! Get empiric value of surface pressure depending on Ls
     1449         call evolps(zls,pss)
     1450         ! Update surface pressure tendancy
     1451         pdpsrf(1) = pdpsrf(1)+ (pss-(pplev(1,1)+ &
     1452            pdpsrf(1)*ptimestep))/ptimestep
     1453         if (methane) then
     1454            ! Get empiric value of CH4 MMR depending on Ls
     1455            call evolch4(ngrid,nlayer,zls,pplev,pdpsrf,zqch4evol)
     1456            ! Update tracer tendency
     1457            pdq(1,:,igcm_ch4_gas)=pdq(1,:,igcm_ch4_gas)+  &
     1458              (zqch4evol(:)-(pq(1,:,igcm_ch4_gas)+  &
     1459              pdq(1,:,igcm_ch4_gas)*ptimestep))/ptimestep
     1460         endif       
    14401461      endif
    14411462
Note: See TracChangeset for help on using the changeset viewer.