V3FIT
|
Defines the base class of the type param_class. More...
Data Types | |
type | param_class |
Base class representing a reconstructed parameter. An upper and lower bound may be set for the parameter value. More... | |
interface | param_construct |
Interface for the construction of param_class types using param_construct_basic or param_construct_recon. More... | |
type | param_locking_class |
Class to hold variables needed when a parameter is a locking parameter. The locking parameter coefficents are stored in the correlation array of the parent type. More... | |
type | param_pointer |
Pointer to a parameter object. Used for creating arrays of signal pointers. This is needed because fortran does not allow arrays of pointers directly. More... | |
type | param_recon_class |
Class to hold variables needed when a parameter is a reconstruction parameter. More... | |
interface | param_write_step_data |
Interface for the writting of param_class data to the result file using param_write_step_data_1 or param_write_step_data_2. More... | |
Functions/Subroutines | |
type(param_class) function, pointer | param_construct_basic (a_model, param_name, indices, num_params) |
Construct a param_class object. More... | |
type(param_class) function, pointer | param_construct_recon (a_model, param_name, indices, vrnc, range_type, range_indices, range_value, num_signals, num_params) |
Construct a param_class object. More... | |
type(param_class) function, pointer | param_construct_locking (a_model, param_name, indices, set, set_indices, set_coeff, eq_comm) |
Construct a param_class object. More... | |
subroutine | param_destruct (this) |
Deconstruct a param_class object. More... | |
subroutine | param_set_value (this, a_model, value, eq_comm, is_central) |
Sets the parameter value. More... | |
subroutine | param_set_lock_value (this, a_model, eq_comm) |
Sets the locking parameter value. More... | |
real(rprec) function | param_get_value (this, a_model) |
Gets the parameter value. More... | |
character(len=data_name_length) function | param_get_name (this, a_model) |
Gets the parameter name. More... | |
real(rprec) function | param_get_lower_range_value (this, a_model) |
Gets the lower boundary value. More... | |
real(rprec) function | param_get_upper_range_value (this, a_model) |
Gets the upper boundary value. More... | |
character(len=data_name_length) function | param_get_lower_range_type (this, a_model) |
Gets the lower boundary type description. More... | |
character(len=data_name_length) function | param_get_upper_range_type (this, a_model) |
Gets the upper boundary type description. More... | |
logical function | param_is_in_lower_range (this, a_model, value) |
Checks if the value is in the lower range. More... | |
logical function | param_is_in_upper_range (this, a_model, value) |
Checks if the value is in the upper range. More... | |
subroutine | param_increment (this, a_model, eq_comm, is_central) |
Increments the parameter value. More... | |
subroutine | param_decrement (this, a_model, eq_comm) |
Decrements the parameter value. More... | |
subroutine | param_write (this, iou, index, a_model) |
Writes out a parameter to an output file. More... | |
subroutine | param_write_short (this, iou, index, a_model) |
Writes out a parameter to an output file. More... | |
subroutine | param_write_header (iou) |
Writes out parameter header information to an output file. More... | |
subroutine | param_write_header_short (iou) |
Writes out parameter header information to an output file. More... | |
subroutine | param_write_correlation (this, iou, a_model) |
Writes out a parameter covariance matrix row. More... | |
subroutine | param_write_step_data_1 (this, a_model, result_ncid, current_step, index, param_value_id, param_sigma_id, param_corr_id, param_sem_id) |
Write out the parameter data for a step to the result netcdf file. More... | |
subroutine | param_write_step_data_2 (this, a_model, result_ncid, current_step, index, param_value_id, param_sigma_id, param_corr_id) |
Write out the parameter data for a step to the result netcdf file. More... | |
subroutine | param_restart (this, a_model, result_ncid, current_step, index, param_value_id, param_sigma_id, param_corr_id, eq_comm, is_central) |
Restart the parameter. More... | |
subroutine | param_sync_value (this, a_model, recon_comm, eq_comm, is_central) |
Syncronize the param value to children. More... | |
subroutine | param_send_delta (this, index, recon_comm) |
Sends the delta used. More... | |
subroutine | param_recv_delta (this, index, recon_comm) |
Receives the delta used. More... | |
subroutine | param_sync_delta (this, recon_comm) |
Sync the delta used. More... | |
subroutine | param_sync_child (this, a_model, index, recon_comm, eq_comm, is_central) |
Sync the parameter value from a child to the parent. More... | |
Variables | |
integer, parameter | param_range_no_type = -1 |
No bounding type specified. | |
integer, parameter | param_range_value_type = 0 |
Parameter value is bounded by a value. | |
integer, parameter | param_range_infinity_type = 1 |
Parameter value is unbounded. | |
integer, parameter | param_range_parameter_type = 2 |
Parameter value is bounded by another parameter. | |
integer, parameter | param_max_increment_steps = 5 |
Maximum number of attemps to change the parameter increment size. | |
integer, parameter | param_div_factor = 10.0 |
Division factor to decrease the step size. | |
Defines the base class of the type param_class.
type (param_class) function, pointer v3fit_params::param_construct_basic | ( | type (model_class), intent(in) | a_model, |
character (len=*), intent(in) | param_name, | ||
integer, dimension(2), intent(in) | indices, | ||
integer, intent(in) | num_params | ||
) |
Construct a param_class object.
Allocates memory and initializes a param_class object. Parameters are converted from strings to an internal id representation by either the model or the equilibrium. This version is used to construct basic parameters.
[in] | a_model | An instance of a model object. |
[in] | param_name | The name of the parameter. |
[in] | indices | The array indices of the parameter. |
[in] | num_params | Number of parameters. USed to determine the size of the param_class::correlation arrays. |
Definition at line 171 of file v3fit_params.f.
type (param_class) function, pointer v3fit_params::param_construct_locking | ( | type (model_class), intent(inout) | a_model, |
character (len=*), intent(in) | param_name, | ||
integer, dimension(2), intent(in) | indices, | ||
character (len=*), dimension(:), intent(in) | set, | ||
integer, dimension(:,:), intent(in) | set_indices, | ||
real (rprec), dimension(:), intent(in) | set_coeff, | ||
integer, intent(in) | eq_comm | ||
) |
Construct a param_class object.
Allocates memory and initializes a param_class object. Parameters are converted from strings to an internal id representation by either the model or the equilibrium. This version is used to construct locking parameters.
[in] | a_model | An instance of a model object. |
[in] | param_name | The name of the parameter. |
[in] | indices | The array indices of the parameter. |
[in] | set | Array of parameters to lock to. |
[in] | set_indices | Array of parameters indices for parameters to lock to. |
[in] | set_coeff | Coefficients for the parameters to lock to. |
[in] | eq_comm | MPI communicator for the child equilibrium processes. |
Definition at line 355 of file v3fit_params.f.
type (param_class) function, pointer v3fit_params::param_construct_recon | ( | type (model_class), intent(in) | a_model, |
character (len=*), intent(in) | param_name, | ||
integer, dimension(2), intent(in) | indices, | ||
real (rprec), intent(in) | vrnc, | ||
character (len=*), dimension(2), intent(in) | range_type, | ||
integer, dimension(2,2), intent(in) | range_indices, | ||
real (rprec), dimension(2), intent(in) | range_value, | ||
integer, intent(in) | num_signals, | ||
integer, intent(in) | num_params | ||
) |
Construct a param_class object.
Allocates memory and initializes a param_class object. Parameters are converted from strings to an internal id representation by either the model or the equilibrium. This version is used to construct reconstruction parameters.
Parameter boundaries are specified by a range type. This range type may be one of three types. 'infinity' represents an unbounded case. 'value' represents a bounds by a fixed value. By specifying another parameter name, the boundary will be bounded by a fixed or varying parameter. The bounding parameter string is converted into an internal id representation.
[in] | a_model | An instance of a model object. |
[in] | param_name | The name of the parameter. |
[in] | indices | The array indices of the parameter. |
[in] | vrnc | The maximum incremental step size. |
[in] | range_type | Range type of the bounds. Values can be 'infinity', 'value' or the name of a parameter. |
[in] | range_indices | The array indices of the boundary parameter. |
[in] | range_value | Value of a boundary. |
[in] | num_signals | Number of signals. Used to determine the size of the param_recon_class::sem arrays. |
[in] | num_params | Number of parameters. Used to determine the size of the param_class::correlation arrays. |
Definition at line 233 of file v3fit_params.f.
subroutine v3fit_params::param_decrement | ( | type (param_class), intent(inout) | this, |
type (model_class), intent(inout) | a_model, | ||
integer, intent(in) | eq_comm | ||
) |
Decrements the parameter value.
The value is decremented by the delta. The incrementing function has already performed the bounds checking so there is no need to do that here.
[in] | this | A param_class instance. |
[in] | a_model | A model instance. |
[in] | eq_comm | MPI communicator for the child equilibrium processes. |
Definition at line 1084 of file v3fit_params.f.
subroutine v3fit_params::param_destruct | ( | type (param_class), pointer | this | ) |
Deconstruct a param_class object.
Deallocates memory and uninitializes a param_class object.
[in,out] | this | A param_class instance. |
Definition at line 420 of file v3fit_params.f.
character (len=data_name_length) function v3fit_params::param_get_lower_range_type | ( | type (param_class), intent(in) | this, |
type (model_class), intent(in) | a_model | ||
) |
Gets the lower boundary type description.
Gets lower boundary type description.
[in] | this | A param_class instance. |
[in] | a_model | A model instance. |
Definition at line 802 of file v3fit_params.f.
real (rprec) function v3fit_params::param_get_lower_range_value | ( | type (param_class), intent(in) | this, |
type (model_class), intent(in) | a_model | ||
) |
Gets the lower boundary value.
Gets lower boundary value. The results of this function are invalid if the bounding type is param_range_infinity_type or param_range_no_type.
[in] | this | A param_class instance. |
[in] | a_model | A model instance. |
Definition at line 717 of file v3fit_params.f.
character (len=data_name_length) function v3fit_params::param_get_name | ( | type (param_class), intent(in) | this, |
type (model_class), intent(in) | a_model | ||
) |
Gets the parameter name.
Converts the parameter id from either the model or the equilibrium.
[in] | this | A param_class instance. |
[in] | a_model | A model instance. |
Definition at line 686 of file v3fit_params.f.
character (len=data_name_length) function v3fit_params::param_get_upper_range_type | ( | type (param_class), intent(in) | this, |
type (model_class), intent(in) | a_model | ||
) |
Gets the upper boundary type description.
Gets upper boundary type description.
[in] | this | A param_class instance. |
[in] | a_model | A model instance. |
Definition at line 848 of file v3fit_params.f.
real (rprec) function v3fit_params::param_get_upper_range_value | ( | type (param_class), intent(in) | this, |
type (model_class), intent(in) | a_model | ||
) |
Gets the upper boundary value.
Gets upper boundary value. The results of this function are invalid if the bounding type is param_range_infinity_type or param_range_no_type.
[in] | this | A param_class instance. |
[in] | a_model | A model instance. |
Definition at line 760 of file v3fit_params.f.
real (rprec) function v3fit_params::param_get_value | ( | type (param_class), intent(in) | this, |
type (model_class), intent(in) | a_model | ||
) |
Gets the parameter value.
Gets the current parameter value from either the model or the equilibrium.
[in] | this | A param_class instance. |
[in] | a_model | A model instance. |
Definition at line 652 of file v3fit_params.f.
subroutine v3fit_params::param_increment | ( | type (param_class), intent(inout) | this, |
type (model_class), intent(inout) | a_model, | ||
integer, intent(in) | eq_comm, | ||
logical, intent(in) | is_central | ||
) |
Increments the parameter value.
The value is incremented by the vrnc. The incremented value is then checked if the new value is in range. If the value is out of range, the value is incremented in the opposite direction. If the incremented value is outside of both ranges, the step size value is halved and the procedure is repeated. Five attempts are made until the function quits with an error. If successful, the actual step size used is cached in param_recon_class::delta for normalization purposes.
If central differencing is used, both the upper and lower bounds must be checked. Starting with half the parameter vrnc, the change in parameter is divided until the change in parameter fits into both the upper and lower bounds.
[in] | this | A param_class instance. |
[in] | a_model | A model instance. |
[in] | eq_comm | MPI communicator for the child equilibrium processes. |
[in] | is_central | Central differencing is being used. |
Definition at line 986 of file v3fit_params.f.
logical function v3fit_params::param_is_in_lower_range | ( | type (param_class), intent(in) | this, |
type (model_class), intent(in) | a_model, | ||
real (rprec), intent(in) | value | ||
) |
Checks if the value is in the lower range.
If the value is less than the bounding value, the parameter value is out of range.
[in] | this | A param_class instance. |
[in] | a_model | A model instance. |
[in] | value | A parameter value to check. |
Definition at line 899 of file v3fit_params.f.
logical function v3fit_params::param_is_in_upper_range | ( | type (param_class), intent(in) | this, |
type (model_class), intent(in) | a_model, | ||
real (rprec), intent(in) | value | ||
) |
Checks if the value is in the upper range.
If the value is greater than the bounding value, the parameter value is out of range.
[in] | this | A param_class instance. |
[in] | a_model | A model instance. |
[in] | value | A parameter value to check. |
Definition at line 936 of file v3fit_params.f.
subroutine v3fit_params::param_recv_delta | ( | type (param_class), intent(inout) | this, |
integer, intent(in) | index, | ||
integer, intent(in) | recon_comm | ||
) |
Receives the delta used.
Receives the value of delta used in the child process. If MPI support is not compiled in this subroutine reduces to a no op.
[in,out] | this | A param_class instance. |
[in] | index | Index of the reconstruction parameter. |
[in] | recon_comm | A MPI recon_comm handle. |
Definition at line 1610 of file v3fit_params.f.
subroutine v3fit_params::param_restart | ( | type (param_class), intent(inout) | this, |
type (model_class), intent(inout) | a_model, | ||
integer, intent(in) | result_ncid, | ||
integer, intent(in) | current_step, | ||
integer, intent(in) | index, | ||
integer, intent(in) | param_value_id, | ||
integer, intent(in) | param_sigma_id, | ||
integer, intent(in) | param_corr_id, | ||
integer, intent(in) | eq_comm, | ||
logical, intent(in) | is_central | ||
) |
Restart the parameter.
Restarts a parameter from the result file. This reloads and sets the value, sigma and correlation. All other values are set when the namelist input file was read.
[in,out] | this | A param_class instance. |
[in] | a_model | The equilibrium model. |
[in] | result_ncid | Netcdf if for the result file. |
[in] | current_step | Step number to restart from. |
[in] | index | A index of a parameter. |
[in] | param_value_id | NetCDF variable id of the parameter value. |
[in] | param_sigma_id | NetCDF variable id of the parameter sigma. |
[in] | param_corr_id | NetCDF variable id of the parameter correlation. |
[in] | eq_comm | MPI communicator for the child equilibrium processes. |
[in] | is_central | Central differencing is being used. |
Definition at line 1456 of file v3fit_params.f.
subroutine v3fit_params::param_send_delta | ( | type (param_class), intent(inout) | this, |
integer, intent(in) | index, | ||
integer, intent(in) | recon_comm | ||
) |
Sends the delta used.
Sends the value of delta used in the child process to the parent process. If MPI support is not compiled in this subroutine reduces to a no op.
[in,out] | this | A param_class instance. |
[in] | index | Index of the reconstruction parameter. |
[in] | recon_comm | A MPI intra_comm handle. |
Definition at line 1568 of file v3fit_params.f.
subroutine v3fit_params::param_set_lock_value | ( | type (param_class), intent(in) | this, |
type (model_class), intent(inout) | a_model, | ||
integer, intent(in) | eq_comm | ||
) |
Sets the locking parameter value.
Sets the value of a locking parameter. These parameters are locked to a linear combination of other set parameters.
[in] | this | A param_class instance. |
[in,out] | a_model | A model instance. |
[in] | eq_comm | MPI communicator for the child equilibrium processes. |
Definition at line 597 of file v3fit_params.f.
subroutine v3fit_params::param_set_value | ( | type (param_class), intent(in) | this, |
type (model_class), intent(inout) | a_model, | ||
real (rprec), intent(in) | value, | ||
integer, intent(in) | eq_comm, | ||
logical, intent(in) | is_central | ||
) |
Sets the parameter value.
Sets the value of a reconstruction parameter. If the parameter is outside one of the bounding parameters, the value is clamped to the bounding value. The resulting bounded parameter value is set by ethier the model or the equilibrium.
If central differencing is used, both the upper and lower bounds must be checked. In this case both the upper and lower bounds need to be with in half the vrnc values. This ensures there is enough room to increment and decrement the values. If the bounds are so narrow such that the set value plus/minus half the vrnc is out of range of both bounds, then split the difference.
[in] | this | A param_class instance. |
[in,out] | a_model | A model instance. |
[in] | value | The value to set the parameter to. |
[in] | eq_comm | MPI communicator for the child equilibrium processes. |
[in] | is_central | Central differencing is being used. |
Definition at line 493 of file v3fit_params.f.
subroutine v3fit_params::param_sync_child | ( | type (param_class), intent(inout) | this, |
type (model_class), intent(inout) | a_model, | ||
integer, intent(in) | index, | ||
integer, intent(in) | recon_comm, | ||
integer, intent(in) | eq_comm, | ||
logical, intent(in) | is_central | ||
) |
Sync the parameter value from a child to the parent.
Syncs the value of delta from a child process to the parent. If MPI support is not compiled in this subroutine reduces to a no op.
[in,out] | this | A param_class instance. |
[in,out] | a_model | A model instance. |
[in] | index | Index of the reconstruction parameter. |
[in] | recon_comm | A MPI intra_comm handle. |
[in] | eq_comm | MPI communicator for the child equilibrium processes. |
[in] | is_central | Central differencing is being used. |
Definition at line 1685 of file v3fit_params.f.
subroutine v3fit_params::param_sync_delta | ( | type (param_class), intent(inout) | this, |
integer, intent(in) | recon_comm | ||
) |
Sync the delta used.
Syncs the value of delta from the parent process to the child. If MPI support is not compiled in this subroutine reduces to a no op.
[in,out] | this | A param_class instance. |
[in] | recon_comm | A MPI recon_comm handle. |
Definition at line 1645 of file v3fit_params.f.
subroutine v3fit_params::param_sync_value | ( | type (param_class), intent(inout) | this, |
type (model_class), intent(inout) | a_model, | ||
integer, intent(in) | recon_comm, | ||
integer, intent(in) | eq_comm, | ||
logical, intent(in) | is_central | ||
) |
Syncronize the param value to children.
Syncs data between the parent and child processes. If MPI support is not compiled in this subroutine reduces to a no op.
[in,out] | this | A param_class instance. |
[in,out] | a_model | A model instance. |
[in] | recon_comm | A MPI intra_comm handle. |
[in] | eq_comm | MPI communicator for the child equilibrium processes. |
[in] | is_central | Central differencing is being used. |
Definition at line 1519 of file v3fit_params.f.
subroutine v3fit_params::param_write | ( | type (param_class), intent(in) | this, |
integer, intent(in) | iou, | ||
integer, intent(in) | index, | ||
type (model_class), intent(in) | a_model | ||
) |
Writes out a parameter to an output file.
Parameter information is formated as the index, name, index 1, index2, value, sigma, vrnc, upper and lower range types, values, and range indices.
[in] | this | A param_class instance. |
[in] | iou | Input/output unit representing the file to write to. |
[in] | index | The index of a parameter. |
[in] | a_model | A model instance. |
Definition at line 1122 of file v3fit_params.f.
subroutine v3fit_params::param_write_correlation | ( | type (param_class), intent(in) | this, |
integer, intent(in) | iou, | ||
type (model_class), intent(in) | a_model | ||
) |
Writes out a parameter covariance matrix row.
Each parameter contains the row for it's covariance matrix. This write it out formatted as the name of the parameter up to 12 characters. This followed by each value spearated by 2 spaces and a 12 character number.
[in] | this | A param_class instance. |
[in] | iou | Input/output unit representing the file to write to. |
[in] | a_model | A model instance. |
Definition at line 1275 of file v3fit_params.f.
subroutine v3fit_params::param_write_header | ( | integer, intent(in) | iou | ) |
Writes out parameter header information to an output file.
Parameter information is formated as the index, name, index 1, index2, value, sigma, vrnc, upper and lower range types, values, and range indices. This is implmented as a static method and does not require a parameter instance. This should only be called once to produce a single header.
[in] | iou | A input/output representing the file to write to. |
Definition at line 1203 of file v3fit_params.f.
subroutine v3fit_params::param_write_header_short | ( | integer, intent(in) | iou | ) |
Writes out parameter header information to an output file.
Parameter information is formated as the index, name, index 1, index2, value and sigma. This is implmented as a static method and does not require a parameter instance. This should only be called once to produce a single header.
[in] | iou | A input/output representing the file to write to. |
Definition at line 1239 of file v3fit_params.f.
subroutine v3fit_params::param_write_short | ( | type (param_class), intent(in) | this, |
integer, intent(in) | iou, | ||
integer, intent(in) | index, | ||
type (model_class), intent(in) | a_model | ||
) |
Writes out a parameter to an output file.
Parameter information is formated as the index, name, index 1, index2, value and sigma.
[in] | this | A param_class instance. |
[in] | iou | Input/output unit representing the file to write to. |
[in] | index | The index of a parameter. |
[in] | a_model | A model instance. |
Definition at line 1167 of file v3fit_params.f.
subroutine v3fit_params::param_write_step_data_1 | ( | type (param_class), intent(in) | this, |
type (model_class), intent(in) | a_model, | ||
integer, intent(in) | result_ncid, | ||
integer, intent(in) | current_step, | ||
integer, intent(in) | index, | ||
integer, intent(in) | param_value_id, | ||
integer, intent(in) | param_sigma_id, | ||
integer, intent(in) | param_corr_id, | ||
integer, intent(in) | param_sem_id | ||
) |
Write out the parameter data for a step to the result netcdf file.
Writes out the parameter value, sigma and signal effectiveness matrix to the result file.
[in] | this | A param_class instance. |
[in] | a_model | The equilibrium model. |
[in] | result_ncid | A NetCDF id of the result file. |
[in] | current_step | The surrent reconstruction step. |
[in] | index | A index of a parameter. |
[in] | param_value_id | NetCDF variable id of the parameter value. |
[in] | param_sigma_id | NetCDF variable id of the parameter sigma. |
[in] | param_corr_id | NetCDF variable id of the parameter correlation. |
[in] | param_sem_id | NetCDF variable id of the parameter signal effectiveness. |
Definition at line 1330 of file v3fit_params.f.
subroutine v3fit_params::param_write_step_data_2 | ( | type (param_class), intent(in) | this, |
type (model_class), intent(in) | a_model, | ||
integer, intent(in) | result_ncid, | ||
integer, intent(in) | current_step, | ||
integer, intent(in) | index, | ||
integer, intent(in) | param_value_id, | ||
integer, intent(in) | param_sigma_id, | ||
integer, intent(in) | param_corr_id | ||
) |
Write out the parameter data for a step to the result netcdf file.
Writes out the parameter value and sigma to the result file.
[in] | this | A param_class instance. |
[in] | a_model | The equilibrium model. |
[in] | result_ncid | A NetCDF id of the result file. |
[in] | current_step | The surrent reconstruction step. |
[in] | index | A index of a parameter. |
[in] | param_value_id | NetCDF variable id of the parameter value. |
[in] | param_sigma_id | NetCDF variable id of the parameter sigma. |
[in] | param_corr_id | NetCDF variable id of the parameter correlation. |
Definition at line 1390 of file v3fit_params.f.