# ------------------ INPUTS TO MAIN PROGRAM ------------------- # # Regression coverage for the surface-only initialization path (issue #4060): # a fine level created PART-WAY through the run from a wrfinput_d02 whose start # time is later than wrfinput_d01's, with erf.interp_atmos_from_coarse = true. # # What this exercises (none of the other WPS tests reach it): # - ErrorEst tags the d02 subdomain only once t_new reaches the d02 start time, # so level 1 is built by MakeNewLevelFromCoarse, not MakeNewLevelFromScratch # (the from-scratch path ignores interp_atmos_from_coarse with a warning). # - MakeNewLevelFromCoarse then reads ONLY the surface fields from wrfinput_d02 # (init_from_wrfinput with read_atmos_state = false), rebuilds the base state # on the fine terrain, and fills the atmosphere by FillCoarsePatch. # - With SLM active, the surface read fills the LSM fields named in # SLM::wrfinput_map (TSLB, SMOIS, LAI, ZS, DZS, VEGFRA, TSK, ...), which # requires make_lsm_at_level to have run before the read (ERF_MakeNewLevel.cpp). # - rad_interp_from_coarse_pending[1] is set at level creation and, with RRTMGP # active, makes advance_radiation interpolate the radiation fields from the # parent for exactly one step instead of running RRTMGP on the not-yet- # consistent FillCoarsePatch state -- the flag-not-istep guard from #4061. # # This uses the same summer dataset and physics as inputs_slm_rrtmgp (start # 2024-08-05). SLM requires the radiation model: without radiative forcing its # surface energy balance drives the MOST iteration to non-convergence within a # few steps. (SLM also asserts t_canop > freezing, so a winter dataset such as # chisholmview cannot run SLM at all.) Data requirements: # - wrfinput_d01 / wrfbdy_d01: the inputs_slm_rrtmgp files. # - wrfinput_d02: same eta levels as d01, parent_grid_ratio = 3 (must match # amr.ref_ratio_vect below), start time = d01's + 25 s so level 1 appears at # step 5 with erf.fixed_dt = 5. Generated from d01 by refining an interior # 30x30-coarse-cell patch 3x (I/J_PARENT_START = 36). # - NoahmpTable.TBL for SLM, and the four rrtmgp-*.nc files (see the README). # If any of these change, keep max_step * fixed_dt comfortably past the d02 # start offset: level 1 must be created AND advanced before the final plotfile. erf.prob_name = WPS prob.KE_0 = 0.4 prob.KE_decay_height = 1000. prob.KE_decay_order = 3 max_step = 20 start_datetime = "2024-08-05 00:00:00" stop_datetime = "2024-08-10 00:00:00" # PROBLEM SIZE & GEOMETRY geometry.prob_extent = 2500000.0 2500000.0 10000.0 amr.n_cell = 100 100 79 geometry.is_periodic = 0 0 0 # REFINEMENT / REGRIDDING # No erf.refinement_indicators here: the level-1 region comes from the extent of # wrfinput_d02, and its (delayed) start time controls WHEN the level is created. # regrid_int = 1 so the level appears on the first step at which the d02 start # time has been reached. amr.max_level = 1 amr.ref_ratio_vect = 3 3 1 erf.regrid_int = 1 # Do not chop in z-direction amr.refine_whole_domain_dir = 2 # The point of this test: when level 1 is created from wrfinput_d02, read only # its surface fields and interpolate the atmospheric state from level 0. erf.interp_atmos_from_coarse = true # BOUNDARY CONDITIONS xlo.type = "Outflow" xhi.type = "Outflow" ylo.type = "Outflow" yhi.type = "Outflow" zlo.type = "surface_layer" zhi.type = "Slipwall" erf.most.z0 = 0.1 erf.most.zref = 10.0 erf.most.average_policy = 1 erf.most.radius = 0 # NUMERICS erf.dycore_horiz_adv_type = Upwind_5th erf.dycore_vert_adv_type = Upwind_3rd erf.dryscal_horiz_adv_type = WENO5 erf.dryscal_vert_adv_type = WENO5 erf.fixed_dt = 5.0 erf.fixed_mri_dt_ratio = 6 # WRF INITIALIZATION erf.use_real_bcs = true erf.real_width = 5 erf.init_type = "WRFInput" erf.nc_init_file_0 = "wrfinput_d01" erf.nc_init_file_1 = "wrfinput_d02" erf.nc_bdy_file = "wrfbdy_d01" # Distinct cache name: ERF prefers an existing erfbdy cache over reading # nc_bdy_file, and the default name ("erfbdy") is shared by every deck run in # the same directory -- a cache left by a different-domain run breaks the read. erf.erfbdy_file = "erfbdy_wps_ml_interp" erf.avg_grid_faces_to_nodes = false erf.terrain_smoothing = 1 # Required for wrfinput initialization on a level > 0 with terrain_smoothing = 1 erf.amr_terrain_refinement = transform erf.use_wrf_bdy_density = true erf.bdy_moist_nudge_type = 1 erf.bdy_nudge_factor = 10.0 # PHYSICS erf.moisture_model = MoistNoCondensation erf.buoyancy_type = 1 erf.les_type = "Smagorinsky2D" erf.Cs = 0.1 erf.pbl_type = "MYNN25" # LAND SURFACE MODEL # SLM is what makes the surface-only read substantive: it is the model whose # wrfinput_map routes the d02 soil/vegetation fields into lsm_data at level # creation (Noah-MP instead reads its own state through the noahmpio driver). erf.land_surface_model = "SLM" slm.nsoil = 4 slm.soil_dz = 0.1 0.3 0.6 1.0 slm.use_parameter_file = true slm.parameter_file = "NoahmpTable.TBL" slm.veg_dataset = "modis" slm.soil_dataset = "stas" slm.zref = 10.0 erf.terrain_type = StaticFittedMesh erf.implicit_before_substep = true erf.implicit_thermal_diffusion = true erf.implicit_moisture_diffusion = true erf.implicit_momentum_diffusion = true erf.vert_implicit_fac = 1. 1. 0. erf.use_coriolis = true erf.variable_coriolis = true erf.coriolis_3d = true erf.rayleigh_damping_type = FastImplicit erf.rayleigh_damp_W = true erf.rayleigh_zdamp = 5000.0 erf.rayleigh_dampcoef = 0.2 # RADIATION # Required by SLM (see header); rad_freq_in_steps = 5 so RRTMGP also recomputes # at least twice after level 1 exists within the 20 steps. erf.radiation_model = "RRTMGP" erf.rad_freq_in_steps = 5 erf.rad_do_subcol_sampling = true erf.rad_write_fluxes = false erf.rad_t_sfc = 290.0 erf.co2vmr = 0.00036 erf.o3vmr = 3.0e-8 erf.n2ovmr = 3.2e-7 erf.covmr = 1.5e-7 erf.ch4vmr = 1.7e-6 erf.o2vmr = 0.209 erf.n2vmr = 0.7906 erf.rrtmgp_file_path = . # Path to data-files erf.rrtmgp_coeffs_sw = rrtmgp-gas-sw-g112.nc erf.rrtmgp_coeffs_lw = rrtmgp-gas-lw-g128.nc erf.rrtmgp_cloud_optics_sw = rrtmgp-cloud-optics-coeffs-sw.nc erf.rrtmgp_cloud_optics_lw = rrtmgp-cloud-optics-coeffs-lw.nc # DIAGNOSTICS & OUTPUT amr.v = 1 erf.v = 1 erf.sum_interval = 1 erf.check_file = chk erf.check_int = -1 erf.plot_file_1 = plt erf.plot_int_1 = 10 erf.plot_vars_1 = density x_velocity y_velocity z_velocity theta temp qv qc z_phys