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

+Missing Pointers for Benthic Fluxes in Direct Sinking of Phytoplankton P #19

Merged
merged 2 commits into from
Mar 26, 2024

Conversation

yichengt900
Copy link
Collaborator

As @charliestock suggested, now the pointers for the benthic fluxes for the direct sinking of phytoplankton P are set correctly in generic_COBALT_update_from_bottom subroutine. This PR is to solve #18.

@charliestock , While reviewing the generic_COBALT_update_from_bottom subroutine, I noticed that pointers for the benthic fluxes for the direct sinking of phytoplankton Fe are also turned off. Below is an example for diazotroph Fe:

!call g_tracer_get_pointer(tracer_list,'fedi_btf','field',temp_field)
!temp_field(:,:,1) = phyto(DIAZO)%ffe_btm(:,:)

Could you confirm if this was done intentionally?

@yichengt900 yichengt900 added the bug Something isn't working label Mar 25, 2024
@yichengt900 yichengt900 marked this pull request as ready for review March 26, 2024 01:35
Copy link
Contributor

@charliestock charliestock left a comment

Choose a reason for hiding this comment

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

Thanks for implementing this Yi-Cheng. It looks good to me. If we could run just confirm conservation in the 1D case, that would be great.

@charliestock
Copy link
Contributor

Thanks Yi-Cheng, In answer to your question about the iron, this was indeed intentional. The iron flux to the sediment is removed. The flux from the sediment is then set using a published relationship:

! iron from sediment (Dale)
cobalt%ffe_sed(i,j) = cobalt%ffe_sed_max * tanh( (cobalt%fntot_btm(i,j)*cobalt%c_2_n*sperd*1.0e3)/ &
max(cobalt%btm_o2(i,j)*1.0e6,epsln) )
cobalt%ffe_geotherm(i,j) = cobalt%ffe_geotherm_ratio*internal_heat(i,j)*4184.0/dt

@yichengt900
Copy link
Collaborator Author

yichengt900 commented Mar 26, 2024

Thanks Yi-Cheng, In answer to your question about the iron, this was indeed intentional. The iron flux to the sediment is removed. The flux from the sediment is then set using a published relationship:

! iron from sediment (Dale)
cobalt%ffe_sed(i,j) = cobalt%ffe_sed_max * tanh( (cobalt%fntot_btm(i,j)*cobalt%c_2_n*sperd*1.0e3)/ &
max(cobalt%btm_o2(i,j)*1.0e6,epsln) )
cobalt%ffe_geotherm(i,j) = cobalt%ffe_geotherm_ratio*internal_heat(i,j)*4184.0/dt

Thanks @charliestock . I believe the relationship is from Dale et al. 2015, is that correct? I will add more detailed inline documentation to highlight this.

@yichengt900
Copy link
Collaborator Author

Thanks for implementing this Yi-Cheng. It looks good to me. If we could run just confirm conservation in the 1D case, that would be great.

@charliestock . Thanks. I can confirm with this fix, the total P is conservative in the 1D case by checking wc_vert_int_p:

Screenshot from 2024-03-26 12-59-53

@yichengt900
Copy link
Collaborator Author

This PR passed the CI test and has proven mass conservation for P in the 1D case. Merge now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants