forked from NicWayand/SnowCast
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig_hrdps_west.py
More file actions
103 lines (72 loc) · 3.53 KB
/
config_hrdps_west.py
File metadata and controls
103 lines (72 loc) · 3.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
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
import slack_webhook
import os
settings = dict()
# Should snowcast run in a mode that allows CHM to checkpoint. Requires a slightly differently handling of the met files
settings['checkpoint_mode'] = True
# the URL to use for the slack webhook. This is a secret
settings['webhook_url'] = slack_webhook.webhook_url
settings['snowcast_base'] = os.getcwd()
settings['hrdps_domain'] = 'continental'
# Dir to put GEM grib2 files
settings['grib_dir'] = os.path.join(settings['snowcast_base'], 'nwp_forcing/grib_download')
# were to copy after we have processed. Not used, just kept "in case"
settings['grib_ar_dir'] = os.path.join(settings['snowcast_base'], 'nwp_forcing/grib_ar')
# Dir where output netcdf files go
settings['nc_ar_dir'] = os.path.join(settings['snowcast_base'], 'nwp_forcing/nc_ar')
# where to put the nc file CHM to use
settings['nc_chm_dir'] = os.path.join(settings['snowcast_base'], 'nwp_forcing')
#where to put the standalone nc files for use with the checkpointing mode
settings['checkpoint_nc_chm_dir'] = os.path.join(settings['snowcast_base'], 'nwp_forcing/ckp_nc')
#active configuration path
settings['chm_config_path'] = os.path.join(settings['snowcast_base'], 'run_chm/config.json')
# where the CHM output is
settings['chm_outpath'] = os.path.join(settings['snowcast_base'], 'run_chm/output/meshes/SC.pvd')
# where to put the leaflet output
settings['html_dir'] = os.path.join(settings['snowcast_base'], 'www')
# how should CHM be called?
#settings['chm_exec_str'] = '%s -f config.json.chkp.json' % os.path.join(settings['snowcast_base'], 'run_chm/CHM')
settings['chm_exec_str'] = './submit_to_prioQ.sh job.sh'
# produce the complete nc archive. Can use a lot of RAM for large nc files and might not be worth the hassle
# esp. if Snowcast is run in chkpoint mode
settings['create_complete_nc_archive'] = False
# force a regeneration of the complete nc archive
settings['force_nc_archive'] = False
# if there are more nc than you'd like to include, start at this date
# doesn't impact grib processing, just the nc -> CHM step
# if None, use earliest available
# Format Y-M-D
# settings['start_date'] = '2020-10-26'
# settings['end_date'] = '2021-03-29'
settings['start_date'] = '2022-09-17'
# regridding resolution
settings['dxdy'] = 0.002
# post processing settings
# these are using the pvd -> tiff step
# the ESMF regridder can expand to a whole cluster via MPI. This allows for calling it via, e.g, slurm
# if this key is not present it will default to local node MPI using postprocess_maxprocs processors
# if postprocess_exec_str is defined, postprocess_maxprocs is ignored
settings['postprocess_exec_str'] = './submit_to_prioQ.sh postprocess/job.sh'
#settings['postprocess_maxprocs'] = 8
#same as above but for plot generation
# settings['plotgen_exec_str'] = './submit_to_prioQ.sh plot/job.sh'
settings['plotgen_maxprocs'] = 8
#variables to plot (implicitly includes the difference between these)
settings['plot_vars'] = ['swe', 'snowdepthavg', 't']
# Offset from UTM to local time (i.e. Mountain standard time = -7)
# CHM forcing files will be in this time zone
# not currently used
local_time_offset = 0
#### [min,max] extents for bounding box of latitude and longitude
# Bow river basin
# lat_r = [50.411581,51.218712]
# lon_r = [-115.793152,-114.362183]
# CRHO (crho_extent.tif)
lat_r = [50.66, 51.7933333333333]
lon_r = [-116.645, -114.769166666667]
# Entire GEM west domain
# lat_r = [0,90]
# lon_r = [-180,180]
#static figure settings
# deprecated
settings['fig_dir'] = os.path.join(settings['snowcast_base'], 'plot/figures')
settings['dpi'] = 90