"Fossies" - the Fresh Open Source Software Archive

Member "fimex-1.4.1/include/fimex/coordSys/verticalTransform/LnPressure.h" (30 Oct 2019, 2300 Bytes) of package /linux/privat/fimex-1.4.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "LnPressure.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2  * Fimex, LnPressure.h
    3  *
    4  * (C) Copyright 2013, met.no
    5  *
    6  * Project Info:  https://wiki.met.no/fimex/start
    7  *
    8  * This library is free software; you can redistribute it and/or modify it
    9  * under the terms of the GNU Lesser General Public License as published by
   10  * the Free Software Foundation; either version 2.1 of the License, or
   11  * (at your option) any later version.
   12  *
   13  * This library is distributed in the hope that it will be useful, but
   14  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
   15  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
   16  * License for more details.
   17  *
   18  * You should have received a copy of the GNU Lesser General Public
   19  * License along with this library; if not, write to the Free Software
   20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301,
   21  * USA.
   22  *
   23  *  Created on: Aug 6, 2013
   24  *      Author: heikok
   25  */
   26 
   27 #ifndef LNPRESSURE_H_
   28 #define LNPRESSURE_H_
   29 
   30 #include "fimex/coordSys/verticalTransform/VerticalTransformation.h"
   31 
   32 namespace MetNoFimex
   33 {
   34 /**
   35  * @headerfile fimex/coordSys/verticalTransform/LnPressure.h
   36  */
   37 /// Hybrid sigma pressure vertical coordinate, expressed with ap andb
   38 class LnPressure : public VerticalTransformation
   39 {
   40 public:
   41     const std::string lev;
   42     const std::string p0;
   43     /**
   44      * Initialize LnPressure with formula (for all x, y, t)
   45      *   p(k) = p0 * exp(-lev(k))
   46      *
   47      * @param lev dimensionless parameter
   48      * @param p0 p0 base-pressure
   49      */
   50     LnPressure(const std::string& lev, const std::string& p0) : lev(lev), p0(p0) {}
   51     virtual ~LnPressure() {}
   52     /**
   53      * static NAME constant
   54      * @return atmosphere_ln_pressure_coordinate
   55      */
   56     static const std::string NAME() {return "atmosphere_ln_pressure_coordinate";}
   57     /**
   58      * @return same as static NAME()
   59      */
   60     virtual std::string getName() const { return NAME(); }
   61     virtual int getPreferredVerticalType() const { return MIFI_VINT_PRESSURE; }
   62     virtual std::string getParameterString() const { return "lev="+lev+",p0="+p0; }
   63     virtual bool isComplete() const {return lev != "" && p0 != "";}
   64 
   65 protected:
   66     VerticalConverter_p getPressureConverter(CDMReader_p reader, CoordinateSystem_cp cs) const;
   67 };
   68 
   69 } /* namespace MetNoFimex */
   70 #endif /* LNPRESSURE_H_ */