Changeset 4174 for trunk/LMDZ.COMMON/libf/evolution/pem.F90
- Timestamp:
- Apr 8, 2026, 11:36:16 AM (3 days ago)
- File:
-
- 1 edited
-
trunk/LMDZ.COMMON/libf/evolution/pem.F90 (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/evolution/pem.F90
r4170 r4174 33 33 use display, only: print_ini, print_end, print_msg, LVL_NFO, LVL_WRN 34 34 use evolution, only: n_yr_run, n_yr_sim, ntot_yr_sim, nmax_yr_run, dt, idt, r_plnt2earth_yr, pem_ini_date 35 use geometry, only: ngrid, nslope, n day, nsoil_PCM, nsoil, cell_area, total_surface35 use geometry, only: ngrid, nslope, nsoil_PCM, nsoil, cell_area, total_surface 36 36 use glaciers, only: h2oice_flow, co2ice_flow, flow_co2glaciers, flow_h2oglaciers 37 37 use ice_table, only: icetable_equilibrium, icetable_dynamic, evolve_ice_table … … 48 48 use soil_therm_inertia, only: update_soil_TI 49 49 use sorption, only: do_sorption, compute_totmass_adsorbed, evolve_regolith_adsorption 50 use stopping_crit, only: stopFlags, stopping_crit_pressure, stopping_crit_h2o , stopping_crit_h2oice, stopping_crit_co2ice50 use stopping_crit, only: stopFlags, stopping_crit_pressure, stopping_crit_h2oice, stopping_crit_co2ice 51 51 use surface, only: emissivity_PCM 52 use surf_ice, only: evolve_co2ice, evolve_h2oice, balance_h2o ice_reservoirs52 use surf_ice, only: evolve_co2ice, evolve_h2oice, balance_h2o_fluxes 53 53 use surf_temp, only: tsurf_PCM, adapt_tsurf2disappearedice 54 54 use tendencies, only: compute_tendice, evolve_tend_co2ice, evolve_flux_ssice … … 80 80 real(dp), dimension(:,:), allocatable :: zshift_surf ! Elevation shift for the surface [m] 81 81 real(dp), dimension(:,:), allocatable :: zlag ! Newly built lag thickness [m] 82 ! Tendency-related:83 real(dp), dimension(:,:), allocatable :: d_h2oice_new ! Adjusted tendency of perennial H2O ice to keep balance between donor and recipient [kg/m2/y]84 82 ! Layering-related: 85 83 type(ptrarray), dimension(:,:), allocatable :: current ! Current active stratum in the layering … … 95 93 real(qp) :: totmass_ini ! Initial total CO2 mass [kg] 96 94 real(qp) :: totmass_adsh2o ! Current total adsorbed H2O mass [kg] 97 real(qp) :: S_atm_2_h2o, S_h2o_2_atm, S_atm_2_h2oice, S_h2oice_2_atm ! Variables to balance H2O ice reservoirs98 95 99 96 ! CODE … … 235 232 allocate(zshift_surf(ngrid,nslope),zlag(ngrid,nslope)) 236 233 if (do_layering) then 237 allocate(d_h2oice_new(ngrid,nslope))238 234 h2oice_depth_old(:,:) = h2oice_depth(:,:) 239 235 ! The sublimating tendency coming from subsurface ice is given through the surface ice tendency … … 241 237 do islope = 1,nslope 242 238 do i = 1,ngrid 243 call evolve_layering(layerings_map(i,islope),d_co2ice(i,islope),d_h2oice _new(i,islope),new_str(i,islope),zshift_surf(i,islope),new_lag(i,islope),zlag(i,islope),current(i,islope)%p)239 call evolve_layering(layerings_map(i,islope),d_co2ice(i,islope),d_h2oice(i,islope),new_str(i,islope),zshift_surf(i,islope),new_lag(i,islope),zlag(i,islope),current(i,islope)%p) 244 240 call print_layering(layerings_map(i,islope)) 245 241 end do … … 248 244 call layering2surfice(layerings_map,h2o_ice,co2_ice,h2oice_depth) 249 245 ! Balance H2O ice reservoirs 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 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) 252 deallocate(d_h2oice_new) 246 call balance_h2o_fluxes(delta_h2o_ads,delta_icetable,h2o_ice,d_h2oice,stopcrit) 247 if (stopcrit%stop_code() > 0) then 248 deallocate(zshift_surf,zlag) 249 call print_msg(stopcrit%stop_message(),LVL_NFO) 250 exit 251 end if 253 252 else 254 253 zlag(:,:) = 0._dp … … 376 375 if (backup_rate > 0) then 377 376 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, & 378 icetable_depth,icetable_thickness,ice_porefilling,h2oice_depth, flux_ssice_avg,h2o_ads_reg,co2_ads_reg,layerings_map,idt)377 icetable_depth,icetable_thickness,ice_porefilling,h2oice_depth,h2o_ads_reg,co2_ads_reg,layerings_map,idt) 379 378 end if 380 379 … … 408 407 409 408 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, & 410 icetable_depth,icetable_thickness,ice_porefilling,h2oice_depth, flux_ssice_avg,h2o_ads_reg,co2_ads_reg,layerings_map)409 icetable_depth,icetable_thickness,ice_porefilling,h2oice_depth,h2o_ads_reg,co2_ads_reg,layerings_map) 411 410 412 411 ! Update the duration information of the workflow
Note: See TracChangeset
for help on using the changeset viewer.
