-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnwpexp.run_ICON_21_R2B4_waves_standalone
236 lines (199 loc) · 9.28 KB
/
nwpexp.run_ICON_21_R2B4_waves_standalone
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# ICON
#
# ------------------------------------------
# Copyright (C) 2004-2024, DWD, MPI-M, DKRZ, KIT, ETH, MeteoSwiss
# Contact information: icon-model.org
# See AUTHORS.TXT for a list of authors
# See LICENSES/ for license information
# SPDX-License-Identifier: BSD-3-Clause
# ------------------------------------------
# ----------------------------------------------------------------------------
#
# ICON-waves.
#
# The purpose is the technical testing of the ICON-waves.
#
# Mikhail Dobrynin, 2022
#
#=============================================================================
make_and_change_to_experiment_dir # function in ../add_run_routines
# Combine START and MODEL if START_MODEL is not already set.
# START_MODEL is used to ease the execution of a machine that uses a complex
# mpirun command with multiple binaries
START_MODEL="${START_MODEL:=$START $MODEL}"
# set icon_data_poolFolder
icon_data_poolFolder="${icon_data_rootFolder:-/pool/data/ICON}/buildbot_data/nwp"
# base directory for ICON sources, binary and auxilary data:
ICONDIR="${basedir}" # basedir can be set with create_target_header
# root directory for input data
DATAROOT="${icon_data_poolFolder}/Checksuite_data"
# directory with input grids:
GRIDDIR=${DATAROOT}/ICON-waves
# directory with external parameter data:
EXTPARDIR=${DATAROOT}/ICON-waves
# directory with forcing data:
FORCINGDIR=${DATAROOT}/ICON-waves/exp_standalone
# ----------------------------------------------------------------------------
# copy input data: grids, external parameters, model
# ----------------------------------------------------------------------------
# delete existing restart files
#rm -rf *restart_*
# grid files
ln -sf ${GRIDDIR}/ocean_icon_waves_grid_0010_R02B04_G_DOM01.nc ocean_icon_waves_grid_0021_R02B04_G_DOM01.nc
# external parameter (from ExtPar tool)
ln -sf ${EXTPARDIR}/extpar_ocean_icon_waves_grid_0010_R02B04_G_DOM01.nc extpar_ocean_icon_waves_grid_0021_R02B04_G_DOM01.nc
# forcing files
ln -sf ${FORCINGDIR}/ocean_waves_R2B4_19790101T000000_wind.nc ocean_waves_R2B4_19790101T000000_wind.nc
ln -sf ${FORCINGDIR}/ocean_waves_R2B4_19790101T000000_ice.nc ocean_waves_R2B4_19790101T000000_ice.nc
# copy binary
cp -p $MODEL icon
# ----------------------------------------------------------------------------
# grid namelist settings
# ----------------------------------------------------------------------------
wave_grid=ocean_icon_waves_grid_0021_R02B04_G_DOM01.nc
wave_extpar=extpar_ocean_icon_waves_grid_0021_R02B04_G_DOM01.nc
dynamics_grid_filename=""
for gridfile in ${wave_grid}; do
dynamics_grid_filename="${dynamics_grid_filename} '${gridfile}',"
done
num_io_procs=2
num_restart_procs=0
num_prefetch_proc=0
num_io_procs_radar=0
proc0_shift=0 # proc0_shift does not work yet with WAVES
#spectral resolution
nd=12 # NUMBER OF DIRECTIONS
nf=25 # NUMBER OF FREQUENCIES
wave_namelist=NAMELIST_${EXPNAME}
start_date="1979-01-01T00:00:00Z"
end_date="1979-01-06T00:00:00Z"
dtime=600
cat > icon_master.namelist << EOF
&master_nml
lrestart = .false.
/
&time_nml
is_relative_time = .false.
/
&master_time_control_nml
calendar = "proleptic gregorian"
experimentStartDate = "$start_date"
experimentStopDate = "$end_date"
/
&master_model_nml
model_type = 98
model_name = "wave"
model_namelist_filename = "$wave_namelist"
model_min_rank = 1
model_max_rank = 65536
model_inc_rank = 1
/
EOF
cat > ${wave_namelist} << EOF
&coupling_mode_nml
coupled_to_atmo = .FALSE.
/
&run_nml
num_lev = 1
dtime = ${dtime} ! [s] timestep in seconds
ltimer = .true.
timers_level = 10
msg_level = 15
ltestcase = .FALSE. ! run testcase
ldynamics = .TRUE.
ltransport = .FALSE. ! no horizontal transport of wave energy
ntracer = $((${nd}*${nf}))
output = "nml"
/
¶llel_nml
nproma = ${nproma} ! loop chunk length
p_test_run = .false. ! .TRUE. means verification run for MPI parallelization
l_test_openmp = .false.
l_log_checks = .false.
num_io_procs = ${num_io_procs} ! number of I/O processors
num_restart_procs = ${num_restart_procs} ! number of restart processors
num_prefetch_proc = ${num_prefetch_proc} ! number of processors for LBC prefetching
num_io_procs_radar = ${num_io_procs_radar} ! number of EMVORADO I/O processors
proc0_shift = ${proc0_shift}
num_dist_array_replicas = 4
iorder_sendrecv = 1
/
&grid_nml
dynamics_grid_filename = ${dynamics_grid_filename}
/
&extpar_nml
itopo = 0 !do not read atmospheric exp file
extpar_filename = '${wave_extpar}'
/
&wave_nml
ndirs = ${nd} ! number of directions
nfreqs = ${nf} ! number of frequencies
forc_file_prefix = 'ocean_waves_R2B4_19790101T000000' ! prefix of forcing file name
/
&output_nml
filetype = 4 ! output format: 2=GRIB2, 4=NETCDFv2
dom = -1 ! write all domains
output_bounds = 0., 10000000., 3600 ! output: start, end, increment
steps_per_file = 1000 ! number of output steps in one output file
mode = 1 ! 1: forecast mode (relative t-axis), 2: climate mode (absolute t-axis)
include_last = .TRUE. ! flag whether to include the last time step
output_filename = 'wave' ! file name base
output_grid = .TRUE. ! flag whether grid information is added to output.
ml_varlist = 'group:wave_short'
/
&output_nml
filetype = 4 ! output format: 2=GRIB2, 4=NETCDFv2
dom = -1 ! write all domains
output_bounds = 0., 10000000., 7200 ! output: start, end, increment
steps_per_file = 1000 ! number of output steps in one output file
mode = 1 ! 1: forecast mode (relative t-axis), 2: climate mode (absolute t-axis)
include_last = .TRUE. ! flag whether to include the last time step
output_filename = 'wave_ll' ! file name base
output_grid = .TRUE. ! flag whether grid information is added to output.
remap = 1 ! output on regular lat-lon grid
reg_lon_def = 0., 1, 360.
reg_lat_def = -90.,1.,90.
ml_varlist = 'group:wave_short'
/
&output_nml
filetype = 2 ! output format: 2=GRIB2, 4=NETCDFv2
dom = -1 ! write all domains
output_bounds = 0., 10000000., 3600 ! output: start, end, increment
steps_per_file = 1000 ! number of output steps in one output file
mode = 1 ! 1: forecast mode (relative t-axis), 2: climate mode (absolute t-axis)
include_last = .TRUE. ! flag whether to include the last time step
output_filename = 'wave_forcing' ! file name base
output_grid = .TRUE. ! flag whether grid information is added to output.
ml_varlist = 'group:wave_forcing'
/
&output_nml
filetype = 4 ! output format: 2=GRIB2, 4=NETCDFv2
dom = -1 ! write all domains
output_bounds = 0., 10000000., 3600 ! output: start, end, increment
steps_per_file = 1000 ! number of output steps in one output file
mode = 1 ! 1: forecast mode (relative t-axis), 2: climate mode (absolute t-axis)
include_last = .TRUE. ! flag whether to include the last time step
output_filename = 'wave2ocean' ! file name base
output_grid = .TRUE. ! flag whether grid information is added to output.
ml_varlist = 'u_stokes','v_stokes'
/
EOF
#
# configure START_MODEL_function
#
ICON_COMPONENT1_VH_procs=$((num_restart_procs + num_io_procs + num_prefetch_proc + num_io_procs_radar))
# ----------------------------------------------------------------------------
# run the model!
# ----------------------------------------------------------------------------
$START_MODEL
EXIT_STATUS=$?
if [ "$EXIT_STATUS" -ne "0" ]; then
echo "EXIT_STATUS: $EXIT_STATUS"
exit $EXIT_STATUS
fi
# ----------------------------------------------------------------------------
#done # iterations for restart testing
# ----------------------------------------------------------------------------
echo "EXIT_STATUS: $EXIT_STATUS"
echo $EXPDIR
exit $EXIT_STATUS