NOAA-CEFI-Regional-Ocean-Modeling / ocean_BGC

3 stars 4 forks source link

Incomplete removal of wc_vert_int_chemoautopp #76

Closed andrew-c-ross closed 14 hours ago

andrew-c-ross commented 3 days ago

66 removed most parts of the code that involve cobalt%wc_vert_int_chemoautopp. However, a few vestiges remain and will cause a mysterious error if wc_vert_int_chemoautopp is included in the diag_table.

https://github.com/NOAA-CEFI-Regional-Ocean-Modeling/ocean_BGC/blob/a5e9f771bd1a87ba942d98be6deedfc066f77a76/generic_tracers/cobalt_types.F90#L864

https://github.com/NOAA-CEFI-Regional-Ocean-Modeling/ocean_BGC/blob/a5e9f771bd1a87ba942d98be6deedfc066f77a76/generic_tracers/cobalt_types.F90#L1160

https://github.com/NOAA-CEFI-Regional-Ocean-Modeling/ocean_BGC/blob/a5e9f771bd1a87ba942d98be6deedfc066f77a76/generic_tracers/cobalt_reg_diag.F90#L2334

https://github.com/NOAA-CEFI-Regional-Ocean-Modeling/ocean_BGC/blob/a5e9f771bd1a87ba942d98be6deedfc066f77a76/generic_tracers/cobalt_send_diag.F90#L1136

Since the diagnostic code is still in place, and the variable is declared but never allocated, the diag manager will yield a strange error about the size of the variable being unexpected if wc_vert_int_chemoautopp is in the diag_table.

yichengt900 commented 3 days ago

@andrew-c-ross, thanks! You’re definitely not the first to encounter this mysterious error, which suggests that our code cleanup wasn’t entirely thorough.