Ignore:
Timestamp:
Mar 16, 2026, 3:24:12 PM (6 days ago)
Author:
jbclement
Message:

PEM:

  • Add a periodic backup based on a single wrapper which builds PCM-compatible climate state and writes "restart" files.
  • Remove condition "if (.not. allocated(*))" for more strict safeguard.

JBC

File:
1 edited

Legend:

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

    r4117 r4134  
    1717! ------------
    1818use numerics,  only: dp, di, k4
    19 use io_netcdf, only: open_nc, close_nc, get_var_nc, get_dim_nc, put_var_nc, start_name, start1D_name, startfi_name, startpem_name
     19use io_netcdf, only: open_nc, close_nc, get_var_nc, get_dim_nc, put_var_nc, start_name, start1D_name, startfi_name, startevo_name
    2020
    2121! DECLARATION
     
    369369! ----
    370370! Check if the file exists
    371 inquire(file = startpem_name,exist = here)
     371inquire(file = startevo_name,exist = here)
    372372
    373373! If the file is not here
     
    375375if (.not. here) then
    376376    ! It is possibly because it is the very first PEM run so everything needs to be initalized
    377     call print_msg('> The file "'//startpem_name//'" was not found (possibly because this is the first PEM run)',LVL_WRN)
     377    call print_msg('> The file "'//startevo_name//'" was not found (possibly because this is the first PEM run)',LVL_WRN)
    378378
    379379    ! H2O ice
     
    509509! If the file is present
    510510! ~~~~~~~~~~~~~~~~~~~~~~
    511 call print_msg('> Reading "'//startpem_name//'"',LVL_NFO)
    512 call open_nc(startpem_name,'read')
     511call print_msg('> Reading "'//startevo_name//'"',LVL_NFO)
     512call open_nc(startevo_name,'read')
    513513
    514514! H2O ice
     
    524524    call get_dim_nc('subsurface_layers',nsoil_startpem)
    525525    if (nsoil_startpem /= nsoil) then
    526         call print_msg('nsoil (PEM) = '//int2str(nsoil)//' | nsoil ("'//startpem_name//'") = '//int2str(nsoil_startpem),LVL_ERR)
    527         call stop_clean(__FILE__,__LINE__,'nsoil defined in the PEM is different from the one read in "'//startpem_name//'"!',1)
     526        call print_msg('nsoil (PEM) = '//int2str(nsoil)//' | nsoil ("'//startevo_name//'") = '//int2str(nsoil_startpem),LVL_ERR)
     527        call stop_clean(__FILE__,__LINE__,'nsoil defined in the PEM is different from the one read in "'//startevo_name//'"!',1)
    528528    end if
    529529
     
    578578
    579579! Close
    580 call close_nc(startpem_name)
     580call close_nc(startevo_name)
    581581
    582582END SUBROUTINE read_startpem
Note: See TracChangeset for help on using the changeset viewer.