Native NetCDF climate forcing in SWAT+ 62: implementation, numerical equivalence, and input performance
Abstract. Large-scale hydrological models need climate forcing at thousands of locations. The Soil and Water Assessment Tool Plus (SWAT+) stores measured weather as separate text files for each station and variable, so file counts, storage and initialisation time grow with each station. Existing NetCDF tools for SWAT+ prepare data outside the model and still write these text files. Reading one compressed dataset inside the model would remove this burden without changing how SWAT+ simulates hydrology. We developed a native NetCDF-4 pathway and a converter for existing station files, and tested the pathway's effect on model results, storage and input time. The reader runs at initialisation and fills the existing climate arrays, so the daily process code is unchanged; one entry in file.cio selects it, and existing text-input projects run as before. Paired runs of an uncalibrated Zambezi River basin model with 1,148 stations over 1980–1985 produced identical output files, and all 15,098,496 daily forcing values matched at 32-bit precision. At 700 stations, the NetCDF inputs needed 83.84 % less storage (235.6 MB against 1,457.6 MB). In the fixed-domain, warm-cache benchmark, process time through completion of climate loading was 5.8 s for NetCDF and 53.6 s for text; text was faster only at 5 stations. Each test used one compiler and one machine; the reader expects the converter's schema and loads the prepared domain into memory. Because the saving recurs in every run, calibration, sensitivity analysis and ensemble studies of regional to global SWAT+ models gain most, and each project's climate forcing becomes one self-describing file that is simpler to share, archive and reproduce.