Changeset 4170 for trunk/LMDZ.COMMON/libf/evolution/pem.F90
- Timestamp:
- Apr 3, 2026, 4:34:51 PM (8 days ago)
- File:
-
- 1 edited
-
trunk/LMDZ.COMMON/libf/evolution/pem.F90 (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/evolution/pem.F90
r4157 r4170 52 52 use surf_ice, only: evolve_co2ice, evolve_h2oice, balance_h2oice_reservoirs 53 53 use surf_temp, only: tsurf_PCM, adapt_tsurf2disappearedice 54 use tendencies, only: compute_tendice, evolve_tend_co2ice, evolve_ tend_h2oice54 use tendencies, only: compute_tendice, evolve_tend_co2ice, evolve_flux_ssice 55 55 use tracers, only: adapt_tracers2pressure 56 56 use utility, only: real2str … … 72 72 logical(k4), dimension(:,:), allocatable :: is_co2ice_flow ! Flag for location of CO2 glacier flow 73 73 logical(k4), dimension(:,:), allocatable :: is_h2oice_flow ! Flag for location of H2O glacier flow 74 real(dp), dimension(:,:,:), allocatable :: minPCM_h2operice ! Minimum of H2O perennial ice over the last PCM year [kg .m-2]75 real(dp), dimension(:,:,:), allocatable :: minPCM_co2perice ! Minimum of CO2 perennial ice over the last PCM year [kg .m-2]76 real(dp), dimension(:,:,:), allocatable :: minPCM_h2ofrost ! Minimum of H2O frost over the last PCM year [kg .m-2]77 real(dp), dimension(:,:,:), allocatable :: minPCM_co2frost ! Minimum of CO2 frost over the last PCM year [kg .m-2]74 real(dp), dimension(:,:,:), allocatable :: minPCM_h2operice ! Minimum of H2O perennial ice over the last PCM year [kg/m2] 75 real(dp), dimension(:,:,:), allocatable :: minPCM_co2perice ! Minimum of CO2 perennial ice over the last PCM year [kg/m2] 76 real(dp), dimension(:,:,:), allocatable :: minPCM_h2ofrost ! Minimum of H2O frost over the last PCM year [kg/m2] 77 real(dp), dimension(:,:,:), allocatable :: minPCM_co2frost ! Minimum of CO2 frost over the last PCM year [kg/m2] 78 78 ! Surface-related: 79 79 real(dp), dimension(:,:), allocatable :: tsurf_avg_yr1 ! Average surface temperature of the second to last PCM run [K] … … 141 141 142 142 call load_xios_data(ps_avg,ps_ts,tsurf_avg,tsurf_avg_yr1,tsoil_avg,tsoil_ts,h2o_surfdensity_avg,h2o_soildensity_avg, & 143 q_h2o_ts,q_co2_ts,minPCM_h2operice,minPCM_co2perice,minPCM_h2ofrost,minPCM_co2frost )143 q_h2o_ts,q_co2_ts,minPCM_h2operice,minPCM_co2perice,minPCM_h2ofrost,minPCM_co2frost,flux_ssice_avg) 144 144 145 145 ! Initiate soil settings and TI … … 169 169 call print_msg('> Computing surface ice tendencies',LVL_NFO) 170 170 call compute_tendice(minPCM_h2operice,minPCM_h2ofrost,h2o_ice,d_h2oice) 171 call print_msg('H2O ice tendencies [kg/m2/y r] (min|max): '//real2str(minval(d_h2oice))//' | '//real2str(maxval(d_h2oice)),LVL_NFO)171 call print_msg('H2O ice tendencies [kg/m2/y] (min|max): '//real2str(minval(d_h2oice))//' | '//real2str(maxval(d_h2oice)),LVL_NFO) 172 172 call compute_tendice(minPCM_co2perice,minPCM_co2frost,co2_ice,d_co2ice) 173 call print_msg('CO2 ice tendencies [kg/m2/y r] (min|max): '//real2str(minval(d_co2ice))//' | '//real2str(maxval(d_co2ice)),LVL_NFO)173 call print_msg('CO2 ice tendencies [kg/m2/y] (min|max): '//real2str(minval(d_co2ice))//' | '//real2str(maxval(d_co2ice)),LVL_NFO) 174 174 deallocate(minPCM_h2operice,minPCM_co2perice,minPCM_h2ofrost,minPCM_co2frost) 175 175 … … 220 220 ! Conversion to surface ice 221 221 call layering2surfice(layerings_map,h2o_ice,co2_ice,h2oice_depth) 222 ! We put the sublimating tendency coming from subsurface ice into the overall tendency223 !where (h2oice_depth > 0. .and. zdqsdif_ssi_tot < -minieps) d_h2oice = zdqsdif_ssi_tot224 222 end if 225 223 call allocate_loop_state() … … 227 225 idt = 0 228 226 do while (n_yr_run < min(nmax_yr_runorb,nmax_yr_run) .and. n_yr_sim < ntot_yr_sim) 229 call print_msg('**** Iteration of the PEM run [plnt y r]: '//real2str(n_yr_run + dt),LVL_NFO)227 call print_msg('**** Iteration of the PEM run [plnt y]: '//real2str(n_yr_run + dt),LVL_NFO) 230 228 ! Evolve global surface pressure 231 229 call evolve_pressure(d_co2ice,delta_co2_ads,do_sorption,ps_avg_glob_old,ps_avg_glob,ps_avg) … … 237 235 allocate(zshift_surf(ngrid,nslope),zlag(ngrid,nslope)) 238 236 if (do_layering) then 237 allocate(d_h2oice_new(ngrid,nslope)) 239 238 h2oice_depth_old(:,:) = h2oice_depth(:,:) 239 ! The sublimating tendency coming from subsurface ice is given through the surface ice tendency 240 where (h2oice_depth(:,:) > 0. .and. flux_ssice_avg(:,:) < 0._dp) d_h2oice(:,:) = flux_ssice_avg(:,:) 240 241 do islope = 1,nslope 241 242 do i = 1,ngrid … … 247 248 call layering2surfice(layerings_map,h2o_ice,co2_ice,h2oice_depth) 248 249 ! Balance H2O ice reservoirs 249 allocate(d_h2oice_new(ngrid,nslope))250 250 call stopping_crit_h2o(delta_h2o_ads,delta_icetable,h2o_ice,d_h2oice,S_atm_2_h2o,S_h2o_2_atm,S_atm_2_h2oice,S_h2oice_2_atm,stopcrit) 251 251 call balance_h2oice_reservoirs(S_atm_2_h2o,S_h2o_2_atm,S_atm_2_h2oice,S_h2oice_2_atm,h2o_ice,d_h2oice,d_h2oice_new) … … 253 253 else 254 254 zlag(:,:) = 0._dp 255 zshift_surf(:,:) = 0._dp 255 256 call evolve_h2oice(delta_h2o_ads,delta_icetable,h2o_ice,d_h2oice,zshift_surf,stopcrit) 256 257 call evolve_co2ice(co2_ice,d_co2ice,zshift_surf) … … 306 307 write(num,'("_slope",i2.2)') islope 307 308 end if 308 call write_diagevo('h2oice'//trim(num),'H2O ice','kg .m-2',h2o_ice(:,islope),(/dim_ngrid/))309 call write_diagevo('co2ice'//trim(num),'CO2 ice','kg .m-2',co2_ice(:,islope),(/dim_ngrid/))310 call write_diagevo('d_h2oice'//trim(num),'H2O ice tendency','kg .m-2.yr-1',d_h2oice(:,islope),(/dim_ngrid/))311 call write_diagevo('d_co2ice'//trim(num),'CO2 ice tendency','kg .m-2.yr-1',d_co2ice(:,islope),(/dim_ngrid/))309 call write_diagevo('h2oice'//trim(num),'H2O ice','kg/m2',h2o_ice(:,islope),(/dim_ngrid/)) 310 call write_diagevo('co2ice'//trim(num),'CO2 ice','kg/m2',co2_ice(:,islope),(/dim_ngrid/)) 311 call write_diagevo('d_h2oice'//trim(num),'H2O ice tendency','kg/m2/y',d_h2oice(:,islope),(/dim_ngrid/)) 312 call write_diagevo('d_co2ice'//trim(num),'CO2 ice tendency','kg/m2/y',d_co2ice(:,islope),(/dim_ngrid/)) 312 313 if (co2ice_flow) then 313 314 call write_diagevo('Flow_co2ice'//trim(num),'CO2 ice flow location','T/F',merge(1._dp,0._dp,is_co2ice_flow(:,islope)),(/dim_ngrid/)) … … 328 329 call write_diagevo('inertiesoil'//trim(num),'Thermal inertia','SI',TI(:,:,islope),(/dim_ngrid,dim_nsoil/)) 329 330 if (do_sorption) then 330 call write_diagevo('co2_ads_reg'//trim(num),'CO2 adsorbed in regolith','kg .m-2',co2_ads_reg(:,:,islope),(/dim_ngrid,dim_nsoil/))331 call write_diagevo('h2o_ads_reg'//trim(num),'H2O adsorbed in regolith','kg .m-2',h2o_ads_reg(:,:,islope),(/dim_ngrid,dim_nsoil/))331 call write_diagevo('co2_ads_reg'//trim(num),'CO2 adsorbed in regolith','kg/m2',co2_ads_reg(:,:,islope),(/dim_ngrid,dim_nsoil/)) 332 call write_diagevo('h2o_ads_reg'//trim(num),'H2O adsorbed in regolith','kg/m2',h2o_ads_reg(:,:,islope),(/dim_ngrid,dim_nsoil/)) 332 333 end if 333 334 end if … … 361 362 ! Evolve the tendencies 362 363 call evolve_tend_co2ice(d_co2ice_ini,co2_ice,emissivity_PCM,q_co2_ts_ini,q_co2_ts,ps_ts,ps_avg_glob_ini,ps_avg_glob,d_co2ice) 363 !~ if (do_layering) then 364 !~ do i = 1,ngrid 365 !~ do islope = 1,nslope 366 !~ if (is_h2oice_sublim_ini(i,islope) .and. h2oice_depth(i,islope) > 0._dp) call evolve_tend_h2oice(h2oice_depth_old(i,islope),h2oice_depth(i,islope),tsurf_avg(i,islope),tsoil_ts_old(i,:,islope,:),tsoil_ts(i,:,islope,:),d_h2oice(i,islope)) 367 !~ end do 368 !~ end do 369 ! else 370 ! do i = 1,ngrid 371 ! do islope = 1,nslope 372 ! call evolve_tend_h2oice(icetable_depth_old(i,islope),icetable_depth(i,islope),tsurf_avg(i,islope),tsoil_ts_old(i,:,islope,:),tsoil_ts(i,:,islope,:),d_h2oice(i,islope)) 373 ! end do 374 ! end do 375 !~ end if 364 if (do_layering) then 365 call evolve_flux_ssice(h2oice_depth_old,h2oice_depth,tsurf_avg,tsoil_ts_old,tsoil_ts,flux_ssice_avg) 366 else if (icetable_equilibrium .or. icetable_dynamic) then 367 call evolve_flux_ssice(icetable_depth_old,icetable_depth,tsurf_avg,tsoil_ts_old,tsoil_ts,flux_ssice_avg) 368 end if 376 369 377 370 ! Increment time … … 383 376 if (backup_rate > 0) then 384 377 if (mod(idt,backup_rate) == 0) call save_clim_state(h2o_ice,co2_ice,tsurf_avg,tsurf_dev,tsoil_avg,tsoil_dev,ps_avg,ps_dev,ps_avg_glob,ps_avg_glob_ini, & 385 icetable_depth,icetable_thickness,ice_porefilling,h2o _ads_reg,co2_ads_reg,layerings_map,idt)378 icetable_depth,icetable_thickness,ice_porefilling,h2oice_depth,flux_ssice_avg,h2o_ads_reg,co2_ads_reg,layerings_map,idt) 386 379 end if 387 380 … … 415 408 416 409 call save_clim_state(h2o_ice,co2_ice,tsurf_avg,tsurf_dev,tsoil_avg,tsoil_dev,ps_avg,ps_dev,ps_avg_glob,ps_avg_glob_ini, & 417 icetable_depth,icetable_thickness,ice_porefilling,h2o _ads_reg,co2_ads_reg,layerings_map)410 icetable_depth,icetable_thickness,ice_porefilling,h2oice_depth,flux_ssice_avg,h2o_ads_reg,co2_ads_reg,layerings_map) 418 411 419 412 ! Update the duration information of the workflow
Note: See TracChangeset
for help on using the changeset viewer.
