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
c054935a
Commit
c054935a
authored
2 years ago
by
lkugler
Browse files
Options
Downloads
Patches
Plain Diff
.
parent
da21a0e5
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
config/cluster.py
+0
-76
0 additions, 76 deletions
config/cluster.py
cycled_exp.py
+1
-2
1 addition, 2 deletions
cycled_exp.py
dartwrf/workflows.py
+7
-7
7 additions, 7 deletions
dartwrf/workflows.py
with
8 additions
and
85 deletions
config/cluster.py
deleted
100755 → 0
+
0
−
76
View file @
da21a0e5
import
os
,
sys
import
datetime
as
dt
from
dartwrf
import
utils
from
config.cfg
import
exp
"""
Configuration name docs
When coding, use attributes of a dictionary like this:
$ from cfg import exp, cluster
$ path = cluster.archivedir
attribute name | description
------------------------------------------------------
name any string (currently unused)
python path of python version to use
python_enstools path of python version to use for verification script (not provided)
ncks path to
'
ncks
'
program; type
'
which ncks
'
to find the path,
if it doesn
'
t exist, try to load the module first (
'
module load nco
'
)
ideal path to WRF
'
s ideal.exe
wrfexe path to WRF
'
s wrf.exe
wrf_rundir_base path for temporary files for WRF
dart_rundir_base path for temporary files for DART
archive_base path for long-time output storage
srcdir path to where WRF has been compiled, including the
'
run
'
folder of WRF, e.g. /home/WRF-4.3/run
dart_srcdir path to DART compile directory, e.g. /home/DART-9.11.9/models/wrf/work
rttov_srcdir path to RTTOV compile directory, e.g. /home/RTTOV13/rtcoef_rttov13/
scriptsdir path where DART-WRF scripts reside, e.g. /home/DART-WRF/scripts
namelist path to a namelist template; strings like <hist_interval>, will be overwritten in scripts/prepare_namelist.py
run_WRF path to script which runs WRF on a node of the cluster
obs_impact_filename path to obs_impact_filename (see DART guide; module assim_tools_mod and program obs_impact_tool)
geo_em path to NetCDF file of WRF domain (see WRF guide)
slurm_cfg python dictionary, containing options of SLURM
defined in SLURM docs (https://slurm.schedmd.com/sbatch.html)
this configuration can be overwritten later on, for example:
'
dict(cluster.slurm_cfg, **cfg_update)
'
where
'
cfg_update = {
"
nodes
"
:
"
2
"
}
'
"""
cluster
=
utils
.
ClusterConfig
(
exp
)
cluster
.
name
=
'
srvx1
'
cluster
.
max_nproc
=
6
cluster
.
use_slurm
=
False
# binaries
cluster
.
python
=
'
python
'
cluster
.
python_verif
=
'
/users/staff/lkugler/miniconda3/bin/python
'
cluster
.
ncks
=
'
/home/swd/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.5.0/nco-5.0.1-ntu44aoxlvwtr2tsrobfr4lht7cpvccf/bin/ncks
'
cluster
.
ideal
=
''
#/jetfs/home/lkugler/bin/ideal-v4.3_v1.22.exe'
cluster
.
wrfexe
=
''
#/jetfs/home/lkugler/bin/wrf-v4.3_v1.22.exe'
cluster
.
container
=
''
# paths for data output
cluster
.
wrf_rundir_base
=
utils
.
userhome
+
'
/AdvDA23/run_WRF/
'
# path for temporary files
cluster
.
dart_rundir_base
=
utils
.
userhome
+
'
/AdvDA23/run_DART/
'
# path for temporary files
cluster
.
archive_base
=
utils
.
userhome
+
'
/data/sim_archive/
'
# paths used as input
cluster
.
srcdir
=
'
/users/staff/lkugler/AdvDA23/DART/WRF-4.3/run
'
cluster
.
dart_srcdir
=
'
/users/students/lehre/advDA_s2023/DART/models/wrf/work
'
cluster
.
rttov_srcdir
=
'
/users/students/lehre/advDA_s2023/RTTOV13/rtcoef_rttov13/
'
cluster
.
scriptsdir
=
utils
.
userhome
+
'
/DART-WRF/dartwrf/
'
cluster
.
geo_em
=
'
/users/students/lehre/advDA_s2023/data/geo_em.d01.nc
'
# templates/run scripts
cluster
.
namelist
=
cluster
.
scriptsdir
+
'
/../templates/namelist.input
'
cluster
.
run_WRF
=
cluster
.
scriptsdir
+
'
/run_ens.jet.sh
'
cluster
.
slurm_cfg
=
{
"
account
"
:
"
lkugler
"
,
"
partition
"
:
"
compute
"
,
"
ntasks
"
:
"
1
"
,
"
ntasks-per-core
"
:
"
1
"
,
"
mem
"
:
"
50G
"
,
"
mail-type
"
:
"
FAIL
"
,
"
mail-user
"
:
"
lukas.kugler@univie.ac.at
"
}
This diff is collapsed.
Click to expand it.
cycled_exp.py
+
1
−
2
View file @
c054935a
...
@@ -34,7 +34,7 @@ if __name__ == "__main__":
...
@@ -34,7 +34,7 @@ if __name__ == "__main__":
init_time
=
dt
.
datetime
(
2008
,
7
,
30
,
12
)
init_time
=
dt
.
datetime
(
2008
,
7
,
30
,
12
)
time
=
dt
.
datetime
(
2008
,
7
,
30
,
13
)
time
=
dt
.
datetime
(
2008
,
7
,
30
,
13
)
last_assim_time
=
dt
.
datetime
(
2008
,
7
,
30
,
14
)
last_assim_time
=
dt
.
datetime
(
2008
,
7
,
30
,
14
)
forecast_until
=
dt
.
datetime
(
2008
,
7
,
30
,
14
,
18
)
forecast_until
=
dt
.
datetime
(
2008
,
7
,
30
,
18
)
w
.
prepare_WRFrundir
(
init_time
)
w
.
prepare_WRFrundir
(
init_time
)
# id = w.run_ideal(depends_on=id)
# id = w.run_ideal(depends_on=id)
...
@@ -86,4 +86,3 @@ if __name__ == "__main__":
...
@@ -86,4 +86,3 @@ if __name__ == "__main__":
w
.
verify_sat
(
id_sat
)
w
.
verify_sat
(
id_sat
)
w
.
verify_wrf
(
id
)
w
.
verify_wrf
(
id
)
w
.
verify_fast
(
id
)
This diff is collapsed.
Click to expand it.
dartwrf/workflows.py
+
7
−
7
View file @
c054935a
...
@@ -151,7 +151,7 @@ class WorkFlows(object):
...
@@ -151,7 +151,7 @@ class WorkFlows(object):
mv $rundir/rsl.out.0000 $rundir/rsl.out.input
mv $rundir/rsl.out.0000 $rundir/rsl.out.input
done
done
"""
"""
id
=
self
.
cluster
.
run_job
(
cmd
,
"
ideal
"
+
exp
.
expname
,
cfg_update
=
{
"
ntasks
"
:
str
(
exp
.
n_ens
),
id
=
self
.
cluster
.
run_job
(
cmd
,
"
ideal
-
"
+
exp
.
expname
,
cfg_update
=
{
"
ntasks
"
:
str
(
exp
.
n_ens
),
"
time
"
:
"
10
"
,
"
mem
"
:
"
100G
"
},
depends_on
=
[
depends_on
])
"
time
"
:
"
10
"
,
"
mem
"
:
"
100G
"
},
depends_on
=
[
depends_on
])
return
id
return
id
...
@@ -165,7 +165,7 @@ class WorkFlows(object):
...
@@ -165,7 +165,7 @@ class WorkFlows(object):
pstr
=
'
perturb
'
pstr
=
'
perturb
'
cmd
=
self
.
cluster
.
python
+
'
'
+
self
.
cluster
.
scripts_rundir
+
'
/create_wbubble_wrfinput.py
'
+
pstr
cmd
=
self
.
cluster
.
python
+
'
'
+
self
.
cluster
.
scripts_rundir
+
'
/create_wbubble_wrfinput.py
'
+
pstr
id
=
self
.
cluster
.
run_job
(
cmd
,
"
ins_wbub
ble
"
+
exp
.
expname
,
cfg_update
=
{
"
time
"
:
"
5
"
},
depends_on
=
[
depends_on
])
id
=
self
.
cluster
.
run_job
(
cmd
,
"
ins_wbub
-
"
+
exp
.
expname
,
cfg_update
=
{
"
time
"
:
"
5
"
},
depends_on
=
[
depends_on
])
return
id
return
id
def
run_ENS
(
self
,
begin
,
end
,
depends_on
=
None
,
first_minute
=
True
,
def
run_ENS
(
self
,
begin
,
end
,
depends_on
=
None
,
first_minute
=
True
,
...
@@ -232,7 +232,7 @@ class WorkFlows(object):
...
@@ -232,7 +232,7 @@ class WorkFlows(object):
time_in_simulation_hours
=
(
end
-
begin
).
total_seconds
()
/
3600
time_in_simulation_hours
=
(
end
-
begin
).
total_seconds
()
/
3600
runtime_wallclock_mins_expected
=
int
(
8
+
time_in_simulation_hours
*
9.5
)
# usually below 9 min/hour
runtime_wallclock_mins_expected
=
int
(
8
+
time_in_simulation_hours
*
9.5
)
# usually below 9 min/hour
id
=
self
.
cluster
.
run_job
(
cmd
,
"
WRF
"
+
exp
.
expname
,
cfg_update
=
{
"
array
"
:
"
1-
"
+
str
(
self
.
cluster
.
size_jobarray
),
"
ntasks
"
:
"
10
"
,
"
nodes
"
:
"
1
"
,
id
=
self
.
cluster
.
run_job
(
cmd
,
"
WRF
-
"
+
exp
.
expname
,
cfg_update
=
{
"
array
"
:
"
1-
"
+
str
(
self
.
cluster
.
size_jobarray
),
"
ntasks
"
:
"
10
"
,
"
nodes
"
:
"
1
"
,
"
time
"
:
str
(
runtime_wallclock_mins_expected
),
"
mem
"
:
"
40G
"
},
depends_on
=
[
id
])
"
time
"
:
str
(
runtime_wallclock_mins_expected
),
"
mem
"
:
"
40G
"
},
depends_on
=
[
id
])
return
id
return
id
...
@@ -258,7 +258,7 @@ class WorkFlows(object):
...
@@ -258,7 +258,7 @@ class WorkFlows(object):
+
prior_valid_time
.
strftime
(
'
%Y-%m-%d_%H:%M
'
)
+
prior_valid_time
.
strftime
(
'
%Y-%m-%d_%H:%M
'
)
+
prior_path_exp
)
+
prior_path_exp
)
id
=
self
.
cluster
.
run_job
(
cmd
,
"
Assim
"
+
exp
.
expname
,
cfg_update
=
{
"
ntasks
"
:
"
12
"
,
"
time
"
:
"
60
"
,
id
=
self
.
cluster
.
run_job
(
cmd
,
"
Assim
-
"
+
exp
.
expname
,
cfg_update
=
{
"
ntasks
"
:
"
12
"
,
"
time
"
:
"
60
"
,
"
mem
"
:
"
200G
"
,
"
ntasks-per-node
"
:
"
12
"
,
"
ntasks-per-core
"
:
"
2
"
},
depends_on
=
[
depends_on
])
"
mem
"
:
"
200G
"
,
"
ntasks-per-node
"
:
"
12
"
,
"
ntasks-per-core
"
:
"
2
"
},
depends_on
=
[
depends_on
])
return
id
return
id
...
@@ -275,19 +275,19 @@ class WorkFlows(object):
...
@@ -275,19 +275,19 @@ class WorkFlows(object):
+
prior_init_time
.
strftime
(
'
%Y-%m-%d_%H:%M
'
)
+
prior_init_time
.
strftime
(
'
%Y-%m-%d_%H:%M
'
)
+
prior_valid_time
.
strftime
(
'
%Y-%m-%d_%H:%M
'
)
+
prior_valid_time
.
strftime
(
'
%Y-%m-%d_%H:%M
'
)
+
tnew
)
+
tnew
)
id
=
self
.
cluster
.
run_job
(
cmd
,
"
IC-prior
"
+
exp
.
expname
,
cfg_update
=
dict
(
time
=
"
8
"
),
depends_on
=
[
depends_on
])
id
=
self
.
cluster
.
run_job
(
cmd
,
"
IC-prior
-
"
+
exp
.
expname
,
cfg_update
=
dict
(
time
=
"
8
"
),
depends_on
=
[
depends_on
])
return
id
return
id
def
update_IC_from_DA
(
self
,
assim_time
,
depends_on
=
None
):
def
update_IC_from_DA
(
self
,
assim_time
,
depends_on
=
None
):
cmd
=
self
.
cluster
.
python
+
'
'
+
self
.
cluster
.
scripts_rundir
+
'
/update_IC.py
'
+
assim_time
.
strftime
(
'
%Y-%m-%d_%H:%M
'
)
cmd
=
self
.
cluster
.
python
+
'
'
+
self
.
cluster
.
scripts_rundir
+
'
/update_IC.py
'
+
assim_time
.
strftime
(
'
%Y-%m-%d_%H:%M
'
)
id
=
self
.
cluster
.
run_job
(
cmd
,
"
IC-update
"
+
exp
.
expname
,
cfg_update
=
dict
(
time
=
"
8
"
),
depends_on
=
[
depends_on
])
id
=
self
.
cluster
.
run_job
(
cmd
,
"
IC-update
-
"
+
exp
.
expname
,
cfg_update
=
dict
(
time
=
"
8
"
),
depends_on
=
[
depends_on
])
return
id
return
id
def
create_satimages
(
self
,
init_time
,
depends_on
=
None
):
def
create_satimages
(
self
,
init_time
,
depends_on
=
None
):
cmd
=
'
module purge; module load netcdf-fortran/4.5.3-gcc-8.5.0-qsqbozc; python ~/RTTOV-WRF/run_init.py
'
+
self
.
cluster
.
archivedir
+
init_time
.
strftime
(
'
/%Y-%m-%d_%H:%M/
'
)
cmd
=
'
module purge; module load netcdf-fortran/4.5.3-gcc-8.5.0-qsqbozc; python ~/RTTOV-WRF/run_init.py
'
+
self
.
cluster
.
archivedir
+
init_time
.
strftime
(
'
/%Y-%m-%d_%H:%M/
'
)
id
=
self
.
cluster
.
run_job
(
cmd
,
"
RTTOV
"
+
exp
.
expname
,
cfg_update
=
{
"
ntasks
"
:
"
12
"
,
"
time
"
:
"
120
"
,
"
mem
"
:
"
200G
"
},
depends_on
=
[
depends_on
])
id
=
self
.
cluster
.
run_job
(
cmd
,
"
RTTOV
-
"
+
exp
.
expname
,
cfg_update
=
{
"
ntasks
"
:
"
12
"
,
"
time
"
:
"
120
"
,
"
mem
"
:
"
200G
"
},
depends_on
=
[
depends_on
])
return
id
return
id
...
...
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