diff --git a/cases/icon-art-terraurb-test/config.yaml b/cases/icon-art-terraurb-test/config.yaml new file mode 100644 index 00000000..cd90ae36 --- /dev/null +++ b/cases/icon-art-terraurb-test/config.yaml @@ -0,0 +1,63 @@ +# Configuration file for the 'icon-art-terraurb-test' case with ICON + +workflow: icon-art-terraurb-test +constraint: mc +run_on: cpu +compute_queue: normal +ntasks_per_node: 36 +startdate: 2022-07-01T00:00:00Z +enddate: 2022-07-01T07:00:00Z +restart_step: PT6H +lterra_urb: .TRUE + +walltime: + prepare_icon: '00:30:00' + oem: '00:30:00' + icon: '00:30:00' + + +eccodes_dir: /store/c2sm/amrs/kdnmez/eccodes_definitions +iconremap_bin: iconremap +iconsub_bin: iconsub +latbc_filename: ICON-ART-UNSTRUCTURED_DOM01_T0000Z_lbc.nc +latbc_copy_path: /store/c2sm/amrs/kdnmez/UrbaNature/icon_art_run/input/icbc_input/new_EU_runs/remapped_bc/ICON-ART-UNSTRUCTURED_DOM01_20220701T0* +inidata_prefix: ICON-ART-UNSTRUCTURED_DOM01_ +inidata_nameformat: 'T0000Z' +inidata_filename_suffix: .nc +inicond_filename: /store/c2sm/amrs/kdnmez/UrbaNature/icon_art_run/input/icbc_input/remapped_ic/ICON-ART-UNSTRUCTURED_DOM01_20220701T000000Z.nc +output_filename: ICON-NWP-URBANATURE-UNSTRUCTURED +filename_format: _DOM_ +lateral_boundary_grid_order: lateral_boundary +art_input_folder: /store/c2sm/amrs/kdnmez/icon-nwp-new/externals/art +dwdfg_filename: /store/c2sm/amrs/kdnmez/UrbaNature/icon_art_run/input/icbc_input/remapped_ic/ICON-ART-UNSTRUCTURED_DOM01_20220701T000000Z.nc + +icontools_runjobs: + - copy_icbc.cfg + +input_files: + radiation_grid_filename: /store/c2sm/amrs/kdnmez/UrbaNature/icon_art_run/input/grid_input/icon_Zurich_Basel_R19B9_wide_DOM01.parent.nc + dynamics_grid_filename: /store/c2sm/amrs/kdnmez/UrbaNature/icon_art_run/input/grid_input/icon_Zurich_Basel_R19B9_wide_DOM01.nc + map_file_latbc: /store/c2sm/amrs/kdnmez/UrbaNature/icon_art_run/input/grid_input/map_file_ZH.latbc + lateral_boundary_grid: /store/c2sm/amrs/kdnmez/UrbaNature/icon_art_run/input/grid_input/lateral_boundary.grid.nc + lrtm_filename: /store/c2sm/amrs/kdnmez/icon-nwp-new/data/rrtmg_lw.nc + map_file_ana: ./input/icon-art-oem/mapping/map_file.ana + chemtracer_xml_filename: /store/c2sm/amrs/kdnmez/UrbaNature/icon_art_run/input/xml/updated_Zurich_summer23.xml + oem_gridded_emissions_nc: /store/c2sm/amrs/kdnmez/UrbaNature/icon_art_run/input/grid_input/icon_Zurich_Basel_R19B9_wide_DOM01_zh_ch_tno_combined/oem_gridded_emissions.nc + oem_vertical_profiles_nc: /store/c2sm/amrs/kdnmez/UrbaNature/icon_art_run/input/grid_input/icon_Zurich_Basel_R19B9_wide_DOM01_zh_ch_tno_combined/vertical_profiles.nc + oem_hourofday_nc: /store/c2sm/amrs/kdnmez/UrbaNature/icon_art_run/input/grid_input/icon_Zurich_Basel_R19B9_wide_DOM01_zh_ch_tno_combined/hourofday.nc + oem_dayofweek_nc: /store/c2sm/amrs/kdnmez/UrbaNature/icon_art_run/input/grid_input/icon_Zurich_Basel_R19B9_wide_DOM01_zh_ch_tno_combined/dayofweek.nc + oem_monthofyear_nc: /store/c2sm/amrs/kdnmez/UrbaNature/icon_art_run/input/grid_input/icon_Zurich_Basel_R19B9_wide_DOM01_zh_ch_tno_combined/monthofyear.nc + extpar_filename: /store/c2sm/amrs/kdnmez/extpar-run/UrbaNature/icon_zürich_basel_CLCplus/extpar_final_output_CLCplus_UrbaNature.nc + + + + +icon: + binary_file: /store/c2sm/amrs/kdnmez/icon-nwp-new/cpu/bin/icon + runjob_filename: icon_runjob.cfg + compute_queue: normal + walltime: '01:30:00' + np_tot: 1 + np_io: 1 + np_restart: 0 + np_prefetch: 1 \ No newline at end of file diff --git a/cases/icon-art-terraurb-test/copy_icbc.cfg b/cases/icon-art-terraurb-test/copy_icbc.cfg new file mode 100644 index 00000000..97a96925 --- /dev/null +++ b/cases/icon-art-terraurb-test/copy_icbc.cfg @@ -0,0 +1,2 @@ +cp -rf {cfg.latbc_filename} {cfg.icon_input_icbc} +cp -rf {cfg.inicond_filename} {cfg.icon_input_icbc} diff --git a/cases/icon-art-terraurb-test/icon_runjob.cfg b/cases/icon-art-terraurb-test/icon_runjob.cfg new file mode 100644 index 00000000..4d663a9c --- /dev/null +++ b/cases/icon-art-terraurb-test/icon_runjob.cfg @@ -0,0 +1,448 @@ +#!/usr/bin/env bash +#SBATCH --job-name=icon +#SBATCH --account={cfg.compute_account} +#SBATCH --time={cfg.walltime_icon} +#SBATCH --nodes={cfg.icon_np_tot} +#SBATCH --ntasks-per-node={cfg.ntasks_per_node} +#SBATCH --partition={cfg.compute_queue} +#SBATCH --constraint={cfg.constraint} +#SBATCH --output={cfg.logfile} +#SBATCH --open-mode=append +#SBATCH --chdir={cfg.icon_work} + +# OpenMP environment variables +# ---------------------------- +export OMP_NUM_THREADS=1 +export ICON_THREADS=1 +export OMP_SCHEDULE=static,12 +export OMP_DYNAMIC="false" +export OMP_STACKSIZE=200M + +set -e -x + +# -- ECCODES path +export ECCODES_DEFINITION_PATH={cfg.eccodes_dir}/definitions.edzw-2.12.5-2:{cfg.eccodes_dir}/definitions + +# ---------------------------------------------------------------------------- +# Link radiation input files +# ---------------------------------------------------------------------------- +ln -sf {cfg.art_input_folder}/runctrl_examples/photo_ctrl/* . +ln -sf {cfg.art_input_folder}/runctrl_examples/init_ctrl/* . + +# ---------------------------------------------------------------------------- +# create ICON master namelist +# ---------------------------------------------------------------------------- + +cat > icon_master.namelist << EOF +! master_nml: ---------------------------------------------------------------- +&master_nml + lrestart = {cfg.lrestart} ! .TRUE.=current experiment is resumed +/ + +! master_time_control_nml: --------------------------------------------------- +&master_time_control_nml + calendar = 'proleptic gregorian' + experimentStartDate = '{cfg.ini_datetime_string}' + experimentStopDate = '{cfg.end_datetime_string}' +/ + +! master_model_nml: repeated for each model ---------------------------------- +&master_model_nml + model_type = 1 ! identifies which component to run (atmosphere,ocean,...) + model_name = "ATMO" ! character string for naming this component. + model_namelist_filename = "NAMELIST_{cfg.casename}" ! file name containing the model namelists + model_min_rank = 1 ! start MPI rank for this model + model_max_rank = 65536 ! end MPI rank for this model + model_inc_rank = 1 ! stride of MPI ranks +/ +EOF + +# ---------------------------------------------------------------------- +# Create model namelists +# ---------------------------------------------------------------------- + +cat > NAMELIST_NWP << EOF +! parallel_nml: MPI parallelization ------------------------------------------- +¶llel_nml + nproma = 128 ! loop chunk length + p_test_run = .FALSE. ! .TRUE. means verification run for MPI parallelization + num_io_procs = {cfg.icon_np_io} ! number of I/O processors + num_restart_procs = {cfg.icon_np_restart} ! number of restart processors + num_prefetch_proc = {cfg.icon_np_prefetch} ! number of processors for LBC prefetching + iorder_sendrecv = 1 ! sequence of MPI send/receive calls +/ + +! run_nml: general switches --------------------------------------------------- +&run_nml + ltestcase = .FALSE. ! real case run + num_lev = 60 ! number of full levels (atm.) for each domain + lvert_nest = .FALSE. ! no vertical nesting + dtime = 5. ! timestep in seconds + ldynamics = .TRUE. ! compute adiabatic dynamic tendencies + ltransport = .TRUE. ! compute large-scale tracer transport + ntracer = 0 ! number of advected tracers + iforcing = 3 ! forcing of dynamics and transport by parameterized processes + ! ldass_lhn = .FALSE. ! TRUE: latent heat nudging + msg_level = 10 ! detailed report during integration + ltimer = .TRUE. ! timer for monitoring the runtime of specific routines + timers_level = 10 ! performance timer granularity + check_uuid_gracefully = .TRUE. ! TRUE: give only warnings for non-matching uuids + output = "nml" ! main switch for enabling/disabling components of the model output + lart = .TRUE. ! main switch for ART +/ + +! art_nml: Aerosols and Reactive Trace gases extension------------------------------------------------- +&art_nml + lart_chem = .TRUE. ! enables chemistry + lart_pntSrc = .FALSE. ! enables point sources + lart_aerosol = .FALSE. ! main switch for the treatment of atmospheric aerosol + lart_chemtracer = .TRUE. ! main switch for the treatment of chemical tracer + lart_diag_out = .TRUE. ! If this switch is set to .TRUE., diagnostic + ! ... output elds are available. Set it to + ! ... .FALSE. when facing memory problems. + iart_init_gas = 5 ! means start from a file instead of a cold start which is 0 from https://www.icon-art.kit.edu/userguide/index.php?title=Input#Namelist_Inputs + cart_cheminit_file = '{cfg.icon_input_icbc}/{cfg.dwdfg_filename}' + ! cart_cheminit_type = 'EMAC' + ! cart_cheminit_coord = "{inidata_filename}" + iart_seasalt = 0 ! enable seasalt + cart_chemtracer_xml = '{cfg.input_files_scratch_chemtracer_xml_filename}' ! path to xml file for passive tracers + ! cart_pntSrc_xml = '/users/nponomar/Emissions/pntSrcs.xml' ! ask to Nikolai, Nikolai says you dont need it + cart_input_folder = '{cfg.art_input_folder}' ! absolute Path to ART source code, Absolute Path to ART Input Files +/ + +! oem_nml: online emission module --------------------------------------------- +&oemctrl_nml + gridded_emissions_nc = '{cfg.input_files_scratch_oem_gridded_emissions_nc}' + vertical_profile_nc = '{cfg.input_files_scratch_oem_vertical_profiles_nc}' + hour_of_day_nc = '{cfg.input_files_scratch_oem_hourofday_nc}' + day_of_week_nc = '{cfg.input_files_scratch_oem_dayofweek_nc}' + month_of_year_nc = '{cfg.input_files_scratch_oem_monthofyear_nc}' + !hour_of_year_nc = '' + !ens_reg_nc = '/scratch/snx3000/kdnmez/UrbaNature/icon_art_run/input/vprm/regions_synth.nc' + !ens_lambda_nc = '/scratch/snx3000/kdnmez/UrbaNature/icon_art_run/input/vprm/lambdas_synth.nc' + !vegetation_indices_nc = '/scratch/snx3000/kdnmez/UrbaNature/icon_art_run/input/vprm/VPRM_indices_ICON_example.nc' + !lcut_area = .FALSE. + !lon_cut_start = 5.0 + !lon_cut_end = 15.0 + !lat_cut_start = 45.0 + !lat_cut_end = 55.0 +/ + +! diffusion_nml: horizontal (numerical) diffusion ---------------------------- +&diffusion_nml + lhdiff_vn = .TRUE. ! diffusion on the horizontal wind field + lhdiff_temp = .TRUE. ! diffusion on the temperature field + lhdiff_w = .TRUE. ! diffusion on the vertical wind field + hdiff_order = 5 ! order of nabla operator for diffusion + itype_vn_diffu = 1 ! reconstruction method used for Smagorinsky diffusion + itype_t_diffu = 2 ! discretization of temperature diffusion + hdiff_efdt_ratio = 24.0 ! ratio of e-folding time to time step + hdiff_smag_fac = 0.025 ! scaling factor for Smagorinsky diffusion +/ + +! dynamics_nml: dynamical core ----------------------------------------------- +&dynamics_nml + iequations = 3 ! type of equations and prognostic variables + !idiv_method = 1 ! method for divergence computation + divavg_cntrwgt = 0.50 ! weight of central cell for divergence averaging + lcoriolis = .TRUE. ! Coriolis force +/ + +! extpar_nml: external data -------------------------------------------------- +&extpar_nml + itopo = 1 ! topography (0:analytical) + extpar_filename = '{cfg.input_files_scratch_extpar_filename}' + n_iter_smooth_topo = 5 ! iterations of topography smoother + heightdiff_threshold = 900. ! height difference between neighb. grid points + hgtdiff_max_smooth_topo = 500. ! see Namelist doc + heightdiff_threshold = 2250. +/ + +! initicon_nml: specify read-in of initial state ------------------------------ +&initicon_nml + init_mode = 7 ! 7: start from DWD fg with subsequent vertical remapping + lread_ana = .FALSE. ! no analysis data will be read + dwdfg_filename = '{cfg.icon_input_icbc}/{cfg.dwdfg_filename}' ! initial data filename + ana_varnames_map_file = "{cfg.input_files_scratch_map_file_ana}" ! dictionary mapping internal names onto GRIB2 shortNames + ltile_coldstart = .TRUE. ! coldstart for surface tiles + ltile_init = .FALSE. ! set it to .TRUE. if FG data originate from run without tiles + +/ + +! grid_nml: horizontal grid -------------------------------------------------- +&grid_nml + dynamics_grid_filename = "{cfg.input_files_scratch_dynamics_grid_filename}" ! array of the grid filenames for the dycore + radiation_grid_filename = "{cfg.input_files_scratch_radiation_grid_filename}" ! array of the grid filenames for the radiation model + dynamics_parent_grid_id = 0 ! array of the indexes of the parent grid filenames + lredgrid_phys = .TRUE. ! .true.=radiation is calculated on a reduced grid + lfeedback = .TRUE. ! specifies if feedback to parent grid is performed + l_limited_area = .TRUE. ! .TRUE. performs limited area run + ifeedback_type = 2 ! feedback type (incremental/relaxation-based) + start_time = 0. ! Time when a nested domain starts to be active [s] +/ + +! gridref_nml: grid refinement settings -------------------------------------- +&gridref_nml + denom_diffu_v = 150. ! denominator for lateral boundary diffusion of velocity +/ + +! interpol_nml: settings for internal interpolation methods ------------------ +&interpol_nml + nudge_zone_width = 10 ! width of lateral boundary nudging zone + nudge_max_coeff = 0.069 ! maximum relaxation coefficient for lateral boundary nudging + support_baryctr_intp = .FALSE. ! barycentric interpolation support for output + nudge_efold_width = 2.0 +/ + +! io_nml: general switches for model I/O ------------------------------------- +&io_nml + itype_pres_msl = 5 ! method for computation of mean sea level pressure + itype_rh = 1 ! method for computation of relative humidity + lmask_boundary = .TRUE. ! mask out interpolation zone in output +/ + +! limarea_nml: settings for limited area mode --------------------------------- +&limarea_nml + itype_latbc = 1 ! 1: time-dependent lateral boundary conditions + dtime_latbc = 3600 ! time difference between 2 consecutive boundary data + nlev_latbc = 60 ! Number of vertical levels in boundary data + latbc_boundary_grid = "{cfg.input_files_scratch_lateral_boundary_grid}" ! Grid file defining the lateral boundary + latbc_path = "{cfg.icon_input_icbc}" ! Absolute path to boundary data + latbc_varnames_map_file = "{cfg.input_files_scratch_map_file_latbc}" + latbc_filename = "{cfg.latbc_filename}" ! boundary data input filename + init_latbc_from_fg = .FALSE. ! .TRUE.: take lbc for initial time from first guess +/ + +! lnd_nml: land scheme switches ----------------------------------------------- +&lnd_nml + ntiles = 3 ! number of tiles + nlev_snow = 3 ! number of snow layers + lmulti_snow = .FALSE. ! .TRUE. for use of multi-layer snow model + idiag_snowfrac = 20 ! type of snow-fraction diagnosis + lsnowtile = .TRUE. ! .TRUE.=consider snow-covered and snow-free separately + itype_root = 2 ! root density distribution + itype_heatcond = 3 ! type of soil heat conductivity + itype_lndtbl = 4 ! table for associating surface parameters + itype_evsl = 4 ! type of bare soil evaporation + itype_root = 2 ! root density distribution + cwimax_ml = 5.e-4 ! scaling parameter for max. interception storage + c_soil = 1.25 ! surface area density of the evaporative soil surface + c_soil_urb = 0.5 ! same for urban areas + lseaice = .FALSE. ! .TRUE. for use of sea-ice model + llake = .TRUE. ! .TRUE. for use of lake model + itype_canopy = 2 ! Jan Peter scheme gdm orig. default 1 + itype_snowevap = 3 ! gdm: orig.: 2 Snow evap. in vegetated areas with add. variables for snow age and max. snow height + itype_trvg = 3 ! BATS scheme with add. prog. var. for integrated plant transpiration since sunrise + sstice_mode = 2 ! 2: SST is updated on a daily basis by climatological increments + lterra_urb = {cfg.lterra_urb} + lurbalb = .TRUE. + lurbahf = .TRUE. +/ + +! nonhydrostatic_nml: nonhydrostatic model ----------------------------------- +&nonhydrostatic_nml + iadv_rhotheta = 2 ! advection method for rho and rhotheta + ivctype = 2 ! type of vertical coordinate + itime_scheme = 4 ! time integration scheme + ndyn_substeps = 5 ! number of dynamics steps per fast-physics step + exner_expol = 0.333 ! temporal extrapolation of Exner function + vwind_offctr = 0.2 ! off-centering in vertical wind solver + damp_height = 10000.0 ! height at which Rayleigh damping of vertical wind starts + rayleigh_coeff = 5.0 ! Rayleigh damping coefficient + divdamp_order = 24 ! order of divergence damping + divdamp_type = 32 ! type of divergence damping + divdamp_fac = 0.004 ! scaling factor for divergence damping + !l_open_ubc = .FALSE. ! .TRUE.=use open upper boundary condition + igradp_method = 3 ! discretization of horizontal pressure gradient + l_zdiffu_t = .TRUE. ! specifies computation of Smagorinsky temperature diffusion + thslp_zdiffu = 0.02 ! slope threshold (temperature diffusion) + thhgtd_zdiffu = 125.0 ! threshold of height difference (temperature diffusion) + htop_moist_proc = 22500.0 ! max. height for moist physics + hbot_qvsubstep = 22500.0 ! height above which QV is advected with substepping scheme +/ + +! nwp_phy_nml: switches for the physics schemes ------------------------------ +&nwp_phy_nml + inwp_gscp = 2 ! cloud microphysics and precipitation + inwp_convection = 1 ! convection + lshallowconv_only = .FALSE. ! only shallow convection + inwp_radiation = 1 ! radiation + inwp_cldcover = 1 ! cloud cover scheme for radiation + inwp_turb = 1 ! vertical diffusion and transfer + inwp_satad = 1 ! saturation adjustment + inwp_sso = 1 ! subgrid scale orographic drag + inwp_gwd = 0 ! non-orographic gravity wave drag + inwp_surface = 1 ! surface scheme + latm_above_top = .TRUE. ! take into account atmosphere above model top for radiation computation + ldetrain_conv_prec = .TRUE. + efdt_min_raylfric = 7200. ! minimum e-folding time of Rayleigh friction + itype_z0 = 2 ! type of roughness length data + icapdcycl = 3 ! apply CAPE modification to improve diurnalcycle over tropical land + icpl_aero_conv = 1 ! coupling between autoconversion and Tegen aerosol climatology + icpl_aero_gscp = 0 ! coupling between autoconversion and Tegen aerosol climatology + lrtm_filename = '{cfg.input_files_scratch_lrtm_filename}' ! longwave absorption coefficients for RRTM_LW +! cldopt_filename = '' ! RRTM cloud optical properties + mu_rain = 0.5 ! shap parameter in gamma distribution for rain + rain_n0_factor = 0.1 ! tuning factor for intercept parameter of raindrop size distr. + dt_rad = 600. ! time step for radiation in s + dt_conv = 90. ! time step for convection in s (domain specific) + dt_sso = 360. ! time step for SSO parameterization + dt_gwd = 120. ! time step for gravity wave drag parameterization +/ + +! nwp_tuning_nml: additional tuning parameters ---------------------------------- +&nwp_tuning_nml + itune_albedo = 1 ! reduced albedo (w.r.t. MODIS data) over Sahara + tune_gkwake = 0.25 + tune_gkdrag = 0.0 + tune_minsnowfrac = 0.3 + tune_box_liq = 0.04 + tune_box_liq_asy = 4 + tune_gust_factor = 7.0 + tune_zvz0i = 1.25 ! new tuning since June 2018 ! gdm non in guenther + tune_sgsclifac = 1.0 ! new tuning becoming operational in July 2019 ! gdm non in guenther + icpl_turb_clc = 2 + max_calibfac_clcl = 2.0 + tune_v0snow = 25 + tune_rcucov = 0.075 + tune_rhebc_land = 0.825 +/ + +! output_nml: specifies an output stream -------------------------------------- +&output_nml + filetype = 4 ! output format: 2=GRIB2, 4=NETCDFv2 + dom = 1 ! write domain 1 only + output_bounds = 0., 100000000000000., 3600. ! start, end, increment + steps_per_file = 1 ! number of steps per file + mode = 1 ! 1: forecast mode (relative t-axis), 2: climate mode (absolute t-axis) + include_last = .TRUE. + output_filename = 'ICON-NWP-URBANATURE-UNSTRUCTURED' + filename_format = '{cfg.icon_output}/_DOM_' ! file name base + steps_per_file_inclfirst = .FALSE. + output_grid = .TRUE. + remap = 0 ! 1: remap to lat-lon grid + !north_pole = -170.,40. ! definition of north_pole for rotated lat-lon grid + !reg_lon_def = 7.00,0.005,10.00 ! + !reg_lat_def = 45.00,0.005,50.00 ! + ml_varlist = 'group:PBL_VARS', + 'group:ATMO_ML_VARS', + 'group:precip_vars', + 'group:land_vars', + 'group:nh_prog_vars', + 'group:ART_CHEMISTRY', + 'z_mc', 'z_ifc', 'sp_10m', + 'geopot', 'fis', + 'topography_c', + 't_2m', 'smi', + 'tot_prec_rate', 'shfl_s', + 'lhfl_s', 'tot_prec_d', + 'lwflxall', 'lwflx_up', + 'group:RAD_VARS', + 'group:ART_PASSIVE', + 'group:ART_AEROSOL' +/ + +! output_nml: specifies an output stream -------------------------------------- +&output_nml + filetype = 4 ! output format: 2=GRIB2, 4=NETCDFv2 + dom = 1 ! write domain 1 only + output_bounds = 0., 100000000000000., 3600. ! start, end, increment + steps_per_file = 1 ! number of steps per file + mode = 1 ! 1: forecast mode (relative t-axis), 2: climate mode (absolute t-axis) + include_last = .TRUE. + output_filename = 'ICON-NWP-URBANATURE-STRUCTURED' + filename_format = '{cfg.icon_output}/_DOM_' ! file name base + steps_per_file_inclfirst = .FALSE. + output_grid = .TRUE. + remap = 1 ! 1: remap to lat-lon grid + !north_pole = -170.,40. ! definition of north_pole for rotated lat-lon grid + reg_lon_def = 7.00,0.005,10.00 ! + reg_lat_def = 45.00,0.005,50.00 ! + ml_varlist = 'group:PBL_VARS', + 'group:ATMO_ML_VARS', + 'group:precip_vars', + 'group:land_vars', + 'group:nh_prog_vars', + 'group:ART_CHEMISTRY', + 'z_mc', 'z_ifc', 'sp_10m', + 'geopot', 'fis', + 'topography_c', + 't_2m', 'smi', + 'tot_prec_rate', 'shfl_s', + 'lhfl_s', 'tot_prec_d', + 'lwflxall', 'lwflx_up', + 'group:RAD_VARS', + 'group:ART_PASSIVE', + +/ + +! radiation_nml: radiation scheme --------------------------------------------- +&radiation_nml + irad_o3 = 79 ! ozone climatology + irad_aero = 6 ! aerosols + albedo_type = 2 ! type of surface albedo + vmr_co2 = 390.e-06 + vmr_ch4 = 1800.e-09 + vmr_n2o = 322.0e-09 + vmr_o2 = 0.20946 + vmr_cfc11 = 240.e-12 + vmr_cfc12 = 532.e-12 + direct_albedo_water = 3 + albedo_whitecap = 1 + !ecrad_data_path = '/scratch/snx3000/nponomar/icon-vprm/externals/ecrad/data' +/ + +! sleve_nml: vertical level specification ------------------------------------- +&sleve_nml + min_lay_thckn = 20.0 ! layer thickness of lowermost layer + top_height = 23000.0 ! height of model top + stretch_fac = 0.65 ! stretching factor to vary distribution of model levels + decay_scale_1 = 4000.0 ! decay scale of large-scale topography component + decay_scale_2 = 2500.0 ! decay scale of small-scale topography component + decay_exp = 1.2 ! exponent of decay function + flat_height = 16000.0 ! height above which the coordinate surfaces are flat +/ + +! transport_nml: tracer transport --------------------------------------------- +&transport_nml + ivadv_tracer = 3, 3, 3, 3, 3, 3 ! tracer specific method to compute vertical advection + itype_hlimit = 3, 4, 4, 4, 4, 4 ! type of limiter for horizontal transport + ihadv_tracer = 52, 2, 2, 2, 2, 2 ! tracer specific method to compute horizontal advection + llsq_svd = .TRUE. ! use SV decomposition for least squares design matrix +/ + +! turbdiff_nml: turbulent diffusion ------------------------------------------- +&turbdiff_nml + tkhmin = 0.5 ! scaling factor for minimum vertical diffusion coefficient + tkmmin = 0.75 ! scaling factor for minimum vertical diffusion coefficient + pat_len = 750.0 ! effective length scale of thermal surface patterns + tur_len = 300.0 ! asymptotic maximal turbulent distance + ! c_diff = 0.2 ! length scale factor for vertical diffusion of TKE + rat_sea = 0.8 ! controls laminar resistance for sea surface + ltkesso = .TRUE. ! consider TKE-production by sub-grid SSO wakes + 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 = 2 ! type of shear forcing used in turbulence + ltkeshs = .TRUE. ! include correction term for coarse grids in hor. shear production term + a_hshr = 2.0 ! length scale factor for separated horizontal shear mode + icldm_turb = 2 ! mode of cloud water representation in turbulence + ldiff_qi = .TRUE. + q_crit = 2.0 ! critical value for normalized supersaturation + imode_tkesso = 2 ! mode of calculating th SSO source term for TKE production + rlam_heat = 10.0 ! gdm default seems to be 10 in code but 1 in Namelist_overview.pdf + alpha1 = 0.125 +/ +EOF + +# ---------------------------------------------------------------------- +# run the model! +# ---------------------------------------------------------------------- +handle_error(){{ + # Check for invalid pointer error at the end of icon-art + if grep -q "free(): invalid pointer" {cfg.logfile} && grep -q "clean-up finished" {cfg.logfile}; then + exit 0 + else + exit 1 + fi +}} +srun ./{cfg.icon_execname} || handle_error \ No newline at end of file diff --git a/jobs/prepare_icon.py b/jobs/prepare_icon.py index 9c0ae7ec..3f095aa7 100644 --- a/jobs/prepare_icon.py +++ b/jobs/prepare_icon.py @@ -4,6 +4,7 @@ from pathlib import Path import logging from . import tools +import os BASIC_PYTHON_JOB = True @@ -78,27 +79,15 @@ def main(cfg): logging.info('Copy ICON input data (IC/BC) to working directory') # Copy input files to scratch - if cfg.machine == 'daint': - script_lines = [ - '#!/usr/bin/env bash', - f'#SBATCH --job-name="copy_input_{cfg.casename}_{cfg.startdate_sim_yyyymmddhh}_{cfg.enddate_sim_yyyymmddhh}"', - f'#SBATCH --account={cfg.compute_account}', - '#SBATCH --time=00:10:00', - f'#SBATCH --partition={cfg.compute_queue}', - f'#SBATCH --constraint={cfg.constraint}', '#SBATCH --nodes=1', - f'#SBATCH --output={cfg.logfile}', '#SBATCH --open-mode=append', - f'#SBATCH --chdir={cfg.icon_work}', '' - ] - elif cfg.machine == 'euler': - script_lines = [ - '#!/usr/bin/env bash', - f'#SBATCH --job-name="copy_input_{cfg.casename}_{cfg.startdate_sim_yyyymmddhh}_{cfg.enddate_sim_yyyymmddhh}"', - '#SBATCH --time=00:10:00', - f'#SBATCH --partition={cfg.compute_queue}', - f'#SBATCH --constraint={cfg.constraint}', '#SBATCH --ntasks=1', - f'#SBATCH --output={cfg.logfile}', '#SBATCH --open-mode=append', - f'#SBATCH --chdir={cfg.icon_work}', '' - ] + script_lines = [ + '#!/usr/bin/env bash', + f'#SBATCH --job-name="copy_input_{cfg.casename}_{cfg.startdate_sim_yyyymmddhh}_{cfg.enddate_sim_yyyymmddhh}"', + f'#SBATCH --account={cfg.compute_account}', '#SBATCH --time=00:10:00', + f'#SBATCH --partition={cfg.compute_queue}', + f'#SBATCH --constraint={cfg.constraint}', '#SBATCH --nodes=1', + f'#SBATCH --output={cfg.logfile}', '#SBATCH --open-mode=append', + f'#SBATCH --chdir={cfg.icon_work}', '' + ] for target, destination in zip(cfg.input_files.values(), cfg.input_files_scratch.values()): script_lines.append(f'rsync -av {target} {destination}') @@ -106,5 +95,9 @@ def main(cfg): with (script := cfg.icon_work / 'copy_input.job').open('w') as f: f.write('\n'.join(script_lines)) + # extras for kuta's version + os.system(fr"cp -rf {cfg.latbc_copy_path} {cfg.icon_input_icbc}") + os.system(fr"cp -rf {cfg.inicond_filename} {cfg.icon_input_icbc}") + cfg.submit('prepare_icon', script) logging.info("OK") diff --git a/workflows.yaml b/workflows.yaml index f87c22b5..a9032acd 100644 --- a/workflows.yaml +++ b/workflows.yaml @@ -213,9 +213,7 @@ icon-art-oem: - restart jobs: - prepare_icon - - icontools - - prepare_art - - prepare_art_oem + - oem - icon dependencies: icontools: @@ -230,8 +228,20 @@ icon-art-oem: icon: current: - prepare_icon - - icontools - - prepare_art - - prepare_art_oem + - oem + previous: + - icon + +icon-art-terraurb-test: + features: + - restart + jobs: + - prepare_icon + - icon + dependencies: + icon: + current: + - prepare_icon + - copy_icbc previous: - icon