FIXME : Add documentation
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
logical, | public | :: | read_many | = | .false. |
Read and write single or multiple restart files. Effectively ignored if not built with parallel netcdf |
|
logical, | public | :: | save_many | = | .false. |
Read and write single or multiple restart files. Effectively ignored if not built with parallel netcdf |
|
logical, | public | :: | include_explicit_source_in_restart | = | .true. |
Do we want to include the explicit source terms and related timesteps when saving/restoring from the restart file. |
|
integer, | public | :: | proc_to_save_fields |
Which processor should save the potentials. If <0 (default) then all processors save their potentials. If >= nproc then will be set to mod(proc_to_save_fields, nproc) |
|||
character(len=run_name_size), | private | :: | restart_file |
Used to hold the base of the restart file name. |
|||
character(len=5), | private, | parameter, dimension(*) | :: | g_dim_names | = | ["theta", "sign ", "glo "] |
Names of dimensions for distribution-sized variables in netCDF files |
character(len=5), | private, | parameter, dimension(*) | :: | field_dim_names | = | ["theta", "akx ", "aky "] | |
real, | private, | allocatable, dimension(:,:,:) | :: | tmpr | |||
real, | private, | allocatable, dimension(:,:,:) | :: | tmpi | |||
real, | private, | allocatable, dimension(:,:,:) | :: | ftmpr | |||
real, | private, | allocatable, dimension(:,:,:) | :: | ftmpi | |||
real, | private, | allocatable, dimension(:) | :: | stmp | |||
real, | private, | allocatable, dimension(:) | :: | atmp | |||
logical, | private, | parameter | :: | include_parameter_scan | = | .true. |
Do we save the scan parameter or not? |
logical, | private, | parameter | :: | has_netcdf_parallel | = | .false. |
The NETCDF_PARALLEL directives include code for parallel netcdf using HDF5 to write the output to a single restart file The save_many/read_many flag allows the old style multiple file output Here we set a run time flag to enable us to handle some of the different paths through the code at run time rather than with ifdef mazes |
FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(out), | dimension (-ntgrid:,:,g_lo%llim_proc:) | :: | g | ||
real, | intent(in) | :: | scale | |||
integer, | intent(out) | :: | istatus | |||
logical, | intent(in) | :: | has_phi | |||
logical, | intent(in) | :: | has_apar | |||
logical, | intent(in) | :: | has_bpar | |||
character(len=*), | intent(in), | optional | :: | fileopt |
A custom type to look after the netcdf ids for the eigenvalue file
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public | :: | ncid |
File handle |
|||
integer, | public | :: | nconv_count |
Current size of |
This function checks to see if we can create a file with name
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(in), | optional | :: | read_only |
If present and true, only check that files can be read |
|
character(len=*), | intent(in), | optional | :: | my_file |
An optional specific filename to check |
|
character(len=:), | intent(out), | optional, | allocatable | :: | error_message |
Error message returned from |
Returns the file corresponding to restart file in current setup
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(in) | :: | is_one_file_per_processor | |||
character(len=*), | intent(in), | optional | :: | fileopt |
Create and fill the restart files
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension (-ntgrid:,:,g_lo%llim_proc:) | :: | g |
The distribution function |
|
real, | intent(in) | :: | t0 |
Current simulation time |
||
real, | intent(in), | dimension (2) | :: | vnm |
FIXME: Collisionality multiplier? |
|
logical, | intent(in) | :: | has_phi |
Do we include electrostatic potential, |
||
logical, | intent(in) | :: | has_apar |
Do we include vector potential, |
||
logical, | intent(in) | :: | has_bpar |
Do we include parallel magnetic field, |
||
real, | intent(in) | :: | code_dt |
The current time step, the two previous time steps and the maximum allowed time step. |
||
real, | intent(in) | :: | code_dt_prev1 |
The current time step, the two previous time steps and the maximum allowed time step. |
||
real, | intent(in) | :: | code_dt_prev2 |
The current time step, the two previous time steps and the maximum allowed time step. |
||
real, | intent(in) | :: | code_dt_max |
The current time step, the two previous time steps and the maximum allowed time step. |
||
character(len=*), | intent(in), | optional | :: | fileopt |
Optional extra filename infix |
|
logical, | intent(in), | optional | :: | save_glo_info_and_grids |
Control if layout and diagnostic information is saved |
|
logical, | intent(in), | optional | :: | save_velocities |
Control if information is saved |
|
type(standard_header_type), | intent(in), | optional | :: | header |
Header for files with build and run information |
Save g slices
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension (-ntgrid:, :, g_lo%llim_proc:) | :: | g_in |
The distribution function |
|
integer, | intent(in) | :: | it |
The indices of the slice to save |
||
integer, | intent(in) | :: | ik |
The indices of the slice to save |
||
integer, | intent(in) | :: | il |
The indices of the slice to save |
||
integer, | intent(in) | :: | ie |
The indices of the slice to save |
||
integer, | intent(in) | :: | is |
The indices of the slice to save |
||
real, | intent(in) | :: | time |
The current time |
||
integer, | intent(in), | optional | :: | nout |
The current time output index |
|
character(len=*), | intent(in), | optional | :: | fileopt |
Optional extra filename infix |
|
type(standard_header_type), | intent(in), | optional | :: | header |
Header for files with build and run information |
FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(out), | dimension (-ntgrid:,:,g_lo%llim_proc:) | :: | g | ||
real, | intent(in) | :: | scale | |||
integer, | intent(out) | :: | istatus | |||
logical, | intent(in) | :: | has_phi | |||
logical, | intent(in) | :: | has_apar | |||
logical, | intent(in) | :: | has_bpar | |||
character(len=*), | intent(in), | optional | :: | fileopt |
This routine writes a passed square complex array to a file with passed name
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:,:) | :: | resp | ||
character(len=*), | intent(in) | :: | fname | |||
real, | intent(in) | :: | code_dt | |||
real, | intent(in), | optional | :: | condition | ||
type(standard_header_type), | intent(in), | optional | :: | header |
Header for files with build and run information |
This routine reads a square complex array from a file with passed name
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(out), | dimension(:,:) | :: | resp | ||
character(len=*), | intent(in) | :: | fname | |||
real, | intent(out) | :: | code_dt | |||
real, | intent(out), | optional | :: | condition |
Initialises a file for saving output of eigensolver to netcdf
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | fname | |||
type(EigNetcdfID), | intent(inout) | :: | IDs |
Add an eigenpairs data to file
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in) | :: | eval | |||
logical, | intent(in) | :: | has_phi | |||
logical, | intent(in) | :: | has_apar | |||
logical, | intent(in) | :: | has_bpar | |||
type(EigNetcdfID), | intent(inout) | :: | IDs | |||
real, | intent(in), | optional | :: | my_conv |
Close the eigenfunction file
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(EigNetcdfID), | intent(inout) | :: | IDs |
FIXME : Add documentation
Sets the base of the restart file to be used when writing/reading files.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | file |
FIXME : Add documentation
Deallocate all module level arrays
FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(out) | :: | current_scan_parameter_value |
FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(inout) | :: | delt0 | |||
real, | intent(inout) | :: | delt1 | |||
real, | intent(inout) | :: | delt2 | |||
real, | intent(inout) | :: | delt_max | |||
integer, | intent(out) | :: | istatus | |||
real, | intent(in), | optional | :: | not_set_value |
FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(inout), | dimension(2) | :: | vnm | ||
integer, | intent(out) | :: | istatus |
FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(inout), | dimension(:) | :: | a_ant | ||
complex, | intent(inout), | dimension(:) | :: | b_ant | ||
integer, | intent(in) | :: | nk_stir | |||
integer, | intent(out) | :: | istatus |
FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(inout) | :: | tstart | |||
integer, | intent(out) | :: | istatus |