forked from E3SM-Project/e3sm_diags
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
126 lines (111 loc) · 4.34 KB
/
setup.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
import glob
import os
from setuptools import find_packages, setup
def get_all_files_in_dir(directory, pattern):
return glob.glob(os.path.join(directory, pattern))
zonal_mean_xy_files = get_all_files_in_dir(
"e3sm_diags/driver/default_diags", "zonal_mean_xy*"
)
zonal_mean_xy_files += get_all_files_in_dir(
"e3sm_diags/driver/default_diags/legacy_diags", "zonal_mean_xy*"
)
zonal_mean_2d_files = get_all_files_in_dir(
"e3sm_diags/driver/default_diags", "zonal_mean_2d*"
)
zonal_mean_2d_files += get_all_files_in_dir(
"e3sm_diags/driver/default_diags/legacy_diags", "zonal_mean_2d*"
)
meridional_mean_2d_files = get_all_files_in_dir(
"e3sm_diags/driver/default_diags", "meridional_mean_2d*"
)
lat_lon_files = get_all_files_in_dir("e3sm_diags/driver/default_diags", "lat_lon*")
lat_lon_files += get_all_files_in_dir(
"e3sm_diags/driver/default_diags/legacy_diags", "lat_lon*"
)
lat_lon_vector_files = get_all_files_in_dir(
"e3sm_diags/driver/default_diags", "lat_lon_vector*"
)
polar_files = get_all_files_in_dir("e3sm_diags/driver/default_diags", "polar*")
polar_files += get_all_files_in_dir(
"e3sm_diags/driver/default_diags/legacy_diags", "polar*"
)
cosp_histogram_files = get_all_files_in_dir(
"e3sm_diags/driver/default_diags", "cosp_histogram*"
)
cosp_histogram_files += get_all_files_in_dir(
"e3sm_diags/driver/default_diags/legacy_diags", "cosp_histogram*"
)
area_mean_time_series = get_all_files_in_dir(
"e3sm_diags/driver/default_diags", "area_mean_time_series*"
)
qbo = get_all_files_in_dir("e3sm_diags/driver/default_diags", "qbo*")
streamflow = get_all_files_in_dir("e3sm_diags/driver/default_diags", "streamflow*")
enso_diags_files = get_all_files_in_dir("e3sm_diags/driver/default_diags", "enso_*")
diurnal_cycle_files = get_all_files_in_dir(
"e3sm_diags/driver/default_diags", "diurnal_cycle_*"
)
arm_diags_files = get_all_files_in_dir("e3sm_diags/driver/default_diags", "arm_diags_*")
tc_analysis_files = get_all_files_in_dir(
"e3sm_diags/driver/default_diags", "tc_analysis_*"
)
annual_cycle_zonal_mean_files = get_all_files_in_dir(
"e3sm_diags/driver/default_diags", "annual_cycle_zonal_mean_*"
)
rgb_files = get_all_files_in_dir("e3sm_diags/plot/colormaps", "*.rgb")
control_runs_files = get_all_files_in_dir("e3sm_diags/driver/control_runs", "*.csv")
INSTALL_PATH = "share/e3sm_diags/"
data_files = [
(os.path.join(INSTALL_PATH, "zonal_mean_xy"), zonal_mean_xy_files),
(os.path.join(INSTALL_PATH, "zonal_mean_2d"), zonal_mean_2d_files),
(
os.path.join(INSTALL_PATH, "meridional_mean_2d"),
meridional_mean_2d_files,
),
(os.path.join(INSTALL_PATH, "lat_lon"), lat_lon_files),
(os.path.join(INSTALL_PATH, "polar"), polar_files),
(os.path.join(INSTALL_PATH, "lat_lon_vector"), lat_lon_vector_files),
(os.path.join(INSTALL_PATH, "cosp_histogram"), cosp_histogram_files),
(
os.path.join(INSTALL_PATH, "area_mean_time_series"),
area_mean_time_series,
),
(os.path.join(INSTALL_PATH, "enso_diags"), enso_diags_files),
(os.path.join(INSTALL_PATH, "qbo"), qbo),
(os.path.join(INSTALL_PATH, "streamflow"), streamflow),
(os.path.join(INSTALL_PATH, "diurnal_cycle"), diurnal_cycle_files),
(os.path.join(INSTALL_PATH, "arm_diags"), arm_diags_files),
(os.path.join(INSTALL_PATH, "tc_analysis"), tc_analysis_files),
(
os.path.join(INSTALL_PATH, "annual_cycle_zonal_mean"),
annual_cycle_zonal_mean_files,
),
(
INSTALL_PATH,
[
"e3sm_diags/driver/acme_ne30_ocean_land_mask.nc",
"misc/e3sm_logo.png",
],
),
(os.path.join(INSTALL_PATH, "colormaps"), rgb_files),
(os.path.join(INSTALL_PATH, "control_runs"), control_runs_files),
(
os.path.join(INSTALL_PATH, "viewer"),
["e3sm_diags/viewer/index_template.html"],
),
]
setup(
name="e3sm_diags",
version="2.5.0",
author="Chengzhu (Jill) Zhang, Tom Vo, Ryan Forsyth, Chris Golaz and Zeshawn Shaheen",
author_email="zhang40@llnl.gov",
description="E3SM Diagnostics",
scripts=["e3sm_diags/e3sm_diags_driver.py"],
packages=find_packages(include=["e3sm_diags", "e3sm_diags.*"]),
data_files=data_files,
entry_points={
"console_scripts": [
"e3sm_diags=e3sm_diags.e3sm_diags_driver:main",
"e3sm_diags_vars=e3sm_diags.e3sm_diags_vars:main",
]
},
)