NOAA-CEFI-Regional-Ocean-Modeling / ocean_BGC

3 stars 4 forks source link

Check if diagnostic id is > 0 in g_send_data_* functions - Part1 #16

Closed andrew-c-ross closed 3 months ago

andrew-c-ross commented 3 months ago

This adds a check for whether the diagnostic field ID is greater than zero to the g_send_data functions. If the ID is not greater than zero, sending data does nothing and now explicitly returns False. If the diagnostic is used, it behaves as usual and shouldn't change answers.

The check is only added to the MOM6 method for posting diagnostic data, since the FMS method already has a check built in (here).

This is the first step to solving #14. With this in place, all of the checks for the diagnostic id can be removed from the generic tracer packages.

yichengt900 commented 3 months ago

@andrew-c-ross, thank you so much for your prompt action! I really appreciate it. The changes look great to me. I will try to invite @nikizadehgfdl as a reviewer too and hope that he is willing to provide his valuable opinions.

yichengt900 commented 3 months ago

Hey @andrew-c-ross, I've made a slight modification to your title to reflect that we'll be addressing #14 in two steps. I hope that's okay with you. I'll approve part 1 shortly, and then we can start working on implementing this new function.

yichengt900 commented 3 months ago

@andrew-c-ross, could you merge the recent change in dev/cefi (#19) into your branch? Just want to ensure your feature branch is up-to-date.