forked from lexi-jones/RCLVatlas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
96 lines (69 loc) · 3.85 KB
/
config.py
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#stellas version
# Configuration file
# The user should define directory paths and adjust parameters here.
import numpy as np
### Directory paths ###
# # gos_vel_dir = './CMEMS_data/' # Geostrophic velocity directory
lag_traj_dir = '/work/bk1377/b382618/RCLVs/f32day/lang_traj/' # Lagrangian trajectory directory
LAVD_dir = '/work/bk1377/b382618/RCLVs/f32day/LAVD/' # LAVD directory
RCLV_dir = '/work/bk1377/b382618/RCLVs/f32day/RCLV_dir/' #RCLVatlas directory
# lag_traj_dir = '/work/bk1377/b382618/RCLVs/f8day/lang_traj/' # Lagrangian trajectory directory
# LAVD_dir = '/work/bk1377/b382618/RCLVs/f8day/LAVD/' # LAVD directory
# RCLV_dir = '/work/bk1377/b382618/RCLVs/f8day/RCLV_dir/' #RCLVatlas directory
# lag_traj_dir = '/work/bk1377/b382618/RCLVs/8day/lang_traj/' # Lagrangian trajectory directory
# LAVD_dir = '/work/bk1377/b382618/RCLVs/8day/LAVD/' # LAVD directory
# RCLV_dir = '/work/bk1377/b382618/RCLVs/8day/RCLV_dir_positive/' #RCLVatlas directory
#path = "/work/bk1377/b382618/RCLVs/8day/RCLV_dir/RCLV_20100501_20100906_atlas.csv"
grid_bounds = {'lon_bound_west':180.0,
'lon_bound_east':210.0,
'lat_bound_south':10.0,
'lat_bound_north':40.0,
'lag_grid_res':0.03125}
## NW quadrant
# grid_bounds = {'lon_bound_west':0.1,
# 'lon_bound_east':10.0,
# 'lat_bound_south':0.1,
# 'lat_bound_north':10.0,
# 'lag_grid_res':0.03125}
sim_params = {'runtime':32,
'runtime_unit':'days',
'timestep':20,
'output_freq':6,
'backwards':'n'}
# NOTE: min_dist and min_area are in units of pixels, relative to the LAVD field
RCLV_params = {'min_dist':24,
'min_area':104,
'init_contour_step_frac':0.1,
'convex_def_tol':0.001}
filename_str = '%sdays_runtime_%smin_timestep_particle_start_lat_%s_%s_lon_%s_%s_spatial_step_%s_%shr_output_freq'%(
sim_params['runtime'],sim_params['timestep'],grid_bounds['lat_bound_south'],grid_bounds['lat_bound_north'],
grid_bounds['lon_bound_west'],grid_bounds['lon_bound_east'],grid_bounds['lag_grid_res'],sim_params['output_freq'])
traj_lon_array = np.arange(grid_bounds['lon_bound_west'],grid_bounds['lon_bound_east'],grid_bounds['lag_grid_res'])
traj_lat_array = np.arange(grid_bounds['lat_bound_south'],grid_bounds['lat_bound_north'],grid_bounds['lag_grid_res'])
### version 2 original
# import numpy as np
# ### Directory paths ###
# gos_vel_dir = './CMEMS_data/' # Geostrophic velocity directory
# lag_traj_dir = './lag_trajs/' # Lagrangian trajectory directory
# LAVD_dir = './LAVD/' # LAVD directory
# RCLV_dir = './RCLVs/' #RCLVatlas directory
# grid_bounds = {'lon_bound_west':199.0,
# 'lon_bound_east':204.0,
# 'lat_bound_south':17.0,
# 'lat_bound_north':22.0,
# 'lag_grid_res':0.03125}
# sim_params = {'runtime':32,
# 'runtime_unit':'days',
# 'timestep':20,
# 'output_freq':6,
# 'backwards':'y'}
# # NOTE: min_dist and min_area are in units of pixels, relative to the LAVD field
# RCLV_params = {'min_dist':24,
# 'min_area':104,
# 'init_contour_step_frac':0.1,
# 'convex_def_tol':0.001}
# filename_str = '%sdays_runtime_%smin_timestep_particle_start_lat_%s_%s_lon_%s_%s_spatial_step_%s_%shr_output_freq'%(
# sim_params['runtime'],sim_params['timestep'],grid_bounds['lat_bound_south'],grid_bounds['lat_bound_north'],
# grid_bounds['lon_bound_west'],grid_bounds['lon_bound_east'],grid_bounds['lag_grid_res'],sim_params['output_freq'])
# traj_lon_array = np.arange(grid_bounds['lon_bound_west'],grid_bounds['lon_bound_east'],grid_bounds['lag_grid_res'])
# traj_lat_array = np.arange(grid_bounds['lat_bound_south'],grid_bounds['lat_bound_north'],grid_bounds['lag_grid_res'])