|
| 1 | +from netCDF4 import Dataset |
1 | 2 | from py_eddy_tracker.dataset.grid import RegularGridDataset, UnRegularGridDataset
|
2 | 3 | import logging
|
3 | 4 | logging.basicConfig(level=logging.DEBUG)
|
|
7 | 8 | # h.add_uv('sossheig')
|
8 | 9 | # h.write('unregular.nc')
|
9 | 10 |
|
10 |
| -# h = RegularGridDataset('msla_h_20170425T000000_20170425T000000.nc', 'NbLongitudes', 'NbLatitudes') |
11 |
| -# h.high_filter('Grid_0001', 10, 5) |
12 |
| -# h.eddy_identification('Grid_0001', 0.5) |
13 |
| - |
14 |
| -h = UnRegularGridDataset('/home/tildou/ant_work/data/unregular.nc', 'nav_lon', 'nav_lat') |
15 |
| -h.eddy_identification('sossheig') |
16 |
| - |
17 |
| -# h = RegularGridDataset('madt_h_20170425T000000_20170425T000000.nc', 'NbLongitudes', 'NbLatitudes') |
18 |
| - |
19 |
| -# h.add_uv('Grid_0001') |
20 |
| -# h.write('regular.nc') |
| 11 | +h = RegularGridDataset('/data/adelepoulle/Test/Test_eddy/20180417_eddy_tracker_validation_object_oriented/nrt_global_allsat_phy_l4_20180409_20180415.nc', 'longitude', 'latitude') |
| 12 | +h.high_filter('sla', 10, 5) |
| 13 | +anticyclonic, cyclonic = h.eddy_identification('sla', 'ugos', 'vgos', 0.0025) |
| 14 | +print(len(anticyclonic)) |
| 15 | +print(len(cyclonic)) |
| 16 | +with Dataset('/tmp/a.nc', 'w') as h: |
| 17 | + anticyclonic.to_netcdf(h) |
| 18 | +with Dataset('/tmp/c.nc', 'w') as h: |
| 19 | + cyclonic.to_netcdf(h) |
21 | 20 |
|
| 21 | +# h = UnRegularGridDataset('/tmp/t.nc', 'nav_lon', 'nav_lat') |
| 22 | +# eddies = h.eddy_identification('sossheig', step=0.005) |
0 commit comments