Ignore:
Timestamp:
Mar 18, 2026, 1:56:02 PM (3 weeks ago)
Author:
jbclement
Message:

PEM:
Fix to avoid building large temporary arrays in the arguments evaluation of "compute_tendice" which caused memory to stall.
JBC

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.COMMON/libf/evolution/pem.F90

    r4139 r4140  
    210210allocate(d_h2oice(ngrid,nslope),d_co2ice(ngrid,nslope))
    211211call print_msg('> Computing surface ice tendencies',LVL_NFO)
    212 call compute_tendice(minPCM_h2operice + minPCM_h2ofrost,h2o_ice(:,:) > 0._dp,d_h2oice)
     212call compute_tendice(minPCM_h2operice,minPCM_h2ofrost,h2o_ice,d_h2oice)
    213213call 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)
     214call compute_tendice(minPCM_co2perice,minPCM_co2frost,co2_ice,d_co2ice)
    215215call print_msg('CO2 ice tendencies [kg/m2/yr] (min|max): '//real2str(minval(d_co2ice))//' | '//real2str(maxval(d_co2ice)),LVL_NFO)
    216216deallocate(minPCM_h2operice,minPCM_co2perice,minPCM_h2ofrost,minPCM_co2frost)
     
    433433
    434434    ! Save periodic backups of restart files
    435     if (backup_rate > 0 .and. mod(idt,backup_rate) == 0) then
    436         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)
    438438    end if
    439439
Note: See TracChangeset for help on using the changeset viewer.