-
Couldn't load subscription status.
- Fork 8
Description
I was able to diagnose the cause of segmentation fault:
When simExposed == false, the data%id_drytime diagnostic and data%id_atemp environment link are not defined.
libaed-water/src/aed_carbon.F90
Line 350 in 4842d50
| data%id_drytime = aed_define_sheet_diag_variable('drytime','d','time cell has been exposed') |
libaed-water/src/aed_carbon.F90
Line 400 in 4842d50
| IF( data%simExposed ) data%id_atemp = aed_locate_sheet_global('air_temp') |
Yet they are used in aed_calculate_riparian_carbon without a check for simExposed == false
and
libaed-water/src/aed_carbon.F90
Line 969 in 4842d50
| atemp = _STATE_VAR_S_(data%id_atemp) ! local air temperature |
I am happy to do a PR to fix this but I am not sure what behavoir you want. Do you want the diagnostic and environment link to occur regardless of the value for simExposed or do you want the lines in aed_calculate_riparian_carbon to be run only if simExposed == false