Changeset 3532 for trunk/LMDZ.COMMON/libf/evolution/pemetat0.F90
- Timestamp:
- Dec 4, 2024, 4:04:54 PM (3 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/evolution/pemetat0.F90
r3525 r3532 45 45 real, intent(in) :: global_avg_pressure ! mean average pressure on the planet [Pa] 46 46 real, dimension(ngrid,nslope), intent(in) :: tsurf_avg_yr1 ! surface temperature at the first year of PCM call [K] 47 real, dimension(ngrid,nslope), intent(in) :: tsurf_avg_yr2 ! surface temperature at the second 47 real, dimension(ngrid,nslope), intent(in) :: tsurf_avg_yr2 ! surface temperature at the second year of PCM call [K] 48 48 real, dimension(ngrid,timelen), intent(in) :: q_co2 ! MMR tracer co2 [kg/kg] 49 49 real, dimension(ngrid,timelen), intent(in) :: q_h2o ! MMR tracer h2o [kg/kg] … … 281 281 call compute_tsoil_pem(ngrid,nsoil_PEM,.true.,TI_PEM(:,:,islope),timestep,tsurf_avg_yr2(:,islope),tsoil_PEM(:,:,islope)) 282 282 else 283 ! predictor corrector: restart from year 1 of the PCM and build the evolution of 284 ! tsoil at depth 283 ! predictor corrector: restart from year 1 of the PCM and build the evolution of tsoil at depth 285 284 tsoil_tmp_yr1(:,:,islope) = tsoil_startPEM(:,:,islope) 286 285 call compute_tsoil_pem(ngrid,nsoil_PEM,.true.,TI_PEM(:,:,islope),timestep,tsurf_avg_yr1(:,islope),tsoil_tmp_yr1(:,:,islope)) … … 289 288 call compute_tsoil_pem(ngrid,nsoil_PEM,.false.,TI_PEM(:,:,islope),timestep,tsurf_avg_yr2(:,islope),tsoil_tmp_yr2(:,:,islope)) 290 289 291 do iloop = nsoil_PCM +1,nsoil_PEM290 do iloop = nsoil_PCM + 1,nsoil_PEM 292 291 tsoil_PEM(:,iloop,islope) = tsoil_tmp_yr2(:,iloop,islope) 293 292 enddo … … 295 294 296 295 do it = 1,timelen 297 do isoil = nsoil_PCM+1,nsoil_PEM 298 tsoil_inst(:,isoil,islope,it) = tsoil_PEM(:,isoil,islope) 299 enddo 300 enddo 301 do isoil = nsoil_PCM+1,nsoil_PEM 302 do ig = 1,ngrid 303 watersoil_avg(ig,isoil,islope) = exp(beta_clap_h2o/tsoil_PEM(ig,isoil,islope) + alpha_clap_h2o)/tsoil_PEM(ig,isoil,islope)*mmol(igcm_h2o_vap)/(mugaz*r) 304 enddo 296 tsoil_inst(:,nsoil_PCM + 1:nsoil_PEM,islope,it) = tsoil_PEM(:,nsoil_PCM + 1:nsoil_PEM,islope) 297 enddo 298 do isoil = nsoil_PCM + 1,nsoil_PEM 299 watersoil_avg(:,isoil,islope) = exp(beta_clap_h2o/tsoil_PEM(:,isoil,islope) + alpha_clap_h2o)/tsoil_PEM(:,isoil,islope)*mmol(igcm_h2o_vap)/(mugaz*r) 305 300 enddo 306 301 enddo ! islope … … 314 309 write(*,*)'PEM settings: failed loading <ice_table_depth>' 315 310 write(*,*)'will reconstruct the values of the ice table given the current state' 316 call computeice_table_equilibrium(ngrid,nslope,nsoil_PEM,watercaptag,watersurf_avg,watersoil_avg, 311 call computeice_table_equilibrium(ngrid,nslope,nsoil_PEM,watercaptag,watersurf_avg,watersoil_avg,TI_PEM(:,1,:),ice_table_depth,ice_table_thickness) 317 312 call update_soil_thermalproperties(ngrid,nslope,nsoil_PEM,d_h2oice,h2o_ice,global_avg_pressure,ice_table_depth,ice_table_thickness,ice_porefilling,icetable_equilibrium,icetable_dynamic,TI_PEM) 318 313 do islope = 1,nslope … … 322 317 write(*,*) 'PEMETAT0: ICE TABLE done' 323 318 else if (icetable_dynamic) then 319 call get_field("ice_porefilling",ice_porefilling,found) 320 if (.not. found) then 321 write(*,*)'PEM settings: failed loading <ice_porefilling>' 322 ice_porefilling = 0. 323 endif 324 324 call get_field("ice_table_depth",ice_table_depth,found) 325 325 if (.not. found) then … … 331 331 call ini_tsoil_pem(ngrid,nsoil_PEM,TI_PEM(:,:,islope),tsurf_avg_yr2(:,islope),tsoil_PEM(:,:,islope)) 332 332 enddo 333 endif334 call get_field("ice_porefilling",ice_porefilling,found)335 if (.not. found) then336 write(*,*)'PEM settings: failed loading <ice_porefilling>'337 ice_porefilling = 1.338 333 endif 339 334 write(*,*) 'PEMETAT0: ICE TABLE done' … … 510 505 write(*,*) 'PEMETAT0: Ice table done' 511 506 else if (icetable_dynamic) then 512 ice_porefilling = 1.507 ice_porefilling = 0. 513 508 ice_table_depth = -9999. 514 509 call update_soil_thermalproperties(ngrid,nslope,nsoil_PEM,d_h2oice,h2o_ice,global_avg_pressure,ice_table_depth,ice_table_thickness,ice_porefilling,icetable_equilibrium,icetable_dynamic,TI_PEM) … … 518 513 write(*,*) 'PEMETAT0: Ice table done' 519 514 endif 520 515 521 516 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 522 517 !d) Regolith adsorbed
Note: See TracChangeset
for help on using the changeset viewer.