Changeset 4075 for trunk/LMDZ.COMMON/libf/evolution/workflow_status.F90
- Timestamp:
- Feb 17, 2026, 4:52:40 PM (12 days ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/evolution/workflow_status.F90
r4072 r4075 121 121 ! LOCAL VARIABLES 122 122 ! --------------- 123 logical(k4) :: here 124 integer(di) :: cstat, ierr, funit 125 character(20) :: fch1, fch2, fch3 123 logical(k4) :: here 124 integer(di) :: i, cstat, ierr, funit, id_PCM_1, n_id_PCM 125 character(20) :: header1, header2, header3 126 character(:), allocatable :: headline 126 127 127 128 ! CODE … … 132 133 133 134 ! Modify the header (first line) 134 write( fch1,'(f'//int2str(nb_digits(n_yr_sim) + 5)//'.4)') n_yr_sim135 write( fch2,'(f'//int2str(nb_digits(ntot_yr_sim) + 5)//'.4)') ntot_yr_sim136 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)135 write(header1,'(f'//int2str(nb_digits(n_yr_sim) + 5)//'.4)') n_yr_sim 136 write(header2,'(f'//int2str(nb_digits(ntot_yr_sim) + 5)//'.4)') ntot_yr_sim 137 write(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" 138 call 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) 138 139 if (cstat > 0) then 139 140 call stop_clean(__FILE__,__LINE__,'command execution failed!',1) … … 143 144 144 145 ! 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 147 if (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 150 else 151 id_PCM_1 = i_pcm_run - n_pcm_runs 152 n_id_PCM = n_pcm_runs 153 end if 154 headline = 'cycle=PCM('//int2str(id_PCM_1) 155 do i = 1,n_id_PCM - 1 156 headline = headline//'+'//int2str(id_PCM_1 + i) 157 end do 158 headline = headline//')+PEM('//int2str(i_pem_run)//')' 145 159 open(newunit = funit,file = statusfile_name,status = "old",position = "append",action = "write",iostat = ierr) 146 160 if (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 161 write(funit,'(a,f20.4,f20.4,f20.4,i4)') headline, pem_ini_date + n_yr_sim, n_yr_sim, n_yr_run, stopPEM 149 162 close(funit) 150 163
Note: See TracChangeset
for help on using the changeset viewer.
