NOAA-CEFI-Regional-Ocean-Modeling / ocean_BGC

3 stars 4 forks source link

missing default variable in cobalt_types.F90 #56

Closed dksasaki closed 1 month ago

dksasaki commented 1 month ago

Hello everyone,

I've noticed that the as_param_cobalt parameter (and its default value) is missing from cobalt_types.F90, although it's listed as a parameter in generic_COBALT.F90 within the namelist. This issue won't affect compilation but may cause a runtime error if input.nml doesn't define this parameter correctly.

  namelist /generic_COBALT_nml/ do_14c, co2_calc, do_nh3_atm_ocean_exchange, scheme_nitrif, debug, &
     o2_min_nit,k_o2_nit,irr_inhibit,k_nh3_nitrif,gamma_nitrif,do_vertfill_pre,imbalance_tolerance, &
     as_param_cobalt

In one of the previous version, the default value was:

character(len=10), save :: as_param_cobalt = 'W92'

I hope this is useful,

Thank you!

yichengt900 commented 1 month ago

Hi @dksasaki,

Thank you for opening this issue. Regarding your concern, please refer to this PR. Currently, as_param_cobalt will take on the default value of as_param if you do not specify it in generic_COBALT_nml. We also allow overriding the globally set as_param by setting as_param_cobalt in generic_COBALT_nml. I have tested this in our 1D test case, and it should work as expected. If you still have any questions or encounter any error messages regarding this issue, feel free to post them here.

dksasaki commented 1 month ago

Hi @yichengt900,

not sure what happened here. The error raised by MOM6 pointed to the parameter I mentioned. I recompiled the model and it ran with no issues. Thanks for the update and answer!