-
Notifications
You must be signed in to change notification settings - Fork 11
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
Porting equation of state related quantities from PyDom. #20
Comments
or rely on
|
I have a fortran module which I extracted from POP to compute the JMD95 EOS. I compiled it with f2py and it works great, super fast. This could be a good approach. |
thanks for the input Ryan. Providing access to JMD95 would be a very good addition to the library. I am a bit worried though with the idea of using externally compiled code in oocgcm. I would like the library to be as easy to deploy as possible and therefore I would like to use pure Python when feasible and avoid relying to much on FORTRAN and/or C. An option could be to rewrite this module in pure python with numba or numpy based functions. Do you think that would be a lot of work ? do you think that the performances will be critically reduced ? |
The pure Python TEOS10 is extremely slow in my experience. I think numba is a very promising idea for the EOS. Sent from my iPhone
|
there is also a pure python version of jmd95 here. |
Python JMD95 from lesommer's link is originally from the MITgcm link. I agree with Ryan that the pure python version is a bit slower than fortran code, but it could be modified to work better with multi-dimensional array. The speed limitation will then be associated with numpy. |
thanks for your input, Jinbo. As mentionned above, I would a priori prefer to avoid compiled code in oocgcm, except if really necessary. since we are here only talking about a polynomial, I would not expect a python/numpy code to be more than say 50% slower than FORTRAN. plus we can probably get a speed-up with numba. so I guess this probably needs someone to do a clean benchmark of the several options. I will probably start by rewriting a jmd95 eos from scratch for these tests and let you know about the results. |
just coded a numba implementation of spice in eos.misc for profiling the execution time. |
Hi Julien, |
Simon implemented a non-optimized version of JMD95 (code from pydom), see e27d04d |
see PyDom.eos
The text was updated successfully, but these errors were encountered: