Kz.hxx

00001 // Copyright (C) 2003-2007, ENPC - INRIA - EDF R&D
00002 // Author(s): Vivien Mallet
00003 //
00004 // This file is part of AtmoData library, a tool for data processing in
00005 // atmospheric sciences.
00006 //
00007 // AtmoData is developed in the INRIA - ENPC joint project-team CLIME and in
00008 // the ENPC - EDF R&D joint laboratory CEREA.
00009 //
00010 // AtmoData is free software; you can redistribute it and/or modify it under
00011 // the terms of the GNU General Public License as published by the Free
00012 // Software Foundation; either version 2 of the License, or (at your option)
00013 // any later version.
00014 //
00015 // AtmoData is distributed in the hope that it will be useful, but WITHOUT ANY
00016 // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00017 // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
00018 // details.
00019 //
00020 // For more information, visit the AtmoData home page:
00021 //      http://cerea.enpc.fr/polyphemus/atmodata.html
00022 
00023 
00024 #ifndef ATMODATA_FILE_KZ_HXX
00025 
00026 namespace AtmoData
00027 {
00028 
00030 
00035   template <class T, class T0>
00036   inline T min(T x, T0 y)
00037   {
00038 
00039     return x<y?x:y;
00040 
00041   }
00042 
00044 
00049   template <class T, class T0>
00050   inline T max(T x, T0 y)
00051   {
00052 
00053     return x>y?x:y;
00054 
00055   }
00056 
00057   template<class TU, class TV, class TTp, class T, class TG>
00058   void ComputeLouisKz(Data<TU, 4, TG>& U, Data<TV, 4, TG>& V,
00059                       Data<TTp, 4, TG>& Tp, Data<T, 4, TG>& Kz,
00060                       T L0 = T(100), T B = T(5),
00061                       T C = T(5), T D = T(5), T z0 = T(1),
00062                       T a = T(0.115), T b = T(0.175), T delta_z0 = T(0.01),
00063                       T Ka = T(0.4));
00064 
00065   template<class TU, class TTp, class T, class TG>
00066   void ComputeLMO(const Data<TU, 3, TG>& FrictionModule,
00067                   const Data<TTp, 3, TG>& SurfacePotentialTemperature,
00068                   const Data<TTp, 4, TG>& PotentialTemperature,
00069                   const Data<T, 3, TG>& SensibleHeat,
00070                   const Data<T, 3, TG>& Evaporation,
00071                   Data<T, 3, TG>& LMO, T Ka = T(0.4));
00072 
00073   template<class TT, class TTp, class TU, class T, class TG>
00074   void ComputePBLH_TM(const Data<TT, 3, TG>& SurfaceTemperature,
00075                       const Data<TTp, 3, TG>& SurfacePotentialTemperature,
00076                       const Data<TTp, 4, TG>& PotentialTemperature,
00077                       const Data<TU, 3, TG>& FrictionModule,
00078                       const Data<TU, 4, TG>& WindModule,
00079                       const Data<T, 3, TG>& SensibleHeat,
00080                       const Data<T, 3, TG>& LMO,
00081                       const Grid<TG>& GridZ_interf,
00082                       Data<T, 3, TG>& BoundaryHeight,
00083                       T SBL = T(0.1), T Ric = T(0.21), T C = T(6.5),
00084                       T Ka = T(0.4));
00085 
00086   template<class T, class TG>
00087   void ComputePBLH_Richardson(const Data<T, 4, TG>& Richardson,
00088                               const Grid<TG>& GridZ_interf,
00089                               Data<T, 3, TG>& BoundaryHeight,
00090                               T Ric = T(0.21));
00091 
00092   template<class TU, class TT, class T, class TG>
00093   void ComputeTM_Kz(const Data<TT, 3, TG>& SurfaceTemperature,
00094                     const Data<TU, 3, TG>& FrictionModule,
00095                     const Data<T, 3, TG>& SensibleHeat,
00096                     const Data<T, 3, TG>& LMO,
00097                     const Data<T, 3, TG>& BoundaryHeight,
00098                     Data<T, 4, TG>& Kz,
00099                     bool TM_stable = true, T SBL = T(0.1), T p = T(2.0),
00100                     T Ka = T(0.4));
00101 
00102 }  // namespace AtmoData.
00103 
00104 #define ATMODATA_FILE_KZ_HXX
00105 #endif

Generated on Tue Nov 17 11:51:45 2009 for AtmoData by  doxygen 1.5.1