00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef ATMODATA_FILE_COORDTRANSFORM_HXX
00025
00026 #include <cmath>
00027
00028 namespace AtmoData
00029 {
00030
00033 template<class T>
00034 class LaeaToLonlat
00035 {
00036 protected:
00038 const T Earth_radius_;
00040 const T pi_;
00042 const T limit_;
00043
00045 T lat_origin_;
00047 T lon_origin_;
00048
00049 public:
00050 LaeaToLonlat(T lon_origin, T lat_origin) throw();
00051 void operator() (const T x, const T y,
00052 T& lon, T& lat);
00053 };
00054
00055
00058 template<class T>
00059 class MM5LccIndToLonlat
00060 {
00061 protected:
00063 const int jmx_;
00065 const int imx_;
00067 const double jx_;
00069 const double ix_;
00071 const double phic_;
00073 const double lambdac_;
00075 const double phi1_;
00077 const double phi2_;
00079 const double ds_;
00081 const int ratio_;
00083 const double Earth_radius_;
00085 const double pi_;
00086
00087 public:
00088 MM5LccIndToLonlat(int jmx, int imx, double jx, double ix,
00089 double phic, double lambdac,
00090 double phi1, double phi2, double ds,
00091 int ratio) throw();
00092 void operator() (const T j, const T i,
00093 T& lon, T& lat);
00094 };
00095
00096
00099 template<class T>
00100 class LonlatToMM5LccInd
00101 {
00102 protected:
00104 const int jmx_;
00106 const int imx_;
00108 const double jx_;
00110 const double ix_;
00112 const double phic_;
00114 const double lambdac_;
00116 const double phi1_;
00118 const double phi2_;
00120 const double ds0_;
00122 const int ratio_;
00124 const double Earth_radius_;
00126 const double pi_;
00127
00128 public:
00129 LonlatToMM5LccInd(int jmx, int imx, double jx, double ix,
00130 double phic, double lambdac,
00131 double phi1, double phi2, double ds0,
00132 int ratio) throw();
00133 void operator() (const T lon, const T lat,
00134 T& j, T& i);
00135 };
00136
00137
00140 template<class T>
00141 class MM5MercIndToLonlat
00142 {
00143 protected:
00145 const int jmx_;
00147 const int imx_;
00149 const double jx_;
00151 const double ix_;
00153 const double phic_;
00155 const double lambdac_;
00157 const double phi1_;
00159 const double ds_;
00161 const int ratio_;
00163 const double Earth_radius_;
00165 const double pi_;
00166
00167 public:
00168 MM5MercIndToLonlat(int jmx, int imx, double jx, double ix,
00169 double phic, double lambdac,
00170 double phi1, double ds, int ratio) throw();
00171 void operator() (const T j, const T i,
00172 T& lon, T& lat);
00173 };
00174
00175
00178 template<class T>
00179 class LonlatToMM5MercInd
00180 {
00181 protected:
00183 const int jmx_;
00185 const int imx_;
00187 const double jx_;
00189 const double ix_;
00191 const double phic_;
00193 const double lambdac_;
00195 const double phi1_;
00197 const double ds0_;
00199 const int ratio_;
00201 const double Earth_radius_;
00203 const double pi_;
00204
00205 public:
00206 LonlatToMM5MercInd(int jmx, int imx, double jx, double ix,
00207 double phic, double lambdac,
00208 double phi1, double ds0, int ratio) throw();
00209 void operator() (const T lon, const T lat,
00210 T& j, T& i);
00211 };
00212
00213
00216 template<class T>
00217 class MM5StereIndToLonlat
00218 {
00219 protected:
00221 const int jmx_;
00223 const int imx_;
00225 const double jx_;
00227 const double ix_;
00229 const double phic_;
00231 const double lambdac_;
00233 const double phi1_;
00235 const double ds_;
00237 const int ratio_;
00239 const double Earth_radius_;
00241 const double pi_;
00242
00243 public:
00244 MM5StereIndToLonlat(int jmx, int imx, double jx, double ix,
00245 double phic, double lambdac,
00246 double phi1, double ds, int ratio) throw();
00247 void operator() (const T j, const T i,
00248 T& lon, T& lat);
00249 };
00250
00251
00254 template<class T>
00255 class LonlatToMM5StereInd
00256 {
00257 protected:
00259 const int jmx_;
00261 const int imx_;
00263 const double jx_;
00265 const double ix_;
00267 const double phic_;
00269 const double lambdac_;
00271 const double phi1_;
00273 const double ds0_;
00275 const int ratio_;
00277 const double Earth_radius_;
00279 const double pi_;
00280
00281 public:
00282 LonlatToMM5StereInd(int jmx, int imx, double jx, double ix,
00283 double phic, double lambdac,
00284 double phi1, double ds0, int ratio) throw();
00285 void operator() (const T lon, const T lat,
00286 T& j, T& i);
00287 };
00288
00289
00292 template<class T>
00293 class LonlatToWRFLccInd
00294 {
00295 protected:
00297 const int imx_;
00299 const int jmx_;
00301 const double lambdar_;
00303 const double lambda0_;
00305 const double lambda1_;
00307 const double phir_;
00309 const double max_phi0_;
00311 const double max_phi1_;
00313 const double phi1_;
00315 const double phi2_;
00317 const double dsi0_;
00319 const double dsj0_;
00321 const double Earth_radius_;
00323 const double pi_;
00324
00325 public:
00326 LonlatToWRFLccInd(int imx, int jmx,
00327 double lambdar, double phir,
00328 double lambda0, double lambda1,
00329 double max_phi0, double max_phi1,
00330 double phi1, double phi2,
00331 double dsi0, double dsj0) throw();
00332 void operator() (const T lon, const T lat,
00333 T& i, T& j);
00334 };
00335
00336
00339 template<class T>
00340 class LonlatToWRFMercInd
00341 {
00342 protected:
00344 const int imx_;
00346 const int jmx_;
00348 const double lambdac_;
00350 const double phic_;
00352 const double phi1_;
00354 const double dsi0_;
00356 const double dsj0_;
00358 const double Earth_radius_;
00360 const double pi_;
00361
00362 public:
00363 LonlatToWRFMercInd(int imx, int jmx,
00364 double lambdac, double phic,
00365 double phi1,
00366 double dsi0, double dsj0) throw();
00367 void operator() (const T lon, const T lat,
00368 T& i, T& j);
00369 };
00370
00371
00374 template<class T>
00375 class LonlatToWRFStereInd
00376 {
00377 protected:
00379 const int imx_;
00381 const int jmx_;
00383 const double lambdac_;
00385 const double phic_;
00387 const double phi1_;
00389 const double dsi0_;
00391 const double dsj0_;
00393 const double Earth_radius_;
00395 const double pi_;
00396
00397 public:
00398 LonlatToWRFStereInd(int imx, int jmx,
00399 double lambdac, double phic,
00400 double phi1,
00401 double dsi0, double dsj0) throw();
00402 void operator() (const T lon, const T lat,
00403 T& j, T& i);
00404 };
00405
00406
00407 }
00408
00409 #define ATMODATA_FILE_COORDTRANSFORM_HXX
00410 #endif