|
WXP C++ Library Version 6.74.9
|
This class reads in surface data from a netCDF file. More...
#include "../include/SfcCdfFile.h"
Public Member Functions | |
| SfcCdfFile () | |
| SfcCdfFile (const char *filename) | |
| SfcCdfFile (const char *filename, int access) | |
| ~SfcCdfFile () | |
| bool | isOpen () |
| int | open (const char *filename, int access) |
| int | rewind () |
| int | close () |
| int | setDate (Date &rdate) |
| int | getDate (Date &rdate) |
| int | read (SfcData &data) |
| int | write (SfcData &data) |
Static Public Member Functions | |
| static int | checkType (const char *filename) |
This class reads in surface data from a netCDF file.
| SfcCdfFile::SfcCdfFile | ( | ) |
Constructor
| SfcCdfFile::SfcCdfFile | ( | const char * | filename | ) |
Constructor. Opens the surface data file (access=READ, type=UNK)
| filename | File to open |
References open(), and WXP::FileAttr::READ.
| SfcCdfFile::SfcCdfFile | ( | 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().
| SfcCdfFile::~SfcCdfFile | ( | ) |
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 SfcCdfFile::close | ( | ) |
Closes the surface data file
References WXP::NetCdfFile::close().
Referenced by WXP::SfcFile::close().
| int SfcCdfFile::getDate | ( | Date & | rdate | ) |
Gets the date of the file
| rdate | Date class to put date information |
Referenced by WXP::SfcFile::getDate().
| int SfcCdfFile::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::StrLib::copy(), WXP::DateTool::createLabel(), WXP::DateTool::decode(), WXP::NetCdfFile::getDim(), WXP::NetCdfFile::getDimSize(), WXP::Date::getHour(), WXP::NetCdfFile::open(), WXP::FileAttr::READ, WXP::NetCdfFile::setShape(), and WXP::FileAttr::WRITE.
Referenced by WXP::SfcFile::open(), SfcCdfFile(), and SfcCdfFile().
| int SfcCdfFile::read | ( | SfcData & | data | ) |
Reads a single report/station from the data file
| data | SfcData class to put the data from the file |
References WXP::Convert::CtoF(), WXP::DateTool::decode(), WXP::WxTool::getWmoWeather(), WXP::SfcData::init(), WXP::Convert::KMtoSM(), WXP::Convert::MBtoIN(), WXP::Const::MISS, WXP::Convert::MMtoIN(), WXP::Convert::MPStoKT(), and WXP::Convert::MtoFT().
Referenced by WXP::SfcFile::read().
| int SfcCdfFile::rewind | ( | ) |
Rewinds the surface data file
References WXP::FileAttr::READ.
| int SfcCdfFile::setDate | ( | Date & | rdate | ) |
Sets the date of the file
| rdate | Date class containing date information |
Referenced by WXP::SfcFile::setDate().