NOAA-CEFI-Regional-Ocean-Modeling / ocean_BGC

3 stars 4 forks source link

Air-sea parameter inconsistencies and bugs #9

Closed andrew-c-ross closed 2 months ago

andrew-c-ross commented 5 months ago

There are some long-standing issues with the air-sea flux parameter settings that might be worth fixing while we're making breaking changes to the generic tracers.

Most of the generic tracer packages have their own air-sea parameter setting as a module variable. For example, for COBALT, https://github.com/NOAA-CEFI-Regional-Ocean-Modeling/ocean_BGC/blob/4af91db7215e07fbf6c537fd298ad66a72da0f14/generic_tracers/generic_COBALT.F90#L185

These parameter settings are intended to be set to a common value by setting as_param in the generic tracer namelist: https://github.com/NOAA-CEFI-Regional-Ocean-Modeling/ocean_BGC/blob/4af91db7215e07fbf6c537fd298ad66a72da0f14/generic_tracers/generic_tracer.F90#L144-L148

However, the module variables for each tracer package are only set if as_param == 'gfdl_cmip6': https://github.com/NOAA-CEFI-Regional-Ocean-Modeling/ocean_BGC/blob/4af91db7215e07fbf6c537fd298ad66a72da0f14/generic_tracers/generic_tracer.F90#L173-L179

If as_param is anything other than "gfdl_cmip6" (its default value), then each generic tracer uses whatever its own default as_param is. This means if you set, for example, as_param = W14, a package like BLING will not see that and use its default "gfdl_cmip6" instead.

In the NWA12 XML, we set as_param = unused so that as_param_cobalt won't be set and can use its default value of W92, which works but is unpleasant.

I think this could be fixed while retaining compatibility with old global solutions (but requiring changes to regional XMLs) by just deleting: https://github.com/NOAA-CEFI-Regional-Ocean-Modeling/ocean_BGC/blob/4af91db7215e07fbf6c537fd298ad66a72da0f14/generic_tracers/generic_tracer.F90#L173

But this leaves a bunch of module variables in place that don't do anything, so it would be nice if we could have either one single air-sea param or else each generic tracer check its own namelist.

yichengt900 commented 3 months ago

@andrew-c-ross, sorry for the late response, and thank you for reporting this long-standing issue regarding air-sea flux parameter settings. Personally, I favor the simplest solution you proposed, as it will only affect our regional XMLs. Since our current approach works (although unpleasant), I suggest we focus on COBALTv3 cleanup for now and keep this issue open to ensure we revisit it later.

charliestock commented 3 months ago

Thanks for raising this Andrew. To add to this thread, I believe that Eric Stofferahn has been working on some fixes to the air-sea exchange parameters and dynamics that we should be sure to synchronize with moving forward. I will do some digging on this and report back.