Inheritance diagram for code::NetcdfEncoder:
), convert it into a netcdf file and write the file out where required. It also provides you a Index::Record that you can use for notification and index-writing purposes.
Public Member Functions | |
virtual | ~NetcdfEncoder () |
void | setDefaultSubType (const std::string &subtype) |
set the sub-type to be used for all products by this netcdf encoder. | |
void | removeDefaultSubType () |
don't use a default subtype. | |
NetcdfEncoder (const std::string &dir_name, bool gz_compress=false, bool use_subdirs=false) | |
Will create an encoder that will write files into the directory specified. | |
bool | success () const |
Was the last process() method using this object successful? | |
const std::string & | getLastFile () const |
The last successfully opened file name (usually contains data). | |
void | setMissingDataValue (float newValue) |
Normally, MISSING_DATA is Constants::MISSING_DATA, but you can change it to any other number using this number. | |
void | setRangeFoldedValue (float newValue) |
Normally, RANGE_FOLDED is RANGE_FOLDED::MISSING_DATA, but you can change it to any other number using this number. | |
Index::Record | getLastRecord () const |
Returns a record suitable for adding to an Index, for notification. | |
std::vector< std::string > & | lastSelections () |
Returns the selections of the last file, Modify these selections if necessary. | |
virtual void | process (RadialSet &radialSet) |
Write out this RadialSet. | |
virtual void | process (PolarGrid &) |
Write out this PolarGrid (written out as a RadialSet netcdf file, so that reading it back will get you a RadialSet). | |
virtual void | process (LatLonGrid &latlon_grid) |
Write out this LatLonGrid. | |
virtual void | process (LatLonHeightGrid &latlonht_grid) |
Write out this LatLonHeightGrid. | |
virtual void | process (CartesianGrid2D &grid2d) |
Write out this Cartesain2D. | |
virtual void | process (CartesianGrid3D &grid3d) |
Write out this Cartesain2D. | |
virtual void | process (ContourData &contours) |
Write out this contour data. | |
virtual void | process (WindFieldStruct< LatLonGrid > &llgrid) |
Write out this WindFieldStruct (WindField) data. | |
virtual void | process (WindFieldStruct< CartesianGrid2D > &llgrid) |
Write out this WindFieldStruct (WindField) data. | |
void | reset () |
If a data-type that can not be handled by the NetcdfEncoder is passed, then you will keep getting the previous datatype that did get written out, so to avoid this behavioir, call reset() before calling invoke() on the DataType. | |
virtual void | process (AlgTrackStruct &) |
Default to process( BasicIcon& ) if the Algorithm subclass doesn't override this method. | |
virtual void | process (BasicIcon &) |
Process any BasicIcon. | |
virtual void | process (BwerIconStruct &) |
Default to process( BasicIcon& ) if the Algorithm subclass doesn't override this method. | |
virtual void | process (DataTable &) |
virtual void | process (DataType &) |
Process the abstract base class DataType itself. | |
virtual void | process (ElevationVolume &) |
Process a whole elevation volume scan. | |
virtual void | process (IconSet &) |
virtual void | process (Table &) |
virtual void | process (HailTrendEvent &, SpaceTimeRef &) |
virtual void | process (DEM &) |
Process a Digital Elevation Map (DEM). | |
virtual void | process (LtgoIconStruct &) |
Default to process( BasicIcon& ) if the Algorithm subclass doesn't override this method. | |
virtual void | process (MesoIconStruct &) |
Default to process( BasicIcon& ) if the Algorithm subclass doesn't override this method. | |
virtual void | process (MesoTrendEvent &, SpaceTimeRef &) |
virtual void | process (SingleContourData &) |
virtual void | process (Radial &) |
Process a single radial. | |
virtual void | process (ScitTrendEvent &, SpaceTimeRef &) |
virtual void | process (TornTrendEvent &, SpaceTimeRef &) |
virtual void | process (FieldArrowStruct &) |
Deppreciated. | |
virtual void | processVolume (Volume &) |
Process a generic volume (Deal with a volume on an abstract level. | |
Static Public Member Functions | |
static void | setCDMComplianceFlag (bool flag) |
Write out CDM-compliant netcdf grids? By default, false. | |
static bool | getCDMComplianceFlag () |
static void | setFAAComplianceFlag (bool flag) |
Write out FAA-compliant netcdf grids? By default, false. | |
static bool | getFAAComplianceFlag () |
static std::string | getTimeStamp (const Time &tm) |
Returns the time string format of the selections corresponding to the time passed in. | |
Protected Member Functions | |
virtual char | getSeparatorBetweenDataTypeAndSubtype () const |
How should we separate the data type and the subtype? | |
virtual char | getSeparatorToTimeString () const |
virtual std::string | getSuffix () const |
virtual std::string | getFormatName () const |
virtual std::string | getTimePartOfFileName (const code::Time &t) const |
SmartPtr< NetcdfFile > | getNetcdfFile (const Time &tm, const std::string &dataType, const std::string &subtype) |
Obtain the NetcdfFile given the arguments that go into the file name. | |
virtual std::string | getSubtype (RadialSet &) |
By default, returns the elevation angle in degrees formatted as "00.50" for example. | |
virtual std::string | getSubtype (PolarGrid &) |
By default, returns the elevation angle in degrees formatted as "00.50" for example. | |
virtual std::string | getSubtype (CartesianGrid2D &) |
By default, returns the height in meters formatted as "1234.5" for example. | |
virtual std::string | getSubtype (LatLonGrid &latlon_grid) |
By default, returns the height in meters formatted as "0234.5" for example. | |
virtual std::string | getSubtype (LatLonHeightGrid &latlonht_grid) |
By default, returns an empty string. | |
virtual std::string | getSubtype (CartesianGrid3D &grid3d) |
By default, returns an empty string. | |
virtual std::string | getSubtype (WindFieldStruct< LatLonGrid > &) |
By default, returns an empty string. | |
virtual std::string | getSubtype (WindFieldStruct< CartesianGrid2D > &) |
By default, returns an empty string. | |
virtual std::string | getSubtype (ContourData &contours) |
by default returns an empty string | |
void | addGlobalAttr (NetcdfFile &ncfile, const DataType &dt, const std::string &encoded_type) |
void | notifySuccess () |
Stuff to do after a successful write. |
virtual code::NetcdfEncoder::~NetcdfEncoder | ( | ) | [inline, virtual] |
code::NetcdfEncoder::NetcdfEncoder | ( | const std::string & | dir_name, | |
bool | gz_compress = false , |
|||
bool | use_subdirs = false | |||
) |
Will create an encoder that will write files into the directory specified.
These will follow the CODE specifications of subdirectory and file name. Any existing files of the appropriate name will be replaced.
dir_name | Local directory to write in. | |
gz_compress | Whether we should compress the netcdf file. | |
whether | the files should be organized into subdirectories. |
void code::NetcdfEncoder::addGlobalAttr | ( | NetcdfFile & | ncfile, | |
const DataType & | dt, | |||
const std::string & | encoded_type | |||
) | [protected] |
static bool code::NetcdfEncoder::getCDMComplianceFlag | ( | ) | [inline, static] |
static bool code::NetcdfEncoder::getFAAComplianceFlag | ( | ) | [inline, static] |
virtual std::string code::NetcdfEncoder::getFormatName | ( | ) | const [inline, protected, virtual] |
Reimplemented in code::AwipsNetcdfEncoder.
const std::string& code::NetcdfEncoder::getLastFile | ( | ) | const [inline] |
The last successfully opened file name (usually contains data).
Empty if this encoder hasn't been used yet.
Index::Record code::NetcdfEncoder::getLastRecord | ( | ) | const |
SmartPtr< NetcdfFile > code::NetcdfEncoder::getNetcdfFile | ( | const Time & | tm, | |
const std::string & | dataType, | |||
const std::string & | subtype | |||
) | [protected] |
Obtain the NetcdfFile given the arguments that go into the file name.
tm | The time part of the space-time-ref for this data type | |
dataType | The dataType specificier | |
subtype | (optional) information such as the elevation scan that differentiates different versions of this data type that have the same nominal time. Pass in an empty string to avoid specifying a subtype. |
virtual char code::NetcdfEncoder::getSeparatorBetweenDataTypeAndSubtype | ( | ) | const [inline, protected, virtual] |
virtual char code::NetcdfEncoder::getSeparatorToTimeString | ( | ) | const [inline, protected, virtual] |
virtual std::string code::NetcdfEncoder::getSubtype | ( | ContourData & | contours | ) | [protected, virtual] |
by default returns an empty string
virtual std::string code::NetcdfEncoder::getSubtype | ( | WindFieldStruct< CartesianGrid2D > & | ) | [protected, virtual] |
By default, returns an empty string.
virtual std::string code::NetcdfEncoder::getSubtype | ( | WindFieldStruct< LatLonGrid > & | ) | [protected, virtual] |
By default, returns an empty string.
virtual std::string code::NetcdfEncoder::getSubtype | ( | CartesianGrid3D & | grid3d | ) | [protected, virtual] |
By default, returns an empty string.
virtual std::string code::NetcdfEncoder::getSubtype | ( | LatLonHeightGrid & | latlonht_grid | ) | [protected, virtual] |
By default, returns an empty string.
virtual std::string code::NetcdfEncoder::getSubtype | ( | LatLonGrid & | latlon_grid | ) | [protected, virtual] |
By default, returns the height in meters formatted as "0234.5" for example.
virtual std::string code::NetcdfEncoder::getSubtype | ( | CartesianGrid2D & | ) | [protected, virtual] |
By default, returns the height in meters formatted as "1234.5" for example.
virtual std::string code::NetcdfEncoder::getSubtype | ( | PolarGrid & | ) | [protected, virtual] |
By default, returns the elevation angle in degrees formatted as "00.50" for example.
virtual std::string code::NetcdfEncoder::getSubtype | ( | RadialSet & | ) | [protected, virtual] |
By default, returns the elevation angle in degrees formatted as "00.50" for example.
virtual std::string code::NetcdfEncoder::getSuffix | ( | ) | const [inline, protected, virtual] |
Reimplemented in code::AwipsNetcdfEncoder.
virtual std::string code::NetcdfEncoder::getTimePartOfFileName | ( | const code::Time & | t | ) | const [inline, protected, virtual] |
Reimplemented in code::AwipsNetcdfEncoder.
static std::string code::NetcdfEncoder::getTimeStamp | ( | const Time & | tm | ) | [static] |
Returns the time string format of the selections corresponding to the time passed in.
This is useful to add other records to a netcdf index.
We don't use CalendarDate::getStringForFilename because external algorithms (like dualpol) depend on this format
std::vector< std::string >& code::NetcdfEncoder::lastSelections | ( | ) | [inline] |
Returns the selections of the last file, Modify these selections if necessary.
If unmodified, these selections are:
void code::NetcdfEncoder::notifySuccess | ( | ) | [protected] |
Stuff to do after a successful write.
virtual void code::Algorithm::process | ( | FieldArrowStruct & | ) | [virtual, inherited] |
Deppreciated.
virtual void code::Algorithm::process | ( | TornTrendEvent & | , | |
SpaceTimeRef & | ||||
) | [virtual, inherited] |
virtual void code::Algorithm::process | ( | ScitTrendEvent & | , | |
SpaceTimeRef & | ||||
) | [virtual, inherited] |
virtual void code::Algorithm::process | ( | Radial & | ) | [virtual, inherited] |
Process a single radial.
virtual void code::Algorithm::process | ( | SingleContourData & | ) | [virtual, inherited] |
virtual void code::Algorithm::process | ( | MesoTrendEvent & | , | |
SpaceTimeRef & | ||||
) | [virtual, inherited] |
virtual void code::Algorithm::process | ( | MesoIconStruct & | ) | [virtual, inherited] |
Default to process( BasicIcon& ) if the Algorithm subclass doesn't override this method.
virtual void code::Algorithm::process | ( | LtgoIconStruct & | ) | [virtual, inherited] |
Default to process( BasicIcon& ) if the Algorithm subclass doesn't override this method.
virtual void code::Algorithm::process | ( | DEM & | ) | [virtual, inherited] |
Process a Digital Elevation Map (DEM).
Default is to process as a regular LatLonGrid.
virtual void code::Algorithm::process | ( | HailTrendEvent & | , | |
SpaceTimeRef & | ||||
) | [virtual, inherited] |
virtual void code::Algorithm::process | ( | Table & | ) | [virtual, inherited] |
virtual void code::Algorithm::process | ( | IconSet & | ) | [virtual, inherited] |
virtual void code::Algorithm::process | ( | ElevationVolume & | ) | [virtual, inherited] |
virtual void code::Algorithm::process | ( | DataType & | ) | [virtual, inherited] |
Process the abstract base class DataType itself.
virtual void code::Algorithm::process | ( | DataTable & | ) | [virtual, inherited] |
Reimplemented in code::XMLEncoder.
virtual void code::Algorithm::process | ( | BwerIconStruct & | ) | [virtual, inherited] |
Default to process( BasicIcon& ) if the Algorithm subclass doesn't override this method.
virtual void code::Algorithm::process | ( | BasicIcon & | ) | [virtual, inherited] |
virtual void code::Algorithm::process | ( | AlgTrackStruct & | ) | [virtual, inherited] |
Default to process( BasicIcon& ) if the Algorithm subclass doesn't override this method.
virtual void code::NetcdfEncoder::process | ( | WindFieldStruct< CartesianGrid2D > & | llgrid | ) | [virtual] |
virtual void code::NetcdfEncoder::process | ( | WindFieldStruct< LatLonGrid > & | llgrid | ) | [virtual] |
virtual void code::NetcdfEncoder::process | ( | ContourData & | contours | ) | [virtual] |
virtual void code::NetcdfEncoder::process | ( | CartesianGrid3D & | grid3d | ) | [virtual] |
virtual void code::NetcdfEncoder::process | ( | CartesianGrid2D & | grid2d | ) | [virtual] |
virtual void code::NetcdfEncoder::process | ( | LatLonHeightGrid & | latlonht_grid | ) | [virtual] |
virtual void code::NetcdfEncoder::process | ( | LatLonGrid & | latlon_grid | ) | [virtual] |
Write out this LatLonGrid.
Reimplemented from code::Algorithm.
Reimplemented in code::AwipsNetcdfEncoder.
virtual void code::NetcdfEncoder::process | ( | PolarGrid & | ) | [virtual] |
Write out this PolarGrid (written out as a RadialSet netcdf file, so that reading it back will get you a RadialSet).
Reimplemented from code::Algorithm.
virtual void code::NetcdfEncoder::process | ( | RadialSet & | radialSet | ) | [virtual] |
virtual void code::Algorithm::processVolume | ( | Volume & | ) | [virtual, inherited] |
Process a generic volume (Deal with a volume on an abstract level.
Current volumes are ElevationVolume and LatLonHeightGrid
void code::NetcdfEncoder::removeDefaultSubType | ( | ) | [inline] |
don't use a default subtype.
Instead, get a subtype using the type of the product (elevation angle for radial sets, for example). This is the default.
void code::NetcdfEncoder::reset | ( | ) | [inline] |
If a data-type that can not be handled by the NetcdfEncoder is passed, then you will keep getting the previous datatype that did get written out, so to avoid this behavioir, call reset() before calling invoke() on the DataType.
static void code::NetcdfEncoder::setCDMComplianceFlag | ( | bool | flag | ) | [inline, static] |
Write out CDM-compliant netcdf grids? By default, false.
void code::NetcdfEncoder::setDefaultSubType | ( | const std::string & | subtype | ) | [inline] |
set the sub-type to be used for all products by this netcdf encoder.
If a sub-class over-rides getSubtype, however, it also over-rides the default sub-type.
static void code::NetcdfEncoder::setFAAComplianceFlag | ( | bool | flag | ) | [inline, static] |
Write out FAA-compliant netcdf grids? By default, false.
void code::NetcdfEncoder::setMissingDataValue | ( | float | newValue | ) |
Normally, MISSING_DATA is Constants::MISSING_DATA, but you can change it to any other number using this number.
void code::NetcdfEncoder::setRangeFoldedValue | ( | float | newValue | ) |
Normally, RANGE_FOLDED is RANGE_FOLDED::MISSING_DATA, but you can change it to any other number using this number.
bool code::NetcdfEncoder::success | ( | ) | const [inline] |
Was the last process() method using this object successful?