Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
DART-WRF
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Automate
Agent sessions
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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DataAssimilation
DART-WRF
Commits
75a38678
Commit
75a38678
authored
Mar 15, 2023
by
lkugler
Browse files
Options
Downloads
Patches
Plain Diff
imports
parent
28652c87
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
dartwrf/obsseq_to_netcdf.py
+1
-1
1 addition, 1 deletion
dartwrf/obsseq_to_netcdf.py
dartwrf/prepare_namelist.py
+13
-9
13 additions, 9 deletions
dartwrf/prepare_namelist.py
dartwrf/prepare_wrfrundir.py
+9
-1
9 additions, 1 deletion
dartwrf/prepare_wrfrundir.py
with
23 additions
and
11 deletions
dartwrf/obsseq_to_netcdf.py
+
1
−
1
View file @
75a38678
...
@@ -2,7 +2,7 @@ import os, sys, glob, warnings
...
@@ -2,7 +2,7 @@ import os, sys, glob, warnings
from
config.cfg
import
exp
from
config.cfg
import
exp
from
config.cluster
import
cluster
from
config.cluster
import
cluster
import
run_obs_diag
as
rod
import
dartwrf.
run_obs_diag
as
rod
def
listdir_dirs
(
path
):
def
listdir_dirs
(
path
):
return
[
a
for
a
in
os
.
listdir
(
path
)
if
os
.
path
.
isdir
(
os
.
path
.
join
(
path
,
a
))]
return
[
a
for
a
in
os
.
listdir
(
path
)
if
os
.
path
.
isdir
(
os
.
path
.
join
(
path
,
a
))]
...
...
This diff is collapsed.
Click to expand it.
dartwrf/prepare_namelist.py
+
13
−
9
View file @
75a38678
...
@@ -18,13 +18,16 @@ from dartwrf.utils import sed_inplace, copy, symlink, mkdir
...
@@ -18,13 +18,16 @@ from dartwrf.utils import sed_inplace, copy, symlink, mkdir
def
run
(
iens
,
begin
,
end
,
hist_interval
=
5
,
radt
=
5
,
archive
=
True
,
def
run
(
iens
,
begin
,
end
,
hist_interval
=
5
,
radt
=
5
,
archive
=
True
,
restart
=
False
,
restart_interval
=
720
):
restart
=
False
,
restart_interval
=
720
):
"""
Create namelist.input file
s
"""
Create
a
namelist.input file
for each ensemble member
Args:
Args:
archive (bool): if True, write to archivedir of experiment
archive (bool): if True, write to archivedir of experiment
if False, write to WRF run directory
if False, write to WRF run directory
restart (str): fortran bool whether to use wrfinput or wrfrst
restart (str): fortran bool whether to use wrfinput or wrfrst
restart_interval (int): output frequency of wrfrst (minutes)
restart_interval (int): output frequency of wrfrst (minutes)
Returns
None
"""
"""
rundir
=
cluster
.
wrf_rundir
(
iens
)
rundir
=
cluster
.
wrf_rundir
(
iens
)
copy
(
cluster
.
namelist
,
rundir
+
'
/namelist.input
'
)
copy
(
cluster
.
namelist
,
rundir
+
'
/namelist.input
'
)
...
@@ -73,6 +76,7 @@ def run(iens, begin, end, hist_interval=5, radt=5, archive=True,
...
@@ -73,6 +76,7 @@ def run(iens, begin, end, hist_interval=5, radt=5, archive=True,
if
__name__
==
'
__main__
'
:
if
__name__
==
'
__main__
'
:
args
=
docopt
(
__doc__
)
args
=
docopt
(
__doc__
)
begin
=
dt
.
datetime
.
strptime
(
args
[
'
<begin>
'
],
'
%Y-%m-%d_%H:%M
'
)
begin
=
dt
.
datetime
.
strptime
(
args
[
'
<begin>
'
],
'
%Y-%m-%d_%H:%M
'
)
end
=
dt
.
datetime
.
strptime
(
args
[
'
<end>
'
],
'
%Y-%m-%d_%H:%M
'
)
end
=
dt
.
datetime
.
strptime
(
args
[
'
<end>
'
],
'
%Y-%m-%d_%H:%M
'
)
...
...
This diff is collapsed.
Click to expand it.
dartwrf/prepare_wrfrundir.py
+
9
−
1
View file @
75a38678
"""
Prepare WRF run directories, to use wrf.exe then
Args:
init_time (str): YYYY-MM-DD_HH:MM
Returns:
None
"""
import
os
,
sys
,
shutil
import
os
,
sys
,
shutil
import
datetime
as
dt
import
datetime
as
dt
from
config.cfg
import
exp
from
config.cfg
import
exp
from
config.cluster
import
cluster
from
config.cluster
import
cluster
from
dartwrf.utils
import
symlink
,
copy
,
link_contents
from
dartwrf.utils
import
symlink
,
copy
,
link_contents
import
prepare_namelist
from
dartwrf
import
prepare_namelist
if
__name__
==
'
__main__
'
:
if
__name__
==
'
__main__
'
:
...
...
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
sign in
to comment