Changeset 2887


Ignore:
Timestamp:
Feb 1, 2023, 9:34:37 AM (22 months ago)
Author:
llange
Message:

Mars PCM
Include geothermal flux as boundary conditions when solving the
diffusion equation for the soil temperature
By default, the geothermal flux is set to 0. To have geothermal flux >
0., it must be specified in the startfi. (I suggest to use a value of
30e-3 in this case)
Will be use with the PEM for studies of "paleosubsurfaces"
LL

Location:
trunk/LMDZ.MARS/libf/phymars
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/libf/phymars/comsoil_h.F90

    r2616 r2887  
    2525  real,save,allocatable :: beta(:,:)        ! beta_k coefficients
    2626  real,save :: mu
     27  real,save,allocatable :: flux_geo(:)       ! Geothermal Flux (W/m^2)
    2728
    28 !$OMP THREADPRIVATE(tsoil,mthermdiff,thermdiff,coefq,coefd,alph,beta,mu )
     29!$OMP THREADPRIVATE(tsoil,mthermdiff,thermdiff,coefq,coefd,alph,beta,mu,flux_geo)
    2930
    3031contains
     
    4748    allocate(alph(ngrid,nsoilmx-1))
    4849    allocate(beta(ngrid,nsoilmx-1))
    49 
     50    allocate(flux_geo(ngrid))
    5051 
    5152  end subroutine ini_comsoil_h
     
    6667    if (allocated(alph)) deallocate(alph)
    6768    if (allocated(beta)) deallocate(beta)
    68 
     69    if (allocated(flux_geo)) deallocate(flux_geo)
    6970  end subroutine end_comsoil_h
    7071
  • trunk/LMDZ.MARS/libf/phymars/phyetat0_mod.F90

    r2884 r2887  
    2424  use dust_param_mod, only: dustscaling_mode
    2525  USE ioipsl_getin_p_mod, ONLY : getin_p
    26 
     26  use comsoil_h, only: flux_geo
    2727  implicit none
    2828 
     
    644644  ! as well as thermal inertia and volumetric heat capacity
    645645  call soil_settings(nid_start,ngrid,nsoil,tsurf,tsoil,indextime)
     646else
     647    flux_geo(:) = 0.
    646648endif ! of if (startphy_file)
    647649
  • trunk/LMDZ.MARS/libf/phymars/phyredem.F90

    r2884 r2887  
    162162  use dust_rad_adjust_mod, only: dust_rad_adjust_prev,dust_rad_adjust_next
    163163  use dust_param_mod, only: dustscaling_mode
    164 
     164  use comsoil_h,only: flux_geo
    165165  implicit none
    166166 
     
    314314  endif
    315315
     316
     317  ! Geothermal Flux
     318     call put_field('flux_geo','Geothermal flux',flux_geo,time)
    316319  ! Close file
    317320  call close_restartphy
  • trunk/LMDZ.MARS/libf/phymars/physiq_mod.F

    r2880 r2887  
    35983598
    35993599         ! Write soil temperature
    3600 !        call writediagsoil(ngrid,"soiltemp","Soil temperature","K",
    3601 !    &                     3,tsoil)
     3600        call writediagsoil(ngrid,"soiltemp","Soil temperature","K",
     3601     &                     3,tsoil)
    36023602         ! Write surface temperature
    36033603!        call writediagsoil(ngrid,"tsurf","Surface temperature","K",
     
    36283628c        CALL writeg1d(ngrid,nlayer,pv,'v','m.s-1')
    36293629c        CALL writeg1d(ngrid,nlayer,pw,'w','m.s-1')
     3630        call writediagsoil(ngrid,"soiltemp","Soil temperature","K",
     3631     &                     3,tsoil)
    36303632
    36313633! THERMALS STUFF 1D
     
    39773979     &                   log(zplay(1,nlayer)/zplay(1,nlayer-1))*
    39783980     &                   rnew(1,nlayer)*tmean/g
     3981
     3982
    39793983#endif
    39803984
  • trunk/LMDZ.MARS/libf/phymars/soil.F

    r1268 r2887  
    66      use comsoil_h, only: layer, mlayer, volcapa,
    77     &                     mthermdiff, thermdiff, coefq,
    8      &                     coefd, alph, beta, mu
     8     &                     coefd, alph, beta, mu,flux_geo
    99      use surfdat_h, only: watercaptag, inert_h2o_ice
    1010
     
    141141      do ig=1,ngrid
    142142        beta(ig,nsoil-1)=coefq(nsoil-1)*tsoil(ig,nsoil)
    143      &                   /(coefq(nsoil-1)+coefd(ig,nsoil-1))
     143     &            /(coefq(nsoil-1)+coefd(ig,nsoil-1))
     144     &            +flux_geo(ig)/(coefq(nsoil-1) + coefd(ig,nsoil-1))
    144145      enddo
     146   
    145147! Other layers
    146148      do ik=nsoil-2,1,-1
  • trunk/LMDZ.MARS/libf/phymars/soil_settings.F

    r2818 r2887  
    22
    33!      use netcdf
    4       use comsoil_h, only: layer, mlayer, inertiedat, volcapa
     4      use comsoil_h, only: layer, mlayer, inertiedat, volcapa,flux_geo
    55      use iostart, only: inquire_field_ndims, get_var, get_field,
    66     &                   inquire_field, inquire_dimension_length
     
    435435        deallocate(oldtsoil)
    436436      endif ! of if (interpol)
    437      
    438 ! 6. Report min and max values of soil temperatures and thermal inertias
     437
     438
     439     
     440! 6. Load Geothermal Flux
     441! ----------------------------------------------------------------------
     442
     443
     444      call get_field("flux_geo",flux_geo,found,timeindex=indextime)
     445      if (.not.found) then
     446           write(*,*) "soil_settings: Failed loading <flux_geo>"
     447           write(*,*) "soil_settings: Will put  <flux_geo> to 0."
     448           flux_geo(:) = 0.
     449      endif
     450
     451
     452     
     453! 7. Report min and max values of soil temperatures and thermal inertias
    439454! ----------------------------------------------------------------------
    440455
Note: See TracChangeset for help on using the changeset viewer.