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

Vectorising #11

Open
8 tasks
oscarbranson opened this issue Jun 28, 2017 · 3 comments
Open
8 tasks

Vectorising #11

oscarbranson opened this issue Jun 28, 2017 · 3 comments

Comments

@oscarbranson
Copy link
Owner

oscarbranson commented Jun 28, 2017

A lot of the solvers in carbon_fns.py would be sped up by vectorising.
At the moment, most serially apply zero_finder functions to solve for H.

The following functions in cbsyst/carbon_fns.py need to be vecotrised:

  • CO2SYS-style zero finder for HCO3_TA (case 11)
  • CO2SYS-style zero finder for CO3_TA (case 13)
  • Vectorise CO2_HCO3 (case 2)
  • Vectorise CO2_CO3 (case 3)
  • Vectorise CO2_DIC (case 5)
  • Vectorise HCO3_CO3 (case 10)
  • Vectorise HCO3_DIC (case 12)
  • Vectorise CO3_DIC (case 14)
@oscarbranson
Copy link
Owner Author

Might this be up your street, @pearseb?

@pearseb
Copy link
Collaborator

pearseb commented Jun 28, 2017

Yep I think I could apply myself to some vectorising. I'm finishing up some edits currently but will have a look at those scripts soon. I'll let you know when I get into it. I'm sure I'll have a few questions.
Thanks for including me Oscar.
Pearse

@oscarbranson
Copy link
Owner Author

oscarbranson commented Jun 28, 2017

Superb. No particular hurry. It works fine at the moment, just isn't very fast.

For reference, the CO2_TA and and TA_DIC functions are currently vectorised using pretty much identical code to matlab CO2SYS.

I was thinking the same approach for the other functions, but haven't had the brain space to work out the gradient functions yet... Hopefully this'll be trivial for you?!

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

No branches or pull requests

2 participants