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
c3184b59
Commit
c3184b59
authored
3 years ago
by
lkugler
Browse files
Options
Downloads
Patches
Plain Diff
generate free
parent
5d3e899a
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
generate_free.py
+65
-0
65 additions, 0 deletions
generate_free.py
with
65 additions
and
0 deletions
generate_free.py
0 → 100755
+
65
−
0
View file @
c3184b59
#!/usr/bin/python3
"""
running the forecast model without assimilation
"""
import
os
,
sys
,
shutil
import
datetime
as
dt
import
pandas
as
pd
from
slurmpy
import
Slurm
from
config.cfg
import
exp
,
cluster
from
scripts.utils
import
script_to_str
,
symlink
log_dir
=
cluster
.
archivedir
+
'
/logs/
'
slurm_scripts_dir
=
cluster
.
archivedir
+
'
/slurm-scripts/
'
print
(
'
logging to
'
,
log_dir
)
print
(
'
scripts, which are submitted to SLURM:
'
,
slurm_scripts_dir
)
from
scheduler
import
*
################################
print
(
'
starting osse
'
)
backup_scripts
()
id
=
None
is_nature
=
True
begin
=
dt
.
datetime
(
2008
,
7
,
30
,
9
)
id
=
prepare_WRFrundir
(
begin
)
# create initial conditions
id
=
run_ideal
(
depends_on
=
id
)
if
is_nature
:
id
=
wrfinput_insert_wbubble
(
perturb
=
False
,
depends_on
=
id
)
end
=
dt
.
datetime
(
2008
,
7
,
30
,
16
)
id
=
run_ENS
(
begin
=
begin
,
end
=
end
,
first_minute
=
False
,
input_is_restart
=
False
,
output_restart_interval
=
(
end
-
begin
).
total_seconds
()
/
60
,
depends_on
=
id
)
id
=
create_satimages
(
begin
,
depends_on
=
id
)
else
:
id
=
wrfinput_insert_wbubble
(
perturb
=
True
,
depends_on
=
id
)
restarts
=
pd
.
date_range
(
start
=
dt
.
datetime
(
2008
,
7
,
30
,
10
),
end
=
dt
.
datetime
(
2008
,
7
,
30
,
12
),
freq
=
dt
.
timedelta
(
minutes
=
60
))
input_is_restart
=
True
time
=
begin
for
next_restart
in
restarts
:
id
=
run_ENS
(
begin
=
time
,
end
=
next_restart
,
first_minute
=
False
,
input_is_restart
=
input_is_restart
,
restart_path
=
cluster
.
archivedir
+
time
.
strftime
(
'
/%Y-%m-%d_%H:%M/
'
),
output_restart_interval
=
(
next_restart
-
time
).
total_seconds
()
/
60
,
output_restart_interval
=
720
,
depends_on
=
id
)
time
=
next_restart
input_is_restart
=
True
#id = create_satimages(begin, depends_on=id)
verify
(
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