Changeset 3026 for trunk/LMDZ.MARS/libf


Ignore:
Timestamp:
Aug 9, 2023, 11:56:36 AM (17 months ago)
Author:
jbclement
Message:

Mars PCM/PEM 1D:
Small fixes to be able to run the Mars PCM 1D without "water" + Improvements/addition of scripts in deftank/pem to run the PEM 1D model according to Laskar orbital parameters.
JBC

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

Legend:

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

    r2991 r3026  
    6161!--------
    6262  integer :: &
    63      iq,             & ! loop over nb_tracer
    64      ilayer,         & ! loop over nb_layer
    65      ierr,           & ! open file iostat
    66      indice_h2o_vap, & ! indice of h2o_vap tracer
    67      indice_h2o_ice, & ! indice of h2o_ice tracer
    68      indice_hdo_vap, & ! indice of hdo_vap tracer
    69      indice_hdo_ice    ! indice of hdo_ice tracer
     63     iq,                 & ! loop over nb_tracer
     64     ilayer,             & ! loop over nb_layer
     65     ierr,               & ! open file iostat
     66     indice_h2o_vap = 0, & ! indice of h2o_vap tracer
     67     indice_h2o_ice = 0, & ! indice of h2o_ice tracer
     68     indice_hdo_vap = 0, & ! indice of hdo_vap tracer
     69     indice_hdo_ice = 0    ! indice of hdo_ice tracer
    7070
    7171  character(len=80), dimension(nb_tracer) :: &
     
    148148!    the main isotopologue profile is already read before minors isotopologues
    149149!---------------------------------------------------------------------------------------------------------------------!
    150   if (hdo_vap.eqv..true. .and. indice_h2o_vap.ne.0) then
     150  if (hdo_vap .and. indice_h2o_vap /= 0) then
    151151    do ilayer = 1, nb_layer
    152152      q(ilayer, indice_hdo_vap) = q(ilayer, indice_h2o_vap)*2*155.76e-6*5
     
    154154  end if
    155155
    156   if (hdo_ice.eqv..true. .and. indice_h2o_ice.ne.0) then
     156  if (hdo_ice .and. indice_h2o_ice /= 0) then
    157157    qsurf(indice_hdo_ice) = qsurf(indice_h2o_ice) * 2*155.76e-6*5
    158158    do ilayer = 1, nb_layer
  • trunk/LMDZ.MARS/libf/phymars/dyn1d/testphys1d.F

    r3021 r3026  
    815815      ! Adding an option to force atmospheric water values JN
    816816      atm_wat_profile = -1. ! Default: free atm wat profile
     817      if (water) then
    817818      print *,'Force atmospheric water vapor profile?'
    818819      call getin("atm_wat_profile",atm_wat_profile)
     
    830831        stop
    831832      endif
     833      endif
    832834
    833835! Check if the atmospheric water profile relaxation is specified
     
    835837      ! Adding an option to relax atmospheric water values JBC
    836838      atm_wat_tau = -1. ! Default: no time relaxation
     839      if (water) then
    837840      print*, 'Relax atmospheric water vapor profile?'
    838841      call getin("atm_wat_tau",atm_wat_tau)
     
    850853       stop
    851854        endif
     855      endif
    852856      endif
    853857
     
    908912!       Added "atm_wat_profile" flag (JN + JBC)
    909913!       ---------------------------------------
     914      if (water) then
    910915        call watersat(nlayer,temp,play,zqsat)
    911916        if (0. <= atm_wat_profile .and. atm_wat_profile <= 1.) then
     
    922927          endif
    923928        endif
     929      endif
    924930
    925931!      write(*,*) "testphys1d avant q", q(1,:)
  • trunk/LMDZ.MARS/libf/phymars/initracer.F

    r2823 r3026  
    463463        write(*,*) "initracer: found only ",count," tracers"
    464464        write(*,*) "               expected ",nq
    465         do iq=1,count
    466           write(*,*)'      ',iq,' ',trim(noms(iq))
    467         enddo
    468465        call abort_physic("initracer","tracer mismatch",1)
    469466      else
  • trunk/LMDZ.MARS/libf/phymars/physiq_mod.F

    r3016 r3026  
    26332633c        -------------------------------------------------------------------
    26342634
    2635 
     2635       if (water) then
    26362636         do ig=1,ngrid
    2637            if(mu0(ig).le.0.01) then 
     2637           if(mu0(ig).le.0.01) then
    26382638            fluxsurf_dir_dn_sw(ig) = 0.
    2639            else 
     2639           else
    26402640            fluxsurf_dir_dn_sw(ig) = flux_1AU/dist_sol/dist_sol*mu0(ig)*
    26412641     &                    exp(-(tau(ig,iaer_dust_doubleq)+
     
    26432643           endif
    26442644         enddo
     2645       endif
    26452646
    26462647           ! Density-scaled opacities
Note: See TracChangeset for help on using the changeset viewer.