Commit 438ea903 authored by Marc R.'s avatar Marc R.

metroutines: added Moisseeva and Stull (2017) method for moist adiabats; also...

metroutines: added Moisseeva and Stull (2017) method for moist adiabats; also added simple framework for testing thermo functions
parent a4d9f199
......@@ -37,6 +37,7 @@
#include "system/pipelineconfiguration.h"
#include "system/frontendconfiguration.h"
#include "system/developmentaidsconfiguration.h"
#include "actors/basemapactor.h"
#include "actors/graticuleactor.h"
......@@ -114,6 +115,7 @@ void MApplicationConfigurationManager::registerApplicationConfigurations()
{
appConfigs << new MPipelineConfiguration();
appConfigs << new MFrontendConfiguration();
appConfigs << new MDevelopmentAidsConfiguration();
}
......
/******************************************************************************
**
** This file is part of Met.3D -- a research environment for the
** three-dimensional visual exploration of numerical ensemble weather
** prediction data.
**
** Copyright 2019 Marc Rautenhaus
**
** Regional Computing Center, Visualization
** Universitaet Hamburg, Hamburg, Germany
**
** Met.3D is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** Met.3D is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with Met.3D. If not, see <http://www.gnu.org/licenses/>.
**
*******************************************************************************/
#include "developmentaidsconfiguration.h"
// standard library imports
// related third party imports
#include <log4cplus/loggingmacros.h>
// local application imports
#include "util/metroutines.h"
namespace Met3D
{
/******************************************************************************
*** CONSTRUCTOR / DESTRUCTOR ***
*******************************************************************************/
MDevelopmentAidsConfiguration::MDevelopmentAidsConfiguration()
: MAbstractApplicationConfiguration()
{
}
/******************************************************************************
*** PUBLIC METHODS ***
*******************************************************************************/
void MDevelopmentAidsConfiguration::configure()
{
// Scan global application command line arguments for development aid
// requests.
MSystemManagerAndControl *sysMC = MSystemManagerAndControl::getInstance();
foreach (QString arg, sysMC->getApplicationCommandLineArguments())
{
if (arg.startsWith("--developmentaids="))
{
QString argument = arg.remove("--developmentaids=");
if (argument == "simpletests")
{
runSimpleTests();
}
// Additional code for testing and further development aids
// could be placed here.
}
}
}
/******************************************************************************
*** PROTECTED METHODS ***
*******************************************************************************/
void MDevelopmentAidsConfiguration::runSimpleTests()
{
LOG4CPLUS_INFO(mlog, "Running simple tests.");
// Run tests for thermodynamic functions.
MetRoutinesTests::runMetRoutinesTests();
LOG4CPLUS_INFO(mlog, "Finished simple tests.");
}
/******************************************************************************
*** PRIVATE METHODS ***
*******************************************************************************/
} // namespace Met3D
/******************************************************************************
**
** This file is part of Met.3D -- a research environment for the
** three-dimensional visual exploration of numerical ensemble weather
** prediction data.
**
** Copyright 2019 Marc Rautenhaus
**
** Regional Computing Center, Visualization
** Universitaet Hamburg, Hamburg, Germany
**
** Met.3D is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** Met.3D is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with Met.3D. If not, see <http://www.gnu.org/licenses/>.
**
*******************************************************************************/
#ifndef MDEVELOPMENTAIDSCONFIGURATION_H
#define MDEVELOPMENTAIDSCONFIGURATION_H
// standard library imports
// related third party imports
// local application imports
#include "system/applicationconfiguration.h"
namespace Met3D
{
/**
@brief MDevelopmentAidsConfiguration initializes modules that aid Met.3D
development, e.g. automatic tests.
*/
class MDevelopmentAidsConfiguration : public MAbstractApplicationConfiguration
{
public:
MDevelopmentAidsConfiguration();
void configure();
protected:
void runSimpleTests();
};
} // namespace Met3D
#endif // MDEVELOPMENTAIDSCONFIGURATION_H
This diff is collapsed.
......@@ -347,11 +347,25 @@ double equivalentPotentialTemperature_K_Bolton(double T_K, double p_Pa,
double q_kgkg);
/**
Computes the ambient temperature at pressure @p p_Pa along a saturated
adiabat defined by wet-bulb potential temperature @p thetaW_K. Computation
uses the (approximative) noniterative approach described by Moisseeva and
Stull (ACP, 2017), "Technical note: A noniterative approach to modelling
moist thermodynamics".
*/
double temperatureAlongSaturatedAdiabat_K_MoisseevaStull(double p_Pa,
double thetaW_K);
// Test functions for meteorological computations.
namespace MetRoutinesTests
{
void testEQPT();
void test_EQPT();
void test_temperatureAlongSaturatedAdiabat_K_MoisseevaStull();
void runMetRoutinesTests();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment