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
5e4af094
Commit
5e4af094
authored
May 5, 2021
by
lkugler
Browse files
Options
Downloads
Patches
Plain Diff
small things
parent
80c33d59
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
scripts/obsseq_to_netcdf.py
+2
-7
2 additions, 7 deletions
scripts/obsseq_to_netcdf.py
scripts/prepare_namelist.py
+6
-3
6 additions, 3 deletions
scripts/prepare_namelist.py
scripts/run_obs_diag.py
+1
-1
1 addition, 1 deletion
scripts/run_obs_diag.py
with
9 additions
and
11 deletions
scripts/obsseq_to_netcdf.py
+
2
−
7
View file @
5e4af094
import
os
,
sys
,
glob
def
listdir_dirs
(
path
):
return
[
a
for
a
in
os
.
listdir
(
path
)
if
os
.
path
.
isdir
(
os
.
path
.
join
(
path
,
a
))]
#sys.path.append('')
from
config.cfg
import
exp
,
cluster
import
run_obs_diag
as
rod
#sys.path.append('/home/fs71386/lkugler/DART-WRF/scripts')
#from obs import read_dartobs as rdo
def
listdir_dirs
(
path
):
return
[
a
for
a
in
os
.
listdir
(
path
)
if
os
.
path
.
isdir
(
os
.
path
.
join
(
path
,
a
))]
if
__name__
==
'
__main__
'
:
...
...
This diff is collapsed.
Click to expand it.
scripts/prepare_namelist.py
+
6
−
3
View file @
5e4af094
...
...
@@ -17,7 +17,7 @@ def run(iens, begin, end, hist_interval=5, radt=5, archive=True):
copy
(
cluster
.
namelist
,
rundir
+
'
/namelist.input
'
)
sed_inplace
(
rundir
+
'
/namelist.input
'
,
'
<dx>
'
,
str
(
int
(
exp
.
model_dx
)))
sed_inplace
(
rundir
+
'
/namelist.input
'
,
'
<timestep>
'
,
str
(
int
(
exp
.
timestep
)))
#
sed_inplace(rundir+'/namelist.input', '<timestep>', str(int(exp.timestep)))
sed_inplace
(
rundir
+
'
/namelist.input
'
,
'
<hist_interval>
'
,
str
(
int
(
hist_interval
)))
sed_inplace
(
rundir
+
'
/namelist.input
'
,
'
<radt>
'
,
str
(
int
(
radt
)))
...
...
@@ -40,13 +40,16 @@ def run(iens, begin, end, hist_interval=5, radt=5, archive=True):
#########################
if
archive
:
init_dir
=
cluster
.
archivedir
()
+
begin
.
strftime
(
'
/%Y-%m-%d_%H:%M/
'
)
+
str
(
iens
)
os
.
makedirs
(
init_dir
,
exist_ok
=
True
)
try
:
print
(
'
copy wrfinput of this run to archive
'
)
wrfin_old
=
rundir
+
'
/wrfinput_d01
'
init_dir
=
cluster
.
archivedir
()
+
begin
.
strftime
(
'
/%Y-%m-%d_%H:%M/
'
)
+
str
(
iens
)
os
.
makedirs
(
init_dir
,
exist_ok
=
True
)
wrfin_arch
=
init_dir
+
'
/wrfinput_d01
'
copy
(
wrfin_old
,
wrfin_arch
)
print
(
'
copy namelist to archive
'
)
copy
(
rundir
+
'
/namelist.input
'
,
init_dir
+
'
/namelist.input
'
)
except
Exception
as
e
:
warnings
.
warn
(
str
(
e
))
...
...
This diff is collapsed.
Click to expand it.
scripts/run_obs_diag.py
+
1
−
1
View file @
5e4af094
import
os
,
sys
,
shutil
,
glob
from
config.cfg
import
exp
,
cluster
from
.
utils
import
symlink
,
copy
,
sed_inplace
,
append_file
from
utils
import
symlink
,
copy
,
sed_inplace
,
append_file
rundir_program
=
'
/home/fs71386/lkugler/data/DART-WRF/rundir/
'
...
...
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