![]() |
MODFLOW 6
version 6.7.0.dev3
USGS Modular Hydrologic Model
|
This module contains helper routines and parameters for the MODFLOW 6 BMI.
Functions/Subroutines | |
| subroutine | split_address (c_var_address, mem_path, var_name, success) |
| Split the variable address string. More... | |
| subroutine | check_mem_address (mem_path, var_name, found) |
| Check if the variable exists in the memory manager. More... | |
| pure integer(i4b) function | strlen (char_array, max_len) |
| Returns the string length without the trailing null character. More... | |
| pure character(len=length) function | char_array_to_string (char_array, length) |
| Convert C-style string to Fortran character string. More... | |
| pure character(kind=c_char, len=1) function, dimension(length+1) | string_to_char_array (string, length) |
| Convert Fortran string to C-style character string. More... | |
| character(len=lenmodelname) function | extract_model_name (var_address, success) |
| Extract the model name from a memory address string. More... | |
| character(len=lenmodelname) function | get_model_name (grid_id) |
| Get the model name from the grid id. More... | |
| class(basesolutiontype) function, pointer | getsolution (subcomponent_idx) |
| Get the solution object for this index. More... | |
| subroutine | get_grid_type_model (model_name, grid_type_f) |
| Get the grid type for a named model as a fortran string. More... | |
| logical function | confirm_grid_type (grid_id, expected_type) |
| Confirm that grid is of an expected type. More... | |
Variables | |
| integer(i4b), parameter | lengridtype = 16 |
| max length for Fortran grid type string More... | |
| integer(c_int), bind(C, name="BMI_LENVARTYPE") | bmi_lenvartype = LENMEMTYPE + 1 |
| max. length for variable type C-strings More... | |
| integer(c_int), bind(C, name="BMI_LENGRIDTYPE") | bmi_lengridtype = LENGRIDTYPE + 1 |
| max. length for grid type C-strings More... | |
| integer(c_int), bind(C, name="BMI_LENVARADDRESS") | bmi_lenvaraddress = LENMEMADDRESS + 1 |
| max. length for the variable's address C-string More... | |
| integer(c_int), bind(C, name="BMI_LENCOMPONENTNAME") | bmi_lencomponentname = 256 |
| component name length, i.e. 'MODFLOW 6' More... | |
| integer(c_int), bind(C, name="BMI_LENVERSION") | bmi_lenversion = 256 |
| length of version string, e.g. '6.3.1' or '6.4.1-dev' More... | |
| pure character(len=length) function mf6bmiutil::char_array_to_string | ( | character(c_char), dimension(length), intent(in) | char_array, |
| integer(c_int), intent(in) | length | ||
| ) |
| [in] | length | string length without terminating null character |
| [in] | char_array | string to convert |
Definition at line 132 of file mf6bmiUtil.f90.

| subroutine mf6bmiutil::check_mem_address | ( | character(len=lenmempath), intent(in) | mem_path, |
| character(len=lenvarname), intent(in) | var_name, | ||
| logical(lgp), intent(out) | found | ||
| ) |
| [in] | mem_path | memory path used by the memory manager |
| [in] | var_name | name of the variable |
| [out] | found | true when found |
Definition at line 91 of file mf6bmiUtil.f90.


| logical function mf6bmiutil::confirm_grid_type | ( | integer(kind=c_int), intent(in) | grid_id, |
| character(len=*), intent(in) | expected_type | ||
| ) |
Definition at line 259 of file mf6bmiUtil.f90.


| character(len=lenmodelname) function mf6bmiutil::extract_model_name | ( | character(len=*), intent(in) | var_address, |
| logical(lgp), intent(out) | success | ||
| ) |
| [in] | var_address | the memory address for the variable |
Definition at line 165 of file mf6bmiUtil.f90.


| subroutine mf6bmiutil::get_grid_type_model | ( | character(len=lenmodelname) | model_name, |
| character(len=lengridtype) | grid_type_f | ||
| ) |
Definition at line 238 of file mf6bmiUtil.f90.


| character(len=lenmodelname) function mf6bmiutil::get_model_name | ( | integer(kind=c_int), intent(in) | grid_id | ) |
| [in] | grid_id | grid id |
Definition at line 190 of file mf6bmiUtil.f90.


| class(basesolutiontype) function, pointer mf6bmiutil::getsolution | ( | integer(i4b), intent(in) | subcomponent_idx | ) |
| [in] | subcomponent_idx | index of solution |
Definition at line 218 of file mf6bmiUtil.f90.


| subroutine mf6bmiutil::split_address | ( | character(kind=c_char), dimension(*), intent(in) | c_var_address, |
| character(len=lenmempath), intent(out) | mem_path, | ||
| character(len=lenvarname), intent(out) | var_name, | ||
| logical(lgp), intent(out) | success | ||
| ) |
Splits the full address string into a memory path and variable name, following the rules used by the memory manager. The error handling is inside to avoid lots of duplication
| [in] | c_var_address | full address of a variable |
| [out] | mem_path | memory path used by the memory manager |
| [out] | var_name | name of the variable |
| [out] | success | false when invalid |
Definition at line 53 of file mf6bmiUtil.f90.


| pure character(kind=c_char, len=1) function, dimension(length + 1) mf6bmiutil::string_to_char_array | ( | character(len=length), intent(in) | string, |
| integer(c_int), intent(in) | length | ||
| ) |
| [in] | length | Fortran string length |
| [in] | string | string to convert |
Definition at line 148 of file mf6bmiUtil.f90.

| pure integer(i4b) function mf6bmiutil::strlen | ( | character(c_char), dimension(max_len), intent(in) | char_array, |
| integer(i4b), intent(in) | max_len | ||
| ) |
| [in] | char_array | C-style character string |
Definition at line 112 of file mf6bmiUtil.f90.

| integer(c_int), bind(C, name="BMI_LENCOMPONENTNAME") mf6bmiutil::bmi_lencomponentname = 256 |
Definition at line 38 of file mf6bmiUtil.f90.
| integer(c_int), bind(C, name="BMI_LENGRIDTYPE") mf6bmiutil::bmi_lengridtype = LENGRIDTYPE + 1 |
Definition at line 30 of file mf6bmiUtil.f90.
| integer(c_int), bind(C, name="BMI_LENVARADDRESS") mf6bmiutil::bmi_lenvaraddress = LENMEMADDRESS + 1 |
Definition at line 34 of file mf6bmiUtil.f90.
| integer(c_int), bind(C, name="BMI_LENVARTYPE") mf6bmiutil::bmi_lenvartype = LENMEMTYPE + 1 |
Definition at line 26 of file mf6bmiUtil.f90.
| integer(c_int), bind(C, name="BMI_LENVERSION") mf6bmiutil::bmi_lenversion = 256 |
Definition at line 42 of file mf6bmiUtil.f90.
| integer(i4b), parameter mf6bmiutil::lengridtype = 16 |
Definition at line 24 of file mf6bmiUtil.f90.