NCAR/geocat-f2py

Numpy support should be added as in GeoCAT-ncomp

erogluorhan opened this issue · 4 comments

Numpy support should be added to the GeoCAT-temp functionality because:

  1. While xArray is having an increasing use among the atmospheric science community, it requires some dedicated training, tutorial, etc. to overcome a learning curve. On the other hand, Numpy has been a Python data access/analysis standard among almost everybody for a long while.

  2. Not all of the use cases with GeoCAT-comp stack have to includes big data or related tasks such as parallelization that would require Dask, so Numpy would provide a very practical way of running GeoCAT-comp functionality for users to work on small data sets.

@pilotchute @anissa111 Due to above points, I strongly prefer to provide Numpy support in our f2py effort as we did so far in GeoCAT-ncomp; however, I would like to hear your thoughts, if any.

If/when the team decides on Numpy support, I can add it into the current GeoCAT-temp structure, or @pilotchute if you would like to handle it on your own, you are welcome as well. Instead of implementing it the same way as we did it GeoCAT-ncomp (i.e. every single function had similar if-checks for Numpy vs xArray handling), we might want to implement a helper function to handle conversion of Numpy inputs into xArray data structure. Thoughts?

  • Implement numpy support for linint2
    • make sure that xi yi are available as optionals in method signature
    • setup check for fi being numpy, and xi yi existant
    • build Xarray from fi xi yi
  • Test numpy support

Numpy support implemented for linint2, tested on 8 cores, completes at same speed as single chunk and pre-chunked Xarrays.