Changelog¶
Notable changes to uDALES, newest first. This project uses semantic versioning; released versions are also tagged on GitHub.
Entries under Unreleased are on master but not yet in a tagged release.
Changes that alter the meaning, sign, units or location of an output variable,
or that remove or disable a feature, are listed under Breaking changes so
that they are easy to find when upgrading.
Unreleased¶
Breaking changes¶
- Output files and variables renamed; output modules rewritten. The
statistics and instantaneous outputs are now written by
out_stats.f90(time- and space-averaged statistics),out_instants.f90(fields, slices, probes) andout_write_nc.f90;modstatsdump.f90keeps only the legacymintdumpand the disabledtkedumppaths. Files are written one per x-rank (<name>.<px>.<expnr>.nc, covering the rank's whole y-extent) instead of one per 2-D pencil; xz-plane output is written per y-rank and fully reduced output once.gather_outputs.shwas rewritten for the new layout. File names:
| before | now |
|---|---|
tdump.<px>.<py>.<expnr>.nc |
stats_t.<px>.<expnr>.nc |
xytdump.<expnr>.nc |
stats_xyt.<expnr>.nc |
xydump.<expnr>.nc |
stats_xy.<expnr>.nc |
ytdump.<expnr>.nc |
stats_yt.<px>.<expnr>.nc |
ydump.<expnr>.nc |
stats_y.<px>.<expnr>.nc |
treedump.<px>.<py>.<expnr>.nc |
stats_tree.<px>.<expnr>.nc |
fielddump.<px>.<py>.<expnr>.nc |
ins_field.<px>.<expnr>.nc |
islicedump/jslicedump/kslicedump.<px>.<py>.<expnr>.nc |
ins_islice.<px>, ins_jslice.<py>, ins_kslice.<px>.<expnr>.nc |
Variable names no longer encode the averaging; the file name does, and the
same quantity has the same name in every file: ut/uxyt/uyt/uy →
u; upwpt/upwpxyt → upwp; uwxyt → uw; upuptc → upup;
tketc → tke; thlt → thl; wpthlpt/wthlxyt → wpthlp/wthl;
usgsxyt → usgs; scalars sca1t → s1, sca1psca1pt → s1ps1p,
wpsca1pt → wps1p, sv1sgs → s1sgs; instantaneous sca1 → s1;
slices u_kslice → u. Earlier entries in this changelog refer to the
variables by their former names.
- &OUTPUT namelist. tfielddump is replaced by tinstantdump, the
interval of all instantaneous output (fields, slices and probes), and
tinstantstart sets the start of that schedule; a namelist that still
contains tfielddump fails to read. kslice, islice and jslice are
now lists of nkslice, nislice, njslice planes (several planes per
direction) and slicevars selects the slice variables. tcheck moved from
&NAMCHECKSIM to &OUTPUT. All example and test cases are updated.
- Time-averaged statistics on an absolute schedule. A warm start no
longer shortens an averaging window: the accumulators restart from zero and
the next record is written tstatsdump seconds later. stats_xy and
stats_y are instantaneous spatial averages written every tsample, as
before.
- Fatal output errors abort all ranks (MPI_ABORT) instead of stopping
rank 0 and leaving the others waiting.
- Execute scripts refuse an existing output directory. local_execute.sh,
hpc_execute.sh, archer_execute.sh and ecmwf_execute.sh (and so
ud_run <machine> sim) now exit with an error when $DA_WORKDIR/<expnr>
already exists, instead of copying the inputs and the executable over it and
writing the new run next to the old results. To rerun a case, move or delete
its output directory yourself first. copy_inputs.sh no longer creates the
(empty) output directory of the new case; cases prepared with the previous
version have an empty output directory that must be removed before the first
run.
- SGS flux sign convention. All subgrid-scale fluxes in the statistics
output (
usgs*,vsgs*,wsgs*,thlsgs*,qtsgs*,sv1sgs–sv4sgs,sca1sgs*–sca3sgs*) were previously stored as+K dphi/dn, i.e. minus the physical flux, and were therefore opposite in sign to the resolved fluxes written into the same files with the same units. They are now stored as the flux itself,-K dphi/dn. Any post-processing that compensated for the old convention — by negating the SGS term, or by subtracting rather than adding it when forming a total flux — must be updated. See Output files for the explicit definitions. wsgsis now a stress, not a tendency.wsgs(andwsgsytinytdump) previously held the vertical part of thew-diffusion tendency, inm/s^2, stored at the w-level. It now holds the normal stresstau_33 = -2 K_m dw/dzinm^2/s^2, stored at the cell centre. The NetCDF grid code changed fromt0mttot0ttaccordingly, so the variable's vertical coordinate changed fromzmtozt.ltkedumpis disabled. The TKE-budget path never accumulated its budget terms, sotkedump.<expnr>.ncwas written full of zeros. Settingltkedump = .true.now aborts the run with an explanatory error rather than producing a plausible-looking but meaningless file. Repairing the path is tracked in issue #352.- Masked bottom level in SGS profiles. The w-located xy-averaged profiles
(
wxy*,usgsxy*,vsgsxy*,thlsgsxy*) now report-999.at the bottom levelkbin IBM runs, consistent with every other fully masked level. Previously that level held an unmasked sum over solid points divided by the fluid-point count at the top of the domain. - Units and metadata corrections in the statistics NetCDF headers:
vsgsxytandvpwpxyare nowm^2/s^2(wereK m/s/Km/s);sv1sgs–sv4sgsare nowg/m^2 s(weregm/s);wqtytis nowkg/kg m/sandwsca1yt–wsca3ytare nowkg/m^2 s(all wereK m/s). Placeholderlong_namestrings in the TKE-budget header were replaced with the actual term names.
Fixed¶
- Cell-centre velocities used by the statistics (
wc) are computed correctly, and the statistics flag gating and window resets are consistent after every dump and across restarts. - The chemistry update of
lchemis kept: since the fusion of the scalar update loop thesvm = sv0copy ran beforechem, discarding the NO/NO2/O3 update every step (#427). A regression test covers the path. - The geostrophic pressure gradient is now applied only with
lcoriol = .true.(#410).modstartupaddedom23_gs*vgand-om23_gs*ugto the large-scale pressure gradient whether or not the Coriolis force was on, so a run with nonzeroug/vginlscale.inpandlcoriol = .false.(andlprofforc = .false.) was accelerated at a constantf*|u_g|(about 1.15e-4 s^-1 times|u_g|at the defaultxlat = 52). Such runs change; they no longer get this spurious body force. Runs withlcoriol = .true., withug = vg = 0(the default), or withlprofforc = .true.are bit-identical. - The f2py preprocessing modules run in double precision. The IBM
(
ibm_preproc_f2py) and direct-shortwave (directshortwave_f2py) extension modules were compiled with default 4-byte reals while the solver uses-fdefault-real-8. Geometry, grid coordinates and facet sections were therefore computed with about seven significant digits. Facet sections lying exactly on a cell face could be assigned to either neighbouring cell depending on compiler rounding, small sections near cell faces were lost to the 1e-5 m^2 area threshold, and, more seriously, the first cell edge (xt(1) - dx/2) evaluated in single precision exceeded the 1e-8 bounding-box tolerance, so facets touching thex = 0ory = 0domain boundary were rejected as out of bounds and received no facet sections at all (in the997/988test geometry, 105 ground facets covering 5% of the surface). Both modules are now built with-fdefault-real-8 -fdefault-double-8, their signatures declarereal(kind=8), and the Python callers pass float64 arrays. The flux-point selection inmatchFacetsCellsnow treats candidate scores that agree to within a relative 1e-6 as tied and takes the first, as the MATLAB implementation'smax()does; in double precision, mirror-image candidates (the cells above and below a section on a horizontal cell face) otherwise differ in the last bit and the choice was decided by round-off. Rebuild the preprocessing tools (tools/build_preprocessing.sh <system> preprocessing_tools) after updating. - Preprocessing x/y grids are built by index, like the solver.
udprepbuiltxm,xt,ym,ytwithnp.arangeand a float step, which returnsitot+1points for somexlen/itotpairs (for example 120 cells over 5.5 m) and so put an extra face at the domain top. They now come fromudgrid.horizontal_grid, the same(i-1)*dx,+dx/2construction asmodglobal.f90, as the z-grid already did since #388. - The SGS statistics no longer read uninitialised data at the top level
ke+kh, and all SGS output arrays are zeroed before use. - The 3-D
sv1sgs–sv4sgsoutput intdumpis now masked withIIw, so solid and wall-adjacent faces report-999.instead of an interior-formula value the solver never applied. upwpxy,vpwpxyandwpthlpxyreport-999.at masked levels instead of the product of two sentinels (-999000).- Several latent bugs inside the (disabled) TKE-budget path were repaired so
that it is correct if revived: the mean rate-of-strain was a scalar reused
across the whole domain, the vertical SGS transport term paired the
w-based fluxes with the meanv, a shear-production term was double-counted, and a four-point average varied the wrong index.
Added¶
- Time-averaged statistics on selected planes.
ltislicedump,ltjslicedump,ltkslicedumpwrite the fullstats_tvariable set only on the planesislice(1:nislice),jslice(1:njslice),kslice(1:nkslice)(stats_tislice,stats_tjslice,stats_tkslice), independently ofltdump. - Point probes.
lprobedumpwrites theprobevarsvariables at thenprobegrid points listed inprobe.inp.<expnr>(one header line, theni j kper line) toins_probe.<expnr>.nc;copy_inputs.shcopiesprobe.inp. - Gapped averaging schedule.
tstatsgap > 0writes the time-averaged statistics attstatstart + n*(tstatsdump + tstatsgap), each record the mean of thetstatsdumpseconds preceding it, with no sampling in the gap. The schedule is kept across warm starts. - New output quantities. Air temperature
tha(ltempeq), relative humidityrh(ltempeqandlmoist), hydrostatic absolute pressurepabsand liquid waterqlin the statistics files and, through theta,rh,pa,qllabels offieldvars/slicevars/probevars, in the instantaneous files.fieldvarsalso accepts the divergence of the corrected velocity and its terms (di,ux,vy,wz), the pressure correction and predicted velocities of the last substep (pd,pu,pv,pw) and the Poisson right-hand side and its terms (rs,du,dv,dw), all computed at output time. - Pedestrian-level wind speed.
ws_local, the time-mean horizontal wind speed atreceptor_height(or at each ofreceptor_heights), andws_10at z = 10 m, instats_tand as full xy-planes instats_tkslice. - Water-body facets. Facets with wall types in (-30, -20] are treated as
open water with a fixed anchor temperature
waterT(&ENERGYBALANCE; negative falls back toflrT); see Water bodies. - Namelist input refactor. Namelists are read in
in_readnamelists.f90(before the domain decomposition is set up) and sparse(i, j, k)input files inin_readsparsefiles.f90. A round-trip test mode writes the namelists back fortests/integration/input, which also checks that every namelist variable is broadcast and described indocs/schemas/udales_input_schema.json. New entry points inbin/:ud_run(run or gather a case on any supported machine),ud_nml2json,ud_nml2v3,ud_testenvironment. - Thermal-comfort post-processing (
tools/python/udcomf): one command,tools/ud_run_thermal_comfort.sh <case> [l|f|c] [common|icl|ecmwf] -- --heights ...(orud_run_thermal_comfort.py), takes a finished case fromstats_t(orstats_tkslice) andfacEBto MRT, UTCI, PET and WBGT at the requested receptor heights, optionally merging the outputs of several restarted segments first. Physical and sensor constants live incomfort_defaults.json. Seetools/python/examples/thermal_comfort/. isolarpos(&INPS) selects the solar-position algorithm of the preprocessing and post-processing (1 = built-in NREL SPA port, 2 = pvlib).- Tests reorganised into
tests/integration,tests/regression,tests/systemandtests/unit, driven bytests/test_suites.yml. - Preprocessing on ECMWF HPC2020, and a test suite that survives the
terminal.
tools/write_inputs.shtakes a fourth argument, the system (common,iclorecmwf), and a new start modefthat runs the preprocessing in the foreground and returns its exit code. Withc ecmwfit submits a Slurm job (PREPROC_ACCOUNT,PREPROC_QOS,PREPROC_WALLTIME,PREPROC_MEM), next to the existing PBS job foricl.tests/system/ud_test_preprocess.shaccepts--system ecmwf(or the bare system word): oncommon/iclit now detaches from the terminal and writes its console output tologdir/test_inputs.console.log(--foregroundto opt out); onecmwfit submits the whole suite as one Slurm job. Each case is preprocessed in the foreground, so failures are detected from the exit code. - Facet-size uniformisation in the Python preprocessing. With
lfacetuniform = .true.(namelist&INPS),udprepfirst rebuilds the STL so that facet areas fall within a band around a target area: facets above the band are split and coplanar facets of the same type below it are merged, with the geometry, the creases, the facet types and the mesh conformity preserved. The result is written to<stem>_uniform.stl(plus facet types, a face map and a JSON sidecar),stl_file/types_pathare pointed at it, and the original STL is left untouched. Optionsfacet_target_edge,facet_size_band,facet_allow_split,facet_allow_mergeandfacet_count_max; the default target keeps the facet count about the same. The per-patch work runs in up tonompthreadsworker processes. Also available asudgeom.uniformize_facets(workers=). See Pre-processing. udprepnow refuses an existingfacets.inpwhose facet count does not match the geometry instead of silently reusing it, andSection.save_paramupdates a preprocessing-only variable (such asstl_file) in the namelist block where it already appears instead of appending a new&INPblock.docs/udales-output-files.mdnow documents the SGS flux definitions, their sign convention, and the fact that the SGS statistics carry no surface or wall-model contribution, so the total-stress profile does not close at the wall (issue #353).- New experimental test suite
tests/integration/sgs_statistics(runmode1006) validating the SGS fluxes against a manufactured solution on a stretched vertical grid, against the solver's own diffusion tendencies, and against the sign convention, on a new fixturetests/cases/300.