WXP C++ Library Version 6.74.9
Loading...
Searching...
No Matches
WXP::SatCdfFile Class Reference

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)

Detailed Description

This class reads in surface data from a netCDF file.

Author
Dan Vietor

Constructor & Destructor Documentation

◆ SatCdfFile() [1/3]

SatCdfFile::SatCdfFile ( )

Constructor

◆ SatCdfFile() [2/3]

SatCdfFile::SatCdfFile ( const char * filename)

Constructor. Opens the surface data file (access=READ, type=UNK)

Parameters
filenameFile to open

References open(), and WXP::FileAttr::READ.

◆ SatCdfFile() [3/3]

SatCdfFile::SatCdfFile ( const char * filename,
int raccess )

Constructor. Opens the surface data file

Parameters
filenameFile to open
raccessAccess type (FileAttr::READ, FileAttr::WRITE, FileAttr::APPEND)

References open().

◆ ~SatCdfFile()

SatCdfFile::~SatCdfFile ( )

Destructor

Member Function Documentation

◆ checkType()

int SatCdfFile::checkType ( const char * filename)
static

Checks the type of data in the file

Parameters
filenameFile to check

References WXP::File::isOpen(), and WXP::File::scanf().

◆ close()

int SatCdfFile::close ( )

Closes the surface data file

◆ getDate()

int SatCdfFile::getDate ( Date & rdate)

Gets the date of the file

Return values
rdateDate class to put date information

◆ open()

int SatCdfFile::open ( const char * filename,
int raccess )

Opens the surface data file

Parameters
filenameFile to open
raccessAccess type (FileAttr::READ, FileAttr::WRITE, FileAttr::APPEND)

References WXP::FileAttr::READ, and WXP::FileAttr::WRITE.

Referenced by SatCdfFile(), and SatCdfFile().

◆ readData()

int SatCdfFile::readData ( Image & image)

Reads a single report/station from the data file

Return values
dataImage class to put the data from the file

References WXP::Image::allocData(), WXP::Wxp::outDebug(), and WXP::Image::setPixel().

◆ readHeader()

◆ rewind()

int SatCdfFile::rewind ( )

Rewinds the surface data file

◆ setDate()

int SatCdfFile::setDate ( Date & rdate)

Sets the date of the file

Return values
rdateDate class containing date information

The documentation for this class was generated from the following files: