| Leibniz Institute for Baltic Sea
Research Warnemünde Physical Oceanography and Instrumentation Seestrasse 15 18119 Rostock Germany |
Hi Ulf,
For that I’d put together a very compact FABM module (e.g. <FABM>/src/models/iow/sediment_respiration.F90), as there is no way to specify this by modifying yaml alone. The model type would have one state dependency for oxygen and one dependency for the externally specified flux, e.g., in the type itself:
type (type_state_variable_id) :: id_o2conc
type (type_bottom_dependency_id) :: id_flux
In initialize:
call self%register_state_dependency(self%id_o2conc,'o2conc','UNITS','oxygen')
call self%register_dependency(self%id_flux,'flux','UNITS m-2 s-1','bottom flux')
And then do_bottom would contain something like this:
_BOTTOM_LOOP_BEGIN_
_GET_ (self%id_o2conc, o2conc)
_GET_BOTTOM_(self%id_flux,flux)
if (o2conc<0) flux = flux/2
_ADD_BOTTOM_FLUX_(self%id_o2conc, flux)
_BOTTOM_LOOP_END_
That model would then replace your current o2respiration instance. That’s quite a few lines, but by having this in place you can later customize the oxygen flux further in any way you like.
Cheers,
Jorn
--
You received this message because you are subscribed to the Google Groups "FABM-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fabm-devel+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fabm-devel/2f7d7c10-22a5-38c8-4480-60598ad9a301%40io-warnemuende.de.
To view this discussion on the web visit https://groups.google.com/d/msgid/fabm-devel/01d001d94690%24d2478e00%2476d6aa00%24%40bolding-bruggeman.com.
Hi Ulf,
If you’d go with the example code I sent, you can use the new respiration module as a drop-in replacement for external_bottom_flux, like this:
o2respiration:
model: iow/sediment_respiration
coupling :
o2conc : sOxy/o2
That leaves an unresolved “o2respiration/flux” dependency as in your original example. Presumably, you already had that linked to an external data file? That should still work.
Cheers,
Jorn