-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
97 lines (85 loc) · 2.7 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
97
"""Common configurations."""
import os
import inspect
from attrdict import AttrDict
CWD = os.path.dirname(inspect.getfile(inspect.currentframe()))
# All given paths should be full paths
MWSA_DATA_PATH = "/cephfs/archive/ras_projects/MWSA/"
# Lidar and radar paths for given date
LIDAR_PATH = lambda d: f"{MWSA_DATA_PATH}/{d:%Y/%m/%d}/lidar"
XBAND_PATH = lambda d: f"{MWSA_DATA_PATH}/{d:%Y/%m/%d}/xband"
# Multiprocessing with dask
DASK_NWORKERS = 4
DASK_SCHEDULER = "processes"
# For debugging, disable multiprocessing
# DASK_SCHEDULER = "single-threaded"
# Style file for plots
STYLE_FILE = os.path.join(CWD, "presentation.mplstyle")
# Cartesian mask (bool array) that is used to remove blocked grid points
OBS_MASK_PATH = os.path.join(
CWD,
"article_analysis/lidar_cart_mask_20210501_20211130_250m_14km.txt",
)
# Fraction of available measurements in each bin in polar coordinates, used to remove blocked rays
POLAR_OBS_MASK_LIDAR_PATH = os.path.join(
CWD,
"article_analysis/lidar_obs_pct_20210501_20211130_pct.txt",
)
POLAR_OBS_MASK_XBAND_PATH = os.path.join(
CWD,
"article_analysis/xband_obs_pct_20210501_20211130_pct.txt",
)
# Threshold for blocking
POLAR_OBS_MASK_THR = 0.05
# Thresholds for filtering data when calculating gridded agreement
CNR_THR = -30.0
RADAR_MEDIAN_FILTER_FACTOR = 1.5
RADAR_MEDIAN_FILTER_WINDOW = 5
# Location information for lidar
LIDAR_INFO = AttrDict(
{
"vaisala": {
"lonlat": (24.87608, 60.28233),
# regex for any PPI scan
# "filepattern": r"WLS400s-113_([0-9_-]{19})_ppi_([0-9]{3})_200m.nc",
# PPIS with 1000ms accumulation time
"filepattern": r"WLS400s-113_([0-9_-]{19})_ppi_(438|351)_200m.nc",
# PPIs with 500ms accumulation time
# "filepattern": r"WLS400s-113_([0-9_-]{19})_ppi_(435|350)_200m.nc",
"timepattern": "%Y-%m-%d_%H-%M-%S",
"altitude": 35,
}
}
)
# Location info for radar
RADAR_INFO = AttrDict(
{
# X-band radar at Vaisala site
"fivxt": {
"lonlat": (24.876090008765434, 60.28238005936139),
# regex for files in IRIS format
"filepattern": r"WRS([0-9]{12}).RAW([0-9A-Z]{4})",
"timepattern": "%y%m%d%H%M%S",
"altitude": 35,
},
}
)
# Grid information for interpolating to Cartesian coordinates
GRID = AttrDict(
{
"res": 250, # meters
# Bounding boc
"bbox": [
[24.59538688, 60.42089555],
[25.15454059, 60.14325541],
],
"rlim": 14.5e3, # for gridding data, from center of grid
}
)
COLORS = AttrDict(
{
"C0": "k",
"C1": "tab:blue",
"C2": "tab:orange",
}
)