NOAA-CEFI-Regional-Ocean-Modeling / ocean_BGC

3 stars 8 forks source link

Usage of flux_param in g_tracer_add #92

Open jessluo opened 2 months ago

jessluo commented 2 months ago

@TanyaMarshall and I are wondering about flux_param in g_tracer_add:

It looks like in some cases this refers to the molecular weight of a tracer with a unit conversion:

https://github.com/NOAA-CEFI-Regional-Ocean-Modeling/ocean_BGC/blob/c10390de4308bcd35059a137a408cd33c1dfa499/generic_tracers/generic_COBALT.F90#L1495

but in other cases the molecular weight is given as flux_gas_molwt:

https://github.com/NOAA-CEFI-Regional-Ocean-Modeling/ocean_BGC/blob/c10390de4308bcd35059a137a408cd33c1dfa499/generic_tracers/generic_COBALT.F90#L1462

@tanyamarshall is trying to add in 15N isotopes so would you recommend adding in its molecular weight directly in the FMS / constants.F90 and referencing it here, or just adding it in here directly?

Also, where can we find aof_set_coupler_flux() which is referenced in generic_tracer_utils.F90? In it, the comments say refer to documentation for subroutine aof_set_coupler_flux() but we are unable to locate this subroutine. https://github.com/NOAA-CEFI-Regional-Ocean-Modeling/ocean_BGC/blob/c10390de4308bcd35059a137a408cd33c1dfa499/generic_tracers/generic_tracer_utils.F90#L817

andrew-c-ross commented 2 months ago

I believe this is the aof_set_coupler_flux() being referred to: https://github.com/NOAA-GFDL/FMS/blob/d13c1298f15ba3c409dec70a57a02a0e29069bcb/coupler/atmos_ocean_fluxes.F90#L114

andrew-c-ross commented 2 months ago

Also, my understanding is that you would use specify flux_gas_molwt for gases that are exchanged with the atmosphere, and flux_param for tracers with sources from runoff, deposition, etc:

https://github.com/NOAA-CEFI-Regional-Ocean-Modeling/ocean_BGC/blob/c10390de4308bcd35059a137a408cd33c1dfa499/generic_tracers/generic_tracer_utils.F90#L1137-L1167

See for example oxygen which has both flux_gas_molwt and flux_param and uses flux_param for units conversion:

https://github.com/NOAA-CEFI-Regional-Ocean-Modeling/ocean_BGC/blob/c10390de4308bcd35059a137a408cd33c1dfa499/generic_tracers/generic_COBALT.F90#L1500-L1513

tanyamarshall commented 2 months ago

Hi @andrew-c-ross, thank you for the explanation!