#! /bin/ksh #============================================================================= # mistral cpu batch job parameters # -------------------------------- #SBATCH --account=mh0727 #SBATCH --job-name=exp.ler0613.run #SBATCH --partition=compute2,compute #SBATCH --chdir=/work/mh0727/m300732/icon-oes-switch2/run #SBATCH --nodes=16 #SBATCH --threads-per-core=2 # the following is needed to work around a bug that otherwise leads to # a too low number of ranks when using compute,compute2 as queue #SBATCH --mem=0 #SBATCH --output=/work/mh0727/m300732/icon-oes-switch2/run/LOG.exp.ler0613.run.%j.o #SBATCH --error=/work/mh0727/m300732/icon-oes-switch2/run/LOG.exp.ler0613.run.%j.o #SBATCH --exclusive #SBATCH --time=02:00:00 #============================================================================= set -x ulimit -s unlimited #============================================================================= # # ICON run script: # !ATTENTION! Do not change the format of the following lines. # They are evaluated by checksuite scripts. # created by ./run/make_target_runscript # target machine is bullx_cpu # target use_compiler is intel # with_mpi=yes # with_openmp=no # memory_model=large # submit with sbatch # #============================================================================= # # OpenMP environment variables # ---------------------------- export OMP_NUM_THREADS=1 export ICON_THREADS=1 export OMP_SCHEDULE=dynamic,1 export OMP_DYNAMIC="false" export OMP_STACKSIZE=200M # # MPI variables # ------------- no_of_nodes=${SLURM_JOB_NUM_NODES:=1} mpi_procs_pernode=$((${SLURM_JOB_CPUS_PER_NODE%%\(*} / 2)) ((mpi_total_procs=no_of_nodes * mpi_procs_pernode)) # # blocking length # --------------- nproma=16 # #============================================================================= # load local setting, if existing # ------------------------------- if [ -a ../setting ] then echo "Load Setting" . ../setting fi # environment variables for the experiment and the target system # -------------------------------------------------------------- export EXPNAME="ler0613" export KMP_AFFINITY="verbose,granularity=core,compact,1,1" export KMP_LIBRARY="turnaround" export KMP_KMP_SETTINGS="1" export OMP_WAIT_POLICY="active" export OMPI_MCA_pml="cm" export OMPI_MCA_mtl="mxm" export OMPI_MCA_coll="^fca" export MXM_RDMA_PORTS="mlx5_0:1" export HCOLL_MAIN_IB="mlx5_0:1" export HCOLL_ML_DISABLE_BARRIER="1" export HCOLL_ML_DISABLE_IBARRIER="1" export HCOLL_ML_DISABLE_BCAST="1" export HCOLL_ENABLE_MCAST_ALL="1" export HCOLL_ENABLE_MCAST="1" export OMPI_MCA_coll_sync_barrier_after_alltoallv="1" export OMPI_MCA_coll_sync_barrier_after_alltoallw="1" export MXM_HANDLE_ERRORS="bt" export UCX_HANDLE_ERRORS="bt" export MALLOC_TRIM_THRESHOLD_="-1" export KMP_AFFINITY="verbose,granularity=core,compact,1,1" export KMP_LIBRARY="turnaround" export KMP_KMP_SETTINGS="1" export OMP_WAIT_POLICY="active" export OMPI_MCA_pml="cm" export OMPI_MCA_mtl="mxm" export OMPI_MCA_coll="^fca" export MXM_RDMA_PORTS="mlx5_0:1" export HCOLL_MAIN_IB="mlx5_0:1" export HCOLL_ML_DISABLE_BARRIER="1" export HCOLL_ML_DISABLE_IBARRIER="1" export HCOLL_ML_DISABLE_BCAST="0" export HCOLL_ENABLE_MCAST_ALL="1" export HCOLL_ENABLE_MCAST="1" export OMPI_MCA_coll_sync_barrier_after_alltoallv="1" export OMPI_MCA_coll_sync_barrier_after_alltoallw="1" export MXM_HANDLE_ERRORS="bt" export UCX_HANDLE_ERRORS="bt" # load profile # ------------ if [[ -a /etc/profile ]] then . /etc/profile fi #============================================================================= # directories with absolute paths # ------------------------------- thisdir=$(pwd) basedir=${thisdir%/*} export basedir icon_data_rootFolder="/pool/data/ICON" # how to start the icon model # --------------------------- export START="srun --cpu-freq=HighM1 --kill-on-bad-exit=1 --nodes=${SLURM_JOB_NUM_NODES:-1} --cpu_bind=verbose,cores --distribution=block:block --ntasks=$((no_of_nodes * mpi_procs_pernode)) --ntasks-per-node=${mpi_procs_pernode} --cpus-per-task=$((2 * OMP_NUM_THREADS)) --propagate=STACK,CORE" export MODEL="${basedir}/bin/icon" # how to submit the next job # -------------------------- submit="sbatch" job_name="exp.ler0613.run" # cdo for post-processing # ----------------------- cdo="cdo" cdo_diff="cdo diffn" # constants for time calculations # ------------------------------- second=1 # [s] 1 second minute=60 # [s] 1 minute hour=3600 # [s] 1 hour day=86400 # [s] 1 day month=2592000 # [s] 30 days year360=31104000 # [s] 360 days year=31556900 # [s] 1 earth year # define script functions used in the experiment run script # --------------------------------------------------------- . ./add_run_routines #============================================================================= ulimit -s 2097152 ulimit -c 0 #-------------------------------------------------------------------------------------------------- # # ICON-ESM R2B3 atmosphere coupled to R2B4 ocean # author_list="Monika Esch, Rene Redler, Stephan Lorenz, Lennart Ramme" # #-------------------------------------------------------------------------------------------------- # # This file describes a coupled experiment test setup on a R2B3 grid based on # the non-hydrostatic atmosphere with ECHAM physics and the hydrostatic ocean # running on an R2B4 grid. The atmosphere is initialized from analysis files and # using constant pre-industrial (PI-control) boundary conditions for the year # 1850: # - spectral solar irradiation # - well mixed greenhouse gases CO2, CH4, N2O, no CFCs # - O3 concentration # - SST and sea ice are transferred via YAC from the ocean. # - and no (!) aerosols # # A test version for HD is included. Model is water mass conserving now. # Hamocc can be turned on, but is deactivated by default # # Here, the ocean is already spun up from Levitus climatology for 250 years. # initializing the Ocean from long tuning run (3600y) and hamocc variables from cmip6 restart is # is possible (initialiseOcean="fromRestartwithHamocc") # initialiseOcean="fromClimatology" is possible, see below. # # The coupling: # # atmosphere -> ocean: # . surface_downward_eastward_stress # . surface_downward_northward_stress # . surface_fresh_water_flux # . total_heat_flux # . atmosphere_sea_ice_bundle # . river_runoff # # ocean -> atmosphere: # . sea_surface_temperature # . eastward_sea_water_velocity # . northward_sea_water_velocity # . ocean_sea_ice_bundle # . 10m_wind_speed # # currently not activated for coupling: # . co2_mixing_ratio # . co2_flux # #-------------------------------------------------------------------------------------------------- # (0) Basic model configuration # ----------------------------- atmos_gridID="0030" atmos_refinement="R02B03" ocean_gridID="0036" ocean_refinement="R02B04" nproma_atm=24 nproma_oce=48 # use alternatively: full restart, init from (ocean) restart, init from climatology or false # - set to false if ocean was already initialised # initialiseOcean="fromRestart" # initialiseOcean="fromRestartwithHamocc" initialiseOcean="fromClimatology" # initialiseOcean="FALSE" read_restart_namelists=".false." # restart=.true. # deactivate semaphore mechanism # # 1 ocean node is sufficient for low resolution, 9 nodes for coupled is suitable. # faster: 2 nodes for ocean, 16 nodes in total # running with Hamocc: 8 nodes for ocean, 22 in total for similar performance mpi_oce_nodes=2 #mpi_oce_nodes=${mpi_oce_nodes:=((no_of_nodes/2))} # default: half of requested nodes ((mpi_oce_procs=mpi_oce_nodes * mpi_procs_pernode)) # #-------------------------------------------------------------------------------------------------- # # (1) Define the model time stepping # ---------------------------------- # standard atmosphere timestep: 15 min, 8 substeps (r2b4 values) # atmospheric timesteps > 15 min are possible with a higher value in hdiff_smag_fac, see diffusion nml # tested: atmTimeStep="PT20M" / atm_substeps=15 with hdiff_smag_fac=0.15 radTimeStep="PT2H" # radiation time step: 12 time steps per day atmTimeStep="PT15M" # atmosphere time step: 72 time steps per day atm_substeps=8 # atmosphere dynamics substeps, ca. 2 min for atm-dyn-stepping oceTimeStep="PT60M" # ocean time step: 24 time steps per day couplingTimeStep="PT60M" # coupling time step: 2 time steps per radTimeStep #-------------------------------------------------------------------------------------------------- # (2) unset some setting of create_target_header for mistral unset OMPI_MCA_coll_fca_enable unset OMPI_MCA_coll_fca_priority #-------------------------------------------------------------------------------------------------- # (3) icon_data_poolFolder # Variables provided by the scripting mechanism # EXPNAME = name of exp. in 'exp.' # basedir = base directory, where src/, run/ etc exist # icon_data_poolFolder = base directory, where grids/, input/ and setup/ exist # nproma = blocking length for array dimensioning and inner loop lengths # -> deprecated. nproma_atm and nproma_ocn are used here. # overwrite the default setting with the new path and handle daint (CSCS) if [ -d /users/icontest ] then poolFolder_prefix=/users/icontest else poolFolder_prefix= fi #icon_data_poolFolder="$poolFolder_prefix/work/mh0287/users/rene/public/mpim" icon_data_poolFolder="$poolFolder_prefix/pool/data/ICON/grids/private/rene/mpim" # horizontal grid(s) # ------------------ atm_grid_name=icon_grid_${atmos_gridID}_${atmos_refinement}_G atmo_grid_folder=/pool/data/ICON/grids/private/rene/mpim/${atmos_gridID} # still some private path! atmo_data_InputFolder=${icon_data_poolFolder}/${atmos_gridID} atmo_land_data_InputFolder=${icon_data_poolFolder}/${atmos_gridID}-${ocean_gridID} atmo_dyn_grid=${atm_grid_name}.nc #-------------------------------------------------------------------------------------------------- # (4) Set variables to configure the experiment: # ---------------------------------------------- # start and end date+time of experiment # ------------------------------------- start_date=${start_date:="1000-01-01T00:00:00Z"} end_date=${end_date:="1500-01-01T00:00:00Z"} # restart/checkpoint/output intervals # ----------------- restart_interval="P10Y" checkpoint_interval="P10Y" # file interval is restart-interval atm_file_interval="P10Y" oce_file_interval="P10Y" lnd_file_interval="P10Y" hamocc_file_interval="P10Y" atm_output_interval="P1M" oce_output_interval="P1M" lnd_output_interval="P1M" hamocc_output_interval="P1Y" # asynchronous diagnostic output processes # ---------------------------------------- # Note that "mpi_atm_io_procs" must match the number of output files mpi_atm_io_procs=0 # >0 for atmosphere plus land (not working for monitoring) mpi_oce_io_procs=0 # >0 for ocean is not working yet # output file selection # --------------------- # # output_=yes : yes --> output files for , any other value --> no files for # monitoring output switches output_atm_mon=yes output_oce_mon=yes output_oce_moc=yes # calc_moc is called every timestep - switch off for high resolutions # 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 # choose between none/basic/medium/full for land output output_lnd=basic # 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_atm_cgrid=no # produces 1 atm file output_atm_3d=yes output_atm_2d=yes output_phy_3d=no # atmosphere physics, note: "yes" increases the output volume significantly! output_oce_def=yes # annual mean is sufficient # output interval for large atm/oce files, normally set to general atmos interval: atm_output_interval_3d="$atm_output_interval" atm_output_interval_2d="$atm_output_interval" oce_output_interval_def="P1Y" # annual mean output for deep ocean # output switches for HAMOCC files output_hamocc_mon=yes output_hamocc_base=yes # very large output_hamocc_EU=yes # large output_hamocc_sed=yes # large output_hamocc_2d=yes output_hamocc_3d=yes #-------------------------------------------------------------------------------------------------- # (5) Define the model configuration #----------------------------------- # JSBACH settings run_jsbach=yes jsbach_usecase=jsbach_pfts # jsbach_lite or jsbach_pfts jsbach_with_lakes=yes jsbach_with_carbon=no # yes needs jsbach_pfts usecase # Some further processing for land configuration # ---------------------------------------------- ljsbach=$([ "${run_jsbach:=no}" == yes ] && echo .TRUE. || echo .FALSE. ) llake=$([ "${jsbach_with_lakes:=yes}" == yes ] && echo .TRUE. || echo .FALSE. ) lcarbon=$([ "${jsbach_with_carbon:=yes}" == yes ] && echo .TRUE. || echo .FALSE. ) if [[ $jsbach_usecase == *pfts* ]] then pft_file_tag="11pfts_" else pft_file_tag="" fi # namelist files # -------------- atm_namelist=NAMELIST_${EXPNAME}_atm lnd_namelist=NAMELIST_${EXPNAME}_lnd oce_namelist=NAMELIST_${EXPNAME}_oce #-------------------------------------------------------------------------------------------------- # 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 # ---------------------------------------------------------------- oce_min_rank=`expr ${mpi_total_procs} - ${mpi_oce_procs}` oce_max_rank=`expr ${oce_min_rank} + ${mpi_oce_procs} - 1` oce_inc_rank=1 atm_min_rank=0 atm_max_rank=`expr ${oce_min_rank} - 1` atm_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.xml must (!) match with modelname_list[*] # cat > coupling_${EXPNAME}.xml << EOF ${modelname_list[0]} ICON atmosphere ${modelname_list[1]} ICON ocean name_list_io ICON IO +1800-01-01T00:00:00.000 +2100-01-01T00:00:00.000 proleptic-gregorian ISO_format ${atmTimeStep} ${oceTimeStep} ${couplingTimeStep} ${atm_lag} ${oce_lag} true false false ${atmTimeStep} ${oceTimeStep} ${couplingTimeStep} ${atm_lag} ${oce_lag} true false false ${atmTimeStep} ${oceTimeStep} ${couplingTimeStep} ${atm_lag} ${oce_lag} true false false ${atmTimeStep} ${oceTimeStep} ${couplingTimeStep} ${atm_lag} ${oce_lag} true false false ${atmTimeStep} ${oceTimeStep} ${couplingTimeStep} ${atm_lag} ${oce_lag} true false false ${oceTimeStep} ${atmTimeStep} ${couplingTimeStep} ${oce_lag} ${atm_lag} true false false ${oceTimeStep} ${atmTimeStep} ${couplingTimeStep} ${oce_lag} ${atm_lag} true false false ${oceTimeStep} ${atmTimeStep} ${couplingTimeStep} ${oce_lag} ${atm_lag} true false false ${oceTimeStep} ${atmTimeStep} ${couplingTimeStep} ${oce_lag} ${atm_lag} true false false ${atmTimeStep} ${oceTimeStep} ${couplingTimeStep} ${atm_lag} ${oce_lag} true false false ${atmTimeStep} ${oceTimeStep} ${couplingTimeStep} ${atm_lag} ${oce_lag} true false false EOF # # xsd and xml files for yac # ------------------------- # add_required_file ${basedir}/run/coupling_${EXPNAME}.xml ./coupling.xml add_required_file ${basedir}/externals/yac/input/coupling.xsd ./coupling.xsd #----------------------------------------------------------------------------- # II. ATMOSPHERE and LAND #----------------------------------------------------------------------------- # # atmosphere namelist # ------------------- cat > ${atm_namelist} << EOF ! &coupling_mode_nml coupled_mode = .TRUE. / ¶llel_nml nproma = ${nproma_atm} num_io_procs = ${mpi_atm_io_procs} num_prefetch_proc = 0 pio_type = 0 / &grid_nml dynamics_grid_filename = "${atmo_dyn_grid}" / &run_nml num_lev = 47 ! number of full levels modelTimeStep = "${atmTimeStep}" ltestcase = .FALSE. ! run testcase ldynamics = .TRUE. ! dynamics ltransport = .TRUE. ! transport iforcing = 2 ! 0: none, 1: HS, 2: ECHAM, 3: NWP output = 'nml' msg_level = 12 ! level of details report during integration restart_filename = "${EXPNAME}_restart_atm_.nc" activate_sync_timers = .TRUE. profiling_output = 1 ! aggregated: 1; detailed: 2; in files: 3 / &extpar_nml itopo = 1 ! 1: read topography from the grid file itype_lwemiss = 0 / &initicon_nml init_mode = 2 ! 2: initialize from IFS analysis ifs2icon_filename= "ifs2icon.nc" / &nonhydrostatic_nml ndyn_substeps = $atm_substeps ! dtime/dt_dyn damp_height = 50000. ! [m] rayleigh_coeff = 0.1000 ! set to 0.1001 for rerun with little change vwind_offctr = 0.2 divdamp_fac = 0.004 exner_expol = 0.6 / &interpol_nml rbf_scale_mode_ll = 1 / &sleve_nml min_lay_thckn = 40. ! [m] top_height = 83000. ! [m] stretch_fac = 0.9 decay_scale_1 = 4000. ! [m] decay_scale_2 = 2500. ! [m] decay_exp = 1.2 flat_height = 16000. ! [m] / &diffusion_nml hdiff_smag_fac = 0.015 ! default: 0.015 higher values will increase diffusion / &transport_nml tracer_names = 'hus','clw','cli' ivadv_tracer = 3 , 3 , 3 itype_hlimit = 4 , 4 , 4 itype_vlimit = 3 , 3 , 3 ihadv_tracer = 52 , 2 , 2 / &echam_phy_nml ! ! domain 1 ! -------- ! ! atmospheric phyiscs (""=never) echam_phy_config(1)%dt_rad = "${radTimeStep}" echam_phy_config(1)%dt_vdf = "${atmTimeStep}" echam_phy_config(1)%dt_cnv = "${atmTimeStep}" echam_phy_config(1)%dt_cld = "${atmTimeStep}" echam_phy_config(1)%dt_gwd = "${atmTimeStep}" echam_phy_config(1)%dt_sso = "${atmTimeStep}" ! ! atmospheric chemistry (""=never) echam_phy_config(1)%dt_mox = "${atmTimeStep}" echam_phy_config(1)%dt_car = "" echam_phy_config(1)%dt_art = "" ! ! surface (.TRUE. or .FALSE.) echam_phy_config(1)%ljsb = ${ljsbach} echam_phy_config(1)%lamip = .FALSE. echam_phy_config(1)%lice = .TRUE. echam_phy_config(1)%lmlo = .FALSE. echam_phy_config(1)%llake = ${llake} ! ! fix negative humidity echam_phy_config(1)%iqneg_d2p = 0 echam_phy_config(1)%iqneg_p2d = 0 / &echam_rad_nml ! ! domain 1 ! -------- ! echam_rad_config(1)%isolrad = 6 echam_rad_config(1)%irad_h2o = 1 echam_rad_config(1)%irad_co2 = 2 echam_rad_config(1)%irad_ch4 = 2 echam_rad_config(1)%irad_n2o = 2 echam_rad_config(1)%irad_o3 = 2 ! constant annual cycle climatology echam_rad_config(1)%irad_o2 = 2 echam_rad_config(1)%irad_cfc11 = 0 echam_rad_config(1)%irad_cfc12 = 0 echam_rad_config(1)%irad_aero = 0 echam_rad_config(1)%vmr_co2 = 284.317e-6 ! constant volume mixing ratio, default: 348.0e-6 echam_rad_config(1)%vmr_ch4 = 808.249e-9 ! constant volume mixing ratio, default: 1650.0e-9 echam_rad_config(1)%vmr_n2o = 273.021e-9 ! constant volume mixing ratio, default: 306.0e-9 echam_rad_config(1)%lyr_perp = .TRUE. echam_rad_config(1)%yr_perp = 1850 / &echam_gwd_nml / &echam_sso_nml echam_sso_config(1)%gkdrag = 0.005 ! default: 0.05 echam_sso_config(1)%gkwake = 0.005 ! default: 0.05 echam_sso_config(1)%gklift = 0.7 / &echam_vdf_nml echam_vdf_config(1)%c_n = 1.0 echam_vdf_config(1)%fsl = 0.5 echam_vdf_config(1)%pr0 = 0.7 ! default: 1.0 ! lower values help to avoid negative humidities / &echam_cnv_nml echam_cnv_config(1)%entrpen = 0.0003 ! default: 0.0003 (old default: 0.0002) echam_cnv_config(1)%cmfctop = 0.1 ! default: 0.1 (old default: 0.2) echam_cnv_config(1)%entrscv = 0.0003 ! default: 0.0003 (old default: 0.003) / &echam_cld_nml echam_cld_config(1)%csecfrl = 0.7e-5 ! threshold for ice and water in clouds, default 5.e-6 echam_cld_config(1)%ccraut = 2.0 ! default: 2.0 (old default: 15.0) echam_cld_config(1)%ccsaut = 2.0 ! default: 2.0 (old default: 95.0) echam_cld_config(1)%cauloc = 1.0 ! default: 1.0 (old default: 10.0) / &echam_cov_nml echam_cov_config(1)%crs = 0.968 ! Critical relative humidity at surface, default 0.968 echam_cov_config(1)%crt = 0.9 ! Critical relative humidity at toa, default 0.8 / &sea_ice_nml albs = 0.85 ! Albedo of snow (not melting) albsm = 0.7 ! Albedo of snow (melting) albi = 0.75 ! Albedo of ice (not melting) albim = 0.7 ! Albedo of ice (melting) / EOF # jsbach namelist # --------------- cat > ${lnd_namelist} << EOF &jsb_model_nml usecase = "${jsbach_usecase}" use_lakes = ${llake} fract_filename = "bc_land_frac.nc" output_tiles = ${output_tiles} ! List of tiles to output / &jsb_seb_nml bc_filename = 'bc_land_phys.nc' ic_filename = 'ic_land_soil.nc' / &jsb_rad_nml use_alb_veg_simple = .FALSE. ! Use TRUE for jsbach_lite, FALSE for jsbach_pfts bc_filename = 'bc_land_phys.nc' ic_filename = 'ic_land_soil.nc' / &jsb_turb_nml bc_filename = 'bc_land_phys.nc' ic_filename = 'ic_land_soil.nc' / &jsb_sse_nml l_heat_cap_map = .FALSE. l_heat_cond_map = .FALSE. l_heat_cap_dyn = .FALSE. l_heat_cond_dyn = .FALSE. l_snow = .TRUE. l_dynsnow = .TRUE. l_freeze = .TRUE. l_supercool = .TRUE. bc_filename = 'bc_land_soil.nc' ic_filename = 'ic_land_soil.nc' / &jsb_hydro_nml l_organic = .FALSE. bc_filename = 'bc_land_soil.nc' ic_filename = 'ic_land_soil.nc' bc_sso_filename = 'bc_land_sso.nc' / &jsb_assimi_nml active = .TRUE. ! Use FALSE for jsbach_lite, TRUE for jsbach_pfts / &jsb_pheno_nml scheme = 'logrop' ! scheme = logrop / climatology; use climatology for jsbach_lite bc_filename = 'bc_land_phys.nc' ic_filename = 'ic_land_soil.nc' / &jsb_carbon_nml active = ${lcarbon} bc_filename = 'bc_land_carbon.nc' ic_filename = 'ic_land_carbon.nc' read_cpools = .FALSE. / &jsb_fuel_nml active = ${lcarbon} fuel_algorithm = 1 / &jsb_disturb_nml active = .FALSE. ic_filename = 'ic_land_soil.nc' bc_filename = 'bc_land_phys.nc' fire_algorithm = 1 windbreak_algorithm = 1 lburn_pasture = .FALSE. / &jsb_hd_nml active = .TRUE. routing_scheme = 'full' ! 'zero': simple scheme with zero runoff everywhere bc_filename = 'bc_land_hd.nc' diag_water_budget = .TRUE. debug_hd = .FALSE. enforce_water_budget = .FALSE. ! TRUE: stop in case of water conservation problem / EOF #-------------------------------------------------------------------------------------------------- # Define the atmosphere and land input # ------------------------------------ # model files # add_link_file ${basedir}/data/lsdata.nc ./ add_link_file ${basedir}/data/ECHAM6_CldOptProps.nc ./ # namelist files # -------------- add_required_file ${basedir}/run/${atm_namelist} ./ add_required_file ${basedir}/run/${lnd_namelist} ./ # dictionary file for output variable names # dict_file="dict.${EXPNAME}" cat dict.iconam.mpim > ${dict_file} add_required_file ${basedir}/run/${dict_file} ./ # initial conditions # # - atmosphere: ECMWF analysis, 1979-01-01T00:00:00Z datadir=${atmo_data_InputFolder}/initial_condition/r0002 add_link_file ${datadir}/ifs2icon_1979010100_${atmos_refinement}_G.nc ./ifs2icon.nc # # - land: source?, date+time? datadir=${atmo_land_data_InputFolder}/land/r0001 add_link_file ${datadir}/ic_land_soil_1992.nc ./ic_land_soil.nc # boundary conditions # # - ozone # -- for irad_o3=8 # datadir=${atmo_data_InputFolder}/ozone/r0002 # add_link_file ${datadir}/bc_ozone_picontrol.nc ./bc_ozone.nc # # - sst and sic # datadir=${atmo_data_InputFolder}/sst_and_seaice/r0002 # add_link_file ${datadir}/bc_sic_1979_2016.nc ./bc_sic.nc add_link_file ${datadir}/bc_sst_1979_2016.nc ./bc_sst.nc # # - ssi and tsi # datadir=${icon_data_poolFolder}/independent/solar_radiation/3.2 # add_link_file ${datadir}/swflux_14band_cmip6_1850-2299-v3.2.nc ./bc_solar_irradiance_sw_b14.nc # # - land parameters # datadir=${atmo_land_data_InputFolder}/land/r0001 # add_link_file ${datadir}/bc_land_frac_${pft_file_tag}1992.nc ./bc_land_frac.nc add_link_file ${datadir}/bc_land_phys_1992.nc ./bc_land_phys.nc add_link_file ${datadir}/bc_land_soil_1992.nc ./bc_land_soil.nc add_link_file ${datadir}/bc_land_sso_1992.nc ./bc_land_sso.nc # # - HD model input by Tom Riddick # datadir=/work/mh0727/m300732/input/hd # FIXME move hdpara file to pool directory and adapt path add_link_file $datadir/hdpara_r2b3_0030_0036_no_sinks_half_frac_lnd_adjusted.nc ./bc_land_hd.nc # # - lctlib file for JSBACH # add_link_file ${basedir}/externals/jsbach/data/lctlib_nlct21.def ./lctlib_nlct21.def # # - HD mask for interpolation of runoff # add_required_file ${atmo_grid_folder}/${atmo_dyn_grid} ./hd_mask.nc # # - the atmosphere grid itself (the grid copy section below from $HGRIDDIR is ignored) # add_required_file ${atmo_grid_folder}/${atmo_dyn_grid} ./ # #-------------------------------------------------------------------------------------------------- # (5) Define the output # --------------------- # Parameters for all output files # ------------------------------- cat >> ${atm_namelist} << EOF &io_nml output_nml_dict = "${dict_file}" netcdf_dict = "${dict_file}" itype_pres_msl = 4 restart_file_type= 5 ! restart_write_mode = "joint procs multifile" ! not necessary/useful in default r2b4 setup ! lnetcdf_flt64_output = .TRUE. ! 64 bit output in all files lkeep_in_sync = .TRUE. ! sync after each timestep ! lkeep_in_sync = .FALSE. / &dbg_index_nml idbg_mxmn = 1 ! 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 ='InterFaceOce' ! define modules to print out in debug mode / EOF # Define output files # ------------------- # # output_=yes : yes --> output files for , any other value --> no files for # # 3-dimensional files include 'ps' and 'pfull' to allow the vertical # interpolation to pressure levels by cdo ap2pl. # if [[ "$output_atm_cgrid" == "yes" ]]; then # cat >> ${atm_namelist} << EOF &output_nml output_filename = "${EXPNAME}_atm_cgrid" filename_format = "_" filetype = 5 remap = 0 output_grid = .TRUE. output_start = "${start_date}" ! output_start = output_end output_end = "${start_date}" ! --> write once only irrespective of output_interval = "${atm_output_interval}" ! the output interval and file_interval = "${atm_file_interval}" ! the file interval ml_varlist = 'clon', 'clat', 'areacella', 'zghalf', 'zg' / EOF fi # output atmospheric monitoring if [[ "$output_atm_mon" == "yes" ]]; then cat >> ${atm_namelist} << EOF &output_nml output_filename = "${EXPNAME}_atm_mon" filename_format = "_" filetype = 5 ! output format: 2=GRIB2, 4=NETCDFv2, 5=NETCDFv4 remap = 0 mode = 1 ! 1: forecast mode (relative t-axis), 2: climate mode (absolute t-axis) operation = 'mean' ! mean over output interval output_grid = .FALSE. output_start = "${start_date}" output_end = "${end_date}" output_interval = "${atm_output_interval}" file_interval = "${atm_file_interval}" include_last = .FALSE. ml_varlist = 'tas_gmean','rsdt_gmean','rsut_gmean','rlut_gmean','radtop_gmean', 'prec_gmean','evap_gmean','fwfoce_gmean' / EOF fi # interface debug output if [[ "$output_atm_dbg" == "yes" ]]; then cat >> ${atm_namelist} <> ${atm_namelist} << EOF &output_nml output_filename = "${EXPNAME}_atm_3d" filename_format = "__" filetype = 5 remap = 0 operation = 'mean' output_grid = .FALSE. output_start = "${start_date}" output_end = "${end_date}" output_interval = "${atm_output_interval}" file_interval = "${atm_file_interval}" include_last = .FALSE. ml_varlist = 'zg' , 'ps' , 'pfull' , 'rho' , 'ta' , 'ua' , 'va' , 'wap' , 'hus' , 'clw' , 'cli' , 'hur' , 'cl' , ! 'qo3_phy' , / EOF fi if [[ "$output_atm_2d" == "yes" ]]; then # cat >> ${atm_namelist} << EOF &output_nml output_filename = "${EXPNAME}_atm_2d" filename_format = "__" filetype = 5 remap = 0 operation = 'mean' output_grid = .FALSE. output_start = "${start_date}" output_end = "${end_date}" output_interval = "${atm_output_interval}" file_interval = "${atm_file_interval}" include_last = .FALSE. ml_varlist = 'orog' , 'ps' , 'psl' , 'cosmu0' , 'rsdt' , 'rsut' , 'rsutcs' , 'rlut' , 'rlutcs' , 'rsds' , 'rsdscs' , 'rlds' , 'rldscs' , 'rsus' , 'rsuscs' , 'rlus' , 'ts' , 'sic' , 'sit' , 'albedo' , 'clt' , 'prlr' , 'prls' , 'prcr' , 'prcs' , 'pr' , 'prw' , 'cllvi' , 'clivi' , 'hfls' , 'hfss' , 'evspsbl' , 'tauu' , 'tauv' , 'tauu_sso', 'tauv_sso', 'diss_sso', 'sfcwind' , 'uas' , 'vas' , 'tas' , 'dew2' , 'ptp' / EOF fi if [[ "$output_phy_3d" == "yes" ]]; then # cat >> ${atm_namelist} << EOF &output_nml output_filename = "${EXPNAME}_phy_3d" filename_format = "__" filetype = 5 remap = 0 operation = 'mean' output_grid = .FALSE. output_start = "${start_date}" output_end = "${end_date}" output_interval = "${atm_output_interval}" file_interval = "${atm_file_interval}" include_last = .FALSE. ml_varlist = 'ps' , 'pfull' , 'tend_ta' , 'tend_ta_dyn' , 'tend_ta_phy' , 'tend_ta_vdf' , 'tend_ta_gwd' , 'tend_ta_sso' , 'tend_ta_cnv' , 'tend_ta_cld' , 'tend_ua' , 'tend_ua_dyn' , 'tend_ua_phy' , 'tend_ua_vdf' , 'tend_ua_gwd' , 'tend_ua_sso' , 'tend_ua_cnv' , 'tend_va' , 'tend_va_dyn' , 'tend_va_phy' , 'tend_va_vdf' , 'tend_va_gwd' , 'tend_va_sso' , 'tend_va_cnv' , 'tend_qhus' , 'tend_qhus_dyn', 'tend_qhus_phy', 'tend_qhus_cld', 'tend_qhus_cnv', 'tend_qhus_vdf' / EOF fi # jsbach output for running atm_amip experiment # for more jsbach output see exp.atm_amip_les # if [[ "$output_lnd" != "none" ]]; then cat >> ${atm_namelist} << EOF &output_nml output_filename = "${EXPNAME}_lnd_basic" filename_format = "__" filetype = 5 remap = 0 operation = 'mean' output_grid = .TRUE. output_start = "${start_date}" output_end = "${end_date}" output_interval = "${lnd_output_interval}" file_interval = "${lnd_file_interval}" include_last = .FALSE. ml_varlist = 'group:jsb_all_basic','hd_water_error_box','hydro_discharge_ocean_box','hydro_discharge_box' / EOF fi case "${output_lnd}" in medium|full) cat >> ${atm_namelist} << EOF &output_nml output_filename = "${EXPNAME}_lnd_medium" filename_format = "__" filetype = 5 remap = 0 operation = 'mean' output_grid = .TRUE. output_start = "${start_date}" output_end = "${end_date}" output_interval = "${lnd_output_interval}" file_interval = "${lnd_file_interval}" include_last = .FALSE. ml_varlist = 'group:jsb_all_medium' / EOF ;; esac case "${output_lnd}" in full) cat >> ${atm_namelist} << EOF &output_nml output_filename = "${EXPNAME}_lnd_full" filename_format = "__" filetype = 5 remap = 0 operation = 'mean' output_grid = .TRUE. output_start = "${start_date}" output_end = "${end_date}" output_interval = "${lnd_output_interval}" file_interval = "${lnd_file_interval}" include_last = .FALSE. ml_varlist = 'group:jsb_all_full' / EOF ;; esac #----------------------------------------------------------------------------- # III. OCEAN and SEA-ICE (and HAMOCC) #----------------------------------------------------------------------------- ocean_vertical_levels=40 ocean_grid_name="icon_grid_${ocean_gridID}_${ocean_refinement}_O" ocean_grid=${ocean_grid_name}.nc ocean_grid_folder="/pool/data/ICON/grids/public/mpim/${ocean_gridID}" ocean_data_InputFolder="/pool/data/ICON/oes/input/r0004/${ocean_grid_name}" #----------------------------------------------------------------------------- # 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_mode = .TRUE. / ¶llel_nml nproma = ${nproma_oce} num_io_procs = ${mpi_oce_io_procs} num_prefetch_proc = 0 pio_type = 0 p_test_run = .FALSE. l_fast_sum = .TRUE. / &grid_nml dynamics_grid_filename = "${ocean_grid}" use_dummy_cell_closure = .TRUE. use_duplicated_connectivity = .FALSE. / &dynamics_nml iequations = -1 ! -1: hydrost. ocean model / &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_.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_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_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. filename_format = "_" operation = "mean" ml_varlist = 'group:oce_default', 'group:oce_essentials' / EOF fi if [[ "$output_oce_ice" == "yes" ]]; then cat >> ${oce_namelist} <> ${oce_namelist} << EOF &output_nml filetype = 4 output_filename = "${EXPNAME}_oce_mon" filename_format = "_" 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. filename_format = "_" 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_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. filename_format = "_" operation = "mean" ml_varlist = 'group:ocean_moc' / EOF fi if [[ "$output_oce_dbg" == "yes" ]]; then cat >> ${oce_namelist} <> ${oce_namelist} << EOF &output_nml output_filename = "${EXPNAME}_hamocc_monitor" filename_format = "_" output_start = "${start_date}" output_end = "${end_date}" output_interval = "${hamocc_output_interval}" file_interval = "${hamocc_file_interval}" output_grid = .false. operation = 'mean' ml_varlist = 'group:HAMOCC_MONI' / EOF fi # if [[ "$output_hamocc_base" == "yes" ]]; then cat >> ${oce_namelist} << EOF &output_nml filetype = 4 ! output format: 2=GRIB2, 4=NETCDFv2 filename_format = "_" output_filename = "${EXPNAME}_hamocc" output_start = "${start_date}" ! start in ISO-format output_end = "${end_date}" ! end in ISO-format output_interval = "${hamocc_output_interval}" file_interval = "${hamocc_file_interval}" output_grid = .TRUE. operation = 'mean' ml_varlist = 'group:HAMOCC_BASE' / EOF fi # if [[ "$output_hamocc_sed" == "yes" ]]; then cat >> ${oce_namelist} << EOF &output_nml filetype = 4 ! output format: 2=GRIB2, 4=NETCDFv2 filename_format = "_" output_filename = "${EXPNAME}_hamocc_sediment" output_start = "${start_date}" ! start in ISO-format output_end = "${end_date}" ! end in ISO-format output_interval = "${hamocc_output_interval}" file_interval = "${hamocc_file_interval}" output_grid = .TRUE. operation = 'mean' ml_varlist = 'group:HAMOCC_SED' / EOF fi # if [[ "$output_hamocc_3d" == "yes" ]]; then cat >> ${oce_namelist} << EOF &output_nml filetype = 4 ! output format: 2=GRIB2, 4=NETCDFv2 filename_format = "_" output_filename = "${EXPNAME}_hamocc_3d_tendencies" output_start = "${start_date}" ! start in ISO-format output_end = "${end_date}" ! end in ISO-format output_interval = "${hamocc_output_interval}" file_interval = "${hamocc_file_interval}" output_grid = .TRUE. operation = 'mean' ml_varlist = 'HAMOCC_BACFRA','HAMOCC_SRED','HAMOCC_REMIN','HAMOCC_DENIT','HAMOCC_delsil','HAMOCC_delcar','HAMOCC_aou' / EOF fi # if [[ "$output_hamocc_EU" == "yes" ]]; then cat >> ${oce_namelist} << EOF &output_nml filetype = 4 ! output format: 2=GRIB2, 4=NETCDFv2 filename_format = "_" output_filename = "${EXPNAME}_hamocc_EU_tendencies" output_start = "${start_date}" ! start in ISO-format output_end = "${end_date}" ! end in ISO-format output_interval = "${hamocc_output_interval}" file_interval = "${hamocc_file_interval}" !mode = 2 ! 1: forecast mode (relative t-axis), 2: climate mode (absolute t-axis) output_grid = .TRUE. operation = 'mean' ml_varlist = 'HAMOCC_NPP','HAMOCC_nfix','HAMOCC_dms_prod','HAMOCC_dms_bac','HAMOCC_dms_uv','HAMOCC_eu_export','HAMOCC_pho_cya','HAMOCC_cya_loss','HAMOCC_grazing','HAMOCC_remin_via_grazer','HAMOCC_exudation_phy','HAMOCC_exudation_zoo','HAMOCC_zoomor','HAMOCC_phymor','HAMOCC_plim','HAMOCC_flim','HAMOCC_nlim','HAMOCC_cTlim','HAMOCC_cLlim','HAMOCC_cPlim','HAMOCC_cFlim' m_levels ='1...${nlev_eu}' ! ~500m: 19 for L40, 16 for L20, 26 for L64 / EOF fi # if [[ "$output_hamocc_2d" == "yes" ]]; then cat >> ${oce_namelist} << EOF &output_nml filetype = 4 ! output format: 2=GRIB2, 4=NETCDFv2 filename_format = "_" output_filename = "${EXPNAME}_hamocc_2d_tendencies" output_start = "${start_date}" ! start in ISO-format output_end = "${end_date}" ! end in ISO-format output_interval = "${hamocc_output_interval}" !mode = 2 ! 1: forecast mode (relative t-axis), 2: climate mode (absolute t-axis) file_interval = "${hamocc_file_interval}" output_grid = .TRUE. operation = 'mean' ml_varlist = 'HAMOCC_co2flux','HAMOCC_orginp','HAMOCC_dmsflux','HAMOCC_silinp','HAMOCC_calinp','HAMOCC_o2flux','HAMOCC_n2flux','HAMOCC_n2oflux','HAMOCC_nfix_diag','HAMOCC_coex90','HAMOCC_calex90','HAMOCC_opex90','HAMOCC_coex1000','HAMOCC_opex1000','HAMOCC_calex1000','HAMOCC_coex2000','HAMOCC_opex2000','HAMOCC_calex2000','HAMOCC_o2min','HAMOCC_zo2min' / EOF fi fi ############################################################## cat >> ${oce_namelist} << EOF &dbg_index_nml idbg_mxmn = 1 ! 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-13 ! this may further be reduced solver_FirstGuess = 2 ! 0=start from zeros 1=last timestep smoothed 2=last timestep (default) ! solver_tolerance = 7.5E-14 ! old value ! solver_max_iter_per_restart = 19 ! old value ! solver_max_restart_iterations = 100 ! outer (restart solver) 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) flux_calculation_vert = 7 ! 6=adpo; 7=upwind biased ppm (default); 8=FCT with zalesak limiter ! define low and high order methods to be used in ! horizontal flux corrected transport methods ! (flux_calculation_horz=4,5) fct_low_order_flux = 1 ! horizontal low order method: 1=upwind (def), no other implemented fct_high_order_flux = 5 ! horizontal high order method: 1=upwind, 2=central, 3=lax_friedrichs, 4=miura_order1 fct_limiter_horz = 100 ! zalesak / &ocean_horizontal_diffusion_nml laplacian_form = 1 ! 1=curlcurl-graddiv VelocityDiffusion_order = 1 ! 21=biharmonic+laplacian (for the laplacian leith) ! ! BiharmonicViscosity_scaling = 1 ! BiharmonicViscosity_reference = 1.0E15 ! [m2/s] constant horizontal viscosity coefficient for velocity ! BiharmonicViscosity_background = 0.0 ! [m2/s] constant horizontal viscosity coefficient for velocity HarmonicViscosity_scaling = 1 HarmonicViscosity_reference = 5.0E+4 ! [m2/s] constant horizontal viscosity coefficient for velocity HarmonicViscosity_background = 0.0 TracerHorizontalDiffusion_scaling = 1 Temperature_HorizontalDiffusion_Background = 0.0 Temperature_HorizontalDiffusion_Reference = 0 Salinity_HorizontalDiffusion_Background = 0.0 Salinity_HorizontalDiffusion_Reference = 0 / &ocean_vertical_diffusion_nml PPscheme_type = 4 velocity_VerticalDiffusion_background = 5.0E-5 ! [m2/s] vertical background viscosity coefficient for velocity temperature_VerticalDiffusion_background = 5.0E-5 ! [m2/s] vertical background diffusion coefficient for temperature salinity_VerticalDiffusion_background = 5.0E-5 ! [m2/s] vertical background diffusion coefficient for salinity tracer_convection_MixingCoefficient = 0.1 ! max vertical tracer diffusion for convection used in case of instability convection_InstabilityThreshold = -1.0E-6 ! used in update_ho_params - default=-5e-8 richardsonDiffusion_threshold = 0.0 ! used in update_ho_params - default=+5e-8 tracer_RichardsonCoeff = 2.0E-3 ! factor for vertical diffusion coefficient in PP scheme velocity_RichardsonCoeff = 2.0E-3 ! factor for vertical viscosity coefficient in PP scheme bottom_drag_coeff = 3.0E-3 ! default=2.5E-3; active for i_bc_veloc_bot=1 use_wind_mixing = .TRUE. ! TRUE: use wind mixing scheme in MPIOM-type pp-scheme lambda_wind = 0.03 tracer_TopWindMixing = 1.0E-5 velocity_TopWindMixing = 1.0E-5 / &ocean_GentMcWilliamsRedi_nml GMRedi_configuration = 1 ! 0=cartesian diffusion; 1=GM-Redi: bolus advection + isopycnal diffusion tapering_scheme = 1 GMRedi_usesRelativeMaxSlopes = .FALSE. S_max = 1.0e-5 ! 1.0 S_d = 1.0e-4 ! 5e-3 to 5e-4 ! k_tracer_GM_kappa_parameter = 800.0 ! k_tracer_isoneutral_parameter = 800.0 ! value for cell-based cartesian diffusion - mpiom: 1000/400km = 400/160km k_tracer_dianeutral_parameter = 0.0 ! 1.0E-5 ! ! switch_off_diagonal_vert_expl = .TRUE. gmredi_combined_diagnostic = .FALSE. ! switch_on_redi_balance_diagnostic = .FALSE. ! not yet available in icon-aes-dyamond++ revert_vertical_recon_and_transposed = .TRUE. slope_calc_via_temperture_salinity = .TRUE. include_slope_squared_implicit = .TRUE. ! think of l_with_vert_tracer_diffusion switch_on_tapering_horizontal_diffusion = .TRUE. / &ocean_physics_nml i_sea_ice = 1 ! 0 = no sea ice; 1 = sea ice model on; default=1 lhamocc = ${lhamocc} lbgcadv = ${lbgcadv} / &sea_ice_nml i_ice_therm = 1 ! 1=zero-layer (default), 2=Winton, 0/2: not allowed i_ice_dyn = 1 ! 1/0=switch on/off AWI ice dynamics ! i_Qio_type = 3 ! 3 (default): energy of whole grid-area used for melting (MPIOM-type) ! use_constant_tfreez = .TRUE. ! default: TRUE ! use_no_flux_gradients = .FALSE. ! default: TRUE leadclose_1 = 0.25 ! default: 0.5 - value of MPIOM: 0.25 leadclose_2n = 0.666 ! default: 0.0 - value of MPIOM: 2/3 / EOF ## HAMOCC namelist ######################################## if [ "x${use_hamocc}" = "xyes" ]; then cat >> ${oce_namelist} << EOF &hamocc_nml l_cyadyn = .TRUE. ! dynamic cyanobacteria l_cpl_co2 = .FALSE. ! CO2 coupled to land carbon cycle l_bgc_check = .FALSE. ! mass check at every time step deltacalc = 0.0 ! CaCO3 weathering rate [kmol/s] deltaorg = 0.0 ! OC weathering rate [kmol/s] deltasil = 0.0 ! Si(OH)4 weathering rate [kmol/s] atm_co2 = 284.3 ! atmospheric CO2 (default 278) atm_n2 = 802000. ! atmospheric N2 (default 802000) atm_o2 = 196800. ! atmospheric O2 (default 196800) sinkspeed_opal = 25. ! opal sinking speed [m/d] (default 30) sinkspeed_calc = 30. ! calc sinking speed [m/d] (default 30) i_settling = 1 ! 0 constant POC sinking speed, 1 Martin curve, 2 AGG module (not yet implemented) sinkspeed_poc = 5. ! detritus sinking speed [m/d] for i_settling=0 (default 5) sinkspeed_martin_ez = 3.5 ! detritue sinking speed within (0, mc_depth) [m/d] for i_settling=1 (default 3.5) mc_depth = 100. ! depth where linear increase of sinking speed starts for i_settling=1 (default 100.) mc_fac = 2.0 ! slope of sinking speed increase relative to remin rate (default 2.0) l_implsed =.FALSE. ! implicit sediment formulation cycdec = 0.07 cya_growth_max = 0.3 grazra = 0.7 l_init_bgc = ${l_init_bgc} / EOF fi ############################################################ cat >> ${oce_namelist} << EOF &ocean_forcing_nml iforc_oce = 14 ! ocean forcing: 14 from coupling via YAC type_surfRelax_Temp = -1 ! -1: use net surface heat flux from atmosphere ! 0: no relaxation used ! 1: relaxation switched on for reading (init_oce_relax=1) ! or some testcases only forcing_enable_freshwater = .TRUE. ! enable/disable freshwater flux forcing_windstress_u_type = 2 ! 0: zero wind stress, 1: read from file, 2: none forcing_windstress_v_type = 2 ! 0: zero wind stress, 1: read from file, 2: none ! salt-change due to internal fluxes only limit_seaice = .TRUE. ! default: TRUE seaice_limit = 0.8 ! hard limit set to 80% of upper layer for sea ice lfix_salt_content = .TRUE. limit_elevation = .FALSE. ! true: adjust daily to zero, default=false: free surface ! lswr_jerlov = .FALSE. ! SW-penetration (Jerlov-radiation, default=T) / EOF # if [[ "$initialiseOcean" == "fromRestart" ]] || [[ "$initialiseOcean" == "fromRestartwithHamocc" ]]; then # cat >> ${oce_namelist} << EOF &ocean_initialConditions_nml initial_salinity_type = 0 ! 0: none, 1: read S from initial_state.nc initial_temperature_type = 0 ! 0: none, 1: read T from initial_state.nc initialize_fromRestart = .TRUE. / EOF # else # if [[ "$initialiseOcean" == "fromClimatology" ]]; then cat >> ${oce_namelist} << EOF &ocean_initialConditions_nml initial_salinity_type = 1 ! 0: none, 1: read S from initial_state.nc initial_temperature_type = 1 ! 0: none, 1: read T from initial_state.nc initialize_fromRestart = .FALSE. / EOF else cat >> ${oce_namelist} << EOF &ocean_initialConditions_nml initial_salinity_type = 0 ! 0: none, 1: read S from initial_state.nc initial_temperature_type = 0 ! 0: none, 1: read T from initial_state.nc initialize_fromRestart = .FALSE. / EOF fi fi # cat >> ${oce_namelist} << EOF &ocean_diagnostics_nml diagnostics_level = 1 diagnose_for_horizontalVelocity = .FALSE. diagnose_for_heat_content = .TRUE. / &io_nml restart_file_type = 5 write_last_restart = .TRUE. ! restart_write_mode = "joint procs multifile" ! not yet available in ocean model ! lnetcdf_flt64_output = .TRUE. ! 64 bit output in all files lkeep_in_sync = .TRUE. ! sync after each timestep / EOF add_required_file ${basedir}/run/${oce_namelist} ./ #----------------------------------------------------------------------------- # # Ocean initialisation input # if [[ "$initialiseOcean" == "fromRestart" ]]; then add_link_file /work/mh0727/m300732/input/0036/ocean/restart/ler0612_restart_oce_12000101T000000Z.nc restart_ocean_DOM01.nc fi #if [[ "$initialiseOcean" == "fromRestartwithHamocc" ]]; then # FIXME no restart file available # fi if [[ "$initialiseOcean" == "fromClimatology" ]]; then # for initializing from Levitus: add_link_file ${ocean_data_InputFolder}/R2B4L40_initial_state.nc initial_state.nc fi # # Ocean grid # add_required_file ${ocean_grid_folder}/${ocean_grid} ./ # ## HAMOCC forcing files # if [ "x${use_hamocc}" = "xyes" ]; then # FIXME: this is still a private path datadir=/work/mh0727/m300732/input/0036/ocean/hamocc/ add_link_file $datadir/MAHOWALDDUST_icon_grid_0036_R02B04_O_remapbil1.nc dust.nc # iron deposition add_link_file $datadir/ndepo_1-0_gr_185001-185012-clim_icon_grid_0036_R02B04_O.nc nitrogen.nc # nitrate deposition fi # #----------------------------------------------------------------------------- if [ $mpi_total_procs -lt `expr $mpi_oce_procs + 1` ] ; then echo "Too few mpi_total_procs for requested mpi_oce_procs." echo "-> check mpi_total_procs and mpi_oce_procs. Exiting." check_error 0 exit fi #----------------------------------------------------------------------------- #!/bin/ksh #============================================================================= # # This section of the run script prepares and starts the model integration. # # MODEL and START must be defined as environment variables or # they must be substituted with appropriate values. # # Marco Giorgetta, MPI-M, 2010-04-21 # #----------------------------------------------------------------------------- final_status_file=${basedir}/run/${job_name}.final_status rm -f ${final_status_file} #----------------------------------------------------------------------------- # # directories definition # RUNSCRIPTDIR=${basedir}/run if [ x$grids_folder = x ] ; then HGRIDDIR=${basedir}/grids else HGRIDDIR=$grids_folder fi # experiment directory, with plenty of space, create if new EXPDIR=${basedir}/experiments/${EXPNAME} if [ ! -d ${EXPDIR} ] ; then mkdir -p ${EXPDIR} fi # ls -ld ${EXPDIR} if [ ! -d ${EXPDIR} ] ; then mkdir ${EXPDIR} #else # rm -rf ${EXPDIR} # mkdir ${EXPDIR} fi ls -ld ${EXPDIR} check_error $? "${EXPDIR} does not exist?" cd ${EXPDIR} #----------------------------------------------------------------------------- final_status_file=${RUNSCRIPTDIR}/${job_name}.final_status rm -f ${final_status_file} #----------------------------------------------------------------------------- # set up the model lists if they do not exist # this works for single model runs # for coupled runs the lists should be declared explicilty if [ x$namelist_list = x ]; then # minrank_list=( 0 ) # maxrank_list=( 65535 ) # incrank_list=( 1 ) minrank_list[0]=0 maxrank_list[0]=65535 incrank_list[0]=1 if [ x$atmo_namelist != x ]; then # this is the atmo model namelist_list[0]="$atmo_namelist" modelname_list[0]="atmo" modeltype_list[0]=1 run_atmo="true" elif [ x$ocean_namelist != x ]; then # this is the ocean model namelist_list[0]="$ocean_namelist" modelname_list[0]="oce" modeltype_list[0]=2 elif [ x$psrad_namelist != x ]; then # this is the psrad model namelist_list[0]="$psrad_namelist" modelname_list[0]="psrad" modeltype_list[0]=3 elif [ x$hamocc_namelist != x ]; then # this is the hamocc model namelist_list[0]="$hamocc_namelist" modelname_list[0]="hamocc" modeltype_list[0]=4 elif [ x$testbed_namelist != x ]; then # this is the testbed model namelist_list[0]="$testbed_namelist" modelname_list[0]="testbed" modeltype_list[0]=99 else check_error 1 "No namelist is defined" fi fi #----------------------------------------------------------------------------- #----------------------------------------------------------------------------- # set some default values and derive some run parameteres restart=${restart:=".false."} restartSemaphoreFilename='isRestartRun.sem' #AUTOMATIC_RESTART_SETUP: if [ -f ${restartSemaphoreFilename} ]; then restart=.true. # do not delete switch-file, to enable restart after unintended abort #[[ -f ${restartSemaphoreFilename} ]] && rm ${restartSemaphoreFilename} fi #END AUTOMATIC_RESTART_SETUP # # wait 5min to let GPFS finish the write operations if [ "x$restart" != 'x.false.' -a "x$submit" != 'x' ]; then if [ x$(df -T ${EXPDIR} | cut -d ' ' -f 2) = gpfs ]; then sleep 10; fi fi # fill some checks run_atmo=${run_atmo="false"} if [ x$atmo_namelist != x ]; then run_atmo="true" fi run_jsbach=${run_jsbach="false"} run_ocean=${run_ocean="false"} if [ x$ocean_namelist != x ]; then run_ocean="true" fi run_psrad=${run_psrad="false"} if [ x$psrad_namelist != x ]; then run_psrad="true" fi run_hamocc=${run_hamocc="false"} if [ x$hamocc_namelist != x ]; then run_hamocc="true" fi #----------------------------------------------------------------------------- # add grids to required files all_grids="${atmo_dyn_grids} ${atmo_rad_grids} ${ocean_grids}" for gridfile in ${all_grids}; do # gridfile=${gridfile//\'/} # strip all ' in case ' is used to delimit the grid names gridfile=${gridfile//\"/} # strip all " in case " is used to delimit the grid names gridfile=${gridfile//\,/} # strip all , in case , is used to separate the grid names # grfinfofile=${gridfile%.nc}-grfinfo.nc # ls -l ${HGRIDDIR}/$gridfile check_error $? "${HGRIDDIR}/$gridfile does not exist." add_link_file ${HGRIDDIR}/${gridfile} ./ if [ -f ${HGRIDDIR}/${grfinfofile} ]; then add_link_file ${HGRIDDIR}/${grfinfofile} ./ fi done #----------------------------------------------------------------------------- # print_required_files copy_required_files link_required_files #----------------------------------------------------------------------------- # get restart files if [ x$restart_atmo_from != "x" ] ; then rm -f restart_atm_DOM01.nc # ln -s ${basedir}/experiments/${restart_from_folder}/${restart_atmo_from} ${EXPDIR}/restart_atm_DOM01.nc cp ${basedir}/experiments/${restart_from_folder}/${restart_atmo_from} cp_restart_atm.nc ln -s cp_restart_atm.nc restart_atm_DOM01.nc restart=".true." fi if [ x$restart_ocean_from != "x" ] ; then rm -f restart_oce.nc # ln -s ${basedir}/experiments/${restart_from_folder}/${restart_ocean_from} ${EXPDIR}/restart_oce.nc cp ${basedir}/experiments/${restart_from_folder}/${restart_ocean_from} cp_restart_oce_DOM01.nc ln -s cp_restart_oce_DOM01.nc restart_oce_DOM01.nc restart=".true." fi #----------------------------------------------------------------------------- read_restart_namelists=${read_restart_namelists:=".true."} #----------------------------------------------------------------------------- # # create ICON master namelist # ------------------------ # For a complete list see Namelist_overview and Namelist_overview.pdf #----------------------------------------------------------------------------- # create master_namelist master_namelist=icon_master.namelist if [ x$end_date = x ]; then cat > $master_namelist << EOF &master_nml lrestart = $restart / &master_time_control_nml experimentStartDate = "$start_date" restartTimeIntval = "$restart_interval" checkpointTimeIntval = "$checkpoint_interval" / &time_nml is_relative_time = .false. / EOF else if [ x$calendar = x ]; then calendar='proleptic gregorian' calendar_type=1 else calendar=$calendar calendar_type=$calendar_type fi cat > $master_namelist << EOF &master_nml lrestart = $restart read_restart_namelists = $read_restart_namelists / &master_time_control_nml calendar = "$calendar" checkpointTimeIntval = "$checkpoint_interval" restartTimeIntval = "$restart_interval" experimentStartDate = "$start_date" experimentStopDate = "$end_date" / &time_nml is_relative_time = .false. / EOF fi #----------------------------------------------------------------------------- #----------------------------------------------------------------------------- # add model component to master_namelist add_component_to_master_namelist() { model_namelist_filename="$1" model_name=$2 model_type=$3 model_min_rank=$4 model_max_rank=$5 model_inc_rank=$6 cat >> $master_namelist << EOF &master_model_nml model_name="$model_name" model_namelist_filename="$model_namelist_filename" model_type=$model_type model_min_rank=$model_min_rank model_max_rank=$model_max_rank model_inc_rank=$model_inc_rank / EOF #----------- #get namelist if [ -f ${RUNSCRIPTDIR}/$model_namelist_filename ] ; then mv -f ${RUNSCRIPTDIR}/$model_namelist_filename ${EXPDIR} check_error $? "mv -f ${RUNSCRIPTDIR}/$model_namelist_filename" else check_error 1 "${RUNSCRIPTDIR}/$model_namelist_filename does not exist" fi } #----------------------------------------------------------------------------- no_of_models=${#namelist_list[*]} echo "no_of_models=$no_of_models" j=0 while [ $j -lt ${no_of_models} ] do add_component_to_master_namelist "${namelist_list[$j]}" "${modelname_list[$j]}" ${modeltype_list[$j]} ${minrank_list[$j]} ${maxrank_list[$j]} ${incrank_list[$j]} j=`expr ${j} + 1` done #----------------------------------------------------------------------------- # Add JSBACH part to master_namelist if [[ $run_jsbach == @(yes|true) ]]; then cat >> $master_namelist << EOF &jsb_control_nml is_standalone = .false. restart_jsbach = .false. debug_level = 0 timer_level = 0 / EOF # if [[ -n ${atmo_dyn_grids} ]]; then set -A gridfiles $atmo_dyn_grids no_of_domains=${#gridfiles[*]} else no_of_domains=1 fi echo "no_of_domains=$no_of_domains" domain="" domain_suffix="" j=1 while [ $j -le ${no_of_domains} ] do if [[ $no_of_domains -gt 1 ]]; then # no_of_domains < 10 ! domain=" DOM0${j}" domain_suffix="_d${j}" fi cat >> $master_namelist << EOF &jsb_model_nml model_id = $j model_name = "JSBACH${domain}" model_shortname = "jsb${domain_suffix}" model_description = 'JSBACH land surface model' model_namelist_filename = "${lnd_namelist}${domain_suffix}" / EOF if [[ -f ${RUNSCRIPTDIR}/NAMELIST_${EXPNAME}_lnd${domain_suffix} && -f ${EXPDIR}/NAMELIST_${EXPNAME}_lnd${domain_suffix} ]] ; then # namelist file has already been copied to expdir by copy_required_files above rm ${RUNSCRIPTDIR}/NAMELIST_${EXPNAME}_lnd${domain_suffix} check_error $? "rm ${RUNSCRIPTDIR}/NAMELIST_${EXPNAME}_lnd${domain_suffix}" else check_error 1 "${RUNSCRIPTDIR}/NAMELIST_${EXPNAME}_lnd${domain_suffix} does not exist" fi j=`expr ${j} + 1` done fi # # get model # ls -l ${MODEL} check_error $? "${MODEL} does not exist?" # ldd -v ${MODEL} # #----------------------------------------------------------------------------- # # start experiment # rm -f finish.status # date ${START} ${MODEL} # > out.txt 2>&1 date # if [ -r finish.status ] ; then check_final_status 0 "${START} ${MODEL}" else check_final_status -1 "${START} ${MODEL}" fi # #----------------------------------------------------------------------------- # finish_status=`cat finish.status` echo $finish_status echo "============================" echo "Script run successfully: $finish_status" echo "============================" #----------------------------------------------------------------------------- # rm output_schedule_steps* #----------------------------------------------------------------------------- if [[ "x$use_hamocc" = "xyes" ]]; then # store HAMOCC log file strg="$(ls -rt ${EXPNAME}_hamocc_EU*.nc* | tail -1 )" prefx="${EXPNAME}_hamocc_EU_tendencies" foo=${strg##${prefx}} foo=${foo%%.*} bgcout_file="bgcout_${foo}" mv bgcout $bgcout_file fi #----------------------------------------------------------------------------- namelist_list="" #----------------------------------------------------------------------------- # check if we have to restart, ie resubmit # Note: this is a different mechanism from checking the restart if [ $finish_status = "RESTART" ] ; then echo "restart next experiment..." this_script="${RUNSCRIPTDIR}/${job_name}" echo 'this_script: ' "$this_script" touch ${restartSemaphoreFilename} cd ${RUNSCRIPTDIR} ${submit} $this_script $run_param_0 else [[ -f ${restartSemaphoreFilename} ]] && rm ${restartSemaphoreFilename} fi #----------------------------------------------------------------------------- # automatic call/submission of post processing if available if [ "x${autoPostProcessing}" = "xtrue" ]; then # check if there is a postprocessing is available cd ${RUNSCRIPTDIR} targetPostProcessingScript="./post.${EXPNAME}.run" [[ -x $targetPostProcessingScript ]] && ${submit} ${targetPostProcessingScript} cd - fi #----------------------------------------------------------------------------- cd $RUNSCRIPTDIR #----------------------------------------------------------------------------- # exit 0 # # vim:ft=sh #-----------------------------------------------------------------------------