Ignore:
Timestamp:
Mar 26, 2026, 4:29:10 PM (2 weeks ago)
Author:
jbclement
Message:

PEM:

  • Separate variables ownership between the module "planet" for persistent climate state and the program "pem" for transient workflow logic. It provides a meaningful structure.
  • Add lifecycle helpers for clear allocation/deallocation logic.
  • Simplify string suffix for slopes variables.

JBC

File:
1 edited

Legend:

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

    r4147 r4157  
    2525! VARIABLES
    2626! ---------
    27 logical(k4), protected, private :: is_restartpem = .false. ! Flag to know if "restartevo.nc" exists
     27logical(k4), protected, private :: is_restartevo = .false. ! Flag to know if "restartevo.nc" exists
    2828
    2929contains
     
    271271
    272272!=======================================================================
    273 SUBROUTINE create_nc_pem(nb_str_max)
     273SUBROUTINE create_startevo(nb_str_max)
    274274!-----------------------------------------------------------------------
    275275! NAME
    276 !     create_nc_pem
     276!     create_startevo
    277277!
    278278! DESCRIPTION
     
    414414
    415415! File creation done
    416 is_restartpem = .true.
    417 
    418 END SUBROUTINE create_nc_pem
    419 !=======================================================================
    420 
    421 !=======================================================================
    422 SUBROUTINE write_restartpem(h2o_ice,co2_ice,tsoil,TI,icetable_depth,icetable_thickness,ice_porefilling,h2o_ads_reg,co2_ads_reg,layerings_map)
     416is_restartevo = .true.
     417
     418END SUBROUTINE create_startevo
     419!=======================================================================
     420
     421!=======================================================================
     422SUBROUTINE write_restartevo(h2o_ice,co2_ice,tsoil,TI,icetable_depth,icetable_thickness,ice_porefilling,h2o_ads_reg,co2_ads_reg,layerings_map)
    423423!-----------------------------------------------------------------------
    424424! NAME
    425 !    write_restartpem
     425!    write_restartevo
    426426!
    427427! DESCRIPTION
     
    466466! Create the file
    467467nb_str_max = get_nb_str_max(layerings_map)
    468 call create_nc_pem(nb_str_max)
     468call create_startevo(nb_str_max)
    469469
    470470call print_msg('> Writing "re'//startevo_name//'"',LVL_NFO)
    471 if (.not. is_restartpem) call stop_clean(__FILE__,__LINE__,'The file"'//startevo_name//'" has not been created',1)
     471if (.not. is_restartevo) call stop_clean(__FILE__,__LINE__,'The file"'//startevo_name//'" has not been created',1)
    472472
    473473! Writing time counter
     
    510510call close_nc('re'//startevo_name)
    511511
    512 END SUBROUTINE write_restartpem
     512END SUBROUTINE write_restartevo
    513513!=======================================================================
    514514
Note: See TracChangeset for help on using the changeset viewer.