forked from NOAA-OWP/nwm-data-assimilation
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpostprocessing_wrapper_sample.py
More file actions
77 lines (71 loc) · 2.53 KB
/
Copy pathpostprocessing_wrapper_sample.py
File metadata and controls
77 lines (71 loc) · 2.53 KB
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
from data_assimilation_engine.output_variables.NetCdfProductionManager import netcdf_production_workflow
# Download data from NOMADs server for national reference files
download_inputs = [
"sample_data/outputs_root",
True,
"download"
]
netcdf_production_workflow(download_inputs) # download and metadata_config.json creation.
# Build metadata config file using the information in the reference files
build_config_inputs = [
"sample_data/outputs_root",
"config"
]
netcdf_production_workflow(build_config_inputs) # metadata_config.json creation.
# Build templates for geopackage extents
# assumes download is complete and metadata_config.json is available.
template_inputs = [
"sample_data/outputs_root",
"sample_data/ngen_netcdfs/catchment_output_3n.nc",
"sample_data/sample_gpkg/vpu_3n.gpkg",
"sample_data/outputs_root/configs/metadata_config.json",
"conus",
None,
"template",
]
netcdf_production_workflow(template_inputs)
# Produce NWM products for the geopackage extents
# assumes that templating and metadata_config.json is completed.
production_inputs = [
"sample_data/outputs_root",
"sample_data/ngen_netcdfs/catchment_output_3n.nc",
"sample_data/sample_gpkg/vpu_3n.gpkg",
"sample_data/troute_netcdfs/troute_output_3n.nc",
"sample_data/troute_netcdfs/troute_lakeout_3n.nc",
"sample_data/outputs_root/configs/metadata_config.json",
None,
"4",
"analysis_assim",
"conus",
"output",
]
netcdf_production_workflow(production_inputs)
# Entire workflow
overall_workflow_inputs = [
"sample_data/outputs_root",
"sample_data/ngen_netcdfs/catchment_output_3n.nc"
"sample_data/sample_gpkg/vpu_3n.gpkg",
"sample_data/troute_netcdfs/troute_output_3n.nc",
"sample_data/troute_netcdfs/troute_lakeout_3n.nc",
"sample_data/outputs_root/configs/metadata_config.json",
None,
"0",
"medium_range_blend",
"conus",
"all",
]
# overall workflow for creating products for geopackage extents.
# this downloads the nomads data, creates templates and produces outputs.
netcdf_production_workflow(overall_workflow_inputs)
# Mosaic various grids to produce national grids
mosaic_workflow_inputs = [
"sample_data/outputs_root/nwm_products_for_ngen",
"sample_data/outputs_root/nwm_mosaics",
"sample_data/outputs_root/configs/metadata_config.json",
"0",
"analysis_assim",
"conus",
"mosaic",
]
# creates mosaiced NWM product for all the ngen runs outputs by cycle, category, domain and others.
netcdf_production_workflow(mosaic_workflow_inputs)