WXP C++ Library Version 6.74.9
Loading...
Searching...
No Matches
GridMath.h
1#ifndef _WINC_GRIDMATH
2#define _WINC_GRIDMATH
3
4#include <WXP/Domain.h>
5#include <WXP/Grid.h>
6#include <WXP/Grids.h>
7
8namespace WXP {
9 class GridMath {
10 public:
11
12 static int process( const char *str, Grid &ogrid, Grids &grids );
13 static int process( const char *str, Grid &ogrid1, Grid &ogrid2, Grids &grids );
14 static bool checkVar( Grid &grid, const char *var );
15 static bool isVectFunc( const char *var );
16 static int setInfo( Grid &ogrid, const char *name, const char *units );
17 static int units( Grid &grid, const char *units );
18 static bool isDomainEqual( Grid &grd1, Grid &grd2 );
19 static bool isDomainEqual( Grid &grd1, Domain &dom );
20 static bool isProjEqual( Grid &grd1, Grid &grd2 );
21 static bool isProjEqual( Grid &grd1, Domain &dom );
22 static float maxSpd( Grid &ugrid, Grid &vgrid );
23 static int remap( Grid &ogrid, Domain &domain, Grid &igrid );
24 static int revalue( Grid &ogrid, const char *str, Grid &igrid );
25 static int cutoff( Grid &ogrid, const char *cmd, float cutoff,
26 float nval, Grid &igrid );
27 static int resetMiss( Grid &grid, float nval );
28 static int scale( Grid &ogrid, float scale );
29 static int offset( Grid &ogrid, float off );
30 static int interp( Grid &ogrid, Grid &grid1, float ival, Grid &grid2 );
31 static int add( Grid &ogrid, Grid &igrid );
32 static int add( Grid &ogrid, Grid &agrid, Grid &bgrid );
33 static int add( Grid &ogrid, Grids &grids );
34 static int avg( Grid &ogrid, Grids &grids );
35 static int diff( Grid &ogrid, Grid &igrid );
36 static int diff( Grid &ogrid, Grid &grida, Grid &gridb );
37 static int mult( Grid &ogrid, Grid &grida, Grid &gridb );
38 static int div( Grid &ogrid, Grid &grida, Grid &gridb );
39 static int mod( Grid &ogrid, Grid &grida, Grid &gridb );
40 static int max( Grid &ogrid, Grids &grids );
41 static int min( Grid &ogrid, Grids &grids );
42 static int sqrt( Grid &ogrid, Grid &grid );
43 static int abs( Grid &ogrid, Grid &grid );
44 static int inv( Grid &ogrid, Grid &grid );
45 static int log( Grid &ogrid, Grid &grid );
46 static int log10( Grid &ogrid, Grid &grid );
47 static int exp( Grid &ogrid, Grid &grid );
48 static int pow( Grid &ogrid, Grid &grida, Grid &gridb );
49 static int adjustUV( Grid &ugrid, Grid &vgrid );
50 static int locatePoint( Grid &ogrid, Grid &grid, const char *oper );
51 static int coriolis( Grid &ogrid, Grid &grid, const char *oper );
52 static int dx( Grid &ogrid, Grid &grid );
53 static int dy( Grid &ogrid, Grid &grid );
54 static int laplacian( Grid &ogrid, Grid &grid );
55 static int converge( Grid &ogrid, Grid &ugrid, Grid &vgrid, Grid &zgrid );
56 static int converge( Grid &ogrid, Grid &ugrid, Grid &vgrid );
57 static int vorticity( Grid &ogrid, Grid &ugrid, Grid &vgrid );
58 static int deformation1( Grid &ogrid, Grid &ugrid, Grid &vgrid );
59 static int deformation2( Grid &ogrid, Grid &ugrid, Grid &vgrid );
60 static int advection( Grid &ogrid, Grid &ugrid, Grid &vgrid, Grid &zgrid );
61 static int windSpd( Grid &ogrid, Grid &ugrid, Grid &vgrid );
62 static int windDir( Grid &ogrid, Grid &ugrid, Grid &vgrid, int flag );
63 static int windU( Grid &ogrid, Grid &dgrid, Grid &sgrid, int flag );
64 static int windV( Grid &ogrid, Grid &dgrid, Grid &sgrid, int flag );
65 static int dewTemp( Grid &ogrid, Grid &tgrid, Grid &rgrid );
66 static int relHum( Grid &ogrid, Grid &tgrid, Grid &dgrid );
67 static int specHum( Grid &ogrid, Grid &tgrid, Grid &dgrid );
68 static int wetBulb( Grid &ogrid, Grid &tgrid, Grid &rgrid );
69 static int mixRatio( Grid &ogrid, Grid &tgrid, Grid &rgrid );
70 static int windChill( Grid &ogrid, const char *func, Grid &tgrid,
71 Grid &sgrid );
72 static int heatIndex( Grid &ogrid, Grid &tgrid, Grid &rgrid );
73 static int potTemp( Grid &ogrid, Grid &grid );
74 static int virtTemp( Grid &ogrid, Grid &tgrid, Grid &rgrid );
75 static int virtPotTemp( Grid &ogrid, Grid &tgrid, Grid &rgrid );
76 static int equivPotTemp( Grid &ogrid, Grid &tgrid, Grid &rgrid );
77 static int geosU( Grid &ogrid, Grid &hgrid );
78 static int geosV( Grid &ogrid, Grid &hgrid );
79 static int showalter( Grid &ogrid, Grid &t8grid, Grid &r8grid, Grid &t5grid );
80 static int adjustDir( Grid &ugrid, Grid &vgrid, Domain &dom, int flag );
81
82 enum {
83 UVGRID,
84 UVEW
85 };
86 };
87}
88#endif
This class stores and manipulates domain data.
Definition Domain.h:19
This class does math on grids.
Definition GridMath.h:9
static int scale(Grid &ogrid, float scale)
Definition GridMath.cc:658
static int resetMiss(Grid &grid, float nval)
Definition GridMath.cc:608
static int pow(Grid &ogrid, Grid &grida, Grid &gridb)
Definition GridMath.cc:1325
static int locatePoint(Grid &ogrid, Grid &grid, const char *oper)
Definition GridMath.cc:1517
static int diff(Grid &ogrid, Grid &igrid)
Definition GridMath.cc:846
static int log10(Grid &ogrid, Grid &grid)
Definition GridMath.cc:1240
static int sqrt(Grid &ogrid, Grid &grid)
Definition GridMath.cc:1072
static int max(Grid &ogrid, Grids &grids)
Definition GridMath.cc:1375
static int abs(Grid &ogrid, Grid &grid)
Definition GridMath.cc:1114
static int remap(Grid &ogrid, Domain &domain, Grid &igrid)
Definition GridMath.cc:505
static int mod(Grid &ogrid, Grid &grida, Grid &gridb)
Definition GridMath.cc:1024
static int cutoff(Grid &ogrid, const char *cmd, float cutoff, float nval, Grid &igrid)
Definition GridMath.cc:568
static int units(Grid &grid, const char *units)
Definition GridMath.cc:381
static int inv(Grid &ogrid, Grid &grid)
Definition GridMath.cc:1156
static bool isProjEqual(Grid &grd1, Grid &grd2)
Definition GridMath.cc:442
static int offset(Grid &ogrid, float off)
Definition GridMath.cc:631
static float maxSpd(Grid &ugrid, Grid &vgrid)
Definition GridMath.cc:472
static int revalue(Grid &ogrid, const char *str, Grid &igrid)
Definition GridMath.cc:539
static int add(Grid &ogrid, Grid &igrid)
Definition GridMath.cc:724
static int mult(Grid &ogrid, Grid &grida, Grid &gridb)
Definition GridMath.cc:926
static bool isDomainEqual(Grid &grd1, Grid &grd2)
Definition GridMath.cc:412
static int interp(Grid &ogrid, Grid &grid1, float ival, Grid &grid2)
Definition GridMath.cc:687
static int adjustUV(Grid &ugrid, Grid &vgrid)
Definition GridMath.cc:1473
static int exp(Grid &ogrid, Grid &grid)
Definition GridMath.cc:1282
static int min(Grid &ogrid, Grids &grids)
Definition GridMath.cc:1423
static int log(Grid &ogrid, Grid &grid)
Definition GridMath.cc:1198
static int div(Grid &ogrid, Grid &grida, Grid &gridb)
Definition GridMath.cc:975
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