WXP C++ Library Version 6.74.9
|
This class reads in surface data from a netCDF file. More...
#include "../include/SatCdfFile.h"
Public Types | |
enum | Type { UNK , RAW , DATA , IMAGE , CMI } |
Public Member Functions | |
SatCdfFile () | |
SatCdfFile (const char *filename) | |
SatCdfFile (const char *filename, int access) | |
~SatCdfFile () | |
bool | isOpen () |
int | open (const char *filename, int access) |
int | open (const char *filename) |
int | rewind () |
int | close () |
int | setDate (Date &rdate) |
int | getDate (Date &rdate) |
int | readHeader (Image &data) |
int | readData (Image &data) |
int | read (Image &data) |
int | write (Image &data) |
Static Public Member Functions | |
static int | checkType (const char *filename) |
This class reads in surface data from a netCDF file.
SatCdfFile::SatCdfFile | ( | ) |
Constructor
SatCdfFile::SatCdfFile | ( | const char * | filename | ) |
Constructor. Opens the surface data file (access=READ, type=UNK)
filename | File to open |
References open(), and WXP::FileAttr::READ.
SatCdfFile::SatCdfFile | ( | const char * | filename, |
int | raccess | ||
) |
Constructor. Opens the surface data file
filename | File to open |
raccess | Access type (FileAttr::READ, FileAttr::WRITE, FileAttr::APPEND) |
References open().
SatCdfFile::~SatCdfFile | ( | ) |
Destructor
References WXP::NetCdfFile::close().
|
static |
Checks the type of data in the file
filename | File to check |
References WXP::File::isOpen(), and WXP::File::scanf().
int SatCdfFile::close | ( | ) |
Closes the surface data file
References WXP::NetCdfFile::close().
int SatCdfFile::getDate | ( | Date & | rdate | ) |
Gets the date of the file
rdate | Date class to put date information |
int SatCdfFile::open | ( | const char * | filename, |
int | raccess | ||
) |
Opens the surface data file
filename | File to open |
raccess | Access type (FileAttr::READ, FileAttr::WRITE, FileAttr::APPEND) |
References WXP::NetCdfFile::open(), WXP::FileAttr::READ, and WXP::FileAttr::WRITE.
Referenced by WXP::SatFile::open(), SatCdfFile(), and SatCdfFile().
int SatCdfFile::readData | ( | Image & | image | ) |
Reads a single report/station from the data file
data | Image class to put the data from the file |
References WXP::Image::allocData(), WXP::NetCdfFile::getDim(), WXP::NetCdfFile::getDimSize(), WXP::Wxp::outDebug(), and WXP::Image::setPixel().
int SatCdfFile::readHeader | ( | Image & | image | ) |
Reads a single report/station from the data file
data | Image class to put the data from the file |
References WXP::DomainVal::clat, WXP::DomainVal::clon, WXP::DateTool::createLabel(), WXP::DateVal::day, WXP::DomainVal::dx, WXP::DomainVal::dy, WXP::DomainVal::ellipse, WXP::String::equal(), WXP::NetCdfFile::getDim(), WXP::NetCdfFile::getDimSize(), WXP::NetCdfFile::getIntGlobAttr(), WXP::Date::getVals(), WXP::DateVal::hour, WXP::Image::init(), WXP::Domain::LAMB, WXP::EarthPoint::lat, WXP::Domain::LATLON, WXP::EarthPoint::lon, WXP::Domain::MERC, WXP::DateVal::min, WXP::DateVal::month, WXP::DomainVal::nx, WXP::DomainVal::ny, WXP::Wxp::outDebug(), WXP::Wxp::outError(), WXP::DomainVal::param, WXP::DomainVal::plat, WXP::DomainVal::plon, WXP::DomainVal::proj, WXP::Domain::SAT, WXP::DateVal::sec, WXP::Domain::set(), WXP::EarthPoint::set(), WXP::Point::set(), WXP::Date::setJulian(), WXP::Domain::tran(), WXP::Point::y, and WXP::DateVal::year.
Referenced by WXP::SatFile::getHeader().
int SatCdfFile::rewind | ( | ) |
Rewinds the surface data file
int SatCdfFile::setDate | ( | Date & | rdate | ) |
Sets the date of the file
rdate | Date class containing date information |