Changeset 3019


Ignore:
Timestamp:
Jul 28, 2023, 7:08:13 PM (16 months ago)
Author:
llange
Message:

Mars PEM

  • Following -r 2963, adapt the PEM so that the density of water wapor is correctly computed
  • I've also modified the way Tsoil is initialized, but it might be changed in the future

LL

Location:
trunk/LMDZ.COMMON/libf/evolution
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.COMMON/libf/evolution/pem.F90

    r3002 r3019  
    4848      use dimradmars_mod, only: totcloudfrac, albedo
    4949      use dust_param_mod, only: tauscaling
    50       use tracer_mod,     only: noms,igcm_h2o_ice,igcm_co2 ! tracer names
     50      use tracer_mod,     only: noms,igcm_h2o_ice,igcm_co2,mmol,igcm_h2o_vap ! tracer names and molar masses
    5151#else
    5252! 1b: Modules specific from the Generic physiq
     
    8383                           major_slope,ini_comslope_h
    8484
     85#ifndef CPP_STD
     86      USE comcstfi_h, only: r, mugaz
     87#else
     88      USE comcstfi_mod, only: r, mugaz
     89#endif
    8590
    8691      USE logic_mod,        ONLY: iflag_phys
    8792      USE mod_const_mpi,    ONLY: COMM_LMDZ
    8893      use time_phylmdz_mod, only: daysec,dtphys
    89       USE comconst_mod,     ONLY: rad,g,r,cpp,pi
     94      USE comconst_mod,     ONLY: rad,g,cpp,pi
    9095      USE infotrac
    9196      USE geometry_mod,     only: latitude_deg
     
    517522#endif
    518523
    519      DO nnq=1,nqtot
     524     DO nnq=1,nqtot  ! Why not using ini_tracer ?
    520525       if(noms(nnq).eq."h2o_ice") igcm_h2o_ice = nnq
     526       if(noms(nnq).eq."h2o_vap") then
     527          igcm_h2o_vap = nnq
     528          mmol(igcm_h2o_vap)=18.
     529       endif
    521530       if(noms(nnq).eq."co2") igcm_co2 = nnq
    522531     ENDDO
     
    10581067       do ig = 1,ngrid
    10591068         do isoil = 1,nsoilmx_PEM
    1060           watersoil_density_PEM_timeseries(ig,isoil,islope,t) = exp(beta_clap_h2o/Tsoil_locslope(ig,isoil) + alpha_clap_h2o)/Tsoil_locslope(ig,isoil)
     1069          watersoil_density_PEM_timeseries(ig,isoil,islope,t) = exp(beta_clap_h2o/Tsoil_locslope(ig,isoil) + alpha_clap_h2o)/Tsoil_locslope(ig,isoil)*mmol(igcm_h2o_vap)/(mugaz*r)
    10611070          if(isnan(Tsoil_locslope(ig,isoil))) then
    10621071            call abort_pem("PEM - Update Tsoil","NAN detected in Tsoil ",1)
     
    10891098                             tsoil_PEM,TI_PEM,ps_timeseries,q_co2_PEM_phys,q_h2o_PEM_phys, &
    10901099                             h2o_adsorbded_phys,delta_h2o_adsorbded,co2_adsorbded_phys,delta_co2_adsorbded)
    1091      endif
     1100 
     1101         
     1102      totmassco2_adsorbded = 0.
     1103      totmassh2o_adsorbded = 0.
     1104      do ig = 1,ngrid
     1105       do islope =1, nslope
     1106        do l = 1,nsoilmx_PEM - 1
     1107           totmassco2_adsorbded = totmassco2_adsorbded + co2_adsorbded_phys(ig,l,islope)*(layer_PEM(l+1) - layer_PEM(l))* &
     1108           subslope_dist(ig,islope)/cos(pi*def_slope_mean(islope)/180.) * &
     1109           cell_area(ig)
     1110           totmassh2o_adsorbded = totmassh2o_adsorbded + h2o_adsorbded_phys(ig,l,islope)*(layer_PEM(l+1) - layer_PEM(l))* &
     1111           subslope_dist(ig,islope)/cos(pi*def_slope_mean(islope)/180.) * &
     1112           cell_area(ig)
     1113        enddo
     1114       enddo
     1115      enddo
     1116      write(*,*) "Tot mass of CO2 in the regolith=", totmassco2_adsorbded
     1117      write(*,*) "Tot mass of H2O in the regolith=", totmassh2o_adsorbded               
     1118      endif
    10921119  endif !soil_pem
    10931120
  • trunk/LMDZ.COMMON/libf/evolution/pemetat0.F90

    r2985 r3019  
    1313                                   TI_breccia,TI_bedrock
    1414   use soil_thermalproperties_mod, only: update_soil_thermalproperties
     15   use tracer_mod, only: mmol,igcm_h2o_vap ! tracer names and molar masses
     16
     17#ifndef CPP_STD
     18      USE comcstfi_h, only: r, mugaz
     19#else
     20      USE comcstfi_mod, only: r, mugaz
     21#endif
     22
     23
    1524#ifndef CPP_STD   
    1625   use surfdat_h, only: watercaptag
     
    248257      do isoil = nsoil_GCM+1,nsoil_PEM
    249258        do ig = 1,ngrid
    250         watersoil_ave(ig,isoil,islope) = exp(beta_clap_h2o/tsoil_PEM(ig,isoil,islope) + alpha_clap_h2o)/tsoil_PEM(ig,isoil,islope)
     259        watersoil_ave(ig,isoil,islope) = exp(beta_clap_h2o/tsoil_PEM(ig,isoil,islope) + alpha_clap_h2o)/tsoil_PEM(ig,isoil,islope)*mmol(igcm_h2o_vap)/(mugaz*r)
    251260        enddo
    252261      enddo
     
    446455    do it = 1,timelen
    447456        do isoil = nsoil_GCM+1,nsoil_PEM
    448         tsoil_inst(:,isoil,islope,it) = tsoil_PEM(:,isoil,islope)
     457      call soil_pem_ini(ngrid,nsoil_PEM,TI_PEM(:,:,islope),tsurf_ave_yr2(:,islope),tsoil_inst(:,:,islope,it))
    449458        enddo
    450459     enddo
     
    452461      do isoil = nsoil_GCM+1,nsoil_PEM
    453462        do ig = 1,ngrid
    454         watersoil_ave(ig,isoil,islope) = exp(beta_clap_h2o/tsoil_PEM(ig,isoil,islope) + alpha_clap_h2o)/tsoil_PEM(ig,isoil,islope)
     463        watersoil_ave(ig,isoil,islope) = exp(beta_clap_h2o/tsoil_PEM(ig,isoil,islope) + alpha_clap_h2o)/tsoil_PEM(ig,isoil,islope)*mmol(igcm_h2o_vap)/(mugaz*r)
    455464        enddo
    456465      enddo
Note: See TracChangeset for help on using the changeset viewer.