Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage of flux_param in g_tracer_add #92

Open
jessluo opened this issue Aug 28, 2024 · 3 comments
Open

Usage of flux_param in g_tracer_add #92

jessluo opened this issue Aug 28, 2024 · 3 comments
Labels
question Further information is requested

Comments

@jessluo
Copy link
Collaborator

jessluo commented Aug 28, 2024

@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:

flux_param = (/ 14.0067e-03 /), &

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

flux_gas_molwt = WTMN, &

@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.

! Aray of parameters for non-gas flux (refer to documentation for subroutine aof_set_coupler_flux() ).

@jessluo jessluo added the question Further information is requested label Aug 28, 2024
@andrew-c-ross
Copy link
Contributor

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
Copy link
Contributor

andrew-c-ross commented Aug 29, 2024

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:

if(g_tracer%flux_gas) then
g_tracer%flux_gas_ind = aof_set_coupler_flux(g_tracer%flux_gas_name, &
flux_type = g_tracer%flux_gas_type, &
implementation = trim(g_tracer%implementation), &
mol_wt = g_tracer%flux_gas_molwt, &
param = g_tracer%flux_gas_param, &
ice_restart_file = g_tracer%ice_restart_file, &
ocean_restart_file= g_tracer%flux_gas_restart_file, &
verbosity = verbosity &
)
endif
if(g_tracer%flux_runoff) then
g_tracer%flux_runoff_ind = aof_set_coupler_flux(g_tracer%flux_runoff_name, &
flux_type = 'land_sea_runoff', &
implementation = 'river', &
param = g_tracer%flux_param, &
ice_restart_file = g_tracer%ice_restart_file, &
verbosity = verbosity &
)
endif
if(g_tracer%flux_wetdep) then
g_tracer%flux_wetdep_ind = aof_set_coupler_flux(g_tracer%flux_wetdep_name, &
flux_type = 'air_sea_deposition', &
implementation = 'wet', &
param = g_tracer%flux_param, &
ice_restart_file = g_tracer%ice_restart_file, &
verbosity = verbosity &
)
endif

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

call g_tracer_add(tracer_list,package_name, &
name = 'o2', &
longname = 'Oxygen', &
units = 'mol/kg', &
prog = .true., &
flux_runoff= .true., &
flux_param = (/ 1.0e-3 /), &
flux_gas = .true., &
flux_gas_name = 'o2_flux', &
flux_gas_type = 'air_sea_gas_flux_generic', &
flux_gas_molwt = WTMO2, &
flux_gas_param = (/ as_coeff_cobalt, 9.7561e-06 /), &
flux_gas_restart_file = 'ocean_cobalt_airsea_flux.res.nc', &
flux_bottom= .true. )

@tanyamarshall
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants