Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DART-WRF-delete_byApril
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Monitor
Service Desk
Analyze
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-delete_byApril
Commits
9fcb9f63
Commit
9fcb9f63
authored
2 years ago
by
lkugler
Browse files
Options
Downloads
Patches
Plain Diff
.
parent
199ffd6b
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
free_forecast.py
+32
-31
32 additions, 31 deletions
free_forecast.py
with
32 additions
and
31 deletions
free_forecast.py
+
32
−
31
View file @
9fcb9f63
...
...
@@ -8,7 +8,7 @@ import pandas as pd
from
dartwrf.workflows
import
WorkFlows
w
=
WorkFlows
(
exp_config
=
'
natur
e.py
'
,
server_config
=
'
jet.py
'
)
w
=
WorkFlows
(
exp_config
=
'
exp_templat
e.py
'
,
server_config
=
'
jet.py
'
)
id
=
None
...
...
@@ -26,7 +26,7 @@ if False: # generate_nature
# id = w.create_satimages(begin, depends_on=id)
if
Tru
e
:
# to continue a nature
if
Fals
e
:
# to continue a nature
start
=
dt
.
datetime
(
2008
,
7
,
30
,
12
)
id
=
w
.
prepare_WRFrundir
(
start
)
# create initial conditions
...
...
@@ -80,61 +80,62 @@ if True: # to continue a nature
if
Fals
e
:
# do a free run (all inits)
begin
=
dt
.
datetime
(
2008
,
7
,
30
,
12
)
id
=
w
.
prepare_WRFrundir
(
begin
)
# create initial conditions
id
=
w
.
run_ideal
(
depends_on
=
id
)
if
Tru
e
:
# do a free run (all inits)
begin
=
dt
.
datetime
(
2008
,
7
,
30
,
12
,
30
)
#
id = w.prepare_WRFrundir(begin) # create initial conditions
#
id = w.run_ideal(depends_on=id)
#id = wrfinput_insert_wbubble(perturb=True, depends_on=id)
#
restarts = pd.date_range(start=dt.datetime(2008, 7, 30, 1
0
),
#
end=dt.datetime(2008, 7, 30, 1
2
),
#
freq=dt.timedelta(minutes=
6
0))
restarts
=
[
dt
.
datetime
(
2008
,
7
,
30
,
12
,
30
)]
restarts
=
pd
.
date_range
(
start
=
dt
.
datetime
(
2008
,
7
,
30
,
1
3
),
end
=
dt
.
datetime
(
2008
,
7
,
30
,
1
4
,
30
),
freq
=
dt
.
timedelta
(
minutes
=
3
0
))
#
restarts = [dt.datetime(2008, 7, 30, 12, 30)]
input_is_restart
=
Fals
e
input_is_restart
=
Tru
e
time
=
begin
last_init
=
dt
.
datetime
(
2008
,
7
,
30
,
9
)
# dummy value
last_init
=
dt
.
datetime
(
2008
,
7
,
30
,
12
)
for
i
,
next_restart
in
enumerate
(
restarts
):
print
(
'
run_WRF from
'
,
time
,
'
to
'
,
next_restart
)
prior_path_exp
=
'
/jetfs/scratch/lkugler/data/sim_archive/exp_v1.19_P2_noDA+1/
'
#w.cluster.archivedir
prior_init_time
=
last_init
prior_valid_time
=
time
id
=
w
.
prepare_IC_from_prior
(
prior_path_exp
,
prior_init_time
,
prior_valid_time
,
depends_on
=
id
)
id
=
w
.
run_ENS
(
begin
=
time
,
end
=
next_restart
,
input_is_restart
=
input_is_restart
,
output_restart_interval
=
(
next_restart
-
time
).
total_seconds
()
/
60
,
first_minute
=
True
,
#output_restart_interval=720,
depends_on
=
id
)
last_init
=
time
time
=
next_restart
input_is_restart
=
True
w
.
create_satimages
(
last_init
,
depends_on
=
id
)
prior_path_exp
=
w
.
cluster
.
archivedir
prior_init_time
=
last_init
prior_valid_time
=
time
id
=
w
.
prepare_IC_from_prior
(
prior_path_exp
,
prior_init_time
,
prior_valid_time
,
depends_on
=
id
)
id_sat
=
w
.
create_satimages
(
last_init
,
depends_on
=
id
)
# free run, no restart files anymore
end
=
dt
.
datetime
(
2008
,
7
,
30
,
18
)
print
(
'
run WRF from
'
,
time
,
'
until
'
,
end
)
id
=
w
.
run_ENS
(
begin
=
time
,
end
=
end
,
input_is_restart
=
input_is_restart
,
#output_restart_interval=(next_restart-time).total_seconds()/60,
output_restart_interval
=
9999
,
depends_on
=
id
)
# end = dt.datetime(2008, 7, 30, 18)
# print('run WRF from', time, 'until', end)
# id = w.run_ENS(begin=time, end=end,
# input_is_restart=input_is_restart,
# #output_restart_interval=(next_restart-time).total_seconds()/60,
# output_restart_interval=9999,
# depends_on=id)
w
.
verify_wrf
(
depends_on
=
id
)
id
=
w
.
create_satimages
(
time
,
depends_on
=
id
)
w
.
verify_sat
(
depends_on
=
id
)
#
id = w.create_satimages(time, depends_on=id)
w
.
verify_sat
(
depends_on
=
id
_sat
)
if
False
:
# to continue a free run
start
=
dt
.
datetime
(
2008
,
7
,
30
,
7
)
end
=
dt
.
datetime
(
2008
,
7
,
30
,
10
)
id
=
w
.
prepare_WRFrundir
(
start
)
# create initial conditions
prior_path_exp
=
'
/
gpfs/data/fs71386
/lkugler/sim_archive/exp_v1.19_P
5
_noDA
'
# w.cluster.archivedir
prior_init_time
=
dt
.
datetime
(
2008
,
7
,
30
,
11
)
prior_path_exp
=
'
/
jetfs/scratch
/lkugler/
data/
sim_archive/exp_v1.19_P
2
_noDA
'
# w.cluster.archivedir
prior_init_time
=
dt
.
datetime
(
2008
,
7
,
30
,
7
)
prior_valid_time
=
start
id
=
w
.
prepare_IC_from_prior
(
prior_path_exp
,
prior_init_time
,
prior_valid_time
,
depends_on
=
id
)
...
...
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