MONC
|
Will read in a NetCDF checkpoint file and initialise the model state_mod based upon this. More...
Functions/Subroutines | |
subroutine, public | read_checkpoint_file (current_state, filename) |
Reads in a NetCDF checkpoint file and uses this to initialise the model. More... | |
subroutine | decompose_grid (current_state) |
Calls out to the parallel decomposition strategy to decompose the grid based upon the configuration read and number of processes. More... | |
subroutine | initalise_source_and_sav_fields (current_state) |
Initialises the source and sav (for u,v,w) fields for allocated prognostics. More... | |
subroutine | load_misc (current_state, ncid) |
Loads in misc data from the checkpoint file. More... | |
character(len=:) function, allocatable, target | read_specific_global_attribute (ncid, key) |
Will read a global attribute from the checkpoint file - note that it allocates string memory here so the caller should deallocate this to avoid memory leaks. More... | |
subroutine | load_all_fields (current_state, ncid) |
Reads in and initialises all prognostic fields. It will check the NetCDF checkpoint file and depending upon what data is in the file then it will set the corresponding fields up which in essence determines whether it has 1, 2 or 3D fields. This also supports 1, 2 or 3D grids_mod which will set any missing grid dimensions to be 1. More... | |
logical function | does_field_exist (ncid, variable_key) |
Determines whether a variable (field) exists within the NetCDF checkpoint file @ncid The NetCDF file id @variable_key The NetCDF variable key we are looking up. More... | |
subroutine | load_q_indices (ncid) |
Loads the Q indices (if they exist) into the model Q index register. More... | |
integer function | get_number_q_indices (ncid) |
Retrieve sthe number of Q indice entries in the NetCDF. This is optional, so may return 0. More... | |
subroutine | load_single_3d_field (ncid, local_grid, field, z_grid, y_grid, x_grid, variable_key, multi_process, fourth_dim_loc) |
Loads in and initialises a single 3D prognostic field. Even if the model is being run in 1 or 2D, the fields are still stored in 3D with the missing dimension sizes being set to one. More... | |
subroutine | load_global_grid (current_state, ncid, z_dim, y_dim, x_dim, z_found, y_found, x_found) |
Reads in and initialises the primal grid from the NetCDF checkpoint and will handle 1, 2 or 3D runs. More... | |
subroutine | load_mean_profiles (current_state, ncid, z_dim_id) |
subroutine | load_pdf_profiles (current_state, ncid, z_dim_id) |
subroutine | define_vertical_levels (ncid, current_state, z_key, z_dim_id) |
Defines the vertical levels of the grid. This is both the grid points and corresponding height for each point in metres. More... | |
subroutine | read_dimension_of_grid (ncid, grid, variable_key, dimension, dimension_id) |
Reads a specific dimension of the grid from the NetCDF and sets this up in the state_mod. More... | |
subroutine | read_single_variable (ncid, key, int_data, real_data, real_data_1d, real_data_1d_double, real_data_2d_double, real_data_3d, integer_data_1d, start, count, map) |
Reads in a single variable and sets the values of the data based upon this. Handles reading in and setting vectors of 1 or 3D reals and 1d integers. More... | |
subroutine | read_dimensions (ncid, z_dim, y_dim, x_dim, z_found, y_found, x_found) |
Will read in the dimension sizes from the NetCDF file along with whether the z, y and x dimensions have been found. If any have not been found then this corresponds to running the model with 2 or 1D grids_mod. More... | |
Will read in a NetCDF checkpoint file and initialise the model state_mod based upon this.
|
private |
Calls out to the parallel decomposition strategy to decompose the grid based upon the configuration read and number of processes.
current_state | The current model state |
Definition at line 78 of file readcheckpoint.F90.
|
private |
Defines the vertical levels of the grid. This is both the grid points and corresponding height for each point in metres.
current_state | The current model state_mod |
z_key | Key of the Z grid points in the NetCDF |
z_size | Number of grid points |
Definition at line 511 of file readcheckpoint.F90.
|
private |
Determines whether a variable (field) exists within the NetCDF checkpoint file @ncid The NetCDF file id @variable_key The NetCDF variable key we are looking up.
Definition at line 274 of file readcheckpoint.F90.
|
private |
Retrieve sthe number of Q indice entries in the NetCDF. This is optional, so may return 0.
ncid | The NetCDF file id |
Definition at line 306 of file readcheckpoint.F90.
|
private |
Initialises the source and sav (for u,v,w) fields for allocated prognostics.
current_state | The model current state |
Definition at line 90 of file readcheckpoint.F90.
|
private |
Reads in and initialises all prognostic fields. It will check the NetCDF checkpoint file and depending upon what data is in the file then it will set the corresponding fields up which in essence determines whether it has 1, 2 or 3D fields. This also supports 1, 2 or 3D grids_mod which will set any missing grid dimensions to be 1.
current_state | The current model state_mod |
ncid | The NetCDF file id |
z_dim | The size of the z dimension |
y_dim | The size of the y dimension |
x_dim | The size of the x dimension |
Definition at line 192 of file readcheckpoint.F90.
|
private |
Reads in and initialises the primal grid from the NetCDF checkpoint and will handle 1, 2 or 3D runs.
current_state | The current model state_mod |
ncid | The NetCDF file id |
z_dim | Size in the z dimension |
y_dim | Size in the y dimension |
x_sim | Size in the x dimension |
z_found | Whether the z grid dimension exists in the checkpoint |
y_found | Whether the y grid dimension exists in the checkpoint |
x_found | Whether the x grid dimension exists in the checkpoint |
Definition at line 396 of file readcheckpoint.F90.
|
private |
Definition at line 412 of file readcheckpoint.F90.
|
private |
Loads in misc data from the checkpoint file.
current_state | The current model state_mod |
ncid | The NetCDF file id |
Definition at line 137 of file readcheckpoint.F90.
|
private |
Definition at line 488 of file readcheckpoint.F90.
|
private |
Loads the Q indices (if they exist) into the model Q index register.
ncid | The NetCDF file id |
Definition at line 285 of file readcheckpoint.F90.
|
private |
Loads in and initialises a single 3D prognostic field. Even if the model is being run in 1 or 2D, the fields are still stored in 3D with the missing dimension sizes being set to one.
ncid | The NetCDF file id |
field | The prognostic field that will be initialised from the checkpoint |
grid | The grid that the prognostic field is on |
variable_key | The NetCDF variable name |
dim_one | Size in dimension one |
dim_two | Size in dimension two |
dim_three | Size in dimension three |
Definition at line 330 of file readcheckpoint.F90.
subroutine, public checkpointer_read_checkpoint_mod::read_checkpoint_file | ( | type(model_state_type), intent(inout) | current_state, |
character(len=*), intent(in) | filename | ||
) |
Reads in a NetCDF checkpoint file and uses this to initialise the model.
currentState | The current model state_mod |
filename | The filename of the checkpoint file to load |
Definition at line 40 of file readcheckpoint.F90.
|
private |
Reads a specific dimension of the grid from the NetCDF and sets this up in the state_mod.
ncid | The NetCDF file id |
grid | The model grid that this dimension lies on |
variable_key | The NetCDF variable name that we are reading |
dimension | The dimension corresponding to the definition in the grids_mod module |
dimension_size | Number of grid points in this dimension |
Definition at line 542 of file readcheckpoint.F90.
|
private |
Will read in the dimension sizes from the NetCDF file along with whether the z, y and x dimensions have been found. If any have not been found then this corresponds to running the model with 2 or 1D grids_mod.
ncid | The NetCDf file id |
z_dim | Size in the z dimension (set to size of empty dimension if not found) |
y_dim | Size in the y dimension (set to size of empty dimension if not found) |
x_dim | Size in the x dimension (set to size of empty dimension if not found) |
string_dim | Size of the string dimension (size that we use to allocate strings) |
key_value_pair_dim | Size of key-value pair dimension which should be two |
options_dim | Size of the options dimension which corresponds to how many options have been provided |
z_found | Whether the z dimension exists (grid exists in z dimension) |
y_found | Whether the y dimension exists (grid exists in y dimension) |
x_found | Whether the x dimension exists (grid exists in x dimension) |
Definition at line 663 of file readcheckpoint.F90.
|
private |
Reads in a single variable and sets the values of the data based upon this. Handles reading in and setting vectors of 1 or 3D reals and 1d integers.
ncid | The NetCDF file id |
key | The variable key to read in |
realData1D | Vector of 1D real data to read (optional) |
realData3D | Vector of 3D real data to read (optional) |
integerData1D | Vector of 1D integer data to read (optional) |
Definition at line 577 of file readcheckpoint.F90.
|
private |
Will read a global attribute from the checkpoint file - note that it allocates string memory here so the caller should deallocate this to avoid memory leaks.
ncid | The NetCDF file id |
key | The NetCDF global attributes key to look up |
Definition at line 171 of file readcheckpoint.F90.