Changeset 3554


Ignore:
Timestamp:
Dec 16, 2024, 5:57:50 PM (6 days ago)
Author:
jbclement
Message:

PEM:
Follow-up of previous commit (r3553).
JBC

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

Legend:

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

    r3498 r3554  
    44
    55logical                                   :: adsorption_pem     ! True by default, to compute adsorption/desorption. Read in pem.def
    6 real, save, allocatable, dimension(:,:,:) :: co2_adsorbded_phys ! co2 that is in the regolith [kg/m^2]
    7 real, save, allocatable, dimension(:,:,:) :: h2o_adsorbded_phys ! h2o that is in the regolith [kg/m^2]
     6real, save, allocatable, dimension(:,:,:) :: co2_adsorbed_phys ! co2 that is in the regolith [kg/m^2]
     7real, save, allocatable, dimension(:,:,:) :: h2o_adsorbed_phys ! h2o that is in the regolith [kg/m^2]
    88
    99!=======================================================================
     
    2626integer, intent(in) :: nsoilmx_PEM ! number of soil layer in the PEM
    2727
    28 allocate(co2_adsorbded_phys(ngrid,nsoilmx_PEM,nslope))
    29 allocate(h2o_adsorbded_phys(ngrid,nsoilmx_PEM,nslope))
     28allocate(co2_adsorbed_phys(ngrid,nsoilmx_PEM,nslope))
     29allocate(h2o_adsorbed_phys(ngrid,nsoilmx_PEM,nslope))
    3030
    3131END SUBROUTINE ini_adsorption_h_PEM
     
    3434SUBROUTINE end_adsorption_h_PEM
    3535
    36 if (allocated(co2_adsorbded_phys)) deallocate(co2_adsorbded_phys)
    37 if (allocated(h2o_adsorbded_phys)) deallocate(h2o_adsorbded_phys)
     36if (allocated(co2_adsorbed_phys)) deallocate(co2_adsorbed_phys)
     37if (allocated(h2o_adsorbed_phys)) deallocate(h2o_adsorbed_phys)
    3838
    3939END SUBROUTINE end_adsorption_h_PEM
     
    6363
    6464! Local variables
    65 real, dimension(ngrid,nsoil_PEM,nslope) :: theta_h2o_adsorbded ! Fraction of the pores occupied by H2O molecules
     65real, dimension(ngrid,nsoil_PEM,nslope) :: theta_h2o_adsorbed ! Fraction of the pores occupied by H2O molecules
    6666! -------------
    6767! Compute H2O adsorption, then CO2 adsorption
    6868call regolith_h2oadsorption(ngrid,nslope,nsoil_PEM,timelen,d_h2oglaciers,d_co2glaciers,waterice,co2ice,ps,q_co2,q_h2o,tsoil_PEM,TI_PEM, &
    69                             theta_h2o_adsorbded,m_h2o_completesoil,delta_mh2oreg)
     69                            theta_h2o_adsorbed,m_h2o_completesoil,delta_mh2oreg)
    7070call regolith_co2adsorption(ngrid,nslope,nsoil_PEM,timelen,d_h2oglaciers,d_co2glaciers,waterice,co2ice,ps,q_co2,q_h2o, &
    7171                            tsoil_PEM,TI_PEM,m_co2_completesoil,delta_mco2reg)
     
    7575!=======================================================================
    7676SUBROUTINE regolith_h2oadsorption(ngrid,nslope,nsoil_PEM,timelen,d_h2oglaciers,d_co2glaciers,waterice,co2ice,ps,q_co2,q_h2o,tsoil_PEM,TI_PEM, &
    77                                   theta_h2o_adsorbded,m_h2o_completesoil,delta_mreg)
     77                                  theta_h2o_adsorbed,m_h2o_completesoil,delta_mreg)
    7878
    7979!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     
    111111! Outputs
    112112real, dimension(ngrid,nsoil_PEM,nslope), intent(inout) :: m_h2o_completesoil ! Density of h2o adsorbed (kg/m^3)(ngrid,nsoil_PEM,nslope)
    113 real, dimension(ngrid,nsoil_PEM,nslope), intent(out) :: theta_h2o_adsorbded ! Fraction of the pores occupied by H2O molecules
     113real, dimension(ngrid,nsoil_PEM,nslope), intent(out) :: theta_h2o_adsorbed ! Fraction of the pores occupied by H2O molecules
    114114real, dimension(ngrid),                  intent(out) :: delta_mreg          ! Difference density of h2o adsorbed (kg/m^3)
    115115
     
    142142A = 1./m_co2 - 1./m_noco2
    143143B = 1./m_noco2
    144 theta_h2o_adsorbded = 0.
     144theta_h2o_adsorbed = 0.
    145145dm_h2o_regolith_slope = 0.
    146146ispermanent_h2oglaciers = .false.
     
    182182                K = Ko*exp(e/tsoil_PEM(ig,iloop,islope))
    183183                if (TI_PEM(ig,iloop,islope) < inertie_thresold) then
    184                     theta_h2o_adsorbded(ig,iloop,islope) = (K*pvapor_avg(ig)/(1. + K*pvapor_avg(ig)))**mu
     184                    theta_h2o_adsorbed(ig,iloop,islope) = (K*pvapor_avg(ig)/(1. + K*pvapor_avg(ig)))**mu
    185185                else
    186186                    p_sat = exp(beta_clap_h2o/tsoil_PEM(ig,iloop,islope) + alpha_clap_h2o) ! we assume fixed temperature in the ice ... not really good but ...
    187                     theta_h2o_adsorbded(ig,iloop,islope) = (K*p_sat/(1. + K*p_sat))**mu
     187                    theta_h2o_adsorbed(ig,iloop,islope) = (K*p_sat/(1. + K*p_sat))**mu
    188188                endif
    189                 dm_h2o_regolith_slope(ig,iloop,islope) = as*theta_h2o_adsorbded(ig,iloop,islope)*m_theta*rho_regolith
     189                dm_h2o_regolith_slope(ig,iloop,islope) = as*theta_h2o_adsorbed(ig,iloop,islope)*m_theta*rho_regolith
    190190            enddo
    191191        enddo
  • trunk/LMDZ.COMMON/libf/evolution/evol_ice_mod.F90

    r3553 r3554  
    4949!=======================================================================
    5050
    51 SUBROUTINE evol_h2o_ice(ngrid,nslope,cell_area,delta_h2o_adsorbded,delta_h2o_icetablesublim,h2o_ice,d_h2oice,zshift_surf,stopPEM)
     51SUBROUTINE evol_h2o_ice(ngrid,nslope,cell_area,delta_h2o_adsorbed,delta_h2o_icetablesublim,h2o_ice,d_h2oice,zshift_surf,stopPEM)
    5252
    5353use time_evol_mod, only: dt
     
    7373integer,                intent(in) :: ngrid, nslope            ! # of grid points, # of subslopes
    7474real, dimension(ngrid), intent(in) :: cell_area                ! Area of each mesh grid (m^2)
    75 real, dimension(ngrid), intent(in) :: delta_h2o_adsorbded      ! Mass of H2O adsorbded/desorbded in the soil (kg/m^2)
     75real, dimension(ngrid), intent(in) :: delta_h2o_adsorbed      ! Mass of H2O adsorbed/desorbded in the soil (kg/m^2)
    7676real, dimension(ngrid), intent(in) :: delta_h2o_icetablesublim ! Mass of H2O that have condensed/sublimated at the ice table (kg/m^2)
    7777
     
    9393    neg_tend = 0.
    9494    do i = 1,ngrid
    95         if (delta_h2o_adsorbded(i) > 0.) then
    96             pos_tend = pos_tend + delta_h2o_adsorbded(i)*cell_area(i)
     95        if (delta_h2o_adsorbed(i) > 0.) then
     96            pos_tend = pos_tend + delta_h2o_adsorbed(i)*cell_area(i)
    9797        else
    98             neg_tend = neg_tend + delta_h2o_adsorbded(i)*cell_area(i)
     98            neg_tend = neg_tend + delta_h2o_adsorbed(i)*cell_area(i)
    9999        endif
    100100        if (delta_h2o_icetablesublim(i) > 0.) then
  • trunk/LMDZ.COMMON/libf/evolution/pem.F90

    r3553 r3554  
    217217real, dimension(:,:,:),   allocatable :: watersoil_density_PEM_avg        ! Physic x Soil x Slopes, water soil density, yearly averaged [kg/m^3]
    218218real, dimension(:,:),     allocatable :: Tsurfavg_before_saved            ! Surface temperature saved from previous time step [K]
    219 real, dimension(:),       allocatable :: delta_co2_adsorbed              ! Physics: quantity of CO2 that is exchanged because of adsorption / desorption [kg/m^2]
    220 real, dimension(:),       allocatable :: delta_h2o_adsorbed              ! Physics: quantity of H2O that is exchanged because of adsorption / desorption [kg/m^2]
    221 real                                  :: totmassco2_adsorbed             ! Total mass of CO2 that is exchanged because of adsorption / desoprtion over the planets [kg]
    222 real                                  :: totmassh2o_adsorbed             ! Total mass of H2O that is exchanged because of adsorption / desoprtion over the planets [kg]
     219real, dimension(:),       allocatable :: delta_co2_adsorbed               ! Physics: quantity of CO2 that is exchanged because of adsorption / desorption [kg/m^2]
     220real, dimension(:),       allocatable :: delta_h2o_adsorbed               ! Physics: quantity of H2O that is exchanged because of adsorption / desorption [kg/m^2]
     221real                                  :: totmassco2_adsorbed              ! Total mass of CO2 that is exchanged because of adsorption / desoprtion over the planets [kg]
     222real                                  :: totmassh2o_adsorbed              ! Total mass of H2O that is exchanged because of adsorption / desoprtion over the planets [kg]
    223223logical                               :: bool_sublim                      ! logical to check if there is sublimation or not
    224224logical, dimension(:,:),  allocatable :: co2ice_disappeared               ! logical to check if a co2 ice reservoir already disappeared at a previous timestep
  • trunk/LMDZ.COMMON/libf/evolution/pemredem.F90

    r3537 r3554  
    119119        call put_field("tsoil_PEM_slope"//num,"Soil temperature by slope type",tsoil_slope_PEM(:,:,islope),Year)
    120120        call put_field("TI_PEM_slope"//num,"Soil Thermal Inertia by slope type",inertiesoil_slope_PEM(:,:,islope),Year)
    121         call put_field("mco2_reg_ads_slope"//num, "Mass of co2 adsorbded in the regolith",m_co2_regolith(:,:,islope),Year)
    122         call put_field("mh2o_reg_ads_slope"//num, "Mass of h2o adsorbded in the regolith",m_h2o_regolith(:,:,islope),Year)
     121        call put_field("mco2_reg_ads_slope"//num, "Mass of co2 adsorbed in the regolith",m_co2_regolith(:,:,islope),Year)
     122        call put_field("mh2o_reg_ads_slope"//num, "Mass of h2o adsorbed in the regolith",m_h2o_regolith(:,:,islope),Year)
    123123    enddo
    124124    call put_field("icetable_depth","Depth of ice table",icetable_depth,Year)
  • trunk/LMDZ.COMMON/libf/evolution/recomp_tend_co2_slope_mod.F90

    r3553 r3554  
    5959
    6060END SUBROUTINE recomp_tend_co2
    61 !=======================================================================
    62 
    63 SUBROUTINE recomp_tend_h2o(ngrid,nslope,timelen,d_h2oice,PCM_temp,PEM_temp)
    64 
    65 implicit none
    66 
    67 !=======================================================================
    68 !
    69 !  Routine that compute the evolution of the tendencie for h2o ice
    70 !
    71 !=======================================================================
    72 
    73 !   arguments:
    74 !   ----------
    75 !   INPUT
    76 integer,            intent(in) :: timelen, ngrid, nslope
    77 real, dimension(:), intent(in) :: PCM_temp, PEM_temp
    78 
    79 !   OUTPUT
    80 real, dimension(ngrid,nslope), intent(inout) :: d_h2oice ! physical point field: Evolution of perennial ice over one year
    81 
    82 !   local:
    83 !   ------
    84 real :: coef, ave, Rz_old, Rz_new, R_dec, soil_psv_old, soil_psv_new, hum_dec, h2oice_depth_new, h2oice_depth_old
    85 
    86 write(*,*) "Update of the H2O tendency due to lag layer"
    87 
    88 ! Flux correction due to lag layer
    89 !~ Rz_old = h2oice_depth_old*0.0325/4.e-4              ! resistance from PCM
    90 !~ Rz_new = h2oice_depth_new*0.0325/4.e-4              ! new resistance based on new depth
    91 !~ R_dec = (1./Rz_old)/(1./Rz_new)                     ! decrease because of resistance
    92 !~ soil_psv_old = psv(max(PCM_temp(h2oice_depth_old))) ! the maxmimum annual mean saturation vapor pressure at the temperature of the GCM run temperature at the old ice location
    93 !~ soil_psv_new = psv(max(PEM_temp(h2oice_depth_new))) ! the maxmimum annual mean saturation vapor pressure at the temperature of the PEM run temperature at the new ice location
    94 !~ hum_dec = soil_psv_old/soil_psv_new                 ! decrease because of lower water vapor pressure at the new depth
    95 !~ d_h2oice = d_h2oice*R_dec*hum_dec                   ! decrease of flux
    96 
    97 END SUBROUTINE recomp_tend_h2o
    9861
    9962END MODULE recomp_tend_co2_slope_mod
Note: See TracChangeset for help on using the changeset viewer.