Changeset 4071 for trunk/LMDZ.COMMON/libf/evolution/pem.F90
- Timestamp:
- Feb 16, 2026, 10:28:56 AM (12 days ago)
- File:
-
- 1 edited
-
trunk/LMDZ.COMMON/libf/evolution/pem.F90 (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/evolution/pem.F90
r4068 r4071 48 48 use surf_ice, only: evolve_co2ice, evolve_h2oice, balance_h2oice_reservoirs, build4PCM_perice 49 49 use surf_temp, only: tsurf_PCM, adapt_tsurf2disappearedice, build4PCM_tsurf 50 use tendencies, only: evolve_tend_co2, evolve_tend_h2o50 use tendencies, only: compute_tendice, evolve_tend_co2ice, evolve_tend_h2oice 51 51 use tracers, only: adapt_tracers2pressure, build4PCM_tracers, nq 52 52 use utility, only: real2str … … 77 77 real(dp) :: preff4PCM ! Reference pressure [Pa] 78 78 ! Ice-related: 79 real(dp), dimension(:,:), allocatable :: h2o_ice ! H2O ice [kg.m-2] 80 real(dp), dimension(:,:), allocatable :: co2_ice ! CO2 ice [kg.m-2] 81 real(dp) :: h2oice_sublim_coverage_ini ! Initial surface area of sublimating H2O ice [m2] 82 real(dp) :: co2ice_sublim_coverage_ini ! Initial surface area of sublimating CO2 ice [m2] 83 logical(k4), dimension(:,:), allocatable :: is_h2oice_ini ! Initial location of H2O ice 84 logical(k4), dimension(:,:), allocatable :: is_co2ice_ini ! Initial location of CO2 ice 85 logical(k4), dimension(:,:), allocatable :: is_co2ice_flow ! Flag for location of CO2 glacier flow 86 logical(k4), dimension(:,:), allocatable :: is_h2oice_flow ! Flag for location of H2O glacier flow 87 real(dp), dimension(:,:), allocatable :: h2o_ice4PCM ! H2O ice reconstruction to feed back into PCM [kg.m-2] 88 real(dp), dimension(:,:), allocatable :: co2_ice4PCM ! CO2 ice reconstruction to feed back into PCM [kg.m-2] 89 logical(k4), dimension(:), allocatable :: is_h2o_perice ! Location of H2O infinite reservoir, called 'watercaptag' in PCM 90 logical(k4), dimension(:,:), allocatable :: is_co2ice_disappeared ! Flag to check if CO2 ice disappeared at the previous timestep 79 real(dp), dimension(:,:), allocatable :: h2o_ice ! H2O ice [kg.m-2] 80 real(dp), dimension(:,:), allocatable :: co2_ice ! CO2 ice [kg.m-2] 81 real(dp) :: h2oice_sublim_coverage_ini ! Initial surface area of sublimating H2O ice [m2] 82 real(dp) :: co2ice_sublim_coverage_ini ! Initial surface area of sublimating CO2 ice [m2] 83 logical(k4), dimension(:,:), allocatable :: is_h2oice_ini ! Initial location of H2O ice 84 logical(k4), dimension(:,:), allocatable :: is_co2ice_ini ! Initial location of CO2 ice 85 logical(k4), dimension(:,:), allocatable :: is_co2ice_flow ! Flag for location of CO2 glacier flow 86 logical(k4), dimension(:,:), allocatable :: is_h2oice_flow ! Flag for location of H2O glacier flow 87 real(dp), dimension(:,:,:), allocatable :: minPCM_h2operice ! Minimum of H2O perennial ice over the last PCM year [kg.m-2] 88 real(dp), dimension(:,:,:), allocatable :: minPCM_co2perice ! Minimum of CO2 perennial ice over the last PCM year [kg.m-2] 89 real(dp), dimension(:,:,:), allocatable :: minPCM_h2ofrost ! Minimum of H2O frost over the last PCM year [kg.m-2] 90 real(dp), dimension(:,:,:), allocatable :: minPCM_co2frost ! Minimum of CO2 frost over the last PCM year [kg.m-2] 91 real(dp), dimension(:,:), allocatable :: h2o_ice4PCM ! H2O ice reconstruction to feed back into PCM [kg.m-2] 92 real(dp), dimension(:,:), allocatable :: co2_ice4PCM ! CO2 ice reconstruction to feed back into PCM [kg.m-2] 93 logical(k4), dimension(:), allocatable :: is_h2o_perice ! Location of H2O infinite reservoir, called 'watercaptag' in PCM 94 logical(k4), dimension(:,:), allocatable :: is_co2ice_disappeared ! Flag to check if CO2 ice disappeared at the previous timestep 91 95 ! Surface-related: 92 96 real(dp), dimension(:,:), allocatable :: tsurf_avg ! Average surface temperature [K] … … 179 183 allocate(tsoil_avg(ngrid,nsoil,nslope),tsoil_ts(ngrid,nsoil,nslope,nday),h2o_soildensity_avg(ngrid,nsoil,nslope)) 180 184 allocate(q_h2o_ts(ngrid,nday),q_co2_ts(ngrid,nday)) 181 allocate( d_h2oice(ngrid,nslope),d_co2ice(ngrid,nslope))185 allocate(minPCM_h2operice(ngrid,nslope,2),minPCM_co2perice(ngrid,nslope,2),minPCM_h2ofrost(ngrid,nslope,2),minPCM_co2frost(ngrid,nslope,2)) 182 186 183 187 call load_xios_data(ps_avg,ps_ts,tsurf_avg,tsurf_avg_yr1,tsoil_avg,tsoil_ts,h2o_surfdensity_avg,h2o_soildensity_avg, & 184 q_h2o_ts,q_co2_ts, d_h2oice,d_co2ice)188 q_h2o_ts,q_co2_ts,minPCM_h2operice,minPCM_co2perice,minPCM_h2ofrost,minPCM_co2frost) 185 189 186 190 ! Initiate soil settings and TI … … 207 211 h2o_ads_reg,co2_ads_reg,delta_h2o_ads,delta_co2_ads) 208 212 deallocate(tsurf_avg_yr1) 213 214 ! Compute ice tendencies from yearly minima 215 allocate(d_h2oice(ngrid,nslope),d_co2ice(ngrid,nslope)) 216 call print_msg('> Computing surface ice tendencies') 217 call compute_tendice(minPCM_h2operice + minPCM_h2ofrost,h2o_ice(:,:) > 0._dp,d_h2oice) 218 call print_msg('H2O ice tendencies [kg/m2/yr] (min|max): '//real2str(minval(d_h2oice))//' | '//real2str(maxval(d_h2oice))) 219 call compute_tendice(minPCM_co2perice + minPCM_co2frost,co2_ice(:,:) > 0._dp,d_co2ice) 220 call print_msg('CO2 ice tendencies [kg/m2/yr] (min|max): '//real2str(minval(d_co2ice))//' | '//real2str(maxval(d_co2ice))) 221 deallocate(minPCM_h2operice,minPCM_co2perice,minPCM_h2ofrost,minPCM_co2frost) 209 222 210 223 ! Save initial set-up useful for the next computations … … 290 303 ! Conversion to surface ice 291 304 call layering2surfice(layerings_map,h2o_ice,co2_ice,h2oice_depth) 305 ! Balance H2O ice reservoirs 306 allocate(d_h2oice_new(ngrid,nslope)) 307 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) 308 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) 309 deallocate(d_h2oice_new) 292 310 else 293 311 zlag(:,:) = 0._dp 294 312 call evolve_h2oice(delta_h2o_ads,delta_icetable,h2o_ice,d_h2oice,zshift_surf,stopcrit) 295 313 call evolve_co2ice(co2_ice,d_co2ice,zshift_surf) 296 end if297 298 if (do_layering) then299 allocate(d_h2oice_new(ngrid,nslope))300 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)301 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)302 deallocate(d_h2oice_new)303 314 end if 304 315 … … 406 417 407 418 ! Evolve the tendencies 408 call evolve_tend_co2(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) 409 !~ call print_msg("> Updating the H2O sub-surface ice tendency due to lag layer") 419 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) 410 420 !~ if (do_layering) then 411 421 !~ do i = 1,ngrid 412 422 !~ do islope = 1,nslope 413 !~ if (is_h2oice_sublim_ini(i,islope) .and. h2oice_depth(i,islope) > 0._dp) call evolve_tend_h2o (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))423 !~ 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)) 414 424 !~ end do 415 425 !~ end do … … 417 427 ! do i = 1,ngrid 418 428 ! do islope = 1,nslope 419 ! call evolve_tend_h2o (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))429 ! 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)) 420 430 ! end do 421 431 ! end do
Note: See TracChangeset
for help on using the changeset viewer.
