WXP C++ Library Version 6.74.9
Loading...
Searching...
No Matches
GridFile.h
1#ifndef _WINC_GRIDFILE
2#define _WINC_GRIDFILE
3
4#include <WXP/Filename.h>
5#include <WXP/GribFile.h>
6#include <WXP/Grid.h>
7#include <WXP/GridWxpFile.h>
8
9namespace WXP {
10 class GridFile {
11 int type; /* The type of grid file */
12 int subtype; /* The subtype of grid file */
13 int access;
14 bool opened;
15 int use_header;
16 GridWxpFile wxp;
17 GribFile grib;
18
19 public:
20 enum Type {
21 UNK,
22 WXP,
23 WXPB,
24 NETCDF,
25 GRIB };
26
27 GridFile();
28 GridFile( const char *filename, int access, int type);
29 GridFile( const char *filename );
30 GridFile( Filename &filename, int access, int type);
31 GridFile( Filename &filename );
32 ~GridFile();
33
34 int initClass();
35 int init();
36 int setVer( int v );
37 int setParam( const char *str );
38 int useHdrFile( bool val );
39 int setMaxBad( int val );
40 int setMissValue( float rmiss );
41 int setValueBits( int val );
42 int setFormat( const char *rform );
43 int open( const char *filename, int access, int type);
44 int open( const char *filename );
45 int open( Filename &filename, int access, int type);
46 int open( Filename &filename );
47 bool isOpen();
48 int getType();
49 int close();
50 int rewind();
51 int peek( Grid &grid );
52 int read( Grid &grid );
53 int read( const char *filename, int type, Grid &grid );
54 int read( const char *filename, Grid &grid );
55 int readHdr( Grid &grid );
56 int readData( Grid &grid );
57 int read( Grid &grid, const char *spec );
58 int read( GridSpec &spec, Grid &grid );
59 int read( Grids &grids );
60 int write( Grid &grid );
61 int write( const char *filename, int type, Grid &grid );
62 int write( const char *filename, Grid &grid );
63
64 static int checkType( const char *filename );
65 };
66}
67#endif
This class creates filenames.
Definition Filename.h:11
This class reads in and decodes GRIB data.
Definition GribFile.h:17
This class opens and reads grid file data.
Definition GridFile.h:10
int useHdrFile(bool val)
Definition GridFile.cc:157
GridFile()
Definition GridFile.cc:75
int peek(Grid &grid)
Definition GridFile.cc:336
static int checkType(const char *filename)
Definition GridFile.cc:26
int close()
Definition GridFile.cc:313
bool isOpen()
Definition GridFile.cc:298
int read(Grid &grid)
Definition GridFile.cc:351
int getType()
Definition GridFile.cc:306
int open(const char *filename, int access, int type)
Definition GridFile.cc:189
int rewind()
Definition GridFile.cc:325
~GridFile()
Definition GridFile.cc:123
int init()
Definition GridFile.cc:65
This class defines vertical level parameters.
Definition GridSpec.h:7
This class opens and reads grid file data.
Definition GridWxpFile.h:9
This class defines a grid.
Definition Grid.h:20
This class sets up a repository for grids.
Definition Grids.h:14
All WXP classes fall under the WXP namespace.
Definition Angle.h:4