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
f991b446
Commit
f991b446
authored
3 weeks ago
by
Lukas Kugler
Browse files
Options
Downloads
Patches
Plain Diff
only remove wrfrst files (for speedup)
parent
7b75efed
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dartwrf/prep_IC_prior.py
+5
-3
5 additions, 3 deletions
dartwrf/prep_IC_prior.py
dartwrf/utils.py
+0
-6
0 additions, 6 deletions
dartwrf/utils.py
with
5 additions
and
9 deletions
dartwrf/prep_IC_prior.py
+
5
−
3
View file @
f991b446
import
os
,
sys
import
os
,
sys
,
glob
import
datetime
as
dt
from
dartwrf.utils
import
copy
,
clean_wrfdir
,
Config
from
dartwrf.utils
import
copy
,
Config
"""
Sets initial condition data (wrfinput/wrfrst file) in the run_WRF directory for each ensemble member
...
...
@@ -21,7 +21,9 @@ def create_wrfrst_in_WRF_rundir(time: dt.datetime, prior_init_time: dt.datetime,
"""
for
iens
in
range
(
1
,
cfg
.
ensemble_size
+
1
):
dir_wrf_run
=
cfg
.
dir_wrf_run
.
replace
(
'
<exp>
'
,
cfg
.
name
).
replace
(
'
<ens>
'
,
str
(
iens
))
clean_wrfdir
(
dir_wrf_run
)
for
f
in
glob
.
glob
(
dir_wrf_run
+
'
/wrfrst_*
'
):
os
.
remove
(
f
)
prior_wrfrst
=
prior_path_exp
+
prior_init_time
.
strftime
(
'
/%Y-%m-%d_%H:%M/
'
)
\
+
str
(
iens
)
+
time
.
strftime
(
'
/wrfrst_d01_%Y-%m-%d_%H:%M:%S
'
)
...
...
This diff is collapsed.
Click to expand it.
dartwrf/utils.py
+
0
−
6
View file @
f991b446
...
...
@@ -270,12 +270,6 @@ def copy_contents(src, dst):
os
.
system
(
'
cp -rf
'
+
src
+
'
/*
'
+
dst
+
'
/
'
)
def
clean_wrfdir
(
dir
):
for
s
in
[
'
wrfout_*
'
,
'
rsl.*
'
,
'
wrfrst_*
'
]:
for
f
in
glob
.
glob
(
dir
+
'
/
'
+
s
):
os
.
remove
(
f
)
def
symlink
(
src
,
dst
):
"""
Create a symbolic link from src to dst
Creates the folder if it does not exist
...
...
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