17 #include "../Types/Type.h" 
   18 #include "../Variables/Variable.h" 
   72                          Dimensions_t size, Dimensions_t maxSize,
 
   73                          Dimensions_t chunkingSize)
 
   78         chunkingSize_(chunkingSize) {}
 
   81                          Dimensions_t size, Dimensions_t maxSize, Dimensions_t chunkingSize)
 
   83         dataTypeKnown_(dataType),
 
   84         dataType_(typeid(void)),
 
   87         chunkingSize_(chunkingSize) {}
 
   93 template <
class DataType>
 
  100                     Dimensions_t maxSize, Dimensions_t chunkingSize)
 
  103     for (
size_t i = 0; i < 
initdata_.size(); ++i) 
initdata_[i] = gsl::narrow<DataType>(i + 1);
 
  108   std::shared_ptr<NewDimensionScale_Object<DataType>> 
getShared()
 const {
 
  109     return std::make_shared<NewDimensionScale_Object<DataType>>(*this);
 
  124 template <
class DataType>
 
  126   const std::string& 
name, Dimensions_t size, Dimensions_t maxSize = 
Unspecified,
 
  129   if (chunkingSize == 
Unspecified) chunkingSize = maxSize;
 
  130   return std::make_shared<NewDimensionScale_Object<DataType>>(
name, size, maxSize, chunkingSize);
 
  133 template <
class DataType>
 
  140   const std::string& 
name, 
const Type& t, Dimensions_t size, Dimensions_t maxSize = 
Unspecified,
 
  144   const std::string& 
name, 
const Variable& scale, 
const ScaleSizes &overrides = ScaleSizes());
 
Describe the dimensions of a ioda::Attribute or ioda::Variable.
 
Represents the "type" (i.e. integer, string, float) of a piece of data.
 
virtual Variable write(gsl::span< char > data, const Type &in_memory_dataType, const Selection &mem_selection=Selection::all, const Selection &file_selection=Selection::all)
The fundamental write function. Backends overload this function to implement all write operations.
 
#define IODA_DL
A preprocessor tag that indicates that a symbol is to be exported/imported.
 
constexpr int Unlimited
Specifies that a dimension is resizable to infinity.
 
std::vector< std::shared_ptr< NewDimensionScale_Base > > NewDimensionScales_t
 
std::shared_ptr< NewDimensionScale_Object< DataType > > NewDimensionScale(const std::string &name, Dimensions_t size, Dimensions_t maxSize=Unspecified, Dimensions_t chunkingSize=Unspecified)
Wrapper function used when listing new dimension scales to construct.
 
constexpr int Unspecified
Specifies that a dimension has no specified size. Tells ioda to figure it out from elsewhere.
 
Used to specify a new dimension scale when making an ObsSpace.
 
Dimensions_t size_
Initial size of the new dimension.
 
Type dataTypeKnown_
Type of the new dimension. Used if a type is passed directly.
 
NewDimensionScale_Base(const std::string &name, const std::type_index &dataType, Dimensions_t size, Dimensions_t maxSize, Dimensions_t chunkingSize)
 
Dimensions_t chunkingSize_
Chunking size of the new dimension. May be used as a hint when creating new Variables based on this d...
 
Dimensions_t maxSize_
Maximum size of the new dimension. Unlimited (< 0) by default.
 
NewDimensionScale_Base(const std::string &name, const Type &dataType, Dimensions_t size, Dimensions_t maxSize, Dimensions_t chunkingSize)
 
std::string name_
Name of the dimension. Scan position, scan line, latitude, ...
 
virtual void writeInitialData(Variable &) const
 
std::type_index dataType_
Type of the new dimension. Int, char, etc. Used if a type is not passed directly.
 
virtual ~NewDimensionScale_Base()
 
Used to specify a new dimension scale when making an ObsSpace. Templated version of NewDimensionScale...
 
virtual ~NewDimensionScale_Object()
 
void writeInitialData(Variable &v) const override
 
std::vector< DataType > initdata_
 
NewDimensionScale_Object(const std::string &name, Dimensions_t size, Dimensions_t maxSize, Dimensions_t chunkingSize)
 
std::shared_ptr< NewDimensionScale_Object< DataType > > getShared() const
 
ScaleSizes(Dimensions_t size=Unspecified, Dimensions_t maxSize=Unspecified, Dimensions_t chunkingSize=Unspecified)
 
Dimensions_t size_
Initial size of the new dimension.
 
Dimensions_t chunkingSize_
Chunking size of the new dimension.
 
Dimensions_t maxSize_
Maximum size of the new dimension.