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
52d27178
Commit
52d27178
authored
2 years ago
by
lkugler
Browse files
Options
Downloads
Patches
Plain Diff
change from nature_wrfout to nature_expname
parent
01afdeb5
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
config/exp_template.py
+1
-2
1 addition, 2 deletions
config/exp_template.py
dartwrf/assim_synth_obs.py
+7
-7
7 additions, 7 deletions
dartwrf/assim_synth_obs.py
dartwrf/dart_nml.py
+11
-11
11 additions, 11 deletions
dartwrf/dart_nml.py
free_forecast.py
+1
-0
1 addition, 0 deletions
free_forecast.py
with
20 additions
and
20 deletions
config/exp_template.py
+
1
−
2
View file @
52d27178
...
@@ -9,8 +9,7 @@ exp.superob_km = False # False or int (spatial averaging of observations, unit:
...
@@ -9,8 +9,7 @@ exp.superob_km = False # False or int (spatial averaging of observations, unit:
exp
.
use_existing_obsseq
=
False
# False or pathname (use precomputed obs_seq.out files)
exp
.
use_existing_obsseq
=
False
# False or pathname (use precomputed obs_seq.out files)
#exp.use_existing_obsseq = '/users/students/lehre/advDA_s2023/dartwrf_tutorial/very_cold_observation.out'
#exp.use_existing_obsseq = '/users/students/lehre/advDA_s2023/dartwrf_tutorial/very_cold_observation.out'
# path to the nature run, where we take observations from
exp
.
nature_expname
=
'
exp_v1.18_P1_nature+1
'
exp
.
nature_wrfout
=
'
/mnt/jetfs/scratch/lkugler/data/sim_archive/exp_v1.18_P1_nature/2008-07-30_06:00/1/wrfout_d01_%Y-%m-%d_%H:%M:%S
'
exp
.
input_profile
=
'
/mnt/jetfs/home/lkugler/data/initial_profiles/wrf/ens/2022-03-31/raso.fc.<iens>.wrfprof
'
exp
.
input_profile
=
'
/mnt/jetfs/home/lkugler/data/initial_profiles/wrf/ens/2022-03-31/raso.fc.<iens>.wrfprof
'
...
...
This diff is collapsed.
Click to expand it.
dartwrf/assim_synth_obs.py
+
7
−
7
View file @
52d27178
import
os
,
sys
,
shutil
,
warnings
import
os
,
sys
,
shutil
,
warnings
,
glob
import
time
as
time_module
import
time
as
time_module
import
datetime
as
dt
import
datetime
as
dt
import
numpy
as
np
import
numpy
as
np
...
@@ -21,16 +21,16 @@ def link_nature_to_dart_truth(time):
...
@@ -21,16 +21,16 @@ def link_nature_to_dart_truth(time):
Args:
Args:
time (dt.datetime): Time at which observations will be made
time (dt.datetime): Time at which observations will be made
"""
"""
# get wrfout_d01 from nature run
# get wrfout_d01 from nature run
shutil
.
copy
(
time
.
strftime
(
exp
.
nature_wrfout
),
# find the file in any init directory
cluster
.
dart_rundir
+
"
/wrfout_d01
"
)
fformat
=
'
wrfout_d01_%Y-%m-%d_%H:%M:%S
'
f_nat
=
glob
.
glob
(
cluster
.
archive_base
+
'
/
'
+
exp
.
nature_expname
+
'
/*/1/
'
+
time
.
strftime
(
fformat
))[
0
]
shutil
.
copy
(
f_nat
,
cluster
.
dart_rundir
+
"
/wrfout_d01
"
)
# DART may need a wrfinput file as well
, which serves as a template for dimension sizes
# DART may need a wrfinput file as well
?!
symlink
(
cluster
.
dart_rundir
+
"
/wrfout_d01
"
,
symlink
(
cluster
.
dart_rundir
+
"
/wrfout_d01
"
,
cluster
.
dart_rundir
+
"
/wrfinput_d01
"
)
cluster
.
dart_rundir
+
"
/wrfinput_d01
"
)
print
(
"
linked
"
,
time
.
strftime
(
exp
.
nature_wrfout
),
print
(
"
linked
"
,
f_nat
,
"
to
"
,
cluster
.
dart_rundir
+
"
/wrfout_d01
"
)
"
to
"
,
cluster
.
dart_rundir
+
"
/wrfout_d01
"
)
def
prepare_nature_dart
(
time
):
def
prepare_nature_dart
(
time
):
...
...
This diff is collapsed.
Click to expand it.
dartwrf/dart_nml.py
+
11
−
11
View file @
52d27178
...
@@ -281,9 +281,6 @@ def write_namelist(just_prior_values=False):
...
@@ -281,9 +281,6 @@ def write_namelist(just_prior_values=False):
nml
=
read_namelist
(
cluster
.
dart_srcdir
+
"
/input.nml
"
)
nml
=
read_namelist
(
cluster
.
dart_srcdir
+
"
/input.nml
"
)
# make sure that observations defined in `exp.observations` are assimilated
nml
[
'
&obs_kind_nml
'
][
'
assimilate_these_obs_types
'
]
=
[
list_obstypes
]
# dont compute posterior, just evaluate prior
# dont compute posterior, just evaluate prior
if
just_prior_values
:
if
just_prior_values
:
nml
[
'
&filter_nml
'
][
'
compute_posterior
'
]
=
[[
'
.false.
'
]]
nml
[
'
&filter_nml
'
][
'
compute_posterior
'
]
=
[[
'
.false.
'
]]
...
@@ -293,6 +290,9 @@ def write_namelist(just_prior_values=False):
...
@@ -293,6 +290,9 @@ def write_namelist(just_prior_values=False):
nml
[
'
&obs_kind_nml
'
][
'
assimilate_these_obs_types
'
]
=
[[]]
nml
[
'
&obs_kind_nml
'
][
'
assimilate_these_obs_types
'
]
=
[[]]
nml
[
'
&obs_kind_nml
'
][
'
evaluate_these_obs_types
'
]
=
[
list_obstypes
]
nml
[
'
&obs_kind_nml
'
][
'
evaluate_these_obs_types
'
]
=
[
list_obstypes
]
if
len
(
list_obstypes
)
>
0
:
# make sure that observations defined in `exp.observations` are assimilated
nml
[
'
&obs_kind_nml
'
][
'
assimilate_these_obs_types
'
]
=
[
list_obstypes
]
# write localization variables
# write localization variables
nml
[
'
&assim_tools_nml
'
][
'
special_localization_obs_types
'
]
=
[
list_obstypes
]
nml
[
'
&assim_tools_nml
'
][
'
special_localization_obs_types
'
]
=
[
list_obstypes
]
...
...
This diff is collapsed.
Click to expand it.
free_forecast.py
+
1
−
0
View file @
52d27178
...
@@ -49,6 +49,7 @@ if True: # to continue a nature
...
@@ -49,6 +49,7 @@ if True: # to continue a nature
depends_on
=
id
)
depends_on
=
id
)
# integration time
# integration time
start
=
time
end
=
next_restart
end
=
next_restart
id
=
w
.
run_ENS
(
begin
=
start
,
end
=
end
,
id
=
w
.
run_ENS
(
begin
=
start
,
end
=
end
,
...
...
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