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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DataAssimilation
DART-WRF
Commits
1009eb23
Commit
1009eb23
authored
2 years ago
by
lkugler
Browse files
Options
Downloads
Patches
Plain Diff
docs+typo
parent
f87668b1
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/create_obsseq.py
+11
-11
11 additions, 11 deletions
dartwrf/create_obsseq.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
33 additions
and
21 deletions
dartwrf/create_obsseq.py
+
11
−
11
View file @
1009eb23
...
@@ -180,15 +180,15 @@ def create_obs_seq_in(time_dt, list_obscfg,
...
@@ -180,15 +180,15 @@ def create_obs_seq_in(time_dt, list_obscfg,
Args:
Args:
time_dt (dt.datetime): time of observation
time_dt (dt.datetime): time of observation
list_obscfg (list of dict): configuration for observation types
list_obscfg (list of dict): configuration for observation types
must have keys:
Note:
`list_obscfg` must have these keys:
- n_obs (int) : number of observations (must be a square of an integer: 4, 9, 1000, ...)
- n_obs (int) : number of observations (must be a square of an integer: 4, 9, 1000, ...)
- obs_locations (str or tuple) in [
'
square_array_from_domaincenter
'
,
'
square_array_evenly_on_grid
'
, ]
- obs_locations (str or tuple) in [
'
square_array_from_domaincenter
'
,
'
square_array_evenly_on_grid
'
, ]
or list of (lat, lon) coordinate tuples, in degrees north/east
or list of (lat, lon) coordinate tuples, in degrees north/east
- error_generate (
float
)
- error_generate (
np.array
)
- error_assimilate (
float
or False) : False -> parameterized
- error_assimilate (
np.array
or False) : False -> parameterized
- cov_loc_radius_km (float)
- cov_loc_radius_km (float)
obs_errors (np.array): contains observation errors, one for each observation
"""
"""
print
(
'
creating obs_seq.in:
'
)
print
(
'
creating obs_seq.in:
'
)
time_dt
=
add_timezone_UTC
(
time_dt
)
time_dt
=
add_timezone_UTC
(
time_dt
)
...
...
This diff is collapsed.
Click to expand it.
dartwrf/prepare_namelist.py
+
13
−
9
View file @
1009eb23
...
@@ -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 @
1009eb23
"""
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
from
dart
r
wrf
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
register
or
sign in
to comment