Changeset 4075 for trunk


Ignore:
Timestamp:
Feb 17, 2026, 4:52:40 PM (7 weeks ago)
Author:
jbclement
Message:

PEM:
Addition of runs ID for the current cycle in "pem_workflow.sts".
JBC

Location:
trunk/LMDZ.COMMON/libf/evolution
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.COMMON/libf/evolution/changelog.txt

    r4074 r4075  
    878878== 17/02/2026 == JBC
    879879- Correct management of H2O ice tendency in 1D when there is not enough ice anymore.
    880 - Clean initialization of allocatable module arrays (especially needed when no slope)
     880- Clean initialization of allocatable module arrays (especially needed when no slope).
    881881- One more renaming for consistency + few small updates thoughout the code.
     882
     883== 17/02/2026 == JBC
     884Addition of runs ID for the current cycle in "pem_workflow.sts".
  • trunk/LMDZ.COMMON/libf/evolution/display.F90

    r4072 r4075  
    123123write(stdout,*)
    124124write(stdout,*) '****** PEM final information *******'
    125 write(*,'(a,f16.4,a)')         ' + This PEM run '//int2str(i_pem_run)//' achieved ', n_yr_run, ' Planetary years in '//format_duration(dur_secs)//' (computing time).'
     125write(*,'(a,f16.4,a)')         ' + The run PEM #'//int2str(i_pem_run)//' achieved ', n_yr_run, ' Planetary years, completed in '//format_duration(dur_secs)//'.'
    126126write(*,'(a,f16.4,a,f16.4,a)') ' + The workflow has achieved ', n_yr_sim, ' Planetary years =', n_yr_sim*r_plnt2earth_yr, ' Earth years.'
    127127write(*,'(a,f16.4,a)')         ' + The reached date is now ', (pem_ini_date + n_yr_sim)*r_plnt2earth_yr, ' Earth years.'
  • trunk/LMDZ.COMMON/libf/evolution/workflow_status.F90

    r4072 r4075  
    121121! LOCAL VARIABLES
    122122! ---------------
    123 logical(k4)   :: here
    124 integer(di)   :: cstat, ierr, funit
    125 character(20) :: fch1, fch2, fch3
     123logical(k4)               :: here
     124integer(di)               :: i, cstat, ierr, funit, id_PCM_1, n_id_PCM
     125character(20)             :: header1, header2, header3
     126character(:), allocatable :: headline
    126127
    127128! CODE
     
    132133
    133134! Modify the header (first line)
    134 write(fch1,'(f'//int2str(nb_digits(n_yr_sim) + 5)//'.4)') n_yr_sim
    135 write(fch2,'(f'//int2str(nb_digits(ntot_yr_sim) + 5)//'.4)') ntot_yr_sim
    136 write(fch3,'(f6.4)') r_plnt2earth_yr ! 4 digits to the right of the decimal point to respect the precision of year in "pem_workflow_lib.sh"
    137 call execute_command_line('sed -i "1s/.*/'//trim(fch1)//' '//trim(fch2)//' '//trim(fch3)//' '//int2str(i_pcm_run)//' '//int2str(i_pem_run + 1)//' '//int2str(n_pcm_runs)//' '//int2str(n_pcm_runs_ini)//'/" pem_workflow.sts',cmdstat = cstat)
     135write(header1,'(f'//int2str(nb_digits(n_yr_sim) + 5)//'.4)') n_yr_sim
     136write(header2,'(f'//int2str(nb_digits(ntot_yr_sim) + 5)//'.4)') ntot_yr_sim
     137write(header3,'(f6.4)') r_plnt2earth_yr ! 4 digits to the right of the decimal point to respect the precision of year in "pem_workflow_lib.sh"
     138call execute_command_line('sed -i "1s/.*/'//trim(header1)//' '//trim(header2)//' '//trim(header3)//' '//int2str(i_pcm_run)//' '//int2str(i_pem_run + 1)//' '//int2str(n_pcm_runs)//' '//int2str(n_pcm_runs_ini)//'/" pem_workflow.sts',cmdstat = cstat)
    138139if (cstat > 0) then
    139140    call stop_clean(__FILE__,__LINE__,'command execution failed!',1)
     
    143144
    144145! Add the information of current PEM run at the end of file
     146! Headline (cycle infomation), Date, Number of years done by the chained simulation, Number of years done by the PEM run, Code of the stopping criterion
     147if (i_pcm_run - 1 <= n_pcm_runs_ini) then
     148    id_PCM_1 = i_pcm_run - n_pcm_runs_ini
     149    n_id_PCM = n_pcm_runs_ini
     150else
     151    id_PCM_1 = i_pcm_run - n_pcm_runs
     152    n_id_PCM = n_pcm_runs
     153end if
     154headline = 'cycle=PCM('//int2str(id_PCM_1)
     155do i = 1,n_id_PCM - 1
     156    headline = headline//'+'//int2str(id_PCM_1 + i)
     157end do
     158headline = headline//')+PEM('//int2str(i_pem_run)//')'
    145159open(newunit = funit,file = statusfile_name,status = "old",position = "append",action = "write",iostat = ierr)
    146160if (ierr /= 0) call stop_clean(__FILE__,__LINE__,'error opening file "'//statusfile_name//'"!',ierr)
    147 ! Date, Number of years done by the PEM run, Number of years done by the chained simulation, Code of the stopping criterion
    148 write(funit,'(f20.4,f20.4,f20.4,i20)') pem_ini_date + n_yr_sim, n_yr_run, n_yr_sim, stopPEM
     161write(funit,'(a,f20.4,f20.4,f20.4,i4)') headline, pem_ini_date + n_yr_sim, n_yr_sim, n_yr_run, stopPEM
    149162close(funit)
    150163
Note: See TracChangeset for help on using the changeset viewer.