Changeset 2961
- Timestamp:
- May 9, 2023, 12:18:41 PM (20 months ago)
- Location:
- trunk/LMDZ.COMMON/libf/evolution
- Files:
-
- 1 added
- 1 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/evolution/conf_pem.F90
r2918 r2961 19 19 USE adsorption_mod,only: adsorption_pem 20 20 USE co2glaciers_mod, only: co2glaciersflow 21 use ice_table_mod, only: icetable_equilibrium, icetable_dynamic 21 22 22 23 CHARACTER(len=20),parameter :: modname ='conf_pem' … … 84 85 print*, 'Thermal properties of the regolith vary with pressure ?', reg_thprop_dependp 85 86 87 icetable_equilibrium = .true. 88 CALL getin('icetable_equilibrium',icetable_equilibrium) 89 print*, 'Do we compute the ice table at equilibrium?', icetable_equilibrium 90 91 icetable_dynamic = .false. 92 CALL getin('icetable_dynamic',icetable_dynamic) 93 print*, 'Do we compute the ice table with the dynamic method?', icetable_dynamic 94 95 if ((not(soil_pem)).and.((icetable_equilibrium).or.(icetable_dynamic))) then 96 print*,'Ice table must be used when soil_pem = T' 97 call abort_physic(modname,"Ice table must be used when soil_pem = T",1) 98 endif 86 99 87 100 if ((not(soil_pem)).and.adsorption_pem) then … … 90 103 endif 91 104 92 if ((not(soil_pem)).and. fluxgeo.gt.0.) then105 if ((not(soil_pem)).and.(fluxgeo.gt.0.)) then 93 106 print*,'Soil is not activated but Flux Geo > 0.' 94 107 call abort_physic(modname,"Soil is not activated but Flux Geo > 0.",1) -
trunk/LMDZ.COMMON/libf/evolution/constants_marspem_mod.F90
r2945 r2961 28 28 REAL,PARAMETER :: TI_bedrock = 2300. ! Thermal inertia of Bedrock following Wood 2009 [SI] 29 29 30 ! Porosity of the soil 31 REAL,PARAMETER :: porosity = 0.4 ! porosity of the martian soil, correspond to the value for a random loose packing of monodiperse sphere (Scott, 1960) 32 30 33 ! Stefan Boltzmann constant 31 34 REAL,PARAMETER :: sigmaB=5.678E-8 … … 35 38 36 39 40 37 41 END MODULE constants_marspem_mod 38 42 -
trunk/LMDZ.COMMON/libf/evolution/ice_table_mod.F90
r2902 r2961 3 3 implicit none 4 4 5 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 6 !!! 7 !!! Purpose: Ice table (pore-filling) variables and methods to compute it (dynamic and static) 8 !!! Author: LL, 02/2023 9 !!! 10 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 11 12 LOGICAL,SAVE :: icetable_equilibrium ! Boolean to say if the PEM needs to recompute the icetable depth when at equilibrium 13 LOGICAL,SAVE :: icetable_dynamic ! Boolean to say if the PEM needs to recompute the icetable depth (dynamic method) 14 real,save,allocatable :: porefillingice_depth(:,:) ! ngrid x nslope: Depth of the ice table [m] 15 real,save,allocatable :: porefillingice_thickness(:,:) ! ngrid x nslope: Thickness of the ice table [m] 16 5 17 contains 6 18 7 19 8 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 9 !!! 10 !!! Purpose: Compute the ice table in two ways: dynamic and at equilibrium 11 !!! Author: LL, 02/2023 12 !!! 13 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 14 15 16 17 SUBROUTINE computeice_table_equilibrium(ngrid,nslope,nsoil_PEM,watercaptag,rhowatersurf_ave,rhowatersoil_ave,ice_table) 20 subroutine ini_ice_table_porefilling(ngrid,nslope) 21 22 implicit none 23 integer,intent(in) :: ngrid ! number of atmospheric columns 24 integer,intent(in) :: nslope ! number of slope within a mesh 25 26 allocate(porefillingice_depth(ngrid,nslope)) 27 allocate(porefillingice_thickness(ngrid,nslope)) 28 29 end subroutine ini_ice_table_porefilling 30 31 subroutine end_ice_table_porefilling 32 33 implicit none 34 if (allocated(porefillingice_depth)) deallocate(porefillingice_depth) 35 if (allocated(porefillingice_thickness)) deallocate(porefillingice_thickness) 36 37 end subroutine end_ice_table_porefilling 38 39 40 41 42 SUBROUTINE computeice_table_equilibrium(ngrid,nslope,nsoil_PEM,watercaptag,rhowatersurf_ave,rhowatersoil_ave,regolith_inertia,ice_table_beg,ice_table_thickness) 18 43 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 19 44 !!! 20 !!! Purpose: Compute the ice table depth knowing the yearly average water45 !!! Purpose: Compute the ice table depth (pore-filling) knowing the yearly average water 21 46 !!! density at the surface and at depth. 22 47 !!! Computations are made following the methods in Schorgofer et al., 2005 … … 26 51 !!! 27 52 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 28 53 use math_mod,only: findroot 29 54 #ifndef CPP_STD 30 USE comsoil_h_PEM, only: mlayer_PEM ! Depth of the vertical grid 55 USE comsoil_h_PEM, only: mlayer_PEM,layer_PEM ! Depth of the vertical grid 56 USE soil_thermalproperties_mod, only: ice_thermal_properties 31 57 implicit none 32 58 ! inputs 59 ! ----------- 33 60 integer,intent(in) :: ngrid,nslope,nsoil_PEM ! Size of the physical grid, number of subslope, number of soil layer in the PEM 34 61 logical,intent(in) :: watercaptag(ngrid) ! Boolean to check the presence of a perennial glacier 35 62 real,intent(in) :: rhowatersurf_ave(ngrid,nslope) ! Water density at the surface, yearly averaged [kg/m^3] 36 63 real,intent(in) :: rhowatersoil_ave(ngrid,nsoil_PEM,nslope) ! Water density at depth, computed from clapeyron law's (Murchy and Koop 2005), yearly averaged [kg/m^3] 37 real,intent(inout) :: ice_table(ngrid,nslope) ! ice table depth [m] 64 real,intent(in) :: regolith_inertia(ngrid,nslope) ! Thermal inertia of the regolith layer [SI] 65 ! Ouputs 66 ! ----------- 67 real,intent(out) :: ice_table_beg(ngrid,nslope) ! ice table depth [m] 68 real,intent(out) :: ice_table_thickness(ngrid,nslope) ! ice table thickness [m] 69 ! Local 70 ! ----------- 38 71 real :: z1,z2 ! intermediate variables used when doing a linear interpolation between two depths to find the root 39 integer ig, islope,isoil 72 integer ig, islope,isoil,isoilend ! loop variables 40 73 real :: diff_rho(nsoil_PEM) ! difference of water vapor density between the surface and at depth [kg/m^3] 41 42 74 real :: ice_table_end ! depth of the end of the ice table [m] 75 real :: previous_icetable_depth(ngrid,nslope) ! Ice table computed at previous ice depth [m] 76 real :: stretch ! stretch factor to improve the convergence of the ice table 77 real :: wice_inertia ! Water Ice thermal Inertia [USI] 78 ! Code 79 ! ----------- 80 81 previous_icetable_depth(:,:) = ice_table_beg(:,:) 43 82 do ig = 1,ngrid 44 83 if(watercaptag(ig)) then 45 ice_table(ig,:) = 0. 84 ice_table_beg(ig,:) = 0. 85 ice_table_thickness(ig,:) = layer_PEM(nsoil_PEM) ! Let's assume an infinite ice table (true when geothermal flux is set to 0.) 46 86 else 47 87 do islope = 1,nslope 48 ice_table (ig,islope) = -1.49 88 ice_table_beg(ig,islope) = -1. 89 ice_table_thickness(ig,islope) = 0. 50 90 do isoil = 1,nsoil_PEM 51 91 diff_rho(isoil) = rhowatersurf_ave(ig,islope) - rhowatersoil_ave(ig,isoil,islope) 52 53 92 enddo 54 93 if(diff_rho(1) > 0) then ! ice is at the surface 55 ice_table(ig,islope) = 0. 94 ice_table_beg(ig,islope) = 0. 95 do isoilend = 2,nsoil_PEM-1 96 if((diff_rho(isoilend).gt.0).and.(diff_rho(isoilend+1).lt.0.)) then 97 call findroot(diff_rho(isoilend),diff_rho(isoilend+1),mlayer_PEM(isoilend),mlayer_PEM(isoilend+1),ice_table_end) 98 ice_table_thickness(ig,islope) = ice_table_end - ice_table_beg(ig,islope) 99 exit 100 endif 101 enddo 56 102 else 57 103 do isoil = 1,nsoil_PEM -1 ! general case, we find the ice table depth by doing a linear approximation between the two depth, and then solve the first degree equation to find the root 58 104 if((diff_rho(isoil).lt.0).and.(diff_rho(isoil+1).gt.0.)) then 59 call findroot(diff_rho(isoil),diff_rho(isoil+1),mlayer_PEM(isoil),mlayer_PEM(isoil+1),ice_table(ig,islope)) 60 exit 105 call findroot(diff_rho(isoil),diff_rho(isoil+1),mlayer_PEM(isoil),mlayer_PEM(isoil+1),ice_table_beg(ig,islope)) 106 ! Now let's find the end of the ice table 107 ice_table_thickness(ig,islope) = layer_PEM(nsoil_PEM) ! Let's assume an infinite ice table (true when geothermal flux is set to 0.) 108 do isoilend = isoil+1,nsoil_PEM-1 109 if((diff_rho(isoilend).gt.0).and.(diff_rho(isoilend+1).lt.0.)) then 110 call findroot(diff_rho(isoilend),diff_rho(isoilend+1),mlayer_PEM(isoilend),mlayer_PEM(isoilend+1),ice_table_end) 111 ice_table_thickness(ig,islope) = ice_table_end - ice_table_beg(ig,islope) 112 exit 113 endif 114 enddo 61 115 endif !diff_rho(z) <0 & diff_rho(z+1) > 0 62 116 enddo … … 65 119 endif ! watercaptag 66 120 enddo 121 122 ! Small trick to speed up the convergence, Oded's idea. 123 do islope = 1,nslope 124 do ig = 1,ngrid 125 if((ice_table_beg(ig,islope).gt.previous_icetable_depth(ig,islope)).and.(previous_icetable_depth(ig,islope).ge.0)) then 126 call ice_thermal_properties(.false.,1.,regolith_inertia(ig,islope),wice_inertia) 127 stretch = (regolith_inertia(ig,islope)/wice_inertia)**2 128 129 ice_table_thickness(ig,islope) = ice_table_thickness(ig,islope) + (ice_table_beg(ig,islope) - & 130 previous_icetable_depth(ig,islope)+(ice_table_beg(ig,islope) - previous_icetable_depth(ig,islope))/stretch) 131 ice_table_beg(ig,islope) = previous_icetable_depth(ig,islope)+(ice_table_beg(ig,islope) - previous_icetable_depth(ig,islope))/stretch 132 endif 133 enddo 134 enddo 135 67 136 !======================================================================= 68 137 RETURN … … 70 139 END 71 140 141 72 142 SUBROUTINE find_layering_icetable(porefill,psat_soil,psat_surf,pwat_surf,psat_bottom,B,index_IS,depth_filling,index_filling,index_geothermal,depth_geothermal,dz_etadz_rho) 73 143 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 79 149 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 80 150 use comsoil_h_PEM,only: nsoilmx_PEM,mlayer_PEM 151 use math_mod, only: deriv1,deriv1_onesided,colint,findroot,deriv2_simple 81 152 implicit none 82 153 ! inputs … … 232 303 233 304 234 235 SUBROUTINE findroot(y1,y2,z1,z2,zr)236 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!237 !!!238 !!! Purpose: Compute the root zr, between two values y1 and y2 at depth z1,z2239 !!!240 !!! Author: LL241 !!!242 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!243 244 implicit none245 real,intent(in) :: y1,y2 ! difference between surface water density and at depth [kg/m^3]246 real,intent(in) :: z1,z2 ! depth [m]247 real,intent(out) :: zr ! depth at which we have zero248 zr = (y1*z2 - y2*z1)/(y1-y2)249 RETURN250 end251 252 305 SUBROUTINE constriction(porefill,eta) 253 306 … … 272 325 if (porefill.le.1.) eta = 0. 273 326 return 274 end 275 276 277 278 subroutine deriv1(z,nz,y,y0,ybot,dzY) 279 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 280 !!! 281 !!! Purpose: Compute the first derivative of a function y(z) on an irregular grid 282 !!! 283 !!! Author: From N.S (N.S, Icarus 2010), impletented here by LL 284 !!! 285 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 286 implicit none 287 288 ! first derivative of a function y(z) on irregular grid 289 ! upper boundary conditions: y(0)=y0 290 ! lower boundary condition.: yp = ybottom 291 integer, intent(IN) :: nz ! number of layer 292 real, intent(IN) :: z(nz) ! depth layer 293 real, intent(IN) :: y(nz) ! function which needs to be derived 294 real, intent(IN) :: y0,ybot ! boundary conditions 295 real, intent(OUT) :: dzY(nz) ! derivative of y w.r.t depth 296 ! local 297 integer :: j 298 real :: hm,hp,c1,c2,c3 299 300 hp = z(2)-z(1) 301 c1 = z(1)/(hp*z(2)) 302 c2 = 1/z(1) - 1/(z(2)-z(1)) 303 c3 = -hp/(z(1)*z(2)) 304 dzY(1) = c1*y(2) + c2*y(1) + c3*y0 305 do j=2,nz-1 306 hp = z(j+1)-z(j) 307 hm = z(j)-z(j-1) 308 c1 = +hm/(hp*(z(j+1)-z(j-1))) 309 c2 = 1/hm - 1/hp 310 c3 = -hp/(hm*(z(j+1)-z(j-1))) 311 dzY(j) = c1*y(j+1) + c2*y(j) + c3*y(j-1) 312 enddo 313 dzY(nz) = (ybot - y(nz-1))/(2.*(z(nz)-z(nz-1))) 314 return 315 end subroutine deriv1 316 317 318 319 subroutine deriv2_simple(z,nz,y,y0,yNp1,yp2) 320 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 321 !!! 322 !!! Purpose: Compute the second derivative of a function y(z) on an irregular grid 323 !!! 324 !!! Author: N.S (raw copy/paste from MSIM) 325 !!! 326 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 327 328 ! second derivative y_zz on irregular grid 329 ! boundary conditions: y(0)=y0, y(nz+1)=yNp1 330 implicit none 331 integer, intent(IN) :: nz 332 real, intent(IN) :: z(nz),y(nz),y0,yNp1 333 real, intent(OUT) :: yp2(nz) 334 integer j 335 real hm,hp,c1,c2,c3 336 337 c1 = +2./((z(2)-z(1))*z(2)) 338 c2 = -2./((z(2)-z(1))*z(1)) 339 c3 = +2./(z(1)*z(2)) 340 yp2(1) = c1*y(2) + c2*y(1) + c3*y0 341 342 do j=2,nz-1 343 hp = z(j+1)-z(j) 344 hm = z(j)-z(j-1) 345 c1 = +2./(hp*(z(j+1)-z(j-1))) 346 c2 = -2./(hp*hm) 347 c3 = +2./(hm*(z(j+1)-z(j-1))) 348 yp2(j) = c1*y(j+1) + c2*y(j) + c3*y(j-1) 349 enddo 350 yp2(nz) = (yNp1 - 2*y(nz) + y(nz-1))/(z(nz)-z(nz-1))**2 351 return 352 end subroutine deriv2_simple 353 354 355 356 subroutine deriv1_onesided(j,z,nz,y,dy_zj) 357 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 358 !!! 359 !!! Purpose: First derivative of function y(z) at z(j) one-sided derivative on irregular grid 360 !!! 361 !!! Author: N.S (raw copy/paste from MSIM) 362 !!! 363 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 364 365 implicit none 366 integer, intent(IN) :: nz,j 367 real, intent(IN) :: z(nz),y(nz) 368 real, intent(out) :: dy_zj 369 real h1,h2,c1,c2,c3 370 if (j<1 .or. j>nz-2) then 371 dy_zj = -1. 372 else 373 h1 = z(j+1)-z(j) 374 h2 = z(j+2)-z(j+1) 375 c1 = -(2*h1+h2)/(h1*(h1+h2)) 376 c2 = (h1+h2)/(h1*h2) 377 c3 = -h1/(h2*(h1+h2)) 378 dy_zj = c1*y(j) + c2*y(j+1) + c3*y(j+2) 379 endif 380 return 381 end subroutine deriv1_onesided 382 383 384 subroutine colint(y,z,nz,i1,i2,integral) 385 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 386 !!! 387 !!! Purpose: Column integrates y on irregular grid 388 !!! 389 !!! Author: N.S (raw copy/paste from MSIM) 390 !!! 391 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 392 393 implicit none 394 integer, intent(IN) :: nz, i1, i2 395 real, intent(IN) :: y(nz), z(nz) 396 real,intent(out) :: integral 397 integer i 398 real dz(nz) 399 400 dz(1) = (z(2)-0.)/2 401 do i=2,nz-1 402 dz(i) = (z(i+1)-z(i-1))/2. 403 enddo 404 dz(nz) = z(nz)-z(nz-1) 405 integral = sum(y(i1:i2)*dz(i1:i2)) 406 end subroutine colint 407 408 409 410 411 412 413 end module 327 end subroutine 328 329 330 end module -
trunk/LMDZ.COMMON/libf/evolution/pem.F90
r2944 r2961 104 104 use orbit_param_criterion_mod, only : orbit_param_criterion 105 105 use recomp_orb_param_mod, only: recomp_orb_param 106 use ice_table_mod, only: computeice_table_equilibrium 106 use ice_table_mod, only: porefillingice_depth,porefillingice_thickness,& 107 end_ice_table_porefilling,ini_ice_table_porefilling, & 108 computeice_table_equilibrium 109 use soil_thermalproperties_mod, only: update_soil_thermalproperties 107 110 108 111 … … 223 226 REAL, ALLOCATABLE :: tsurf_ave_yr1(:,:) ! Physic x SLOPE field : Averaged Surface Temperature of first call of the gcm [K] 224 227 REAL, ALLOCATABLE :: inertiesoil(:,:) !Physic x Depth Thermal inertia of the mesh for restart [SI] 225 226 228 REAL, ALLOCATABLE :: TI_GCM(:,:,:) ! Same but for the start 227 228 REAL,ALLOCATABLE :: ice_depth(:,:) ! Physic x SLope: Ice table depth [m]229 229 REAL,ALLOCATABLE :: TI_locslope(:,:) ! Physic x Soil: Intermediate thermal inertia to compute Tsoil [SI] 230 230 REAL,ALLOCATABLE :: Tsoil_locslope(:,:) ! Physic x Soil: intermediate when computing Tsoil [K] … … 535 535 !---------------------------- Initialisation of the PEM soil and values --------------------- 536 536 537 call end_comsoil_h_PEM 538 call ini_comsoil_h_PEM(ngrid,nslope) 539 call end_adsorption_h_PEM 540 call ini_adsorption_h_PEM(ngrid,nslope,nsoilmx_PEM) 541 542 allocate(ice_depth(ngrid,nslope)) 543 ice_depth(:,:) = 0. 537 call end_comsoil_h_PEM 538 call ini_comsoil_h_PEM(ngrid,nslope) 539 call end_adsorption_h_PEM 540 call ini_adsorption_h_PEM(ngrid,nslope,nsoilmx_PEM) 541 call end_ice_table_porefilling 542 call ini_ice_table_porefilling(ngrid,nslope) 544 543 545 544 if(soil_pem) then … … 673 672 !---------------------------- Read the PEMstart --------------------- 674 673 675 call pemetat0("startfi_PEM.nc",ngrid,nsoilmx,nsoilmx_PEM,nslope,timelen,timestep,TI_PEM,tsoil_ave_PEM_yr1,tsoil_PEM, ice_depth, &674 call pemetat0("startfi_PEM.nc",ngrid,nsoilmx,nsoilmx_PEM,nslope,timelen,timestep,TI_PEM,tsoil_ave_PEM_yr1,tsoil_PEM,porefillingice_depth,porefillingice_thickness, & 676 675 tsurf_ave_yr1, tsurf_ave, q_co2_PEM_phys, q_h2o_PEM_phys,ps_timeseries,tsoil_phys_PEM_timeseries,& 677 676 tendencies_h2o_ice,tendencies_co2_ice,co2ice_slope,qsurf_slope(:,igcm_h2o_ice,:),global_ave_press_GCM,& 678 677 watersurf_density_ave,watersoil_density_PEM_ave, & 679 678 co2_adsorbded_phys,delta_co2_adsorbded,h2o_adsorbded_phys,delta_h2o_adsorbded,water_reservoir) 680 681 do ig = 1,ngrid682 do islope = 1,nslope679 680 do ig = 1,ngrid 681 do islope = 1,nslope 683 682 qsurf_slope(ig,igcm_h2o_ice,islope)=qsurf_slope(ig,igcm_h2o_ice,islope)+watercap_slope(ig,islope)+water_reservoir(ig)*cos(pi*def_slope_mean(islope)/180.) 683 enddo 684 684 enddo 685 enddo686 685 687 686 if(adsorption_pem) then … … 987 986 988 987 ! II_d.3 Update the ice table 989 call computeice_table_equilibrium(ngrid,nslope,nsoilmx_PEM,watercaptag,watersurf_density_ave,watersoil_density_PEM_ave,ice_depth) 990 988 call computeice_table_equilibrium(ngrid,nslope,nsoilmx_PEM,watercaptag,watersurf_density_ave,watersoil_density_PEM_ave,TI_PEM(:,1,:),porefillingice_depth,porefillingice_thickness) 991 989 print *, "Update soil propreties" 992 990 993 991 ! II_d.4 Update the soil thermal properties 994 call update_soil (ngrid,nslope,nsoilmx_PEM,tendencies_h2o_ice,qsurf_slope(:,igcm_h2o_ice,:),global_ave_press_new, &995 ice_depth,TI_PEM)992 call update_soil_thermalproperties(ngrid,nslope,nsoilmx_PEM,tendencies_h2o_ice,qsurf_slope(:,igcm_h2o_ice,:),global_ave_press_new, & 993 porefillingice_depth,porefillingice_thickness,TI_PEM) 996 994 997 995 ! II_d.5 Update the mass of the regolith adsorbded … … 1334 1332 1335 1333 call pemdem1("restartfi_PEM.nc",year_iter,nsoilmx_PEM,ngrid,nslope , & 1336 tsoil_PEM, TI_PEM, ice_depth,co2_adsorbded_phys,h2o_adsorbded_phys,water_reservoir) 1334 tsoil_PEM, TI_PEM, porefillingice_depth,porefillingice_thickness, & 1335 co2_adsorbded_phys,h2o_adsorbded_phys,water_reservoir) 1337 1336 1338 1337 call info_run_PEM(year_iter, criterion_stop) -
trunk/LMDZ.COMMON/libf/evolution/pemetat0.F90
r2945 r2961 1 SUBROUTINE pemetat0(filename,ngrid,nsoil_GCM,nsoil_PEM,nslope,timelen,timestep,TI_PEM,tsoil_PEM_yr1,tsoil_PEM,ice_table, &1 SUBROUTINE pemetat0(filename,ngrid,nsoil_GCM,nsoil_PEM,nslope,timelen,timestep,TI_PEM,tsoil_PEM_yr1,tsoil_PEM,ice_table, ice_table_thickness, & 2 2 tsurf_ave_yr1,tsurf_ave_yr2,q_co2,q_h2o,ps_inst,tsoil_inst,tend_h2oglaciers,tend_co2glaciers,co2ice,waterice, & 3 3 global_ave_pressure,watersurf_ave,watersoil_ave, m_co2_regolith_phys,deltam_co2_regolith_phys, & … … 12 12 USE constants_marspem_mod,only: alpha_clap_h2o,beta_clap_h2o, & 13 13 TI_breccia,TI_bedrock 14 use soil_thermalproperties_mod, only: update_soil_thermalproperties 14 15 #ifndef CPP_STD 15 16 use surfdat_h, only: watercaptag … … 43 44 real,intent(inout) :: tsoil_PEM(ngrid,nsoil_PEM,nslope) ! soil (mid-layer) temperature [K] 44 45 real,intent(inout) :: ice_table(ngrid,nslope) ! Ice table depth [m] 46 real,intent(inout) :: ice_table_thickness(ngrid,nslope) ! Ice table thickness [m] 45 47 real,intent(inout) :: tsoil_inst(ngrid,nsoil_PEM,nslope,timelen) ! instantaneous soil (mid-layer) temperature [K] 46 48 real,intent(inout) :: m_co2_regolith_phys(ngrid,nsoil_PEM,nslope) ! mass of co2 adsorbed [kg/m^2] … … 260 262 write(*,*)'PEM settings: failed loading <ice_table>' 261 263 write(*,*)'will reconstruct the values of the ice table given the current state' 262 call computeice_table_equilibrium(ngrid,nslope,nsoil_PEM,watercaptag,watersurf_ave,watersoil_ave, ice_table)263 call update_soil (ngrid,nslope,nsoil_PEM,tend_h2oglaciers,waterice,global_ave_pressure,ice_table,TI_PEM)264 call computeice_table_equilibrium(ngrid,nslope,nsoil_PEM,watercaptag,watersurf_ave,watersoil_ave, TI_PEM(:,1,:),ice_table,ice_table_thickness) 265 call update_soil_thermalproperties(ngrid,nslope,nsoil_PEM,tend_h2oglaciers,waterice,global_ave_pressure,ice_table,ice_table_thickness,TI_PEM) 264 266 do islope = 1,nslope 265 267 call soil_pem_ini(ngrid,nsoil_PEM,TI_PEM(:,:,islope),tsurf_ave_yr2(:,islope),tsoil_PEM(:,:,islope)) … … 453 455 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 454 456 !c) Ice table 455 call computeice_table_equilibrium(ngrid,nslope,nsoil_PEM,watercaptag,watersurf_ave,watersoil_ave, ice_table)456 call update_soil (ngrid,nslope,nsoil_PEM,tend_h2oglaciers,waterice,global_ave_pressure,ice_table,TI_PEM)457 call computeice_table_equilibrium(ngrid,nslope,nsoil_PEM,watercaptag,watersurf_ave,watersoil_ave,TI_PEM(:,1,:),ice_table,ice_table_thickness) 458 call update_soil_thermalproperties(ngrid,nslope,nsoil_PEM,tend_h2oglaciers,waterice,global_ave_pressure,ice_table,ice_table_thickness,TI_PEM) 457 459 do islope = 1,nslope 458 460 call soil_pem_ini(ngrid,nsoil_PEM,TI_PEM(:,:,islope),tsurf_ave_yr2(:,islope),tsoil_PEM(:,:,islope)) -
trunk/LMDZ.COMMON/libf/evolution/pemredem.F90
r2895 r2961 71 71 72 72 subroutine pemdem1(filename,year_iter,nsoil_PEM,ngrid,nslope, & 73 tsoil_slope_PEM,inertiesoil_slope_PEM,ice_table , &73 tsoil_slope_PEM,inertiesoil_slope_PEM,ice_table_depth,ice_table_thickness, & 74 74 m_co2_regolith,m_h2o_regolith,water_reservoir) 75 75 … … 93 93 real,intent(IN) :: tsoil_slope_PEM(ngrid,nsoil_PEM,nslope) !under mesh bining according to slope 94 94 real,intent(IN) :: inertiesoil_slope_PEM(ngrid,nsoil_PEM,nslope) !under mesh bining according to slope 95 real,intent(IN) :: ice_table(ngrid,nslope) !under mesh bining according to slope 95 real,intent(IN) :: ice_table_depth(ngrid,nslope) !under mesh bining according to slope 96 real,intent(IN) :: ice_table_thickness(ngrid,nslope) !under mesh bining according to slope 96 97 integer,intent(IN) :: nslope 97 98 real,intent(in) :: m_co2_regolith(ngrid,nsoil_PEM,nslope) … … 136 137 ENDDO 137 138 138 call put_field("ice_table","Depth of ice table", & 139 ice_table,year_tot) 139 call put_field("ice_table_depth","Depth of ice table", & 140 ice_table_depth,year_tot) 141 142 call put_field("ice_table_thickness","Depth of ice table", & 143 ice_table_thickness,year_tot) 140 144 141 145 call put_field("inertiedat_PEM","Thermal inertie of PEM ", & -
trunk/LMDZ.COMMON/libf/evolution/soil_pem_ini.F90
r2895 r2961 33 33 34 34 ! 0. Initialisations and preprocessing step 35 36 35 37 36 ! 0.1 Build mthermdiff_PEM(:), the mid-layer thermal diffusivities -
trunk/LMDZ.COMMON/libf/evolution/soil_settings_PEM.F
r2895 r2961 92 92 ! 3. Index for subsurface layering 93 93 ! ------------------ 94 write(*,*) 'depth=',depth_breccia,depth_bedrock95 94 index_breccia= 1 96 95 do iloop = 1,nsoil_PEM-1
Note: See TracChangeset
for help on using the changeset viewer.