Skip to content
Snippets Groups Projects
Commit 84c20694 authored by Antoine Cyril David Hoffmann's avatar Antoine Cyril David Hoffmann
Browse files

Added checkpoint saving rate as input parameter

parent 2ae84092
No related branches found
No related tags found
No related merge requests found
...@@ -28,6 +28,7 @@ fprintf(fid,[' nsave_0d = ', num2str(OUTPUTS.nsave_0d),'\n']); ...@@ -28,6 +28,7 @@ fprintf(fid,[' nsave_0d = ', num2str(OUTPUTS.nsave_0d),'\n']);
fprintf(fid,[' nsave_1d = ', num2str(OUTPUTS.nsave_1d),'\n']); fprintf(fid,[' nsave_1d = ', num2str(OUTPUTS.nsave_1d),'\n']);
fprintf(fid,[' nsave_2d = ', num2str(OUTPUTS.nsave_2d),'\n']); fprintf(fid,[' nsave_2d = ', num2str(OUTPUTS.nsave_2d),'\n']);
fprintf(fid,[' nsave_5d = ', num2str(OUTPUTS.nsave_5d),'\n']); fprintf(fid,[' nsave_5d = ', num2str(OUTPUTS.nsave_5d),'\n']);
fprintf(fid,[' nsave_cp = ', num2str(OUTPUTS.nsave_cp),'\n']);
fprintf(fid,[' write_Na00 = ', OUTPUTS.write_Na00,'\n']); fprintf(fid,[' write_Na00 = ', OUTPUTS.write_Na00,'\n']);
fprintf(fid,[' write_moments = ', OUTPUTS.write_moments,'\n']); fprintf(fid,[' write_moments = ', OUTPUTS.write_moments,'\n']);
fprintf(fid,[' write_phi = ', OUTPUTS.write_phi,'\n']); fprintf(fid,[' write_phi = ', OUTPUTS.write_phi,'\n']);
......
...@@ -255,12 +255,12 @@ SUBROUTINE diagnose(kstep) ...@@ -255,12 +255,12 @@ SUBROUTINE diagnose(kstep)
END IF END IF
! 2.5 Backups ! 2.5 Backups
nsave_cp = INT(5/dt) IF (nsave_cp .NE. 0) THEN
IF (MOD(cstep, nsave_cp) == 0) THEN IF (MOD(cstep, nsave_cp) == 0) THEN
CALL checkpoint_save(cp_counter) CALL checkpoint_save(cp_counter)
cp_counter = cp_counter + 1 cp_counter = cp_counter + 1
ENDIF
ENDIF ENDIF
!_____________________________________________________________________________ !_____________________________________________________________________________
! 3. Final diagnostics ! 3. Final diagnostics
......
...@@ -11,8 +11,7 @@ MODULE diagnostics_par ...@@ -11,8 +11,7 @@ MODULE diagnostics_par
LOGICAL, PUBLIC, PROTECTED :: write_non_lin=.TRUE. LOGICAL, PUBLIC, PROTECTED :: write_non_lin=.TRUE.
LOGICAL, PUBLIC, PROTECTED :: write_doubleprecision=.FALSE. LOGICAL, PUBLIC, PROTECTED :: write_doubleprecision=.FALSE.
INTEGER, PUBLIC, PROTECTED :: nsave_0d , nsave_1d , nsave_2d , nsave_5d INTEGER, PUBLIC, PROTECTED :: nsave_0d , nsave_1d , nsave_2d , nsave_5d, nsave_cp
INTEGER, PUBLIC :: nsave_cp = 1e4
! HDF5 file ! HDF5 file
CHARACTER(len=256), PUBLIC :: resfile0 = "results" ! Head of main result file name CHARACTER(len=256), PUBLIC :: resfile0 = "results" ! Head of main result file name
...@@ -35,7 +34,7 @@ CONTAINS ...@@ -35,7 +34,7 @@ CONTAINS
USE prec_const USE prec_const
IMPLICIT NONE IMPLICIT NONE
NAMELIST /OUTPUT_PAR/ nsave_0d , nsave_1d , nsave_2d , nsave_5d NAMELIST /OUTPUT_PAR/ nsave_0d , nsave_1d , nsave_2d , nsave_5d, nsave_cp
NAMELIST /OUTPUT_PAR/ write_Na00, write_moments, write_phi, write_non_lin, write_doubleprecision NAMELIST /OUTPUT_PAR/ write_Na00, write_moments, write_phi, write_non_lin, write_doubleprecision
NAMELIST /OUTPUT_PAR/ resfile0, rstfile0, job2load NAMELIST /OUTPUT_PAR/ resfile0, rstfile0, job2load
......
...@@ -84,6 +84,7 @@ OUTPUTS.nsave_0d = floor(1.0/SPS0D/DT); ...@@ -84,6 +84,7 @@ OUTPUTS.nsave_0d = floor(1.0/SPS0D/DT);
OUTPUTS.nsave_1d = 0; OUTPUTS.nsave_1d = 0;
OUTPUTS.nsave_2d = floor(1.0/SPS2D/DT); OUTPUTS.nsave_2d = floor(1.0/SPS2D/DT);
OUTPUTS.nsave_5d = floor(1.0/SPS5D/DT); OUTPUTS.nsave_5d = floor(1.0/SPS5D/DT);
OUTPUTS.nsave_cp = floor(1.0/SPSCP/DT);
OUTPUTS.write_Na00 = '.true.'; OUTPUTS.write_Na00 = '.true.';
OUTPUTS.write_moments = '.true.'; OUTPUTS.write_moments = '.true.';
OUTPUTS.write_phi = '.true.'; OUTPUTS.write_phi = '.true.';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment