FishMet: Fish feeding and appetite model, OPEN EDITION  0.1
FishMet: Fish feeding and appetite model, OPEN EDITION
m_simulate.f90 File Reference

(16564)

The FishMet Model: Runtime behaviour of the model. More...

Go to the source code of this file.

Data Types

type  simulate::output_arrays_step_def
 This data structure keeps the output values for each time step. It should normally be instantiated as an allocatable array of the size equal to the total number of time steps in the model run. More...
 
type  simulate::output_stats_total_def
 Overall output statistics that are output from the model. More...
 

Modules

module  simulate
 Module that defines the runtime behaviour of the model.
 

Functions/Subroutines

pure integer(long) function simulate::total_timesteps (hours)
 Calculate the total number of time steps in the model from the number of hours. This in fact converts hours to seconds. More...
 
impure subroutine simulate::output_arrays_init (time_steps)
 Allocate model output arrays output_arrays. More...
 
impure subroutine simulate::output_arrays_update_step (this_fish, time_step, temperature)
 Update model output arrays output_arrays. More...
 
impure subroutine simulate::output_arrays_add_ingested (is_given, is_eaten, time_step, add_eaten)
 Update the cumulative count of food items ingested. This cannot normally be done in output_arrays_update_step() and requires an input argument. More...
 
impure subroutine simulate::output_arrays_save_csv (file_name, is_gui_dialog, is_write_error)
 Save the model output arrays to a CSV data file. More...
 
impure subroutine simulate::output_arrays_save_rate_data_csv (file_name, is_gui_dialog, is_write_error)
 Save the rate data arrays to a CSV data file. More...
 
impure subroutine simulate::csv_file_error_report (csv_handle, is_gui_dialog)
 Report CSV file write error. More...
 
impure subroutine simulate::stomach_transport_save_csv (csv_file)
 Save the stomach transport data pattern for a single food item. More...
 
impure subroutine simulate::appetite_function_save_csv (csv_file)
 Save the appetite function the_fish::appetite_func() pattern for plotting, testing or analysis. More...
 
pure character(len=:) function, allocatable simulate::model_output_stats_txt ()
 Produce a text string containing general model output statistics. More...
 
character(len=:) function, allocatable simulate::model_output_stats_row_csv (show_header)
 Produce a text string containing general model output statistics. More...
 
impure subroutine simulate::test_run ()
 The procedure below is TEMPORARY, for testing and debugging. More...
 
subroutine detailed_csv_output_open (file_name, csv_handle, total_columns)
 Open the CSV output file with the detailed step-wise data. Note that these detailed outputs are produced if ::is_logging_debug parameter is set to TRUE. More...
 
subroutine detailed_csv_output_close (csv_handle)
 Close the CSV output file with the detailed step-wise data. Note that these detailed outputs are produced if ::is_logging_debug parameter is set to TRUE. More...
 
subroutine detailed_csv_output_write_record (csv_handle, total_columns)
 Write the step-wise CSV output record with the actual data. Note that these detailed outputs are produced if ::is_logging_debug parameter is set to TRUE. More...
 
impure subroutine simulate::init_provisioning (time_steps)
 Initialise the food provisioning schedule / pattern. More...
 
impure integer function, dimension(:), allocatable simulate::get_food_schedule_display ()
 Determine the food schedule array for separate display and analysis The primary role of this function is to plan (produce and display) the food provisioning pattern before simulation in GUI. More...
 
real(srp) function, dimension(:), allocatable simulate::get_ingestion_ratio_waste (rate_unit)
 calculate the array of the consumption ratio, i.e. eaten/provided, so it is also easy to calculate the waste rate More...
 

Variables

logical, parameter simulate::is_extended_logging_debug_test = .FALSE.
 Flag for extended/detailed debug logging. More...
 
logical, parameter, private simulate::is_urinal_branchial_kj_day = .TRUE.
 Flag that defines how urinal and branchial energy loss (UE+ZE) is calculated for model output arrays. If TRUE, UE+ZE is computed in kJ per kg per day (default), otherwise, in O2 equivalent unit: mg O2 / kg/hour. More...
 
integer, public simulate::gui_idx_progress
 Progress bar widget ID for the GUI mode, needed to update at runtime. More...
 
type(output_arrays_step_def), dimension(:), allocatable, public simulate::output_arrays
 output_arrays instantiates the global data structure that keeps the model output arrays. More...
 
type(output_stats_total_def) simulate::output_stats
 output_stats instantiates non-array global data structure that keeps total model output statistics, that are not arrays by time step. More...
 

Detailed Description

The FishMet Model: Runtime behaviour of the model.

Definition in file m_simulate.f90.

Function/Subroutine Documentation

◆ detailed_csv_output_open()

subroutine test_run::detailed_csv_output_open ( character(len=*), intent(in)  file_name,
type(csv_file), intent(inout)  csv_handle,
integer, intent(out)  total_columns 
)

Open the CSV output file with the detailed step-wise data. Note that these detailed outputs are produced if ::is_logging_debug parameter is set to TRUE.

Definition at line 1081 of file m_simulate.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ detailed_csv_output_close()

subroutine test_run::detailed_csv_output_close ( type(csv_file), intent(inout)  csv_handle)

Close the CSV output file with the detailed step-wise data. Note that these detailed outputs are produced if ::is_logging_debug parameter is set to TRUE.

Definition at line 1162 of file m_simulate.f90.

Here is the caller graph for this function:

◆ detailed_csv_output_write_record()

subroutine test_run::detailed_csv_output_write_record ( type(csv_file), intent(inout)  csv_handle,
integer, intent(in)  total_columns 
)

Write the step-wise CSV output record with the actual data. Note that these detailed outputs are produced if ::is_logging_debug parameter is set to TRUE.

Note
Note that this subroutine is called each time step, so that a single row of data (CSV file record)) is written each time.

Definition at line 1174 of file m_simulate.f90.

Here is the call graph for this function:
Here is the caller graph for this function: