PRMS variables can't be accessed with c_loc in surface component BMI
Created by: mdpiper
There are several variables used in the surface component BMI that can't be accessed with the c_loc
function in PRMS. To allow access, either PRMS or the BMI will have to be tweaked.
The first group are type components in PRMS:
- basin_area_inv
- last_intcp_stor
- nlake
- active_hrus
- nhru
- nmonths
- srunoff_updated_soil
Each of these lacks the pointer
attribute. For example, here's how basin_area_inv
is defined in c_basin.f90:
real(r64) :: basin_area_inv
The pointer
attr is needed for accessing the variable using the c_loc
function in the BMI. Further, the variables don't have the allocatable
attr; because many of the type components were set up as allocatable in PRMS, it made it easy to convert them into pointers.
There's a second group of type components, all from the Control
class:
- cascade_flag%value
- dprst_flag%value
- print_debug%value
- gsflow_mode
These also lack the pointer
attribute, so they can't be accessed with c_loc
.
The last variable is nowtime
. It also isn't a pointer, and it doesn't have a grid in the BMI.
- nowtime