uDALES preprocessing¶
In order to perform a simulation with uDALES, the input data needs to be processed, which creates a number of input files that will be read by the uDALES simulation.
This can be done from the command line using the shell script write_inputs.sh, which is a wrapper around either the MATLAB script write_inputs.m or the Python script write_inputs.py. For more info about the functions see the Developer's guide. The main files required inside the experiment case directory are
- an appropriately set namoptions.001 (assumming 001 is the case directory name) file,
- an STL file of the building geometry (except for few special cases).
The wrapper also reads config.sh from the example directory when it is present. Use it for overrides such as:
# We assume you are running the following commands from your
# top-level project directory.
export DA_TOOLSDIR=$(pwd)/u-dales/tools # Optional; defaults to the script directory
export DA_EXPDIR=$(pwd)/experiments # Optional; defaults to the parent directory of the case
# Optional overrides for Imperial HPC compute-node preprocessing
export PREPROC_WALLTIME="24:00:00" # Defaults to 24:00:00
export PREPROC_MEM="128gb" # Defaults to 128gb
tools/write_inputs.sh scans namoptions.### for nompthreads and uses it for the preprocessing CPU request. If nompthreads is omitted, the preprocessing default is 8. If nompthreads appears more than once anywhere in the file, the wrapper stops and asks for a single value. The wrapper exports the derived value internally as PREPROC_NCPU for the scheduler request (PBS on Imperial, Slurm on ECMWF) and for the default View3D thread count, unless VIEW3D_NUM_THREADS is explicitly overridden.
When running preprocessing on a compute node with write_inputs.sh ... c <system> (icl submits a PBS job on Imperial HPC, ecmwf a Slurm job on ECMWF HPC2020), the wrapper uses PREPROC_WALLTIME="24:00:00" and PREPROC_MEM="128gb" unless these are set in config.sh or the calling environment. These size the preprocessing job only; they are separate from the solver job variables WALLTIME and MEM used by hpc_execute.sh or ecmwf_execute.sh. PREPROC_MEM must be written as a number followed by lowercase gb, such as 128gb; a unitless value such as 128 is rejected before submitting the job. On ECMWF the job is also sized by PREPROC_ACCOUNT (Slurm account, default spnlthee) and PREPROC_QOS (default nf: a shared node with at most 128 cores and 128 GB, the right queue for a single threaded process). The MATLAB route is not available on ECMWF. Unless VIEW3D_MAX_DENSE_MATRIX_GIB is explicitly set, the default View3D configuration derives the dense-matrix guard from PREPROC_MEM: requests above 16gb leave 16 GiB for overhead, while smaller requests use the requested GiB value. For example, PREPROC_MEM="128gb" gives VIEW3D_MAX_DENSE_MATRIX_GIB=112.
Before running the preprocessing, one must build virtual python environment as uDALES preprocessing setup is gradually moving towards Python; the MATLAB route is deprecated and will be retired from uDALES v3.0 onwards. Run the virtual environment setup script from the repository root as given below. It creates the virtual environment, installs all dependencies, and builds the preprocessing tools (View3D and f2py extension modules). For the MATLAB route, the same setup is still a convenient way to build View3D and the bundled Python helpers used by some preprocessing paths, such as vegetation conversion. For more details on virtual environment set up see the virtual environment README:
# For a local machine
bash tools/python/setup_venv.sh common
# For the Imperial HPC machine
bash tools/python/setup_venv.sh icl
# For the ECMWF Atos HPC2020
bash tools/python/setup_venv.sh ecmwf
Then, to start the pre-processing, run:
The general syntax is write_inputs.sh <-m|-p> <PATH_TO_CASE> [start] [system]. start says where and how the preprocessing runs:
l(default): on the current node, in the background. The wrapper returns at once and the output goes towrite_inputs.<expnr>.login the case directory.f: on the current node, in the foreground. The wrapper blocks, the output goes to the terminal and to the log, and the exit code of the preprocessing is returned. Use this from scripts.c: on a compute node, through the scheduler ofsystem(icl: PBS,ecmwf: Slurm).
system is common (default), icl or ecmwf.
For local ubuntu or mac
# We assume you are running the following commands from your
# top-level project directory.
./u-dales/tools/write_inputs.sh -m experiments/001
# Or run the Python preprocessing route
./u-dales/tools/write_inputs.sh -p experiments/001
# Or run it in the foreground and wait for it
./u-dales/tools/write_inputs.sh -p experiments/001 f
For ICL HPC
# To run preprocessing on HPC login node (not recommended)
./u-dales/tools/write_inputs.sh -m experiments/001 l
# To run preprocessing on HPC compute node (recommended)
# For MATLAB
./u-dales/tools/write_inputs.sh -m experiments/001 c icl
# For Python
./u-dales/tools/write_inputs.sh -p experiments/001 c icl
For ECMWF HPC2020 (Python route only)
# To run preprocessing on a compute node as a Slurm job (recommended;
# login nodes give a session very few cores and end long processes)
./u-dales/tools/write_inputs.sh -p experiments/001 c ecmwf
The job script (pre-job.<expnr> on Imperial, pre-job.<expnr>.slurm on ECMWF) and the scheduler output are written in the case directory. In above example commands, replace 001 with the number of your example.
Note: After editing or creating a namoptions.### file (use an existing template where possible), run write_inputs.sh to generate or update geometry-related input files such as facets.inp and factypes.inp. If your setup requires generating geometry from STL files during pre-processing, set the gen_geom parameter in the namoptions file so the pre-processor will build geometry from the provided STL.
Input files¶
uDALES requires a number of input files, all suffixed by the experiment number, which is omitted in the following documentation. The namoptions.### file contains a list of parameters for uDALES and the pre-processing routines, and the pre-processing is intended to run using solely this file (with some exceptions). The input files are:
prof.inp: initial profiles of flow variables (described in DALES documentation).lscale.inp: large-scale forcings (described in DALES documentation).facets.inp: column of facet types and three columns (x,y,z) of surface normal components (nfcts x 4).Tfacinit.inp: list of initial facet temperatures (nfcts x 1).Tfacinit_layers.inp: initial temperature of every facet layer (nfcts x nfaclyrs); written and read only whenlfacTlyrs = .true..factypes.inp: a description of the properties of different types of facet (described below). This is copied to the experiment directory automatically. Each row describes a wall type, with the first 6 columns being: wall type id, a boolean for whether it is a 'green' facet or not, momentum roughness length, heat roughness length, albedo, and emissivity. Assuming that each facet is composed of 3 layers, the next 3 columns give the thickness of each, the next 3 give the volumetric heat capacity, the next 3 give the heat conductivity, and the final 4 give the thermal diffusivity at each interface between the layers.scalar.inp: if using scalars, the initial scalar profiles.timedepnudge.inp: if using time-dependent nudging (described in DALES documentation).timedepsurf.inp: if using time-dependent surface fluxes (described in DALES documentation).
With the IBM, the following additional files are required:
solid_u.txt: Indices of solid points on u-grid (nsolpts_u x 3).solid_v.txt: Indices of solid points on v-grid (nsolpts_v x 3).solid_w.txt: Indices of solid points on w-grid (nsolpts_w x 3).solid_c.txt: Indices of solid points on c-grid (nsolpts_c x 3).fluid_boundary_u.txt: Indices of fluid boundary points on u-grid (nbndpts_u x 3).fluid_boundary_v.txt: Indices of fluid boundary points on v-grid (nbndpts_v x 3).fluid_boundary_w.txt: Indices of fluid boundary points on w-grid (nbndpts_w x 3).fluid_boundary_c.txt: Indices of fluid boundary points on c-grid (nbndpts_c x 3).facet_sections_u.txt: Indices of facet sections on u-grid (nfctsecs_u x 3).facet_sections_v.txt: Indices of facet sections on v-grid (nfctsecs_v x 3).facet_sections_w.txt: Indices of facet sections on w-grid (nfctsecs_w x 3).facet_sections_c.txt: Indices of facet sections on c-grid (nfctsecs_c x 3).
With the SEB, the following additional files are required:
facetarea.inp: list of areas of facets (nfcts x 1).vf.nc.inporvfsparse.inp: view factors stored in netcdf or sparse format respectively.svf.inp: list of sky view factors of facets (nfcts x 1).netsw.inp: list of net shortwave radiation on facets (nfcts x 1). If using time-dependent radiation on facets:timedepsw.inp: shortwave - row of times (1 x ntimedepsw) followed by array of values (nfcts x ntimedepsw).timedeplw.inp: longwave - columns for times and values (ntimedeplw x 2). This currently must be generated by a separate user-defined script.
Python preprocessing and the legacy MATLAB route treat the urban surface mesh
as an open radiative domain:
surface-to-surface view factors plus each facet's sky view factor must sum to one.
If numerical or geometric edge cases make a View3D row materially exceed one,
outside the validation tolerance, the default
repair policy reduces reciprocal interchange areas conservatively and assigns
the remaining fraction to sky. The correction preserves non-negativity,
reciprocity, and sparse storage; it never proceeds with a materially overfull
matrix unchanged.
A warning records the correction; Python additionally writes a
view3d_repair.###.json audit report. Automatic repair stops instead of masking
a gross geometry problem when the maximum row sum exceeds 2, materially
overfull facets exceed 5% of total facet area, the correction removes more than
1% of total surface exchange area, or the reciprocity L1 error exceeds 1%. Set
UDALES_VIEW_FACTOR_POLICY=strict before write_inputs.sh -p to reject any
material row-closure violation rather than repair it.
Facet-size uniformisation¶
uDALES treats every STL triangle as one facet with a single surface temperature and a single set of fluxes. STL files from city models mix triangles of very different sizes: a few huge ground or roof triangles next to clusters of sliver triangles left behind by CAD operations. Both ends are bad for the surface energy balance. A huge facet spreads one temperature over a whole wall, and a sliver gets all-or-nothing sun and hardly any view-factor neighbours.
With lfacetuniform = .true. under &INPS, the Python preprocessing first
rebuilds the mesh so that facet areas fall within a band around a target area,
writes the result as a new STL (and a new facet-type file) next to the original,
and runs every later step on the new geometry. The original files are never
modified.
Inputs¶
The step is driven entirely from namoptions.<expnr>. Only the switch is
required; the geometry variables are the same ones used without uniformisation:
&INPS
stl_file = 'geom.stl' ! source STL, relative to the case directory
read_types = .true. ! optional: per-facet types ...
types_path = 'geom_types.txt' ! ... one integer per face, in face order
lfacetuniform = .true. ! switch the step on
facet_target_edge = 0.0 ! optional tuning, see below
facet_size_band = 4.0
facet_allow_split = .true.
facet_allow_merge = .true.
facet_count_max = 0
/
| Variable | Default | Meaning |
|---|---|---|
lfacetuniform |
.false. |
Switch. Everything else only matters when this is true. |
facet_target_edge |
0.0 |
Target facet edge length in metres; the target area is that of the equilateral triangle with this edge. 0 keeps the facet count about the same by taking the mean facet area of the input as the target. Set it explicitly when the whole mesh is uniformly too coarse or too fine, which the automatic target cannot correct. |
facet_size_band |
4.0 |
Facets with an area between target/band and target×band are accepted as they are. A larger band touches fewer facets and adds fewer new ones. |
facet_allow_split |
.true. |
Allow facets above the band to be split. |
facet_allow_merge |
.true. |
Allow facets below the band to be merged with coplanar neighbours of the same type. |
facet_count_max |
0 |
Abort when the result would have more facets than this. 0 means four times the input facet count. The view-factor and shortwave steps scale with the square of the facet count, so this guards against an unintentionally fine target. |
When read_types is true the facet types are read from types_path and carried
over to the new faces; merging never crosses a type boundary. Without types, all
faces are treated as one type.
What the step does¶
- Faces are grouped into coplanar, edge-connected patches of the same facet type.
- A patch that contains faces below the band is retriangulated as a whole, which merges the tiny faces into their coplanar neighbours.
- Faces above the band are split.
- Faces inside the band are copied unchanged, so a mesh that is already uniform passes through untouched and running the step twice changes nothing.
- The geometry itself is preserved: no vertex moves, creases and type boundaries stay where they are, the mesh stays conforming (no T-junctions) and the output has no unused vertices.
The step prints a summary: facet counts, area percentiles before and after, the number of faces merged and split, and the number of faces that remain outside the band.
The per-patch work (checking and retriangulating the patches) runs in up to
nompthreads worker processes; fewer are started when there are not enough
patches to keep them busy, and the result does not depend on that number.
Outputs and what happens next¶
The outputs are written next to the input STL and never overwrite anything:
| File | Content |
|---|---|
<stem>_uniform.stl |
the uniformised geometry |
<types stem>_uniform<ext> |
facet types of the new faces (only when read_types is true) |
<stem>_uniform_facemap.txt |
1-based index of the input face each new face comes from, for carrying other per-facet data across |
<stem>_uniform.json |
source file checksums, settings used and the summary |
stl_file and types_path in namoptions are then rewritten in place to point
at the new files, and the geometry is reloaded. From this point on, the
preprocessing (IBM, facets.inp, view factors, shortwave, SEB) and
post-processing with udbase use only the uniform geometry; the original STL
and types file are not read again.
Rerunning and regenerating¶
Rerunning the preprocessing with the rewritten namoptions is a no-op for this
step: stl_file already names a uniformised geometry made with the current
settings, and nothing is recomputed.
Per-facet input files generated earlier from the original STL are stale. In
particular an existing facets.inp.<expnr> is refused because its facet count
no longer matches the geometry, and other steps that do not overwrite their
outputs (for example Tfacinit.inp, the View3D view factors) keep the old
files. Delete those files before enabling uniformisation on an existing case so
they are regenerated. factypes.inp is a material table, not per facet, and
stays valid.
To regenerate with different settings, set stl_file (and types_path) back to
the source files and delete the _uniform outputs. The step refuses to
overwrite an existing <stem>_uniform.stl unless its sidecar matches the
current source and settings, and refuses to continue when stl_file names a
uniformised geometry made with settings different from the current ones.
Limits¶
Merging never crosses a crease or a type boundary, and a facet narrower than the target (a 1 m wide wall piece, say) stays small whatever the settings, because its edges are real geometry; the summary reports how many such faces remain. An edge shared with a face that is kept as it is cannot be split, so a split facet next to a kept one may stay larger than the target along that edge.
The same operation is available in Python as udgeom.uniformize_facets(mesh,
...) or UDGeom.uniformize_facets(...); workers= sets the maximum number of
worker processes there (default 1).
Developer's guide¶
The u-dales/tools/preprocessing.m matlab class contains the functionality for preprocessing. The constructor reads the parameters in namoptions and stores them as member variables, and defines default variables for those not specified. These are then used in the member functions. In these member functions, additional data structures are also stored as member variables, including those used repeatedly and those eventually written to files, so that one can easily view and manipulate them using the matlab IDE.
The u-dales/tools/write_inputs.m matlab script calls member functions of preprocessing.m in order to write the basic input files (those not relating to the IBM or SEB), followed by routines located in the IBM and SEB directories within the uDALES tools directory. It is intended to be as short and readable as possible, with the goal being that a developer can edit for a particular purpose. It will work simply as a normal script using the matlab IDE, but when doing this, ensure that DA_EXPDIR = <top level directory>/experiments/ and DA_TOOLSDIR = <top level directory>/u-dales/tools/ are defined.
The u-dales/tools/write_inputs.sh shell script acts as a wrapper around either write_inputs.m or write_inputs.py. Before running the selected route, it will run the shell script config.sh located in the experiment directory when that file is present. It defaults DA_TOOLSDIR to the directory containing write_inputs.sh and DA_EXPDIR to the parent directory of the case directory. It scans namoptions.### for nompthreads, requires at most one occurrence, and exports the derived preprocessing CPU count internally as PREPROC_NCPU. The first argument must be either -m for MATLAB or -p for Python. It is intended to be run from the top level project directory.
Some parameters used by uDALES are used in the pre-processing. They are the following:
&RUN¶
runtime: Length of simulation period (in seconds). This is used with time-varying solar position (see below).
&DOMAIN¶
itot: number of cells in x-direction. Default: 64.jtot: number of cells in y-direction. Default: 64.ktot: number of cells in z-direction. Default: 96.xlen: domain size in x-direction (metres).ylen: domain size in y-direction (metres).
&WALLS¶
This section describes the parameters used by the IBM.
iwallmom: Momentum flux boundary condition - 1:zero flux, 2: non-neutral wall function, 3: neutral wall function.iwalltemp: Temperature flux boundary condition - 1: constant flux, 2: wall function. If either of these are true, thenTfacinit.inp.xxxis written using the value offacT.
The following parameters are generated by the pre-processing routines. The current MATLAB and Python preprocessing routes write the generated values back to namoptions.### when they are generated, so check the updated namelist after preprocessing completes.
nfcts: number of facets. If usingwrite_inputs.sh(see below), this will write its value into namoptions. Equal to the number of (non-header) lines infacets.inp.xxx.nsolpts_u: number of solid points on the u-grid. Equal to the number of (non-header) lines insolid_u.txt.nsolpts_v: number of solid points on the v-grid. Equal to the number of (non-header) lines insolid_v.txt.nsolpts_w: number of solid points on the w-grid. Equal to the number of (non-header) lines insolid_w.txt.nsolpts_c: number of solid points on the c-grid. Equal to the number of (non-header) lines insolid_c.txt.nbndpts_u: number of fluid boundary points on the u-grid. Equal to the number of (non-header) lines influid_boundary_u.txt.nbndpts_v: number of fluid boundary points on the v-grid. Equal to the number of (non-header) lines influid_boundary_v.txt.nbndpts_w: number of fluid boundary points on the w-grid. Equal to the number of (non-header) lines influid_boundary_w.txt.nbndpts_c: number of fluid boundary points on the c-grid. Equal to the number of (non-header) lines influid_boundary_c.txt.nfctsecs_u: number of facet sections on the u-grid. Equal to the number of (non-header) lines infacet_sections_u.txt.nfctsecs_v: number of facet sections on the v-grid. Equal to the number of (non-header) lines infacet_sections_v.txt.nfctsecs_w: number of facet sections on the w-grid. Equal to the number of (non-header) lines infacet_sections_w.txt.nfctsecs_c: number of facet sections on the c-grid. Equal to the number of (non-header) lines infacet_sections_c.txt.
&PHYSICS¶
luoutflowr: switch that determines whether u-velocity is corrected to get a fixed outflow rate Default: false.lvoutflowr: switch that determines whether v-velocity is corrected to get a fixed outflow rate. Default: false.luvolflowr: switch that determines whether u-velocity is corrected to get a fixed volume flow rate. Default: false.lvvolflowr: switch that determines whether v-velocity is corrected to get a fixed volume flow rate. Default: false.lcoriol: switch for the Coriolis force and the balancing geostrophic pressure gradient fromug/vginlscale.inp. Without itug/vgexert no force (they only serve as the target wind forlprofforcandigrw_damp = 2). Default: false.lprofforc: switch for nudging flow to a profile. Default: false.
Note only one forcing should be specified, i.e. one of luoutflowr/lvoutflowr,luvolflowr/lvvolflowr, lprofforc, or lcoriol.
&ENERGYBALANCE¶
lEB: switch for energy balance. Default: false.lvfsparse: switch for view factors in sparse (text) format.nnz: number of non-zero view factors when using sparse format. This is written tonamoptions.###by preprocessing when sparse view factors are generated.dtEB: surface energy balance timestep.
&CHEMISTRY¶
lchem: switch for chemistry.
&SCALARS¶
nsv: number of scalar variables. Default: 0. Note thatnsv > 0is not yet supported in the pre-processing.
&INPS¶
The parameters under the &INPS header are used only in the pre-processing.
zsize: size of domain in z direction (metres).lzstretch: switch for stretched z grid. Default: false.lstretchexp: switch for z grid stretched using exp function. Default: false.lstretchtanh: switch for z grid stretched using tanh function. Default: false.lstretch2tanh: switch for z grid stretched using 2tanh function. Default: false.stretchconst: stretch constant. Default: 0.01.nompthreads: number of OpenMP threads used by preprocessing routines that support OpenMP, including IBM preprocessing. Default: 8.write_inputs.shalso uses this value for the preprocessing CPU request and requires that it appears at most once innamoptions.###.u0: initial u-velocity (m/s). Also applied as geostrophic term where applicable. Default: 0.v0: initial v-velocity (m/s). Also applied as geostrophic term where applicable. Default: 0.dpdx: pressure gradient in x direction (Pa/m). Default: 0.dpdy: pressure gradient in y direction (Pa/m). Default: 0.thl0: temperature at z = 0. Default: 288.qt0: specific humidity at z = 0. Default: 0.lapse: lapse rate (K/m). Default: 0.w_s: subsidence. Default: 0.dqtdxls: large-scale advective tendency of specific humidity in x direction (kg/kg/s). Default: 0.dqtdyls: large-scale advective tendency of specific humidity in y direction (kg/kg/s). Default: 0.dqtdtls: large-scale advective tendency of specific humidity in time (kg/kg/s). Default: 0.tke: initial turbulence kinetic energy (m2/s2). Default: 0.R: radiative forcing (W/m^2). Default: 0.NOb: initial concentration of NO. Default: 0.NO2b: initial concentration of NO2b. Default: 0.O3b: initial concentration of O3b. Default: 0.
The following parameters are related to the immersed boundary method.
stl_file: Name of STL file defining the geometry.read_types: Switch for reading facet types from file. Default: false (all facets are set to type 1).types_path: Name of types file.lfacetuniform: Python preprocessing only. Switch for making the STL facet sizes uniform before the geometry is used (see Facet-size uniformisation). Default: false.facet_target_edge: target facet edge length (m) forlfacetuniform; 0 keeps the facet count about the same. Default: 0.facet_size_band: facets with an area within a factorfacet_size_bandof the target area are accepted as they are. Default: 4.facet_allow_split,facet_allow_merge: allow splitting facets above the band / merging coplanar facets of the same type below it. Default: true, true.facet_count_max: abort when uniformisation would produce more facets than this; 0 means four times the input facet count. Default: 0.facT: ifiwallmom = 2oriwalltemp = 2then (constant) facet temperature, or iflEB = .true.then initial facet temperature. Default: 288.isolid_bound: Option for classification of solid/fluid points, including boundary points. 1: In-house Fortran routine (default, fast), 2: equivalent MATLAB routine (useful for debugging), 3: inpolyhedron (MATLAB; provided for when option 1 & 2 are not producing expected results): https://www.mathworks.com/matlabcentral/fileexchange/37856-inpolyhedron-are-points-inside-a-triangulated-volume.ifacsec: Option for facet section calculation. 1: Fortran (default, fast), 2: MATLAB (useful for debugging).
If using the energy balance, the following parameters can also be specified.
ishortwave: Option for shortwave radiation calculation. The MATLAB preprocessing default is1; the Python preprocessing default is3.isolar: Option for solar radiation (see below for futher detail). 1: custom (default), 2: from latitude & longitude, 3: from weather file.view3d_out: Output format for View3D: 0: text, 1: binary, 2: sparse (text). The MATLAB preprocessing default is0; the Python preprocessing default is2.maxD: Maximum distance to check view factors, otherwise they are zero. Default: Inf.xazimuth: the azimuthal angle of the x-axis (with respect to North). Default : 90 degrees, i.e. East.
ishortwave values are interpreted as follows during preprocessing:
| Value | MATLAB preprocessing | Python preprocessing |
|---|---|---|
1 |
Standalone Fortran scanline rasterization (no vegetation). | f2py scanline rasterization wrapper (same scanline algorithm, no vegetation). |
2 |
MATLAB scanline debug implementation (slow; no vegetation). | Unsupported; raises an error because this implementation is MATLAB-only. |
3 |
Unsupported; raises an error because this is Python-only. | facsec method, using ray casting with solid mask and facet-section reconstruction. |
4 |
Unsupported; raises an error because this is Python-only. | moller method, using Moller-Trumbore triangle hits. |
The explicit Python API backend method="scanline_legacy" remains available as a reference/parity implementation, but it is not a normal documented namelist choice.
If isolar = 1, then the solar radiation is determined by:
solarazimuth: solar azimuth (degrees). Default: 135. (solaz in uDALES v1).solarzenith: solar zenith (degrees). Default: 28.4066. (Z in uDALES v1).I: direct normal irradiance (DNI) (W/m^2). Default: 800.Dsky: diffuse sky irradiance (W/m^2). Default: 418.8041. (Dsk in uDALES v1).
If isolar = 2, then the solar position is calculated with the NREL Solar Position Algorithm (SPA; Reda and Andreas, 2004, Solar Energy 76, 577-589), ported from the MATLAB implementation in tools/SEB/SPA, and I and Dsky are determined by the ASHRAE clear-sky model. Setting isolarpos = 2 uses pvlib.solarposition.get_solarposition instead of the SPA port; the thermal-comfort postprocessing reads the same option, so both stages always use one algorithm. The spacetime location is specified by:
year, e.g. 2023.month, where e.g. 6 corresponds to June.day, e.g. 21.hour, where e.g. 0 corresponds to midnight and 23 corresponds to 11pm. Default: 6.minute. Default: 0.second. Default: 0.longitude. Default: -0.13.latitude. Default: 51.5.timezone. Default: 0.elevation. Default: 0.
If isolar = 3, then the parameters are specified in a file containing weather data for a given year.
weatherfname: file name.monthdayhour. Default: 0.
The solar parameters can also be varied in time using the ltimedepsw switch. This occurs on a timescale dtSP, which is equal to dtEB by default.
Shortwave preprocessing also saves shortwave_forcing.<expnr>.nc in the case directory. Its time coordinate is seconds since simulation_start; dni is direct normal irradiance and dsky is diffuse horizontal sky irradiance, both in W/m^2. The file also records solar zenith and the local azimuth used by the facet calculation. The HARMONIE ssrd converter includes ghi (global horizontal irradiance); its dni and dsky are derived from ghi with the Erbs split, not separate native HARMONIE fields. The archive stores atmospheric inputs before shading and facet reflections and is for postprocessing, not an additional uDALES solver input.