- Timestamp:
- Feb 5, 2025, 3:06:50 PM (6 hours ago)
- Location:
- trunk/LMDZ.COMMON/libf/evolution
- Files:
-
- 3 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/evolution/changelog.txt
r3609 r3610 572 572 == 05/02/2025 == JBC 573 573 - Simplification of "read_data_PCM_mod.F90" to treat the cases with/without slope. 574 - Few bug corrections related to 1D. 574 - Few bug corrections related to 1D. 575 576 == 05/02/2025 == JBC 577 - The sublimation flux can now be modified by the new function 'recomp_tend_h2o' to account for the growth of a dust lag layer (see Eran Vos's note for the formula). 578 - Addition of a function 'itp_tsoil' to compute the soil temperature at any point in the soil profile. -
trunk/LMDZ.COMMON/libf/evolution/compute_soiltemp_mod.F90
r3602 r3610 268 268 ! Position in the old discretization of the depth 269 269 z = mlayer_PEM(isoil - 1) - zshift_surfloc 270 ! Find the interval [mlayer_PEM(iz - 1),mlayer_PEM(iz)[ where the position z belongs271 iz = 0272 do while (mlayer_PEM(iz) <= z)273 iz = iz + 1274 enddo275 if (iz == 0) then276 tsoil_minus = tsurf(ig,islope)277 mlayer_minus = 0.278 else279 tsoil_minus = tsoil_old(ig,iz,islope)280 mlayer_minus = mlayer_PEM(iz - 1)281 endif282 270 ! Interpolation of the temperature profile from the old discretization 283 a = (tsoil_old(ig,iz + 1,islope) - tsoil_minus)/(mlayer_PEM(iz) - mlayer_minus) 284 tsoil(ig,isoil,islope) = a*(z - mlayer_minus) + tsoil_minus 271 tsoil(ig,isoil,islope) = itp_tsoil(tsoil_old(ig,:,islope),tsurf(ig,islope),z) 285 272 enddo 286 273 endif … … 300 287 ! Position of the lag bottom in the old discretization of the depth 301 288 z = zlag(ig,islope) - zshift_surfloc 302 ! Find the interval [mlayer_PEM(iz - 1),mlayer_PEM(iz)[ where the position z belongs303 iz = 0304 do while (mlayer_PEM(iz) <= z)305 iz = iz + 1306 enddo307 if (iz == 0) then308 tsoil_minus = tsurf(ig,islope)309 mlayer_minus = 0.310 else311 tsoil_minus = tsoil_old(ig,iz,islope)312 mlayer_minus = mlayer_PEM(iz - 1)313 endif314 289 ! The "new lag" temperature is set to the ice temperature just below 315 a = (tsoil_old(ig,iz + 1,islope) - tsoil_minus)/(mlayer_PEM(iz) - mlayer_minus) 316 tsoil(ig,:ilag,islope) = a*(z - mlayer_minus) + tsoil_minus 290 tsoil(ig,:ilag,islope) = itp_tsoil(tsoil_old(ig,:,islope),tsurf(ig,islope),z) 317 291 endif 318 292 … … 326 300 ! Position in the old discretization of the depth 327 301 z = mlayer_PEM(isoil - 1) - zshift_surfloc 328 ! Find the interval [mlayer_PEM(iz - 1),mlayer_PEM(iz)[ where the position z belongs329 iz = 0330 do while (mlayer_PEM(iz) <= z)331 iz = iz + 1332 enddo333 if (iz == 0) then334 tsoil_minus = tsurf(ig,islope)335 mlayer_minus = 0.336 else337 tsoil_minus = tsoil_old(ig,iz,islope)338 mlayer_minus = mlayer_PEM(iz - 1)339 endif340 302 ! Interpolation of the temperature profile from the old discretization 341 a = (tsoil_old(ig,iz + 1,islope) - tsoil_minus)/(mlayer_PEM(iz) - mlayer_minus) 342 tsoil(ig,isoil,islope) = a*(z - mlayer_minus) + tsoil_minus 303 tsoil(ig,isoil,islope) = itp_tsoil(tsoil_old(ig,:,islope),tsurf(ig,islope),z) 343 304 enddo 344 305 … … 352 313 END SUBROUTINE shift_tsoil2surf 353 314 315 !======================================================================= 316 317 FUNCTION itp_tsoil(tsoil,tsurf,z) RESULT(tsoil_z) 318 319 use comsoil_h_PEM, only: mlayer_PEM 320 321 implicit none 322 323 real, dimension(:), intent(in) :: tsoil 324 real, intent(in) :: z, tsurf 325 326 real :: tsoil_z, tsoil_minus, mlayer_minus, a 327 integer :: iz 328 329 ! Find the interval [mlayer_PEM(iz - 1),mlayer_PEM(iz)[ where the position z belongs 330 iz = 0 331 do while (mlayer_PEM(iz) <= z) 332 iz = iz + 1 333 enddo 334 if (iz == 0) then 335 tsoil_minus = tsurf 336 mlayer_minus = 0. 337 else 338 tsoil_minus = tsoil(iz) 339 mlayer_minus = mlayer_PEM(iz - 1) 340 endif 341 ! Interpolation of the temperature profile from the old discretization 342 a = (tsoil(iz + 1) - tsoil_minus)/(mlayer_PEM(iz) - mlayer_minus) 343 tsoil_z = a*(z - mlayer_minus) + tsoil_minus 344 345 END FUNCTION itp_tsoil 346 354 347 END MODULE compute_soiltemp_mod -
trunk/LMDZ.COMMON/libf/evolution/pem.F90
r3609 r3610 65 65 use pemetat0_mod, only: pemetat0 66 66 use read_data_PCM_mod, only: read_data_PCM 67 use recomp_tend_ co2_mod, only: recomp_tend_co267 use recomp_tend_mod, only: recomp_tend_co2, recomp_tend_h2o 68 68 use compute_soiltemp_mod, only: compute_tsoil_pem, shift_tsoil2surf 69 69 use writediagpem_mod, only: writediagpem, writediagsoilpem … … 211 211 real, dimension(:,:,:,:), allocatable :: tsoil_timeseries ! Grid points x Soil x Slope x Times field: Soil temperature timeseries [K] 212 212 real, dimension(:,:,:,:), allocatable :: tsoil_PEM_timeseries ! Grid points x Soil x Slope x Times field: Soil temperature timeseries for PEM [K] 213 real, dimension(:,:,:,:), allocatable :: tsoil_PEM_timeseries_old ! Grid points x Soil x Slope x Times field: Soil temperature timeseries for PEM at the previous time step [K] 213 214 real, dimension(:,:,:,:), allocatable :: watersoil_density_timeseries ! Grid points x Soil x Slope x Times Water soil density timeseries [kg /m^3] 214 215 real, dimension(:,:), allocatable :: watersurf_density_avg ! Grid points x Slope: Averaged water surface density [kg/m^3] … … 227 228 real, dimension(:,:), allocatable :: zshift_surf ! Elevation shift for the surface [m] 228 229 real, dimension(:,:), allocatable :: zlag ! Newly built lag thickness [m] 230 real, dimension(:,:), allocatable :: icetable_depth_old ! Old depth of the ice table 229 231 230 232 ! Some variables for the PEM run … … 857 859 ! II_d.3 Update soil temperature 858 860 write(*,*)"> Updating soil temperature profile" 861 allocate(tsoil_avg_old(ngrid,nsoilmx_PEM),tsoil_PEM_timeseries_old(ngrid,nsoilmx_PEM,nslope,timelen)) 862 tsoil_PEM_timeseries_old = tsoil_PEM_timeseries 859 863 do islope = 1,nslope 860 864 tsoil_avg_old = tsoil_PEM(:,:,islope) … … 878 882 879 883 ! II_d.4 Update the ice table 880 allocate(icetable_thickness_old(ngrid,nslope),ice_porefilling_old(ngrid,nsoilmx_PEM,nslope) )884 allocate(icetable_thickness_old(ngrid,nslope),ice_porefilling_old(ngrid,nsoilmx_PEM,nslope),icetable_depth_old(ngrid,nslope)) 881 885 if (icetable_equilibrium) then 882 886 write(*,*) "> Updating ice table (equilibrium method)" … … 887 891 write(*,*) "> Updating ice table (dynamic method)" 888 892 ice_porefilling_old = ice_porefilling 893 icetable_depth_old = icetable_depth 889 894 allocate(porefill(nsoilmx_PEM)) 890 895 do ig = 1,ngrid … … 971 976 !------------------------ 972 977 call recomp_tend_co2(ngrid,nslope,timelen,d_co2ice,d_co2ice_ini,co2_ice,emis,vmr_co2_PCM,vmr_co2_PEM_phys,ps_timeseries,ps_avg_global_old,ps_avg_global_new) 973 deallocate(vmr_co2_PEM_phys) 978 do ig = 1,ngrid 979 do islope = 1,nslope 980 call recomp_tend_h2o(icetable_depth_old(ig,islope),icetable_depth(ig,islope),tsurf_avg(ig,islope),tsoil_PEM_timeseries_old(ig,:,islope,:),tsoil_PEM_timeseries(ig,:,islope,:),d_h2oice(ig,islope)) 981 enddo 982 enddo 983 deallocate(vmr_co2_PEM_phys,icetable_depth_old,tsoil_PEM_timeseries_old) 974 984 975 985 !------------------------ -
trunk/LMDZ.COMMON/libf/evolution/recomp_tend_mod.F90
r3609 r3610 1 MODULE recomp_tend_ co2_mod1 MODULE recomp_tend_mod 2 2 3 3 implicit none … … 16 16 !======================================================================= 17 17 ! 18 ! To compute the evolution of the tendenc iefor co2 ice18 ! To compute the evolution of the tendency for co2 ice 19 19 ! 20 20 !======================================================================= … … 61 61 !======================================================================= 62 62 63 SUBROUTINE recomp_tend_h2o(ngrid,nslope,timelen,d_h2oice,PCM_temp,PEM_temp) 63 SUBROUTINE recomp_tend_h2o(icetable_depth_old,icetable_depth_new,tsurf,tsoil_PEM_timeseries_old,tsoil_PEM_timeseries_new,d_h2oice) 64 65 use compute_soiltemp_mod, only: itp_tsoil 66 use fast_subs_mars, only: psv 64 67 65 68 implicit none … … 67 70 !======================================================================= 68 71 ! 69 ! To compute the evolution of the tendenc iefor h2o ice72 ! To compute the evolution of the tendency for h2o ice 70 73 ! 71 74 !======================================================================= … … 73 76 ! Inputs 74 77 ! ------ 75 integer, intent(in) :: timelen, ngrid, nslope 76 real, dimension(: ), intent(in) :: PCM_temp, PEM_temp78 real, intent(in) :: icetable_depth_old, icetable_depth_new, tsurf 79 real, dimension(:,:), intent(in) :: tsoil_PEM_timeseries_old, tsoil_PEM_timeseries_new 77 80 ! Outputs 78 81 ! ------- 79 real, dimension(ngrid,nslope), intent(inout) :: d_h2oice ! physical point field:Evolution of perennial ice over one year82 real, intent(inout) :: d_h2oice ! Evolution of perennial ice over one year 80 83 81 84 ! Local: 82 85 ! ------ 86 real :: Rz_old, Rz_new, R_dec, hum_dec, psv_max_old, psv_max_new 87 integer :: t 88 real, parameter :: coef_diff = 4.e-4 ! Diffusion coefficient 89 real, parameter :: zcdv = 0.0325 ! Drag coefficient 83 90 84 write(*,*) " Update ofthe H2O tendency due to lag layer"91 write(*,*) "> Updating the H2O tendency due to lag layer" 85 92 86 ! Flux correction due to lag layer 87 !~ Rz_old = h2oice_depth_old*0.0325/4.e-4 ! resistance from PCM 88 !~ Rz_new = h2oice_depth_new*0.0325/4.e-4 ! new resistance based on new depth 89 !~ R_dec = (1./Rz_old)/(1./Rz_new) ! decrease because of resistance 90 !~ 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 91 !~ 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 92 !~ hum_dec = soil_psv_old/soil_psv_new ! decrease because of lower water vapor pressure at the new depth 93 !~ d_h2oice = d_h2oice*R_dec*hum_dec ! decrease of flux 93 ! Higher resistance due to growing lag layer (higher depth) 94 Rz_old = icetable_depth_old*zcdv/coef_diff ! Old resistance from PCM 95 Rz_new = icetable_depth_new*zcdv/coef_diff ! New resistance based on new depth 96 R_dec = Rz_new/Rz_old ! Decrease because of resistance 97 98 ! The maxmimum of the daily averages over one year for the saturation vapor pressure at the ice table location 99 psv_max_old = 0. 100 psv_max_new = 0. 101 do t = 1,size(tsoil_PEM_timeseries_old,2) 102 psv_max_old = max(psv_max_old,psv(itp_tsoil(tsoil_PEM_timeseries_old(:,t),tsurf,icetable_depth_old))) 103 psv_max_new = max(psv_max_new,psv(itp_tsoil(tsoil_PEM_timeseries_new(:,t),tsurf,icetable_depth_new))) 104 enddo 105 106 ! Lower humidity due to growing lag layer (higher depth) 107 hum_dec = psv_max_old/psv_max_new ! Decrease because of lower water vapor pressure at the new depth 108 109 ! Flux correction (decrease) 110 d_h2oice = d_h2oice*R_dec*hum_dec 94 111 95 112 END SUBROUTINE recomp_tend_h2o 96 113 97 END MODULE recomp_tend_ co2_mod114 END MODULE recomp_tend_mod
Note: See TracChangeset
for help on using the changeset viewer.