Ignore:
Timestamp:
Feb 16, 2026, 11:41:37 AM (13 days ago)
Author:
jbclement
Message:

PEM:
Modify the PEM semantics to standardize file/functions/variable names and avoid ambiguity: workflow = repetion of cycles; cycle = PCM phase + PEM phase; PCM phase = 2+ PCM runs of 1 year each, PEM phase = 1 PEM run of 'x' years.
JBC

File:
1 edited

Legend:

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

    r4071 r4072  
    2828use config,             only: read_rundef
    2929use display,            only: print_ini, print_end, print_msg
    30 use evolution,          only: n_yr_run, n_yr_sim, nmax_yr_sim, nmax_yr_run, dt, idt, r_plnt2earth_yr, pem_ini_date
     30use evolution,          only: n_yr_run, n_yr_sim, ntot_yr_sim, nmax_yr_run, dt, idt, r_plnt2earth_yr, pem_ini_date
    3131use geometry,           only: ngrid, nslope, nday, nsoil_PCM, nsoil, cell_area, total_surface, nlayer
    3232use glaciers,           only: h2oice_flow, co2ice_flow, flow_co2glaciers, flow_h2oglaciers
    3333use ice_table,          only: icetable_equilibrium, icetable_dynamic, icetable_depth, icetable_thickness, ice_porefilling, evolve_ice_table
    34 use info,               only: read_info, update_info
    3534use layered_deposits,   only: layering, do_layering, del_layering, evolve_layering, ptrarray, layering2surfice, surfice2layering
    3635use maths,              only: pi
     
    5150use tracers,            only: adapt_tracers2pressure, build4PCM_tracers, nq
    5251use utility,            only: real2str
     52use workflow_status,    only: read_workflow_status, update_workflow_status
    5353use xios_data,          only: load_xios_data
    5454
     
    163163call ini_allocation()
    164164
    165 ! Read the duration information of the simulation
    166 call read_info()
     165! Read the duration information of the workflow
     166call read_workflow_status()
    167167
    168168! Read the PEM parameters
     
    283283n_yr_run = 0
    284284idt = 0
    285 do while (n_yr_run < min(nmax_yr_runorb,nmax_yr_run) .and. n_yr_sim < nmax_yr_sim)
    286     call print_msg('**** Iteration of the PEM leg (Planetary years): '//real2str(n_yr_run + dt))
     285do while (n_yr_run < min(nmax_yr_runorb,nmax_yr_run) .and. n_yr_sim < ntot_yr_sim)
     286    call print_msg('**** Iteration of the PEM run [Planetary years]: '//real2str(n_yr_run + dt))
    287287    ! Evolve global surface pressure
    288288    call evolve_pressure(d_co2ice,delta_co2_ads,do_sorption,ps_avg_glob_old,ps_avg_glob,ps_avg)
     
    445445    if (stopcrit%stop_code() == 0 .and. n_yr_run >= nmax_yr_run) stopcrit%nmax_yr_run_reached = .true.
    446446    if (stopcrit%stop_code() == 0 .and. n_yr_run >= nmax_yr_runorb) stopcrit%nmax_yr_runorb_reached = .true.
    447     if (stopcrit%stop_code() == 0 .and. n_yr_sim >= nmax_yr_sim) stopcrit%nmax_yr_sim_reached = .true.
     447    if (stopcrit%stop_code() == 0 .and. n_yr_sim >= ntot_yr_sim) stopcrit%nmax_yr_sim_reached = .true.
    448448    if (stopcrit%stop_code() == 0 .and. timewall .and. real(c2 - c1,dp)/real(cr,dp) >= timelimit - antetime) stopcrit%time_limit_reached = .true.
    449449    if (stopcrit%is_any_set()) then
     
    452452    else
    453453        call print_msg('**** This run has achieved '//real2str(n_yr_run)//' Planetary years.')
    454         call print_msg('**** The chained simulation has achieved '//real2str(n_yr_sim)//' Planetary years.')
     454        call print_msg('**** The workflow has achieved '//real2str(n_yr_sim)//' Planetary years.')
    455455        call print_msg('**** This run is continuing!')
    456456        call print_msg('****')
     
    501501call write_restart(ps4PCM,pa4PCM,preff4PCM,q4PCM,teta4PCM,air_mass4PCM)
    502502
    503 ! Update the duration information of the simulation
    504 call update_info(n_yr_run,stopcrit%stop_code(),n_yr_sim,nmax_yr_sim)
     503! Update the duration information of the workflow
     504call update_workflow_status(n_yr_run,stopcrit%stop_code(),n_yr_sim,ntot_yr_sim)
    505505
    506506! Deallocation
Note: See TracChangeset for help on using the changeset viewer.