MONC
Functions/Subroutines | Variables
checkpointer_common_mod Module Reference

Common checkpoint functionality which is used by reader and writers to NetCDF checkpoints. More...

Functions/Subroutines

subroutine check_status (status, found_flag)
 Will check a NetCDF status and write to log_log error any decoded statuses. Can be used to decode whether a dimension or variable exists within the NetCDF data file. More...
 
subroutine remove_null_terminator_from_string (net_cdf_string)
 Removes NetCDF C style null termination of string. This is placed right at the end, after any spaces so trim will not actually trim any spaces due to null terminator. More...
 

Variables

character(len= *), parameter x_dim_key = "x"
 X dimension/variable key. More...
 
character(len= *), parameter y_dim_key ="y"
 Y dimension/variable key. More...
 
character(len= *), parameter z_dim_key ="z"
 Z dimension/variable key. More...
 
character(len= *), parameter zn_dim_key ="zn"
 
character(len= *), parameter q_dim_key ="q"
 
character(len= *), parameter u_key = "u_nogal"
 U variable NetCDF key. More...
 
character(len= *), parameter v_key = "v_nogal"
 V variable NetCDF key. More...
 
character(len= *), parameter w_key = "w"
 W variable NetCDF key. More...
 
character(len= *), parameter q_key = "q"
 Q variable NetCDF key. More...
 
character(len= *), parameter zu_key = "zu"
 
character(len= *), parameter zv_key = "zv"
 
character(len= *), parameter zw_key = "zw"
 
character(len= *), parameter zq_key = "zq"
 
character(len= *), parameter x_key = "x"
 
character(len= *), parameter y_key = "y"
 
character(len= *), parameter z_key = "z"
 
character(len= *), parameter zn_key ="zn"
 
character(len= *), parameter th_key = "th"
 Theta variable NetCDF key. More...
 
character(len= *), parameter zth_key = "zth"
 
character(len= *), parameter p_key = "p"
 Pressure variable NetCDF key. More...
 
character(len= *), parameter timestep ="timestep"
 Timestep NetCDF key. More...
 
character(len= *), parameter time_key ="time"
 
character(len= *), parameter dtm_key ="dtm"
 
character(len= *), parameter dtm_new_key ="dtm_new"
 
character(len= *), parameter absolute_new_dtm_key ="absolute_new_dtm"
 
character(len= *), parameter ugal ="ugal"
 
character(len= *), parameter vgal ="vgal"
 
character(len= *), parameter empty_dim_key ="empty_dim"
 Empty dimension key. More...
 
character(len= *), parameter key_value_pair_key ="kvp"
 Key-value pair dimension key. More...
 
character(len= *), parameter options_dim_key ="number_options"
 Options dimension key. More...
 
character(len= *), parameter options_key ="options_database"
 Options variable key. More...
 
character(len= *), parameter string_dim_key ="string"
 String dimension key. More...
 
character(len= *), parameter title_attribute_key ="title"
 
character(len= *), parameter created_attribute_key ="created"
 
character(len= *), parameter nqfields ="nqfields"
 
character(len= *), parameter q_indices_dim_key ="active_q_indicies"
 
character(len= *), parameter q_indices_key ="q_indicies"
 
character(len= *), parameter x_resolution ="x_resolution"
 
character(len= *), parameter y_resolution ="y_resolution"
 
character(len= *), parameter x_top ="x_top"
 
character(len= *), parameter y_top ="y_top"
 
character(len= *), parameter x_bottom ="x_bottom"
 
character(len= *), parameter y_bottom ="y_bottom"
 
character(len= *), parameter q_field_anonymous_name ="q_qfield"
 
character(len= *), parameter zq_field_anonymous_name ="zq_qfield"
 
character(len= *), parameter thref ="thref"
 
character(len= *), parameter olubar ="olubar"
 
character(len= *), parameter olzubar ="olzubar"
 
character(len= *), parameter olvbar ="olvbar"
 
character(len= *), parameter olzvbar ="olzvbar"
 
character(len= *), parameter olthbar ="olthbar"
 
character(len= *), parameter olzthbar ="olzthbar"
 
character(len= *), parameter olqbar ="olqbar"
 
character(len= *), parameter olqbar_anonymous_name ="olqbar_qfield"
 
character(len= *), parameter olzqbar ="olzqbar"
 
character(len= *), parameter olzqbar_anonymous_name ="olzqbar_qfield"
 
character(len= *), parameter rad_last_time_key ="rad_last_time"
 
character(len= *), parameter sth_lw_key ="sth_lw"
 
character(len= *), parameter sth_sw_key ="sth_sw"
 
character(len= *), parameter wup ='w_up'
 
character(len= *), parameter wdwn ='w_dwn'
 
integer, parameter max_string_length = 100
 Maximum string length (stored size) More...
 

Detailed Description

Common checkpoint functionality which is used by reader and writers to NetCDF checkpoints.

Function/Subroutine Documentation

◆ check_status()

subroutine checkpointer_common_mod::check_status ( integer, intent(in)  status,
logical, intent(out), optional  found_flag 
)

Will check a NetCDF status and write to log_log error any decoded statuses. Can be used to decode whether a dimension or variable exists within the NetCDF data file.

Parameters
statusThe NetCDF status flag
foundFlagWhether the field has been found or not

Definition at line 81 of file checkpointcommon.F90.

82  integer, intent(in) :: status
83  logical, intent(out), optional :: found_flag
84 
85  if (present(found_flag)) then
86  found_flag = status /= nf90_ebaddim .and. status /= nf90_enotatt .and. status /= nf90_enotvar
87  if (.not. found_flag) return
88  end if
89 
90  if (status /= nf90_noerr) then
91  call log_log(log_error, "NetCDF returned error code of "//trim(nf90_strerror(status)))
92  end if
Here is the call graph for this function:
Here is the caller graph for this function:

◆ remove_null_terminator_from_string()

subroutine checkpointer_common_mod::remove_null_terminator_from_string ( character(len=*), intent(inout)  net_cdf_string)

Removes NetCDF C style null termination of string. This is placed right at the end, after any spaces so trim will not actually trim any spaces due to null terminator.

Parameters
netCDFStringThe NetCDF string to remove the null terminator from which is modified

Definition at line 98 of file checkpointcommon.F90.

99  character(len=*), intent(inout) :: net_cdf_string
100  integer :: i
101  do i=1,len(net_cdf_string)
102  if (iachar(net_cdf_string(i:i)) == 0) then
103  net_cdf_string(i:len(net_cdf_string)) = ' '
104  exit
105  end if
106  end do
Here is the caller graph for this function:

Variable Documentation

◆ absolute_new_dtm_key

character(len=*), parameter checkpointer_common_mod::absolute_new_dtm_key ="absolute_new_dtm"

Definition at line 11 of file checkpointcommon.F90.

◆ created_attribute_key

character(len=*), parameter checkpointer_common_mod::created_attribute_key ="created"

Definition at line 11 of file checkpointcommon.F90.

◆ dtm_key

character(len=*), parameter checkpointer_common_mod::dtm_key ="dtm"

Definition at line 11 of file checkpointcommon.F90.

◆ dtm_new_key

character(len=*), parameter checkpointer_common_mod::dtm_new_key ="dtm_new"

Definition at line 11 of file checkpointcommon.F90.

◆ empty_dim_key

character(len=*), parameter checkpointer_common_mod::empty_dim_key ="empty_dim"

Empty dimension key.

Definition at line 11 of file checkpointcommon.F90.

◆ key_value_pair_key

character(len=*), parameter checkpointer_common_mod::key_value_pair_key ="kvp"

Key-value pair dimension key.

Definition at line 11 of file checkpointcommon.F90.

◆ max_string_length

integer, parameter checkpointer_common_mod::max_string_length = 100

Maximum string length (stored size)

Definition at line 73 of file checkpointcommon.F90.

73  integer, parameter :: MAX_STRING_LENGTH = 100

◆ nqfields

character(len=*), parameter checkpointer_common_mod::nqfields ="nqfields"

Definition at line 11 of file checkpointcommon.F90.

◆ olqbar

character(len=*), parameter checkpointer_common_mod::olqbar ="olqbar"

Definition at line 11 of file checkpointcommon.F90.

◆ olqbar_anonymous_name

character(len=*), parameter checkpointer_common_mod::olqbar_anonymous_name ="olqbar_qfield"

Definition at line 11 of file checkpointcommon.F90.

◆ olthbar

character(len=*), parameter checkpointer_common_mod::olthbar ="olthbar"

Definition at line 11 of file checkpointcommon.F90.

◆ olubar

character(len=*), parameter checkpointer_common_mod::olubar ="olubar"

Definition at line 11 of file checkpointcommon.F90.

◆ olvbar

character(len=*), parameter checkpointer_common_mod::olvbar ="olvbar"

Definition at line 11 of file checkpointcommon.F90.

◆ olzqbar

character(len=*), parameter checkpointer_common_mod::olzqbar ="olzqbar"

Definition at line 11 of file checkpointcommon.F90.

◆ olzqbar_anonymous_name

character(len=*), parameter checkpointer_common_mod::olzqbar_anonymous_name ="olzqbar_qfield"

Definition at line 11 of file checkpointcommon.F90.

◆ olzthbar

character(len=*), parameter checkpointer_common_mod::olzthbar ="olzthbar"

Definition at line 11 of file checkpointcommon.F90.

◆ olzubar

character(len=*), parameter checkpointer_common_mod::olzubar ="olzubar"

Definition at line 11 of file checkpointcommon.F90.

◆ olzvbar

character(len=*), parameter checkpointer_common_mod::olzvbar ="olzvbar"

Definition at line 11 of file checkpointcommon.F90.

◆ options_dim_key

character(len=*), parameter checkpointer_common_mod::options_dim_key ="number_options"

Options dimension key.

Definition at line 11 of file checkpointcommon.F90.

◆ options_key

character(len=*), parameter checkpointer_common_mod::options_key ="options_database"

Options variable key.

Definition at line 11 of file checkpointcommon.F90.

◆ p_key

character(len=*), parameter checkpointer_common_mod::p_key = "p"

Pressure variable NetCDF key.

Definition at line 11 of file checkpointcommon.F90.

◆ q_dim_key

character(len=*), parameter checkpointer_common_mod::q_dim_key ="q"

Definition at line 11 of file checkpointcommon.F90.

◆ q_field_anonymous_name

character(len=*), parameter checkpointer_common_mod::q_field_anonymous_name ="q_qfield"

Definition at line 11 of file checkpointcommon.F90.

◆ q_indices_dim_key

character(len=*), parameter checkpointer_common_mod::q_indices_dim_key ="active_q_indicies"

Definition at line 11 of file checkpointcommon.F90.

◆ q_indices_key

character(len=*), parameter checkpointer_common_mod::q_indices_key ="q_indicies"

Definition at line 11 of file checkpointcommon.F90.

◆ q_key

character(len=*), parameter checkpointer_common_mod::q_key = "q"

Q variable NetCDF key.

Definition at line 11 of file checkpointcommon.F90.

◆ rad_last_time_key

character(len=*), parameter checkpointer_common_mod::rad_last_time_key ="rad_last_time"

Definition at line 11 of file checkpointcommon.F90.

◆ sth_lw_key

character(len=*), parameter checkpointer_common_mod::sth_lw_key ="sth_lw"

Definition at line 11 of file checkpointcommon.F90.

◆ sth_sw_key

character(len=*), parameter checkpointer_common_mod::sth_sw_key ="sth_sw"

Definition at line 11 of file checkpointcommon.F90.

◆ string_dim_key

character(len=*), parameter checkpointer_common_mod::string_dim_key ="string"

String dimension key.

Definition at line 11 of file checkpointcommon.F90.

◆ th_key

character(len=*), parameter checkpointer_common_mod::th_key = "th"

Theta variable NetCDF key.

Definition at line 11 of file checkpointcommon.F90.

◆ thref

character(len=*), parameter checkpointer_common_mod::thref ="thref"

Definition at line 11 of file checkpointcommon.F90.

◆ time_key

character(len=*), parameter checkpointer_common_mod::time_key ="time"

Definition at line 11 of file checkpointcommon.F90.

◆ timestep

character(len=*), parameter checkpointer_common_mod::timestep ="timestep"

Timestep NetCDF key.

Definition at line 11 of file checkpointcommon.F90.

◆ title_attribute_key

character(len=*), parameter checkpointer_common_mod::title_attribute_key ="title"

Definition at line 11 of file checkpointcommon.F90.

◆ u_key

character(len=*), parameter checkpointer_common_mod::u_key = "u_nogal"

U variable NetCDF key.

Definition at line 11 of file checkpointcommon.F90.

◆ ugal

character(len=*), parameter checkpointer_common_mod::ugal ="ugal"

Definition at line 11 of file checkpointcommon.F90.

◆ v_key

character(len=*), parameter checkpointer_common_mod::v_key = "v_nogal"

V variable NetCDF key.

Definition at line 11 of file checkpointcommon.F90.

◆ vgal

character(len=*), parameter checkpointer_common_mod::vgal ="vgal"

Definition at line 11 of file checkpointcommon.F90.

◆ w_key

character(len=*), parameter checkpointer_common_mod::w_key = "w"

W variable NetCDF key.

Definition at line 11 of file checkpointcommon.F90.

◆ wdwn

character(len=*), parameter checkpointer_common_mod::wdwn ='w_dwn'

Definition at line 11 of file checkpointcommon.F90.

◆ wup

character(len=*), parameter checkpointer_common_mod::wup ='w_up'

Definition at line 11 of file checkpointcommon.F90.

◆ x_bottom

character(len=*), parameter checkpointer_common_mod::x_bottom ="x_bottom"

Definition at line 11 of file checkpointcommon.F90.

◆ x_dim_key

character(len=*), parameter checkpointer_common_mod::x_dim_key = "x"

X dimension/variable key.

Definition at line 11 of file checkpointcommon.F90.

11  character(len=*), parameter :: X_DIM_KEY = "x", & !< X dimension/variable key
12  y_dim_key="y", &
13  z_dim_key="z", &
14  zn_dim_key="zn", &
15  q_dim_key="q", &
16  u_key = "u_nogal", &
17  v_key = "v_nogal", &
18  w_key = "w", &
19  q_key = "q", &
20  zu_key = "zu", &
21  zv_key = "zv", &
22  zw_key = "zw" , &
23  zq_key = "zq", &
24  x_key = "x", &
25  y_key = "y", &
26  z_key = "z", &
27  zn_key="zn", &
28  th_key = "th", &
29  zth_key = "zth", &
30  p_key = "p", &
31  timestep="timestep", &
32  time_key="time",&
33  dtm_key="dtm",&
34  dtm_new_key="dtm_new",&
35  absolute_new_dtm_key="absolute_new_dtm",&
36  ugal="ugal",&
37  vgal="vgal",&
38  empty_dim_key="empty_dim", &
39  key_value_pair_key="kvp", &
40  options_dim_key="number_options", &
41  options_key="options_database", &
42  string_dim_key="string",&
43  title_attribute_key="title",&
44  created_attribute_key="created",&
45  nqfields="nqfields", &
46  q_indices_dim_key="active_q_indicies", &
47  q_indices_key="q_indicies", &
48  x_resolution="x_resolution", &
49  y_resolution="y_resolution", &
50  x_top="x_top", &
51  y_top="y_top", &
52  x_bottom="x_bottom", &
53  y_bottom="y_bottom", &
54  q_field_anonymous_name="q_qfield", &
55  zq_field_anonymous_name="zq_qfield", &
56  thref="thref", &
57  olubar="olubar", &
58  olzubar="olzubar", &
59  olvbar="olvbar", &
60  olzvbar="olzvbar", &
61  olthbar="olthbar", &
62  olzthbar="olzthbar", &
63  olqbar="olqbar", &
64  olqbar_anonymous_name="olqbar_qfield", &
65  olzqbar="olzqbar", &
66  olzqbar_anonymous_name="olzqbar_qfield", &
67  rad_last_time_key="rad_last_time", &
68  sth_lw_key="sth_lw", &
69  sth_sw_key="sth_sw", &
70  wup='w_up', &
71  wdwn='w_dwn'

◆ x_key

character(len=*), parameter checkpointer_common_mod::x_key = "x"

Definition at line 11 of file checkpointcommon.F90.

◆ x_resolution

character(len=*), parameter checkpointer_common_mod::x_resolution ="x_resolution"

Definition at line 11 of file checkpointcommon.F90.

◆ x_top

character(len=*), parameter checkpointer_common_mod::x_top ="x_top"

Definition at line 11 of file checkpointcommon.F90.

◆ y_bottom

character(len=*), parameter checkpointer_common_mod::y_bottom ="y_bottom"

Definition at line 11 of file checkpointcommon.F90.

◆ y_dim_key

character(len=*), parameter checkpointer_common_mod::y_dim_key ="y"

Y dimension/variable key.

Definition at line 11 of file checkpointcommon.F90.

◆ y_key

character(len=*), parameter checkpointer_common_mod::y_key = "y"

Definition at line 11 of file checkpointcommon.F90.

◆ y_resolution

character(len=*), parameter checkpointer_common_mod::y_resolution ="y_resolution"

Definition at line 11 of file checkpointcommon.F90.

◆ y_top

character(len=*), parameter checkpointer_common_mod::y_top ="y_top"

Definition at line 11 of file checkpointcommon.F90.

◆ z_dim_key

character(len=*), parameter checkpointer_common_mod::z_dim_key ="z"

Z dimension/variable key.

Definition at line 11 of file checkpointcommon.F90.

◆ z_key

character(len=*), parameter checkpointer_common_mod::z_key = "z"

Definition at line 11 of file checkpointcommon.F90.

◆ zn_dim_key

character(len=*), parameter checkpointer_common_mod::zn_dim_key ="zn"

Definition at line 11 of file checkpointcommon.F90.

◆ zn_key

character(len=*), parameter checkpointer_common_mod::zn_key ="zn"

Definition at line 11 of file checkpointcommon.F90.

◆ zq_field_anonymous_name

character(len=*), parameter checkpointer_common_mod::zq_field_anonymous_name ="zq_qfield"

Definition at line 11 of file checkpointcommon.F90.

◆ zq_key

character(len=*), parameter checkpointer_common_mod::zq_key = "zq"

Definition at line 11 of file checkpointcommon.F90.

◆ zth_key

character(len=*), parameter checkpointer_common_mod::zth_key = "zth"

Definition at line 11 of file checkpointcommon.F90.

◆ zu_key

character(len=*), parameter checkpointer_common_mod::zu_key = "zu"

Definition at line 11 of file checkpointcommon.F90.

◆ zv_key

character(len=*), parameter checkpointer_common_mod::zv_key = "zv"

Definition at line 11 of file checkpointcommon.F90.

◆ zw_key

character(len=*), parameter checkpointer_common_mod::zw_key = "zw"

Definition at line 11 of file checkpointcommon.F90.

logging_mod::log_error
integer, parameter, public log_error
Only log ERROR messages.
Definition: logging.F90:11
logging_mod::log_log
subroutine, public log_log(level, message, str)
Logs a message at the specified level. If the level is above the current level then the message is ig...
Definition: logging.F90:75