Can the host know what routines are implemented by a model?

14 views
Skip to first unread message

Carsten Lemmen

unread,
Sep 23, 2021, 2:45:51 PM9/23/21
to FABM-users
Hello FABM users,

can the host find out whether a specific biogeochemical model implements a routine, such as do_bottom?  And if multiple BGC models are configured, treat the vertical velocities differently for those that implement do_bottom versus those that do not?

Cheers,
Carsten


Jorn Bruggeman

unread,
Sep 30, 2021, 3:39:53 AM9/30/21
to fabm-...@googlegroups.com

Hi Carsten,

 

Sorry for the late reply. As it stands, not even FABM itself knows what routines are implemented by BGC models. That’s because Fortran does not offer a mechanism to find out whether a derived type overrides any type-bound procedure of its base type – at least not to my knowledge.

 

The next update of FABM’s BGC API will allow models to optionally inform FABM about this, which will enable a few new optimizations. But that functionality will be completely optional. BGC models will need to be adapted if they want to provide this info. In principle, FABM will then know per variable whether it has any source terms/bottom fluxes/surface fluxes associated with it – if all active BGC models provide this info.

 

I’m wondering about your use case for this, though. Since there are many reasons why a variable may have bottom fluxes (e.g., it could be for sedimentation at the bed, but also come from a separate module for a suspension feeder that consumes the variable in question), it seems surprising to me to link this in any way to vertical velocities without knowing more about the background of the flux. Could you say more about the reasoning behind this?

 

Cheers,

 

Jorn

--
You received this message because you are subscribed to the Google Groups "FABM-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fabm-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fabm-users/de77ebb5-f80e-4af2-a6e5-9e59eeea5723n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages