MI - Fimex
vertical_coordinate_transformations.h
Go to the documentation of this file.
1 /*
2  * Fimex, vertical_coordinate_transformations.h
3  *
4  * (C) Copyright 2011, 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: Jul 28, 2011
24  * Author: Heiko Klein
25  */
26 
27 #ifndef VERTICAL_COORDINATE_TRANSFORMATIONS_H_
28 #define VERTICAL_COORDINATE_TRANSFORMATIONS_H_
29 
33 #include "fimex/mifi_constants.h"
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
49 extern int mifi_atmosphere_ln_pressure(size_t n, double p0, const double* lev, double* pressure);
50 
63 extern int mifi_atmosphere_sigma_pressure(size_t n, double ptop, double ps, const double* level, double* pressure);
64 
78 extern int mifi_atmosphere_pressure_sigma(size_t n, double ptop, double ps, const double* pressure, double* level);
79 
93 extern int mifi_atmosphere_hybrid_sigma_pressure(size_t n, double p0, double ps, const double* a, const double* b, double* pressure);
94 
109 extern int mifi_atmosphere_hybrid_sigma_ap_pressure(size_t n, double ps, const double* ap, const double* b, double* pressure);
110 
132 extern int mifi_barometric_pressure(size_t n, double P_b, const double* h, double T_b, double* pressure);
133 
138 extern int mifi_barometric_standard_pressure(size_t n, const double* h, double* pressure);
139 
140 
161 extern int mifi_barometric_height(size_t n, double P_b, const double* p, double T_b, double* height);
162 
168 extern int mifi_barometric_standard_altitude(size_t n, const double* p, double* altitude);
169 
176 extern float mifi_virtual_temperature(float spec_humidity, float t);
177 
186 extern float mifi_relative_to_specific_humidity(float rh, float t, float p);
187 
197 extern float mifi_specific_to_relative_humidity(float sh, float t, float p);
198 
206 extern float mifi_dewpoint_to_relative_humidity(float dew, float t);
207 
208 
217 extern float mifi_barometric_layer_thickness(float p_low_alti, float p_high_alti, float T);
218 
233 extern int mifi_ocean_s_g1_z(size_t n, double h, double h_c, double zeta, const double* s, const double* C, double* z);
234 
249 extern int mifi_ocean_s_g2_z(size_t n, double h, double h_c, double zeta, const double* s, const double* C, double* z);
250 
251 
262 extern int mifi_omega_to_vertical_wind(size_t n, const double* omega, const double* p, const double* t, double* w);
263 
274 extern int mifi_vertical_wind_to_omega(size_t n, const double* w, const double* p, const double* t, double* omega);
275 
276 
277 
278 #ifdef __cplusplus
279 }
280 #endif
281 
282 #endif /* VERTICAL_COORDINATE_TRANSFORMATIONS_H_ */
int mifi_barometric_pressure(size_t n, double P_b, const double *h, double T_b, double *pressure)
int mifi_ocean_s_g1_z(size_t n, double h, double h_c, double zeta, const double *s, const double *C, double *z)
int mifi_omega_to_vertical_wind(size_t n, const double *omega, const double *p, const double *t, double *w)
int mifi_atmosphere_hybrid_sigma_pressure(size_t n, double p0, double ps, const double *a, const double *b, double *pressure)
float mifi_virtual_temperature(float spec_humidity, float t)
int mifi_barometric_standard_pressure(size_t n, const double *h, double *pressure)
float mifi_barometric_layer_thickness(float p_low_alti, float p_high_alti, float T)
int mifi_atmosphere_ln_pressure(size_t n, double p0, const double *lev, double *pressure)
int mifi_barometric_height(size_t n, double P_b, const double *p, double T_b, double *height)
float mifi_dewpoint_to_relative_humidity(float dew, float t)
int mifi_atmosphere_sigma_pressure(size_t n, double ptop, double ps, const double *level, double *pressure)
int mifi_vertical_wind_to_omega(size_t n, const double *w, const double *p, const double *t, double *omega)
float mifi_relative_to_specific_humidity(float rh, float t, float p)
int mifi_atmosphere_hybrid_sigma_ap_pressure(size_t n, double ps, const double *ap, const double *b, double *pressure)
int mifi_ocean_s_g2_z(size_t n, double h, double h_c, double zeta, const double *s, const double *C, double *z)
int mifi_barometric_standard_altitude(size_t n, const double *p, double *altitude)
float mifi_specific_to_relative_humidity(float sh, float t, float p)
int mifi_atmosphere_pressure_sigma(size_t n, double ptop, double ps, const double *pressure, double *level)