-
Notifications
You must be signed in to change notification settings - Fork 0
/
nwpexp.run_ICON_17_R2B4_AO_coupled
1540 lines (1385 loc) · 62.8 KB
/
nwpexp.run_ICON_17_R2B4_AO_coupled
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
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/bin/bash
# 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
# ------------------------------------------
# ----------------------------------------------------------------------------
#
# Coupled ocean-atmosphere run both at resolution R2B4 with identical grids
#
# This basic coupled test case computes a few days up to years of a
# global weather forecast (ICON-NWP) coupled to a global ocean (ICON-O).
# The system is set up on the same grid and utilizes a common
# land-sea-mask in 160 km resolution (R2B04), initialized at 1979-01-01.
# The purpose is the technical testing of the coupled setup.
#
# Martin Koehler, Stephan Lorenz, Rene Redler Spring 2021
#
# Based on exp.oce_nwp_proto_common.
#
# PBS options: NE=1-64, CPE=8
#
ulimit -s 2097152
ulimit -c 0
#=============================================================================
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"
# environment variables for the experiment and the target system
# --------------------------------------------------------------
export EXPNAME="coupleR2B4_017"
# start and end date+time of experiment
# -------------------------------------
start_date=${start_date:="1979-01-01T00:00:00Z"}
# end_date=${end_date:="1989-01-01T00:00:00Z"}
end_date=${end_date:="1979-01-05T00:00:00Z"}
#start_date=${start_date:="1979-01-01T00:00:00Z"}
# end_date=${end_date:="2111-01-01T00:00:00Z"}
# restart=checkpoint intervals (= file length)
# --------------------------------------------
#restart_interval="P1Y" # no restart used for NWP
#checkpoint_interval="P1Y" # write checkpoint
restart_interval="P10Y" # no restart used for NWP
checkpoint_interval="P10Y" # write checkpoint
#restart_interval="PT25H" # no restart used for NWP
#checkpoint_interval="PT25H" # write checkpoint
# file interval - not used, so select longer than restart-interval
atm_file_interval="P100Y"
oce_file_interval="P100Y"
# output intervals
# ----------------
#atm_output_interval="PT450S"
#oce_output_interval="PT2H"
atm_output_interval="P1D" # "PT30M"
oce_output_interval="P1D" # "PT1H"
#=============================================================================
#
# OpenMP environment variables
# ----------------------------
export OMP_NUM_THREADS=1 # openMPI deactivated - best (needs compiling)
export ICON_THREADS=1
export OMP_SCHEDULE=dynamic,1
export OMP_DYNAMIC="false"
export OMP_STACKSIZE=200M
export NMPI_PROGINF=DETAIL # get performance details (Jens-Olaf Beismann)
# Run information
PPN=-1
CPE=${CPE:-128}
NE=${NE:-1}
((PPN=CPE*NE/OMP_NUM_THREADS))
((NE1=NE-1))
echo "PPN etc. NE=$NE CPE=$CPE PPN=$PPN"
#
# MPI variables
# -------------
# NEC has PPN=NE*CPE mpi processes (OMP_NUM_THREADS=1)
# they will be devided in ocean and atmosphere
mpi_total_procs=${PPN}
# at least one node for ocean and atmosphere each is necessary
# default: half of requested nodes for ocean
#((mpi_oce_procs=mpi_total_procs/2))
mpi_oce_procs=8 # optimal: 8/16 for NE=4/8 dt=600/dt_rad=3600, 12 dt=450/dt_rad=3600, 8 dt=360/dt_rad=1800
((mpi_atm_procs=PPN-mpi_oce_procs))
echo $mpi_total_procs ${mpi_atm_procs} ${mpi_oce_procs}
nproma_atm=$nproma
nproma_oce=$nproma
# asynchronous diagnostic output processes
# ----------------------------------------
# Note that "mpi_atm_io_procs" must match the number of output files
mpi_atm_io_procs=2 # >0 for atmosphere plus land (not working for monitoring)
mpi_oce_io_procs=2
ICON_COMPONENT2_proc0_shift=$proc0_shift
#=============================================================================
#=============================================================================
# root directory for input data
DATAROOT="${icon_data_poolFolder}/Checksuite_data/ICON-seamless"
# base directory for ICON sources and binary:
ICONDIR="$basedir" # basedir is provided by create_target_header
# run script directory
job_name="exp.run_ICON_17_R2B4_AO_coupled.run" # name of run script
RUNSCRIPTDIR=${ICONDIR}/run/checksuite.nwp # directory of run script
rm -rf stdout.* stderr.* # remove standard output from previous run
#=============================================================================
#
# Basic test case for the ICON-NWP coupled to the ICON-O.
#
# This section of the run script contains the specifications of the experiment.
# The specifications are passed by namelist to the program.
# For a complete list see Namelist_overview.pdf
#
# Initial revision: 2021-01-27, S. Lorenz, MPI-M
#
#-----------------------------------------------------------------------------
#
# Basic specifications of the simulation
# --------------------------------------
#
# These variables are set in the header section of the completed run script:
#
# EXPNAME = experiment name
# NPROMA = array blocking length / inner loop length
#-----------------------------------------------------------------------------
# (0) Basic model configuration
# -----------------------------
atmos_gridID="0043"
atmos_refinement="R02B04"
ocean_gridID="0043"
ocean_refinement="R02B04"
#
#-----------------------------------------------------------------------------
# namelist files
# --------------
atm_namelist=NAMELIST_${EXPNAME}_atm
oce_namelist=NAMELIST_${EXPNAME}_ocean
#--------------------------------------------------------------------------------------------------
#
# (1) Define the model time stepping
# ----------------------------------
#
# NWP: # 360s or 450s for R2B4
dtime=450 # NWP atmospheric timestep (s) (same as in atmTimeStep!!)
oceTimeStep="PT60M" # ocean time step
atmTimeStep="PT450S" # atmos time step (for coupler) (same as dtime!!)
couplingTimeStep="PT60M" # coupling time step
longcouplingTimeStep="P100Y" # no coupling (long coupling period)
#--------------------------------------------------------------------------------------------------
# (2) unset some setting of create_target_header for mistral
unset OMPI_MCA_coll_fca_enable
unset OMPI_MCA_coll_fca_priority
#--------------------------------------------------------------------------------------------------
# (3) Set variables to configure the experiment:
# ----------------------------------------------
# use alternatively: full restart, init from (ocean) restart, init from climatology or false
# - set to false if ocean was already initialised
# initialiseOcean="fromRestart" # first run
initialiseOcean="fromClimatology" # from Levitus observations (current time, mean last 10 years)
# initialiseOcean="fromRestartwithHamocc"
# use both lines for atm/oce initialisation from other experiment
#initialiseOcean="FALSE" # restart run (maybe copy from other run)
#restart=.true. # deactivate semaphore mechanism
# set initialiseOcean automatically to false via isRestart.sem
#if [ -d "$basedir/experiments/$EXPNAME" ] ; then
# if [ -f "$basedir/experiments/$EXPNAME/isRestartRun.sem" ]; then
# initialiseOcean="FALSE"
# fi
#fi
if [ -d "$EXPDIR" ] ; then
if [ -f "$EXPDIR/isRestartRun.sem" ]; then
initialiseOcean="FALSE"
fi
fi
# output file selection
# ---------------------
#
# output_<xyz>=yes : yes --> output files for <xyz>, any other value --> no files for <xyz>
# monitoring output switches
output_atm_mon=yes
output_oce_mon=yes
output_oce_moc=no # calc_moc is called every timestep - switch off for high resolutions
output_oce_def=no # annual mean is sufficient
#oce_output_interval_def="P1Y" # annual mean output for deep ocean
oce_output_interval_def=$oce_output_interval
oce_output_interval_mon=$oce_output_interval
# sea ice, snow, SST and some deeper levels ocean output
output_oce_ice=yes
# standard debug-flux arrays at surface
output_atm_dbg=yes
output_oce_dbg=yes
# output switches for large atm/oce files - set to "yes" if needed for standard quickplots
# - yes writes much output and needs more computing time at least in high resolution
# output switches for HAMOCC files
#--------------------------------------------------------------------------------------------------
# I. coupling section
#--------------------------------------------------------------------------------------------------
if [ $mpi_total_procs -lt 2 ] ; then
check_error 0 "This setup requires at least 2 mpi processes. Exit"
fi
# I.1 Split the number of total procs and assign to each component
# ----------------------------------------------------------------
atm_min_rank=0
atm_max_rank=$(( mpi_total_procs - mpi_oce_procs + mpi_atm_io_procs + proc0_shift - 1 ))
atm_inc_rank=1
oce_min_rank=$(( atm_max_rank + 1 ))
oce_max_rank=$(( oce_min_rank + mpi_oce_procs + mpi_oce_io_procs + ICON_COMPONENT2_proc0_shift - 1 ))
oce_inc_rank=1
#
# I.2 Fill model list
# -------------------
#
namelist_list[0]="$atm_namelist"
modelname_list[0]="atmo"
modeltype_list[0]=1
minrank_list[0]=$atm_min_rank
maxrank_list[0]=$atm_max_rank
incrank_list[0]=$atm_inc_rank
#
namelist_list[1]="$oce_namelist"
modelname_list[1]="ocean"
modeltype_list[1]=2
minrank_list[1]=$oce_min_rank
maxrank_list[1]=$oce_max_rank
incrank_list[1]=$oce_inc_rank
# I.3 YAC coupling library configuration
#-----------------------------------------------------------------------------
atm_lag=1
oce_lag=1
# co2_flux and co2_mixing_ratio are listed as transients
# below but are not configured for coupling in the couples
# section. There fields are therefore not considered for
# the search not for the data exchange even if yac_fget and
# yac_fput are called for these fields.
#
# component names in coupling.yaml must (!) match with modelname_list[*]
#
cat > coupling_${EXPNAME}.yaml << EOF
definitions:
atm2oce: &atm2oce
src_component: ${modelname_list[0]}
src_grid: icon_atmos_grid
tgt_component: ${modelname_list[1]}
tgt_grid: icon_ocean_grid
time_reduction: average
src_lag: ${atm_lag}
tgt_lag: ${oce_lag}
oce2atm: &oce2atm
src_component: ${modelname_list[1]}
src_grid: icon_ocean_grid
tgt_component: ${modelname_list[0]}
tgt_grid: icon_atmos_grid
time_reduction: average
src_lag: ${oce_lag}
tgt_lag: ${atm_lag}
interp_stacks:
hcsbb_interp_stack: &hcsbb_interp_stack
interpolation:
- bernstein_bezier
- nnn:
n: 4
weighted: arithmetic_average
- fixed:
user_value: -999.9
conserv_interp_stack: &conserv_interp_stack
interpolation:
- conservative:
order: 1
enforced_conservation: false
partial_coverage: true
normalisation: fracarea
- fixed:
user_value: -999.9
timestep_unit: ISO_format
calendar: proleptic-gregorian
coupling:
- <<: [ *atm2oce, *hcsbb_interp_stack ]
coupling_period: ${couplingTimeStep}
field: [surface_downward_eastward_stress,
surface_downward_northward_stress]
- <<: [ *atm2oce, *conserv_interp_stack ]
coupling_period: ${couplingTimeStep}
field: [surface_fresh_water_flux,
total_heat_flux,
atmosphere_sea_ice_bundle]
- <<: [ *oce2atm, *conserv_interp_stack ]
coupling_period: ${couplingTimeStep}
field: [sea_surface_temperature,
ocean_sea_ice_bundle]
EOF
#
# yaml files for yac
# ------------------
#
#add_required_file ${basedir}/run/coupling_${EXPNAME}.yaml ./coupling.yaml
add_required_file coupling_${EXPNAME}.yaml ./coupling.yaml
#
#-----------------------------------------------------------------------------
# II. ATMOSPHERE
#-----------------------------------------------------------------------------
#
#-----------------------------------------------------------------------------
# NWP model parameters
atmo_model_equations=3 # equation system
nlev=90 # nlev = number of full levels
iforcing=3 # 3 for inwp forcing; 0 for no forcing
#
#-----------------------------------------------------------------------------
# link files directly
#atmo_grid_source=icon_grid_0013_R02B04_G.nc # use atmo grid for atmosphere
#atmo_grid_source=icon_grid_0036_R02B04_G.nc # use ocean global grid for atmosphere
atmo_grid_source=icon_grid_${atmos_gridID}_R02B04_G.nc # use atmo grid for atmosphere
atmo_grid_target=iconR02B04_DOM01.nc # needed in name of ifs2icon and extpar data
atmo_grid_folder=${DATAROOT} # /hpc/uwork/mkoehler/run-icon/coupled
add_link_file ${atmo_grid_folder}/${atmo_grid_source} ./$atmo_grid_target
# NWP Extpar and ifs2icon specificatons
INDIR=${DATAROOT} # /hpc/uwork/mkoehler/run-icon/coupled
#add_link_file $INDIR/external_parameter_icon_icon_grid_0013_R02B04_G_tiles.nc extpar_iconR02B04_DOM01.nc
#add_link_file $INDIR/external_parameter_icon_icon_grid_0013_R02B04_G_tiles_oceanLSM.nc extpar_iconR02B04_DOM01.nc # old
#add_link_file $INDIR/external_parameter_icon_icon_grid_0036_R02B04_G_tiles_oceanLSM.nc2 extpar_iconR02B04_DOM01.nc
add_link_file $INDIR/ExtParSLM_grid_${atmos_gridID}.nc extpar_iconR02B04_DOM01.nc # Stephan
#add_link_file $INDIR/nn-0013-ifs2icon_R2B04.nc ifs2icon_R2B04_DOM01.nc
#add_link_file $INDIR/ifs2icon_0013_r0002_20140601.nc ifs2icon_R2B04_DOM01.nc
add_link_file $INDIR/ifs2icon_1979010100_R02B04_G.nc ifs2icon_R2B04_DOM01.nc
# files needed for radiation
add_link_file ${basedir}/data/ECHAM6_CldOptProps.nc .
add_link_file ${basedir}/data/rrtmg_lw.nc .
ecRad_data_path=${basedir}'/externals/ecrad/data'
# Kinne background aerosols for the year 1850 (irad_aero=12, filename without year)
datadir=${DATAROOT} # /hpc/uwork/icon-sml/Aerosol/Kinne_interpolated/R2B4
add_link_file ${datadir}/R2B4_aeropt_kinne_lw_b16_coa.nc bc_aeropt_kinne_lw_b16_coa.nc
add_link_file ${datadir}/R2B4_aeropt_kinne_sw_b14_coa.nc bc_aeropt_kinne_sw_b14_coa.nc
# use exclusively Kinne background aerosols for the year 1850, filename without year (irad_aero=12)
add_link_file ${datadir}/R2B4_aeropt_kinne_sw_b14_fin_1850.nc bc_aeropt_kinne_sw_b14_fin.nc
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
# If the model runs with mpi_procs=1, then this script exits without error:
if [[ ${mpi_total_procs} = 1 ]]; then
echo "This test must not be started if mpi_procs=1 --> exit test without error"
check_error 0 "exp.nat_jww_nwp_mpiomp"
exit 0
fi
# If running in parallel, mpi_procs*no_of_nodes must be bigger than 2:
#n_procs=`expr ${mpi_procs_pernode} \* ${no_of_nodes}`
n_procs=${mpi_total_procs}
if [[ ${n_procs} = 2 ]]; then
echo "This test needs at least 3 MPI processes --> increase mpi_procs from 2 to 3"
mpi_procs=3
START=${START%2}3
fi
# reconstruct the grid parameters in namelist form
dynamics_grid_filename=""
for gridfile in ${atmo_dyn_grids}; do
dynamics_grid_filename="${dynamics_grid_filename} '${gridfile}',"
done
dynamics_parent_grid_id="${dynamics_parent_grid_id},"
#
#-----------------------------------------------------------------------------
#
# write ICON-NWP atmospheric namelist parameters
# ------------------------
# For a complete list see Namelist_overview and Namelist_overview.pdf
#
cat > ${atm_namelist} << EOF
!
&coupling_mode_nml
coupled_to_ocean = .TRUE.
/
!
¶llel_nml
nproma = ${nproma_atm}
nproma_sub = ${nproma_sub} ! loop chunk length for radiation
p_test_run = .false.
l_test_openmp = .false.
l_log_checks = .true.
num_io_procs = ${mpi_atm_io_procs}
num_restart_procs = 0
iorder_sendrecv = 3
proc0_shift = ${proc0_shift}
use_omp_input = .true.
/
&grid_nml
dynamics_grid_filename = '${atmo_grid_target}'
radiation_grid_filename = " "
dynamics_parent_grid_id = 0,1
lredgrid_phys = .false.,.false.
lfeedback = .false.
/
&run_nml
num_lev = ${nlev},${nlev} ! number of full levels of vertical grid
dtime = ${dtime} ! [s] timestep in seconds
modelTimeStep = "${atmTimeStep}" ! [s] timestep in ISO-format. why still using dtime at all :-\
ldynamics = .TRUE. ! dynamics
ltransport = .TRUE. ! transport
iforcing = ${iforcing} !
ntracer = 5 ! number of tracers - default 0
ltestcase = .false. ! initialize with real data
ltimer = .true. !
timers_level = 20 ! 10 useful and cheap
msg_level = 10 ! detailed report during integration (7 or 13, > 10 expensive)
output = 'nml'
check_uuid_gracefully = .true.
Restart_filename = "${EXPNAME}_restart_atm_<rsttime>.nc"
/
&dynamics_nml
lcoriolis = .TRUE.
divavg_cntrwgt = 0.50
/
&diffusion_nml
hdiff_order = 5
hdiff_efdt_ratio = 24.0
hdiff_smag_fac = 0.025
lhdiff_vn = .TRUE.
lhdiff_temp = .TRUE.
hdiff_multfac = 1.0
hdiff_tv_ratio = 1.0
/
&nwp_phy_nml
inwp_gscp = 1
inwp_convection = 1
inwp_radiation = 4
inwp_cldcover = 1
inwp_turb = 1
inwp_satad = 1
inwp_sso = 1
inwp_gwd = 1
inwp_surface = 1
latm_above_top = .false.
efdt_min_raylfric = 7200.
itype_z0 = 2
icapdcycl = 3
!icpl_aero_conv = 1
!icpl_aero_gscp = 1
icpl_o3_tp = 1
!lshallow_liquid_only = .true.
dt_rad = 3600.
dt_conv = 1800.
dt_sso = 1800.
dt_gwd = 1800.
/
&nwp_tuning_nml
itune_albedo = 0 ! somewhat reduced albedo (w.r.t. MODIS data) over Sahara in order to reduce cold bias
tune_zceff_min = 0.025 ! ** default value to be used for R3B7; use 0.025 for R2B6 in order to get similar temperature biases in upper troposphere **
tune_gkdrag = 0.075 ! R2B6: 0.075
tune_gkwake = 1.5 ! R2B6: 1.5
tune_gfrcrit = 0.425 ! R2B6: 0.425
tune_dust_abs = 0.
tune_zvz0i = 0.85
tune_box_liq_asy = 3.25 ! oper global: 3.0 , oper D2: 3.25, default: 2.5
tune_box_liq = 0.05
tune_rcucov = 0.075
tune_rhebc_land = 0.825
tune_gust_factor = 7.0
icpl_turb_clc = 1
lcalib_clcov = .false. ! turn off TCC, HCC, MCC, LCC tuning
/
&turbdiff_nml
tkhmin = 0.6
tkhmin_strat = 1.0
tkmmin = 0.75
tkmmin_strat = 4
alpha0 = 0.0123
alpha0_max = 0.0335
alpha1 = 0.125
pat_len = 750.
c_diff = 0.2
rlam_heat = 10.0
rat_sea = 0.8
ltkesso = .true. ! SSO dissipation energy used in TKE equation
frcsmot = 0.2 ! these 2 switches together apply vertical smoothing of the TKE source terms
imode_frcsmot = 2 ! in the tropics (only), which reduces the moist bias in the tropical lower troposphere
itype_sher = 3 ! use horizontal shear production terms with 1/SQRT(Ri) scaling to prevent unwanted side effects
ltkeshs = .true.
a_hshr = 2.0
icldm_turb = 1 ! 2: Gauss clouds for turbulence 1: grid scale clouds
icldm_tran = 2 ! 2: Gauss clouds for surface layer 1: grid scale clouds
/
&transport_nml
ivadv_tracer = 3,3,3,3,3
itype_hlimit = 3,4,4,4,4,0
ihadv_tracer = 32,2,2,2,2,0
/
&interpol_nml
nudge_zone_width = 8
l_intp_c2l = .true.
rbf_scale_mode_ll = 2
! l_mono_c2l = .true.
! lsq_high_ord = 3
! support_baryctr_intp XS =.true.,
/
&nonhydrostatic_nml
iadv_rhotheta = 2
ivctype = 2
itime_scheme = 4
exner_expol = 0.333
vwind_offctr = 0.2 ! 0.2 for R2B6 and higher resolution, 0.3 for lower resolution
damp_height = 44000.
rayleigh_coeff = 0.5
divdamp_order = 24 ! 2 ass, 24 fc
divdamp_type = 32 ! optional: 2 assimilation cycle, 32 forecast
divdamp_fac = 0.004 ! 0.004 for R2B6; recommendation for R3B7: 0.003
divdamp_trans_start = 12500
divdamp_trans_end = 17500
igradp_method = 3
l_zdiffu_t = .true.
thslp_zdiffu = 0.02
thhgtd_zdiffu = 125.
htop_moist_proc = 22500.
hbot_qvsubstep = 16000.
/
&sleve_nml
min_lay_thckn = 20. ! lowest level thickness (between half-levels)
max_lay_thckn = 400. ! maximum layer thickness below htop_thcknlimit
htop_thcknlimit = 14000.
top_height = 75000.
stretch_fac = 0.9
decay_scale_1 = 4000.
decay_scale_2 = 2500.
decay_exp = 1.2
flat_height = 16000.
/
&io_nml
lflux_avg = .FALSE. ! false: accumulated fluxes
itype_pres_msl = 5 ! (1) 3: IFS-type extrapolation
itype_rh = 1 ! (1) 2: mixed phase (water and ice)
!dt_checkpoint = 2592000. ! 30 days
inextra_3d = 2 ! 3D extra variables
inextra_2d = 10 ! 2D extra variables
!lnetcdf_flt64_output = .TRUE. ! 64 bit output in all files
!lkeep_in_sync = .TRUE. ! sync after each timestep
/
&output_nml !! lat-lon output
output_start = "${start_date}" ! output_start = output_end
output_end = "${end_date}"
output_interval = "${atm_output_interval}" ! the output interval and
!operation = "mean" ! only working with remap=0
file_interval = "${atm_file_interval}" ! the file interval
filetype = 4 ! output format: 2=GRIB2, 4=NETCDFv2
dom = -1
mode = 1 ! 1: forecast mode (relative t-axis)
include_last = .TRUE. ! flag whether to include the last time step
output_filename = '${EXPNAME}_atm_latlon' ! file name base
filename_format = '<output_filename>_<levtype>_<datetime2>'
output_grid = .TRUE. ! flag whether grid information is added to output.
remap = 1 ! 1: latlon, 0: native grid
reg_lon_def = 0.,1.,360.
reg_lat_def = -90.,1.,90.
ml_varlist = 'clct', 'tqv', 'tqc_dia', 'tqi_dia', 'sp_10m', 't_2m' ,'t_g', 'qv_2m', 'h_ice', 't_ice',
'accthb_s','accthb_t','accsob_s','accsob_t','accshfl_s','acclhfl_s','accumfl_s','accvmfl_s',
'pres_sfc', 'tot_prec', 't_seasfc', 'fr_seaice', 'frac_t_9'
! 'fr_land', 'fr_lake', 'lsm_switch', 'lsm_ctr_c'
! 'thb_s','thb_t','sob_s','sob_t','shfl_s','lhfl_s',
! 'fr_land', 'fr_lake'
! 'extra_2d1','extra_2d2','extra_2d3','extra_2d4','extra_2d5',
! 'extra_2d6','extra_2d7','extra_2d8','extra_2d9','extra_2d10'
! 't_so', 'extra_3d1',
pl_varlist = 'temp', 'u'
p_levels = 20000, 50000, 85000
!m_levels = "5...(nlev+1)"
/
&output_nml !! native accumulated output
output_start = "${start_date}" ! output_start = output_end
output_end = "${end_date}"
output_interval = "${atm_output_interval}" ! the output interval and
!operation = "mean" ! only working with remap=0, not accumulated!
file_interval = "${atm_file_interval}" ! the file interval
filetype = 4 ! output format: 2=GRIB2, 4=NETCDFv2
dom = -1
mode = 1 ! 1: forecast mode (relative t-axis)
include_last = .TRUE. ! flag whether to include the last time step
output_filename = '${EXPNAME}_atm_native' ! file name base
filename_format = '<output_filename>_<levtype>_<datetime2>'
output_grid = .TRUE. ! flag whether grid information is added to output.
remap = 0 ! 1: latlon, 0: native grid
ml_varlist = 'accthb_s','accthb_t','accsob_s','accsob_t','accshfl_s','acclhfl_s',
'accumfl_s','accvmfl_s','tot_prec'
pl_varlist = 'temp', 'u'
p_levels = 20000, 50000, 85000
/
&output_nml !! native time-mean output
output_start = "${start_date}" ! output_start = output_end
output_end = "${end_date}"
output_interval = "${atm_output_interval}" ! the output interval and
operation = "mean" ! only working with remap=0
file_interval = "${atm_file_interval}" ! the file interval
filetype = 4 ! output format: 2=GRIB2, 4=NETCDFv2
dom = -1
mode = 1 ! 1: forecast mode (relative t-axis)
include_last = .TRUE. ! flag whether to include the last time step
output_filename = '${EXPNAME}_atm_nat_mn' ! file name base
filename_format = '<output_filename>_<levtype>_<datetime2>'
output_grid = .TRUE. ! flag whether grid information is added to output.
remap = 0 ! 1: latlon, 0: native grid
ml_varlist = 'clct', 'tqv', 'tqc_dia', 'tqi_dia', 'sp_10m', 't_2m' ,'t_g', 'qv_2m', 'h_ice',
'pres_sfc', 't_seasfc', 'fr_seaice', 'frac_t_9'
/
!&dbg_index_nml
! idbg_mxmn = 4 ! initialize MIN/MAX debug output
! idbg_val = 0 ! initialize one cell debug output
! idbg_slev = 1 ! initialize start level for debug output
!/
&extpar_nml
itopo = 1
n_iter_smooth_topo = 1
heightdiff_threshold = 3000.
/
&lnd_nml
ntiles = 3
nlev_snow = 3
lmulti_snow = .false.
itype_heatcond = 3
idiag_snowfrac = 20
lsnowtile = .true.
lseaice = .true.
llake = .true.
itype_lndtbl = 4
itype_evsl = 4
itype_trvg = 3
itype_root = 2
cwimax_ml = 5.e-4
c_soil = 1.25
c_soil_urb = 0.5
sstice_mode = 1 ! 1 for coupled
lprog_albsi = .true.
hice_min = 0.05 ! default of nwp sea-ice model
hice_max = 4.8 ! corresponding to 40% seaice_limit in icon-o
itype_snowevap = 2
/
&radiation_nml
irad_o3 = 79
irad_aero = 12 ! 6: default, 12: Kinne aerosols (Trang)
izenith = 4 ! 4: NWP default, 3: no annual cycle
albedo_type = 2 ! Modis albedo
! values for 2012 values for 1850 CE
vmr_co2 = 390.e-06 ! 284.3e-06
vmr_ch4 = 1800.e-09 ! 808.2e-09
vmr_n2o = 322.0e-09 ! 273.0e-09
vmr_o2 = 0.20946
vmr_cfc11 = 240.e-12 ! 0.0
vmr_cfc12 = 532.e-12 ! 0.0
direct_albedo = 4
direct_albedo_water = 3
albedo_whitecap = 1
ecrad_llw_cloud_scat = .true.
ecRad_data_path = '${ecRad_data_path}'
isolrad = 1
ecrad_isolver = ${radiation_ecrad_isolver}
! Solver version. 2: McICA with OpenACC, 0: McICA
/
&meteogram_output_nml
lmeteogram_enabled = .false., .false.
n0_mtgrm = 0 ! meteogram initial time step (0 is first step!)
ninc_mtgrm = 2, 4 ! meteogram output interval (in terms of time steps)
ldistributed = .false., .false.
stationlist_tot = 50.0, 8.6, 'Frankfurt-Flughafen',
52.260, 14.313, 'Lindenberg_Obs',
52.1873, 13.9894, 'Waldstation_Kehrigk',
52.1215, 14.1077, 'Falkenberg',
/
EOF
#
#-----------------------------------------------------------------------------
# add standard atmo_non-hydrostatic_files
. ${ICONDIR}/run/add_required_atmo_non-hydrostatic_files
#-----------------------------------------------------------------------------
# III. OCEAN and SEA-ICE
#-----------------------------------------------------------------------------
ocean_vertical_levels=40
ocean_grid_name="icon_grid_${ocean_gridID}_${ocean_refinement}_G"
ocean_grid=${ocean_grid_name}.nc
#ocean_grid_folder="/work/mh0727/m300732/input_SBH/${ocean_gridID}"
ocean_grid_folder=${DATAROOT} # /hpc/uwork/mkoehler/run-icon/coupled
#ocean_data_InputFolder="/pool/data/ICON/oes/input/r0004/${ocean_grid_name}"
ocean_data_InputFolder=${DATAROOT} # /hpc/uwork/mkoehler/run-icon/coupled
#-----------------------------------------------------------------------------
# HAMOCC
#
use_hamocc=no
if [ "x${use_hamocc}" = "xyes" ]; then
lhamocc=".TRUE."
lbgcadv=".TRUE."
nlev_eu=$ocean_vertical_levels
# set nlev_eu to level belonging to approx 500m
if [ "x$ocean_vertical_levels" = "x40" ];then
nlev_eu=19
fi
if [ "x$ocean_vertical_levels" = "x64" ];then
nlev_eu=26
fi
if [ "x$ocean_vertical_levels" = "x20" ];then
nlev_eu=16
fi
else
lhamocc=".FALSE."
lbgcadv=".FALSE."
fi
l_init_bgc=".false." # Hamocc state variables are in restart
if [[ "$initialiseOcean" == "fromRestart" ]] || [[ "$initialiseOcean" == "fromClimatology" ]]; then
l_init_bgc=".true." # initialize HAMOCC (HAMOCC state variables are not in restart)
fi
# ----------------------------------------------------------------------------
#
# ocean namelist
# --------------
cat > ${oce_namelist} << EOF
!
&coupling_mode_nml
coupled_to_atmo = .TRUE.
/
¶llel_nml
nproma = ${nproma_oce}
num_io_procs = ${mpi_oce_io_procs}
num_prefetch_proc = 0
p_test_run = .FALSE.
l_fast_sum = .TRUE.
proc0_shift = ${ICON_COMPONENT2_proc0_shift}
/
&grid_nml
dynamics_grid_filename = "${ocean_grid}"
use_dummy_cell_closure = .TRUE.
use_duplicated_connectivity = .FALSE.
/
&run_nml
modelTimeStep = "${oceTimeStep}"
output = 'nml' ! namelist controlled output scheme
activate_sync_timers = .TRUE.
profiling_output = 1 ! aggregated: 1; detailed: 2; in files: 3
msg_timestamp = .FALSE.
timers_level = 10
debug_check_level = 1
Restart_filename = "${EXPNAME}_restart_oce_<rsttime>.nc"
/
EOF
# output of fixed geometry
cat >> ${oce_namelist} << EOF
&output_nml
filetype = 5 ! output format: 2=GRIB2, 4=NETCDFv2, 5=NETCDFv4
output_filename = "${EXPNAME}_oce_fx"
filename_format = "<output_filename>_<datetime2>"
output_start = "${start_date}" ! start date in ISO-format
output_end = "${start_date}" ! end date in ISO-format
output_interval = "${oce_output_interval}" ! interval in ISO-format
file_interval = "${oce_file_interval}" ! interval in ISO-format
output_grid = .TRUE.
mode = 2 ! 1: forecast mode (relative t-axis); 2: climate mode
include_last = .false.
ml_varlist = 'wet_c','basin_c','regio_c','lsm_ctr_c'
/
EOF
#
if [[ "$output_oce_def" == "yes" ]]; then
#
cat >> ${oce_namelist} << EOF
&output_nml
filetype = 5
output_filename = "${EXPNAME}_oce_def"
filename_format = "<output_filename>_<datetime2>"
output_start = "${start_date}" ! start in ISO-format
output_end = "${end_date}" ! end in ISO-format
output_interval = "${oce_output_interval_def}" ! interval in ISO-format
file_interval = "${oce_file_interval}"
mode = 1 ! 1: forecast mode (relative t-axis)
! 2: climate mode (absolute t-axis)
include_last = .FALSE.
output_grid = .FALSE.
operation = "mean"
ml_varlist = 'group:oce_default', 'group:oce_essentials'
/
EOF
fi
if [[ "$output_oce_ice" == "yes" ]]; then
cat >> ${oce_namelist} <<EOF
&output_nml
output_start = "${start_date}" ! start date in ISO-format
output_end = "${end_date}" ! end date in ISO-format
output_interval = "${oce_output_interval}" ! interval in ISO-format
file_interval = "${oce_file_interval}" ! interval in ISO-format
mode = 1 ! 1: forecast mode (relative t-axis), 2: climate mode (absolute t-axis)
operation = 'mean' ! mean over output interval
output_grid = .TRUE.
output_filename = "${EXPNAME}_oce_ice"
filename_format = "<output_filename>_<datetime2>"
filetype = 5 ! output format: 2=GRIB2, 4=NETCDFv2, 5=NETCDFv4
m_levels = "1...3,9,23,30,34" ! surface and some subsurface levels only
ml_varlist = 'draftave','hi','hs','conc','to','so'
/
EOF
fi
#
if [[ "$output_oce_mon" == "yes" ]]; then
#
cat >> ${oce_namelist} << EOF
&output_nml
filetype = 4
output_filename = "${EXPNAME}_oce_mon"
filename_format = "<output_filename>_<datetime2>"
output_start = "${start_date}" ! start in ISO-format
output_end = "${end_date}" ! end in ISO-format
output_interval = "${oce_output_interval_mon}"
file_interval = "${oce_file_interval}"
mode = 1 ! 1: forecast mode (relative t-axis)
! 2: climate mode (absolute t-axis)
include_last = .FALSE.
output_grid = .FALSE.
operation = "mean"
ml_varlist = 'group:ocean_monitor'
/
EOF
fi
#
if [[ "$output_oce_moc" == "yes" ]]; then
#
cat >> ${oce_namelist} << EOF
&output_nml
filetype = 5
output_filename = "${EXPNAME}_oce_moc"
filename_format = "<output_filename>_<datetime2>"
output_start = "${start_date}" ! start in ISO-format
output_end = "${end_date}" ! end in ISO-format
output_interval = "${oce_output_interval}"
file_interval = "${oce_file_interval}"
mode = 1 ! 1: forecast mode (relative t-axis)
! 2: climate mode (absolute t-axis)
include_last = .FALSE.
output_grid = .FALSE.
operation = "mean"
ml_varlist = 'group:ocean_moc'
/
EOF
fi
if [[ "$output_oce_dbg" == "yes" ]]; then
cat >> ${oce_namelist} <<EOF
&output_nml
filetype = 5 ! output format: 2=GRIB2, 4=NETCDFv2, 5=NETCDFv4
output_filename = "${EXPNAME}_oce_dbg"
filename_format = "<output_filename>_<datetime2>"
output_start = "${start_date}" ! start date in ISO-format
output_end = "${end_date}" ! end date in ISO-format
output_interval = "${oce_output_interval}" ! interval in ISO-format
file_interval = "${oce_file_interval}" ! interval in ISO-format
output_grid = .TRUE.
mode = 1 ! 1: forecast mode (relative t-axis); 2: climate mode
operation = 'mean' ! mean over output interval
include_last = .false.
m_levels = '1,2' ! surface and subsurface level only
ml_varlist = 'Qtop', 'Qbot','Qbot_slow', 'zHeatOceI','heatOceI','heatOceW','draftave','zUnderIce',
'mld','condep','zos','u_vint','hi','hs','conc','to','so','u',
'HeatFlux_Total','atmos_fluxes_HeatFlux_ShortWave','atmos_fluxes_HeatFlux_LongWave',
'HeatFlux_ShortWave','HeatFlux_LongWave','HeatFlux_Sensible','HeatFlux_Latent',
'FrshFlux_Runoff','FrshFlux_Precipitation','FrshFlux_Evaporation','FrshFlux_SnowFall',
'FrshFlux_TotalOcean','FrshFlux_VolumeIce','totalsnowfall','Wind_Speed_10m'
/
EOF
fi
##############################################################
cat >> ${oce_namelist} << EOF
&dbg_index_nml
idbg_mxmn = 4 ! initialize MIN/MAX debug output
idbg_val = 0 ! initialize one cell debug output
idbg_slev = 1 ! initialize start level for debug output
idbg_elev = 2 ! initialize end level for debug output
dbg_lat_in = 30.0 ! latitude location of one cell debug output
dbg_lon_in = -30.0 ! longitude location of one cell debug output
str_mod_tst ='oceanCouplng' ! define modules to print out in debug mode
!str_mod_tst = 'all' ! define modules to print out in debug mode
/
&ocean_dynamics_nml
! 40 unevenly spaced levels used by MPIOM/GR30
n_zlev = ${ocean_vertical_levels}
dzlev_m(1:40) = 12.0, 10.0, 10.0, 10.0, 10.0, 10.0, 13.0, 15.0, 20.0, 25.0,
30.0, 35.0, 40.0, 45.0, 50.0, 55.0, 60.0, 70.0, 80.0, 90.0,
100.0, 110.0, 120.0, 130.0, 140.0, 150.0, 170.0, 180.0, 190.0, 200.0,
220.0, 250.0, 270.0, 300.0, 350.0, 400.0, 450.0, 500.0, 500.0, 600.0
l_edge_based = .FALSE. ! edge- or cell-based mimetic discretization
! l_partial_cells = .FALSE. ! partial bottom cells=TRUE: local varying bottom depth
select_solver = 4 ! 1=gmres_oce_old; 2=ocean_restart_gmres,
! 3=mixed precisison restart 4=CG (default),
! 5=CGJ 6=BiCG 7=GMRES restart (legacy) 8=MINRES
use_absolute_solver_tolerance = .TRUE.
solver_tolerance = 1.0E-10 ! this may further be reduced
solver_FirstGuess = 2 ! 0=start from zeros 1=last timestep smoothed 2=last timestep (default)
select_lhs = 2
l_lhs_direct = .true.
fast_performance_level = 200 ! performance level 12: for cell-based; 5: default
use_continuity_correction = .TRUE. ! height adjustment according to vertical velocity in dynamics
cfl_check = .FALSE.
cfl_write = .FALSE.
i_bc_veloc_top = 1
i_bc_veloc_bot = 1 ! 0: (def) bottom friction off, 1: on
/
&ocean_tracer_transport_nml
flux_calculation_horz = 5 ! 1=upwind, 2=central, 3=Lax-Friedrichs,
! 4=Miura, 5=FCT with Zalesak limiter (default)