FishMet: Fish feeding and appetite model, OPEN EDITION
0.1
FishMet: Fish feeding and appetite model, OPEN EDITION
|
Module defining the environment. More...
Data Types | |
type | food_item |
Defines the food item. More... | |
Functions/Subroutines | |
elemental subroutine | food_item_init (this, mass) |
Initialise the food item with its parameters. More... | |
elemental subroutine | food_item_copy_assign_to (this, what_to_copy) |
Copy what_to_copy object to this (target) object. More... | |
impure class(food_item) function, pointer | food_item_schedule_feed (this, time_step, is_provided) |
Schedule the provision of food items depending on the time step. It returns a pointer to the food item class object if food is given or null pointer otherwise. More... | |
impure subroutine | food_provisioning_pattern_init (max_steps) |
Initialise and set up the global food provisioning pattern array commondata::global_interval_food_pattern given the day:night pattern commondata::global_hours_daytime_feeding. Note that feeding can occur only during the daytime. More... | |
impure subroutine | food_provisioning_get_file (max_steps, csv_file, column, is_single) |
Read the food provisioning pattern from a CSV file. This allows to get any arbitrary pattern of food input. The input CSV file encodes data by minute. There, 1 or any other non-zero value means that food is provided during the minute interval, 0 means that food is not provided. The file can describe by-minute pattern for 24 h or more if is_single is TRUE . The pattern is then propagated for all 24 h periods described by the max_steps parameter. More... | |
impure subroutine | food_provisioning_get_raw (max_steps, csv_file, column, is_single) |
Read the food provisioning pattern from a CSV file in raw format by s. This allows to get any arbitrary pattern of food input. Unlike the food_provisioning_get_file() subroutine, this procedure accepts the food provisioning data in the raw format equal to the model time step i.e. s (second). There, 1 or any other non-zero value means that food is provided during the time step while 0 means that food is not provided. The file can any duration within or exceeding 24 h period. Any data over 24 h are accepted only if is_single is TRUE . More... | |
elemental logical function | schedule_2_int (check_n, int1, int2) |
Schedule two intervals N1 = food given, steps, N2 = gap, steps. More... | |
elemental logical function | is_day (time_step) |
Determine if the time step corresponds to day (returns true) or night (returns false). More... | |
Module defining the environment.
elemental subroutine environ::food_item_init | ( | class(food_item), intent(inout) | this, |
real(srp), intent(in), optional | mass | ||
) |
elemental subroutine environ::food_item_copy_assign_to | ( | class(food_item), intent(inout) | this, |
class(food_item), intent(in) | what_to_copy | ||
) |
Copy what_to_copy
object to this
(target) object.
thismass = food_item_inmass
, but if the base class includes several components (e.g. energetic value), an explicit copy
method is beneficial. assignment(=)
) is dangerous as it will then apply to any higher-order hierarchy objects. These will therefore not copy all data components on normal =
assignment, resulting in cryptic errors. impure class(food_item) function, pointer environ::food_item_schedule_feed | ( | class(food_item), intent(in), target | this, |
integer(long), intent(in), optional | time_step, | ||
logical, intent(out), optional | is_provided | ||
) |
Schedule the provision of food items depending on the time step. It returns a pointer to the food item class object if food is given or null pointer otherwise.
[in] | this | Any derivative of the ::food_item object |
[in] | time_step | Optional time step, if not provided the global commondata::global_time_step is used |
[out] | is_provided | Optional output indicator that shows if the food item is provided. |
TODO: The rule for scheduling the food items is here
Definition at line 74 of file m_env.f90.
impure subroutine environ::food_provisioning_pattern_init | ( | integer(long), intent(in) | max_steps | ) |
Initialise and set up the global food provisioning pattern array commondata::global_interval_food_pattern given the day:night pattern commondata::global_hours_daytime_feeding. Note that feeding can occur only during the daytime.
Definition at line 122 of file m_env.f90.
impure subroutine environ::food_provisioning_get_file | ( | integer(long), intent(in) | max_steps, |
character(len=*), intent(in) | csv_file, | ||
integer, intent(in), optional | column, | ||
logical, intent(in), optional | is_single | ||
) |
Read the food provisioning pattern from a CSV file. This allows to get any arbitrary pattern of food input. The input CSV file encodes data by minute. There, 1 or any other non-zero value means that food is provided during the minute interval, 0 means that food is not provided. The file can describe by-minute pattern for 24 h or more if is_single
is TRUE
. The pattern is then propagated for all 24 h periods described by the max_steps
parameter.
[in] | max_steps | Maximum number of the time steps of the model, normally commondata::global_run_model_hours(). |
[in] | csv_file | Input file name |
[in] | column | Optional column number in the CSV data file. Default is column 1. |
[in] | is_single | Optional parameter flag that determines if the feeding schedule pattern from the data file csv_file is applied only once for the first 24 h period (TRUE) or propagated to each 24 h period (FALSE). The default value is FALSE |
impure subroutine environ::food_provisioning_get_raw | ( | integer(long), intent(in) | max_steps, |
character(len=*), intent(in) | csv_file, | ||
integer, intent(in), optional | column, | ||
logical, intent(in), optional | is_single | ||
) |
Read the food provisioning pattern from a CSV file in raw format by s. This allows to get any arbitrary pattern of food input. Unlike the food_provisioning_get_file() subroutine, this procedure accepts the food provisioning data in the raw format equal to the model time step i.e. s (second). There, 1 or any other non-zero value means that food is provided during the time step while 0 means that food is not provided. The file can any duration within or exceeding 24 h period. Any data over 24 h are accepted only if is_single
is TRUE
.
[in] | max_steps | Maximum number of the time steps of the model, normally commondata::global_run_model_hours(). |
[in] | csv_file | Input file name |
[in] | column | Optional column number in the CSV data file. Default is column 1. |
[in] | is_single | Optional parameter flag that determines if the feeding schedule pattern from the data file csv_file is applied only once for the first 24 h period (TRUE) or propagated to each 24 h period (FALSE). The default value is FALSE |
elemental logical function environ::schedule_2_int | ( | integer(long), intent(in) | check_n, |
integer, intent(in) | int1, | ||
integer, intent(in) | int2 | ||
) |
Schedule two intervals N1 = food given, steps, N2 = gap, steps.
N1 N2 N1 N2 +----+----------+----+----------+ ... ^check_n
[in] | check_n | Value to be checked, normally raw time steps |
[in] | int1 | The length of the interval when the food is provided, raw steps |
[in] | int2 | The length of the interval when the food id not provided, raw steps |
check_n
is within the int1
interval, otherwise FALSE. Definition at line 415 of file m_env.f90.
elemental logical function environ::is_day | ( | integer(long), intent(in), optional | time_step | ) |
Determine if the time step corresponds to day (returns true) or night (returns false).
[in] | time_step | Optional time step, if absent determine is it day or night for commondata::global_time_step |
Definition at line 445 of file m_env.f90.