Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Usage Example
from enstools.feature.pipeline import FeaturePipeline
from enstools.feature.identification.pv_streamer import PVIdentification, PVWernliSprenger2007
import os
pipeline = FeaturePipeline()
i_strat = PVIdentification(unit='pv') #, mode_2d_layer=330) # # theta_range=(300, 380), extract_containing_layer=330)
# i_strat = PVWernliSprenger2007(unit='pv') # , level=342 only single level right now
# Wernli TODO change contour.f level too, also if data in PV/PVU adapt param.
# TODO also pretty restrictive filewise. only global. need -180lon and 180lon.
# t_strat = OverlapTracking()
# t_strat = EmptyTr()
pipeline.set_identification_strategy(i_strat)
pipeline.set_tracking_strategy(None)
# data_path = os.path.join(os.path.expanduser("~"), 'phd/data/ERA5/vietnam/vietnam_t0.nc')
# data_path = "/project/meteo/w2w/C3/fischer/data/tt_chris_theta_2K_6h.nc"
# data_path = "/project/meteo/w2w/C3/fischer/data/vietnam/vietnam.nc"
# data_path = os.path.join(os.path.expanduser("~"), 'phd/data/tracked/th2016-09-07T00.nc')
data_path = os.path.join(os.path.expanduser("~"), 'phd/data/tracked/S2S_test/plot_test.nc')
# data_path = os.path.join(os.path.expanduser("~"), 'phd/data/ERA5/chris_ip/chris_2K_6h.nc')
# data_path = os.path.join(os.path.expanduser("~"), 'phd/data/tracked/S2S_test/S2S-ECMWF_EXTP_pv_avg200-500_hcst_19980507_00Z.nc')
# data_path = os.path.join(os.path.expanduser("~"), 'phd/data/tracked/S2S_test/TH19981119_00')
pipeline.set_data_path(data_path)
pipeline.execute()
out_netcdf_path = data_path + '_streamers_stereo.nc'
out_json_path = data_path + '_streamers.json'
pipeline.save_result(description_type='json', description_path=out_json_path, dataset_path=out_netcdf_path)