Comments (4)
Hi,
Maybe with script it's better :) to understand.
But it's strange, it's just at the import
from py-eddy-tracker.
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.
OK, i ran same import i haven't an Exception
, did you use same python between the 2 run?
from py-eddy-tracker.
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)
- Request for help HOT 3
- Bug with matplotlib 3.8
- py_eddy_tracker.dataset.grid issue HOT 6
- pixel position of grid HOT 4
- Lifetime average HOT 3
- The function in the library tried to use Numba to speed up the computation, but received an array of type numpy.ma.MaskedArray that is not supported by Numba. HOT 2
- error about eddy_identification function HOT 2
- Eddies detected on land HOT 6
- Eddy kinetic energy of different types of eddies and its calculation HOT 1
- about from py_eddy_tracker.dataset.grid import RegularGridDataset HOT 1
- Eddy detection issue HOT 3
- batch identification of eddies over multiple days from a single netCDF file HOT 14
- Request for help: No extrema found in contour of xxx pixels in level xxx HOT 6
- Issue reading NEMO UnRegularGrid HOT 2
- grid_count and grid_stat error HOT 2
- The boundary cannot be closed normally, and the longitude and latitude of some points are wrongγ HOT 6
- How to store the eddy tracking results HOT 4
- Data is Empty
- Data is Empty HOT 1
- Cartopy projection HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from py-eddy-tracker.