Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DART-WRF
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DataAssimilation
DART-WRF
Commits
199ffd6b
Commit
199ffd6b
authored
1 year ago
by
lkugler
Browse files
Options
Downloads
Patches
Plain Diff
hist_interval, radt as arguments to run_ENS
parent
f726bc1a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dartwrf/workflows.py
+15
-7
15 additions, 7 deletions
dartwrf/workflows.py
with
15 additions
and
7 deletions
dartwrf/workflows.py
+
15
−
7
View file @
199ffd6b
...
...
@@ -207,7 +207,7 @@ class WorkFlows(object):
return
id
def
run_ENS
(
self
,
begin
,
end
,
depends_on
=
None
,
first_minute
=
False
,
input_is_restart
=
True
,
output_restart_interval
=
720
):
input_is_restart
=
True
,
output_restart_interval
=
720
,
hist_interval
=
5
,
radt
=
5
):
"""
Run the forecast ensemble
Args:
...
...
@@ -217,6 +217,8 @@ class WorkFlows(object):
first_minute (bool, optional): if True, run the first minute of the forecast
input_is_restart (bool, optional): if True, start WRF from WRFrst file (restart mode)
output_restart_interval (int, optional): interval in minutes between output of WRFrst files
hist_interval (int, optional): interval in minutes between output of WRF history files
radt (int, optional): time step of radiation scheme
Returns:
str: job ID of the submitted job
...
...
@@ -227,12 +229,13 @@ class WorkFlows(object):
args
=
[
self
.
cluster
.
python
,
self
.
cluster
.
scripts_rundir
+
'
/prepare_namelist.py
'
,
begin
.
strftime
(
'
%Y-%m-%d_%H:%M
'
),
end
.
strftime
(
'
%Y-%m-%d_%H:%M
'
),
str
(
hist_interval
),
'
--radt=
'
+
str
(
radt
),
'
--restart=
'
+
restart_flag
,]
if
output_restart_interval
:
args
.
append
(
'
--restart_interval=
'
+
str
(
int
(
float
(
output_restart_interval
))))
return
self
.
cluster
.
run_job
(
'
'
.
join
(
args
),
"
preWRF
"
,
cfg_update
=
dict
(
time
=
"
2
"
),
depends_on
=
[
depends_on
])
return
self
.
cluster
.
run_job
(
'
'
.
join
(
args
),
"
preWRF
"
,
cfg_update
=
dict
(
time
=
"
2
"
),
depends_on
=
[
depends_on
])
id
=
depends_on
restart_flag
=
'
.false.
'
if
not
input_is_restart
else
'
.true.
'
wrf_cmd
=
script_to_str
(
self
.
cluster
.
run_WRF
...
...
@@ -240,13 +243,13 @@ class WorkFlows(object):
).
replace
(
'
<cluster.wrf_rundir_base>
'
,
self
.
cluster
.
wrf_rundir_base
).
replace
(
'
<cluster.wrf_modules>
'
,
self
.
cluster
.
wrf_modules
)
# first minute forecast (needed for validating a radiance assimilation)
if
first_minute
:
id
=
prepare_WRF_inputfiles
(
begin
,
begin
+
dt
.
timedelta
(
minutes
=
1
),
hist_interval
=
1
,
# to get an output after 1 minute
radt
=
1
,
# to get a cloud fraction CFRAC after 1 minute
output_restart_interval
=
output_restart_interval
,
depends_on
=
id
)
radt
=
1
,
# to get a cloud fraction CFRAC after 1 minute
output_restart_interval
=
output_restart_interval
,
depends_on
=
id
)
id
=
self
.
cluster
.
run_job
(
wrf_cmd
,
"
WRF-
"
+
self
.
exp
.
expname
,
cfg_update
=
{
"
array
"
:
"
1-
"
+
str
(
self
.
cluster
.
size_jobarray
),
"
ntasks
"
:
"
10
"
,
"
nodes
"
:
"
1
"
,
...
...
@@ -254,7 +257,12 @@ class WorkFlows(object):
depends_on
=
[
id
])
# forecast for the whole forecast duration
id
=
prepare_WRF_inputfiles
(
begin
,
end
,
output_restart_interval
=
output_restart_interval
,
depends_on
=
id
)
id
=
prepare_WRF_inputfiles
(
begin
,
end
,
hist_interval
=
hist_interval
,
radt
=
radt
,
output_restart_interval
=
output_restart_interval
,
depends_on
=
id
)
time_in_simulation_hours
=
(
end
-
begin
).
total_seconds
()
/
3600
runtime_wallclock_mins_expected
=
int
(
8
+
time_in_simulation_hours
*
9
)
# usually below 9 min/hour
id
=
self
.
cluster
.
run_job
(
wrf_cmd
,
"
WRF-
"
+
self
.
exp
.
expname
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment