29#include "mal_abm_fast/config.hpp"
217inline constexpr const char*
STATE_BAND_NAMES[2] = {
"adult_patch_count",
"adult_cell_count"};
259 std::string
crs =
"EPSG:4326";
363inline constexpr double kPi = 3.14159265358979323846;
366 const double centroid_lat_rad = ((
north +
south) * 0.5) * (
kPi / 180.0);
368 const double cells_d = width_m /
static_cast<double>(
resolution_m);
369 int32_t cells =
static_cast<int32_t
>(std::ceil(cells_d));
370 if (cells < 1) cells = 1;
double NODATA_SENTINEL()
Definition wire.hpp:98
int HOST_SEEKING_STARVATION_DAYS()
Definition wire.hpp:65
double kEarthRadiusM()
Definition wire.hpp:101
constexpr const char * STATE_BAND_NAMES[2]
Definition wire.hpp:217
constexpr int STATE_BAND_SUITABILITY
Definition wire.hpp:214
double ADULT_DAILY_MORT_BASAL()
Definition wire.hpp:82
constexpr int STATE_BAND_DENSITY
Definition wire.hpp:211
double WIND_FLIGHT_SPEED_MS()
Definition wire.hpp:61
double EIP_THRESHOLD_GD()
Definition wire.hpp:40
double kMetresPerDegLat()
Definition wire.hpp:104
double ADULT_MORT_CAP()
Definition wire.hpp:91
double ADULT_MORT_FLOOR()
Definition wire.hpp:94
double WIND_SURVIVAL()
Definition wire.hpp:58
const ModelConfig & load_config()
std::string CONTRACT_VERSION()
Definition wire.hpp:107
constexpr const char * GENERATOR_VERSION
Definition wire.hpp:230
double LARVA_BH_ALPHA()
Definition wire.hpp:78
double OVIPOSITION_SCALE_M()
Definition wire.hpp:68
double ADULT_SIGMA()
Definition wire.hpp:88
constexpr double kPi
Definition wire.hpp:363
double ADULT_DISPERSE_SIGMA_M()
Definition wire.hpp:46
double WIND_FLIGHT_HOURS()
Definition wire.hpp:55
double OVIPOSITION_SEEKING_TIMEOUT_DAYS()
Definition wire.hpp:72
double ADULT_DISPERSE_MAX_M()
Definition wire.hpp:49
double LARVA_BH_S0()
Definition wire.hpp:75
double WIND_MIGRATION_PROB()
Definition wire.hpp:52
double EIP_BASE_C()
Definition wire.hpp:36
double ADULT_DISPERSE_PROB()
Definition wire.hpp:43
double ADULT_OPT_C()
Definition wire.hpp:85
double west
Western bbox edge, EPSG:4326 degrees.
Definition wire.hpp:251
std::string crs
CRS identifier of the bbox and the grids.
Definition wire.hpp:259
double north
Northern bbox edge, EPSG:4326 degrees.
Definition wire.hpp:257
double east
Eastern bbox edge, EPSG:4326 degrees.
Definition wire.hpp:255
int32_t cells_per_side() const noexcept
Definition wire.hpp:365
int32_t resolution_m
Ground size of one grid cell, in metres (default from ingest.cell_size_hint_m).
Definition wire.hpp:263
std::string scale
matches Scale.REGIONAL.value
Definition wire.hpp:265
double south
Southern bbox edge, EPSG:4326 degrees.
Definition wire.hpp:253
std::string slug
Short AOI name used in output file naming.
Definition wire.hpp:261
std::array< double, 4 > bbox() const noexcept
Bbox as (W, S, E, N) for GDAL/rasterio interop.
Definition wire.hpp:272
double sigma_c
Standard deviation (°C) of the survival Gaussian (adults.sigma_c).
Definition config.hpp:277
double mort_cap
Definition config.hpp:280
double mort_floor
Definition config.hpp:283
double opt_c
Definition config.hpp:275
double daily_mort_basal
Definition config.hpp:272
double larva_bh_s0
Definition config.hpp:508
double larva_bh_alpha
Definition config.hpp:512
std::string cogs_state
Definition config.hpp:52
std::vector< float > data
Row-major float32 adult counts, h * w entries (band 1).
Definition wire.hpp:323
int32_t w
Number of grid columns.
Definition wire.hpp:327
int32_t h
Number of grid rows.
Definition wire.hpp:325
double adult_sigma_m
Definition config.hpp:414
double adult_max_m
Definition config.hpp:417
double adult_prob_day
Definition config.hpp:411
double wind_survival
Definition config.hpp:425
double wind_migration_prob
Definition config.hpp:420
double wind_self_speed_ms
Definition config.hpp:428
double wind_flight_hours
Duration (h) of the wind-driven flight (dispersal.wind_flight_hours).
Definition config.hpp:422
double base_c
Definition config.hpp:291
double threshold_gd
Definition config.hpp:294
double earth_radius_m
Definition config.hpp:199
double metres_per_deg_lat
Definition config.hpp:203
int dynamics
0 = persistent offer, 1 = pluvial offer
Definition wire.hpp:315
int32_t col
Grid column index of the patch cell.
Definition wire.hpp:311
double lon
EPSG:4326 deg.
Definition wire.hpp:313
float potential
H_total in [0, 1].
Definition wire.hpp:312
double lat
EPSG:4326 deg.
Definition wire.hpp:314
int64_t patch_id
Runtime-assigned row-major index of the patch.
Definition wire.hpp:307
int32_t row
Grid row index of the patch cell.
Definition wire.hpp:309
int starvation_days
Definition config.hpp:453
double cell_size_hint_m
Definition config.hpp:232
double nodata_sentinel
Definition config.hpp:215
AquaticStagesCfg aquatic_stages
Definition config.hpp:583
AdultsCfg adults
The adults: section — the adult survival model.
Definition config.hpp:570
EipCfg eip
The eip: section — the degree-day incubation model.
Definition config.hpp:572
IngestCfg ingest
The ingest: section — input-side constants and thresholds.
Definition config.hpp:568
DispersalCfg dispersal
The dispersal: section — adult movement and the night window.
Definition config.hpp:576
HostSeekingCfg host_seeking
The host_seeking: section — host-seeking behaviour.
Definition config.hpp:578
OvipositionCfg oviposition
The oviposition: section — the breeding-site search.
Definition config.hpp:580
ContractsCfg contracts
The contracts: section — the frozen input/output contract versions.
Definition config.hpp:544
GeodesyCfg geodesy
Definition config.hpp:566
double scale_m
Definition config.hpp:482
int timeout_days
Definition config.hpp:494
int64_t patch_id
Identifier of the habitat patch this state refers to.
Definition wire.hpp:280
float temp_d
Definition wire.hpp:288
int32_t col
Grid column index of the patch cell.
Definition wire.hpp:284
bool activated
True when today's habitat availability reaches the activation threshold.
Definition wire.hpp:286
float habitat_avail
Definition wire.hpp:292
float rain_d
mm, today's daily rainfall at the cell
Definition wire.hpp:287
float salinity_ppt
env water salinity (psu); 0 = freshwater
Definition wire.hpp:295
int32_t row
Grid row index of the patch cell.
Definition wire.hpp:282
int habitat_dry_days
consecutive days below habitat.activation_min_engine
Definition wire.hpp:293
float k_habitat
daily Beverton-Holt capacity (absolute count)
Definition wire.hpp:294
float larva_bh_alpha
Definition wire.hpp:168
float disperse_max_m
Clipping radius of the dispersal step, in metres (overrides dispersal.adult_max_m).
Definition wire.hpp:165
float disperse_sigma_m
Gaussian sigma of the dispersal step, in metres (overrides dispersal.adult_sigma_m).
Definition wire.hpp:163
float disperse_prob
Daily adult dispersal probability, in 1/day (overrides dispersal.adult_prob_day).
Definition wire.hpp:161
std::vector< float > data
Row-major float32 adult counts, h * w entries (band 2).
Definition wire.hpp:335
int32_t w
Number of grid columns.
Definition wire.hpp:339
int32_t h
Number of grid rows.
Definition wire.hpp:337