Skip to content

biodensity_feedback: initial commit#9

Open
knutaros wants to merge 4 commits into
masterfrom
biodensity_feedback
Open

biodensity_feedback: initial commit#9
knutaros wants to merge 4 commits into
masterfrom
biodensity_feedback

Conversation

@knutaros

Copy link
Copy Markdown
Contributor

supports feedback from a FABM aggregated standard variable "density_correction" to rho, buoy and NN.

@bolding

bolding commented Aug 26, 2020

Copy link
Copy Markdown
Collaborator

I'll suggest:
biodensity_feedback --> density_feedback - as the correction does not need to come from bio.

The Travis CI fails - https://travis-ci.org/github/gotm-model/code/builds/721153138 - (can you see the link) - because we have not settled on if CVMix shall be included or not.

@bolding

bolding commented Aug 26, 2020

Copy link
Copy Markdown
Collaborator

What about:

   
   r2b = -gravity / rho_0
   rho(nlev) = rho(nlev) + rho_corr(nlev)
   bu=rho_corr(nlev)*r2b
   buoy(nlev) = buoy(nlev) + bu
   do i=nlev-1,1,-1
      rho(i) = rho(i) + rho_corr(i)
      bl = rho_corr(i) * r2b
      buoy(i) = buoy(i) + bl 
      dz = _HALF_ * ( h(i) + h(i+1) )
      NN(i) = NN(i) + ( bu - bl ) / dz
      bu = bl
   end do

only one do loop - and no automatic array needed

@bolding

bolding commented Aug 26, 2020

Copy link
Copy Markdown
Collaborator

but can't be vectorized

@knutaros

knutaros commented Aug 26, 2020 via email

Copy link
Copy Markdown
Contributor Author

@bolding

bolding commented Aug 26, 2020

Copy link
Copy Markdown
Collaborator

but if you want to emphasize FABM - then call it fabmdensity_feedback - FABM contains non-bio stuff as well.

@knutaros

knutaros commented Aug 26, 2020 via email

Copy link
Copy Markdown
Contributor Author

@knutaros

knutaros commented Aug 26, 2020 via email

Copy link
Copy Markdown
Contributor Author

@bolding

bolding commented Aug 26, 2020

Copy link
Copy Markdown
Collaborator

On 8/26/20 9:43 AM, Karsten Bolding wrote: but can't be vectorized
is there any lost in performance by the repeated copy bu=bl?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#9 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC2RV6RASDG2C26NH5BK3QTSCS4IVANCNFSM4QLEBRHQ.

Not compared to allocate a new vector and do two loops

@knutaros

knutaros commented Aug 26, 2020 via email

Copy link
Copy Markdown
Contributor Author

@knutaros

knutaros commented Aug 26, 2020 via email

Copy link
Copy Markdown
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants