Changeset 2467 for trunk


Ignore:
Timestamp:
Mar 3, 2021, 1:48:21 PM (4 years ago)
Author:
emillour
Message:

Mars GCM:

  • bug fix in the diagnostic of H, H2, and D total escape which was wrong when running in parallel. The escape rates can now also be included as outputs in diagfi.

FGG

Location:
trunk/LMDZ.MARS
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/README

    r2466 r2467  
    32963296  uses start_archive.nc to create the start files.
    32973297
     3298== 03/03/2021 == FGG
     3299- bug fix in the diagnostic of H, H2, and D total escape which was wrong
     3300  when running in parallel. The escape rates can now also be included as
     3301  outputs in diagfi.
     3302
  • trunk/LMDZ.MARS/libf/aeronomars/moldiff_red.F90

    r2461 r2467  
    11subroutine moldiff_red(ngrid,nlayer,nq,pplay,pplev,pt,pdt,pq,pdq,&
    2                        ptimestep,zzlay,pdteuv,pdtconduc,pdqdiff)
     2                       ptimestep,zzlay,pdteuv,pdtconduc,pdqdiff,&
     3                       PhiEscH,PhiEscH2,PhiEscD)
    34
    45use tracer_mod, only: noms, mmol
    56use geometry_mod, only: cell_area
     7use planetwide_mod, only: planetwide_sumval
    68
    79implicit none
     
    3032      real pdtconduc(ngrid,nlayer)
    3133      real pdqdiff(ngrid,nlayer,nq)
     34      real*8 PhiEscH,PhiEscH2,PhiEscD
    3235!
    3336! Local
     
    4346      real*8 masseU,kBolt,RgazP,Rmars,Grav,Mmars
    4447      real*8 rho0,D0,T0,H0,time0,dZ,time,dZraf,tdiff,Zmin,Zmax
    45       real*8 FacEsc,invsgmu,PhiEscH,PhiEscH2,PhiEscD
     48      real*8 FacEsc,invsgmu
     49      real*8 PhiauxH(ngrid),PhiauxH2(ngrid),PhiauxD(ngrid)
    4650      real*8 hp(nlayer)
    4751      real*8 pp(nlayer)
     
    598602! the trend only at the end
    599603
    600         if (i_h .ne. 1000) PhiEscH=PhiEscH+wi(i_h)*Nrafk(nlraf,i_h)*cell_area(ig) ! in s-1
    601         if (i_h2 .ne. 1000) PhiEscH2=PhiEscH2+wi(i_h2)*Nrafk(nlraf,i_h2)*cell_area(ig) ! in s-1 (U in m/s, aire in m2, Nrafk in m-3)
    602         if (i_d .ne. 1000) PhiEscD=PhiEscD+wi(i_d)*Nrafk(nlraf,i_d)*cell_area(ig)
     604!       if (i_h .ne. 1000) PhiEscH=PhiEscH+wi(i_h)*Nrafk(nlraf,i_h)*cell_area(ig) ! in s-1
     605        if (i_h .ne. 1000) PhiauxH(ig)=wi(i_h)*Nrafk(nlraf,i_h)*cell_area(ig) ! in s-1
     606!       if (i_h2 .ne. 1000) PhiEscH2=PhiEscH2+wi(i_h2)*Nrafk(nlraf,i_h2)*cell_area(ig) ! in s-1 (U in m/s, aire in m2, Nrafk in m-3)
     607        if (i_h2 .ne. 1000) PhiauxH2(ig)=wi(i_h2)*Nrafk(nlraf,i_h2)*cell_area(ig)
     608!        if (i_d .ne. 1000) PhiEscD=PhiEscD+wi(i_d)*Nrafk(nlraf,i_d)*cell_area(ig)
     609        if (i_d .ne. 1000) PhiauxD(ig)=wi(i_d)*Nrafk(nlraf,i_d)*cell_area(ig)
    603610!       print*,'test',ig,wi(i_h),wi(i_h2),Nrafk(nlraf,i_h),Nrafk(nlraf,i_h2),Nrafk(nlraf,i_d),cell_area(ig),PhiEscH,PhiEscH2,i_h,i_h2,i_d,PhiEscD
    604611!       stop
     
    657664       enddo  ! ig loop         
    658665!       print*,'Escape flux H, H2,D (s-1)',PhiEscH,PhiEscH2,PhiEscD
     666       if (i_h.ne.1000) call planetwide_sumval(PhiauxH,PhiEscH)
     667       if (i_h2.ne.1000) call planetwide_sumval(PhiauxH2,PhiEscH2)
     668       if (i_d.ne.1000) call planetwide_sumval(PhiauxD,PhiEscD)
    659669
    660670      return
     
    11781188        endif
    11791189        enddo
    1180 !       D(l)=1d0/interm
     1190        !Temporary: eliminate modification to include Wilke's formulation
     1191        !back to the old scheme to check effect
     1192        !D(l)=1d0/interm
    11811193        D(l)=(1D0-Nk(l,nn)/N(l))/interm
    11821194        enddo
  • trunk/LMDZ.MARS/libf/aeronomars/thermosphere.F

    r1274 r2467  
    33     $     mu0,ptimestep,ptime,zday,tsurf,zzlev,zzlay,
    44     &     pt,pq,pu,pv,pdt,pdq,
    5      $     zdteuv,zdtconduc,zdumolvis,zdvmolvis,zdqmoldiff)
     5     $     zdteuv,zdtconduc,zdumolvis,zdvmolvis,zdqmoldiff,
     6     $     PhiEscH,PhiEscH2,PhiEscD)
    67
    78      use conc_mod, only: rnew, cpnew
     
    3435      REAL,INTENT(out) :: zdvmolvis(ngrid,nlayer)
    3536      REAL,INTENT(out) :: zdqmoldiff(ngrid,nlayer,nq)
     37      REAL*8,INTENT(out) :: PhiEscH,PhiEscH2,PhiEscD
    3638
    3739      INTEGER :: l,ig
     
    8082        call moldiff_red(ngrid,nlayer,nq,
    8183     &                   pplay,pplev,pt,pdt,pq,pdq,ptimestep,
    82      &                   zzlay,zdteuv,zdtconduc,zdqmoldiff)
     84     &                   zzlay,zdteuv,zdtconduc,zdqmoldiff,
     85     &                   PhiEscH,PhiEscH2,PhiEscD)
    8386      endif
    8487
  • trunk/LMDZ.MARS/libf/phymars/physiq_mod.F

    r2447 r2467  
    342342      REAL zdvmolvis(ngrid,nlayer)
    343343      real zdqmoldiff(ngrid,nlayer,nq)
     344      real*8 PhiEscH,PhiEscH2,PhiEscD
    344345
    345346      REAL dwatercap(ngrid), dwatercap_dif(ngrid)     ! (kg/m-2)
     
    18871888     $     mu0,ptimestep,ptime,zday,tsurf,zzlev,zzlay,
    18881889     &     pt,pq,pu,pv,pdt,pdq,
    1889      $     zdteuv,zdtconduc,zdumolvis,zdvmolvis,zdqmoldiff)
     1890     $     zdteuv,zdtconduc,zdumolvis,zdvmolvis,zdqmoldiff,
     1891     $     PhiEscH,PhiEscH2,PhiEscD)
    18901892
    18911893        DO l=1,nlayer
     
    33043306     $           3,zdtnirco2)
    33053307
     3308            !H, H2 and D escape fluxes
     3309
     3310            call WRITEDIAGFI(ngrid,"PhiH","H escape flux","s-1",
     3311     $           0,PhiEscH)
     3312            call WRITEDIAGFI(ngrid,"PhiH2","H2 escape flux","s-1",
     3313     $           0,PhiEscH2)
     3314            call WRITEDIAGFI(ngrid,"PhiD","D escape flux","s-1",
     3315     $           0,PhiEscD)
     3316
     3317!            call wstats(ngrid,"PhiH","H escape flux","s-1",
     3318!     $           0,PhiEscH)
     3319!            call wstats(ngrid,"PhiH2","H2 escape flux","s-1",
     3320!     $           0,PhiEscH2)
     3321!            call wstats(ngrid,"PhiD","D escape flux","s-1",
     3322!     $           0,PhiEscD)
     3323           
    33063324!            call wstats(ngrid,"q15um","15 um cooling","K/s",
    33073325!     $           3,zdtnlte)
Note: See TracChangeset for help on using the changeset viewer.