Ignore:
Timestamp:
May 17, 2023, 12:31:18 PM (20 months ago)
Author:
abierjon
Message:

Mars GCM:
Fixed r2963 which was preventing to compile the model without XIOS
+ changed the computation of variables rhowater_* so that they are real densities (factor 1/rvap missing ; this doesn't affect the previous PEM results as these densities were only compared between each other)
+ added comments and units for ice table variables in physiq_mod.F
+ made Clapeyron coefficient names in physiq_mod.F coherent with how they are defined in the PEM
+ fixed a reference in constants_marspem_mod.F90
+ fixed unit attribute of surface/soil water densities in field_def_physics_mars.xml

AB

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/libf/phymars/physiq_mod.F

    r2963 r2965  
    546546
    547547! Variable for ice table
    548       REAL :: rhowater_surf(ngrid,nslope)
    549       REAL :: rhowater_surf_sat(ngrid,nslope)
    550       REAL :: rhowater_soil(ngrid,nsoilmx,nslope)
    551       REAL,PARAMETER  :: alph_clap = -6143.7
    552       REAL,PARAMETER :: beta_clap = 28.9074
    553       REAL :: pvap_surf(ngrid)
    554       REAL,PARAMETER :: m_co2 = 44.01E-3  ! CO2 molecular mass (kg/mol)   
    555       REAL,PARAMETER :: m_noco2 = 33.37E-3  ! Non condensible mol mass (kg/mol)   
    556       REAL :: ztmp1,ztmp2
     548      REAL :: rhowater_surf(ngrid,nslope)         ! Water density at the surface [kg/m^3]
     549      REAL :: rhowater_surf_sat(ngrid,nslope)     ! Water density at the surface at saturation [kg/m^3]
     550      REAL :: rhowater_soil(ngrid,nsoilmx,nslope) ! Water density in soil layers [kg/m^3]
     551      REAL,PARAMETER :: alpha_clap_h2o = 28.9074  ! Coeff for Clapeyron law [/]
     552      REAL,PARAMETER :: beta_clap_h2o = -6143.7   ! Coeff for Clapeyron law [K]
     553      REAL :: pvap_surf(ngrid)                    ! Water vapor partial pressure in first layer [Pa]
     554      REAL,PARAMETER :: m_co2 = 44.01E-3          ! CO2 molecular mass [kg/mol]
     555      REAL,PARAMETER :: m_noco2 = 33.37E-3        ! Non condensible mol mass [kg/mol]
     556      REAL :: ztmp1,ztmp2                         ! intermediate variables to compute the mean molar mass of the layer
    557557
    558558c=======================================================================
     
    38473847
    38483848            DO islope = 1,nslope
     3849            ! Clapeyron law for psat (psat = exp(beta/Th2o+alpha)),following Murphy and Koop 2005
    38493850             rhowater_surf_sat(ig,islope)  =
    3850      &         exp(alph_clap/tsurf(ig,islope)+beta_clap)
     3851     &         exp(beta_clap_h2o/tsurf(ig,islope)+alpha_clap_h2o)
    38513852     &         / tsurf(ig,islope)
     3853     &         * mmol(igcm_h2o_vap)/(mugaz*r)
    38523854 
    38533855             if(qsurf(ig,igcm_h2o_ice,islope).gt.(1.e-4)) then
    3854                rhowater_surf(ig,islope) =
    3855      &         exp(alph_clap/tsurf(ig,islope)+beta_clap)
    3856      &         / tsurf(ig,islope)
     3856               ! we consider to be at saturation above 1.e-4 kg.m-2
     3857               rhowater_surf(ig,islope) = rhowater_surf_sat(ig,islope)
    38573858             else
     3859              ! otherwise, use vapor partial pressure
    38583860              rhowater_surf(ig,islope) = pvap_surf(ig)
    38593861     &         / tsurf(ig,islope)
     3862     &         * mmol(igcm_h2o_vap)/(mugaz*r)
    38603863             endif
    38613864             DO isoil = 1,nsoilmx
    38623865             rhowater_soil(ig,isoil,islope) =
    3863      &         exp(alph_clap/tsoil(ig,isoil,islope)+beta_clap)
     3866     &         exp(beta_clap_h2o/tsoil(ig,isoil,islope)+alpha_clap_h2o)
    38643867     &         / tsoil(ig,isoil,islope)
     3868     &         * mmol(igcm_h2o_vap)/(mugaz*r)
    38653869             ENDDO
    38663870          ENDDO
     
    38693873      DO islope = 1,nslope
    38703874        write(str2(1:2),'(i2.2)') islope
    3871         CALL send_xios_field("Waterdensity_soil_slope"//str2,
     3875        CALL write_output("Waterdensity_soil_slope"//str2,
     3876     &     "rhowater_soil_slope"//str2,'kg.m-3',
    38723877     &     rhowater_soil(:,:,islope))
    3873         CALL send_xios_field("Waterdensity_surface"//str2,
     3878        CALL write_output("Waterdensity_surface"//str2,
     3879     &     "rhowater_surface"//str2,'kg.m-3',
    38743880     &     rhowater_surf(:,islope))
    38753881      ENDDO
    38763882
    3877       CALL send_xios_field("h2o_layer1",zq(:,1,igcm_h2o_vap))
    3878       CALL send_xios_field("co2_layer1",zq(:,1,igcm_co2))
     3883      CALL write_output("h2o_layer1","h2o mass mr in the first layer",
     3884     &     'kg/kg',zq(:,1,igcm_h2o_vap))
     3885      CALL write_output("co2_layer1","co2 mass mr in the first layer",
     3886     &     'kg/kg',zq(:,1,igcm_co2))
    38793887
    38803888!PREVIOUSLY IN 1D ONLY
Note: See TracChangeset for help on using the changeset viewer.