Changeset 4140 for trunk/LMDZ.COMMON/libf/evolution
- Timestamp:
- Mar 18, 2026, 1:56:02 PM (3 weeks ago)
- Location:
- trunk/LMDZ.COMMON/libf/evolution
- Files:
-
- 3 edited
-
changelog.txt (modified) (1 diff)
-
pem.F90 (modified) (2 diffs)
-
tendencies.F90 (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/evolution/changelog.txt
r4139 r4140 927 927 == 18/03/2026 == JBC 928 928 Partial reversion of r4138: relocating "job_mod" to "LMDZ.COMMON/libf/misc/" because "parse_arg_mod" needs to know "job_mod" even if it is not the PEM. 929 930 == 18/03/2026 == JBC 931 Fix to avoid building large temporary arrays in the arguments evaluation of "compute_tendice" which caused memory to stall. -
trunk/LMDZ.COMMON/libf/evolution/pem.F90
r4139 r4140 210 210 allocate(d_h2oice(ngrid,nslope),d_co2ice(ngrid,nslope)) 211 211 call print_msg('> Computing surface ice tendencies',LVL_NFO) 212 call compute_tendice(minPCM_h2operice + minPCM_h2ofrost,h2o_ice(:,:) > 0._dp,d_h2oice)212 call compute_tendice(minPCM_h2operice,minPCM_h2ofrost,h2o_ice,d_h2oice) 213 213 call print_msg('H2O ice tendencies [kg/m2/yr] (min|max): '//real2str(minval(d_h2oice))//' | '//real2str(maxval(d_h2oice)),LVL_NFO) 214 call compute_tendice(minPCM_co2perice + minPCM_co2frost,co2_ice(:,:) > 0._dp,d_co2ice)214 call compute_tendice(minPCM_co2perice,minPCM_co2frost,co2_ice,d_co2ice) 215 215 call print_msg('CO2 ice tendencies [kg/m2/yr] (min|max): '//real2str(minval(d_co2ice))//' | '//real2str(maxval(d_co2ice)),LVL_NFO) 216 216 deallocate(minPCM_h2operice,minPCM_co2perice,minPCM_h2ofrost,minPCM_co2frost) … … 433 433 434 434 ! Save periodic backups of restart files 435 if (backup_rate > 0 .and. mod(idt,backup_rate) == 0) then436 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, &437 icetable_depth,icetable_thickness,ice_porefilling,h2o_ads_reg,co2_ads_reg,layerings_map,idt)435 if (backup_rate > 0) then 436 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, & 437 icetable_depth,icetable_thickness,ice_porefilling,h2o_ads_reg,co2_ads_reg,layerings_map,idt) 438 438 end if 439 439 -
trunk/LMDZ.COMMON/libf/evolution/tendencies.F90
r4135 r4140 28 28 29 29 !======================================================================= 30 SUBROUTINE compute_tendice(min_ ice,is_perice,d_ice)30 SUBROUTINE compute_tendice(min_perice,min_frost,perice,d_ice) 31 31 !----------------------------------------------------------------------- 32 32 ! NAME … … 51 51 ! ARGUMENTS 52 52 ! --------- 53 real(dp), dimension(:,:,:), intent(in) :: min_ice 54 logical(k4), dimension(:,:), intent(in) :: is_perice 55 real(dp), dimension(:,:), intent(out) :: d_ice 53 real(dp), dimension(:,:,:), intent(in) :: min_perice 54 real(dp), dimension(:,:,:), intent(in) :: min_frost 55 real(dp), dimension(:,:), intent(in) :: perice 56 real(dp), dimension(:,:), intent(out) :: d_ice 56 57 57 58 ! CODE 58 59 ! ---- 59 60 ! We compute the difference to get the tendency 60 d_ice(:,:) = min_ ice(:,:,2) - min_ice(:,:,1)61 d_ice(:,:) = min_perice(:,:,2) + min_frost(:,:,2) - (min_perice(:,:,1) + min_frost(:,:,1)) 61 62 62 63 ! If the difference is too small, then there is no evolution … … 64 65 65 66 ! If the tendency is negative but there is no ice reservoir for the PEM 66 where ( abs(d_ice) < 0._dp .and. .not. is_perice) d_ice = 0._dp67 where (d_ice < 0._dp .and. abs(perice) < minieps) d_ice = 0._dp 67 68 68 69 END SUBROUTINE compute_tendice
Note: See TracChangeset
for help on using the changeset viewer.
