16#include "BESInternalError.h"
18#define SSC_LAT_NAME "Latitude"
19#define SSC_LON_NAME "Longitude"
22#define SSC_INDEX_NAME "STARE_index"
23#define SSC_COVER_NAME "STARE_cover"
24#define SSC_LONG_NAME "long_name"
25#define SSC_INDEX_LONG_NAME "SpatioTemporal Adaptive Resolution Encoding (STARE) index"
26#define SSC_COVER_LONG_NAME "SpatioTemporal Adaptive Resolution Encoding (STARE) cover"
27#define SSC_LAT_LONG_NAME "latitude"
28#define SSC_LON_LONG_NAME "longitude"
29#define SSC_UNITS "units"
30#define SSC_LAT_UNITS "degrees_north"
31#define SSC_LON_UNITS "degrees_east"
32#define SSC_INDEX_VAR_ATT_NAME "variables"
33#define SSC_NUM_GRING 4
34#define SSC_MOD05 "mod05"
35#define SSC_TITLE_NAME "title"
36#define SSC_TITLE "SpatioTemporal Adaptive Resolution Encoding (STARE) sidecar file"
37#define SSC_MAX_NAME 256
43#define SSC_NOT_SIDECAR (-1001)
44#define MAX_NUM_INDEX 10
54 std::string d_data_file_name;
56 std::vector<std::string> d_stare_index_name;
57 std::vector<std::string> stare_cover_name;
58 std::vector<std::string> d_variables;
59 std::vector<size_t> d_size_i, d_size_j;
60 std::vector<int> d_stare_varid;
87 GeoFile() : d_ncid(-1), d_num_index(0) {};
93 explicit GeoFile(
const std::string &data_file_name) : d_ncid(-1), d_num_index(0), d_data_file_name(data_file_name) {
98 +
" - " + nc_strerror(ret), __FILE__, __LINE__);
105 void get_stare_indices(
const std::string &var_name, std::vector<STARE_ArrayIndexSpatialValue> &values);
107 size_t get_variable_rows(std::string variable_name)
const;
108 size_t get_variable_cols(std::string variable_name)
const;
exception thrown if internal error encountered
int read_sidecar_file(const std::string &file_name)
Read a sidecar file.
std::string sidecar_filename(const std::string &file_name) const
std::string sanitize_pathname(string path) const
Strip away path info. Use in error messages.
void close_sidecar_file()
void get_stare_indices(const std::string &var_name, std::vector< STARE_ArrayIndexSpatialValue > &values)
GeoFile(const std::string &data_file_name)
Open and read the sidecar file for a given data file.