MONC
|
Writes out model state_mod to a checkpoint NetCDF file. More...
Functions/Subroutines | |
subroutine, public | write_checkpoint_file (current_state, filename) |
Will write out the current model state_mod into a NetCDF checkpoint file. More... | |
subroutine | write_out_global_attributes (ncid) |
Writes out global attributes into the checkpoint. More... | |
subroutine | write_out_q_indices (ncid, q_indices_id) |
Writes out the specific Q indicies that are active and need writing. More... | |
subroutine | write_out_options (current_state, ncid, options_id) |
Writes out the options that the model was run with. More... | |
subroutine | write_out_all_fields (current_state, ncid, u_id, v_id, w_id, zu_id, zv_id, zw_id, th_id, zth_id, q_id, zq_id, p_id) |
Will write out all prognostic model fields to the checkpoint. It will work in 1, 2 or 3D depending on the model. More... | |
subroutine | write_out_velocity_field (ncid, local_grid, field, variable_id, multi_process, fourth_dim_loc) |
Will write out a single velocity field to the checkpoint file. If there are multiple processes then will determine the bounds, otherwise for serial just dump data field. More... | |
subroutine | write_out_grid (ncid, grid) |
Will write out the grid to the checkpoint, it will work in 1, 2 or 3D depending on what is in the model. More... | |
subroutine | write_out_mean_fields (ncid, grid) |
subroutine | write_z_grid_gimension (ncid, vertical_grid) |
Writes out the Z dimension of the grids_mod points which are explicitly calculated. More... | |
subroutine | define_options_variable (current_state, ncid, string_dim_id, key_value_dim_id, options_id) |
Defines the NetCDF options variable which is basically a 3D character array to form key-value pair strings for each entry. More... | |
logical function | define_q_indices_variable (ncid, string_dim_id, key_value_dim_id, q_indices_id) |
Defines the NetCDF Q indices variable which is, same as the options, stored as key-value pair of strings. This will only store and create these dimensions if there are any Q indicies to store. More... | |
subroutine | define_q_field_dimension (current_state, ncid, q_dim_id) |
Defines the Q field dimension in the NetCDF. More... | |
subroutine | define_grid_dimensions (current_state, ncid, z_dim_id, y_dim_id, x_dim_id) |
Will define the grid dimensions and works for 1, 2 or 3D grids_mod. More... | |
subroutine | define_grid_variables (current_state, ncid) |
Defines the NetCDF grid variables. This works for 1, 2 or 3D grids_mod. More... | |
subroutine | define_mean_fields (current_state, ncid) |
subroutine | define_q_variable (ncid, multi_process, q_dim_id, z_dim_id, y_dim_id, x_dim_id, q_id, zq_id) |
Defines the Q variable in the checkpoint file. More... | |
subroutine | define_prognostic_variables (current_state, multi_process, ncid, z_dim_id, y_dim_id, x_dim_id, u_id, v_id, w_id, th_id, p_id, zu_id, zv_id, zw_id, zth_id) |
Defines prognostic variables in the NetCDF. This handles 1, 2 and 3D grids_mod and 1, 2 and 3D fields, which most likely have the same dimensions but this is not mandatory here. All prognostic fields are 3D, if the grid is not 3D then the empty (size 1) dimension is used in that dimension. More... | |
subroutine | define_misc_variables (ncid, timestep_id, time_id, ugal_id, vgal_id, number_q_fields_id, dtm_id, dtm_new_id, absolute_new_dtm_id) |
Defines misc variables in the NetCDF file. More... | |
subroutine | write_out_misc_variables (current_state, ncid, timestep_id, time_id, ugal_id, vgal_id, number_q_fields_id, dtm_id, dtm_new_id, absolute_new_dtm_id) |
Will dump out (write) misc model data to the checkpoint. More... | |
subroutine | define_velocity_variable (ncid, multi_process, dimone, dimtwo, dimthree, field_name, field_id) |
Will define a single velocity variable in the NetCDF file. More... | |
subroutine | define_pdf_fields (current_state, ncid) |
subroutine | write_out_pdf_fields (ncid, grid) |
Variables | |
character(len= *), parameter | checkpoint_title = "MONC checkpoint file" |
Title of the NetCDF file. More... | |
Writes out model state_mod to a checkpoint NetCDF file.
|
private |
Will define the grid dimensions and works for 1, 2 or 3D grids_mod.
current_state | The current model state_mod |
ncid | The NetCDF file id |
z_dim_id | The NetCDF z dimension id that is provided by this procedure |
y_dim_id | The NetCDF y dimension id that is provided by this procedure |
x_dim_id | The NetCDF x dimension id that is provided by this procedure |
Definition at line 402 of file writecheckpoint.F90.
|
private |
Defines the NetCDF grid variables. This works for 1, 2 or 3D grids_mod.
current_state | The current model state_mod |
ncid | The NetCDF file id |
z_dim_id | The NetCDF z dimension id |
y_dim_id | The NetCDF y dimension id |
x_dim_id | The NetCDF x dimension id |
x_id | The NetCDF x variable id provided by this procedure |
y_id | The NetCDF y variable id provided by this procedure |
z_id | The NetCDF z variable id provided by this procedure |
Definition at line 438 of file writecheckpoint.F90.
|
private |
Definition at line 472 of file writecheckpoint.F90.
|
private |
Defines misc variables in the NetCDF file.
ncid | The NetCDF file id |
timestep_id | The NetCDF timestep variable |
Definition at line 586 of file writecheckpoint.F90.
|
private |
Defines the NetCDF options variable which is basically a 3D character array to form key-value pair strings for each entry.
current_state | The current model state_mod |
ncid | The NetCDF file id |
options_id | The NetCDF options variable id that is created in this procedure |
Definition at line 341 of file writecheckpoint.F90.
|
private |
Definition at line 658 of file writecheckpoint.F90.
|
private |
Defines prognostic variables in the NetCDF. This handles 1, 2 and 3D grids_mod and 1, 2 and 3D fields, which most likely have the same dimensions but this is not mandatory here. All prognostic fields are 3D, if the grid is not 3D then the empty (size 1) dimension is used in that dimension.
current_state | The current model state_mod |
ncid | The NetCDF file id |
z_dim_id | The NetCDF z dimension id |
y_dim_id | The NetCDF y dimension id |
x_dim_id | The NetCDF x dimension id |
u_id | The u prognostic field id provided by this procedure |
v_id | The v prognostic field id provided by this procedure |
w_id | The w prognostic field id provided by this procedure |
th_id | The theta prognostic field id provided by this procedure |
Definition at line 555 of file writecheckpoint.F90.
|
private |
Defines the Q field dimension in the NetCDF.
current_state | The current model state_mod |
ncid | The NetCDF file id |
q_dim_id | Corresponding NetCDF Q dimension id |
Definition at line 388 of file writecheckpoint.F90.
|
private |
Defines the NetCDF Q indices variable which is, same as the options, stored as key-value pair of strings. This will only store and create these dimensions if there are any Q indicies to store.
ncid | The NetCDF file id |
string_dim_id | The id of the string dimension |
key_value_dim_id | The id of the key value pair dimension |
q_indices_id | The id that represents this variable in the NetCDF |
Definition at line 364 of file writecheckpoint.F90.
|
private |
Defines the Q variable in the checkpoint file.
ncid | The NetCDF file id |
multi_process | Whether to support parallel IO operations or not |
q_dim_id | The NetCDF q dimension id |
z_dim_id | The NetCDF z dimension id |
y_dim_id | The NetCDF y dimension id |
x_dim_id | The NetCDF x dimension id |
q_id | The NetCDF q variable id provided by this procedure |
zq_id | The NetCDF zq variable id provided by this procedure |
Definition at line 520 of file writecheckpoint.F90.
|
private |
Will define a single velocity variable in the NetCDF file.
ncid | The NetCDF file id |
dimone | Size in first dimension |
dimtwo | Size in second dimension (optional) |
dimthree | Size in third dimension (optional) |
field_name | The NetCDF name of the variable |
field_id | The NetCDF variable id produced by this procedure |
Definition at line 629 of file writecheckpoint.F90.
subroutine, public checkpointer_write_checkpoint_mod::write_checkpoint_file | ( | type(model_state_type), intent(inout) | current_state, |
character(len=*), intent(in) | filename | ||
) |
Will write out the current model state_mod into a NetCDF checkpoint file.
currentState | The current model state_mod |
filename | The filename of the NetCDF file that will be written |
writeout pdf fields in checkpoint file
Definition at line 40 of file writecheckpoint.F90.
|
private |
Will write out all prognostic model fields to the checkpoint. It will work in 1, 2 or 3D depending on the model.
current_state | The current model state_mod |
ncid | The NetCDF file id |
u_id | The NetCDF u field dimension id |
v_id | The NetCDF v field dimension id |
w_id | The NetCDF w field dimension id |
Definition at line 169 of file writecheckpoint.F90.
|
private |
Writes out global attributes into the checkpoint.
ncid | NetCDF file id |
Definition at line 97 of file writecheckpoint.F90.
|
private |
Will write out the grid to the checkpoint, it will work in 1, 2 or 3D depending on what is in the model.
ncid | The NetCDF file id |
grid | The model grid to write out |
z_id | The NetCDF z variable id |
y_id | The NetCDF y variable id |
x_id | The NetCDF x variable id |
Definition at line 251 of file writecheckpoint.F90.
|
private |
Definition at line 278 of file writecheckpoint.F90.
|
private |
Will dump out (write) misc model data to the checkpoint.
current_state | The current model state_mod |
ncid | The NetCDF file id |
timestep_id | The NetCDF timestep variable id |
Definition at line 605 of file writecheckpoint.F90.
|
private |
Writes out the options that the model was run with.
current_state | The current model state_mod |
ncid | The NetCDF file id |
options_id | The options NetCDF variable id |
Definition at line 134 of file writecheckpoint.F90.
|
private |
Definition at line 674 of file writecheckpoint.F90.
|
private |
Writes out the specific Q indicies that are active and need writing.
ncid | The NetCDF file id |
q_indicies_id | The Q indicies NetCDF variable id |
Definition at line 113 of file writecheckpoint.F90.
|
private |
Will write out a single velocity field to the checkpoint file. If there are multiple processes then will determine the bounds, otherwise for serial just dump data field.
ncid | The NetCDF file id |
field | The model prognostic field to write out |
variable_id | The NetCDF variable dimension id |
Definition at line 208 of file writecheckpoint.F90.
|
private |
Writes out the Z dimension of the grids_mod points which are explicitly calculated.
ncid | The NetCDF file id |
verticalGrid | The vertical grid configuration |
z_id | The NetCDF id of the z field |
Definition at line 322 of file writecheckpoint.F90.
|
private |
Title of the NetCDF file.
Definition at line 31 of file writecheckpoint.F90.