00001 #ifndef _WINC_UPACALC
00002 #define _WINC_UPACALC
00003
00004 #include <WXP/BrnData.h>
00005 #include <WXP/CclData.h>
00006 #include <WXP/HelicityData.h>
00007 #include <WXP/ParcelMeanData.h>
00008 #include <WXP/ShearData.h>
00009 #include <WXP/ThetaEData.h>
00010 #include <WXP/UpaData.h>
00011 #include <WXP/UpaLevel.h>
00012 #include <WXP/VCoord.h>
00013 #include <WXP/Wind.h>
00014
00015 namespace WXP {
00016 class UpaCalc {
00017 public:
00018 static float calc( UpaLevel &level, const char *var );
00019 static const char *getUnits( const char *var );
00020 static int thickTop( VCoord &bottom, float thick, VCoord &top );
00021 static VCoord thickTop( VCoord &bottom, float thick );
00022 static int thickBottom( VCoord &top, float thick, VCoord &bottom );
00023 static VCoord thickBottom( VCoord &top, float thick );
00024 static int parcelMean( UpaData &data, VCoord &bottom,
00025 VCoord &top, ParcelMeanData &pmean );
00026 static ParcelMeanData parcelMean( UpaData &data, VCoord &bottom,
00027 VCoord &top );
00028 static int meanWind( UpaData &data, VCoord &bottom, VCoord &top, Wind &wind );
00029 static Wind meanWind( UpaData &data, VCoord &bottom, VCoord &top );
00030 static float meanValue( UpaData &data, const char *type,
00031 VCoord &bottom, VCoord &top );
00032 static int ccl( UpaData &data, VCoord &bottom, float thick, CclData &ccl );
00033 static CclData ccl( UpaData &data, VCoord &bottom, float thick );
00034 static float thickness( UpaData &data, VCoord &bottom, VCoord &top );
00035 static float lapseRate( UpaData &data, VCoord &bottom, VCoord &top );
00036 static float thetaLapseRate( UpaData &data, VCoord &bottom,
00037 VCoord &top );
00038 static float thetaPresLapseRate( UpaData &data, VCoord &bottom,
00039 VCoord &top );
00040 static float staticStability( UpaData &data, VCoord &level );
00041 static float precipWater( UpaData &data );
00042 static float freezingLevel( UpaData &data );
00043 static float wetBulbZero( UpaData &data );
00044 static float maxTemperature( UpaData &data, VCoord &bottom,
00045 float thick );
00046 static float energyCalc( UpaLevel &par1, UpaLevel &par2, UpaLevel &env1,
00047 UpaLevel &env2 );
00048 static float capStrength( UpaData &data, VCoord &bottom,
00049 float thick );
00050 static float liftedIndex( UpaData &data, VCoord &bottom,
00051 float thick, VCoord &top );
00052 static float totalTotals( UpaData &data );
00053 static float verticalTotals( UpaData &data );
00054 static float crossTotals( UpaData &data );
00055 static float kIndex( UpaData &data );
00056 static float sweatIndex( UpaData &data );
00057 static float energyIndex( UpaData &data );
00058 static int thetaEIndex( UpaData &data, ThetaEData &thetae );
00059 static ThetaEData thetaEIndex( UpaData &data );
00060 static int helicity( UpaData &data, VCoord &bottom,
00061 VCoord &top, Wind &storm, HelicityData &hel );
00062 static HelicityData helicity( UpaData &data, VCoord &bottom,
00063 VCoord &top, Wind &storm );
00064 static int shearLayer( UpaData &data, VCoord &bottom,
00065 VCoord &top, ShearData &shear );
00066 static ShearData shearLayer( UpaData &data, VCoord &bottom,
00067 VCoord &top );
00068 static int bulkRichardson( UpaData &data, VCoord &bottom,
00069 float cape, BrnData &brn );
00070 static BrnData bulkRichardson( UpaData &data, VCoord &bottom,
00071 float cape );
00072 static float energyHelicity( UpaData &data, VCoord &bottom,
00073 Wind &storm, float cape );
00074
00075 };
00076 }
00077 #endif
00078