GithubHelp home page GithubHelp logo

Comments (4)

AntSimi avatar AntSimi commented on July 18, 2024

Hi,

To specify a non-coordinates index you could read this docstring GridDataset, you need to use indexs option.
If you choose this solution you will need to apply manually all operation describe here : filtering(if wanted), identification, storage

If you split in several files you could also use directly EddyId.

Antoine

from py-eddy-tracker.

acapet avatar acapet commented on July 18, 2024

Thanks,

To test this I've build some new files. So i have one one hand, individual daily files, and on the other hand a single file concatenated from the others using NCO tools, along a (now) record dimension "time".

While I was loading individual files as such before :

g = RegularGridDataset("../l4_cmems/dt_blacksea_allsat_phy_l4_"+dat1+"_20200801.nc", lon_name, lat_name)

I now attempted to load a slice from the concatenated file as follows :

g = GridDataset(filename="../l4_cmems/dt_blacksea_allsat_phy_l4_201404_20200801_tr.nc",
                x_name=lon_name,
                y_name=lat_name, 
                indexs={'time':23467})

which results with the error :

~/.pyenv/versions/3.8.3/lib/python3.8/site-packages/pyEddyTracker-3.2.0+0.g775b28f.dirty-py3.8.egg/py_eddy_tracker/dataset/grid.py in __init__(self, filename, x_name, y_name, centered, indexs, unset)
    328         if not unset:
    329             self.load_general_features()
--> 330             self.load()
    331 
    332     @property

~/.pyenv/versions/3.8.3/lib/python3.8/site-packages/pyEddyTracker-3.2.0+0.g775b28f.dirty-py3.8.egg/py_eddy_tracker/dataset/grid.py in load(self)
    415 
    416         self.setup_coordinates()
--> 417         self.init_pos_interpolator()
    418 
    419     def setup_coordinates(self):

AttributeError: 'GridDataset' object has no attribute 'init_pos_interpolator'

Is there a missing update of the 'GridDataset' function, or am I not setting the indexs argument correctly ?

Thanks !

from py-eddy-tracker.

AntSimi avatar AntSimi commented on July 18, 2024

Sorry, i was not explicit you must still use RegularGridDataset, just i give you help of GridDataset because RegularGridDataset inherit from: doc of RegularGridDataset

from py-eddy-tracker.

acapet avatar acapet commented on July 18, 2024

Thanks !

from py-eddy-tracker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.