GithubHelp home page GithubHelp logo

UnRegularGridDataset error: 'AttributeError: 'ModulePassManager' object has no attribute 'add_loop_rotate_pass'' about py-eddy-tracker HOT 4 CLOSED

antsimi avatar antsimi commented on July 18, 2024
UnRegularGridDataset error: 'AttributeError: 'ModulePassManager' object has no attribute 'add_loop_rotate_pass''

from py-eddy-tracker.

Comments (4)

AntSimi avatar AntSimi commented on July 18, 2024

Hi,
Maybe with script it's better :) to understand.
But it's strange, it's just at the import

from py-eddy-tracker.

evanmason avatar evanmason commented on July 18, 2024

Yeah, there's nothing special about the script:

# %run make_BlackSea_eddies.py

from glob import glob
from netCDF4 import Dataset
#import xarray as xr
from numpy import arange, array, nan
from datetime import datetime
from matplotlib import pyplot as plt
#from py_eddy_tracker.dataset.grid import RegularGridDataset
from py_eddy_tracker.dataset.grid import UnRegularGridDataset
from py_eddy_tracker import data
from py_eddy_tracker import start_logger


if __name__ == '__main__':

    plt.close('all')

    directory = '/marula/emason/BlackSea/Sample/'
    directory = '/home/ulg/mast/emason/BS_surface_fields/'
    ssh_files = 'SSH_UV_BlackSea_surface_????????.nc'


    ssh_files = sorted(glob(directory + ssh_files))

    lon_name, lat_name = 'nav_lon', 'nav_lat'
    ssh_name, u_name, v_name = 'sossheig', 'vozocrtx', 'vomecrty'


    for ssh_file in ssh_files:

        #g = UnRegularGridDataset(data.get_path(ssh_file), lon_name, lat_name)
        start_logger().setLevel('DEBUG')

        h = UnRegularGridDataset(data.get_path(ssh_file), lon_name, lat_name)

        date = ssh_file.rpartition('_')[-1].partition('.')[0]
        date = datetime(int(date[:4]), int(date[4:6]), int(date[6:]))

        # Identification every 2 mm
        h.high_filter('sossheig', w_cut=400)
        a, c = h.eddy_identification(ssh_name, u_name, v_name, date, 0.002, pixel_limit=(5, 2000), shape_error=55)

        with Dataset(date.strftime(directory + 'Anticyclonic_%Y%m%d.nc'), 'w') as h:
            a.to_netcdf(h)
        with Dataset(date.strftime(directory + 'Cyclonic_%Y%m%d.nc'), 'w') as h:
            c.to_netcdf(h)

from py-eddy-tracker.

AntSimi avatar AntSimi commented on July 18, 2024

OK, i ran same import i haven't an Exception, did you use same python between the 2 run?

from py-eddy-tracker.

evanmason avatar evanmason commented on July 18, 2024

With ipython I have:

In [3]: import sys

In [4]: sys.version
Out[4]: '3.7.4 (default, Oct  1 2019, 22:23:57) \n[GCC 8.3.0]'

and in the terminal:

(VENV) [[email protected] BS_code]$ python -V
Python 3.7.4

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.