Spaces:
Build error
Build error
Commit
·
ed53036
1
Parent(s):
b0ba9a0
Changes to support operational WRF
Browse files- Dockerfile +3 -3
- wildfire_occurrence/__init__.py +0 -0
- wildfire_occurrence/model/config.py +36 -0
- wildfire_occurrence/model/pipelines/__init__.py +0 -0
- wildfire_occurrence/templates/config.yaml +24 -0
- wildfire_occurrence/templates/namelist.input +107 -0
- wildfire_occurrence/templates/namelist.input.jinja2 +108 -0
- wildfire_occurrence/templates/namelist.wps +37 -0
- wildfire_occurrence/templates/namelist.wps.jinja2 +38 -0
- wildfire_occurrence/view/wildfire_cli.py +0 -0
Dockerfile
CHANGED
@@ -9,9 +9,9 @@ RUN rm -rf /etc/apt/sources.list.d/*.list && \
|
|
9 |
RUN python3 -m pip install --upgrade pip setuptools wheel
|
10 |
|
11 |
COPY requirements.txt .
|
12 |
-
RUN python3 -m pip install --upgrade pip setuptools wheel cython numpy pyshp six pyproj streamlit-folium
|
13 |
-
RUN python3 -m pip install --upgrade --no-binary :all: shapely
|
14 |
-
RUN python3 -m pip install git+https://github.com/SciTools/cartopy.git --upgrade cartopy
|
15 |
|
16 |
#RUN python3 -m pip install --no-cache-dir --compile -r requirements.txt
|
17 |
RUN python3 -m pip install --no-cache-dir -r requirements.txt
|
|
|
9 |
RUN python3 -m pip install --upgrade pip setuptools wheel
|
10 |
|
11 |
COPY requirements.txt .
|
12 |
+
RUN python3 -m pip install --upgrade --no-cache-dir pip setuptools wheel cython numpy pyshp six pyproj streamlit-folium
|
13 |
+
RUN python3 -m pip install --upgrade --no-cache-dir --no-binary :all: shapely
|
14 |
+
RUN python3 -m pip install --no-cache-dir git+https://github.com/SciTools/cartopy.git --upgrade cartopy
|
15 |
|
16 |
#RUN python3 -m pip install --no-cache-dir --compile -r requirements.txt
|
17 |
RUN python3 -m pip install --no-cache-dir -r requirements.txt
|
wildfire_occurrence/__init__.py
ADDED
File without changes
|
wildfire_occurrence/model/config.py
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from typing import Optional
|
2 |
+
from dataclasses import dataclass, field
|
3 |
+
|
4 |
+
|
5 |
+
@dataclass
|
6 |
+
class Config:
|
7 |
+
"""
|
8 |
+
Wildfire Occurrence data configuration class (embedded with OmegaConf).
|
9 |
+
"""
|
10 |
+
|
11 |
+
# Directory to store output files
|
12 |
+
working_dir: str
|
13 |
+
|
14 |
+
# WPS path
|
15 |
+
wps_path: str
|
16 |
+
|
17 |
+
# WRF path
|
18 |
+
wrf_path: str
|
19 |
+
|
20 |
+
# Multinode option
|
21 |
+
multi_node: Optional[bool] = False
|
22 |
+
|
23 |
+
# Container path
|
24 |
+
container_path: Optional[str] = None
|
25 |
+
|
26 |
+
# Container mounting directories
|
27 |
+
container_mounts: Optional[list] = None
|
28 |
+
|
29 |
+
# Dictionary to store WPS configuration file options
|
30 |
+
wps_config: Optional[dict] = field(
|
31 |
+
default_factory=lambda: {'interval_seconds': 10800})
|
32 |
+
|
33 |
+
# Dictionary to store WRF configuration file options
|
34 |
+
wrf_config: Optional[dict] = field(
|
35 |
+
default_factory=lambda: {
|
36 |
+
'interval_seconds': 10800, 'num_metgrid_levels': 27})
|
wildfire_occurrence/model/pipelines/__init__.py
ADDED
File without changes
|
wildfire_occurrence/templates/config.yaml
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# WRF Pipeline
|
2 |
+
|
3 |
+
working_dir: /explore/nobackup/projects/ilab/projects/LobodaTFO/operations
|
4 |
+
container_path: /explore/nobackup/projects/ilab/projects/LobodaTFO/software/containers/wrf-baselibs
|
5 |
+
wps_path: /explore/nobackup/projects/ilab/projects/LobodaTFO/software/WPS_BASE
|
6 |
+
wrf_path: /explore/nobackup/projects/ilab/projects/LobodaTFO/software/WRF_BASE
|
7 |
+
|
8 |
+
# WPS Template Configurations
|
9 |
+
wps_config:
|
10 |
+
geog_data_path: /explore/nobackup/projects/ilab/projects/LobodaTFO/data/WRF_Data/WPS_GEOG/
|
11 |
+
interval_seconds: 10800
|
12 |
+
|
13 |
+
wrf_config:
|
14 |
+
interval_seconds: 10800
|
15 |
+
num_metgrid_levels: 27
|
16 |
+
|
17 |
+
# Directories to mount inside the container
|
18 |
+
container_mounts:
|
19 |
+
- /explore/nobackup/projects/ilab'
|
20 |
+
- '$NOBACKUP'
|
21 |
+
- '/lscratch'
|
22 |
+
- '/panfs/ccds02/nobackup/projects/ilab'
|
23 |
+
|
24 |
+
multi_node: False
|
wildfire_occurrence/templates/namelist.input
ADDED
@@ -0,0 +1,107 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
&time_control
|
2 |
+
start_year = 2023, 2023,
|
3 |
+
start_month = 06, 06,
|
4 |
+
start_day = 04, 04,
|
5 |
+
start_hour = 00, 00,
|
6 |
+
end_year = 2023, 2023,
|
7 |
+
end_month = 06, 06,
|
8 |
+
end_day = 14, 14,
|
9 |
+
end_hour = 00, 00,
|
10 |
+
interval_seconds = 10800
|
11 |
+
input_from_file = .true.,.true.,
|
12 |
+
history_interval = 180, 180,
|
13 |
+
frames_per_outfile = 1000, 1000,
|
14 |
+
restart = .false.,
|
15 |
+
restart_interval = 7200,
|
16 |
+
io_form_history = 2
|
17 |
+
io_form_restart = 2
|
18 |
+
io_form_input = 2
|
19 |
+
io_form_boundary = 2
|
20 |
+
iofields_filename = "myoutfields.txt", "myoutfields.txt",
|
21 |
+
io_form_auxhist24 = 2
|
22 |
+
auxhist24_interval = 180, 180
|
23 |
+
/
|
24 |
+
|
25 |
+
&domains
|
26 |
+
time_step = 90,
|
27 |
+
time_step_fract_num = 0,
|
28 |
+
time_step_fract_den = 1,
|
29 |
+
max_dom = 2,
|
30 |
+
e_we = 171, 321,
|
31 |
+
e_sn = 167, 381,
|
32 |
+
e_vert = 33, 33,
|
33 |
+
p_top_requested = 5000,
|
34 |
+
num_metgrid_levels = 34,
|
35 |
+
num_metgrid_soil_levels = 4,
|
36 |
+
dx = 25000, 5000,
|
37 |
+
dy = 25000, 5000,
|
38 |
+
grid_id = 1, 2,
|
39 |
+
parent_id = 0, 1,
|
40 |
+
i_parent_start = 1, 53,
|
41 |
+
j_parent_start = 1, 45,
|
42 |
+
parent_grid_ratio = 1, 5,
|
43 |
+
parent_time_step_ratio = 1, 3,
|
44 |
+
feedback = 1,
|
45 |
+
smooth_option = 0
|
46 |
+
/
|
47 |
+
|
48 |
+
&physics
|
49 |
+
mp_physics = 8, 8,
|
50 |
+
cu_physics = 3, 3,
|
51 |
+
cudt = 0, 0,
|
52 |
+
ra_lw_physics = 4, 4,
|
53 |
+
ra_sw_physics = 4, 4,
|
54 |
+
bl_pbl_physics = 2, 2,
|
55 |
+
sf_sfclay_physics = 2, 2,
|
56 |
+
sf_surface_physics = 2, 2,
|
57 |
+
num_soil_layers = 4,
|
58 |
+
radt = 10, 10,
|
59 |
+
bldt = 0, 0,
|
60 |
+
num_land_cat = 21,
|
61 |
+
sf_urban_physics = 0, 0,
|
62 |
+
icloud = 1,
|
63 |
+
isfflx = 1,
|
64 |
+
do_radar_ref = 1,
|
65 |
+
lightning_option = 3, 3,
|
66 |
+
lightning_start_seconds = 600, 600,
|
67 |
+
flashrate_factor = 1., 1.,
|
68 |
+
cellcount_method = 0, 0,
|
69 |
+
iccg_method = 2, 2,
|
70 |
+
iccg_prescribed_num = 0., 0.,
|
71 |
+
iccg_prescribed_den = 1., 1.,
|
72 |
+
/
|
73 |
+
|
74 |
+
&fdda
|
75 |
+
/
|
76 |
+
|
77 |
+
&dynamics
|
78 |
+
hybrid_opt = 2,
|
79 |
+
w_damping = 0,
|
80 |
+
diff_opt = 1, 1,
|
81 |
+
km_opt = 4, 4,
|
82 |
+
diff_6th_opt = 0, 0,
|
83 |
+
diff_6th_factor = 0.12, 0.12,
|
84 |
+
base_temp = 290.
|
85 |
+
damp_opt = 3,
|
86 |
+
zdamp = 5000., 5000.,
|
87 |
+
dampcoef = 0.2, 0.2,
|
88 |
+
khdif = 0, 0,
|
89 |
+
kvdif = 0, 0,
|
90 |
+
non_hydrostatic = .true., .true.,
|
91 |
+
moist_adv_opt = 1, 1,
|
92 |
+
scalar_adv_opt = 1, 1,
|
93 |
+
gwd_opt = 1,
|
94 |
+
/
|
95 |
+
|
96 |
+
&bdy_control
|
97 |
+
spec_bdy_width = 5,
|
98 |
+
specified = .true.
|
99 |
+
/
|
100 |
+
|
101 |
+
&grib2
|
102 |
+
/
|
103 |
+
|
104 |
+
&namelist_quilt
|
105 |
+
nio_tasks_per_group = 0,
|
106 |
+
nio_groups = 1,
|
107 |
+
/
|
wildfire_occurrence/templates/namelist.input.jinja2
ADDED
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
&time_control
|
2 |
+
start_year = {{ start_year }}, {{ start_year }},
|
3 |
+
start_month = {{ start_month }}, {{ start_month }},
|
4 |
+
start_day = {{ start_day }}, {{ start_day }},
|
5 |
+
start_hour = {{ start_hour }}, {{ start_hour }},
|
6 |
+
end_year = {{ end_year }}, {{ end_year }},
|
7 |
+
end_month = {{ end_month }}, {{ end_month }},
|
8 |
+
end_day = {{ end_day }}, {{ end_day }},
|
9 |
+
end_hour = {{ end_hour }}, {{ end_hour }},
|
10 |
+
interval_seconds = {{ interval_seconds }}
|
11 |
+
input_from_file = .true.,.true.,
|
12 |
+
history_interval = 180, 180,
|
13 |
+
frames_per_outfile = 1000, 1000,
|
14 |
+
restart = .false.,
|
15 |
+
restart_interval = 7200,
|
16 |
+
io_form_history = 2
|
17 |
+
io_form_restart = 2
|
18 |
+
io_form_input = 2
|
19 |
+
io_form_boundary = 2
|
20 |
+
iofields_filename = "myoutfields.txt", "myoutfields.txt",
|
21 |
+
io_form_auxhist24 = 2
|
22 |
+
auxhist24_interval = 180, 180
|
23 |
+
/
|
24 |
+
|
25 |
+
&domains
|
26 |
+
time_step = 90,
|
27 |
+
time_step_fract_num = 0,
|
28 |
+
time_step_fract_den = 1,
|
29 |
+
max_dom = 2,
|
30 |
+
e_we = 171, 321,
|
31 |
+
e_sn = 167, 381,
|
32 |
+
e_vert = 33, 33,
|
33 |
+
p_top_requested = 5000,
|
34 |
+
num_metgrid_levels = {{ num_metgrid_levels }},
|
35 |
+
num_metgrid_soil_levels = 4,
|
36 |
+
dx = 25000, 5000,
|
37 |
+
dy = 25000, 5000,
|
38 |
+
grid_id = 1, 2,
|
39 |
+
parent_id = 0, 1,
|
40 |
+
i_parent_start = 1, 53,
|
41 |
+
j_parent_start = 1, 45,
|
42 |
+
parent_grid_ratio = 1, 5,
|
43 |
+
parent_time_step_ratio = 1, 3,
|
44 |
+
feedback = 1,
|
45 |
+
smooth_option = 0
|
46 |
+
/
|
47 |
+
|
48 |
+
&physics
|
49 |
+
mp_physics = 8, 8,
|
50 |
+
cu_physics = 3, 3,
|
51 |
+
cudt = 0, 0,
|
52 |
+
ra_lw_physics = 4, 4,
|
53 |
+
ra_sw_physics = 4, 4,
|
54 |
+
bl_pbl_physics = 2, 2,
|
55 |
+
sf_sfclay_physics = 2, 2,
|
56 |
+
sf_surface_physics = 2, 2,
|
57 |
+
num_soil_layers = 4,
|
58 |
+
radt = 10, 10,
|
59 |
+
bldt = 0, 0,
|
60 |
+
num_land_cat = 21,
|
61 |
+
sf_urban_physics = 0, 0,
|
62 |
+
icloud = 1,
|
63 |
+
isfflx = 1,
|
64 |
+
do_radar_ref = 1,
|
65 |
+
lightning_option = 3, 3,
|
66 |
+
lightning_start_seconds = 600, 600,
|
67 |
+
flashrate_factor = 1., 1.,
|
68 |
+
cellcount_method = 0, 0,
|
69 |
+
iccg_method = 2, 2,
|
70 |
+
iccg_prescribed_num = 0., 0.,
|
71 |
+
iccg_prescribed_den = 1., 1.,
|
72 |
+
/
|
73 |
+
|
74 |
+
&fdda
|
75 |
+
/
|
76 |
+
|
77 |
+
&dynamics
|
78 |
+
hybrid_opt = 2,
|
79 |
+
w_damping = 0,
|
80 |
+
diff_opt = 1, 1,
|
81 |
+
km_opt = 4, 4,
|
82 |
+
diff_6th_opt = 0, 0,
|
83 |
+
diff_6th_factor = 0.12, 0.12,
|
84 |
+
base_temp = 290.
|
85 |
+
damp_opt = 3,
|
86 |
+
zdamp = 5000., 5000.,
|
87 |
+
dampcoef = 0.2, 0.2,
|
88 |
+
khdif = 0, 0,
|
89 |
+
kvdif = 0, 0,
|
90 |
+
non_hydrostatic = .true., .true.,
|
91 |
+
moist_adv_opt = 1, 1,
|
92 |
+
scalar_adv_opt = 1, 1,
|
93 |
+
gwd_opt = 1,
|
94 |
+
/
|
95 |
+
|
96 |
+
&bdy_control
|
97 |
+
spec_bdy_width = 5,
|
98 |
+
specified = .true.
|
99 |
+
/
|
100 |
+
|
101 |
+
&grib2
|
102 |
+
/
|
103 |
+
|
104 |
+
&namelist_quilt
|
105 |
+
nio_tasks_per_group = 0,
|
106 |
+
nio_groups = 1,
|
107 |
+
/
|
108 |
+
|
wildfire_occurrence/templates/namelist.wps
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
&share
|
2 |
+
wrf_core = 'ARW',
|
3 |
+
max_dom = 2,
|
4 |
+
start_date = '2023-06-04_00:00:00','2023-06-04_00:00:00',
|
5 |
+
end_date = '2023-06-14_00:00:00','2023-06-14_00:00:00',
|
6 |
+
interval_seconds = 10800,
|
7 |
+
io_form_geogrid = 2
|
8 |
+
/
|
9 |
+
|
10 |
+
&geogrid
|
11 |
+
parent_id = 1, 1,
|
12 |
+
parent_grid_ratio = 1, 5,
|
13 |
+
i_parent_start = 1, 53,
|
14 |
+
j_parent_start = 1, 45,
|
15 |
+
e_we = 171, 321,
|
16 |
+
e_sn = 167, 381,
|
17 |
+
geog_data_res = 'default','default',
|
18 |
+
dx = 25000,
|
19 |
+
dy = 25000,
|
20 |
+
map_proj = 'lambert',
|
21 |
+
ref_lat = 65.00,
|
22 |
+
ref_lon = -155.00,
|
23 |
+
truelat1 = 50.0,
|
24 |
+
truelat2 = 80.0,
|
25 |
+
stand_lon = -155.0,
|
26 |
+
geog_data_path = '/explore/nobackup/projects/ilab/projects/LobodaTFO/data/WRF_Data/WPS_GEOG/'
|
27 |
+
/
|
28 |
+
|
29 |
+
&ungrib
|
30 |
+
out_format = 'WPS',
|
31 |
+
prefix = 'GFS',
|
32 |
+
/
|
33 |
+
|
34 |
+
&metgrid
|
35 |
+
fg_name = 'GFS'
|
36 |
+
io_form_metgrid = 2,
|
37 |
+
/
|
wildfire_occurrence/templates/namelist.wps.jinja2
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
&share
|
2 |
+
wrf_core = 'ARW',
|
3 |
+
max_dom = 2,
|
4 |
+
start_date = '{{ start_date }}','{{ start_date }}',
|
5 |
+
end_date = '{{ end_date }}','{{ end_date }}',
|
6 |
+
interval_seconds = {{ interval_seconds }},
|
7 |
+
io_form_geogrid = 2
|
8 |
+
/
|
9 |
+
|
10 |
+
&geogrid
|
11 |
+
parent_id = 1, 1,
|
12 |
+
parent_grid_ratio = 1, 5,
|
13 |
+
i_parent_start = 1, 53,
|
14 |
+
j_parent_start = 1, 45,
|
15 |
+
e_we = 171, 321,
|
16 |
+
e_sn = 167, 381,
|
17 |
+
geog_data_res = 'default','default',
|
18 |
+
dx = 25000,
|
19 |
+
dy = 25000,
|
20 |
+
map_proj = 'lambert',
|
21 |
+
ref_lat = 65.00,
|
22 |
+
ref_lon = -155.00,
|
23 |
+
truelat1 = 50.0,
|
24 |
+
truelat2 = 80.0,
|
25 |
+
stand_lon = -155.0,
|
26 |
+
geog_data_path = '{{ geog_data_path }}'
|
27 |
+
/
|
28 |
+
|
29 |
+
&ungrib
|
30 |
+
out_format = 'WPS',
|
31 |
+
prefix = 'GFS',
|
32 |
+
/
|
33 |
+
|
34 |
+
&metgrid
|
35 |
+
fg_name = 'GFS'
|
36 |
+
io_form_metgrid = 2,
|
37 |
+
/
|
38 |
+
|
wildfire_occurrence/view/wildfire_cli.py
ADDED
File without changes
|