Visualization¶
Core¶
samudra.viz.core
¶
Viz(output_path, dataset_name, runs, prepared_groundtruth, observations=None, data_root=None)
¶
Generates maps, time series, and probability density plots from evaluation outputs.
Source code in src/samudra/viz/core.py
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | |
basin_masks
cached
property
¶
Basin masks aligned onto the plotting grid, built on first use.
step_create_ohc_salinity_slopes_table()
¶
Create a CSV table with OHC and salinity slopes.
Source code in src/samudra/viz/core.py
step_obs_rmse_maps()
¶
Per-cell RMSE maps for velocity, EKE, SST and both OHC layers.
Source code in src/samudra/viz/core.py
step_obs_annual_rmse()
¶
Per-year totals behind each headline score, with its interval.
Source code in src/samudra/viz/core.py
step_obs_variance_maps()
¶
Residual-anomaly variance maps for SST and upper-700 m OHC.
Source code in src/samudra/viz/core.py
step_obs_timeseries()
¶
Global-mean SST, EKE and OHC series, with trends and residuals.
Source code in src/samudra/viz/core.py
step_obs_spectra()
¶
Spatial and temporal spectra, and their interannual bands.
Source code in src/samudra/viz/core.py
isnan(x)
¶
preserve_2d_coords(data)
¶
Rename y/x to lat/lon, keeping any true 2-D geography as lat_2d/lon_2d.
Viz works internally on axes named "lat"/"lon" that are really the y/x cell indices.
TODO: we should just use y/x instead of the deceptive names.
Source code in src/samudra/viz/core.py
process_mask(data, mask, grid_type='gaussian')
¶
Align a basin mask onto the plotting grid.
The mask arrives on its own lat/lon axes and has to end up on the data's y/x axes. Relabeling it by position is only defensible when the two grids are the same rectilinear grid; on a curvilinear grid identical shapes do not imply identical geography, so a positional relabel can silently put the Atlantic where the Pacific is. We check the shape either way, and check the coordinates too when we cannot rely on rectilinearity.