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

Dust fluxes output and add descriptions in the xml-namelist file #420

Merged
merged 6 commits into from
Oct 24, 2024

Conversation

jmaerz
Copy link
Collaborator

@jmaerz jmaerz commented Oct 23, 2024

Hi @TomasTorsvik and @JorgSchwinger , as discussed, this PR brings in dust output and some descriptions in the xml-namelist file. I tried to fill all iHAMOCC gaps to my best knowledge. I cleaned the way, M4AGO sinking velocity is handled in mo_ocprod (wasn't ideal before).

Together with this PR, I introduced the xmlchange switch HAMOCC_SINKING_SCHEME (and removed the compset HAMOCC_M4AGO switch) that allows to select among the four supported sinking schemes: [WLIN, AGG, M4AGO, CONST], the default remains WLIN.

Ideally, this PR also enters the v1.6.x release version. Sorry for this delayed PR for the release tag - it just adds some potentially valuable output (and provides a more descriptive iHAMOCC xml-namelist definition file).

@jmaerz jmaerz added enhancement New feature or request iHAMOCC Issue mainly concerns the iHAMOCC code base labels Oct 23, 2024
@jmaerz jmaerz added this to the NorESM2.3 - BLOM/iHAMOCC milestone Oct 23, 2024
@jmaerz jmaerz self-assigned this Oct 23, 2024
Copy link
Contributor

@JorgSchwinger JorgSchwinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

jdustflx2000(n)=i_bsc_m2d*min(1,FLX_DUST2000(n))
if (FLX_DUST4000(n) > 0) i_bsc_m2d=i_bsc_m2d+1
jdustflx4000(n)=i_bsc_m2d*min(1,FLX_DUST4000(n))
if (FLX_CAL_BOT(n) > 0) i_bsc_m2d=i_bsc_m2d+1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be FLX_DUST_BOT(n)!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this!

call wrtsrf(jdustflx1000(iogrp), FLX_DUST1000(iogrp), rnacc*1e3/dtbgc,0.,cmpflg,'dustflx1000')
call wrtsrf(jdustflx2000(iogrp), FLX_DUST2000(iogrp), rnacc*1e3/dtbgc,0.,cmpflg,'dustflx2000')
call wrtsrf(jdustflx4000(iogrp), FLX_DUST4000(iogrp), rnacc*1e3/dtbgc,0.,cmpflg,'dustflx4000')
call wrtsrf(jdustflx_bot(iogrp), FLX_DUST_BOT(iogrp), rnacc*1e3/dtbgc,0.,cmpflg,'dustflx_bot')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you check that the 1e3 is correct here? Usually this converts from kmol -> mol, is it here from kg -> g?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's from kg -> g.

@TomasTorsvik
Copy link
Contributor

Looks fine for me, but I will hold off on the review until the PR is updated with namelist option.

…enable selection of sinking scheme - default: WLIN
@jmaerz
Copy link
Collaborator Author

jmaerz commented Oct 24, 2024

Hi @JorgSchwinger and @TomasTorsvik , I tinkered around with the component settings and the xml-namelist and found a way to get to the wanted behavior by making changes to builnml, config_component.xml and namelist_definition_blom.xml - so no further fortran code changes were needed.

I introduced a new xmlchange switch named HAMOCC_SINKING_SCHEME (and removed the compset HAMOCC_M4AGO switch) that allows to select among the four supported schemes: [WLIN,AGG,M4AGO,CONST], default is WLIN. Buildnml sets then the use_XXX to the respective values (very explicit, maybe better ways are available).

I hope that satisfies the needs that we have. Tomas an I, we discussed that we could introduce another small subroutine that allows to replace all the different places of if...else if ... statements in mo_ocprod for choosing the sinking velocities by a simple function/subroutine call. This could be done for the master afterward - just to make the whole sinking routine a bit cleaner. I feel that this PR is already big for playing it on the v1.6.xxx release version, which is why one could just do it for master, if wished for - it would ease the maintenance at least.

Copy link
Contributor

@TomasTorsvik TomasTorsvik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jmaerz - thanks! Looks good to me.

@jmaerz jmaerz mentioned this pull request Oct 24, 2024
23 tasks
@JorgSchwinger
Copy link
Contributor

Looks fine, thank you.

@jmaerz jmaerz merged commit f1cc379 into NorESMhub:master Oct 24, 2024
5 checks passed
@jmaerz jmaerz deleted the dustfluxes_output branch October 24, 2024 14:45
jmaerz added a commit that referenced this pull request Oct 25, 2024
#423)

Introduction of dustflux output and of a xml-switch HAMOCC_SINKING_SCHEME with options WLIN, AGG, M4AGO and CONST, default is WLIN, to select a sinking scheme in iHAMOCC.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request iHAMOCC Issue mainly concerns the iHAMOCC code base
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants