-
|
Context: I run SCHISM-FABM-ECOSMO and recently switched to FABMv2. The switch entailed changing the used light model to gotm/light. I however cannot reproduce my pre-FABMv2 results with this setup because light attenuation due to phytoplankton self-shading and POM /DOM behaves completely different. Tuning sofar didn't get me anywhere. I now want to (temporarily) call the old get_light_extinction() subroutine to calculate light in FABMv2 (instead of gotm/light), so I can produce some results while I figure out what the problem with gotm/light is. I however run into following problem in the fabm_schism.F90 driver during compilation: Whats the correct way of calling fabm_get_light_extinction() and fabm_get_light() in FABMv2? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
|
A mix of FABM v1/v2 and and FABM v0 compatibility APIs won't work, as you found. To get light extinction from FABM v1 and higher, you'd do: before calling with The first call ensures that the extinction will be computed, even if no FABM model has an interest in it, and the second retrieves a pointer to the extinction values that will be updated throughout the simulation. It may be slightly more verbose than in v0, but it ensures we can handle any feedback to physics without having to introduce new variable-specific APIs.
|
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the quick reply! I still register the contributors to attenuation as:
Is that correct? And this didn't work:
I did some digging and found that this works:
Just wanted to double check that this is the right way initializing the extinction? |
Beta Was this translation helpful? Give feedback.
A mix of FABM v1/v2 and and FABM v0 compatibility APIs won't work, as you found. To get light extinction from FABM v1 and higher, you'd do:
before calling
model%start(), and then once, after:with
extbeing declared as a full interior array with thepointerattribute.The first call ensures that the extinction will be computed, even if no FABM model has an interest in it, and the second retrieves a pointer to the extinction values that will be u…