OpenSWMM Engine  6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
Loading...
Searching...
No Matches
ClimateFile.hpp File Reference

Multi-format climate file reader for temperature, evaporation, wind. More...

#include <string>
#include <cstdio>
#include <cmath>
Include dependency graph for ClimateFile.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  openswmm::climate::DailyClimateRecord
 
class  openswmm::climate::ClimateFileReader
 

Namespaces

namespace  openswmm
 
namespace  openswmm::climate
 

Enumerations

enum class  openswmm::climate::ClimateFileFormat {
  openswmm::climate::UNKNOWN ,
  openswmm::climate::USER_PREPARED ,
  openswmm::climate::GHCND ,
  openswmm::climate::TD3200 ,
  openswmm::climate::DLY0204
}
 
enum  openswmm::climate::ClimateVar {
  openswmm::climate::TMIN = 0 ,
  openswmm::climate::TMAX = 1 ,
  openswmm::climate::EVAP = 2 ,
  openswmm::climate::WIND = 3
}
 Climate variable indices (matching legacy ClimateVarType) More...
 
enum  openswmm::climate::WindFieldType {
  openswmm::climate::WDMV = 0 ,
  openswmm::climate::AWND = 1
}
 Wind field type in GHCND. More...
 
enum  openswmm::climate::TempUnits {
  openswmm::climate::DEG_C10 = 0 ,
  openswmm::climate::DEG_C = 1 ,
  openswmm::climate::DEG_F = 2
}
 Temperature unit encoding in GHCND. More...
 

Detailed Description

Multi-format climate file reader for temperature, evaporation, wind.

Supports four climate file formats:

  • USER_PREPARED: SWMM's own whitespace-delimited format
  • GHCND: NCDC Global Historical Climatology Network Daily
  • TD3200: NCDC TD3200 (NWS cooperative observer)
  • DLY0204: Canadian DLY02/DLY04 fixed-format

The reader buffers one month at a time (matching legacy FileData[4][32]). Within a month, lookups are O(1) array access. Month transitions trigger a sequential file read of the next month's data.

Note
Legacy reference: src/legacy/engine/climate.c
Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License\n MIT License