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

Vertical "averaging" in FABM river input #5

Open
poplarShift opened this issue Feb 28, 2022 · 3 comments
Open

Vertical "averaging" in FABM river input #5

poplarShift opened this issue Feb 28, 2022 · 3 comments

Comments

@poplarShift
Copy link

poplarShift commented Feb 28, 2022

Hi, I'm new to the code so take this with a grain of salt, but this:

FABMR(J,IFABM)=SUM(FABM_ALL(JJ,1:KBM1,IFABM))/KBM1

is only a vertical average if sigma layers have a constant thickness, I think. There are several cases of the same logic around there.

@poplarShift poplarShift changed the title Vertical "averaging in FABM river input" Vertical "averaging" in FABM river input Feb 28, 2022
@mikebedington
Copy link
Member

Yep that would be wrong if people are using s-coordinates or similar at the coast, however have you actually run into any problems with it? We always run with hybrid coordinates so have constant thickness at the coast so would be correct in our case anyway, but as far as I can see in the code those values aren't ever used as that code is only applied for variables with no_river_dilution but then in mod_fabm_3D.F this matrix is skipped for no_river_dilution. If this is they case then the block 12971- 12985 should probably just set FABMR to zero with a comment to make clear why. @riquitorres any idea whether fabmr for no_river_dilution is used elsewhere, it appears on first look that it isn't...?

@riquitorres
Copy link
Contributor

riquitorres commented Mar 1, 2022

To be honest, the original approach to no-river dilution was causing problems of unbounded growth of some ERSEM (in our case) variables so we stopped using it. In the last iteration, the approach was to skip the river treatment all together rather than add the FABMR calculated average. In theory, the mod_fabm_3D shouldn't use FABMR for variables that are marked as no_river_dilution.

IF (.NOT. model%interior_state_variables(IFABM)%no_river_dilution) THEN

FABMR should only operate with values that are 0 (FABM variables are therefore diluted by river inputs) or the values provided in the river file. I guess we can remove that section of mod_force.F if it is no longer used.

@poplarShift
Copy link
Author

Thanks for the explanations. To be clear, it hasn't caused me any problems (I think), I just came across this while digging for something else and thought I'd leave a note.

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

No branches or pull requests

3 participants