Go to the documentation of this file.
5 use netcdf,
only : nf90_nowrite, nf90_netcdf4, nf90_mpiio, nf90_noerr, nf90_strerror, nf90_open, nf90_close, &
6 nf90_inq_dimid, nf90_inquire_dimension, nf90_inq_varid, nf90_get_var
11 use mpi,
only : mpi_info_null
19 character(len=*),
parameter ::
options_key=
"options_database", & !< The options key which references the configuration
31 character(*),
intent(in) :: checkpoint_name
32 integer,
intent(in) :: communicator
36 call check_netcdf_status(nf90_open(path = checkpoint_name, mode = nf90_nowrite, ncid = ncid))
46 integer,
intent(in) :: ncid
48 integer :: i, options_id, number_options
49 character(len=STRING_LENGTH) :: key, value
54 do i=1, number_options
67 call options_add(options_database, trim(key), trim(
value))
76 character(len=*),
intent(inout) :: net_cdf_string
78 do i=1,len(net_cdf_string)
79 if (iachar(net_cdf_string(i:i)) == 0)
then
80 net_cdf_string(i:len(net_cdf_string)) =
' '
90 integer,
intent(in) :: ncid
92 integer :: options_dimid, options_dim
integer, parameter, public log_error
Only log ERROR messages.
Conversion between common inbuilt FORTRAN data types.
NetCDF misc functionality which can be shared between modules that work with NetCDF files.
Determines whether a data item can be represented as a logical or not.
character(len= *), parameter options_dim_key
Options dimension key.
Converts data types to integers.
Loads in the configuration stored in a NetCDF checkpoint file for the model to start from.
Collection data structures.
A hashmap structure, the same as a map but uses hashing for greatly improved performance when storing...
Converts data types to logical.
Generic add interface for adding different types of data to the databases.
subroutine, public parse_configuration_checkpoint_netcdf(options_database, checkpoint_name, communicator)
Will parse the NetCDF checkpoint file and loads the configuration into the options database.
Determines whether a data item can be represented as a real or not.
Determines whether a data item can be represented as an integer or not.
integer function get_number_of_options(ncid)
Retrieves the number of option key-value pairs that are present in the checkpoint file.
subroutine remove_null_terminator_from_string(net_cdf_string)
Removes NetCDF C style null termination of string. This is placed right at the end,...
Contains common definitions for the data and datatypes used by MONC.
integer, parameter, public string_length
Default length of strings.
subroutine, public check_netcdf_status(status, found_flag)
Will check a NetCDF status and write to log_log error any decoded statuses. Can be used to decode whe...
subroutine, public log_master_log(level, message)
Will log just from the master process.
character(len= *), parameter options_key
The options key which references the configuration.
subroutine load_options(options_database, ncid)
Will read in and initialise the options database from the contents of the checkpoint file.
Converts data types to real.
Manages the options database. Contains administration functions and deduce runtime options from the c...
real(kind=double_precision) function, public conv_single_real_to_double(input_real)
Converts from a single to double precision real. This applies some rounding to a certain number of de...