diff --git a/cave/build/alertviz/customTargets.xml b/cave/build/alertviz/customTargets.xml index 60b30cdcd7..feccd1da57 100644 --- a/cave/build/alertviz/customTargets.xml +++ b/cave/build/alertviz/customTargets.xml @@ -96,10 +96,6 @@ - - - - diff --git a/cave/build/cave/customTargets.xml b/cave/build/cave/customTargets.xml index f4c4778492..ae69e6be63 100644 --- a/cave/build/cave/customTargets.xml +++ b/cave/build/cave/customTargets.xml @@ -96,10 +96,6 @@ - - - - diff --git a/cave/build/p2-build-strict.xml b/cave/build/p2-build-strict.xml index 13cbf992ab..58cee9c1c3 100644 --- a/cave/build/p2-build-strict.xml +++ b/cave/build/p2-build-strict.xml @@ -92,12 +92,6 @@ includes="ohd*/**" /> - - - - - - - - - - - - - - - - - - - - * * @author chammack @@ -43,6 +45,4 @@ public class StatusConstants { /** Indicates a connectivity issue/notification */ public static final String SUBCATEGORY_CONNECTIVITY = "CONNECTIVITY"; - /** Indicates a meteoLib functionality issue */ - public static final String SUBCATEGORY_METEOLIB = "METEOROLOGICAL LIBRARY"; } diff --git a/cave/com.raytheon.uf.viz.derivparam.python/localization/derivedParameters/functions/meteolib.py b/cave/com.raytheon.uf.viz.derivparam.python/localization/derivedParameters/functions/meteolib.py index beb3c1374a..8836ff7161 100644 --- a/cave/com.raytheon.uf.viz.derivparam.python/localization/derivedParameters/functions/meteolib.py +++ b/cave/com.raytheon.uf.viz.derivparam.python/localization/derivedParameters/functions/meteolib.py @@ -31,7 +31,6 @@ from com.raytheon.uf.common.wxmath import PToZsa from com.raytheon.uf.common.wxmath import ZToPsa -from jep import jarray, JFLOAT_ID import numpy #allows calling ztopsa with either a float, numpy.float32, or ndarray @@ -56,34 +55,4 @@ def ptozsa(P): for i in range(len(P)): result[i] = ptozsa(P[i]); return result - return P - -def numpy2java(a): - if (len(a.shape) == 1): - jA = jarray(a.shape[0], JFLOAT_ID, 0) - for i in range(a.shape[0]): - jA[i] = float(a[i]) - return jA - elif(len(a.shape) == 2): - jA = jarray(a.shape[0]*a.shape[1], JFLOAT_ID, 0) - for i in range(a.shape[0]): - for j in range(a.shape[1]): - jA[i*a.shape[0]+j] = float(a[i][j]) - return jA - -def java2numpy(a, shape): - if (len(shape) == 1): - nA = numpy.ndarray(shape, numpy.float32) - for i in range(shape[0]): - nA[i] = a[i] - if (nA[i] > 1e+36): - nA[i] = -9999 - return nA - elif(len(shape) == 2): - nA = numpy.ndarray(shape, numpy.float32) - for i in range(shape[0]): - for j in range(shape[1]): - nA[i][j] = a[i*shape[0]+j] - if (nA[i][j] > 1e+36): - nA[i][j] = -9999 - return nA \ No newline at end of file + return P \ No newline at end of file diff --git a/edexOsgi/com.raytheon.edex.meteolib/.classpath b/edexOsgi/com.raytheon.edex.meteolib/.classpath deleted file mode 100644 index 1fa3e6803d..0000000000 --- a/edexOsgi/com.raytheon.edex.meteolib/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/edexOsgi/com.raytheon.edex.meteolib/.project b/edexOsgi/com.raytheon.edex.meteolib/.project deleted file mode 100644 index 1fa42708fc..0000000000 --- a/edexOsgi/com.raytheon.edex.meteolib/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - com.raytheon.edex.meteolib - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/edexOsgi/com.raytheon.edex.meteolib/.settings/org.eclipse.jdt.core.prefs b/edexOsgi/com.raytheon.edex.meteolib/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 781f8e73df..0000000000 --- a/edexOsgi/com.raytheon.edex.meteolib/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,7 +0,0 @@ -#Thu Mar 26 10:15:25 CDT 2009 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.compliance=1.6 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.6 diff --git a/edexOsgi/com.raytheon.edex.meteolib/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.edex.meteolib/META-INF/MANIFEST.MF deleted file mode 100644 index 3bb3e77af9..0000000000 --- a/edexOsgi/com.raytheon.edex.meteolib/META-INF/MANIFEST.MF +++ /dev/null @@ -1,14 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Meteolib Plug-in -Bundle-SymbolicName: com.raytheon.edex.meteolib -Bundle-Version: 1.12.1174.qualifier -Bundle-Vendor: RAYTHEON -Require-Bundle: meteolib.jni, - org.jep;bundle-version="1.0.0", - com.raytheon.uf.common.localization;bundle-version="1.10.7", - com.raytheon.uf.common.status;bundle-version="1.10.7", - com.raytheon.uf.common.python;bundle-version="1.0.0" -Export-Package: com.raytheon.edex.meteoLib -Bundle-ClassPath: . -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 diff --git a/edexOsgi/com.raytheon.edex.meteolib/build.properties b/edexOsgi/com.raytheon.edex.meteolib/build.properties deleted file mode 100644 index 34d2e4d2da..0000000000 --- a/edexOsgi/com.raytheon.edex.meteolib/build.properties +++ /dev/null @@ -1,4 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = META-INF/,\ - . diff --git a/edexOsgi/com.raytheon.edex.meteolib/com.raytheon.edex.meteolib.ecl b/edexOsgi/com.raytheon.edex.meteolib/com.raytheon.edex.meteolib.ecl deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/edexOsgi/com.raytheon.edex.meteolib/src/com/raytheon/edex/meteoLib/Controller.java b/edexOsgi/com.raytheon.edex.meteolib/src/com/raytheon/edex/meteoLib/Controller.java deleted file mode 100644 index 12aa0020b0..0000000000 --- a/edexOsgi/com.raytheon.edex.meteolib/src/com/raytheon/edex/meteoLib/Controller.java +++ /dev/null @@ -1,3922 +0,0 @@ -/** - * This software was developed and / or modified by Raytheon Company, - * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * - * U.S. EXPORT CONTROLLED TECHNICAL DATA - * This software product contains export-restricted data whose - * export/transfer/disclosure is restricted by U.S. law. Dissemination - * to non-U.S. persons whether in the United States or abroad requires - * an export license or other authorization. - * - * Contractor Name: Raytheon Company - * Contractor Address: 6825 Pine Street, Suite 340 - * Mail Stop B8 - * Omaha, NE 68106 - * 402.291.0100 - * - * See the AWIPS II Master Rights File ("Master Rights File.pdf") for - * further licensing information. - **/ - -package com.raytheon.edex.meteoLib; - -import java.nio.FloatBuffer; - -import com.raytheon.edex.meteolibrary.Meteolibrary; - -/* - * the Meteolib capabilities. To access capabilities, please call - * Controller.methodName(parameters); - */ - -/** - * - * Interface to native meteolib methods - * - *
- * SOFTWARE HISTORY
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Nov 21, 2007            mnash       Initial creation
- * Jan  9, 2008            njensen     Refactored python interfaces
- * Oct  6, 2009            randerso    Removed python interfaces
- * 
- * - * @version 1.0 - * - * Check each function for units to match those originally in legacy - * code. If units are not given, units were not given in legacy code. - */ -public class Controller { - - /** - * Main Description : Adds two arrays to each other and finds the sum - * of each field - * - * @param first_array - * @param second_array - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @param tmode - * @return result
- *
- * - * result is the computed array - */ - public static float[] add_aray(float[] first_array, float[] second_array, - int totalDimension, int IGridDimension, int JGridDimension, - int tmode) { - float[] result = new float[totalDimension]; - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - int mode[] = { tmode }; - Meteolibrary.add_aray(first_array, 0, second_array, 0, result, 0, mni, - 0, ni, 0, nj, 0, mode, 0); - return result; - } - - /** - * Main Description : Adds a constant to each value in an array - * - * @param array - * @param const_to_add - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @return result
- *
- * - * result is the computed array - */ - public static float[] add_by_cnst(float[] array, float const_to_add, - int totalDimension, int IGridDimension, int JGridDimension) { - float[] result = new float[totalDimension]; - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - float cnst[] = { const_to_add }; - Meteolibrary.add_by_cnst(array, 0, cnst, 0, result, 0, mni, 0, ni, 0, - nj, 0); - return result; - } - - /** - * Main Description : This routine calculates the equivalent - * tempurature of a temperature and pressure using the adiabatic definition, - * assuming saturation put a fudge factor into L/cp to get agreement of - * moist adiabats with a published thermodynamic diagram - * - * @param temp - * (K) - * @param press - * (mb) - * @return Moist_Adiabatic_Temperature
- *
- * - */ - public static float adiabatic_te(float temp, float press) { - float ttemp[] = { temp }; - float tpress[] = { press }; - return Meteolibrary.adiabatic_te(ttemp, 0, tpress, 0); - } - - /** - * Main Description : Converts elevation and altimeter setting to - * pressure - * - * @param altSetting - * (X) - * @param elevation - * (m) - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @return pressure (X)
- *
- * - */ - public static float[] alt2press(float[] altSetting, float[] elevation, - int totalDimension, int IGridDimension, int JGridDimension) { - float[] pressure = new float[totalDimension]; - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - Meteolibrary.alt2press(altSetting, 0, elevation, 0, mni, 0, ni, 0, nj, - 0, pressure, 0); - return pressure; - } - - /** - * Main Description : Calculates layer mean wind given top and bottom - * of the layer defined in terms of kilometers above ground level - * - * @param elevation - * (m agl) - * @param topWindLayer - * (km agl) - * @param bottomWindLayer - * (km agl) - * @param windLevelHeights - * (m asl) - * @param windLevelPressure - * @param windLevelTemp - * (K) - * @param windLevelUComp - * (m/s) - * @param windLevelVComp - * (m/s) - * @param numWindLevels - * @param layerMeanUComp - * @param layerMeanVComp - * @param layerMeanWindDir - * (deg) - * @param layerMeanWindSpd - * (m/s)
- *
- * - * layerMeanUComp, layerMeanVComp, layerMeanWindDir, and - * layerMeanWindSpd are output arrays - */ - public static WindComp avwind(float elevation, float topWindLayer, - float bottomWindLayer, float[] windLevelHeights, - float[] windLevelPressure, float[] windLevelTemp, - float[] windLevelUComp, float[] windLevelVComp) { - WindComp wind = new WindComp(); - float elev[] = { elevation }; - float top[] = { topWindLayer }; - float bottom[] = { bottomWindLayer }; - int nw[] = { windLevelUComp.length }; - float uavg[] = new float[1]; - float vavg[] = new float[1]; - float avdir[] = new float[1]; - float avspd[] = new float[1]; - Meteolibrary.avwind(elev, 0, top, 0, bottom, 0, windLevelHeights, 0, - windLevelPressure, 0, windLevelTemp, 0, windLevelUComp, 0, - windLevelVComp, 0, nw, 0, uavg, 0, vavg, 0, avdir, 0, avspd, 0); - wind.setWindDirection(avdir[0]); - wind.setWindSpeed(avspd[0]); - wind.setUComp(uavg[0]); - wind.setVComp(vavg[0]); - return wind; - } - - /** - * Main Description : Calculates the heat index using temperature and - * dewpoint in Celsius - * - * @param temperature - * (C) - * @param dewPoint - * (C) - * @return Heat_Index (C)
- *
- * Bail out if temperature < 80F or dewpoint is missing. Lans' - * formula really doesn't work well below 80F, and there's not much - * point in calculating it. - */ - public static float calcHeatIndex(float temperature, float dewPoint) { - return Meteolibrary.calcHeatIndex(temperature, dewPoint); - } - - /** - * Main Description : Calculates the wind chill from temperature and - * wind speed - * - * @param temperature - * (C) - * @param windSpd - * (km/h) - * @return Wind_Chill (C)
- *
- * Arbitrarily do the calculation only for temps at or below 60F
- * no chilling if wind speed < 6.44km/h
- * peg speed at = 128.75 km/h - */ - public static float calcWindChill(float temperature, float windSpd) { - return Meteolibrary.calcWindChill(temperature, windSpd); - } - - /** - * Main Description : Calculate condensation pressure from pressure, - * temperature, and relative humidity - * - * @param pressure - * (mb) - * @param temperature - * (K) - * @param relativeHumidity - * (0...100) - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @return condensationPressure (mb)
- *
- * condensationPressure is the computed array - */ - public static float[] calccondpr(float[] pressure, float[] temperature, - float[] relativeHumidity, int totalDimension, int IGridDimension, - int JGridDimension) { - float[] condensationPressure = new float[totalDimension]; - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - Meteolibrary.calccondpr(pressure, 0, temperature, 0, relativeHumidity, - 0, mni, 0, ni, 0, nj, 0, condensationPressure, 0); - return condensationPressure; - } - - /** - * Main Description : Calculates condensation pressure deficit from - * pressure, temperature, and relative humidity - * - * @param pressure - * (mb) - * @param temperature - * (K) - * @param relativeHumidity - * (0...100) - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @return condensationPressureDeficit (mb)
- *
- * condensationPressureDeficit is the computed array - */ - public static float[] calccondprdef(float[] pressure, float[] temperature, - float[] relativeHumidity, int totalDimension, int IGridDimension, - int JGridDimension) { - float[] condensationPressureDeficit = new float[totalDimension]; - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - Meteolibrary.calccondprdef(pressure, 0, temperature, 0, - relativeHumidity, 0, mni, 0, ni, 0, nj, 0, - condensationPressureDeficit, 0); - return condensationPressureDeficit; - } - - /** - * Main Description : Calculates dewpoint depression from temperature - * and relative humidity - * - * @param temperature - * (K) - * @param relativeHumidity - * (0...100) - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @return dewpointDepression
- *
- * dewpointDepression is the computed array - */ - public static float[] calcdpd(float[] temperature, - float[] relativeHumidity, int totalDimension, int IGridDimension, - int JGridDimension) { - float[] dewpointDepression = new float[totalDimension]; - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - Meteolibrary.calcdpd(temperature, 0, relativeHumidity, 0, mni, 0, ni, - 0, nj, 0, dewpointDepression, 0); - return dewpointDepression; - } - - /** - * Main Description : Calculates storm relative helicity from the - * surface to 3000 meters - * - * @param windLevelHeights - * (m asl) - * @param windLevelPressures - * (mb) - * @param windLevelUComp - * (m/s) - * @param windLevelVComp - * (m/s) - * @param elevation - * (m agl) - * @param topHelicityLayer - * (m agl) - * @param tghx - * @param tghy - * @param avgWindDir - * (deg) - * @param avgWindSpd - * (m/s) - * @return wind (object with - * stormMotionDir,stormMotionSpd,helicity,stormRelativeHelicity - * (m2/s2))
- *
- * - * stormMotionDir (30 deg right of avgWindDir), stormMotionSpd (75% - * avgWindSpd), and stormRelativeHelicity are computed values
- * Values are calculated 0-6km - */ - public static WindComp calchelicity(float[] windLevelHeights, - float[] windLevelPressures, float[] windLevelUComp, - float[] windLevelVComp, float elevation, float topHelicityLayer, - float[] ghx, float[] ghy, float avgWindDir, float avgWindSpd) { - WindComp wind = new WindComp(); - int nw[] = { windLevelUComp.length }; - float elev[] = { elevation }; - float ztop[] = { topHelicityLayer }; - // float ghx[] = new float[1]; - // float ghy[] = new float[1]; - float diravg[] = { avgWindDir }; - float spdavg[] = { avgWindSpd }; - float stmdir[] = new float[1]; - float stmspd[] = new float[1]; - float thelicity[] = new float[1]; - float SRHel[] = new float[1]; - Meteolibrary.calchelicity(windLevelHeights, 0, windLevelPressures, 0, - windLevelUComp, 0, windLevelVComp, 0, nw, 0, elev, 0, ztop, 0, - ghx, 0, ghy, 0, diravg, 0, spdavg, 0, stmdir, 0, stmspd, 0, - thelicity, 0, SRHel, 0); - wind.setStormMotionDir(stmdir[0]); - wind.setStormMotionSpd(stmspd[0]); - wind.setHelicity(thelicity[0]); - wind.setStormRelativeHelicity(SRHel[0]); - return wind; - } - - /** - * Main Description : Calculates the K index - * - * @param pressure - * (mb) - * @param temperature - * @param dewpoint - * @param numOfLevel - * @return K_Index
- *
- * k is computed value - */ - public static float calckidx(float pressure, float temperature, - float dewpoint, int numOfLevel) { - float k = 0; - float press[] = { pressure }; - float temp[] = { temperature }; - float ttd[] = { dewpoint }; - float tk[] = { k }; - Meteolibrary.calckidx(press, 0, temp, 0, ttd, 0, numOfLevel, tk, 0); - return tk[0]; - } - - /** - * Main Description : Calculates the lifted index from the pressure, - * temperature, and relative humidity at 500mb - * - * @param pressure - * (mb) - * @param temperature - * (K) - * @param relativeHumidity - * (0...100) - * @param tempAt500 - * (K) - * @param upperPressure - * (normally 500mb) - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @return liftedIndex (C)
- *
- * lifted index is the computed array - */ - public static float[] calcli(float[] pressure, float[] temperature, - float[] relativeHumidity, float[] tempAt500, float upperPressure, - int totalDimension, int IGridDimension, int JGridDimension) { - float[] liftedIndex = new float[totalDimension]; - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - float up[] = { upperPressure }; - Meteolibrary.calcli(pressure, 0, temperature, 0, relativeHumidity, 0, - tempAt500, 0, up, 0, mni, 0, ni, 0, nj, 0, liftedIndex, 0); - return liftedIndex; - } - - /** - * Main Description : Calculates the isentropic potential vorticity - * through the layer - * - * @param upperIsentropePressure - * (mb) - * @param currentIsentropePressure - * (mb) - * @param upperIsentrope - * (K) - * @param currentIsentrope - * (K) - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @param uWindsUpperIsentrope - * (m/s) - * @param vWindsUpperIsentrope - * (m/s) - * @param uWindsLowerIsentrope - * (m/s) - * @param vWindsLowerIsentrope - * (m/s) - * @param array1AbsVorticity - * (/s) - * @param array2AbsVorticity - * (/s) - * @param xGridInterval - * (m) - * @param yGridInterval - * (m) - * @param coriolisParam - * (/s) - * @return potentialVoritcity (K/mb/s)
- *
- * 1. Stability is defined as -dP/d(theta). We calculate this - * through the layer from the isentropic surface 'n' to the surface - * above it, 'n+1'.
- * 2. Since we are dealing with a layer, we calculate a mean - * absolute vorticity using the winds at the upper and lower layers.
- * 3. The PV is then [mean abs. vort.]/[stability] - */ - public static float[] calcpv(float[] upperIsentropePressure, - float[] currentIsentropePressure, float upperIsentrope, - float currentIsentrope, int totalDimension, int IGridDimension, - int JGridDimension, float[] uWindsUpperIsentrope, - float[] vWindsUpperIsentrope, float[] uWindsLowerIsentrope, - float[] vWindsLowerIsentrope, float[] array1AbsVorticity, - float[] array2AbsVorticity, float[] xGridInterval, - float[] yGridInterval, float[] coriolisParam) { - float[] potentialVorticity = new float[upperIsentropePressure.length]; - float o_low[] = { currentIsentrope }; - float o_up[] = { upperIsentrope }; - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - Meteolibrary.calcpv(upperIsentropePressure, 0, - currentIsentropePressure, 0, o_up, 0, o_low, 0, - potentialVorticity, 0, mni, 0, ni, 0, nj, 0, - uWindsUpperIsentrope, 0, vWindsUpperIsentrope, 0, - uWindsLowerIsentrope, 0, vWindsLowerIsentrope, 0, - array1AbsVorticity, 0, array2AbsVorticity, 0, xGridInterval, 0, - yGridInterval, 0, coriolisParam, 0); - return potentialVorticity; - } - - /** - * Main Description : Calculates the relative humidity from - * temperature and dewpoint - * - * @param temperature - * (C or K) - * @param dewpoint - * (C or K) - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @return relativeHumidity (0...100)
- *
- * relativeHumidity is the computed array - */ - public static float[] calcrh(float[] temperature, float[] dewpoint, - int totalDimension, int IGridDimension, int JGridDimension) { - float[] relativeHumidity = new float[totalDimension]; - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - Meteolibrary.calcrh(temperature, 0, dewpoint, 0, mni, 0, ni, 0, nj, 0, - relativeHumidity, 0); - return relativeHumidity; - } - - /** - * Main Description : Calculates relative humdity from pressure, - * temperature and specific humidity - * - * @param pressure - * (mb) - * @param temperature - * (K) - * @param specificHumidity - * (g/Kg) - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @return relativeHumidity (0...100)
- *
- * relativeHumidity is the computed array - */ - public static float[] calcrh2(float[] pressure, float[] temperature, - float[] specificHumidity, int totalDimension, int IGridDimension, - int JGridDimension) { - float[] relativeHumidity = new float[totalDimension]; - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - Meteolibrary.calcrh2(pressure, 0, temperature, 0, specificHumidity, 0, - mni, 0, ni, 0, nj, 0, relativeHumidity, 0); - return relativeHumidity; - } - - /** - * Main Description : Calculates dewpoint from temperature and - * relative humidity - * - * @param temperature - * (K) - * @param relativeHumidity - * (0...100) - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @return dewpoint (K)
- *
- * dewpoint is the computed array - */ - public static float[] calctd(float[] temperature, float[] relativeHumidity, - int totalDimension, int IGridDimension, int JGridDimension) { - float[] dewpoint = new float[totalDimension]; - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - Meteolibrary.calctd(temperature, 0, relativeHumidity, 0, mni, 0, ni, 0, - nj, 0, dewpoint, 0); - return dewpoint; - } - - /** - * Main Description : Calculates dewpoint from pressure, temperature, - * and specific humidity - * - * @param pressure - * (mb) - * @param temperature - * (K) - * @param specificHumidity - * (g/Kg) - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @return dewpoint (K)
- *
- * dewpoint is the computed array - */ - public static float[] calctd2(float[] pressure, float[] temperature, - float[] specificHumidity, int IGridDimension, int JGridDimension) { - float[] dewpoint = new float[IGridDimension * JGridDimension]; - int mni[] = { IGridDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - Meteolibrary.calctd2(pressure, 0, temperature, 0, specificHumidity, 0, - mni, 0, ni, 0, nj, 0, dewpoint, 0); - return dewpoint; - } - - /** - * Main Description : Calculates equivalent potential temperature - * from pressure, temperature, and relative humidity - * - * @param pressure - * (mb) - * @param temperature - * (C or K) - * @param relativeHumidity - * (0...100) - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @return thetae (K)
- *
- * thetae is the computed array - */ - public static float[] calcthetae(float[] pressure, float[] temperature, - float[] relativeHumidity, int totalDimension, int IGridDimension, - int JGridDimension) { - float[] thetae = new float[totalDimension]; - int mni[] = { totalDimension }; - int[] ni = { IGridDimension }; - int nj[] = { JGridDimension }; - Meteolibrary.calcthetae(pressure, 0, temperature, 0, relativeHumidity, - 0, mni, 0, ni, 0, nj, 0, thetae, 0); - return thetae; - } - - /** - * Main Description : Calculates equivalent potential temperature - * from pressure, temperature, and dewpoint - * - * @param pressure - * (mb) - * @param temperature - * (C or K) - * @param dewpoint - * (C or K) - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @return thetae (K)
- *
- * thetae is the computed array - */ - public static float[] calcthetae2(float[] pressure, float[] temperature, - float[] dewpoint, int totalDimension, int IGridDimension, - int JGridDimension) { - float[] thetae = new float[totalDimension]; - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - Meteolibrary.calcthetae2(pressure, 0, temperature, 0, dewpoint, 0, mni, - 0, ni, 0, nj, 0, thetae, 0); - return thetae; - } - - /** - * Main Description : Calculates the total index - * - * @param pressure - * (mb) - * @param temperature - * @param dewpoint - * @param numOfLevel - * @return Total_Index
- *
- * total is the computed value - */ - public static float calctotidx(float pressure, float temperature, - float dewpoint, int numOfLevel) { - float total = 0; - float press[] = { pressure }; - float temp[] = { temperature }; - float td[] = { dewpoint }; - float ttotal[] = { total }; - Meteolibrary - .calctotidx(press, 0, temp, 0, td, 0, numOfLevel, ttotal, 0); - return ttotal[0]; - } - - /** - * Main Description : Calculates the virtual temperature from the - * pressure, temperature, and relative humidity - * - * @param pressure - * (mb) - * @param temperature - * (K) - * @param relativeHumidity - * (0...100) - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @return virtualTemperature
- *
- * virtualTemperature is the computed array - */ - public static float[] calctv(float[] pressure, float[] temperature, - float[] relativeHumidity, int totalDimension, int IGridDimension, - int JGridDimension) { - float[] virtualTemperature = new float[totalDimension]; - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - Meteolibrary.calctv(pressure, 0, temperature, 0, relativeHumidity, 0, - mni, 0, ni, 0, nj, 0, virtualTemperature, 0); - return virtualTemperature; - } - - /** - * Main Description : Calculates virtual temperature from temperature - * and specific humidity - * - * @param temperature - * (K) - * @param specificHumidity - * (g/kg) - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @return virtualTemperature (K)
- *
- * virtualtemperature is the computed array - */ - public static float[] calctv2(float[] temperature, - float[] specificHumidity, int totalDimension, int IGridDimension, - int JGridDimension) { - float[] virtualTemperature = new float[totalDimension]; - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - Meteolibrary.calctv2(temperature, 0, specificHumidity, 0, mni, 0, ni, - 0, nj, 0, virtualTemperature, 0); - return virtualTemperature; - } - - /** - * Main Description : Calculates wet bulb temperature from - * temperature and relative humidity - * - * @param pressure - * (mb) - * @param temperature - * (K) - * @param relativeHumidity - * (0...100) - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @return wetBulbTemp (K)
- *
- * wetBulbTemp is the computed array - */ - public static float[] calctw(float[] pressure, float[] temperature, - float[] relativeHumidity, int totalDimension, int IGridDimension, - int JGridDimension) { - float[] wetBulbTemp = new float[totalDimension]; - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - Meteolibrary.calctw(pressure, 0, temperature, 0, relativeHumidity, 0, - mni, 0, ni, 0, nj, 0, wetBulbTemp, 0); - return wetBulbTemp; - } - - /** - * ** NO INFORMATION WAS GIVEN ON PARAMETERS AND/OR UNITS OF SAID - * PARAMETERS, THEREFORE INFORMATION IS RETRIEVED PENDING CORRECT PARAMETERS - * ** - * - * @param usetv - * @param p_dat - * @param tve_dat - * @param p0 - * @param th0 - * @param sh0 - * @return - */ - public static PHT capeFunc(float usetv, float[] p_dat, float[] tve_dat, - float p0, float th0, float sh0, int mnx, int nx, int ny, int nz) { - PHT pht = new PHT(); - - FloatBuffer[] tp_dat = { FloatBuffer.wrap(p_dat) }; - FloatBuffer[] ttve_dat = { FloatBuffer.wrap(tve_dat) }; - float[] tp0 = { p0 }; - float[] tth0 = { th0 }; - float[] tsh0 = { sh0 }; - float[] cape_dat = new float[1]; - float[] cin_dat = new float[1]; - Meteolibrary.capeFunc(usetv, tp_dat, ttve_dat, tp0, 0, tth0, 0, tsh0, - 0, mnx, nx, ny, nz, cape_dat, 0, cin_dat, 0); - - pht.setPositiveEnergy(cape_dat[0]); - pht.setCin(cin_dat[0]); - return pht; - } - - /** - * Main Description : Calculates the pressure, height, and - * temperature of the Convective Condensation Level (CCL) from a sounding - * - * @param mixRatio - * (g/kg) - * @param soundingPressure - * (mb) - * @param soundingHeight - * (m asl) - * @param soundingTemperature - * (K) - * @param numSoundingLevels - * @param convectiveCondensationLevelPressure - * (mb) - * @param convectiveCondensationLevelTemperature - * (K) - * @param convectiveCondensationLevelHeight - * (m asl)
- *
- * 1) The low level mean mixing ratio is input to this routine... - * computed outside.
- * 2) On days with a strong low level inversion, the convective - * temperature may seem low because the strict definition is used - * in the computation (i.e., where the low level mixing ratio - * line first intersects the sounding).
- * convectiveCondensationLevelPressure, - * convectiveCondensationLevelTemperature, and - * convectiveCondensationLevelHeight are all the computed values - */ - public static PHT cclpar(float mixRatio, float[] soundingPressure, - float[] soundingHeight, float[] soundingTemperature) { - PHT pht = new PHT(); - float mix[] = { mixRatio }; - float pccl[] = new float[1]; - float tccl[] = new float[1]; - float hccl[] = new float[1]; - int nlvls[] = { soundingTemperature.length }; - Meteolibrary.cclpar(mix, 0, soundingPressure, 0, soundingHeight, 0, - soundingTemperature, 0, nlvls, 0, pccl, 0, tccl, 0, hccl, 0); - // System.out.println("sp is " + soundingPressure + "\nsh is : " + - pht.setPressure(pccl[0]); - pht.setHeight(hccl[0]); - pht.setTemperature(tccl[0]); - return pht; - } - - /** - * Main Description : Calculates the convective gust potential based - * on Western Region Technical Attachments - * - * @param temperature - * (K) - * @param dewpoint - * (K) - * @param pressure - * (mb) - * @param wetBulbTemp - * (K) - * @param surfacePressure - * (mb) - * @param lastPressure - * (mb) - * @param mixRatio - * (>0 water, <0 ice) - * @param pressureIncrement - * (mb) - * @return Convective_Gust_Potential (1,2,3,4)
- *
- * All Measurements on the uniform pressure grid
- *
- * - * The original algorithm lifted the 500 mb parcel and used the 700 - * mb dewpoint depression. Here we find the most unstable parcel - * "near" 500 mb and the driest parcel "near" 700 mb. We also need - * the environmental temperature "near" 300 mb and 400 mb. "Near" at - * 500 and 700 mb means a 60 mb interval (470-530 mb, 670-730 mb) or - * a deltap interval if the interpolated data is too coarse. "Near" - * at 300 and 400 mb means a 20 mb interval (290-310 mb, 390-410 mb) - * or a deltap interval if interpolated data is too coarse. This - * section determines the intervals.
- *
- * - * Now that the intervals to find things have been determined, find - * the most unstable parcel defined as that parcel with the highest - * wet bulb potential temperature. Also, find the parcel with the - * largest dew point depression and the pressure levels - * corresponding to the near 300 and near 400 mb temperatures.
- *
- * - * Lift the most unstable parcel found above to its LCL. Then lift - * it pseudo-moist adiabatically up to "near" 400 mb then from there - * up to "near" 300 mb. Compare these lifted parcel temperatures to - * the environmental temperatures at these levels to calculate the - * upper stability index.
- *
- * - * Convective_Gust_Potential is the returned value at an integer 1, - * 2, 3, or 4 - */ - public static float cgp(float[] temperature, float[] dewpoint, - float[] pressure, float[] wetBulbTemp, float surfacePressure, - float lastPressure, int mixRatio, float pressureIncrement) { - float sfcpres[] = { surfacePressure }; - float toppres[] = { lastPressure }; - int iw[] = { mixRatio }; - float deltap[] = { pressureIncrement }; - return Meteolibrary.cgp(temperature, 0, dewpoint, 0, pressure, 0, - wetBulbTemp, 0, sfcpres, 0, toppres, 0, iw, 0, deltap, 0); - } - - /** - * Main Description : Calculates component of the first vector in the - * direction of the second - * - * @param xComponent - * @param yComponent - * @param x2Component - * @param y2Component - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @param tcontrol - * @return wind (object with compFirstInSecond and compFirstInKDir)
- *
- * - * tcontrol : Number of degrees to rotate second vector before it is - * dotted with the first vector. If not an integer, then do not - * normalize by the magnitude of the second vector. If thousands - * place is one, output component unsigned. If thousands place is - * two output the component as a vector, with comp being the x - * component and comp2 being the y-component. If thousands place is - * three output a second component in comp2, in the direction of the - * k-cross of second vector.
- *
- * - * compFirstInSecond and compFirstInKDir are computed arrays - */ - public static WindComp comp_by(float[] xComponent, float[] yComponent, - float[] x2Component, float[] y2Component, int totalDimension, - int IGridDimension, int JGridDimension, float tcontrol) { - WindComp wind = new WindComp(); - float[] comp = new float[xComponent.length]; - float[] comp2 = new float[xComponent.length]; - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - float control[] = { tcontrol }; - Meteolibrary.comp_by(xComponent, 0, yComponent, 0, x2Component, 0, - y2Component, 0, mni, 0, ni, 0, nj, 0, control, 0, comp, 0, - comp2, 0); - wind.setCompFirstInKDir(comp2); - wind.setCompFirstInSecond(comp); - return wind; - } - - /** - * Main Description : Crosses a field of vectors by another - * - * @param vectorArrayAX - * @param vectorArrayAY - * @param vectorArrayBX - * @param vectorArrayBY - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @return result
- *
- * result is the computed array - */ - public static float[] crossvectors(float[] vectorArrayAX, - float[] vectorArrayAY, float[] vectorArrayBX, - float[] vectorArrayBY, int totalDimension, int IGridDimension, - int JGridDimension) { - float[] result = new float[totalDimension]; - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - Meteolibrary.crossvectors(vectorArrayAX, 0, vectorArrayAY, 0, - vectorArrayBX, 0, vectorArrayBY, 0, result, 0, mni, 0, ni, 0, - nj, 0); - return result; - } - - /** - * Main Description : Estimates the cloud top based on undiluted - * parcel vertical velocity profile - * - * @param parcelPressure - * (mb) - * @param parcelHeight - * (m asl) - * @param parcelVertVelocity - * (m/s) - * @param equilibriumPressure - * (mb) - * @param numParcelLevels - * @return cloudTop (m asl)
- *
- * 1) The estimated cloud top is the level where the vertical - * velocity drops to zero above the equilibrium level.
- * 2) If the parcel vertical velocity does not drop to zero, a value - * of 99999 is returned for the cloud top...meaning that the top is - * above the top of the sounding.
- * estimatedCloudtop is computed value - */ - public static float ctop(float[] parcelPressure, float[] parcelHeight, - float[] parcelVertVelocity, float equilibriumPressure, - int numParcelLevels) { - float peqlev[] = { equilibriumPressure }; - int npar[] = { numParcelLevels }; - float cldtop[] = new float[1]; - Meteolibrary.ctop(parcelPressure, 0, parcelHeight, 0, - parcelVertVelocity, 0, peqlev, 0, npar, 0, cldtop, 0); - return cldtop[0]; - } - - /** - * Main Description : Calculates Julian day from input dates - * - * @param year - * @param month - * @param day - * @param istatus - * @return jd[0]
- *
- * Julian_Day is the computed value
- * Julian_Day is an integer form of the current day in the form - * [ddd]. - */ - public static int cv_date2jul(int year, int month, int day, int istatus) { - int julianDay = 0; - int yr[] = { year }; - int mon[] = { month }; - int tday[] = { day }; - int jd[] = { julianDay }; - int tistatus[] = { istatus }; - Meteolibrary.cv_date2jul(yr, 0, mon, 0, tday, 0, jd, 0, tistatus, 0); - return jd[0]; - } - - /** - * Main Description : Compute the convective gust potential by - * locating the 700 mb dewpoint depression and the upper level stability - * index on the nomogram presented in Western Region Technical Attachment - * 76-14 (June, 1976). - * - * @param dewpointDepression700mb - * (C) - * @param upperLevelStabIndex - * (C) - * @return microburstPotential
- *
- * Microburst potential index as follows:
- * 1 = gusts less than 30 kt (low level too moist)
- * 2 = gusts less than 30 kt (upper level too stable)
- * 3 = gusts 30 to 40 kt possible
- * 4 = gusts greater than 40 kt possible
- */ - public static int cvgust(float dewpointDepression700mb, - float upperLevelStabIndex, int microburstPotential) { - float dd7[] = { dewpointDepression700mb }; - float ui[] = { upperLevelStabIndex }; - int gstpot[] = { microburstPotential }; - Meteolibrary.cvgust(dd7, 0, ui, 0, gstpot, 0); - return gstpot[0]; - } - - /** - * Main Description : Calculates the wind direction (deg) and speed - * given rectangular wind components - * - * @param uWindComp - * @param vWindComp - * @param numWindLevels - * @return wind (object containing direction and speed)
- *
- * User may use this routine to convert only one set of components - * by passing a value of 1 for numWindLevels.
- *
- * - * windDir and windSpd are computed arrays - */ - public static WindComp ddff(float[] uWindComp, float[] vWindComp, - int numWindLevels) { - WindComp wind = new WindComp(); - float[] windDir = new float[uWindComp.length]; - float[] windSpd = new float[uWindComp.length]; - int nlvls[] = { numWindLevels }; - Meteolibrary.ddff(uWindComp, 0, vWindComp, 0, windDir, 0, windSpd, 0, - nlvls, 0); - wind.setWindDirectionArray(windDir); - wind.setWindSpeedArray(windSpd); - return wind; - } - - /** - * Main Description : Calculates the dry adiabat from the initial - * parcel pressure to the LCL and the moist adiabat above the LCL. These two - * curves define the path of a lifted parcel - * - * @param tempAtLCL - * (K) - * @param pressureAtLCL - * (mb) - * @return weather (object with dryAdiabatLCL(K) and moistAdiabatLCL (K))
- *
- * dryAdiabatLCL and moistAdiabatLCL are the compute values - */ - public static PHT deftrk(float tempAtLCL, float pressureAtLCL) { - PHT weather = new PHT(); - float moistAdiabatLCL = 0; - float dryAdiabatLCL = 0; - float tcb[] = { tempAtLCL }; - float pcb[] = { pressureAtLCL }; - float thdpar[] = { dryAdiabatLCL }; - float eptpar[] = { moistAdiabatLCL }; - Meteolibrary.deftrk(tcb, 0, pcb, 0, thdpar, 0, eptpar, 0); - weather.setDryAdiabat(thdpar[0]); - weather.setMoistAdiabat(eptpar[0]); - return weather; - } - - /** - * Main Description : Calculates the air density at each level of a - * sounding - * - * @param pressure - * (mb) - * @param virtualTemperature - * (C) - * @param numLevels - * @return airDensity (kg/cu m)
- *
- * airDensity (rho) is the computed array - */ - public static float[] density(float[] pressure, float[] virtualTemperature) { - int numLevels = virtualTemperature.length; - float[] airDensity = new float[numLevels]; - int nlvls[] = { numLevels }; - - Meteolibrary.density(pressure, 0, virtualTemperature, 0, nlvls, 0, - airDensity, 0); - - return airDensity; - } - - /** - * Main Description : Calculate the derivateive of a with respect to - * b - * - * @param a1 - * @param a2 - * @param b1 - * @param b2 - * @return result - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - *
- *
- * result is the computed array - */ - public static float[] derivative(float[] a1, float[] a2, float[] b1, - float[] b2, int totalDimension, int IGridDimension, - int JGridDimension) { - float[] result = new float[totalDimension]; - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - Meteolibrary.derivative(a1, 0, a2, 0, b1, 0, b2, 0, result, 0, mni, 0, - ni, 0, nj, 0); - return result; - } - - /** - * Main Description:
- * - * Computes a smoothed array. The xoff,yoff and nx,ny parameters allow a - * subgrid to be specified. - * - * @param input - * input data - * @param npts - * smoothing distance in grid cells - * @param mnx - * x dimension of input grid - * @param xoff - * x index of starting grid cell to be processed - * @param yoff - * y index of starting grid cell to be processed - * @param nx - * number of cells in x direction to be processed - * @param ny - * number of cells in y direction to be processed - * @return output data - */ - public synchronized static float[] dist_filter(float[] input, float npts, - int mnx, int xoff, int yoff, int nx, int ny) { - - float tnpts[] = { npts }; - int tmnx[] = { mnx }; - int tnx[] = { nx }; - int tny[] = { ny }; - float output[] = new float[input.length]; - int offset = yoff * mnx + xoff; - Meteolibrary.dist_filter(input, offset, tnpts, 0, output, offset, tmnx, - 0, tnx, 0, tny, 0); - - return output; - } - - /** - * Main Description : Divide one field by another. Each i,j in one - * array is divided by the corresponding i,j in the other array - * - * @param a - * @param b - * @return result - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - *
- *
- * result = a/b
- * result is the computed array - */ - public static float[] div_aray(float[] a, float[] b, int totalDimension, - int IGridDimension, int JGridDimension) { - float[] result = new float[totalDimension]; - int[] mni = { totalDimension }; - int[] ni = { IGridDimension }; - int[] nj = { JGridDimension }; - Meteolibrary.div_aray(a, 0, b, 0, result, 0, mni, 0, ni, 0, nj, 0); - return result; - } - - /** - * Main Description : Calculates the water vapor mixing ratio with - * respect to either water or ice. - * - * @param temperature - * (K) - * @param pressure - * (mb) - * @param iceOrWater - * (>0 mixing ratio water, <0 mixing ratio ice) - * @return Mixing_Ratio(g/kg)
- *
- * Mixing Ratio is the computed value - */ - public static float dmixr(float temperature, float pressure, int iceOrWater) { - float temp[] = { temperature }; - float pres[] = { pressure }; - int iw[] = { iceOrWater }; - return Meteolibrary.dmixr(temp, 0, pres, 0, iw, 0); - } - - /** - * Main Description : Dot a field of vectors by another. Each i,j in - * one array of vectors is dotted with the corresponding i,j in the other - * array of vectors - * - * @param ax - * @param ay - * @param bx - * @param by - * @return result - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - *
- *
- * ax, ay, bx, by are arrays of vectors
- * result is the computed array - */ - public static float[] dotvectors(float[] ax, float[] ay, float[] bx, - float[] by, int totalDimension, int IGridDimension, - int JGridDimension) { - float[] result = new float[totalDimension]; - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - Meteolibrary.dotvectors(ax, 0, ay, 0, bx, 0, by, 0, result, 0, mni, 0, - ni, 0, nj, 0); - return result; - } - - /** - * Main Description : Calculates the rate of change of height versus - * the log of pressure - * - * @param pressure - * (mb) - * @param temperature - * (C or K) - * @param dewpoint - * (same as temperature) - * @return Height_Rate_Of_Change
- *
- */ - public static float dzdlnp(float pressure, float temperature, float dewpoint) { - float p[] = { pressure }; - float t[] = { temperature }; - float td[] = { dewpoint }; - return Meteolibrary.dzdlnp(p, 0, t, 0, td, 0); - } - - /** - * Main Description : Approximates the mixing ratio (g of water vapor - * per kg of dry air) given pressure (mb) and the temperature (C) - * - * @param temperature - * (C) - * @param dewpoint - * (C) - * @param pressure - * (mb) - * @return Mixing_Ratio (g/kg)
- *
- */ - public static float ept(float temperature, float dewpoint, float pressure) { - float t[] = { temperature }; - float td[] = { dewpoint }; - float p[] = { pressure }; - return Meteolibrary.ept(t, 0, td, 0, p, 0); - } - - /** - * Main Description : This routine computes the pressure, height, and - * temperature of the equilibrium level, defined as the level where a - * parcel, rising from the level of free convection, intersects the sounding - * and becomes negatively buoyant. - * - * @param pressure - * (mb) - * @param height - * (m asl) - * @param parcelTemp - * (K) - * @param enviroTemp - * (K) - * @param pressureLFC - * (mb) - * @param potentialTemp - * (K) - * @param numLevels - * @return weather (object with - * equilibriumLevelPressure(mb),equilibriumLevelHeight(m - * asl),equilibriumLevelTemperature(K))
- *
- * equilibriumLevelPressure, equilibriumLevelHeight, and - * equilibriumLevelTemperature are the computed values - */ - public static PHT eqlev(float[] pressure, float[] height, - float[] parcelTemp, float[] enviroTemp, float pressureLFC, - float potentialTemp, int numLevels) { - PHT weather = new PHT(); - float equilibriumLevelPressure = 0; - float equilibriumLevelHeight = 0; - float equilibriumLevelTemperature = 0; - float plfc[] = { pressureLFC }; - float eptpar[] = { potentialTemp }; - int npar[] = { numLevels }; - float peqlev[] = { equilibriumLevelPressure }; - float heqlev[] = { equilibriumLevelHeight }; - float teqlev[] = { equilibriumLevelTemperature }; - Meteolibrary - .eqlev(pressure, 0, height, 0, parcelTemp, 0, enviroTemp, 0, - plfc, 0, eptpar, 0, npar, 0, peqlev, 0, heqlev, 0, - teqlev, 0); - weather.setPressure(peqlev[0]); - weather.setTemperature(teqlev[0]); - weather.setHeight(heqlev[0]); - return weather; - } - - /** - * Main Description : Calculates sounding temperature and dewpoint - * data at pressure intervals given by pressureInterval - * - * @param pressureInterval - * (mb) - * @param pressure - * (mb) - * @param height - * (m) - * @param temperature - * (K) - * @param dewpoint - * (K) - * @param numLevels - * @param pressureAtInterval - * (mb) - * @param heightAtInterval - * (m) - * @param temperatureAtInterval - * (K) - * @param dewpointAtInterval - * (K) - * @param newNumLevels - *
- *
- * heightAtInterval,temperatureAtInterval,dewpointAtInterval, and - * newNumLevels are computed arrays/values - */ - public static PHT eqp(float pressureInterval, float[] pressure, - float[] height, float[] temperature, float[] dewpoint, - int numLevels, float[] pressureAtInterval, - float[] heightAtInterval, float[] temperatureAtInterval, - float[] dewpointAtInterval, int newNumLevels) { - PHT weather = new PHT(); - - float deltap[] = { pressureInterval }; - int n[] = { numLevels }; - int nn[] = { newNumLevels }; - Meteolibrary.eqp(deltap, 0, deltap, 0, height, 0, temperature, 0, - dewpoint, 0, n, 0, pressureAtInterval, 0, heightAtInterval, 0, - temperatureAtInterval, 0, dewpointAtInterval, 0, nn, 0); - weather.setPressureArray(pressureAtInterval); - weather.setTemperatureArray(temperatureAtInterval); - weather.setDewpointArray(dewpointAtInterval); - weather.setNumLevels(newNumLevels); - return weather; - } - - /** - * Main Description : Calculates saturation vapor pressure in - * millibars as a function of either Kelvin of Celsius temperature. - * - * @param temperature - * (K or C) - * @return
- *
- * Is based upon a variation of the integrated form of the - * Clausius-Clapeyron equation. Has an additional linear term in it - * and is fit to data in the Smithsonian Meterological Tables. Is - * accurate to one part in a thousand over the range from -25C to - * +35C. Its main advantage is that it is invertable.
- *
- */ - public static float esat(float temperature) { - float[] temp = { temperature }; - return Meteolibrary.esat(temp, 0); - } - - /** - * Main Description : Calculates the exponential of a field - * - * @param a - * @return result - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - *
- *
- * result = exp(a) OR b = Math.exp(a)
- * result is computed array - */ - public static float[] exp_aray(float[] a, int totalDimension, - int IGridDimension, int JGridDimension) { - float[] result = new float[totalDimension]; - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - Meteolibrary.exp_aray(a, 0, result, 0, mni, 0, ni, 0, nj, 0); - return result; - } - - /** - * Main Description : This routine computes the divergence of the - * normal-to-isotherm component of the Q-vector for a specified layer in the - * atmosphere. - * - * @param zmid - * @param topHeightGridPoint - * (m asl) - * @param bottomHeightGridPoint - * (m asl) - * @param topHeightPressureLevel - * (mb) - * @param bottomHeightPressureLevel - * (mb) - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @param gridSpacingX - * (m) - * @param gridSpacingY - * (m) - * @param coriolisParam - * (/s) - * @param fnx - * @param fny - * @param w1 - * @param dtdx - * @param dtdy - * @param qVectorXWorkArray - * @param qVectorYWorkArray - * @return fnVectorDivergence (K/m^2/s)
- *
- * fnx, fny, w1, dtdx, dtdy, qVectorXWorkArray, qVectorYWorkArray - * are all work arrays
- *
- * fnVectorDivergence is the computed array - */ - public static float[] fndiverg(float[] zmid, float[] topHeightGridPoint, - float[] bottomHeightGridPoint, float topHeightPressureLevel, - float bottomHeightPressureLevel, int totalDimension, - int IGridDimension, int JGridDimension, float[] gridSpacingX, - float[] gridSpacingY, float[] coriolisParam, float[] fnx, - float[] fny, float[] w1, float[] dtdx, float[] dtdy, - float[] qVectorXWorkArray, float[] qVectorYWorkArray) { - float[] fnVectorDivergence = new float[totalDimension]; - float ptop[] = { topHeightPressureLevel }; - float pbot[] = { bottomHeightPressureLevel }; - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - Meteolibrary.fndiverg(zmid, 0, topHeightGridPoint, 0, - bottomHeightGridPoint, 0, ptop, 0, pbot, 0, mni, 0, ni, 0, nj, - 0, gridSpacingX, 0, gridSpacingY, 0, coriolisParam, 0, fnx, 0, - fny, 0, w1, 0, dtdx, 0, dtdy, 0, qVectorXWorkArray, 0, - qVectorYWorkArray, 0, fnVectorDivergence, 0); - return fnVectorDivergence; - } - - /** - * Main Description : Forecast the maximum temperature for a sounding - * station givent he 12Z sounding and the thermodynamic profile - * - * @param year - * @param month - * @param day - * @param hour - * @param minute - * @param ICAOIdentifier - * @param snowDepth - * (in) - * @param latitude - * (deg) - * @param longitude - * (deg) - * @param pressure - * (mb) - * @param height - * (m) - * @param temperature - * (K) - * @param dewpoint - * (K) - * @param numLevels - * @return weather (object with forecastMaximum(K) status)
- *
- * 1) The maximum temperature in this model is computed based only - * on radiative heating/cooling therefore the technique may be - * expected perform poorly under the following conditions: a) over - * or near large bodies of water due to lack of heat storage b) over - * wet soil due to lack of evaportation c) when a different air mass - * is advected into the area during the time of radiative heating - * (i.e. between 12Z and mid afternoon) d) when an inversion is - * eroded away by mountain wave activity (dynamically) rather than - * by solar heating (thermodynamically).
- * - * forecastMaximum and status are the computed values - */ - public static float forecast(int year, int month, int day, int hour, - int minute, String ICAOIdentifier, int snowDepth, float latitude, - float longitude, float[] pressure, float[] height, - float[] temperature, float[] dewpoint) { - int yr[] = { year }; - int mon[] = { month }; - int tday[] = { day }; - int thour[] = { hour }; - int min[] = { minute }; - byte icao[] = ICAOIdentifier.getBytes(); - int snow[] = { snowDepth }; - float slat[] = { latitude }; - float slon[] = { longitude }; - float p[] = pressure; - float ht[] = height; - float t[] = temperature; - float td[] = dewpoint; - int nlvls[] = { temperature.length }; - float ftmax[] = new float[1]; - int tstatus[] = new int[1]; - Meteolibrary.forecast(yr, 0, mon, 0, tday, 0, thour, 0, min, 0, icao, - 0, snow, 0, slat, 0, slon, 0, p, 0, ht, 0, t, 0, td, 0, nlvls, - 0, ftmax, 0, tstatus, 0); - return ftmax[0]; - } - - /** - * Assumes user sets up world coordinates from 1.0 to float(nx) and 1.0 to - * float(ny). - * - * @param contourArray - * Array to contour - * @param workspace - * Workspace. - * @param totalDimension - * First dimension of input arrays. - * @param IGridDimension - * First (horizontal) dimension of input grid. - * @param JGridDimension - * Second (vertical) dimension of input grid. - * @param scale - * Contour grid as if it were multiplied by this .... - * @param offset - * and then added to by this before contouring. - * @param mode - * If mode<0 then -mode is approximate number of contours and - * seed is minimum contour increment. If mode=0 then seed is - * contour increment. If mode>0 seed is array of contour values - * to use, mode is number of contours. - * @param contourControl - * Value(s) that control contouring (see mode). - * @param xpoints - * x-coords in grid space of contours. - * @param ypoints - * y-coords in grid space of contours. - * @param numBufferPoints - * Number of points in the buffer. - * @param badlow - * Smallest - * @param badhigh - * and largest values which will be ignored upon contouring. If - * badlow>badhigh, then no missing value handling is done. - * @return status Logically true if input was meaningful - */ - public static int fortconbuf(float[] contourArray, int[] workspace, - int totalDimension, int IGridDimension, int JGridDimension, - float scale, float offset, int mode, float[] contourControl, - float[] xpoints, float[] ypoints, int[] numBufferPoints, - float badlow, float badhigh) { - int status = 0; - int mnx[] = { totalDimension }; - int nx[] = { IGridDimension }; - int ny[] = { JGridDimension }; - float tscale[] = { scale }; - float toffset[] = { offset }; - int tmode[] = { mode }; - float badlo[] = { badlow }; - float badhi[] = { badhigh }; - int tstatus[] = { status }; - Meteolibrary.fortconbuf(contourArray, 0, workspace, 0, mnx, 0, nx, 0, - ny, 0, tscale, 0, toffset, 0, tmode, 0, contourControl, 0, - xpoints, 0, ypoints, 0, numBufferPoints, 0, badlo, 0, badhi, 0, - tstatus, 0); - return status; - } - - /** - * Main Description : Calculates the QG frontogenesis function - * througout a specified pressure layer - * - * @param heightMid - * (m asl) - * @param heightTop - * (m asl) - * @param heightBottom - * (m asl) - * @param topPressure - * (mb) - * @param bottomPressure - * (mb) - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @param gridSpacingX - * (m) - * @param gridSpacingY - * (m) - * @param coriolisParam - * (/s) - * @param w1 - * @param w2 - * @param w3 - * @param dtdx - * @param dtdy - * @param qVectorArrayX - * @param qVectorArrayY - * @return fgen
- *
- * - * fgen is the compted array - */ - public static float[] frontogen(float[] heightMid, float[] heightTop, - float[] heightBottom, float topPressure, float bottomPressure, - int totalDimension, int IGridDimension, int JGridDimension, - float[] gridSpacingX, float[] gridSpacingY, float[] coriolisParam, - float[] w1, float[] w2, float[] w3, float[] dtdx, float[] dtdy, - float[] qVectorArrayX, float[] qVectorArrayY) { - float[] fgen = new float[totalDimension]; - float ptop[] = { topPressure }; - float pbot[] = { bottomPressure }; - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - Meteolibrary.frontogen(heightMid, 0, heightTop, 0, heightBottom, 0, - ptop, 0, pbot, 0, mni, 0, ni, 0, nj, 0, gridSpacingX, 0, - gridSpacingY, 0, coriolisParam, 0, w1, 0, w2, 0, w3, 0, dtdx, - 0, dtdy, 0, qVectorArrayX, 0, qVectorArrayY, 0, fgen, 0); - return fgen; - } - - /** - * Main Description : Calculates the pressure and height of the - * freezing level in a sounding - * - * @param elevation - * @param pressure - * @param height - * @param temperature - * @param numLevels - * @return weather (object holding pressure and height)
- *
- * pressureFrzLvl and heightFrzLvl are the computed values - */ - public static PHT frzlev(float elevation, float[] pressure, float[] height, - float[] temperature) { - float pressureFrzLvl = 0; - float heightFrzLvl = 0; - float elev[] = { elevation }; - int hlvls[] = { temperature.length }; - float pfrz[] = { pressureFrzLvl }; - float hfrz[] = { heightFrzLvl }; - Meteolibrary.frzlev(elev, 0, pressure, 0, height, 0, temperature, 0, - hlvls, 0, pfrz, 0, hfrz, 0); - PHT weather = new PHT(); - weather.setPressure(pfrz[0]); - weather.setHeight(hfrz[0]); - return weather; - } - - /** - * Main Description : Calculates the divergence of the along-isotherm - * component of the q-vector for a specified layer in the atmosphere - * - * @param midHeight - * (m asl) - * @param topHeight - * (m asl) - * @param bottomHeight - * (m asl) - * @param topPressure - * (mb) - * @param bottomPressure - * (mb) - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @param gridSpacingX - * (m) - * @param gridSpacingY - * (m) - * @param coriolisParam - * (/s) - * @param fsx - * @param fsy - * @param w1 - * @param dtdx - * @param dtdy - * @param qVectorArrayX - * @param qVectorArrayY - * @return fsVectorDiverg (K/m^2/s)
- *
- * fsVectorDiverg is the computed array - */ - public static float[] fsdiverg(float[] midHeight, float[] topHeight, - float[] bottomHeight, float topPressure, float bottomPressure, - int totalDimension, int IGridDimension, int JGridDimension, - float[] gridSpacingX, float[] gridSpacingY, float[] coriolisParam, - float[] fsx, float[] fsy, float[] w1, float[] dtdx, float[] dtdy, - float[] qVectorArrayX, float[] qVectorArrayY) { - float[] fsVectorDiverg = new float[totalDimension]; - float pbot[] = { bottomPressure }; - float ptop[] = { topPressure }; - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - Meteolibrary.fsdiverg(midHeight, 0, topHeight, 0, bottomHeight, 0, - ptop, 0, pbot, 0, mni, 0, ni, 0, nj, 0, gridSpacingX, 0, - gridSpacingY, 0, coriolisParam, 0, fsx, 0, fsy, 0, w1, 0, dtdx, - 0, dtdy, 0, qVectorArrayX, 0, qVectorArrayY, 0, fsVectorDiverg, - 0); - return fsVectorDiverg; - } - - /** - * Main Description : - * - * @param uComp - * @param vComp - * @param arrayParam - * @param gridSpacingX - * @param gridSpacingY - * @param totalDimensionX - * @param totalDimensionY - * @param IGridDimension - * @param JGridDimension - * @param choice - * @param scalar - *
- *
- * choice=1, vorticity;
- * choice=2, divergence, ignore Q;
- * choice=3, vorticity advection;
- * choice=4, divergence of Q;
- * choice=5, advection of Q.
- * choice=6, laplacian of Q, ignore U and V.
- * choice=7, Scalar is input, ignore Q, work back to d/dx in U - * and d/dy in V.
- * choice=8, Scalar is height, Q is coriolis, work back to Ug and - * Vg.
- * choice=9, Total deformation into scalar.
- * choice=10, Deformation components, Scalar is x comp and Q is y - * comp.
- * choice=11, Scalar is height, Q is coriolis, geo def in Udx.
- * choice=12, Scalar is height, Q is coriolis, work back to geo - * def vectors.
- * choice=13, Scalar is height, Q is coriolis, input wind - * components changed to Uag and Vag.
- * choice=14, Scalar is input, U and V is ridge/trough vector.
- * choice=15, Scalar is input, U and V is ridge vector.
- * choice=16, Scalar is input, U and V is trough vector.
- * choice=17, U and V is input, Scalar is vector continuity.
- *
- * Note for options one and three:
- * To work with relative vorticity, fill first level of array Q - * with zeroes. For absolute vorticity, fill first level of Q - * with coriolis parameter values. - */ - public static void g2gkinematics(float[] uComp, float[] vComp, - float[] arrayParam, float[] gridSpacingX, float[] gridSpacingY, - int totalDimensionX, int totalDimensionY, int IGridDimension, - int JGridDimension, int choice, float[] scalar) { - int mnx[] = { totalDimensionX }; - int mny[] = { totalDimensionY }; - int nx[] = { IGridDimension }; - int ny[] = { JGridDimension }; - int tchoice[] = { choice }; - Meteolibrary.g2gkinematics(uComp, 0, vComp, 0, arrayParam, 0, - gridSpacingX, 0, gridSpacingY, 0, mnx, 0, mny, 0, nx, 0, ny, 0, - tchoice, 0, scalar, 0); - return; - } - - /** - * Main Description : Calculates the convective gust potential - * - * @param pressure - * (mb) - * @param temperature - * @param dewpoint - * @param numPoints - * @return gustPotential
- *
- */ - public static int gusts(float[] pressure, float[] temperature, - float[] dewpoint) { - int np[] = { temperature.length }; - int gstpot[] = new int[1]; - Meteolibrary.gusts(pressure, 0, temperature, 0, dewpoint, 0, np, 0, - gstpot, 0); - return gstpot[0]; - } - - /** - * Main Description : Calculates the largest hailstone that can be - * supported by the undiluted parcel updraft - * - * @param vertVelocity - * @return maxSize (cm)
- *
- */ - public static float hailsiz(float vertVelocity) { - float vvmax[] = { vertVelocity }; - float hsize[] = new float[1]; - Meteolibrary.hailsiz(vvmax, 0, hsize, 0); - return hsize[0]; - } - - /** - * Main Description : Calculates the pressure given the height based - * on a standard atmosphere - * - * @param height - * (m) - * @param totalDimension - * @return pressure (mb)
- *
- */ - public static float hgt2pres(float height) { - float[] input = new float[] { height }; - float[] pressure = new float[1]; - int mni[] = { 1 }; - int ni[] = { 1 }; - int nj[] = { 1 }; - Meteolibrary.hgt2pres(input, 0, pressure, 0, mni, 0, ni, 0, nj, 0); - return pressure[0]; - } - - /** - * Main Description : Does interpolation on given inputs - * - * @param pressure1 - * (mb) - * @param pressure2 - * (mb) - * @param temp1 - * (K) - * @param temp2 - * (K) - * @param dewpoint1 - * (K) - * @param dewpoint2 - * (K) - * @param levelP - * @param interTemp - * (K) - * @param interDewpoint - * (K) - * - */ - public static PHT interp(float pressure1, float pressure2, float temp1, - float temp2, float dewpoint1, float dewpoint2, float levelP, - float interTemp, float interDewpoint) { - PHT inter = new PHT(); - float interT[] = { interTemp }; - float interTD[] = { interDewpoint }; - Meteolibrary.interp(pressure1, pressure2, temp1, temp2, dewpoint1, - dewpoint2, levelP, interT, 0, interTD, 0); - inter.setTemperature(interT[0]); - inter.setDewpoint(interTD[0]); - return inter; - } - - /** - * Main Description : Interpolates y2 given y1 at x1 and y3 at x3 - * - * @param y1 - * @param y3 - * @param x1 - * @param x2 - * @param x3 - * @return y2 (using the interp1 function) - * - */ - public static float interp1(float y1, float y3, float x1, float x2, float x3) { - float y2 = 0; - float arg0[] = { y1 }; - float arg1[] = { y3 }; - float arg2[] = { x1 }; - float arg3[] = { x2 }; - float arg4[] = { x3 }; - y2 = Meteolibrary.interp1(arg0, 0, arg1, 0, arg2, 0, arg3, 0, arg4, 0); - return y2; - } - - /** - * Main Description : Interplates data between the level of free - * convection and the equilibrium level to a finer resolution for the - * compuation of positive energy - * - * @param thickness - * @param height - * (m asl) - * @param pressure - * (mb) - * @param temperature - * (C) - * @param numLevels - * - */ - public static PHT intpos(float thickness, float[] height, float[] pressure, - float[] temperature, int numLevels) { - PHT weather = new PHT(); - float vdif[] = { thickness }; - int nlvls[] = { numLevels }; - Meteolibrary.intpos(vdif, 0, height, 0, pressure, 0, temperature, 0, - nlvls, 0); - weather.setHeightArray(height); - weather.setPressureArray(pressure); - weather.setTemperatureArray(temperature); - weather.setNumLevels(nlvls[0]); - return weather; - } - - /** - * Main Description : - * - * @param tlo - * @param pzlo - * @param thi - * @param pzhi - * @param tvc - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @return lapse - * - */ - public static float[] lapserate(float[] tlo, float[] pzlo, float[] thi, - float[] pzhi, int tvc, int totalDimension, int IGridDimension, - int JGridDimension, float[] lapse) { - int vc[] = { tvc }; - int mnx[] = { totalDimension }; - int nx[] = { IGridDimension }; - int ny[] = { JGridDimension }; - Meteolibrary.lapserate(tlo, 0, pzlo, 0, thi, 0, pzhi, 0, vc, 0, mnx, 0, - nx, 0, ny, 0, lapse, 0); - return lapse; - } - - /** - * Main Description : Calculates the pressure, height, and - * temperature of the lifting condensation level (LCL) from a sounding - * - * @param mixRatio - * (g/kg) - * @param surfaceTemp - * (K) - * @param pressure - * (mb) - * @param height - * (m asl) - * @param temperature - * (K) - * @param dewpoint - * (K) - * @param numLevels - * @return weather (object with - * liftingCondensationPressure(mb),liftingCondensationTemperature - * (K),liftingCondensationHeight(m asl))
- *
- * liftingCondensationPressure, liftingCondensationTemperature, and - * liftingCondensationHeight are the computed arrays - */ - public static PHT lclpar(float mixRatio, float surfaceTemp, - float[] pressure, float[] height, float[] temperature, - float[] dewpoint) { - - PHT weather = new PHT(); - float mix[] = { mixRatio }; - float ts[] = { surfaceTemp }; - float plcl[] = new float[1]; - float tlcl[] = new float[1]; - float hlcl[] = new float[1]; - int nlvls[] = { temperature.length }; - Meteolibrary.lclpar(mix, 0, ts, 0, pressure, 0, height, 0, temperature, - 0, dewpoint, 0, nlvls, 0, plcl, 0, tlcl, 0, hlcl, 0); - weather.setPressure(plcl[0]); - weather.setTemperature(tlcl[0]); - weather.setHeight(hlcl[0]); - return weather; - } - - /** - * Main Description : Calculates the level of free convection of a - * rising parcel. - * - * @param moistAdiabat - * (K) - * @param LCLPressure - * (mb) - * @param LCLTemperature - * (K) - * @param LCLHeight - * (m asl) - * @param parcelTemp - * (K) - * @param soundingTemp - * (K) - * @param liftedParcelPressure - * (mb) - * @param liftedParcelHeight - * (m asl) - * @param numLevels - * @return weather(object with - * levelFreeConvectionPressure1(mb),levelFreeConvectionHeight1(m - * asl) - * ,levelFreeConvectionTemp1(K),levelFreeConvectionPressure2(mb), - * levelFreeConvectionHeight2(m asl),levelFreeConvectionTemp2(K))
- *
- */ - public static PHT lfcpar(float moistAdiabat, float LCLPressure, - float LCLTemperature, float LCLHeight, float[] parcelTemp, - float[] soundingTemp, float[] liftedParcelPressure, - float[] liftedParcelHeight, int numParcelLevels) { - float levelFreeConvectionPressure1 = 0; - float levelFreeConvectionHeight1 = 0; - float levelFreeConvectionTemp1 = 0; - float levelFreeConvectionPressure2 = 0; - float levelFreeConvectionHeight2 = 0; - float levelFreeConvectionTemp2 = 0; - PHT weather = new PHT(); - float eptpar[] = { moistAdiabat }; - float pcb[] = { LCLPressure }; - float tcb[] = { LCLTemperature }; - float hcb[] = { LCLHeight }; - int npar[] = { numParcelLevels }; - float plfc1[] = { levelFreeConvectionPressure1 }; - float hlfc1[] = { levelFreeConvectionHeight1 }; - float tlfc1[] = { levelFreeConvectionTemp1 }; - float plfc2[] = { levelFreeConvectionPressure2 }; - float hlfc2[] = { levelFreeConvectionHeight2 }; - float tlfc2[] = { levelFreeConvectionTemp2 }; - Meteolibrary.lfcpar(eptpar, 0, pcb, 0, tcb, 0, hcb, 0, parcelTemp, 0, - soundingTemp, 0, liftedParcelPressure, 0, liftedParcelHeight, - 0, npar, 0, plfc1, 0, hlfc1, 0, tlfc1, 0, plfc2, 0, hlfc2, 0, - tlfc2, 0); - weather.setPressure(plfc1[0]); - weather.setPressure1(plfc2[0]); - weather.setTemperature(tlfc1[0]); - weather.setTemperature1(tlfc2[0]); - weather.setHeight(hlfc1[0]); - weather.setHeight1(hlfc2[0]); - return weather; - } - - /** - * Main Description : Calculate lifted parcel arrays and - * corresponding environmental arrays such that an exact one-to-one - * correspondance exists between lifted parcel parameters and envrironmental - * parameters. - * - * @param pressure - * (mb) - * @param temperature - * (K) - * @param height - * (m asl) - * @param virtualTemp - * (K) - * @param numSoundingLevels - * @param numParcelLevels - * @param LCLPressure - * (mb) - * @param LCLHeight - * (m asl) - * @param LCLTemperature - * (K) - * @param LCLMixRatio - * (g/kg) - * @param LCLPotentialTemp - * (K) - * @param LCLEquivTemp - * (K) - * @param InitialParcelPressure - * (mb) - * @param initialParcelTemp - * (K)
- *
- */ - public static PHT liftedp(float[] pressure, float[] temperature, - float[] height, float[] virtualTemp, int numParcelLvls, - float LCLPressure, float LCLHeight, float LCLTemperature, - float LCLMixRatio, float LCLPotentialTemp, float LCLEquivTemp, - float InitialParcelPressure, float initialParcelTemp) { - float[] parcelPress = new float[numParcelLvls]; - float[] parcelHeights = new float[numParcelLvls]; - float[] parcelTemp = new float[numParcelLvls]; - float[] virtualTemps = new float[numParcelLvls]; - float[] soundingTemps = new float[numParcelLvls]; - float[] soundingVirtTemps = new float[numParcelLvls]; - PHT weather = new PHT(); - int nlvls[] = { virtualTemp.length }; - int npar[] = { numParcelLvls }; - float pcb[] = { LCLPressure }; - float hcb[] = { LCLHeight }; - float tcb[] = { LCLTemperature }; - float wcb[] = { LCLMixRatio }; - float thdpar[] = { LCLPotentialTemp }; - float eptpar[] = { LCLEquivTemp }; - float pl[] = { InitialParcelPressure }; - float tl[] = { initialParcelTemp }; - int nparcel[] = new int[1]; - Meteolibrary.liftedp(pressure, 0, temperature, 0, height, 0, - virtualTemp, 0, nlvls, 0, npar, 0, pcb, 0, hcb, 0, tcb, 0, wcb, - 0, thdpar, 0, eptpar, 0, pl, 0, tl, 0, parcelPress, 0, - parcelHeights, 0, parcelTemp, 0, virtualTemps, 0, - soundingTemps, 0, soundingVirtTemps, 0, nparcel, 0); - weather.setPressureArray(parcelPress); - weather.setHeightArray(parcelHeights); - weather.setTemperatureArray(parcelTemp); - weather.setNumLevels(nparcel[0]); - weather.setVirtualTemps(virtualTemps); - weather.setSoundingTemps(soundingTemps); - weather.setSoundingVirtTemps(soundingVirtTemps); - return weather; - } - - /** - * Main Description : Calculates the linear translation on an array. - * Each i,j in the array is multiplied by 'mult' and then added to by 'add' - * - * @param array - * @param mult - * @param add - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @return result
- *
- */ - public static float[] lintrans(float[] array, float mult, float add, - int totalDimension, int IGridDimension, int JGridDimension) { - float[] result = new float[totalDimension]; - float tmult[] = { mult }; - float tadd[] = { add }; - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - Meteolibrary.lintrans(array, 0, tmult, 0, tadd, 0, result, 0, mni, 0, - ni, 0, nj, 0); - return result; - } - - /** - * Main Description : - * - * @param array - * @param yvector - * @param work - * @param soln - * @param sizeOfArrays - * @param sizeOfSystem - * @param status - */ - public static VectorVars matsln(float[] array, float[] yvector, int[] work, - int sizeOfArrays, int sizeOfSystem) { - VectorVars var = new VectorVars(); - int status = 0; - float soln[] = new float[sizeOfSystem]; - int n[] = { sizeOfSystem }; - int mn[] = { sizeOfArrays }; - int ok[] = { status }; - Meteolibrary.matsln(array, 0, yvector, 0, work, 0, soln, 0, mn, 0, n, - 0, ok, 0); - var.setSolutionVector(soln); - var.setStatus(ok[0]); - return var; - } - - /** - * Main Description : Finds the max or min of each i,j in the arrays - * - * @param arrayOne - * @param arrayTwo - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @param tmode - * @return
- *
- * mode > 0 means max
- * mode < 0 means min - */ - public static float[] max_min(float[] arrayOne, float[] arrayTwo, - int totalDimension, int IGridDimension, int JGridDimension, - int tmode) { - float[] result = new float[totalDimension]; - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - int mode[] = { tmode }; - Meteolibrary.max_min(arrayOne, 0, arrayTwo, 0, result, 0, mni, 0, ni, - 0, nj, 0, mode, 0); - return result; - } - - /** - * Main Description : Calculates the mixing ratio from the pressure, - * temperature, and relative humidity - * - * @param pressure - * (mb) - * @param temperature - * (K) - * @param relativeHumidity - * (0...100) - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @return mixRatio (g/kg)
- *
- */ - public static float[] mixrat(float[] pressure, float[] temperature, - float[] relativeHumidity, int totalDimension, int IGridDimension, - int JGridDimension) { - float[] mixRatio = new float[totalDimension]; - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - Meteolibrary.mixrat(pressure, 0, temperature, 0, relativeHumidity, 0, - mni, 0, ni, 0, nj, 0, mixRatio, 0); - return mixRatio; - } - - /** - * Main Description : Estimates 1000 mb to 500 mb thickness from 500 - * height and mean sea level pressure - * - * @param meanSeaLevelPressure - * @param height - * (m) - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @return thickness (mb) - */ - public static float[] mslp2thkns(float[] meanSeaLevelPressure, - float[] height, float[] thickness, int totalDimension, - int IGridDimension, int JGridDimension) { - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - Meteolibrary.mslp2thkns(meanSeaLevelPressure, 0, height, 0, thickness, - 0, mni, 0, ni, 0, nj, 0); - return thickness; - } - - /** - * Main Description : Multiply a field by another. Each i,j in one - * array is multiplied by the corresponding i,j in the other array - * - * @param arrayOne - * @param arrayTwo - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @return result
- *
- * result = a*b - */ - public static float[] mult_aray(float[] arrayOne, float[] arrayTwo, - int totalDimension, int IGridDimension, int JGridDimension) { - float[] result = new float[totalDimension]; - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - Meteolibrary.mult_aray(arrayOne, 0, arrayTwo, 0, result, 0, mni, 0, ni, - 0, nj, 0); - return result; - } - - /** - * Main Description : Multiplies each value in the array by a real - * constant. Each i,j in the array is multiplied by the constant - * - * @param array - * @param cnst - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @return result
- *
- */ - public static float[] mult_by_cnst(float[] array, float cnst, - int totalDimension, int IGridDimension, int JGridDimension) { - float[] result = new float[totalDimension]; - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - float tcnst[] = { cnst }; - Meteolibrary.mult_by_cnst(array, 0, tcnst, 0, result, 0, mni, 0, ni, 0, - nj, 0); - return result; - } - - /** - * Main Description : Forecasts the maximum temperature based on the - * total amount of energy available for heating and sounding temperature - * profile - * - * @param totalHeat - * (*) - * @param pressureIncrement - * @param surfacePressure - * (mb) - * @param pressure2 - * (mb) - * @param interpolatedTemperatureArray - * (C) - * @param thickness - * @param level - * @return forecastMaxTemp (C) - * - */ - public static float mxtp(float totalHeat, float pressureIncrement, - float surfacePressure, float pressure2, - float[] interpolatedTemperatureArray, float[] thickness, int level) { - float forecastMaxTemp = 0.0f; - float ansol[] = { totalHeat }; - float deltap[] = { pressureIncrement }; - float sfcp[] = { surfacePressure }; - float p2[] = { pressure2 }; - int lvl[] = { level }; - float ctmax[] = { forecastMaxTemp }; - Meteolibrary - .mxtp(ansol, 0, deltap, 0, sfcp, 0, p2, 0, - interpolatedTemperatureArray, 0, thickness, 0, lvl, 0, - ctmax, 0); - return forecastMaxTemp; - } - - /** - * Main Description : - * - * @param temperature - * @param dewpoint - * @param pressure - * @return mytw - * - */ - public static float mytw(float temperature, float dewpoint, float pressure) { - float t[] = { temperature }; - float td[] = { dewpoint }; - float p[] = { pressure }; - return Meteolibrary.mytw(t, 0, td, 0, p, 0); - } - - /** - * Main Description : Calculates the non-advective local change of an - * arbitrary conservative parameter - * - * @param uComp - * @param vComp - * @param arbConserveParam - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @param gridSpacingX - * @param gridSpacingY - * @return var (VectorVars object with dadxdt and dadydt)
- *
- * dadxdt and dadydt are computed arrays - */ - public static VectorVars nadgdt(float[] uComp, float[] vComp, - float[] arbConserveParam, int totalDimension, int IGridDimension, - int JGridDimension, float[] gridSpacingX, float[] gridSpacingY) { - VectorVars var = new VectorVars(); - float[] dadxdt = new float[totalDimension]; - float[] dadydt = new float[totalDimension]; - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - Meteolibrary.nadgdt(uComp, 0, vComp, 0, arbConserveParam, 0, mni, 0, - ni, 0, nj, 0, gridSpacingX, 0, gridSpacingY, 0, dadxdt, 0, - dadydt, 0); - var.setDadxdt(dadxdt); - var.setDadydt(dadydt); - return var; - } - - /** - * Main Description : Calculates the natural log of a field. - * - * @param a - * @return b - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - *
- *
- * b = ln(a) - */ - public static float[] natlog(float[] a, int totalDimension, - int IGridDimension, int JGridDimension) { - float[] b = new float[totalDimension]; - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - Meteolibrary.natlog(a, 0, b, 0, mni, 0, ni, 0, nj, 0); - return b; - } - - /** - * Main Description : Calculates the negative buoyant energy between - * the surface and level of free convection in a sounding - * - * @param pcb - * @param tcb - * @param hcb - * @param pressureLFC - * (mb) - * @param heightLFC - * (m asl) - * @param tempLFC - * (C) - * @param thdpar - * @param equivalentPotentialTemp - * (C) - * @param pressure - * (mb) - * @param height - * (m asl) - * @param soundingTemp - * (C) - * @param parcelTemp - * (C) - * @param npar - * @param cinfrmcap - * @return negbuoy[0] - * - */ - public static float negarea(float pcb, float tcb, float hcb, - float pressureLFC, float heightLFC, float tempLFC, float thdpar, - float equivalentPotentialTemp, float[] pressure, float[] height, - float[] soundingTemp, float[] parcelTemp, int npar, float cinfrmcap) { - float negativeEnergy = 0; - float tpcb[] = { pcb }; - float ttcb[] = { tcb }; - float thcb[] = { hcb }; - float plfc[] = { pressureLFC }; - float hlfc[] = { heightLFC }; - float tlfc[] = { tempLFC }; - float tthdpar[] = { thdpar }; - float eptpar[] = { equivalentPotentialTemp }; - int tnpar[] = { npar }; - float tcinfrmcap[] = { cinfrmcap }; - float negbuoy[] = { negativeEnergy }; - Meteolibrary.negarea(tpcb, 0, ttcb, 0, thcb, 0, plfc, 0, hlfc, 0, tlfc, - 0, tthdpar, 0, eptpar, 0, pressure, 0, height, 0, soundingTemp, - 0, parcelTemp, 0, tnpar, 0, tcinfrmcap, 0, negbuoy, 0); - return negbuoy[0]; - } - - /** - * Main Description : Calculates the positive buoyant energy between - * the level of free convection and equilibrium level in a sounding - * - * @param pressureLevelFreeConvection - * (mb) - * @param equilibriumLevel - * (mb) - * @param tempLFC - * (C) - * @param tempEL - * (C) - * @param heightLFC - * (m asl) - * @param heightEL - * (m asl) - * @param equivalentPotentialTemp - * (C) - * @param pressure - * (mb) - * @param height - * (m asl) - * @param soundingTemp - * (C) - * @param parcelTemp - * (C) - * @param numLevels - * @return weather(PHT object with positiveBuoyEnergy(J/kg) and cin) - */ - public static PHT posarea(float pressureLevelFreeConvection, - float equilibriumLevel, float tempLFC, float tempEL, - float heightLFC, float heightEL, float equivalentPotentialTemp, - float[] pressure, float[] height, float[] soundingTemp, - float[] parcelTemp, int numLevels) { - PHT weather = new PHT(); - float positiveBuoyEnergy = 0; - float cin = 0; - float plfc[] = { pressureLevelFreeConvection }; - float peqlev[] = { equilibriumLevel }; - float tlfc[] = { tempLFC }; - float teqlev[] = { tempEL }; - float hlfc[] = { heightLFC }; - float heqlev[] = { heightEL }; - float eptpar[] = { equivalentPotentialTemp }; - int npar[] = { numLevels }; - float buoy[] = { positiveBuoyEnergy }; - float tcin[] = { cin }; - Meteolibrary.posarea(plfc, 0, peqlev, 0, tlfc, 0, teqlev, 0, hlfc, 0, - heqlev, 0, eptpar, 0, pressure, 0, height, 0, soundingTemp, 0, - parcelTemp, 0, npar, 0, buoy, 0, tcin, 0); - weather.setPositiveEnergy(buoy[0]); - weather.setCin(tcin[0]); - return weather; - } - - /** - * Main Description : Calculates the potential temperature - * - * @param temperature - * (K) - * @param dewpoint - * (K) - * @param pressure - * (mb) - * @param mixRatioIce_Water - * @return Potential Temperature (K)
- *
- */ - public static float pottemp(float temperature, float dewpoint, - float pressure, int mixRatioIce_Water) { - float temp[] = { temperature }; - float dwpt[] = { dewpoint }; - float pres[] = { pressure }; - int iw[] = { mixRatioIce_Water }; - return Meteolibrary.pottemp(temp, 0, dwpt, 0, pres, 0, iw, 0); - } - - /** - * Main Description : Raises each item in the field a to the power in - * field b - * - * @param a - * @param b - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @return result
- *
- * result = a^b - */ - public static float[] powercalc(float[] a, float[] b, int totalDimension, - int IGridDimension, int JGridDimension) { - float[] result = new float[totalDimension]; - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - Meteolibrary.powercalc(a, 0, b, 0, result, 0, mni, 0, ni, 0, nj, 0); - return result; - } - - /** - * Main Description : Calculates the temperature along a pseudo-moist - * adiabat by solving, as an initial value problem, the differential - * equation describing the pseudo-moist adiabat. - * - * @param numPoints - * @param initialPressure - * (mb) - * @param finalPressure - * (mb) - * @return result
- *
- * Initial temperature at result[0] - */ - public static float[] pseudolift(int numPoints, float initialPressure, - float finalPressure) { - float[] result = new float[numPoints]; - int n[] = { numPoints }; - float pstart[] = { initialPressure }; - float pfinish[] = { finalPressure }; - Meteolibrary.pseudolift(n, 0, pstart, 0, pfinish, 0, result, 0); - return result; - } - - /** - * Main Description : Calculates the height in a standard atmosphere - * from the pressure in millibars - * - * @param pressure - * (mb)
- *
- */ - public static float ptozsa(float pressure) { - float p[] = { pressure }; - return Meteolibrary.ptozsa(p, 0); - } - - /** - * Main Description : Calculate the value of some parameter in a - * sounding at a given pressure level using log pressure interpolation - * - * @param desiredPressure - * @param soundingPressure - * @param numLevels - * @param param - * @return
- *
- */ - public static float pvalue(float desiredPressure, float[] soundingPressure, - int numLevels, float[] param) { - float tvalue = 0; - float pres[] = { desiredPressure }; - int np[] = { numLevels }; - float value[] = { tvalue }; - Meteolibrary.pvalue(pres, 0, soundingPressure, 0, np, 0, param, 0, - value, 0); - return value[0]; - } - - /** - * Main Description : Calculates the isobaric potential vorticity - * through a layer - * - * @param upperTheta - * (K) - * @param lowerTheta - * (K) - * @param upperPressure - * (mb) - * @param lowerPressure - * (mb) - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @param uUpper - * (m/s) - * @param vUpper - * (m/s) - * @param uLower - * (m/s) - * @param vLower - * (m/s) - * @param avort1 - * @param avort2 - * @param dtdx1 - * @param dtdy1 - * @param dtdx2 - * @param dtdy2 - * @param dx - * @param dy - * @param coriolis - * (/s) - * @return
- *
- */ - public static float[] pvpres(float[] upperTheta, float[] lowerTheta, - float[] upperPressure, float[] lowerPressure, int totalDimension, - int IGridDimension, int JGridDimension, float[] uUpper, - float[] vUpper, float[] uLower, float[] vLower, float[] avort1, - float[] avort2, float[] dtdx1, float[] dtdy1, float[] dtdx2, - float[] dtdy2, float[] dx, float[] dy, float[] coriolis) { - float[] pvort = new float[totalDimension]; - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - Meteolibrary.pvpres(upperTheta, 0, lowerTheta, 0, upperPressure, 0, - lowerPressure, 0, pvort, 0, mni, 0, ni, 0, nj, 0, uUpper, 0, - vUpper, 0, uLower, 0, vLower, 0, avort1, 0, avort2, 0, dtdx1, - 0, dtdy1, 0, dtdx2, 0, dtdy2, 0, dx, 0, dy, 0, coriolis, 0); - return pvort; - } - - /** - * Main Description : Calculates the q-vector components at a - * specified pressure level - * - * @param midHeight - * @param topHeight - * @param bottomHeight - * @param topHeightPressure - * @param bottomHeightPressure - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @param dx - * @param dy - * @param f - * @param dugdx - * @param dvgdx - * @param dugdy - * @param dvgdy - * @param dtdx - * @param dtdy - * @param qx - * @param qy - *
- *
- */ - public static VectorVars qvector(float[] midHeight, float[] topHeight, - float[] bottomHeight, float topHeightPressure, - float bottomHeightPressure, int totalDimension, int IGridDimension, - int JGridDimension, float[] dx, float[] dy, float[] f, - float[] dugdx, float[] dvgdx, float[] dugdy, float[] dvgdy, - float[] dtdx, float[] dtdy, float[] qx, float[] qy) { - VectorVars v = new VectorVars(); - float ptop[] = { topHeightPressure }; - float pbot[] = { bottomHeightPressure }; - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - Meteolibrary.qvector(midHeight, 0, topHeight, 0, bottomHeight, 0, ptop, - 0, pbot, 0, mni, 0, ni, 0, nj, 0, dx, 0, dy, 0, f, 0, dugdx, 0, - dvgdx, 0, dugdy, 0, dvgdy, 0, dtdx, 0, dtdy, 0, qx, 0, qy, 0); - v.setQx(qx); - v.setQy(qy); - return v; - } - - /** - * Main Description : Calculate the mean solar radiation at ground - * - * @param latitude - * @param longitude - * @param longitudeStandardMeridian - * @param julianDay - * @param localTime - * @param rayleightCoeff - * @param opticalDepth - * @return
- *
- */ - public static float radiation(float latitude, float longitude, - float longitudeStandardMeridian, int julianDay, float localTime, - float rayleightCoeff, float opticalDepth) { - float tsolrad = 0; - float lat[] = { latitude }; - float lng[] = { longitude }; - float lsm[] = { longitudeStandardMeridian }; - int jd[] = { julianDay }; - float hr[] = { localTime }; - float bext[] = { rayleightCoeff }; - float od[] = { opticalDepth }; - float solrad[] = { tsolrad }; - Meteolibrary.radiation(lat, 0, lng, 0, lsm, 0, jd, 0, hr, 0, bext, 0, - od, 0, solrad, 0); - return solrad[0]; - } - - /** - * Main Description : Calculates the range of values ina 2D data - * grid, missing data flags not being included - * - * @param data - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @return var (VectorVars object with mindata and maxdata)
- *
- */ - public static VectorVars rang2d(float[] data, int totalDimension, - int IGridDimension, int JGridDimension) { - VectorVars var = new VectorVars(); - float tmindata = 0; - float tmaxdata = 0; - float range = 0; - int mnx[] = { totalDimension }; - int nx[] = { IGridDimension }; - int ny[] = { JGridDimension }; - float mindata[] = { tmindata }; - float maxdata[] = { tmaxdata }; - range = Meteolibrary.rang2d(data, 0, mnx, 0, nx, 0, ny, 0, mindata, 0, - maxdata, 0); - var.setMinimum(mindata[0]); - var.setMaximum(maxdata[0]); - var.setRange(range); - return var; - } - - /** - * Main Description : - * - * @param a - * @param ttsttyp - * @param lo - * @param hi - * @param repl - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @return - */ - public static float[] replinrange(float[] a, int ttsttyp, float[] lo, - float[] hi, float[] repl, int totalDimension, int IGridDimension, - int JGridDimension) { - float[] result = new float[totalDimension]; - int tsttyp[] = { ttsttyp }; - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - Meteolibrary.replinrange(a, 0, tsttyp, 0, lo, 0, hi, 0, repl, 0, - result, 0, mni, 0, ni, 0, nj, 0); - return result; - } - - /** - * Main Description : - * - * @param endlvl - * @param tnclvr - * @param tsfcp - * @param p - * @param tl - * @param tdl - * @return - */ - public static int[] rhbar(float[] endlvl, int tnclvr, float tsfcp, - float[] p, float[] tl, float[] tdl) { - int[] mrh = new int[endlvl.length]; - int nclvr[] = { tnclvr }; - float sfcp[] = { tsfcp }; - Meteolibrary.rhbar(endlvl, 0, mrh, 0, nclvr, 0, sfcp, 0, p, 0, tl, 0, - tdl, 0); - return mrh; - } - - /** - * - * Main Description : Calculate the dimensionless bulk Richardson - * number as defined by Weisman and Klemp (1982) - * - * @param height - * (m asl) - * @param heightWindReport - * (m asl) - * @param uComp - * (m/s) - * @param vComp - * (m/s) - * @param airDensity - * (kg/m^3) - * @param numLevels - * @param numWindLevels - * @param buoyantEnergy - * (J/kg) - * @return
- *
- * Computes the bulk Richardson number - */ - public static float richno(float[] height, float[] heightWindReport, - float[] uComp, float[] vComp, float[] airDensity, int numLvls, - int numWindLvls, float buoyantEnergy) { - int nlvls[] = { numLvls }; - int nw[] = { numWindLvls }; - float buoy[] = { buoyantEnergy }; - float richnum[] = new float[1]; - Meteolibrary.richno(height, 0, heightWindReport, 0, uComp, 0, vComp, 0, - airDensity, 0, nlvls, 0, nw, 0, buoy, 0, richnum, 0); - return richnum[0]; - } - - /** - * Main Description : Rotates a field of vectors "ax", outputing the - * field of vectors "b". An angle of +90 is the same as doing a "k cross" - * operation. - * - * @param ax - * @param ay - * @param angle - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @return var(VectorVars object with bx and by) - */ - public static VectorVars rotvectors(float[] ax, float[] ay, float angle, - int totalDimension, int IGridDimension, int JGridDimension) { - VectorVars var = new VectorVars(); - float[] bx = new float[totalDimension]; - float[] by = new float[totalDimension]; - float tangle[] = { angle }; - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - Meteolibrary.rotvectors(ax, 0, ay, 0, tangle, 0, bx, 0, by, 0, mni, 0, - ni, 0, nj, 0); - var.setBx(bx); - var.setBy(by); - return var; - } - - /** - * Main Description : performs an objective analysis of point data to - * create a grid - * - * NOTE: this routine is not thread safe since it contains a large amount of - * static data - * - * @param xind - * x location of input values in grid cells - * @param yind - * y location of input values in grid cells - * @param values - * input values - * @param nv - * number of input values - * @param nx - * x dimension of output grid - * @param ny - * y dimension of output grid - * @param grid - * output grid - * @return - */ - public static synchronized int scaleless_analysis(float[] xind, - float[] yind, float[] values, int nv, int nx, int ny, float[] grid) { - // validate parameters to avoid overindexing arrays - if (xind.length < nv || yind.length < nv || values.length < nv) { - throw new IndexOutOfBoundsException( - "xind, yind, and values must contain at least tnv entries"); - } - - if (nx * ny > grid.length) { - throw new IndexOutOfBoundsException( - "grid must contain at least tnx*tny entries"); - } - - int tnv[] = { nv }; - int tnx[] = { nx }; - int tny[] = { ny }; - return Meteolibrary.scaleless_analysis(xind, 0, yind, 0, values, 0, - tnv, 0, tnx, 0, tny, 0, grid, 0); - } - - /** - * Main Description : - * - * @param passes - * @param smoothness - * - */ - public static void setqsmooth(int passes, float smoothness) { - int npass[] = { passes }; - float tsmthwgt[] = { smoothness }; - Meteolibrary.setqsmooth(npass, 0, tsmthwgt, 0); - return; - } - - /** - * Main Description : Calculates the QG frontogenesis function on a - * single level using just that level's data - * - * @param height - * (m) - * @param temperature - * (K) - * @param pressure - * (mb) - * @param dx - * (m) - * @param dy - * (m) - * @param coriolis - * (/s) - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @param slqx - * @param slqy - * @param w1 - * @param w2 - * @param w3 - * @param dtdx - * @param dtdy - * @return
- *
- */ - public static float[] slfront(float[] height, float[] temperature, - float pressure, float[] dx, float[] dy, float[] coriolis, - int totalDimension, int IGridDimension, int JGridDimension, - float[] slqx, float[] slqy, float[] w1, float[] w2, float[] w3, - float[] dtdx, float[] dtdy) { - float[] fgen = new float[totalDimension]; - float p[] = { pressure }; - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - Meteolibrary.slfront(height, 0, temperature, 0, p, 0, dx, 0, dy, 0, - coriolis, 0, mni, 0, ni, 0, nj, 0, fgen, 0, slqx, 0, slqy, 0, - w1, 0, w2, 0, w3, 0, dtdx, 0, dtdy, 0); - return fgen; - } - - /** - * Main Description : Calculates the Q vector on a single level using - * just that level's data - * - * @param height - * (m) - * @param temperature - * (K) - * @param pressure - * (mb) - * @param dx - * (mb) - * @param dy - * (mb) - * @param coriolis - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @param dugdx - * @param dugdy - * @param dvgdx - * @param dvgdy - * @param dtdx - * @param dtdy - * @return v (VectorVars object with slqx and slqy)
- *
- */ - public static VectorVars slqvect(float[] height, float[] temperature, - float pressure, float[] dx, float[] dy, float[] coriolis, - int totalDimension, int IGridDimension, int JGridDimension, - float[] dugdx, float[] dugdy, float[] dvgdx, float[] dvgdy, - float[] dtdx, float[] dtdy) { - VectorVars v = new VectorVars(); - float[] slqx = new float[totalDimension]; - float[] slqy = new float[totalDimension]; - float p[] = { pressure }; - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - Meteolibrary.slqvect(height, 0, temperature, 0, p, 0, dx, 0, dy, 0, - coriolis, 0, mni, 0, ni, 0, nj, 0, slqx, 0, slqy, 0, dugdy, 0, - dugdy, 0, dvgdx, 0, dvgdy, 0, dtdx, 0, dtdy, 0); - v.setSlqy(slqy); - v.setSlqx(slqx); - return v; - } - - /** - * Main Description : Calculates the total solar radiation incident - * at the top of the atmosphere (undepleted). - * - * @param julianDay - * @param month - * @param latitude - * (deg) - * @param timeIncrement - * (min) - * @param timeStart - * (hr) - * @param timeStop - * (hr) - * @return solarRadiation (lightyears)
- *
- * time is based on the 24 hour clock - */ - public static float solax(int julianDay, int month, float latitude, - int timeIncrement, int timeStart, int timeStop) { - float solarRadiation = 0; - int julday[] = { julianDay }; - int tmonth[] = { month }; - float tslat[] = { latitude }; - int tyminc[] = { timeIncrement }; - int tstart[] = { timeStart }; - int tstop[] = { timeStop }; - float tsrad[] = { solarRadiation }; - Meteolibrary.solax(julday, 0, tmonth, 0, tslat, 0, tyminc, 0, tstart, - 0, tstop, 0, tsrad, 0); - solarRadiation = tsrad[0]; - return solarRadiation; - } - - /** - * Main Description : Calculates the specific humidity from the - * pressure, temperature, and relative humidity - * - * @param pressure - * (mb) - * @param temperature - * (K) - * @param relativeHumidity - * (0...100) - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @return
- *
- */ - public static float[] spechum(float[] pressure, float[] temperature, - float[] relativeHumidity, int totalDimension, int IGridDimension, - int JGridDimension) { - float[] q = new float[totalDimension]; - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - Meteolibrary.spechum(pressure, 0, temperature, 0, relativeHumidity, 0, - mni, 0, ni, 0, nj, 0, q, 0); - return q; - } - - /** - * Main Description : Calculates the saturation specific humidity - * from the dewpoint and pressure - * - * @param pressure - * (mb) - * @param dewpoint - * (C or K) - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @return
- *
- */ - public static float[] spechum2(float[] pressure, float[] dewpoint) { - int mni[] = { dewpoint.length }; - int ni[] = { dewpoint.length }; - int nj[] = { 1 }; - float[] q = new float[dewpoint.length]; - Meteolibrary.spechum2(pressure, 0, dewpoint, 0, mni, 0, ni, 0, nj, 0, - q, 0); - return q; - } - - /** - * Method call into the strmpak Fortan routine that fills xpoints and - * ypoints with the grid relative points for streamlines. npoints contains - * the number of points for both xpoints and ypoints. - * - * @param uComp - * Float array for the u grid - * @param vComp - * Float array for the v grid - * @param work - * A working array - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @param arrowsize - * @param xpoints - * @param ypoints - * @param npoints - * @param minSpace - * @param maxSpace - * @param badLo - * @param badHi - */ - public static void strmpak(float[] uComp, float[] vComp, int[] work, - int totalDimension, int IGridDimension, int JGridDimension, - float arrowsize, float[] xpoints, float[] ypoints, int[] npoints, - float minSpace, float maxSpace, float badLo, float badHi) { - int mnx[] = { totalDimension }; - int nx[] = { IGridDimension }; - int ny[] = { JGridDimension }; - float arrowSize[] = { arrowsize }; - float min[] = { minSpace }; - float max[] = { maxSpace }; - float badlo[] = { badLo }; - float badhi[] = { badHi }; - Meteolibrary.strmpak(uComp, 0, vComp, 0, work, 0, mnx, 0, nx, 0, ny, 0, - arrowSize, 0, xpoints, 0, ypoints, 0, npoints, 0, min, 0, max, - 0, badlo, 0, badhi, 0); - return; - } - - /** - * Main Description : Takes the difference of the two fields. Each - * i,j of arrayTwo is subtracted from the corresponding i,j of arrayOne - * - * @param arrayOne - * @param arrayTwo - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @return
- *
- * result = arrayOne-arrayTwo - */ - public static float[] sub_aray(float[] arrayOne, float[] arrayTwo, - int totalDimension, int IGridDimension, int JGridDimension) { - float[] result = new float[totalDimension]; - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - Meteolibrary.sub_aray(arrayOne, 0, arrayTwo, 0, result, 0, mni, 0, ni, - 0, nj, 0); - return result; - } - - /** - * Main Description : Calculates the severe weather threat (SWEAT) - * index from sounding data - * - * @param pressure - * (mb) - * @param temperature - * (K) - * @param dewpoint - * (K) - * @param numLevels - * @param windLevelPressures - * (mb) - * @param uComp - * (m/s) - * @param vComp - * (m/s) - * @param numWindLevels - * @return
- *
- */ - public static float sweat(float[] pressure, float[] temperature, - float[] dewpoint, int numLevels, float[] windLevelPressures, - float[] uComp, float[] vComp, int numWindLevels) { - float tswidx = 0; - int nlvls[] = { numLevels }; - int nw[] = { numWindLevels }; - float swidx[] = { tswidx }; - Meteolibrary.sweat(pressure, 0, temperature, 0, dewpoint, 0, nlvls, 0, - windLevelPressures, 0, uComp, 0, vComp, 0, nw, 0, swidx, 0); - return swidx[0]; - } - - /** - * Main Description : Calculates sweat index from the total totals, - * 850 dewpoint, and wind components at 850 and 500. - * - * @param totalTotals - * @param dewpoint850 - * @param uComp850 - * @param vComp850 - * @param uComp500 - * @param vComp500 - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @return
- *
- */ - public static float[] sweatidx(float[] totalTotals, float[] dewpoint850, - float[] uComp850, float[] vComp850, float[] uComp500, - float[] vComp500, int totalDimension, int IGridDimension, - int JGridDimension) { - float[] q = new float[totalDimension]; - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - Meteolibrary.sweatidx(totalTotals, 0, dewpoint850, 0, uComp850, 0, - vComp850, 0, uComp500, 0, vComp500, 0, mni, 0, ni, 0, nj, 0, q, - 0); - return q; - } - - /** - * Main Description : - * - * @param p - * @param taflgp - * @param t - * @param taflgt - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @return - */ - public static float[] temp2theta(float[] p, int taflgp, float[] t, - int taflgt, int totalDimension, int IGridDimension, - int JGridDimension) { - float[] theta = new float[totalDimension]; - int aflgp[] = { taflgp }; - int aflgt[] = { taflgt }; - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - Meteolibrary.temp2theta(p, 0, aflgp, 0, t, 0, aflgt, 0, theta, 0, mni, - 0, ni, 0, nj, 0); - return theta; - } - - /** - * Main Description : Calculate the temperature at a given pressure - * and mixing ratio - * - * @param pressure - * @param mixRatio - * @return
- *
- */ - public static float temp_mixratio(float pressure, float mixRatio) { - float ttempmr = 0; - float press[] = { pressure }; - float mixratio[] = { mixRatio }; - float tempmr[] = { ttempmr }; - Meteolibrary.temp_mixratio(press, 0, mixratio, 0, tempmr, 0); - return tempmr[0]; - } - - /** - * Main Description : Calculates the saturation temperature of an - * equivalent temperature at given pressure using the adiabatic definition - * - * @param temperature - * @param pressure - * @return temp_of_te - * - */ - public static float temp_of_te(float temperature, float pressure) { - float te[] = { temperature }; - float press[] = { pressure }; - return Meteolibrary.temp_of_te(te, 0, press, 0); - } - - /** - * Main Description : - * - * @param p - * @param taflgp - * @param theta - * @param taflgth - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @return - */ - public static float[] theta2temp(float[] p, int taflgp, float[] theta, - int taflgth, int totalDimension, int IGridDimension, - int JGridDimension) { - float[] temp = new float[totalDimension]; - int aflgp[] = { taflgp }; - int aflgth[] = { taflgth }; - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - Meteolibrary.theta2temp(p, 0, aflgp, 0, theta, 0, aflgth, 0, temp, 0, - mni, 0, ni, 0, nj, 0); - return temp; - } - - /** - * Main Description : Calculates the wet bulb potential temperature - * via the adiabatic method - * - * @param temperature - * (C) - * @param dewpoint - * (C) - * @param pressure - * (mb) - * @param ice_water - * (> 0 mixing ratio respect to water, < 0 mixing ration respect - * to ice) - * @return weather (object containing status [completion] and wetBulbTemp) - * - */ - public static PHT thetawa(float temperature, float dewpoint, - float pressure, int ice_water) { - float theta = 0.0f; - int status = 0; - PHT weather = new PHT(); - float temp[] = { temperature }; - float dwpt[] = { dewpoint }; - float pres[] = { pressure }; - int iw[] = { ice_water }; - int ier[] = { status }; - theta = Meteolibrary.thetawa(temp, 0, dwpt, 0, pres, 0, iw, 0, ier, 0); - weather.setCompletion(ier[0]); - weather.setWetBulbTemp(theta); - return weather; - } - - /** - * Main Description : Calculates the totals index, cross totals - * index, and the vertical totals index from a sounding - * - * @param pressure - * (mb) - * @param temperature - * (C) - * @param dewpoint - * (C) - * @param numLevels - * @return i (object containing totalIndex,crosstTotalIndex,and - * verticaltotalsIndex) - * - */ - public static Index totals(float[] pressure, float[] temperature, - float[] dewpoint, int numLevels) { - float totalIndex = 0; - float crossIndex = 0; - float verticalIndex = 0; - Index i = new Index(); - int nlvls[] = { numLevels }; - float totidx[] = { totalIndex }; - float crstot[] = { crossIndex }; - float vertot[] = { verticalIndex }; - Meteolibrary.totals(pressure, 0, temperature, 0, dewpoint, 0, nlvls, 0, - totidx, 0, crstot, 0, vertot, 0); - i.setTotalIndex(totalIndex); - i.setCrossTotalIndex(crossIndex); - i.setVerticalTotalsIndex(verticalIndex); - return i; - } - - /** - * Main Description : Calculate the temperature and pressure at the - * LCL given the parcel's initial temperature, dewpoint, and pressure - * - * @param temperature - * (C) - * @param dewpoint - * (C) - * @param pressure - * @return weather (PHT object containing pressure, temperature, and - * completion)
- *
- * completion > 0 if successful, < 0 if failure - */ - public static PHT tplcl(float temperature, float dewpoint, float pressure) { - PHT weather = new PHT(); - float temperatureLCL = 0; - float pressureLCL = 0; - int completion = 0; - float tk[] = { temperature }; - float td[] = { dewpoint }; - float pinit[] = { pressure }; - float tl[] = { temperatureLCL }; - float pl[] = { pressureLCL }; - int ier[] = { completion }; - Meteolibrary.tplcl(tk, 0, td, 0, pinit, 0, tl, 0, pl, 0, ier, 0); - weather.setPressure(pressureLCL); - weather.setTemperature(temperatureLCL); - weather.setCompletion(completion); - return weather; - } - - /** - * Main Description : Calculate the temperature at the lifted - * condensation level. The computation of equivalent potential temperature - * is solved iteratively using Newton's method. Also calculates the pressure - * at the LCL and the vertical distance to the LCL from the initial lifting - * level - * - * @param temperature - * (K) - * @param dewpoint - * (K) - * @param pressure - * (mb) - * @param ice_water - * (> 0 water, < 0 ice) - * @return weather (object containing pressure,temperature,height, and - * completion) - */ - public static PHT tpzlcl(float temperature, float dewpoint, float pressure, - int ice_water) { - PHT weather = new PHT(); - float temperatureLCL = 0; - float pressureLCL = 0; - float distanceInitial_LCL = 0; - int completion = 0; - float tk[] = { temperature }; - float tdk[] = { dewpoint }; - float pinit[] = { pressure }; - int iw[] = { ice_water }; - float tl[] = { temperatureLCL }; - float pl[] = { pressureLCL }; - float zl[] = { distanceInitial_LCL }; - int ier[] = { completion }; - Meteolibrary.tpzlcl(tk, 0, tdk, 0, pinit, 0, iw, 0, tl, 0, pl, 0, zl, - 0, ier, 0); - weather.setPressure(pl[0]); - weather.setTemperature(tl[0]); - weather.setHeight(zl[0]); - weather.setCompletion(ier[0]); - return weather; - } - - /** - * Main Description : - * - * @param tos - * @param pressure - * @return - */ - public static float tsa(float tos, float pressure) { - float os[] = { tos }; - float pres[] = { pressure }; - return Meteolibrary.tsa(os, 0, pres, 0); - } - - /** - * Main Description : - * - * @param elevation - * @param pressure - * (mb) - * @param height - * (m) - * @param temperature - * (C) - * @param potentialTemperatures - * (C) - * @param numLevels - * @param forecastMaxTemp - * (C) - * @return t (Tsoar object with - * potentialTempForecast(C),heightMaxThermalAlt( - * m),tempMinimumEffectiveConvection - * (C),heightMinimumEffectiveConvection - * (m),tempMaxThermalAlt(C),soarIndex(ft/min),triggerTemperature(C)) - */ - public static Tsoar tsoar(float elevation, float[] pressure, - float[] height, float[] temperature, float[] potentialTemperatures, - float forecastMaxTemp) { - Tsoar t = new Tsoar(); - float potentialTempForecast = 0; - float heightMinimumEffectiveConvection = 0; - float tempMinimumEffectiveConvection = 0; - float heightMaxThermalAlt = 0; - float tempMaxThermalAlt = 0; - float soarIndex = 0; - float triggerTemperature = 0; - float elev[] = { elevation }; - int nl[] = { temperature.length }; - float tpmax[] = { forecastMaxTemp }; - float ptlxec[] = { potentialTempForecast }; - float zlnec[] = { heightMinimumEffectiveConvection }; - float tlnec[] = { tempMinimumEffectiveConvection }; - float zlxec[] = { heightMaxThermalAlt }; - float tlxec[] = { tempMaxThermalAlt }; - float soarindx[] = { soarIndex }; - float trigtemp[] = { triggerTemperature }; - Meteolibrary.tsoar(elev, 0, pressure, 0, height, 0, temperature, 0, - potentialTemperatures, 0, nl, 0, tpmax, 0, ptlxec, 0, zlnec, 0, - tlnec, 0, zlxec, 0, tlxec, 0, soarindx, 0, trigtemp, 0); - t.setPotentialTempForecast(ptlxec[0]); - t.setHeightMinimumEffectiveConvection(zlnec[0]); - t.setTempMinimumEffectiveConvection(tlnec[0]); - t.setHeightMaxThermalAlt(zlxec[0]); - t.setTempMaxThermalAlt(tlxec[0]); - t.setSoarIndex(soarindx[0]); - t.setTriggerTemperature(trigtemp[0]); - return t; - } - - /** - * Main Description : Calculate temperature from the virtual - * temperature and specific humidity - * - * @param virtualTemp - * (K) - * @param specificHumidity - * (g/kg) - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @return t (tv2temp) - * - */ - public static float[] tv2temp(float[] virtualTemp, - float[] specificHumidity, int totalDimension, int IGridDimension, - int JGridDimension) { - float[] t = new float[totalDimension]; - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - Meteolibrary.tv2temp(virtualTemp, 0, specificHumidity, 0, mni, 0, ni, - 0, nj, 0, t, 0); - return t; - } - - /** - * Main Description : Calculates rectangular wind components given - * wind direction and speed - * - * @param windDir - * (deg clockwise from north) - * @param windSpeed - * (m/s) - * @param numLevels - * - */ - public static WindComp uvcomp(float[] windDir, float[] windSpeed) { - float[] uComp = new float[windDir.length]; - float[] vComp = new float[windDir.length]; - WindComp wind = new WindComp(); - int nlvls[] = { windDir.length }; - Meteolibrary.uvcomp(windDir, 0, windSpeed, 0, uComp, 0, vComp, 0, - nlvls, 0); - wind.setUCompArray(uComp); - wind.setVCompArray(vComp); - return wind; - } - - /** - * Main Description : Adds one to each point in count for each point - * in inp that is not marked undefined. If init is non zero, will start with - * count of zero. - * - * @param a - * @param init - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @return count - */ - public static float[] ver_pts(float[] a, int init, int totalDimension, - int IGridDimension, int JGridDimension) { - float[] count = new float[totalDimension]; - int tinit[] = { init }; - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - Meteolibrary.ver_pts(a, 0, count, 0, tinit, 0, mni, 0, ni, 0, nj, 0); - return count; - } - - /** - * Main Description : Calculates virtual temperature as a function of - * temperature, dewpoint, and pressure - * - * @param temperature - * (K) - * @param dewpoint - * (K) - * @param pressure - * (mb) - * @return virttemp - * - */ - public static float virttemp(float temperature, float dewpoint, - float pressure) { - float t[] = { temperature }; - float td[] = { dewpoint }; - float p[] = { pressure }; - return Meteolibrary.virttemp(t, 0, td, 0, p, 0); - } - - /** - * Main Description : Calculates virtual temperature at all sounding - * levels - * - * @param temperature - * (K) - * @param dewpoint - * (K) - * @param pressure - * (mb) - * @param numLevels - * @return tvir (virtualt function) - * - */ - public static float[] virtualt(float[] temperature, float[] dewpoint, - float[] pressure, int numLevels) { - float[] tvir = new float[temperature.length]; - int nlvls[] = { numLevels }; - Meteolibrary.virtualt(temperature, 0, dewpoint, 0, pressure, 0, nlvls, - 0, tvir, 0); - return tvir; - } - - /** - * Main Description : Calculates the vaport pressure using the - * temperature and depending on the user's choice of "for ice" or "for - * water" - * - * @param temperature - * (K) - * @param iceORwater - * (>0 water <0 ice)
- *
- * iceORwater > 0 for vapor pressure with respect to water
- * iceORwater < 0 for vapor pressure with respect to ice
- *
- * vapor pressure is computed and returned - */ - public static float vp(float temperature, int iceORwater) { - float t[] = { temperature }; - int w[] = { iceORwater }; - return Meteolibrary.vp(t, 0, w, 0); - } - - /** - * Main Description : Uses a 1-dimensional cloud model to calculate - * the vertical velocity profile of a lifted parcel - * - * @param pcb - * @param equilibriumLevelPressure - * (mb) - * @param pressure - * (mb) - * @param height - * (m asl) - * @param temperature - * (K) - * @param soundingVirtualTemp - * (K) - * @param parcelVirtualTemp - * (K) - * @param mixRatio - * (g/kg) - * @param numLevels - * @return v (object holding verticalVelocity and maxVerticalVelocity) - * - */ - public static Velocity vvel(float pcb, float equilibriumLevelPressure, - float[] pressure, float[] height, float[] temperature, - float[] soundingVirtualTemp, float[] parcelVirtualTemp, - float mixRatio, int numParcelLvls) { - Velocity v = new Velocity(); - float verticalVelocity[] = new float[temperature.length + 1]; - float vvmax[] = new float[1]; - float tpcb[] = { pcb }; - float peqlev[] = { equilibriumLevelPressure }; - float wlcl[] = { mixRatio }; - int npar[] = { numParcelLvls }; - Meteolibrary.vvel(tpcb, 0, peqlev, 0, pressure, 0, height, 0, - temperature, 0, soundingVirtualTemp, 0, parcelVirtualTemp, 0, - wlcl, 0, npar, 0, verticalVelocity, 0, vvmax, 0); - v.setVerticalVelocity(verticalVelocity); - v.setMaxVerticalVelocity(vvmax[0]); - return v; - } - - /** - * Main Description : Determines the pressure, temperature, and - * height of the wet-bulb zero. - * - * @param elevation - * (m asl) - * @param pressure - * (mb) - * @param height - * (m asl) - * @param temperature - * (C) - * @param dewpoint - * (C) - * @param numLevels - * @return weather (object holding pressure, height, temperature) - * - */ - public static PHT wbzero(float elevation, float[] pressure, float[] height, - float[] temperature, float[] dewpoint) { - float tpwbz = 0; - float thwbz = 0; - float ttwbz = 0; - float elev[] = { elevation }; - int nlvls[] = { temperature.length }; - float pwbz[] = { tpwbz }; - float hwbz[] = { thwbz }; - float twbz[] = { ttwbz }; - Meteolibrary.wbzero(elev, 0, pressure, 0, height, 0, temperature, 0, - dewpoint, 0, nlvls, 0, pwbz, 0, hwbz, 0, twbz, 0); - PHT weather = new PHT(); - weather.setPressure(pwbz[0]); - weather.setHeight(hwbz[0]); - weather.setTemperature(twbz[0]); - return weather; - } - - /** - * Main Description : Calculates the wind direction from the u an v - * components - * - * @param uComp - * @param vComp - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @return ff - * - */ - public static float[] winddir(float[] uComp, float[] vComp, - int totalDimension, int IGridDimension, int JGridDimension) { - float[] ff = new float[totalDimension]; - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - Meteolibrary.winddir(uComp, 0, vComp, 0, ff, 0, mni, 0, ni, 0, nj, 0); - return ff; - } - - /** - * Main Description : Calculate the wind speed from the wind - * components - * - * @param uComp - * (m/s) - * @param vComp - * (m/s) - * @param totalDimension - * @param IGridDimension - * @param JGridDimension - * @return ff (m/s) - * - */ - public static float[] windspeed(float[] uComp, float[] vComp, - int totalDimension, int IGridDimension, int JGridDimension) { - float[] ff = new float[totalDimension]; - int mni[] = { totalDimension }; - int ni[] = { IGridDimension }; - int nj[] = { JGridDimension }; - Meteolibrary.windspeed(uComp, 0, vComp, 0, ff, 0, mni, 0, ni, 0, nj, 0); - return ff; - } - - /** - * Main Description : - * - * @param rho - * @param height - * @param numLvls - * @param heightWindObs - * @param numWindObs - * @return - */ - public static float[] windrho(float[] rho, float[] height, int numLvls, - float[] heightWindObs, int numWindObs) { - float[] rhoAtHeights = new float[rho.length]; - int nlvls[] = { numLvls }; - int nw[] = { numWindObs }; - Meteolibrary.wndrho(rho, 0, height, 0, nlvls, 0, heightWindObs, 0, nw, - 0, rhoAtHeights, 0); - return rhoAtHeights; - } - - /** - * Main Description : Calculates a pressure in standard atmoshpere in - * millibars from height in meters - * - * @param height - * (m) - */ - public static float ztopsa(float height) { - float z[] = { height }; - return Meteolibrary.ztopsa(z, 0); - } -} diff --git a/edexOsgi/com.raytheon.edex.meteolib/src/com/raytheon/edex/meteoLib/Index.java b/edexOsgi/com.raytheon.edex.meteolib/src/com/raytheon/edex/meteoLib/Index.java deleted file mode 100644 index 4ea05cecfd..0000000000 --- a/edexOsgi/com.raytheon.edex.meteolib/src/com/raytheon/edex/meteoLib/Index.java +++ /dev/null @@ -1,72 +0,0 @@ -/** - * This software was developed and / or modified by Raytheon Company, - * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * - * U.S. EXPORT CONTROLLED TECHNICAL DATA - * This software product contains export-restricted data whose - * export/transfer/disclosure is restricted by U.S. law. Dissemination - * to non-U.S. persons whether in the United States or abroad requires - * an export license or other authorization. - * - * Contractor Name: Raytheon Company - * Contractor Address: 6825 Pine Street, Suite 340 - * Mail Stop B8 - * Omaha, NE 68106 - * 402.291.0100 - * - * See the AWIPS II Master Rights File ("Master Rights File.pdf") for - * further licensing information. - **/ - -package com.raytheon.edex.meteoLib; - -public class Index { - private float totalIndex; - private float crossTotalIndex; - private float verticalTotalsIndex; - - /** - * @return the totalIndex - */ - public float getTotalIndex() { - return totalIndex; - } - - /** - * @param totalIndex - * the totalIndex to set - */ - public void setTotalIndex(float totalIndex) { - this.totalIndex = totalIndex; - } - - /** - * @return the crossTotalIndex - */ - public float getCrossTotalIndex() { - return crossTotalIndex; - } - - /** - * @param crossTotalIndex - * the crossTotalIndex to set - */ - public void setCrossTotalIndex(float crossTotalIndex) { - this.crossTotalIndex = crossTotalIndex; - } - - /** - * @return the verticalTotalsIndex - */ - public float getVerticalTotalsIndex() { - return verticalTotalsIndex; - } - - /** - * @param verticalTotalsIndex - * the verticalTotalsIndex to set - */ - public void setVerticalTotalsIndex(float verticalTotalsIndex) { - this.verticalTotalsIndex = verticalTotalsIndex; - } -} diff --git a/edexOsgi/com.raytheon.edex.meteolib/src/com/raytheon/edex/meteoLib/MeteoLibPython.java b/edexOsgi/com.raytheon.edex.meteolib/src/com/raytheon/edex/meteoLib/MeteoLibPython.java deleted file mode 100644 index 6c3c162e62..0000000000 --- a/edexOsgi/com.raytheon.edex.meteolib/src/com/raytheon/edex/meteoLib/MeteoLibPython.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * This software was developed and / or modified by Raytheon Company, - * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * - * U.S. EXPORT CONTROLLED TECHNICAL DATA - * This software product contains export-restricted data whose - * export/transfer/disclosure is restricted by U.S. law. Dissemination - * to non-U.S. persons whether in the United States or abroad requires - * an export license or other authorization. - * - * Contractor Name: Raytheon Company - * Contractor Address: 6825 Pine Street, Suite 340 - * Mail Stop B8 - * Omaha, NE 68106 - * 402.291.0100 - * - * See the AWIPS II Master Rights File ("Master Rights File.pdf") for - * further licensing information. - **/ -package com.raytheon.edex.meteoLib; - -import jep.JepException; - -import com.raytheon.uf.common.python.PythonScript; - -/** - * TODO Add Description - * - *
- * 
- * SOFTWARE HISTORY
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Dec 10, 2008            mnash     Initial creation
- * 
- * 
- * - * @author mnash - * @version 1.0 - */ - -public class MeteoLibPython extends PythonScript { - - public MeteoLibPython(String name, String path) throws JepException { - super(name, path); - } - - @Override - public void evaluateArgument(String name, Object value) throws JepException { - if (value instanceof float[]) { - float[] val = (float[]) value; - jep.setNumeric(name, val, 1, val.length); - } else { - super.evaluateArgument(name, value); - } - } - - protected Object getExecutionResult() throws JepException { - if ((Boolean) jep.getValue("type(" + RESULT + ") is tuple")) { - int size = (Integer) jep.getValue("len(" + RESULT + ")"); - Object[] result = new Object[size]; - for (int i = 0; i < size; i++) { - result[i] = jep.getValue(RESULT + "[" + i + "]"); - } - return result; - } else { - return super.getExecutionResult(); - } - - } -} diff --git a/edexOsgi/com.raytheon.edex.meteolib/src/com/raytheon/edex/meteoLib/MeteoLibUtil.java b/edexOsgi/com.raytheon.edex.meteolib/src/com/raytheon/edex/meteoLib/MeteoLibUtil.java deleted file mode 100644 index 127c021d40..0000000000 --- a/edexOsgi/com.raytheon.edex.meteolib/src/com/raytheon/edex/meteoLib/MeteoLibUtil.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * This software was developed and / or modified by Raytheon Company, - * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * - * U.S. EXPORT CONTROLLED TECHNICAL DATA - * This software product contains export-restricted data whose - * export/transfer/disclosure is restricted by U.S. law. Dissemination - * to non-U.S. persons whether in the United States or abroad requires - * an export license or other authorization. - * - * Contractor Name: Raytheon Company - * Contractor Address: 6825 Pine Street, Suite 340 - * Mail Stop B8 - * Omaha, NE 68106 - * 402.291.0100 - * - * See the AWIPS II Master Rights File ("Master Rights File.pdf") for - * further licensing information. - **/ -package com.raytheon.edex.meteoLib; - -import java.io.IOException; - -import meteolib.jni.Activator; - -/** - * MeteoLib Utility Class - * - *
- * 
- * SOFTWARE HISTORY
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Feb 16, 2010 #4502      jelkins     Initial creation
- * 
- * 
- * - * @author jelkins - * @version 1.0 - */ - -public class MeteoLibUtil { - - public static String getSoPath() throws IOException { - return Activator.getNativeLibraryPath(); - } - -} diff --git a/edexOsgi/com.raytheon.edex.meteolib/src/com/raytheon/edex/meteoLib/Motion.java b/edexOsgi/com.raytheon.edex.meteolib/src/com/raytheon/edex/meteoLib/Motion.java deleted file mode 100644 index fdd0a86ba1..0000000000 --- a/edexOsgi/com.raytheon.edex.meteolib/src/com/raytheon/edex/meteoLib/Motion.java +++ /dev/null @@ -1,88 +0,0 @@ -/** - * This software was developed and / or modified by Raytheon Company, - * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * - * U.S. EXPORT CONTROLLED TECHNICAL DATA - * This software product contains export-restricted data whose - * export/transfer/disclosure is restricted by U.S. law. Dissemination - * to non-U.S. persons whether in the United States or abroad requires - * an export license or other authorization. - * - * Contractor Name: Raytheon Company - * Contractor Address: 6825 Pine Street, Suite 340 - * Mail Stop B8 - * Omaha, NE 68106 - * 402.291.0100 - * - * See the AWIPS II Master Rights File ("Master Rights File.pdf") for - * further licensing information. - **/ - -package com.raytheon.edex.meteoLib; - -public class Motion { - private float direction; - private float speed; - private float uComp; - private float vComp; - - /** - * @return the direction - */ - public float getDirection() { - return direction; - } - - /** - * @param direction - * the direction to set - */ - public void setDirection(float direction) { - this.direction = direction; - } - - /** - * @return the speed - */ - public float getSpeed() { - return speed; - } - - /** - * @param speed - * the speed to set - */ - public void setSpeed(float speed) { - this.speed = speed; - } - - /** - * @return the uComp - */ - public float getUComp() { - return uComp; - } - - /** - * @param comp - * the uComp to set - */ - public void setUComp(float comp) { - uComp = comp; - } - - /** - * @return the vComp - */ - public float getVComp() { - return vComp; - } - - /** - * @param comp - * the vComp to set - */ - public void setVComp(float comp) { - vComp = comp; - } -} diff --git a/edexOsgi/com.raytheon.edex.meteolib/src/com/raytheon/edex/meteoLib/PHT.java b/edexOsgi/com.raytheon.edex.meteolib/src/com/raytheon/edex/meteoLib/PHT.java deleted file mode 100644 index 02ed909e17..0000000000 --- a/edexOsgi/com.raytheon.edex.meteolib/src/com/raytheon/edex/meteoLib/PHT.java +++ /dev/null @@ -1,393 +0,0 @@ -/** - * This software was developed and / or modified by Raytheon Company, - * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * - * U.S. EXPORT CONTROLLED TECHNICAL DATA - * This software product contains export-restricted data whose - * export/transfer/disclosure is restricted by U.S. law. Dissemination - * to non-U.S. persons whether in the United States or abroad requires - * an export license or other authorization. - * - * Contractor Name: Raytheon Company - * Contractor Address: 6825 Pine Street, Suite 340 - * Mail Stop B8 - * Omaha, NE 68106 - * 402.291.0100 - * - * See the AWIPS II Master Rights File ("Master Rights File.pdf") for - * further licensing information. - **/ - -package com.raytheon.edex.meteoLib; - -public class PHT { - private float temperature; - private float temperature1; - private float pressure; - private float pressure1; - private float dewpoint; - private float height; - private float height1; - private float[] heightArray; - private float[] pressureArray; - private float[] temperatureArray; - private float[] dewpointArray; - private float[] virtualTemps; - private float[] soundingTemps; - private float[] soundingVirtTemps; - private float mixingRatio; - private int numLevels; - private int completion; - private float wetBulbTemp; - private float positiveEnergy; - private float cin; - private float dryAdiabat; - private float moistAdiabat; - private int status; - - /** - * @return the temperature - */ - public float getTemperature() { - return temperature; - } - - /** - * @param temperature - * the temperature to set - */ - public void setTemperature(float temperature) { - this.temperature = temperature; - } - - /** - * @return the temperature1 - */ - public float getTemperature1() { - return temperature1; - } - - /** - * @param temperature1 - * the temperature1 to set - */ - public void setTemperature1(float temperature1) { - this.temperature1 = temperature1; - } - - /** - * @return the pressure - */ - public float getPressure() { - return pressure; - } - - /** - * @param pressure - * the pressure to set - */ - public void setPressure(float pressure) { - this.pressure = pressure; - } - - /** - * @return the pressure1 - */ - public float getPressure1() { - return pressure1; - } - - /** - * @param pressure1 - * the pressure1 to set - */ - public void setPressure1(float pressure1) { - this.pressure1 = pressure1; - } - - /** - * @return the dewpoint - */ - public float getDewpoint() { - return dewpoint; - } - - /** - * @param dewpoint - * the dewpoint to set - */ - public void setDewpoint(float dewpoint) { - this.dewpoint = dewpoint; - } - - /** - * @return the height - */ - public float getHeight() { - return height; - } - - /** - * @param height - * the height to set - */ - public void setHeight(float height) { - this.height = height; - } - - /** - * @return the height1 - */ - public float getHeight1() { - return height1; - } - - /** - * @param height1 - * the height1 to set - */ - public void setHeight1(float height1) { - this.height1 = height1; - } - - /** - * @return the heightArray - */ - public float[] getHeightArray() { - return heightArray; - } - - /** - * @param heightArray - * the heightArray to set - */ - public void setHeightArray(float[] heightArray) { - this.heightArray = heightArray; - } - - /** - * @return the pressureArray - */ - public float[] getPressureArray() { - return pressureArray; - } - - /** - * @param pressureArray - * the pressureArray to set - */ - public void setPressureArray(float[] pressureArray) { - this.pressureArray = pressureArray; - } - - /** - * @return the temperatureArray - */ - public float[] getTemperatureArray() { - return temperatureArray; - } - - /** - * @param temperatureArray - * the temperatureArray to set - */ - public void setTemperatureArray(float[] temperatureArray) { - this.temperatureArray = temperatureArray; - } - - /** - * @return the dewpointArray - */ - public float[] getDewpointArray() { - return dewpointArray; - } - - /** - * @param dewpointArray - * the dewpointArray to set - */ - public void setDewpointArray(float[] dewpointArray) { - this.dewpointArray = dewpointArray; - } - - /** - * @return the virtualTemps - */ - public float[] getVirtualTemps() { - return virtualTemps; - } - - /** - * @param virtualTemps - * the virtualTemps to set - */ - public void setVirtualTemps(float[] virtualTemps) { - this.virtualTemps = virtualTemps; - } - - /** - * @return the soundingTemps - */ - public float[] getSoundingTemps() { - return soundingTemps; - } - - /** - * @param soundingTemps - * the soundingTemps to set - */ - public void setSoundingTemps(float[] soundingTemps) { - this.soundingTemps = soundingTemps; - } - - /** - * @return the soundingVirtTemps - */ - public float[] getSoundingVirtTemps() { - return soundingVirtTemps; - } - - /** - * @param soundingVirtTemps - * the soundingVirtTemps to set - */ - public void setSoundingVirtTemps(float[] soundingVirtTemps) { - this.soundingVirtTemps = soundingVirtTemps; - } - - /** - * @return the mixingRatio - */ - public float getMixingRatio() { - return mixingRatio; - } - - /** - * @param mixingRatio - * the mixingRatio to set - */ - public void setMixingRatio(float mixingRatio) { - this.mixingRatio = mixingRatio; - } - - /** - * @return the numLevels - */ - public int getNumLevels() { - return numLevels; - } - - /** - * @param numLevels - * the numLevels to set - */ - public void setNumLevels(int numLevels) { - this.numLevels = numLevels; - } - - /** - * @return the completion - */ - public int getCompletion() { - return completion; - } - - /** - * @param completion - * the completion to set - */ - public void setCompletion(int completion) { - this.completion = completion; - } - - /** - * @return the wetBulbTemp - */ - public float getWetBulbTemp() { - return wetBulbTemp; - } - - /** - * @param wetBulbTemp - * the wetBulbTemp to set - */ - public void setWetBulbTemp(float wetBulbTemp) { - this.wetBulbTemp = wetBulbTemp; - } - - /** - * @return the positiveEnergy - */ - public float getPositiveEnergy() { - return positiveEnergy; - } - - /** - * @param positiveEnergy - * the positiveEnergy to set - */ - public void setPositiveEnergy(float positiveEnergy) { - this.positiveEnergy = positiveEnergy; - } - - /** - * @return the cin - */ - public float getCin() { - return cin; - } - - /** - * @param cin - * the cin to set - */ - public void setCin(float cin) { - this.cin = cin; - } - - /** - * @return the dryAdiabat - */ - public float getDryAdiabat() { - return dryAdiabat; - } - - /** - * @param dryAdiabat - * the dryAdiabat to set - */ - public void setDryAdiabat(float dryAdiabat) { - this.dryAdiabat = dryAdiabat; - } - - /** - * @return the moistAdiabat - */ - public float getMoistAdiabat() { - return moistAdiabat; - } - - /** - * @param moistAdiabat - * the moistAdiabat to set - */ - public void setMoistAdiabat(float moistAdiabat) { - this.moistAdiabat = moistAdiabat; - } - - /** - * @return the status - */ - public int getStatus() { - return status; - } - - /** - * @param status - * the status to set - */ - public void setStatus(int status) { - this.status = status; - } - -} diff --git a/edexOsgi/com.raytheon.edex.meteolib/src/com/raytheon/edex/meteoLib/Strmlin.java b/edexOsgi/com.raytheon.edex.meteolib/src/com/raytheon/edex/meteoLib/Strmlin.java deleted file mode 100644 index 2c50d1422c..0000000000 --- a/edexOsgi/com.raytheon.edex.meteolib/src/com/raytheon/edex/meteoLib/Strmlin.java +++ /dev/null @@ -1,123 +0,0 @@ -/** - * This software was developed and / or modified by Raytheon Company, - * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * - * U.S. EXPORT CONTROLLED TECHNICAL DATA - * This software product contains export-restricted data whose - * export/transfer/disclosure is restricted by U.S. law. Dissemination - * to non-U.S. persons whether in the United States or abroad requires - * an export license or other authorization. - * - * Contractor Name: Raytheon Company - * Contractor Address: 6825 Pine Street, Suite 340 - * Mail Stop B8 - * Omaha, NE 68106 - * 402.291.0100 - * - * See the AWIPS II Master Rights File ("Master Rights File.pdf") for - * further licensing information. - **/ -package com.raytheon.edex.meteoLib; - -/** - * Strmlin - * - * Provides set and get functions for strmlin.f outputs - * - *
- *   
- *    SOFTWARE HISTORY
- *   
- *    Date          Ticket#     Engineer    Description
- *    ------------  ----------  ----------- --------------------------
- *    June 12, 2008             S Manoj    Initial Creation.
- *   
- * 
- * - * @author chammack - * @version 1 - */ - -public class Strmlin { - private int[] LCPnt; - - private float[] IPnt; - - private float[] JPnt; - - private int kpnt1; - - private int kpnt2; - - /** - * @return the LCPnt - */ - public int[] getLCPnt() { - return LCPnt; - } - - /** - * @param LCPnt - * - */ - public void setLCPnt(int[] LCPnt) { - this.LCPnt = LCPnt; - } - - /** - * @return the IPnt - */ - public float[] getIPnt() { - return IPnt; - } - - /** - * @param IPnt - */ - public void setIPnt(float[] IPnt) { - this.IPnt = IPnt; - } - - /** - * @return the JPnt - */ - public float[] getJPnt() { - return JPnt; - } - - /** - * @param JPnt - */ - public void setJPnt(float[] JPnt) { - this.JPnt = JPnt; - } - - /** - * @return the kpnt1 - */ - public int getKpnt1() { - return kpnt1; - } - - /** - * @param kpnt1 - */ - public void setKpnt1(int kpnt1) { - this.kpnt1 = kpnt1; - } - - /** - * @return the kpnt2 - */ - public int getKpnt2() { - return kpnt2; - } - - /** - * @param kpnt2 - */ - public void setKpnt2(int kpnt2) { - this.kpnt2 = kpnt2; - } - -} diff --git a/edexOsgi/com.raytheon.edex.meteolib/src/com/raytheon/edex/meteoLib/Tsoar.java b/edexOsgi/com.raytheon.edex.meteolib/src/com/raytheon/edex/meteoLib/Tsoar.java deleted file mode 100644 index 6a351d20fb..0000000000 --- a/edexOsgi/com.raytheon.edex.meteolib/src/com/raytheon/edex/meteoLib/Tsoar.java +++ /dev/null @@ -1,139 +0,0 @@ -/** - * This software was developed and / or modified by Raytheon Company, - * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * - * U.S. EXPORT CONTROLLED TECHNICAL DATA - * This software product contains export-restricted data whose - * export/transfer/disclosure is restricted by U.S. law. Dissemination - * to non-U.S. persons whether in the United States or abroad requires - * an export license or other authorization. - * - * Contractor Name: Raytheon Company - * Contractor Address: 6825 Pine Street, Suite 340 - * Mail Stop B8 - * Omaha, NE 68106 - * 402.291.0100 - * - * See the AWIPS II Master Rights File ("Master Rights File.pdf") for - * further licensing information. - **/ - -package com.raytheon.edex.meteoLib; - -public class Tsoar { - private float potentialTempForecast; - private float heightMinimumEffectiveConvection; - private float tempMinimumEffectiveConvection; - private float heightMaxThermalAlt; - private float tempMaxThermalAlt; - private float soarIndex; - private float triggerTemperature; - - /** - * @return the potentialTempForecast - */ - public float getPotentialTempForecast() { - return potentialTempForecast; - } - - /** - * @param potentialTempForecast - * the potentialTempForecast to set - */ - public void setPotentialTempForecast(float potentialTempForecast) { - this.potentialTempForecast = potentialTempForecast; - } - - /** - * @return the heightMinimumEffectiveConvection - */ - public float getHeightMinimumEffectiveConvection() { - return heightMinimumEffectiveConvection; - } - - /** - * @param heightMinimumEffectiveConvection - * the heightMinimumEffectiveConvection to set - */ - public void setHeightMinimumEffectiveConvection( - float heightMinimumEffectiveConvection) { - this.heightMinimumEffectiveConvection = heightMinimumEffectiveConvection; - } - - /** - * @return the tempMinimumEffectiveConvection - */ - public float getTempMinimumEffectiveConvection() { - return tempMinimumEffectiveConvection; - } - - /** - * @param tempMinimumEffectiveConvection - * the tempMinimumEffectiveConvection to set - */ - public void setTempMinimumEffectiveConvection( - float tempMinimumEffectiveConvection) { - this.tempMinimumEffectiveConvection = tempMinimumEffectiveConvection; - } - - /** - * @return the heightMaxThermalAlt - */ - public float getHeightMaxThermalAlt() { - return heightMaxThermalAlt; - } - - /** - * @param heightMaxThermalAlt - * the heightMaxThermalAlt to set - */ - public void setHeightMaxThermalAlt(float heightMaxThermalAlt) { - this.heightMaxThermalAlt = heightMaxThermalAlt; - } - - /** - * @return the tempMaxThermalAlt - */ - public float getTempMaxThermalAlt() { - return tempMaxThermalAlt; - } - - /** - * @param tempMaxThermalAlt - * the tempMaxThermalAlt to set - */ - public void setTempMaxThermalAlt(float tempMaxThermalAlt) { - this.tempMaxThermalAlt = tempMaxThermalAlt; - } - - /** - * @return the soarIndex - */ - public float getSoarIndex() { - return soarIndex; - } - - /** - * @param soarIndex - * the soarIndex to set - */ - public void setSoarIndex(float soarIndex) { - this.soarIndex = soarIndex; - } - - /** - * @return the triggerTemperature - */ - public float getTriggerTemperature() { - return triggerTemperature; - } - - /** - * @param triggerTemperature - * the triggerTemperature to set - */ - public void setTriggerTemperature(float triggerTemperature) { - this.triggerTemperature = triggerTemperature; - } - -} diff --git a/edexOsgi/com.raytheon.edex.meteolib/src/com/raytheon/edex/meteoLib/VectorVars.java b/edexOsgi/com.raytheon.edex.meteolib/src/com/raytheon/edex/meteoLib/VectorVars.java deleted file mode 100644 index 4b85fb85e7..0000000000 --- a/edexOsgi/com.raytheon.edex.meteolib/src/com/raytheon/edex/meteoLib/VectorVars.java +++ /dev/null @@ -1,233 +0,0 @@ -/** - * This software was developed and / or modified by Raytheon Company, - * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * - * U.S. EXPORT CONTROLLED TECHNICAL DATA - * This software product contains export-restricted data whose - * export/transfer/disclosure is restricted by U.S. law. Dissemination - * to non-U.S. persons whether in the United States or abroad requires - * an export license or other authorization. - * - * Contractor Name: Raytheon Company - * Contractor Address: 6825 Pine Street, Suite 340 - * Mail Stop B8 - * Omaha, NE 68106 - * 402.291.0100 - * - * See the AWIPS II Master Rights File ("Master Rights File.pdf") for - * further licensing information. - **/ - -package com.raytheon.edex.meteoLib; - -public class VectorVars { - private float[] qx; - private float[] qy; - private float[] slqy; - private float[] slqx; - private float[] dadxdt; - private float[] dadydt; - private float minimum; - private float maximum; - private float range; - private float[] bx; - private float[] by; - private float[] solutionVector; - private int status; - - /** - * @return the qx - */ - public float[] getQx() { - return qx; - } - - /** - * @param qx - * the qx to set - */ - public void setQx(float[] qx) { - this.qx = qx; - } - - /** - * @return the qy - */ - public float[] getQy() { - return qy; - } - - /** - * @param qy - * the qy to set - */ - public void setQy(float[] qy) { - this.qy = qy; - } - - /** - * @return the slqy - */ - public float[] getSlqy() { - return slqy; - } - - /** - * @param slqy - * the slqy to set - */ - public void setSlqy(float[] slqy) { - this.slqy = slqy; - } - - /** - * @return the slqx - */ - public float[] getSlqx() { - return slqx; - } - - /** - * @param slqx - * the slqx to set - */ - public void setSlqx(float[] slqx) { - this.slqx = slqx; - } - - /** - * @return the dadxdt - */ - public float[] getDadxdt() { - return dadxdt; - } - - /** - * @param dadxdt - * the dadxdt to set - */ - public void setDadxdt(float[] dadxdt) { - this.dadxdt = dadxdt; - } - - /** - * @return the dadydt - */ - public float[] getDadydt() { - return dadydt; - } - - /** - * @param dadydt - * the dadydt to set - */ - public void setDadydt(float[] dadydt) { - this.dadydt = dadydt; - } - - /** - * @return the minimum - */ - public float getMinimum() { - return minimum; - } - - /** - * @param minimum - * the minimum to set - */ - public void setMinimum(float minimum) { - this.minimum = minimum; - } - - /** - * @return the maximum - */ - public float getMaximum() { - return maximum; - } - - /** - * @param maximum - * the maximum to set - */ - public void setMaximum(float maximum) { - this.maximum = maximum; - } - - /** - * @return the range - */ - public float getRange() { - return range; - } - - /** - * @param range - * the range to set - */ - public void setRange(float range) { - this.range = range; - } - - /** - * @return the bx - */ - public float[] getBx() { - return bx; - } - - /** - * @param bx - * the bx to set - */ - public void setBx(float[] bx) { - this.bx = bx; - } - - /** - * @return the by - */ - public float[] getBy() { - return by; - } - - /** - * @param by - * the by to set - */ - public void setBy(float[] by) { - this.by = by; - } - - /** - * @return the solutionVector - */ - public float[] getSolutionVector() { - return solutionVector; - } - - /** - * @param solutionVector - * the solutionVector to set - */ - public void setSolutionVector(float[] solutionVector) { - this.solutionVector = solutionVector; - } - - /** - * @return the status - */ - public int getStatus() { - return status; - } - - /** - * @param status - * the status to set - */ - public void setStatus(int status) { - this.status = status; - } - -} diff --git a/edexOsgi/com.raytheon.edex.meteolib/src/com/raytheon/edex/meteoLib/Velocity.java b/edexOsgi/com.raytheon.edex.meteolib/src/com/raytheon/edex/meteoLib/Velocity.java deleted file mode 100644 index c451c28425..0000000000 --- a/edexOsgi/com.raytheon.edex.meteolib/src/com/raytheon/edex/meteoLib/Velocity.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This software was developed and / or modified by Raytheon Company, - * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * - * U.S. EXPORT CONTROLLED TECHNICAL DATA - * This software product contains export-restricted data whose - * export/transfer/disclosure is restricted by U.S. law. Dissemination - * to non-U.S. persons whether in the United States or abroad requires - * an export license or other authorization. - * - * Contractor Name: Raytheon Company - * Contractor Address: 6825 Pine Street, Suite 340 - * Mail Stop B8 - * Omaha, NE 68106 - * 402.291.0100 - * - * See the AWIPS II Master Rights File ("Master Rights File.pdf") for - * further licensing information. - **/ - -package com.raytheon.edex.meteoLib; - -public class Velocity { - private float[] verticalVelocity; - private float maxVerticalVelocity; - - /** - * @return the verticalVelocity - */ - public float[] getVerticalVelocity() { - return verticalVelocity; - } - - /** - * @param verticalVelocity - * the verticalVelocity to set - */ - public void setVerticalVelocity(float[] verticalVelocity) { - this.verticalVelocity = verticalVelocity; - } - - /** - * @return the maxVerticalVelocity - */ - public float getMaxVerticalVelocity() { - return maxVerticalVelocity; - } - - /** - * @param maxVerticalVelocity - * the maxVerticalVelocity to set - */ - public void setMaxVerticalVelocity(float maxVerticalVelocity) { - this.maxVerticalVelocity = maxVerticalVelocity; - } -} diff --git a/edexOsgi/com.raytheon.edex.meteolib/src/com/raytheon/edex/meteoLib/WindComp.java b/edexOsgi/com.raytheon.edex.meteolib/src/com/raytheon/edex/meteoLib/WindComp.java deleted file mode 100644 index f715267404..0000000000 --- a/edexOsgi/com.raytheon.edex.meteolib/src/com/raytheon/edex/meteoLib/WindComp.java +++ /dev/null @@ -1,264 +0,0 @@ -/** - * This software was developed and / or modified by Raytheon Company, - * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * - * U.S. EXPORT CONTROLLED TECHNICAL DATA - * This software product contains export-restricted data whose - * export/transfer/disclosure is restricted by U.S. law. Dissemination - * to non-U.S. persons whether in the United States or abroad requires - * an export license or other authorization. - * - * Contractor Name: Raytheon Company - * Contractor Address: 6825 Pine Street, Suite 340 - * Mail Stop B8 - * Omaha, NE 68106 - * 402.291.0100 - * - * See the AWIPS II Master Rights File ("Master Rights File.pdf") for - * further licensing information. - **/ - -package com.raytheon.edex.meteoLib; - -public class WindComp { - private float windDirection; - private float windSpeed; - private float uComp; - private float vComp; - private float[] uCompArray; - private float[] vCompArray; - private float[] windDirectionArray; - private float[] windSpeedArray; - private float stormMotionDir; - private float stormMotionSpd; - private float stormRelativeHelicity; - private float helicity; - private float[] compFirstInSecond; - private float[] compFirstInKDir; - private int gustPotential; - - /** - * @return the windDirection - */ - public float getWindDirection() { - return windDirection; - } - - /** - * @param windDirection - * the windDirection to set - */ - public void setWindDirection(float windDirection) { - this.windDirection = windDirection; - } - - /** - * @return the windSpeed - */ - public float getWindSpeed() { - return windSpeed; - } - - /** - * @param windSpeed - * the windSpeed to set - */ - public void setWindSpeed(float windSpeed) { - this.windSpeed = windSpeed; - } - - /** - * @return the uComp - */ - public float getUComp() { - return uComp; - } - - /** - * @param comp - * the uComp to set - */ - public void setUComp(float comp) { - uComp = comp; - } - - /** - * @return the vComp - */ - public float getVComp() { - return vComp; - } - - /** - * @param comp - * the vComp to set - */ - public void setVComp(float comp) { - vComp = comp; - } - - /** - * @return the uCompArray - */ - public float[] getUCompArray() { - return uCompArray; - } - - /** - * @param compArray - * the uCompArray to set - */ - public void setUCompArray(float[] compArray) { - uCompArray = compArray; - } - - /** - * @return the vCompArray - */ - public float[] getVCompArray() { - return vCompArray; - } - - /** - * @param compArray - * the vCompArray to set - */ - public void setVCompArray(float[] compArray) { - vCompArray = compArray; - } - - /** - * @return the windDirectionArray - */ - public float[] getWindDirectionArray() { - return windDirectionArray; - } - - /** - * @param windDirectionArray - * the windDirectionArray to set - */ - public void setWindDirectionArray(float[] windDirectionArray) { - this.windDirectionArray = windDirectionArray; - } - - /** - * @return the windSpeedArray - */ - public float[] getWindSpeedArray() { - return windSpeedArray; - } - - /** - * @param windSpeedArray - * the windSpeedArray to set - */ - public void setWindSpeedArray(float[] windSpeedArray) { - this.windSpeedArray = windSpeedArray; - } - - /** - * @return the stormMotionDir - */ - public float getStormMotionDir() { - return stormMotionDir; - } - - /** - * @param stormMotionDir - * the stormMotionDir to set - */ - public void setStormMotionDir(float stormMotionDir) { - this.stormMotionDir = stormMotionDir; - } - - /** - * @return the stormMotionSpd - */ - public float getStormMotionSpd() { - return stormMotionSpd; - } - - /** - * @param stormMotionSpd - * the stormMotionSpd to set - */ - public void setStormMotionSpd(float stormMotionSpd) { - this.stormMotionSpd = stormMotionSpd; - } - - /** - * @return the stormRelativeHelicity - */ - public float getStormRelativeHelicity() { - return stormRelativeHelicity; - } - - /** - * @param stormRelativeHelicity - * the stormRelativeHelicity to set - */ - public void setStormRelativeHelicity(float stormRelativeHelicity) { - this.stormRelativeHelicity = stormRelativeHelicity; - } - - /** - * @return the helicity - */ - public float getHelicity() { - return helicity; - } - - /** - * @param helicity - * the helicity to set - */ - public void setHelicity(float helicity) { - this.helicity = helicity; - } - - /** - * @return the compFirstInSecond - */ - public float[] getCompFirstInSecond() { - return compFirstInSecond; - } - - /** - * @param compFirstInSecond - * the compFirstInSecond to set - */ - public void setCompFirstInSecond(float[] compFirstInSecond) { - this.compFirstInSecond = compFirstInSecond; - } - - /** - * @return the compFirstInKDir - */ - public float[] getCompFirstInKDir() { - return compFirstInKDir; - } - - /** - * @param compFirstInKDir - * the compFirstInKDir to set - */ - public void setCompFirstInKDir(float[] compFirstInKDir) { - this.compFirstInKDir = compFirstInKDir; - } - - /** - * @return the gustPotential - */ - public int getGustPotential() { - return gustPotential; - } - - /** - * @param gustPotential - * the gustPotential to set - */ - public void setGustPotential(int gustPotential) { - this.gustPotential = gustPotential; - } -} diff --git a/edexOsgi/com.raytheon.uf.edex.common.core.feature/feature.xml b/edexOsgi/com.raytheon.uf.edex.common.core.feature/feature.xml index d5515028ae..5bf02f365d 100644 --- a/edexOsgi/com.raytheon.uf.edex.common.core.feature/feature.xml +++ b/edexOsgi/com.raytheon.uf.edex.common.core.feature/feature.xml @@ -154,45 +154,4 @@ version="0.0.0" unpack="false"/> - - - - - - - - - - - diff --git a/edexOsgi/meteolib.jni.linux32/.classpath b/edexOsgi/meteolib.jni.linux32/.classpath deleted file mode 100644 index bc74aabe31..0000000000 --- a/edexOsgi/meteolib.jni.linux32/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/edexOsgi/meteolib.jni.linux32/.project b/edexOsgi/meteolib.jni.linux32/.project deleted file mode 100644 index 4f3a5279aa..0000000000 --- a/edexOsgi/meteolib.jni.linux32/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - meteolib.jni.linux32 - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/edexOsgi/meteolib.jni.linux32/.settings/org.eclipse.jdt.core.prefs b/edexOsgi/meteolib.jni.linux32/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 25aa6e56ae..0000000000 --- a/edexOsgi/meteolib.jni.linux32/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,8 +0,0 @@ -#Tue Aug 02 16:38:07 CDT 2011 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.compliance=1.6 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.6 diff --git a/edexOsgi/meteolib.jni.linux32/META-INF/MANIFEST.MF b/edexOsgi/meteolib.jni.linux32/META-INF/MANIFEST.MF deleted file mode 100644 index 0e891eef0a..0000000000 --- a/edexOsgi/meteolib.jni.linux32/META-INF/MANIFEST.MF +++ /dev/null @@ -1,8 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Native meteoLib Library 32-bit -Bundle-SymbolicName: meteolib.jni.linux32 -Bundle-Version: 1.0.0.qualifier -Fragment-Host: meteolib.jni;bundle-version="1.0.0" -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 -Eclipse-PlatformFilter: (& (osgi.os=linux) (osgi.arch=x86)) diff --git a/edexOsgi/meteolib.jni.linux32/build.properties b/edexOsgi/meteolib.jni.linux32/build.properties deleted file mode 100644 index 9063ad9367..0000000000 --- a/edexOsgi/meteolib.jni.linux32/build.properties +++ /dev/null @@ -1,4 +0,0 @@ -bin.includes = META-INF/,\ - .,\ - libmeteoLib.so -src.includes = libmeteoLib.so diff --git a/edexOsgi/meteolib.jni.linux32/libmeteoLib.so b/edexOsgi/meteolib.jni.linux32/libmeteoLib.so deleted file mode 100644 index 90b823941a..0000000000 Binary files a/edexOsgi/meteolib.jni.linux32/libmeteoLib.so and /dev/null differ diff --git a/edexOsgi/meteolib.jni.linux32/meteolib.jni.linux32.ecl b/edexOsgi/meteolib.jni.linux32/meteolib.jni.linux32.ecl deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/edexOsgi/meteolib.jni.linux64/.classpath b/edexOsgi/meteolib.jni.linux64/.classpath deleted file mode 100644 index bc74aabe31..0000000000 --- a/edexOsgi/meteolib.jni.linux64/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/edexOsgi/meteolib.jni.linux64/.project b/edexOsgi/meteolib.jni.linux64/.project deleted file mode 100644 index 74a437236b..0000000000 --- a/edexOsgi/meteolib.jni.linux64/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - meteolib.jni.linux64 - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/edexOsgi/meteolib.jni.linux64/.settings/org.eclipse.jdt.core.prefs b/edexOsgi/meteolib.jni.linux64/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index d839e96a2b..0000000000 --- a/edexOsgi/meteolib.jni.linux64/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,8 +0,0 @@ -#Tue Aug 02 16:40:06 CDT 2011 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.compliance=1.6 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.6 diff --git a/edexOsgi/meteolib.jni.linux64/META-INF/MANIFEST.MF b/edexOsgi/meteolib.jni.linux64/META-INF/MANIFEST.MF deleted file mode 100644 index 680b7a96a6..0000000000 --- a/edexOsgi/meteolib.jni.linux64/META-INF/MANIFEST.MF +++ /dev/null @@ -1,8 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Native meteoLib Library 64-Bit -Bundle-SymbolicName: meteolib.jni.linux64 -Bundle-Version: 1.0.0.qualifier -Fragment-Host: meteolib.jni;bundle-version="1.0.0" -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 -Eclipse-PlatformFilter: (& (osgi.os=linux) (osgi.arch=x86_64)) diff --git a/edexOsgi/meteolib.jni.linux64/build.properties b/edexOsgi/meteolib.jni.linux64/build.properties deleted file mode 100644 index 9063ad9367..0000000000 --- a/edexOsgi/meteolib.jni.linux64/build.properties +++ /dev/null @@ -1,4 +0,0 @@ -bin.includes = META-INF/,\ - .,\ - libmeteoLib.so -src.includes = libmeteoLib.so diff --git a/edexOsgi/meteolib.jni.linux64/libmeteoLib.so b/edexOsgi/meteolib.jni.linux64/libmeteoLib.so deleted file mode 100644 index 8cec4f9682..0000000000 Binary files a/edexOsgi/meteolib.jni.linux64/libmeteoLib.so and /dev/null differ diff --git a/edexOsgi/meteolib.jni.linux64/meteolib.jni.linux64.ecl b/edexOsgi/meteolib.jni.linux64/meteolib.jni.linux64.ecl deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/edexOsgi/meteolib.jni.win32/.classpath b/edexOsgi/meteolib.jni.win32/.classpath deleted file mode 100644 index bc74aabe31..0000000000 --- a/edexOsgi/meteolib.jni.win32/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/edexOsgi/meteolib.jni.win32/.project b/edexOsgi/meteolib.jni.win32/.project deleted file mode 100644 index 05a381686e..0000000000 --- a/edexOsgi/meteolib.jni.win32/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - meteolib.jni.win32 - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/edexOsgi/meteolib.jni.win32/.settings/org.eclipse.jdt.core.prefs b/edexOsgi/meteolib.jni.win32/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 279de9194c..0000000000 --- a/edexOsgi/meteolib.jni.win32/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,8 +0,0 @@ -#Mon Oct 17 10:22:48 CDT 2011 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.compliance=1.6 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.6 diff --git a/edexOsgi/meteolib.jni.win32/META-INF/MANIFEST.MF b/edexOsgi/meteolib.jni.win32/META-INF/MANIFEST.MF deleted file mode 100644 index 6b3a545a90..0000000000 --- a/edexOsgi/meteolib.jni.win32/META-INF/MANIFEST.MF +++ /dev/null @@ -1,8 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Win32 Native meteoLib Library 32-bit -Bundle-SymbolicName: meteolib.jni.win32 -Bundle-Version: 1.0.0.qualifier -Fragment-Host: meteolib.jni;bundle-version="1.0.0" -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 -Eclipse-PlatformFilter: (& (osgi.os=win32) (osgi.arch=x86)) diff --git a/edexOsgi/meteolib.jni.win32/build.properties b/edexOsgi/meteolib.jni.win32/build.properties deleted file mode 100644 index 2cf95ad1df..0000000000 --- a/edexOsgi/meteolib.jni.win32/build.properties +++ /dev/null @@ -1,3 +0,0 @@ -bin.includes = META-INF/,\ - .,\ - meteoLib.dll diff --git a/edexOsgi/meteolib.jni.win32/meteoLib.dll b/edexOsgi/meteolib.jni.win32/meteoLib.dll deleted file mode 100644 index 6765f42231..0000000000 Binary files a/edexOsgi/meteolib.jni.win32/meteoLib.dll and /dev/null differ diff --git a/edexOsgi/meteolib.jni.win32/meteolib.jni.win32.ecl b/edexOsgi/meteolib.jni.win32/meteolib.jni.win32.ecl deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/edexOsgi/meteolib.jni/.classpath b/edexOsgi/meteolib.jni/.classpath deleted file mode 100644 index cb466879ce..0000000000 --- a/edexOsgi/meteolib.jni/.classpath +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/edexOsgi/meteolib.jni/.project b/edexOsgi/meteolib.jni/.project deleted file mode 100644 index a0cf28f133..0000000000 --- a/edexOsgi/meteolib.jni/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - meteolib.jni - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/edexOsgi/meteolib.jni/.settings/org.eclipse.jdt.core.prefs b/edexOsgi/meteolib.jni/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 16fb24e825..0000000000 --- a/edexOsgi/meteolib.jni/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,7 +0,0 @@ -#Thu Mar 26 11:18:51 CDT 2009 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.compliance=1.6 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.6 diff --git a/edexOsgi/meteolib.jni/META-INF/MANIFEST.MF b/edexOsgi/meteolib.jni/META-INF/MANIFEST.MF deleted file mode 100644 index 4eca44ec83..0000000000 --- a/edexOsgi/meteolib.jni/META-INF/MANIFEST.MF +++ /dev/null @@ -1,15 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Jni Plug-in -Bundle-SymbolicName: meteolib.jni -Bundle-Version: 1.0.0.qualifier -Bundle-Activator: meteolib.jni.Activator -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime, - org.apache.commons.lang;bundle-version="2.3.0" -Bundle-ActivationPolicy: lazy -Bundle-ClassPath: ., - gluegen-rt.jar -Export-Package: com.raytheon.edex.meteolibrary, - meteolib.jni -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 diff --git a/edexOsgi/meteolib.jni/build.properties b/edexOsgi/meteolib.jni/build.properties deleted file mode 100644 index 4174bcf811..0000000000 --- a/edexOsgi/meteolib.jni/build.properties +++ /dev/null @@ -1,5 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - gluegen-rt.jar diff --git a/edexOsgi/meteolib.jni/gluegen-rt.jar b/edexOsgi/meteolib.jni/gluegen-rt.jar deleted file mode 100644 index 5895a2b2cf..0000000000 Binary files a/edexOsgi/meteolib.jni/gluegen-rt.jar and /dev/null differ diff --git a/edexOsgi/meteolib.jni/meteolib.jni.ecl b/edexOsgi/meteolib.jni/meteolib.jni.ecl deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/edexOsgi/meteolib.jni/src/com/raytheon/edex/meteolibrary/Meteolibrary.java b/edexOsgi/meteolib.jni/src/com/raytheon/edex/meteolibrary/Meteolibrary.java deleted file mode 100644 index 32cea1cf81..0000000000 --- a/edexOsgi/meteolib.jni/src/com/raytheon/edex/meteolibrary/Meteolibrary.java +++ /dev/null @@ -1,6824 +0,0 @@ -/* !---- DO NOT EDIT: This file autogenerated by com/sun/gluegen/JavaEmitter.java on Thu Jul 28 14:50:38 CDT 2011 ----! */ - -package com.raytheon.edex.meteolibrary; - -import com.sun.gluegen.runtime.*; - -public class Meteolibrary -{ - - - /** Interface to C language function:
void add_aray(float * a, float * b, float * result, int * mni, int * ni, int * nj, int * mode); */ - public static void add_aray(java.nio.FloatBuffer a, java.nio.FloatBuffer b, java.nio.FloatBuffer result, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj, java.nio.IntBuffer mode) - { - boolean _direct = BufferFactory.isDirect(a); - if (b != null && _direct != BufferFactory.isDirect(b)) - throw new RuntimeException("Argument \"b\" : Buffers passed to this method must all be either direct or indirect"); - if (result != null && _direct != BufferFactory.isDirect(result)) - throw new RuntimeException("Argument \"result\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (mode != null && _direct != BufferFactory.isDirect(mode)) - throw new RuntimeException("Argument \"mode\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - add_aray0(a, BufferFactory.getDirectBufferByteOffset(a), b, BufferFactory.getDirectBufferByteOffset(b), result, BufferFactory.getDirectBufferByteOffset(result), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj), mode, BufferFactory.getDirectBufferByteOffset(mode)); - } else { - add_aray1(BufferFactory.getArray(a), BufferFactory.getIndirectBufferByteOffset(a), BufferFactory.getArray(b), BufferFactory.getIndirectBufferByteOffset(b), BufferFactory.getArray(result), BufferFactory.getIndirectBufferByteOffset(result), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj), BufferFactory.getArray(mode), BufferFactory.getIndirectBufferByteOffset(mode)); - } - } - - /** Entry point to C language function:
void add_aray(float * a, float * b, float * result, int * mni, int * ni, int * nj, int * mode); */ - private static native void add_aray0(Object a, int a_byte_offset, Object b, int b_byte_offset, Object result, int result_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object mode, int mode_byte_offset); - - /** Entry point to C language function:
void add_aray(float * a, float * b, float * result, int * mni, int * ni, int * nj, int * mode); */ - private static native void add_aray1(Object a, int a_byte_offset, Object b, int b_byte_offset, Object result, int result_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object mode, int mode_byte_offset); - - /** Interface to C language function:
void add_aray(float * a, float * b, float * result, int * mni, int * ni, int * nj, int * mode); */ - public static void add_aray(float[] a, int a_offset, float[] b, int b_offset, float[] result, int result_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset, int[] mode, int mode_offset) - { - if(a != null && a.length <= a_offset) - throw new RuntimeException("array offset argument \"a_offset\" (" + a_offset + ") equals or exceeds array length (" + a.length + ")"); - if(b != null && b.length <= b_offset) - throw new RuntimeException("array offset argument \"b_offset\" (" + b_offset + ") equals or exceeds array length (" + b.length + ")"); - if(result != null && result.length <= result_offset) - throw new RuntimeException("array offset argument \"result_offset\" (" + result_offset + ") equals or exceeds array length (" + result.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - if(mode != null && mode.length <= mode_offset) - throw new RuntimeException("array offset argument \"mode_offset\" (" + mode_offset + ") equals or exceeds array length (" + mode.length + ")"); - add_aray1(a, BufferFactory.SIZEOF_FLOAT * a_offset, b, BufferFactory.SIZEOF_FLOAT * b_offset, result, BufferFactory.SIZEOF_FLOAT * result_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset, mode, BufferFactory.SIZEOF_INT * mode_offset); - - } - - /** Interface to C language function:
void add_by_cnst(float * a, float * cnst, float * result, int * mni, int * ni, int * nj); */ - public static void add_by_cnst(java.nio.FloatBuffer a, java.nio.FloatBuffer cnst, java.nio.FloatBuffer result, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj) - { - boolean _direct = BufferFactory.isDirect(a); - if (cnst != null && _direct != BufferFactory.isDirect(cnst)) - throw new RuntimeException("Argument \"cnst\" : Buffers passed to this method must all be either direct or indirect"); - if (result != null && _direct != BufferFactory.isDirect(result)) - throw new RuntimeException("Argument \"result\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - add_by_cnst0(a, BufferFactory.getDirectBufferByteOffset(a), cnst, BufferFactory.getDirectBufferByteOffset(cnst), result, BufferFactory.getDirectBufferByteOffset(result), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj)); - } else { - add_by_cnst1(BufferFactory.getArray(a), BufferFactory.getIndirectBufferByteOffset(a), BufferFactory.getArray(cnst), BufferFactory.getIndirectBufferByteOffset(cnst), BufferFactory.getArray(result), BufferFactory.getIndirectBufferByteOffset(result), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj)); - } - } - - /** Entry point to C language function:
void add_by_cnst(float * a, float * cnst, float * result, int * mni, int * ni, int * nj); */ - private static native void add_by_cnst0(Object a, int a_byte_offset, Object cnst, int cnst_byte_offset, Object result, int result_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset); - - /** Entry point to C language function:
void add_by_cnst(float * a, float * cnst, float * result, int * mni, int * ni, int * nj); */ - private static native void add_by_cnst1(Object a, int a_byte_offset, Object cnst, int cnst_byte_offset, Object result, int result_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset); - - /** Interface to C language function:
void add_by_cnst(float * a, float * cnst, float * result, int * mni, int * ni, int * nj); */ - public static void add_by_cnst(float[] a, int a_offset, float[] cnst, int cnst_offset, float[] result, int result_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset) - { - if(a != null && a.length <= a_offset) - throw new RuntimeException("array offset argument \"a_offset\" (" + a_offset + ") equals or exceeds array length (" + a.length + ")"); - if(cnst != null && cnst.length <= cnst_offset) - throw new RuntimeException("array offset argument \"cnst_offset\" (" + cnst_offset + ") equals or exceeds array length (" + cnst.length + ")"); - if(result != null && result.length <= result_offset) - throw new RuntimeException("array offset argument \"result_offset\" (" + result_offset + ") equals or exceeds array length (" + result.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - add_by_cnst1(a, BufferFactory.SIZEOF_FLOAT * a_offset, cnst, BufferFactory.SIZEOF_FLOAT * cnst_offset, result, BufferFactory.SIZEOF_FLOAT * result_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset); - - } - - /** Interface to C language function:
float adiabatic_te(const float * temp, const float * press); */ - public static float adiabatic_te(java.nio.FloatBuffer temp, java.nio.FloatBuffer press) - { - boolean _direct = BufferFactory.isDirect(temp); - if (press != null && _direct != BufferFactory.isDirect(press)) - throw new RuntimeException("Argument \"press\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - return adiabatic_te0(temp, BufferFactory.getDirectBufferByteOffset(temp), press, BufferFactory.getDirectBufferByteOffset(press)); - } else { - return adiabatic_te1(BufferFactory.getArray(temp), BufferFactory.getIndirectBufferByteOffset(temp), BufferFactory.getArray(press), BufferFactory.getIndirectBufferByteOffset(press)); - } - } - - /** Entry point to C language function:
float adiabatic_te(const float * temp, const float * press); */ - private static native float adiabatic_te0(Object temp, int temp_byte_offset, Object press, int press_byte_offset); - - /** Entry point to C language function:
float adiabatic_te(const float * temp, const float * press); */ - private static native float adiabatic_te1(Object temp, int temp_byte_offset, Object press, int press_byte_offset); - - /** Interface to C language function:
float adiabatic_te(const float * temp, const float * press); */ - public static float adiabatic_te(float[] temp, int temp_offset, float[] press, int press_offset) - { - if(temp != null && temp.length <= temp_offset) - throw new RuntimeException("array offset argument \"temp_offset\" (" + temp_offset + ") equals or exceeds array length (" + temp.length + ")"); - if(press != null && press.length <= press_offset) - throw new RuntimeException("array offset argument \"press_offset\" (" + press_offset + ") equals or exceeds array length (" + press.length + ")"); - return adiabatic_te1(temp, BufferFactory.SIZEOF_FLOAT * temp_offset, press, BufferFactory.SIZEOF_FLOAT * press_offset); - - } - - /** Interface to C language function:
void alt2press(float * alt, float * z, int * mni, int * ni, int * nj, float * p); */ - public static void alt2press(java.nio.FloatBuffer alt, java.nio.FloatBuffer z, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj, java.nio.FloatBuffer p) - { - boolean _direct = BufferFactory.isDirect(alt); - if (z != null && _direct != BufferFactory.isDirect(z)) - throw new RuntimeException("Argument \"z\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (p != null && _direct != BufferFactory.isDirect(p)) - throw new RuntimeException("Argument \"p\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - alt2press0(alt, BufferFactory.getDirectBufferByteOffset(alt), z, BufferFactory.getDirectBufferByteOffset(z), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj), p, BufferFactory.getDirectBufferByteOffset(p)); - } else { - alt2press1(BufferFactory.getArray(alt), BufferFactory.getIndirectBufferByteOffset(alt), BufferFactory.getArray(z), BufferFactory.getIndirectBufferByteOffset(z), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj), BufferFactory.getArray(p), BufferFactory.getIndirectBufferByteOffset(p)); - } - } - - /** Entry point to C language function:
void alt2press(float * alt, float * z, int * mni, int * ni, int * nj, float * p); */ - private static native void alt2press0(Object alt, int alt_byte_offset, Object z, int z_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object p, int p_byte_offset); - - /** Entry point to C language function:
void alt2press(float * alt, float * z, int * mni, int * ni, int * nj, float * p); */ - private static native void alt2press1(Object alt, int alt_byte_offset, Object z, int z_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object p, int p_byte_offset); - - /** Interface to C language function:
void alt2press(float * alt, float * z, int * mni, int * ni, int * nj, float * p); */ - public static void alt2press(float[] alt, int alt_offset, float[] z, int z_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset, float[] p, int p_offset) - { - if(alt != null && alt.length <= alt_offset) - throw new RuntimeException("array offset argument \"alt_offset\" (" + alt_offset + ") equals or exceeds array length (" + alt.length + ")"); - if(z != null && z.length <= z_offset) - throw new RuntimeException("array offset argument \"z_offset\" (" + z_offset + ") equals or exceeds array length (" + z.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - if(p != null && p.length <= p_offset) - throw new RuntimeException("array offset argument \"p_offset\" (" + p_offset + ") equals or exceeds array length (" + p.length + ")"); - alt2press1(alt, BufferFactory.SIZEOF_FLOAT * alt_offset, z, BufferFactory.SIZEOF_FLOAT * z_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset, p, BufferFactory.SIZEOF_FLOAT * p_offset); - - } - - /** Interface to C language function:
void avwind(float * ELEV, float * TOP, float * BOT, float * HW, float * PW, float * TW, float * UW, float * VW, int * NW, float * UAVG, float * VAVG, float * AVDIR, float * AVSPD); */ - public static void avwind(java.nio.FloatBuffer ELEV, java.nio.FloatBuffer TOP, java.nio.FloatBuffer BOT, java.nio.FloatBuffer HW, java.nio.FloatBuffer PW, java.nio.FloatBuffer TW, java.nio.FloatBuffer UW, java.nio.FloatBuffer VW, java.nio.IntBuffer NW, java.nio.FloatBuffer UAVG, java.nio.FloatBuffer VAVG, java.nio.FloatBuffer AVDIR, java.nio.FloatBuffer AVSPD) - { - boolean _direct = BufferFactory.isDirect(ELEV); - if (TOP != null && _direct != BufferFactory.isDirect(TOP)) - throw new RuntimeException("Argument \"TOP\" : Buffers passed to this method must all be either direct or indirect"); - if (BOT != null && _direct != BufferFactory.isDirect(BOT)) - throw new RuntimeException("Argument \"BOT\" : Buffers passed to this method must all be either direct or indirect"); - if (HW != null && _direct != BufferFactory.isDirect(HW)) - throw new RuntimeException("Argument \"HW\" : Buffers passed to this method must all be either direct or indirect"); - if (PW != null && _direct != BufferFactory.isDirect(PW)) - throw new RuntimeException("Argument \"PW\" : Buffers passed to this method must all be either direct or indirect"); - if (TW != null && _direct != BufferFactory.isDirect(TW)) - throw new RuntimeException("Argument \"TW\" : Buffers passed to this method must all be either direct or indirect"); - if (UW != null && _direct != BufferFactory.isDirect(UW)) - throw new RuntimeException("Argument \"UW\" : Buffers passed to this method must all be either direct or indirect"); - if (VW != null && _direct != BufferFactory.isDirect(VW)) - throw new RuntimeException("Argument \"VW\" : Buffers passed to this method must all be either direct or indirect"); - if (NW != null && _direct != BufferFactory.isDirect(NW)) - throw new RuntimeException("Argument \"NW\" : Buffers passed to this method must all be either direct or indirect"); - if (UAVG != null && _direct != BufferFactory.isDirect(UAVG)) - throw new RuntimeException("Argument \"UAVG\" : Buffers passed to this method must all be either direct or indirect"); - if (VAVG != null && _direct != BufferFactory.isDirect(VAVG)) - throw new RuntimeException("Argument \"VAVG\" : Buffers passed to this method must all be either direct or indirect"); - if (AVDIR != null && _direct != BufferFactory.isDirect(AVDIR)) - throw new RuntimeException("Argument \"AVDIR\" : Buffers passed to this method must all be either direct or indirect"); - if (AVSPD != null && _direct != BufferFactory.isDirect(AVSPD)) - throw new RuntimeException("Argument \"AVSPD\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - avwind0(ELEV, BufferFactory.getDirectBufferByteOffset(ELEV), TOP, BufferFactory.getDirectBufferByteOffset(TOP), BOT, BufferFactory.getDirectBufferByteOffset(BOT), HW, BufferFactory.getDirectBufferByteOffset(HW), PW, BufferFactory.getDirectBufferByteOffset(PW), TW, BufferFactory.getDirectBufferByteOffset(TW), UW, BufferFactory.getDirectBufferByteOffset(UW), VW, BufferFactory.getDirectBufferByteOffset(VW), NW, BufferFactory.getDirectBufferByteOffset(NW), UAVG, BufferFactory.getDirectBufferByteOffset(UAVG), VAVG, BufferFactory.getDirectBufferByteOffset(VAVG), AVDIR, BufferFactory.getDirectBufferByteOffset(AVDIR), AVSPD, BufferFactory.getDirectBufferByteOffset(AVSPD)); - } else { - avwind1(BufferFactory.getArray(ELEV), BufferFactory.getIndirectBufferByteOffset(ELEV), BufferFactory.getArray(TOP), BufferFactory.getIndirectBufferByteOffset(TOP), BufferFactory.getArray(BOT), BufferFactory.getIndirectBufferByteOffset(BOT), BufferFactory.getArray(HW), BufferFactory.getIndirectBufferByteOffset(HW), BufferFactory.getArray(PW), BufferFactory.getIndirectBufferByteOffset(PW), BufferFactory.getArray(TW), BufferFactory.getIndirectBufferByteOffset(TW), BufferFactory.getArray(UW), BufferFactory.getIndirectBufferByteOffset(UW), BufferFactory.getArray(VW), BufferFactory.getIndirectBufferByteOffset(VW), BufferFactory.getArray(NW), BufferFactory.getIndirectBufferByteOffset(NW), BufferFactory.getArray(UAVG), BufferFactory.getIndirectBufferByteOffset(UAVG), BufferFactory.getArray(VAVG), BufferFactory.getIndirectBufferByteOffset(VAVG), BufferFactory.getArray(AVDIR), BufferFactory.getIndirectBufferByteOffset(AVDIR), BufferFactory.getArray(AVSPD), BufferFactory.getIndirectBufferByteOffset(AVSPD)); - } - } - - /** Entry point to C language function:
void avwind(float * ELEV, float * TOP, float * BOT, float * HW, float * PW, float * TW, float * UW, float * VW, int * NW, float * UAVG, float * VAVG, float * AVDIR, float * AVSPD); */ - private static native void avwind0(Object ELEV, int ELEV_byte_offset, Object TOP, int TOP_byte_offset, Object BOT, int BOT_byte_offset, Object HW, int HW_byte_offset, Object PW, int PW_byte_offset, Object TW, int TW_byte_offset, Object UW, int UW_byte_offset, Object VW, int VW_byte_offset, Object NW, int NW_byte_offset, Object UAVG, int UAVG_byte_offset, Object VAVG, int VAVG_byte_offset, Object AVDIR, int AVDIR_byte_offset, Object AVSPD, int AVSPD_byte_offset); - - /** Entry point to C language function:
void avwind(float * ELEV, float * TOP, float * BOT, float * HW, float * PW, float * TW, float * UW, float * VW, int * NW, float * UAVG, float * VAVG, float * AVDIR, float * AVSPD); */ - private static native void avwind1(Object ELEV, int ELEV_byte_offset, Object TOP, int TOP_byte_offset, Object BOT, int BOT_byte_offset, Object HW, int HW_byte_offset, Object PW, int PW_byte_offset, Object TW, int TW_byte_offset, Object UW, int UW_byte_offset, Object VW, int VW_byte_offset, Object NW, int NW_byte_offset, Object UAVG, int UAVG_byte_offset, Object VAVG, int VAVG_byte_offset, Object AVDIR, int AVDIR_byte_offset, Object AVSPD, int AVSPD_byte_offset); - - /** Interface to C language function:
void avwind(float * ELEV, float * TOP, float * BOT, float * HW, float * PW, float * TW, float * UW, float * VW, int * NW, float * UAVG, float * VAVG, float * AVDIR, float * AVSPD); */ - public static void avwind(float[] ELEV, int ELEV_offset, float[] TOP, int TOP_offset, float[] BOT, int BOT_offset, float[] HW, int HW_offset, float[] PW, int PW_offset, float[] TW, int TW_offset, float[] UW, int UW_offset, float[] VW, int VW_offset, int[] NW, int NW_offset, float[] UAVG, int UAVG_offset, float[] VAVG, int VAVG_offset, float[] AVDIR, int AVDIR_offset, float[] AVSPD, int AVSPD_offset) - { - if(ELEV != null && ELEV.length <= ELEV_offset) - throw new RuntimeException("array offset argument \"ELEV_offset\" (" + ELEV_offset + ") equals or exceeds array length (" + ELEV.length + ")"); - if(TOP != null && TOP.length <= TOP_offset) - throw new RuntimeException("array offset argument \"TOP_offset\" (" + TOP_offset + ") equals or exceeds array length (" + TOP.length + ")"); - if(BOT != null && BOT.length <= BOT_offset) - throw new RuntimeException("array offset argument \"BOT_offset\" (" + BOT_offset + ") equals or exceeds array length (" + BOT.length + ")"); - if(HW != null && HW.length <= HW_offset) - throw new RuntimeException("array offset argument \"HW_offset\" (" + HW_offset + ") equals or exceeds array length (" + HW.length + ")"); - if(PW != null && PW.length <= PW_offset) - throw new RuntimeException("array offset argument \"PW_offset\" (" + PW_offset + ") equals or exceeds array length (" + PW.length + ")"); - if(TW != null && TW.length <= TW_offset) - throw new RuntimeException("array offset argument \"TW_offset\" (" + TW_offset + ") equals or exceeds array length (" + TW.length + ")"); - if(UW != null && UW.length <= UW_offset) - throw new RuntimeException("array offset argument \"UW_offset\" (" + UW_offset + ") equals or exceeds array length (" + UW.length + ")"); - if(VW != null && VW.length <= VW_offset) - throw new RuntimeException("array offset argument \"VW_offset\" (" + VW_offset + ") equals or exceeds array length (" + VW.length + ")"); - if(NW != null && NW.length <= NW_offset) - throw new RuntimeException("array offset argument \"NW_offset\" (" + NW_offset + ") equals or exceeds array length (" + NW.length + ")"); - if(UAVG != null && UAVG.length <= UAVG_offset) - throw new RuntimeException("array offset argument \"UAVG_offset\" (" + UAVG_offset + ") equals or exceeds array length (" + UAVG.length + ")"); - if(VAVG != null && VAVG.length <= VAVG_offset) - throw new RuntimeException("array offset argument \"VAVG_offset\" (" + VAVG_offset + ") equals or exceeds array length (" + VAVG.length + ")"); - if(AVDIR != null && AVDIR.length <= AVDIR_offset) - throw new RuntimeException("array offset argument \"AVDIR_offset\" (" + AVDIR_offset + ") equals or exceeds array length (" + AVDIR.length + ")"); - if(AVSPD != null && AVSPD.length <= AVSPD_offset) - throw new RuntimeException("array offset argument \"AVSPD_offset\" (" + AVSPD_offset + ") equals or exceeds array length (" + AVSPD.length + ")"); - avwind1(ELEV, BufferFactory.SIZEOF_FLOAT * ELEV_offset, TOP, BufferFactory.SIZEOF_FLOAT * TOP_offset, BOT, BufferFactory.SIZEOF_FLOAT * BOT_offset, HW, BufferFactory.SIZEOF_FLOAT * HW_offset, PW, BufferFactory.SIZEOF_FLOAT * PW_offset, TW, BufferFactory.SIZEOF_FLOAT * TW_offset, UW, BufferFactory.SIZEOF_FLOAT * UW_offset, VW, BufferFactory.SIZEOF_FLOAT * VW_offset, NW, BufferFactory.SIZEOF_INT * NW_offset, UAVG, BufferFactory.SIZEOF_FLOAT * UAVG_offset, VAVG, BufferFactory.SIZEOF_FLOAT * VAVG_offset, AVDIR, BufferFactory.SIZEOF_FLOAT * AVDIR_offset, AVSPD, BufferFactory.SIZEOF_FLOAT * AVSPD_offset); - - } - - /** Interface to C language function:
float calcHeatIndex(float temp, float dewPoint); */ - public static native float calcHeatIndex(float temp, float dewPoint); - - /** Interface to C language function:
float calcWindChill(float temp, float windSpd); */ - public static native float calcWindChill(float temp, float windSpd); - - /** Interface to C language function:
void calccondpr(float * p, float * t, float * rh, int * mni, int * ni, int * nj, float * q); */ - public static void calccondpr(java.nio.FloatBuffer p, java.nio.FloatBuffer t, java.nio.FloatBuffer rh, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj, java.nio.FloatBuffer q) - { - boolean _direct = BufferFactory.isDirect(p); - if (t != null && _direct != BufferFactory.isDirect(t)) - throw new RuntimeException("Argument \"t\" : Buffers passed to this method must all be either direct or indirect"); - if (rh != null && _direct != BufferFactory.isDirect(rh)) - throw new RuntimeException("Argument \"rh\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (q != null && _direct != BufferFactory.isDirect(q)) - throw new RuntimeException("Argument \"q\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - calccondpr0(p, BufferFactory.getDirectBufferByteOffset(p), t, BufferFactory.getDirectBufferByteOffset(t), rh, BufferFactory.getDirectBufferByteOffset(rh), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj), q, BufferFactory.getDirectBufferByteOffset(q)); - } else { - calccondpr1(BufferFactory.getArray(p), BufferFactory.getIndirectBufferByteOffset(p), BufferFactory.getArray(t), BufferFactory.getIndirectBufferByteOffset(t), BufferFactory.getArray(rh), BufferFactory.getIndirectBufferByteOffset(rh), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj), BufferFactory.getArray(q), BufferFactory.getIndirectBufferByteOffset(q)); - } - } - - /** Entry point to C language function:
void calccondpr(float * p, float * t, float * rh, int * mni, int * ni, int * nj, float * q); */ - private static native void calccondpr0(Object p, int p_byte_offset, Object t, int t_byte_offset, Object rh, int rh_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object q, int q_byte_offset); - - /** Entry point to C language function:
void calccondpr(float * p, float * t, float * rh, int * mni, int * ni, int * nj, float * q); */ - private static native void calccondpr1(Object p, int p_byte_offset, Object t, int t_byte_offset, Object rh, int rh_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object q, int q_byte_offset); - - /** Interface to C language function:
void calccondpr(float * p, float * t, float * rh, int * mni, int * ni, int * nj, float * q); */ - public static void calccondpr(float[] p, int p_offset, float[] t, int t_offset, float[] rh, int rh_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset, float[] q, int q_offset) - { - if(p != null && p.length <= p_offset) - throw new RuntimeException("array offset argument \"p_offset\" (" + p_offset + ") equals or exceeds array length (" + p.length + ")"); - if(t != null && t.length <= t_offset) - throw new RuntimeException("array offset argument \"t_offset\" (" + t_offset + ") equals or exceeds array length (" + t.length + ")"); - if(rh != null && rh.length <= rh_offset) - throw new RuntimeException("array offset argument \"rh_offset\" (" + rh_offset + ") equals or exceeds array length (" + rh.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - if(q != null && q.length <= q_offset) - throw new RuntimeException("array offset argument \"q_offset\" (" + q_offset + ") equals or exceeds array length (" + q.length + ")"); - calccondpr1(p, BufferFactory.SIZEOF_FLOAT * p_offset, t, BufferFactory.SIZEOF_FLOAT * t_offset, rh, BufferFactory.SIZEOF_FLOAT * rh_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset, q, BufferFactory.SIZEOF_FLOAT * q_offset); - - } - - /** Interface to C language function:
void calccondprdef(float * p, float * t, float * rh, int * mni, int * ni, int * nj, float * q); */ - public static void calccondprdef(java.nio.FloatBuffer p, java.nio.FloatBuffer t, java.nio.FloatBuffer rh, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj, java.nio.FloatBuffer q) - { - boolean _direct = BufferFactory.isDirect(p); - if (t != null && _direct != BufferFactory.isDirect(t)) - throw new RuntimeException("Argument \"t\" : Buffers passed to this method must all be either direct or indirect"); - if (rh != null && _direct != BufferFactory.isDirect(rh)) - throw new RuntimeException("Argument \"rh\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (q != null && _direct != BufferFactory.isDirect(q)) - throw new RuntimeException("Argument \"q\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - calccondprdef0(p, BufferFactory.getDirectBufferByteOffset(p), t, BufferFactory.getDirectBufferByteOffset(t), rh, BufferFactory.getDirectBufferByteOffset(rh), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj), q, BufferFactory.getDirectBufferByteOffset(q)); - } else { - calccondprdef1(BufferFactory.getArray(p), BufferFactory.getIndirectBufferByteOffset(p), BufferFactory.getArray(t), BufferFactory.getIndirectBufferByteOffset(t), BufferFactory.getArray(rh), BufferFactory.getIndirectBufferByteOffset(rh), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj), BufferFactory.getArray(q), BufferFactory.getIndirectBufferByteOffset(q)); - } - } - - /** Entry point to C language function:
void calccondprdef(float * p, float * t, float * rh, int * mni, int * ni, int * nj, float * q); */ - private static native void calccondprdef0(Object p, int p_byte_offset, Object t, int t_byte_offset, Object rh, int rh_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object q, int q_byte_offset); - - /** Entry point to C language function:
void calccondprdef(float * p, float * t, float * rh, int * mni, int * ni, int * nj, float * q); */ - private static native void calccondprdef1(Object p, int p_byte_offset, Object t, int t_byte_offset, Object rh, int rh_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object q, int q_byte_offset); - - /** Interface to C language function:
void calccondprdef(float * p, float * t, float * rh, int * mni, int * ni, int * nj, float * q); */ - public static void calccondprdef(float[] p, int p_offset, float[] t, int t_offset, float[] rh, int rh_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset, float[] q, int q_offset) - { - if(p != null && p.length <= p_offset) - throw new RuntimeException("array offset argument \"p_offset\" (" + p_offset + ") equals or exceeds array length (" + p.length + ")"); - if(t != null && t.length <= t_offset) - throw new RuntimeException("array offset argument \"t_offset\" (" + t_offset + ") equals or exceeds array length (" + t.length + ")"); - if(rh != null && rh.length <= rh_offset) - throw new RuntimeException("array offset argument \"rh_offset\" (" + rh_offset + ") equals or exceeds array length (" + rh.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - if(q != null && q.length <= q_offset) - throw new RuntimeException("array offset argument \"q_offset\" (" + q_offset + ") equals or exceeds array length (" + q.length + ")"); - calccondprdef1(p, BufferFactory.SIZEOF_FLOAT * p_offset, t, BufferFactory.SIZEOF_FLOAT * t_offset, rh, BufferFactory.SIZEOF_FLOAT * rh_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset, q, BufferFactory.SIZEOF_FLOAT * q_offset); - - } - - /** Interface to C language function:
void calcdpd(float * t, float * rh, int * mni, int * ni, int * nj, float * dpd); */ - public static void calcdpd(java.nio.FloatBuffer t, java.nio.FloatBuffer rh, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj, java.nio.FloatBuffer dpd) - { - boolean _direct = BufferFactory.isDirect(t); - if (rh != null && _direct != BufferFactory.isDirect(rh)) - throw new RuntimeException("Argument \"rh\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (dpd != null && _direct != BufferFactory.isDirect(dpd)) - throw new RuntimeException("Argument \"dpd\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - calcdpd0(t, BufferFactory.getDirectBufferByteOffset(t), rh, BufferFactory.getDirectBufferByteOffset(rh), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj), dpd, BufferFactory.getDirectBufferByteOffset(dpd)); - } else { - calcdpd1(BufferFactory.getArray(t), BufferFactory.getIndirectBufferByteOffset(t), BufferFactory.getArray(rh), BufferFactory.getIndirectBufferByteOffset(rh), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj), BufferFactory.getArray(dpd), BufferFactory.getIndirectBufferByteOffset(dpd)); - } - } - - /** Entry point to C language function:
void calcdpd(float * t, float * rh, int * mni, int * ni, int * nj, float * dpd); */ - private static native void calcdpd0(Object t, int t_byte_offset, Object rh, int rh_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object dpd, int dpd_byte_offset); - - /** Entry point to C language function:
void calcdpd(float * t, float * rh, int * mni, int * ni, int * nj, float * dpd); */ - private static native void calcdpd1(Object t, int t_byte_offset, Object rh, int rh_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object dpd, int dpd_byte_offset); - - /** Interface to C language function:
void calcdpd(float * t, float * rh, int * mni, int * ni, int * nj, float * dpd); */ - public static void calcdpd(float[] t, int t_offset, float[] rh, int rh_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset, float[] dpd, int dpd_offset) - { - if(t != null && t.length <= t_offset) - throw new RuntimeException("array offset argument \"t_offset\" (" + t_offset + ") equals or exceeds array length (" + t.length + ")"); - if(rh != null && rh.length <= rh_offset) - throw new RuntimeException("array offset argument \"rh_offset\" (" + rh_offset + ") equals or exceeds array length (" + rh.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - if(dpd != null && dpd.length <= dpd_offset) - throw new RuntimeException("array offset argument \"dpd_offset\" (" + dpd_offset + ") equals or exceeds array length (" + dpd.length + ")"); - calcdpd1(t, BufferFactory.SIZEOF_FLOAT * t_offset, rh, BufferFactory.SIZEOF_FLOAT * rh_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset, dpd, BufferFactory.SIZEOF_FLOAT * dpd_offset); - - } - - /** Interface to C language function:
void calchelicity(float * HW, float * PW, float * UW, float * VW, int * NW, float * elev, float * ztop, float * ghx, float * ghy, float * diravg, float * spdavg, float * stmdir, float * stmspd, float * helicity, float * SRHel); */ - public static void calchelicity(java.nio.FloatBuffer HW, java.nio.FloatBuffer PW, java.nio.FloatBuffer UW, java.nio.FloatBuffer VW, java.nio.IntBuffer NW, java.nio.FloatBuffer elev, java.nio.FloatBuffer ztop, java.nio.FloatBuffer ghx, java.nio.FloatBuffer ghy, java.nio.FloatBuffer diravg, java.nio.FloatBuffer spdavg, java.nio.FloatBuffer stmdir, java.nio.FloatBuffer stmspd, java.nio.FloatBuffer helicity, java.nio.FloatBuffer SRHel) - { - boolean _direct = BufferFactory.isDirect(HW); - if (PW != null && _direct != BufferFactory.isDirect(PW)) - throw new RuntimeException("Argument \"PW\" : Buffers passed to this method must all be either direct or indirect"); - if (UW != null && _direct != BufferFactory.isDirect(UW)) - throw new RuntimeException("Argument \"UW\" : Buffers passed to this method must all be either direct or indirect"); - if (VW != null && _direct != BufferFactory.isDirect(VW)) - throw new RuntimeException("Argument \"VW\" : Buffers passed to this method must all be either direct or indirect"); - if (NW != null && _direct != BufferFactory.isDirect(NW)) - throw new RuntimeException("Argument \"NW\" : Buffers passed to this method must all be either direct or indirect"); - if (elev != null && _direct != BufferFactory.isDirect(elev)) - throw new RuntimeException("Argument \"elev\" : Buffers passed to this method must all be either direct or indirect"); - if (ztop != null && _direct != BufferFactory.isDirect(ztop)) - throw new RuntimeException("Argument \"ztop\" : Buffers passed to this method must all be either direct or indirect"); - if (ghx != null && _direct != BufferFactory.isDirect(ghx)) - throw new RuntimeException("Argument \"ghx\" : Buffers passed to this method must all be either direct or indirect"); - if (ghy != null && _direct != BufferFactory.isDirect(ghy)) - throw new RuntimeException("Argument \"ghy\" : Buffers passed to this method must all be either direct or indirect"); - if (diravg != null && _direct != BufferFactory.isDirect(diravg)) - throw new RuntimeException("Argument \"diravg\" : Buffers passed to this method must all be either direct or indirect"); - if (spdavg != null && _direct != BufferFactory.isDirect(spdavg)) - throw new RuntimeException("Argument \"spdavg\" : Buffers passed to this method must all be either direct or indirect"); - if (stmdir != null && _direct != BufferFactory.isDirect(stmdir)) - throw new RuntimeException("Argument \"stmdir\" : Buffers passed to this method must all be either direct or indirect"); - if (stmspd != null && _direct != BufferFactory.isDirect(stmspd)) - throw new RuntimeException("Argument \"stmspd\" : Buffers passed to this method must all be either direct or indirect"); - if (helicity != null && _direct != BufferFactory.isDirect(helicity)) - throw new RuntimeException("Argument \"helicity\" : Buffers passed to this method must all be either direct or indirect"); - if (SRHel != null && _direct != BufferFactory.isDirect(SRHel)) - throw new RuntimeException("Argument \"SRHel\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - calchelicity0(HW, BufferFactory.getDirectBufferByteOffset(HW), PW, BufferFactory.getDirectBufferByteOffset(PW), UW, BufferFactory.getDirectBufferByteOffset(UW), VW, BufferFactory.getDirectBufferByteOffset(VW), NW, BufferFactory.getDirectBufferByteOffset(NW), elev, BufferFactory.getDirectBufferByteOffset(elev), ztop, BufferFactory.getDirectBufferByteOffset(ztop), ghx, BufferFactory.getDirectBufferByteOffset(ghx), ghy, BufferFactory.getDirectBufferByteOffset(ghy), diravg, BufferFactory.getDirectBufferByteOffset(diravg), spdavg, BufferFactory.getDirectBufferByteOffset(spdavg), stmdir, BufferFactory.getDirectBufferByteOffset(stmdir), stmspd, BufferFactory.getDirectBufferByteOffset(stmspd), helicity, BufferFactory.getDirectBufferByteOffset(helicity), SRHel, BufferFactory.getDirectBufferByteOffset(SRHel)); - } else { - calchelicity1(BufferFactory.getArray(HW), BufferFactory.getIndirectBufferByteOffset(HW), BufferFactory.getArray(PW), BufferFactory.getIndirectBufferByteOffset(PW), BufferFactory.getArray(UW), BufferFactory.getIndirectBufferByteOffset(UW), BufferFactory.getArray(VW), BufferFactory.getIndirectBufferByteOffset(VW), BufferFactory.getArray(NW), BufferFactory.getIndirectBufferByteOffset(NW), BufferFactory.getArray(elev), BufferFactory.getIndirectBufferByteOffset(elev), BufferFactory.getArray(ztop), BufferFactory.getIndirectBufferByteOffset(ztop), BufferFactory.getArray(ghx), BufferFactory.getIndirectBufferByteOffset(ghx), BufferFactory.getArray(ghy), BufferFactory.getIndirectBufferByteOffset(ghy), BufferFactory.getArray(diravg), BufferFactory.getIndirectBufferByteOffset(diravg), BufferFactory.getArray(spdavg), BufferFactory.getIndirectBufferByteOffset(spdavg), BufferFactory.getArray(stmdir), BufferFactory.getIndirectBufferByteOffset(stmdir), BufferFactory.getArray(stmspd), BufferFactory.getIndirectBufferByteOffset(stmspd), BufferFactory.getArray(helicity), BufferFactory.getIndirectBufferByteOffset(helicity), BufferFactory.getArray(SRHel), BufferFactory.getIndirectBufferByteOffset(SRHel)); - } - } - - /** Entry point to C language function:
void calchelicity(float * HW, float * PW, float * UW, float * VW, int * NW, float * elev, float * ztop, float * ghx, float * ghy, float * diravg, float * spdavg, float * stmdir, float * stmspd, float * helicity, float * SRHel); */ - private static native void calchelicity0(Object HW, int HW_byte_offset, Object PW, int PW_byte_offset, Object UW, int UW_byte_offset, Object VW, int VW_byte_offset, Object NW, int NW_byte_offset, Object elev, int elev_byte_offset, Object ztop, int ztop_byte_offset, Object ghx, int ghx_byte_offset, Object ghy, int ghy_byte_offset, Object diravg, int diravg_byte_offset, Object spdavg, int spdavg_byte_offset, Object stmdir, int stmdir_byte_offset, Object stmspd, int stmspd_byte_offset, Object helicity, int helicity_byte_offset, Object SRHel, int SRHel_byte_offset); - - /** Entry point to C language function:
void calchelicity(float * HW, float * PW, float * UW, float * VW, int * NW, float * elev, float * ztop, float * ghx, float * ghy, float * diravg, float * spdavg, float * stmdir, float * stmspd, float * helicity, float * SRHel); */ - private static native void calchelicity1(Object HW, int HW_byte_offset, Object PW, int PW_byte_offset, Object UW, int UW_byte_offset, Object VW, int VW_byte_offset, Object NW, int NW_byte_offset, Object elev, int elev_byte_offset, Object ztop, int ztop_byte_offset, Object ghx, int ghx_byte_offset, Object ghy, int ghy_byte_offset, Object diravg, int diravg_byte_offset, Object spdavg, int spdavg_byte_offset, Object stmdir, int stmdir_byte_offset, Object stmspd, int stmspd_byte_offset, Object helicity, int helicity_byte_offset, Object SRHel, int SRHel_byte_offset); - - /** Interface to C language function:
void calchelicity(float * HW, float * PW, float * UW, float * VW, int * NW, float * elev, float * ztop, float * ghx, float * ghy, float * diravg, float * spdavg, float * stmdir, float * stmspd, float * helicity, float * SRHel); */ - public static void calchelicity(float[] HW, int HW_offset, float[] PW, int PW_offset, float[] UW, int UW_offset, float[] VW, int VW_offset, int[] NW, int NW_offset, float[] elev, int elev_offset, float[] ztop, int ztop_offset, float[] ghx, int ghx_offset, float[] ghy, int ghy_offset, float[] diravg, int diravg_offset, float[] spdavg, int spdavg_offset, float[] stmdir, int stmdir_offset, float[] stmspd, int stmspd_offset, float[] helicity, int helicity_offset, float[] SRHel, int SRHel_offset) - { - if(HW != null && HW.length <= HW_offset) - throw new RuntimeException("array offset argument \"HW_offset\" (" + HW_offset + ") equals or exceeds array length (" + HW.length + ")"); - if(PW != null && PW.length <= PW_offset) - throw new RuntimeException("array offset argument \"PW_offset\" (" + PW_offset + ") equals or exceeds array length (" + PW.length + ")"); - if(UW != null && UW.length <= UW_offset) - throw new RuntimeException("array offset argument \"UW_offset\" (" + UW_offset + ") equals or exceeds array length (" + UW.length + ")"); - if(VW != null && VW.length <= VW_offset) - throw new RuntimeException("array offset argument \"VW_offset\" (" + VW_offset + ") equals or exceeds array length (" + VW.length + ")"); - if(NW != null && NW.length <= NW_offset) - throw new RuntimeException("array offset argument \"NW_offset\" (" + NW_offset + ") equals or exceeds array length (" + NW.length + ")"); - if(elev != null && elev.length <= elev_offset) - throw new RuntimeException("array offset argument \"elev_offset\" (" + elev_offset + ") equals or exceeds array length (" + elev.length + ")"); - if(ztop != null && ztop.length <= ztop_offset) - throw new RuntimeException("array offset argument \"ztop_offset\" (" + ztop_offset + ") equals or exceeds array length (" + ztop.length + ")"); - if(ghx != null && ghx.length <= ghx_offset) - throw new RuntimeException("array offset argument \"ghx_offset\" (" + ghx_offset + ") equals or exceeds array length (" + ghx.length + ")"); - if(ghy != null && ghy.length <= ghy_offset) - throw new RuntimeException("array offset argument \"ghy_offset\" (" + ghy_offset + ") equals or exceeds array length (" + ghy.length + ")"); - if(diravg != null && diravg.length <= diravg_offset) - throw new RuntimeException("array offset argument \"diravg_offset\" (" + diravg_offset + ") equals or exceeds array length (" + diravg.length + ")"); - if(spdavg != null && spdavg.length <= spdavg_offset) - throw new RuntimeException("array offset argument \"spdavg_offset\" (" + spdavg_offset + ") equals or exceeds array length (" + spdavg.length + ")"); - if(stmdir != null && stmdir.length <= stmdir_offset) - throw new RuntimeException("array offset argument \"stmdir_offset\" (" + stmdir_offset + ") equals or exceeds array length (" + stmdir.length + ")"); - if(stmspd != null && stmspd.length <= stmspd_offset) - throw new RuntimeException("array offset argument \"stmspd_offset\" (" + stmspd_offset + ") equals or exceeds array length (" + stmspd.length + ")"); - if(helicity != null && helicity.length <= helicity_offset) - throw new RuntimeException("array offset argument \"helicity_offset\" (" + helicity_offset + ") equals or exceeds array length (" + helicity.length + ")"); - if(SRHel != null && SRHel.length <= SRHel_offset) - throw new RuntimeException("array offset argument \"SRHel_offset\" (" + SRHel_offset + ") equals or exceeds array length (" + SRHel.length + ")"); - calchelicity1(HW, BufferFactory.SIZEOF_FLOAT * HW_offset, PW, BufferFactory.SIZEOF_FLOAT * PW_offset, UW, BufferFactory.SIZEOF_FLOAT * UW_offset, VW, BufferFactory.SIZEOF_FLOAT * VW_offset, NW, BufferFactory.SIZEOF_INT * NW_offset, elev, BufferFactory.SIZEOF_FLOAT * elev_offset, ztop, BufferFactory.SIZEOF_FLOAT * ztop_offset, ghx, BufferFactory.SIZEOF_FLOAT * ghx_offset, ghy, BufferFactory.SIZEOF_FLOAT * ghy_offset, diravg, BufferFactory.SIZEOF_FLOAT * diravg_offset, spdavg, BufferFactory.SIZEOF_FLOAT * spdavg_offset, stmdir, BufferFactory.SIZEOF_FLOAT * stmdir_offset, stmspd, BufferFactory.SIZEOF_FLOAT * stmspd_offset, helicity, BufferFactory.SIZEOF_FLOAT * helicity_offset, SRHel, BufferFactory.SIZEOF_FLOAT * SRHel_offset); - - } - - /** Interface to C language function:
void calckidx(float * press, float * temp, float * td, int numOfLevel, float * K); */ - public static void calckidx(java.nio.FloatBuffer press, java.nio.FloatBuffer temp, java.nio.FloatBuffer td, int numOfLevel, java.nio.FloatBuffer K) - { - boolean _direct = BufferFactory.isDirect(press); - if (temp != null && _direct != BufferFactory.isDirect(temp)) - throw new RuntimeException("Argument \"temp\" : Buffers passed to this method must all be either direct or indirect"); - if (td != null && _direct != BufferFactory.isDirect(td)) - throw new RuntimeException("Argument \"td\" : Buffers passed to this method must all be either direct or indirect"); - if (K != null && _direct != BufferFactory.isDirect(K)) - throw new RuntimeException("Argument \"K\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - calckidx0(press, BufferFactory.getDirectBufferByteOffset(press), temp, BufferFactory.getDirectBufferByteOffset(temp), td, BufferFactory.getDirectBufferByteOffset(td), numOfLevel, K, BufferFactory.getDirectBufferByteOffset(K)); - } else { - calckidx1(BufferFactory.getArray(press), BufferFactory.getIndirectBufferByteOffset(press), BufferFactory.getArray(temp), BufferFactory.getIndirectBufferByteOffset(temp), BufferFactory.getArray(td), BufferFactory.getIndirectBufferByteOffset(td), numOfLevel, BufferFactory.getArray(K), BufferFactory.getIndirectBufferByteOffset(K)); - } - } - - /** Entry point to C language function:
void calckidx(float * press, float * temp, float * td, int numOfLevel, float * K); */ - private static native void calckidx0(Object press, int press_byte_offset, Object temp, int temp_byte_offset, Object td, int td_byte_offset, int numOfLevel, Object K, int K_byte_offset); - - /** Entry point to C language function:
void calckidx(float * press, float * temp, float * td, int numOfLevel, float * K); */ - private static native void calckidx1(Object press, int press_byte_offset, Object temp, int temp_byte_offset, Object td, int td_byte_offset, int numOfLevel, Object K, int K_byte_offset); - - /** Interface to C language function:
void calckidx(float * press, float * temp, float * td, int numOfLevel, float * K); */ - public static void calckidx(float[] press, int press_offset, float[] temp, int temp_offset, float[] td, int td_offset, int numOfLevel, float[] K, int K_offset) - { - if(press != null && press.length <= press_offset) - throw new RuntimeException("array offset argument \"press_offset\" (" + press_offset + ") equals or exceeds array length (" + press.length + ")"); - if(temp != null && temp.length <= temp_offset) - throw new RuntimeException("array offset argument \"temp_offset\" (" + temp_offset + ") equals or exceeds array length (" + temp.length + ")"); - if(td != null && td.length <= td_offset) - throw new RuntimeException("array offset argument \"td_offset\" (" + td_offset + ") equals or exceeds array length (" + td.length + ")"); - if(K != null && K.length <= K_offset) - throw new RuntimeException("array offset argument \"K_offset\" (" + K_offset + ") equals or exceeds array length (" + K.length + ")"); - calckidx1(press, BufferFactory.SIZEOF_FLOAT * press_offset, temp, BufferFactory.SIZEOF_FLOAT * temp_offset, td, BufferFactory.SIZEOF_FLOAT * td_offset, numOfLevel, K, BufferFactory.SIZEOF_FLOAT * K_offset); - - } - - /** Interface to C language function:
void calcli(float * p, float * t, float * rh, float * t5, float * p5, int * mni, int * ni, int * nj, float * li); */ - public static void calcli(java.nio.FloatBuffer p, java.nio.FloatBuffer t, java.nio.FloatBuffer rh, java.nio.FloatBuffer t5, java.nio.FloatBuffer p5, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj, java.nio.FloatBuffer li) - { - boolean _direct = BufferFactory.isDirect(p); - if (t != null && _direct != BufferFactory.isDirect(t)) - throw new RuntimeException("Argument \"t\" : Buffers passed to this method must all be either direct or indirect"); - if (rh != null && _direct != BufferFactory.isDirect(rh)) - throw new RuntimeException("Argument \"rh\" : Buffers passed to this method must all be either direct or indirect"); - if (t5 != null && _direct != BufferFactory.isDirect(t5)) - throw new RuntimeException("Argument \"t5\" : Buffers passed to this method must all be either direct or indirect"); - if (p5 != null && _direct != BufferFactory.isDirect(p5)) - throw new RuntimeException("Argument \"p5\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (li != null && _direct != BufferFactory.isDirect(li)) - throw new RuntimeException("Argument \"li\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - calcli0(p, BufferFactory.getDirectBufferByteOffset(p), t, BufferFactory.getDirectBufferByteOffset(t), rh, BufferFactory.getDirectBufferByteOffset(rh), t5, BufferFactory.getDirectBufferByteOffset(t5), p5, BufferFactory.getDirectBufferByteOffset(p5), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj), li, BufferFactory.getDirectBufferByteOffset(li)); - } else { - calcli1(BufferFactory.getArray(p), BufferFactory.getIndirectBufferByteOffset(p), BufferFactory.getArray(t), BufferFactory.getIndirectBufferByteOffset(t), BufferFactory.getArray(rh), BufferFactory.getIndirectBufferByteOffset(rh), BufferFactory.getArray(t5), BufferFactory.getIndirectBufferByteOffset(t5), BufferFactory.getArray(p5), BufferFactory.getIndirectBufferByteOffset(p5), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj), BufferFactory.getArray(li), BufferFactory.getIndirectBufferByteOffset(li)); - } - } - - /** Entry point to C language function:
void calcli(float * p, float * t, float * rh, float * t5, float * p5, int * mni, int * ni, int * nj, float * li); */ - private static native void calcli0(Object p, int p_byte_offset, Object t, int t_byte_offset, Object rh, int rh_byte_offset, Object t5, int t5_byte_offset, Object p5, int p5_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object li, int li_byte_offset); - - /** Entry point to C language function:
void calcli(float * p, float * t, float * rh, float * t5, float * p5, int * mni, int * ni, int * nj, float * li); */ - private static native void calcli1(Object p, int p_byte_offset, Object t, int t_byte_offset, Object rh, int rh_byte_offset, Object t5, int t5_byte_offset, Object p5, int p5_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object li, int li_byte_offset); - - /** Interface to C language function:
void calcli(float * p, float * t, float * rh, float * t5, float * p5, int * mni, int * ni, int * nj, float * li); */ - public static void calcli(float[] p, int p_offset, float[] t, int t_offset, float[] rh, int rh_offset, float[] t5, int t5_offset, float[] p5, int p5_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset, float[] li, int li_offset) - { - if(p != null && p.length <= p_offset) - throw new RuntimeException("array offset argument \"p_offset\" (" + p_offset + ") equals or exceeds array length (" + p.length + ")"); - if(t != null && t.length <= t_offset) - throw new RuntimeException("array offset argument \"t_offset\" (" + t_offset + ") equals or exceeds array length (" + t.length + ")"); - if(rh != null && rh.length <= rh_offset) - throw new RuntimeException("array offset argument \"rh_offset\" (" + rh_offset + ") equals or exceeds array length (" + rh.length + ")"); - if(t5 != null && t5.length <= t5_offset) - throw new RuntimeException("array offset argument \"t5_offset\" (" + t5_offset + ") equals or exceeds array length (" + t5.length + ")"); - if(p5 != null && p5.length <= p5_offset) - throw new RuntimeException("array offset argument \"p5_offset\" (" + p5_offset + ") equals or exceeds array length (" + p5.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - if(li != null && li.length <= li_offset) - throw new RuntimeException("array offset argument \"li_offset\" (" + li_offset + ") equals or exceeds array length (" + li.length + ")"); - calcli1(p, BufferFactory.SIZEOF_FLOAT * p_offset, t, BufferFactory.SIZEOF_FLOAT * t_offset, rh, BufferFactory.SIZEOF_FLOAT * rh_offset, t5, BufferFactory.SIZEOF_FLOAT * t5_offset, p5, BufferFactory.SIZEOF_FLOAT * p5_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset, li, BufferFactory.SIZEOF_FLOAT * li_offset); - - } - - /** Interface to C language function:
void calcpv(float * p_up, float * p_low, float * o_up, float * o_low, float * pvort, int * mni, int * ni, int * nj, float * u_up, float * v_up, float * u_low, float * v_low, float * avort1, float * avort2, float * dx, float * dy, float * coriolis); */ - public static void calcpv(java.nio.FloatBuffer p_up, java.nio.FloatBuffer p_low, java.nio.FloatBuffer o_up, java.nio.FloatBuffer o_low, java.nio.FloatBuffer pvort, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj, java.nio.FloatBuffer u_up, java.nio.FloatBuffer v_up, java.nio.FloatBuffer u_low, java.nio.FloatBuffer v_low, java.nio.FloatBuffer avort1, java.nio.FloatBuffer avort2, java.nio.FloatBuffer dx, java.nio.FloatBuffer dy, java.nio.FloatBuffer coriolis) - { - boolean _direct = BufferFactory.isDirect(p_up); - if (p_low != null && _direct != BufferFactory.isDirect(p_low)) - throw new RuntimeException("Argument \"p_low\" : Buffers passed to this method must all be either direct or indirect"); - if (o_up != null && _direct != BufferFactory.isDirect(o_up)) - throw new RuntimeException("Argument \"o_up\" : Buffers passed to this method must all be either direct or indirect"); - if (o_low != null && _direct != BufferFactory.isDirect(o_low)) - throw new RuntimeException("Argument \"o_low\" : Buffers passed to this method must all be either direct or indirect"); - if (pvort != null && _direct != BufferFactory.isDirect(pvort)) - throw new RuntimeException("Argument \"pvort\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (u_up != null && _direct != BufferFactory.isDirect(u_up)) - throw new RuntimeException("Argument \"u_up\" : Buffers passed to this method must all be either direct or indirect"); - if (v_up != null && _direct != BufferFactory.isDirect(v_up)) - throw new RuntimeException("Argument \"v_up\" : Buffers passed to this method must all be either direct or indirect"); - if (u_low != null && _direct != BufferFactory.isDirect(u_low)) - throw new RuntimeException("Argument \"u_low\" : Buffers passed to this method must all be either direct or indirect"); - if (v_low != null && _direct != BufferFactory.isDirect(v_low)) - throw new RuntimeException("Argument \"v_low\" : Buffers passed to this method must all be either direct or indirect"); - if (avort1 != null && _direct != BufferFactory.isDirect(avort1)) - throw new RuntimeException("Argument \"avort1\" : Buffers passed to this method must all be either direct or indirect"); - if (avort2 != null && _direct != BufferFactory.isDirect(avort2)) - throw new RuntimeException("Argument \"avort2\" : Buffers passed to this method must all be either direct or indirect"); - if (dx != null && _direct != BufferFactory.isDirect(dx)) - throw new RuntimeException("Argument \"dx\" : Buffers passed to this method must all be either direct or indirect"); - if (dy != null && _direct != BufferFactory.isDirect(dy)) - throw new RuntimeException("Argument \"dy\" : Buffers passed to this method must all be either direct or indirect"); - if (coriolis != null && _direct != BufferFactory.isDirect(coriolis)) - throw new RuntimeException("Argument \"coriolis\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - calcpv0(p_up, BufferFactory.getDirectBufferByteOffset(p_up), p_low, BufferFactory.getDirectBufferByteOffset(p_low), o_up, BufferFactory.getDirectBufferByteOffset(o_up), o_low, BufferFactory.getDirectBufferByteOffset(o_low), pvort, BufferFactory.getDirectBufferByteOffset(pvort), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj), u_up, BufferFactory.getDirectBufferByteOffset(u_up), v_up, BufferFactory.getDirectBufferByteOffset(v_up), u_low, BufferFactory.getDirectBufferByteOffset(u_low), v_low, BufferFactory.getDirectBufferByteOffset(v_low), avort1, BufferFactory.getDirectBufferByteOffset(avort1), avort2, BufferFactory.getDirectBufferByteOffset(avort2), dx, BufferFactory.getDirectBufferByteOffset(dx), dy, BufferFactory.getDirectBufferByteOffset(dy), coriolis, BufferFactory.getDirectBufferByteOffset(coriolis)); - } else { - calcpv1(BufferFactory.getArray(p_up), BufferFactory.getIndirectBufferByteOffset(p_up), BufferFactory.getArray(p_low), BufferFactory.getIndirectBufferByteOffset(p_low), BufferFactory.getArray(o_up), BufferFactory.getIndirectBufferByteOffset(o_up), BufferFactory.getArray(o_low), BufferFactory.getIndirectBufferByteOffset(o_low), BufferFactory.getArray(pvort), BufferFactory.getIndirectBufferByteOffset(pvort), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj), BufferFactory.getArray(u_up), BufferFactory.getIndirectBufferByteOffset(u_up), BufferFactory.getArray(v_up), BufferFactory.getIndirectBufferByteOffset(v_up), BufferFactory.getArray(u_low), BufferFactory.getIndirectBufferByteOffset(u_low), BufferFactory.getArray(v_low), BufferFactory.getIndirectBufferByteOffset(v_low), BufferFactory.getArray(avort1), BufferFactory.getIndirectBufferByteOffset(avort1), BufferFactory.getArray(avort2), BufferFactory.getIndirectBufferByteOffset(avort2), BufferFactory.getArray(dx), BufferFactory.getIndirectBufferByteOffset(dx), BufferFactory.getArray(dy), BufferFactory.getIndirectBufferByteOffset(dy), BufferFactory.getArray(coriolis), BufferFactory.getIndirectBufferByteOffset(coriolis)); - } - } - - /** Entry point to C language function:
void calcpv(float * p_up, float * p_low, float * o_up, float * o_low, float * pvort, int * mni, int * ni, int * nj, float * u_up, float * v_up, float * u_low, float * v_low, float * avort1, float * avort2, float * dx, float * dy, float * coriolis); */ - private static native void calcpv0(Object p_up, int p_up_byte_offset, Object p_low, int p_low_byte_offset, Object o_up, int o_up_byte_offset, Object o_low, int o_low_byte_offset, Object pvort, int pvort_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object u_up, int u_up_byte_offset, Object v_up, int v_up_byte_offset, Object u_low, int u_low_byte_offset, Object v_low, int v_low_byte_offset, Object avort1, int avort1_byte_offset, Object avort2, int avort2_byte_offset, Object dx, int dx_byte_offset, Object dy, int dy_byte_offset, Object coriolis, int coriolis_byte_offset); - - /** Entry point to C language function:
void calcpv(float * p_up, float * p_low, float * o_up, float * o_low, float * pvort, int * mni, int * ni, int * nj, float * u_up, float * v_up, float * u_low, float * v_low, float * avort1, float * avort2, float * dx, float * dy, float * coriolis); */ - private static native void calcpv1(Object p_up, int p_up_byte_offset, Object p_low, int p_low_byte_offset, Object o_up, int o_up_byte_offset, Object o_low, int o_low_byte_offset, Object pvort, int pvort_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object u_up, int u_up_byte_offset, Object v_up, int v_up_byte_offset, Object u_low, int u_low_byte_offset, Object v_low, int v_low_byte_offset, Object avort1, int avort1_byte_offset, Object avort2, int avort2_byte_offset, Object dx, int dx_byte_offset, Object dy, int dy_byte_offset, Object coriolis, int coriolis_byte_offset); - - /** Interface to C language function:
void calcpv(float * p_up, float * p_low, float * o_up, float * o_low, float * pvort, int * mni, int * ni, int * nj, float * u_up, float * v_up, float * u_low, float * v_low, float * avort1, float * avort2, float * dx, float * dy, float * coriolis); */ - public static void calcpv(float[] p_up, int p_up_offset, float[] p_low, int p_low_offset, float[] o_up, int o_up_offset, float[] o_low, int o_low_offset, float[] pvort, int pvort_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset, float[] u_up, int u_up_offset, float[] v_up, int v_up_offset, float[] u_low, int u_low_offset, float[] v_low, int v_low_offset, float[] avort1, int avort1_offset, float[] avort2, int avort2_offset, float[] dx, int dx_offset, float[] dy, int dy_offset, float[] coriolis, int coriolis_offset) - { - if(p_up != null && p_up.length <= p_up_offset) - throw new RuntimeException("array offset argument \"p_up_offset\" (" + p_up_offset + ") equals or exceeds array length (" + p_up.length + ")"); - if(p_low != null && p_low.length <= p_low_offset) - throw new RuntimeException("array offset argument \"p_low_offset\" (" + p_low_offset + ") equals or exceeds array length (" + p_low.length + ")"); - if(o_up != null && o_up.length <= o_up_offset) - throw new RuntimeException("array offset argument \"o_up_offset\" (" + o_up_offset + ") equals or exceeds array length (" + o_up.length + ")"); - if(o_low != null && o_low.length <= o_low_offset) - throw new RuntimeException("array offset argument \"o_low_offset\" (" + o_low_offset + ") equals or exceeds array length (" + o_low.length + ")"); - if(pvort != null && pvort.length <= pvort_offset) - throw new RuntimeException("array offset argument \"pvort_offset\" (" + pvort_offset + ") equals or exceeds array length (" + pvort.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - if(u_up != null && u_up.length <= u_up_offset) - throw new RuntimeException("array offset argument \"u_up_offset\" (" + u_up_offset + ") equals or exceeds array length (" + u_up.length + ")"); - if(v_up != null && v_up.length <= v_up_offset) - throw new RuntimeException("array offset argument \"v_up_offset\" (" + v_up_offset + ") equals or exceeds array length (" + v_up.length + ")"); - if(u_low != null && u_low.length <= u_low_offset) - throw new RuntimeException("array offset argument \"u_low_offset\" (" + u_low_offset + ") equals or exceeds array length (" + u_low.length + ")"); - if(v_low != null && v_low.length <= v_low_offset) - throw new RuntimeException("array offset argument \"v_low_offset\" (" + v_low_offset + ") equals or exceeds array length (" + v_low.length + ")"); - if(avort1 != null && avort1.length <= avort1_offset) - throw new RuntimeException("array offset argument \"avort1_offset\" (" + avort1_offset + ") equals or exceeds array length (" + avort1.length + ")"); - if(avort2 != null && avort2.length <= avort2_offset) - throw new RuntimeException("array offset argument \"avort2_offset\" (" + avort2_offset + ") equals or exceeds array length (" + avort2.length + ")"); - if(dx != null && dx.length <= dx_offset) - throw new RuntimeException("array offset argument \"dx_offset\" (" + dx_offset + ") equals or exceeds array length (" + dx.length + ")"); - if(dy != null && dy.length <= dy_offset) - throw new RuntimeException("array offset argument \"dy_offset\" (" + dy_offset + ") equals or exceeds array length (" + dy.length + ")"); - if(coriolis != null && coriolis.length <= coriolis_offset) - throw new RuntimeException("array offset argument \"coriolis_offset\" (" + coriolis_offset + ") equals or exceeds array length (" + coriolis.length + ")"); - calcpv1(p_up, BufferFactory.SIZEOF_FLOAT * p_up_offset, p_low, BufferFactory.SIZEOF_FLOAT * p_low_offset, o_up, BufferFactory.SIZEOF_FLOAT * o_up_offset, o_low, BufferFactory.SIZEOF_FLOAT * o_low_offset, pvort, BufferFactory.SIZEOF_FLOAT * pvort_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset, u_up, BufferFactory.SIZEOF_FLOAT * u_up_offset, v_up, BufferFactory.SIZEOF_FLOAT * v_up_offset, u_low, BufferFactory.SIZEOF_FLOAT * u_low_offset, v_low, BufferFactory.SIZEOF_FLOAT * v_low_offset, avort1, BufferFactory.SIZEOF_FLOAT * avort1_offset, avort2, BufferFactory.SIZEOF_FLOAT * avort2_offset, dx, BufferFactory.SIZEOF_FLOAT * dx_offset, dy, BufferFactory.SIZEOF_FLOAT * dy_offset, coriolis, BufferFactory.SIZEOF_FLOAT * coriolis_offset); - - } - - /** Interface to C language function:
void calcrh(float * t, float * td, int * mni, int * ni, int * nj, float * rh); */ - public static void calcrh(java.nio.FloatBuffer t, java.nio.FloatBuffer td, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj, java.nio.FloatBuffer rh) - { - boolean _direct = BufferFactory.isDirect(t); - if (td != null && _direct != BufferFactory.isDirect(td)) - throw new RuntimeException("Argument \"td\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (rh != null && _direct != BufferFactory.isDirect(rh)) - throw new RuntimeException("Argument \"rh\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - calcrh0(t, BufferFactory.getDirectBufferByteOffset(t), td, BufferFactory.getDirectBufferByteOffset(td), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj), rh, BufferFactory.getDirectBufferByteOffset(rh)); - } else { - calcrh1(BufferFactory.getArray(t), BufferFactory.getIndirectBufferByteOffset(t), BufferFactory.getArray(td), BufferFactory.getIndirectBufferByteOffset(td), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj), BufferFactory.getArray(rh), BufferFactory.getIndirectBufferByteOffset(rh)); - } - } - - /** Entry point to C language function:
void calcrh(float * t, float * td, int * mni, int * ni, int * nj, float * rh); */ - private static native void calcrh0(Object t, int t_byte_offset, Object td, int td_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object rh, int rh_byte_offset); - - /** Entry point to C language function:
void calcrh(float * t, float * td, int * mni, int * ni, int * nj, float * rh); */ - private static native void calcrh1(Object t, int t_byte_offset, Object td, int td_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object rh, int rh_byte_offset); - - /** Interface to C language function:
void calcrh(float * t, float * td, int * mni, int * ni, int * nj, float * rh); */ - public static void calcrh(float[] t, int t_offset, float[] td, int td_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset, float[] rh, int rh_offset) - { - if(t != null && t.length <= t_offset) - throw new RuntimeException("array offset argument \"t_offset\" (" + t_offset + ") equals or exceeds array length (" + t.length + ")"); - if(td != null && td.length <= td_offset) - throw new RuntimeException("array offset argument \"td_offset\" (" + td_offset + ") equals or exceeds array length (" + td.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - if(rh != null && rh.length <= rh_offset) - throw new RuntimeException("array offset argument \"rh_offset\" (" + rh_offset + ") equals or exceeds array length (" + rh.length + ")"); - calcrh1(t, BufferFactory.SIZEOF_FLOAT * t_offset, td, BufferFactory.SIZEOF_FLOAT * td_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset, rh, BufferFactory.SIZEOF_FLOAT * rh_offset); - - } - - /** Interface to C language function:
void calcrh2(float * p, float * t, float * q, int * mni, int * ni, int * nj, float * rh); */ - public static void calcrh2(java.nio.FloatBuffer p, java.nio.FloatBuffer t, java.nio.FloatBuffer q, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj, java.nio.FloatBuffer rh) - { - boolean _direct = BufferFactory.isDirect(p); - if (t != null && _direct != BufferFactory.isDirect(t)) - throw new RuntimeException("Argument \"t\" : Buffers passed to this method must all be either direct or indirect"); - if (q != null && _direct != BufferFactory.isDirect(q)) - throw new RuntimeException("Argument \"q\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (rh != null && _direct != BufferFactory.isDirect(rh)) - throw new RuntimeException("Argument \"rh\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - calcrh20(p, BufferFactory.getDirectBufferByteOffset(p), t, BufferFactory.getDirectBufferByteOffset(t), q, BufferFactory.getDirectBufferByteOffset(q), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj), rh, BufferFactory.getDirectBufferByteOffset(rh)); - } else { - calcrh21(BufferFactory.getArray(p), BufferFactory.getIndirectBufferByteOffset(p), BufferFactory.getArray(t), BufferFactory.getIndirectBufferByteOffset(t), BufferFactory.getArray(q), BufferFactory.getIndirectBufferByteOffset(q), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj), BufferFactory.getArray(rh), BufferFactory.getIndirectBufferByteOffset(rh)); - } - } - - /** Entry point to C language function:
void calcrh2(float * p, float * t, float * q, int * mni, int * ni, int * nj, float * rh); */ - private static native void calcrh20(Object p, int p_byte_offset, Object t, int t_byte_offset, Object q, int q_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object rh, int rh_byte_offset); - - /** Entry point to C language function:
void calcrh2(float * p, float * t, float * q, int * mni, int * ni, int * nj, float * rh); */ - private static native void calcrh21(Object p, int p_byte_offset, Object t, int t_byte_offset, Object q, int q_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object rh, int rh_byte_offset); - - /** Interface to C language function:
void calcrh2(float * p, float * t, float * q, int * mni, int * ni, int * nj, float * rh); */ - public static void calcrh2(float[] p, int p_offset, float[] t, int t_offset, float[] q, int q_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset, float[] rh, int rh_offset) - { - if(p != null && p.length <= p_offset) - throw new RuntimeException("array offset argument \"p_offset\" (" + p_offset + ") equals or exceeds array length (" + p.length + ")"); - if(t != null && t.length <= t_offset) - throw new RuntimeException("array offset argument \"t_offset\" (" + t_offset + ") equals or exceeds array length (" + t.length + ")"); - if(q != null && q.length <= q_offset) - throw new RuntimeException("array offset argument \"q_offset\" (" + q_offset + ") equals or exceeds array length (" + q.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - if(rh != null && rh.length <= rh_offset) - throw new RuntimeException("array offset argument \"rh_offset\" (" + rh_offset + ") equals or exceeds array length (" + rh.length + ")"); - calcrh21(p, BufferFactory.SIZEOF_FLOAT * p_offset, t, BufferFactory.SIZEOF_FLOAT * t_offset, q, BufferFactory.SIZEOF_FLOAT * q_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset, rh, BufferFactory.SIZEOF_FLOAT * rh_offset); - - } - - /** Interface to C language function:
void calctd(float * t, float * rh, int * mni, int * ni, int * nj, float * td); */ - public static void calctd(java.nio.FloatBuffer t, java.nio.FloatBuffer rh, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj, java.nio.FloatBuffer td) - { - boolean _direct = BufferFactory.isDirect(t); - if (rh != null && _direct != BufferFactory.isDirect(rh)) - throw new RuntimeException("Argument \"rh\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (td != null && _direct != BufferFactory.isDirect(td)) - throw new RuntimeException("Argument \"td\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - calctd0(t, BufferFactory.getDirectBufferByteOffset(t), rh, BufferFactory.getDirectBufferByteOffset(rh), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj), td, BufferFactory.getDirectBufferByteOffset(td)); - } else { - calctd1(BufferFactory.getArray(t), BufferFactory.getIndirectBufferByteOffset(t), BufferFactory.getArray(rh), BufferFactory.getIndirectBufferByteOffset(rh), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj), BufferFactory.getArray(td), BufferFactory.getIndirectBufferByteOffset(td)); - } - } - - /** Entry point to C language function:
void calctd(float * t, float * rh, int * mni, int * ni, int * nj, float * td); */ - private static native void calctd0(Object t, int t_byte_offset, Object rh, int rh_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object td, int td_byte_offset); - - /** Entry point to C language function:
void calctd(float * t, float * rh, int * mni, int * ni, int * nj, float * td); */ - private static native void calctd1(Object t, int t_byte_offset, Object rh, int rh_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object td, int td_byte_offset); - - /** Interface to C language function:
void calctd(float * t, float * rh, int * mni, int * ni, int * nj, float * td); */ - public static void calctd(float[] t, int t_offset, float[] rh, int rh_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset, float[] td, int td_offset) - { - if(t != null && t.length <= t_offset) - throw new RuntimeException("array offset argument \"t_offset\" (" + t_offset + ") equals or exceeds array length (" + t.length + ")"); - if(rh != null && rh.length <= rh_offset) - throw new RuntimeException("array offset argument \"rh_offset\" (" + rh_offset + ") equals or exceeds array length (" + rh.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - if(td != null && td.length <= td_offset) - throw new RuntimeException("array offset argument \"td_offset\" (" + td_offset + ") equals or exceeds array length (" + td.length + ")"); - calctd1(t, BufferFactory.SIZEOF_FLOAT * t_offset, rh, BufferFactory.SIZEOF_FLOAT * rh_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset, td, BufferFactory.SIZEOF_FLOAT * td_offset); - - } - - /** Interface to C language function:
void calctd2(float * p, float * t, float * q, int * mni, int * ni, int * nj, float * td); */ - public static void calctd2(java.nio.FloatBuffer p, java.nio.FloatBuffer t, java.nio.FloatBuffer q, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj, java.nio.FloatBuffer td) - { - boolean _direct = BufferFactory.isDirect(p); - if (t != null && _direct != BufferFactory.isDirect(t)) - throw new RuntimeException("Argument \"t\" : Buffers passed to this method must all be either direct or indirect"); - if (q != null && _direct != BufferFactory.isDirect(q)) - throw new RuntimeException("Argument \"q\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (td != null && _direct != BufferFactory.isDirect(td)) - throw new RuntimeException("Argument \"td\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - calctd20(p, BufferFactory.getDirectBufferByteOffset(p), t, BufferFactory.getDirectBufferByteOffset(t), q, BufferFactory.getDirectBufferByteOffset(q), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj), td, BufferFactory.getDirectBufferByteOffset(td)); - } else { - calctd21(BufferFactory.getArray(p), BufferFactory.getIndirectBufferByteOffset(p), BufferFactory.getArray(t), BufferFactory.getIndirectBufferByteOffset(t), BufferFactory.getArray(q), BufferFactory.getIndirectBufferByteOffset(q), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj), BufferFactory.getArray(td), BufferFactory.getIndirectBufferByteOffset(td)); - } - } - - /** Entry point to C language function:
void calctd2(float * p, float * t, float * q, int * mni, int * ni, int * nj, float * td); */ - private static native void calctd20(Object p, int p_byte_offset, Object t, int t_byte_offset, Object q, int q_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object td, int td_byte_offset); - - /** Entry point to C language function:
void calctd2(float * p, float * t, float * q, int * mni, int * ni, int * nj, float * td); */ - private static native void calctd21(Object p, int p_byte_offset, Object t, int t_byte_offset, Object q, int q_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object td, int td_byte_offset); - - /** Interface to C language function:
void calctd2(float * p, float * t, float * q, int * mni, int * ni, int * nj, float * td); */ - public static void calctd2(float[] p, int p_offset, float[] t, int t_offset, float[] q, int q_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset, float[] td, int td_offset) - { - if(p != null && p.length <= p_offset) - throw new RuntimeException("array offset argument \"p_offset\" (" + p_offset + ") equals or exceeds array length (" + p.length + ")"); - if(t != null && t.length <= t_offset) - throw new RuntimeException("array offset argument \"t_offset\" (" + t_offset + ") equals or exceeds array length (" + t.length + ")"); - if(q != null && q.length <= q_offset) - throw new RuntimeException("array offset argument \"q_offset\" (" + q_offset + ") equals or exceeds array length (" + q.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - if(td != null && td.length <= td_offset) - throw new RuntimeException("array offset argument \"td_offset\" (" + td_offset + ") equals or exceeds array length (" + td.length + ")"); - calctd21(p, BufferFactory.SIZEOF_FLOAT * p_offset, t, BufferFactory.SIZEOF_FLOAT * t_offset, q, BufferFactory.SIZEOF_FLOAT * q_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset, td, BufferFactory.SIZEOF_FLOAT * td_offset); - - } - - /** Interface to C language function:
void calcthetae(float * p, float * t, float * rh, int * mni, int * ni, int * nj, float * q); */ - public static void calcthetae(java.nio.FloatBuffer p, java.nio.FloatBuffer t, java.nio.FloatBuffer rh, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj, java.nio.FloatBuffer q) - { - boolean _direct = BufferFactory.isDirect(p); - if (t != null && _direct != BufferFactory.isDirect(t)) - throw new RuntimeException("Argument \"t\" : Buffers passed to this method must all be either direct or indirect"); - if (rh != null && _direct != BufferFactory.isDirect(rh)) - throw new RuntimeException("Argument \"rh\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (q != null && _direct != BufferFactory.isDirect(q)) - throw new RuntimeException("Argument \"q\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - calcthetae0(p, BufferFactory.getDirectBufferByteOffset(p), t, BufferFactory.getDirectBufferByteOffset(t), rh, BufferFactory.getDirectBufferByteOffset(rh), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj), q, BufferFactory.getDirectBufferByteOffset(q)); - } else { - calcthetae1(BufferFactory.getArray(p), BufferFactory.getIndirectBufferByteOffset(p), BufferFactory.getArray(t), BufferFactory.getIndirectBufferByteOffset(t), BufferFactory.getArray(rh), BufferFactory.getIndirectBufferByteOffset(rh), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj), BufferFactory.getArray(q), BufferFactory.getIndirectBufferByteOffset(q)); - } - } - - /** Entry point to C language function:
void calcthetae(float * p, float * t, float * rh, int * mni, int * ni, int * nj, float * q); */ - private static native void calcthetae0(Object p, int p_byte_offset, Object t, int t_byte_offset, Object rh, int rh_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object q, int q_byte_offset); - - /** Entry point to C language function:
void calcthetae(float * p, float * t, float * rh, int * mni, int * ni, int * nj, float * q); */ - private static native void calcthetae1(Object p, int p_byte_offset, Object t, int t_byte_offset, Object rh, int rh_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object q, int q_byte_offset); - - /** Interface to C language function:
void calcthetae(float * p, float * t, float * rh, int * mni, int * ni, int * nj, float * q); */ - public static void calcthetae(float[] p, int p_offset, float[] t, int t_offset, float[] rh, int rh_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset, float[] q, int q_offset) - { - if(p != null && p.length <= p_offset) - throw new RuntimeException("array offset argument \"p_offset\" (" + p_offset + ") equals or exceeds array length (" + p.length + ")"); - if(t != null && t.length <= t_offset) - throw new RuntimeException("array offset argument \"t_offset\" (" + t_offset + ") equals or exceeds array length (" + t.length + ")"); - if(rh != null && rh.length <= rh_offset) - throw new RuntimeException("array offset argument \"rh_offset\" (" + rh_offset + ") equals or exceeds array length (" + rh.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - if(q != null && q.length <= q_offset) - throw new RuntimeException("array offset argument \"q_offset\" (" + q_offset + ") equals or exceeds array length (" + q.length + ")"); - calcthetae1(p, BufferFactory.SIZEOF_FLOAT * p_offset, t, BufferFactory.SIZEOF_FLOAT * t_offset, rh, BufferFactory.SIZEOF_FLOAT * rh_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset, q, BufferFactory.SIZEOF_FLOAT * q_offset); - - } - - /** Interface to C language function:
void calcthetae2(float * p, float * t, float * td, int * mni, int * ni, int * nj, float * q); */ - public static void calcthetae2(java.nio.FloatBuffer p, java.nio.FloatBuffer t, java.nio.FloatBuffer td, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj, java.nio.FloatBuffer q) - { - boolean _direct = BufferFactory.isDirect(p); - if (t != null && _direct != BufferFactory.isDirect(t)) - throw new RuntimeException("Argument \"t\" : Buffers passed to this method must all be either direct or indirect"); - if (td != null && _direct != BufferFactory.isDirect(td)) - throw new RuntimeException("Argument \"td\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (q != null && _direct != BufferFactory.isDirect(q)) - throw new RuntimeException("Argument \"q\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - calcthetae20(p, BufferFactory.getDirectBufferByteOffset(p), t, BufferFactory.getDirectBufferByteOffset(t), td, BufferFactory.getDirectBufferByteOffset(td), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj), q, BufferFactory.getDirectBufferByteOffset(q)); - } else { - calcthetae21(BufferFactory.getArray(p), BufferFactory.getIndirectBufferByteOffset(p), BufferFactory.getArray(t), BufferFactory.getIndirectBufferByteOffset(t), BufferFactory.getArray(td), BufferFactory.getIndirectBufferByteOffset(td), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj), BufferFactory.getArray(q), BufferFactory.getIndirectBufferByteOffset(q)); - } - } - - /** Entry point to C language function:
void calcthetae2(float * p, float * t, float * td, int * mni, int * ni, int * nj, float * q); */ - private static native void calcthetae20(Object p, int p_byte_offset, Object t, int t_byte_offset, Object td, int td_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object q, int q_byte_offset); - - /** Entry point to C language function:
void calcthetae2(float * p, float * t, float * td, int * mni, int * ni, int * nj, float * q); */ - private static native void calcthetae21(Object p, int p_byte_offset, Object t, int t_byte_offset, Object td, int td_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object q, int q_byte_offset); - - /** Interface to C language function:
void calcthetae2(float * p, float * t, float * td, int * mni, int * ni, int * nj, float * q); */ - public static void calcthetae2(float[] p, int p_offset, float[] t, int t_offset, float[] td, int td_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset, float[] q, int q_offset) - { - if(p != null && p.length <= p_offset) - throw new RuntimeException("array offset argument \"p_offset\" (" + p_offset + ") equals or exceeds array length (" + p.length + ")"); - if(t != null && t.length <= t_offset) - throw new RuntimeException("array offset argument \"t_offset\" (" + t_offset + ") equals or exceeds array length (" + t.length + ")"); - if(td != null && td.length <= td_offset) - throw new RuntimeException("array offset argument \"td_offset\" (" + td_offset + ") equals or exceeds array length (" + td.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - if(q != null && q.length <= q_offset) - throw new RuntimeException("array offset argument \"q_offset\" (" + q_offset + ") equals or exceeds array length (" + q.length + ")"); - calcthetae21(p, BufferFactory.SIZEOF_FLOAT * p_offset, t, BufferFactory.SIZEOF_FLOAT * t_offset, td, BufferFactory.SIZEOF_FLOAT * td_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset, q, BufferFactory.SIZEOF_FLOAT * q_offset); - - } - - /** Interface to C language function:
void calctotidx(float * press, float * temp, float * td, int numOfLevel, float * total); */ - public static void calctotidx(java.nio.FloatBuffer press, java.nio.FloatBuffer temp, java.nio.FloatBuffer td, int numOfLevel, java.nio.FloatBuffer total) - { - boolean _direct = BufferFactory.isDirect(press); - if (temp != null && _direct != BufferFactory.isDirect(temp)) - throw new RuntimeException("Argument \"temp\" : Buffers passed to this method must all be either direct or indirect"); - if (td != null && _direct != BufferFactory.isDirect(td)) - throw new RuntimeException("Argument \"td\" : Buffers passed to this method must all be either direct or indirect"); - if (total != null && _direct != BufferFactory.isDirect(total)) - throw new RuntimeException("Argument \"total\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - calctotidx0(press, BufferFactory.getDirectBufferByteOffset(press), temp, BufferFactory.getDirectBufferByteOffset(temp), td, BufferFactory.getDirectBufferByteOffset(td), numOfLevel, total, BufferFactory.getDirectBufferByteOffset(total)); - } else { - calctotidx1(BufferFactory.getArray(press), BufferFactory.getIndirectBufferByteOffset(press), BufferFactory.getArray(temp), BufferFactory.getIndirectBufferByteOffset(temp), BufferFactory.getArray(td), BufferFactory.getIndirectBufferByteOffset(td), numOfLevel, BufferFactory.getArray(total), BufferFactory.getIndirectBufferByteOffset(total)); - } - } - - /** Entry point to C language function:
void calctotidx(float * press, float * temp, float * td, int numOfLevel, float * total); */ - private static native void calctotidx0(Object press, int press_byte_offset, Object temp, int temp_byte_offset, Object td, int td_byte_offset, int numOfLevel, Object total, int total_byte_offset); - - /** Entry point to C language function:
void calctotidx(float * press, float * temp, float * td, int numOfLevel, float * total); */ - private static native void calctotidx1(Object press, int press_byte_offset, Object temp, int temp_byte_offset, Object td, int td_byte_offset, int numOfLevel, Object total, int total_byte_offset); - - /** Interface to C language function:
void calctotidx(float * press, float * temp, float * td, int numOfLevel, float * total); */ - public static void calctotidx(float[] press, int press_offset, float[] temp, int temp_offset, float[] td, int td_offset, int numOfLevel, float[] total, int total_offset) - { - if(press != null && press.length <= press_offset) - throw new RuntimeException("array offset argument \"press_offset\" (" + press_offset + ") equals or exceeds array length (" + press.length + ")"); - if(temp != null && temp.length <= temp_offset) - throw new RuntimeException("array offset argument \"temp_offset\" (" + temp_offset + ") equals or exceeds array length (" + temp.length + ")"); - if(td != null && td.length <= td_offset) - throw new RuntimeException("array offset argument \"td_offset\" (" + td_offset + ") equals or exceeds array length (" + td.length + ")"); - if(total != null && total.length <= total_offset) - throw new RuntimeException("array offset argument \"total_offset\" (" + total_offset + ") equals or exceeds array length (" + total.length + ")"); - calctotidx1(press, BufferFactory.SIZEOF_FLOAT * press_offset, temp, BufferFactory.SIZEOF_FLOAT * temp_offset, td, BufferFactory.SIZEOF_FLOAT * td_offset, numOfLevel, total, BufferFactory.SIZEOF_FLOAT * total_offset); - - } - - /** Interface to C language function:
void calctv(float * p, float * t, float * rh, int * mni, int * ni, int * nj, float * tv); */ - public static void calctv(java.nio.FloatBuffer p, java.nio.FloatBuffer t, java.nio.FloatBuffer rh, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj, java.nio.FloatBuffer tv) - { - boolean _direct = BufferFactory.isDirect(p); - if (t != null && _direct != BufferFactory.isDirect(t)) - throw new RuntimeException("Argument \"t\" : Buffers passed to this method must all be either direct or indirect"); - if (rh != null && _direct != BufferFactory.isDirect(rh)) - throw new RuntimeException("Argument \"rh\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (tv != null && _direct != BufferFactory.isDirect(tv)) - throw new RuntimeException("Argument \"tv\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - calctv0(p, BufferFactory.getDirectBufferByteOffset(p), t, BufferFactory.getDirectBufferByteOffset(t), rh, BufferFactory.getDirectBufferByteOffset(rh), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj), tv, BufferFactory.getDirectBufferByteOffset(tv)); - } else { - calctv1(BufferFactory.getArray(p), BufferFactory.getIndirectBufferByteOffset(p), BufferFactory.getArray(t), BufferFactory.getIndirectBufferByteOffset(t), BufferFactory.getArray(rh), BufferFactory.getIndirectBufferByteOffset(rh), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj), BufferFactory.getArray(tv), BufferFactory.getIndirectBufferByteOffset(tv)); - } - } - - /** Entry point to C language function:
void calctv(float * p, float * t, float * rh, int * mni, int * ni, int * nj, float * tv); */ - private static native void calctv0(Object p, int p_byte_offset, Object t, int t_byte_offset, Object rh, int rh_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object tv, int tv_byte_offset); - - /** Entry point to C language function:
void calctv(float * p, float * t, float * rh, int * mni, int * ni, int * nj, float * tv); */ - private static native void calctv1(Object p, int p_byte_offset, Object t, int t_byte_offset, Object rh, int rh_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object tv, int tv_byte_offset); - - /** Interface to C language function:
void calctv(float * p, float * t, float * rh, int * mni, int * ni, int * nj, float * tv); */ - public static void calctv(float[] p, int p_offset, float[] t, int t_offset, float[] rh, int rh_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset, float[] tv, int tv_offset) - { - if(p != null && p.length <= p_offset) - throw new RuntimeException("array offset argument \"p_offset\" (" + p_offset + ") equals or exceeds array length (" + p.length + ")"); - if(t != null && t.length <= t_offset) - throw new RuntimeException("array offset argument \"t_offset\" (" + t_offset + ") equals or exceeds array length (" + t.length + ")"); - if(rh != null && rh.length <= rh_offset) - throw new RuntimeException("array offset argument \"rh_offset\" (" + rh_offset + ") equals or exceeds array length (" + rh.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - if(tv != null && tv.length <= tv_offset) - throw new RuntimeException("array offset argument \"tv_offset\" (" + tv_offset + ") equals or exceeds array length (" + tv.length + ")"); - calctv1(p, BufferFactory.SIZEOF_FLOAT * p_offset, t, BufferFactory.SIZEOF_FLOAT * t_offset, rh, BufferFactory.SIZEOF_FLOAT * rh_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset, tv, BufferFactory.SIZEOF_FLOAT * tv_offset); - - } - - /** Interface to C language function:
void calctv2(float * t, float * q, int * mni, int * ni, int * nj, float * tv); */ - public static void calctv2(java.nio.FloatBuffer t, java.nio.FloatBuffer q, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj, java.nio.FloatBuffer tv) - { - boolean _direct = BufferFactory.isDirect(t); - if (q != null && _direct != BufferFactory.isDirect(q)) - throw new RuntimeException("Argument \"q\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (tv != null && _direct != BufferFactory.isDirect(tv)) - throw new RuntimeException("Argument \"tv\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - calctv20(t, BufferFactory.getDirectBufferByteOffset(t), q, BufferFactory.getDirectBufferByteOffset(q), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj), tv, BufferFactory.getDirectBufferByteOffset(tv)); - } else { - calctv21(BufferFactory.getArray(t), BufferFactory.getIndirectBufferByteOffset(t), BufferFactory.getArray(q), BufferFactory.getIndirectBufferByteOffset(q), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj), BufferFactory.getArray(tv), BufferFactory.getIndirectBufferByteOffset(tv)); - } - } - - /** Entry point to C language function:
void calctv2(float * t, float * q, int * mni, int * ni, int * nj, float * tv); */ - private static native void calctv20(Object t, int t_byte_offset, Object q, int q_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object tv, int tv_byte_offset); - - /** Entry point to C language function:
void calctv2(float * t, float * q, int * mni, int * ni, int * nj, float * tv); */ - private static native void calctv21(Object t, int t_byte_offset, Object q, int q_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object tv, int tv_byte_offset); - - /** Interface to C language function:
void calctv2(float * t, float * q, int * mni, int * ni, int * nj, float * tv); */ - public static void calctv2(float[] t, int t_offset, float[] q, int q_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset, float[] tv, int tv_offset) - { - if(t != null && t.length <= t_offset) - throw new RuntimeException("array offset argument \"t_offset\" (" + t_offset + ") equals or exceeds array length (" + t.length + ")"); - if(q != null && q.length <= q_offset) - throw new RuntimeException("array offset argument \"q_offset\" (" + q_offset + ") equals or exceeds array length (" + q.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - if(tv != null && tv.length <= tv_offset) - throw new RuntimeException("array offset argument \"tv_offset\" (" + tv_offset + ") equals or exceeds array length (" + tv.length + ")"); - calctv21(t, BufferFactory.SIZEOF_FLOAT * t_offset, q, BufferFactory.SIZEOF_FLOAT * q_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset, tv, BufferFactory.SIZEOF_FLOAT * tv_offset); - - } - - /** Interface to C language function:
void calctw(float * p, float * t, float * rh, int * mni, int * ni, int * nj, float * tw); */ - public static void calctw(java.nio.FloatBuffer p, java.nio.FloatBuffer t, java.nio.FloatBuffer rh, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj, java.nio.FloatBuffer tw) - { - boolean _direct = BufferFactory.isDirect(p); - if (t != null && _direct != BufferFactory.isDirect(t)) - throw new RuntimeException("Argument \"t\" : Buffers passed to this method must all be either direct or indirect"); - if (rh != null && _direct != BufferFactory.isDirect(rh)) - throw new RuntimeException("Argument \"rh\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (tw != null && _direct != BufferFactory.isDirect(tw)) - throw new RuntimeException("Argument \"tw\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - calctw0(p, BufferFactory.getDirectBufferByteOffset(p), t, BufferFactory.getDirectBufferByteOffset(t), rh, BufferFactory.getDirectBufferByteOffset(rh), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj), tw, BufferFactory.getDirectBufferByteOffset(tw)); - } else { - calctw1(BufferFactory.getArray(p), BufferFactory.getIndirectBufferByteOffset(p), BufferFactory.getArray(t), BufferFactory.getIndirectBufferByteOffset(t), BufferFactory.getArray(rh), BufferFactory.getIndirectBufferByteOffset(rh), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj), BufferFactory.getArray(tw), BufferFactory.getIndirectBufferByteOffset(tw)); - } - } - - /** Entry point to C language function:
void calctw(float * p, float * t, float * rh, int * mni, int * ni, int * nj, float * tw); */ - private static native void calctw0(Object p, int p_byte_offset, Object t, int t_byte_offset, Object rh, int rh_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object tw, int tw_byte_offset); - - /** Entry point to C language function:
void calctw(float * p, float * t, float * rh, int * mni, int * ni, int * nj, float * tw); */ - private static native void calctw1(Object p, int p_byte_offset, Object t, int t_byte_offset, Object rh, int rh_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object tw, int tw_byte_offset); - - /** Interface to C language function:
void calctw(float * p, float * t, float * rh, int * mni, int * ni, int * nj, float * tw); */ - public static void calctw(float[] p, int p_offset, float[] t, int t_offset, float[] rh, int rh_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset, float[] tw, int tw_offset) - { - if(p != null && p.length <= p_offset) - throw new RuntimeException("array offset argument \"p_offset\" (" + p_offset + ") equals or exceeds array length (" + p.length + ")"); - if(t != null && t.length <= t_offset) - throw new RuntimeException("array offset argument \"t_offset\" (" + t_offset + ") equals or exceeds array length (" + t.length + ")"); - if(rh != null && rh.length <= rh_offset) - throw new RuntimeException("array offset argument \"rh_offset\" (" + rh_offset + ") equals or exceeds array length (" + rh.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - if(tw != null && tw.length <= tw_offset) - throw new RuntimeException("array offset argument \"tw_offset\" (" + tw_offset + ") equals or exceeds array length (" + tw.length + ")"); - calctw1(p, BufferFactory.SIZEOF_FLOAT * p_offset, t, BufferFactory.SIZEOF_FLOAT * t_offset, rh, BufferFactory.SIZEOF_FLOAT * rh_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset, tw, BufferFactory.SIZEOF_FLOAT * tw_offset); - - } - - /** Interface to C language function:
int capeFunc(float usetv, const float * * p_dat, const float * * tve_dat, float * p0, float * th0, float * sh0, int mnx, int nx, int ny, int nz, float * cape_dat, float * cin_dat); */ - public static int capeFunc(float usetv, java.nio.FloatBuffer[] p_dat, java.nio.FloatBuffer[] tve_dat, java.nio.FloatBuffer p0, java.nio.FloatBuffer th0, java.nio.FloatBuffer sh0, int mnx, int nx, int ny, int nz, java.nio.FloatBuffer cape_dat, java.nio.FloatBuffer cin_dat) - { - int[] p_dat_byte_offset_array = new int[p_dat.length]; - if (p_dat != null) { - for (int _ctr = 0; _ctr < p_dat.length; _ctr++) { - if (!BufferFactory.isDirect(p_dat[_ctr])) { - throw new RuntimeException("Element " + _ctr + " of argument \"p_dat\" was not a direct buffer"); - } - p_dat_byte_offset_array[_ctr] = BufferFactory.getDirectBufferByteOffset(p_dat[_ctr]); - } - } - int[] tve_dat_byte_offset_array = new int[tve_dat.length]; - if (tve_dat != null) { - for (int _ctr = 0; _ctr < tve_dat.length; _ctr++) { - if (!BufferFactory.isDirect(tve_dat[_ctr])) { - throw new RuntimeException("Element " + _ctr + " of argument \"tve_dat\" was not a direct buffer"); - } - tve_dat_byte_offset_array[_ctr] = BufferFactory.getDirectBufferByteOffset(tve_dat[_ctr]); - } - } - boolean _direct = BufferFactory.isDirect(p0); - if (th0 != null && _direct != BufferFactory.isDirect(th0)) - throw new RuntimeException("Argument \"th0\" : Buffers passed to this method must all be either direct or indirect"); - if (sh0 != null && _direct != BufferFactory.isDirect(sh0)) - throw new RuntimeException("Argument \"sh0\" : Buffers passed to this method must all be either direct or indirect"); - if (cape_dat != null && _direct != BufferFactory.isDirect(cape_dat)) - throw new RuntimeException("Argument \"cape_dat\" : Buffers passed to this method must all be either direct or indirect"); - if (cin_dat != null && _direct != BufferFactory.isDirect(cin_dat)) - throw new RuntimeException("Argument \"cin_dat\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - return capeFunc0(usetv, p_dat, p_dat_byte_offset_array, tve_dat, tve_dat_byte_offset_array, p0, BufferFactory.getDirectBufferByteOffset(p0), th0, BufferFactory.getDirectBufferByteOffset(th0), sh0, BufferFactory.getDirectBufferByteOffset(sh0), mnx, nx, ny, nz, cape_dat, BufferFactory.getDirectBufferByteOffset(cape_dat), cin_dat, BufferFactory.getDirectBufferByteOffset(cin_dat)); - } else { - return capeFunc1(usetv, p_dat, p_dat_byte_offset_array, tve_dat, tve_dat_byte_offset_array, BufferFactory.getArray(p0), BufferFactory.getIndirectBufferByteOffset(p0), BufferFactory.getArray(th0), BufferFactory.getIndirectBufferByteOffset(th0), BufferFactory.getArray(sh0), BufferFactory.getIndirectBufferByteOffset(sh0), mnx, nx, ny, nz, BufferFactory.getArray(cape_dat), BufferFactory.getIndirectBufferByteOffset(cape_dat), BufferFactory.getArray(cin_dat), BufferFactory.getIndirectBufferByteOffset(cin_dat)); - } - } - - /** Entry point to C language function:
int capeFunc(float usetv, const float * * p_dat, const float * * tve_dat, float * p0, float * th0, float * sh0, int mnx, int nx, int ny, int nz, float * cape_dat, float * cin_dat); */ - private static native int capeFunc0(float usetv, Object[] p_dat, int[] p_dat_byte_offset_array, Object[] tve_dat, int[] tve_dat_byte_offset_array, Object p0, int p0_byte_offset, Object th0, int th0_byte_offset, Object sh0, int sh0_byte_offset, int mnx, int nx, int ny, int nz, Object cape_dat, int cape_dat_byte_offset, Object cin_dat, int cin_dat_byte_offset); - - /** Entry point to C language function:
int capeFunc(float usetv, const float * * p_dat, const float * * tve_dat, float * p0, float * th0, float * sh0, int mnx, int nx, int ny, int nz, float * cape_dat, float * cin_dat); */ - private static native int capeFunc1(float usetv, Object[] p_dat, int[] p_dat_byte_offset_array, Object[] tve_dat, int[] tve_dat_byte_offset_array, Object p0, int p0_byte_offset, Object th0, int th0_byte_offset, Object sh0, int sh0_byte_offset, int mnx, int nx, int ny, int nz, Object cape_dat, int cape_dat_byte_offset, Object cin_dat, int cin_dat_byte_offset); - - /** Interface to C language function:
int capeFunc(float usetv, const float * * p_dat, const float * * tve_dat, float * p0, float * th0, float * sh0, int mnx, int nx, int ny, int nz, float * cape_dat, float * cin_dat); */ - public static int capeFunc(float usetv, java.nio.FloatBuffer[] p_dat, java.nio.FloatBuffer[] tve_dat, float[] p0, int p0_offset, float[] th0, int th0_offset, float[] sh0, int sh0_offset, int mnx, int nx, int ny, int nz, float[] cape_dat, int cape_dat_offset, float[] cin_dat, int cin_dat_offset) - { - int[] p_dat_byte_offset_array = new int[p_dat.length]; - if (p_dat != null) { - for (int _ctr = 0; _ctr < p_dat.length; _ctr++) { - if (!BufferFactory.isDirect(p_dat[_ctr])) { - throw new RuntimeException("Element " + _ctr + " of argument \"p_dat\" was not a direct buffer"); - } - p_dat_byte_offset_array[_ctr] = BufferFactory.getDirectBufferByteOffset(p_dat[_ctr]); - } - } - int[] tve_dat_byte_offset_array = new int[tve_dat.length]; - if (tve_dat != null) { - for (int _ctr = 0; _ctr < tve_dat.length; _ctr++) { - if (!BufferFactory.isDirect(tve_dat[_ctr])) { - throw new RuntimeException("Element " + _ctr + " of argument \"tve_dat\" was not a direct buffer"); - } - tve_dat_byte_offset_array[_ctr] = BufferFactory.getDirectBufferByteOffset(tve_dat[_ctr]); - } - } - if(p0 != null && p0.length <= p0_offset) - throw new RuntimeException("array offset argument \"p0_offset\" (" + p0_offset + ") equals or exceeds array length (" + p0.length + ")"); - if(th0 != null && th0.length <= th0_offset) - throw new RuntimeException("array offset argument \"th0_offset\" (" + th0_offset + ") equals or exceeds array length (" + th0.length + ")"); - if(sh0 != null && sh0.length <= sh0_offset) - throw new RuntimeException("array offset argument \"sh0_offset\" (" + sh0_offset + ") equals or exceeds array length (" + sh0.length + ")"); - if(cape_dat != null && cape_dat.length <= cape_dat_offset) - throw new RuntimeException("array offset argument \"cape_dat_offset\" (" + cape_dat_offset + ") equals or exceeds array length (" + cape_dat.length + ")"); - if(cin_dat != null && cin_dat.length <= cin_dat_offset) - throw new RuntimeException("array offset argument \"cin_dat_offset\" (" + cin_dat_offset + ") equals or exceeds array length (" + cin_dat.length + ")"); - return capeFunc1(usetv, p_dat, p_dat_byte_offset_array, tve_dat, tve_dat_byte_offset_array, p0, BufferFactory.SIZEOF_FLOAT * p0_offset, th0, BufferFactory.SIZEOF_FLOAT * th0_offset, sh0, BufferFactory.SIZEOF_FLOAT * sh0_offset, mnx, nx, ny, nz, cape_dat, BufferFactory.SIZEOF_FLOAT * cape_dat_offset, cin_dat, BufferFactory.SIZEOF_FLOAT * cin_dat_offset); - - } - - /** Interface to C language function:
void cclpar(float * MIX, float * P, float * HT, float * T, int * NLVLS, float * PCCL, float * TCCL, float * HCCL); */ - public static void cclpar(java.nio.FloatBuffer MIX, java.nio.FloatBuffer P, java.nio.FloatBuffer HT, java.nio.FloatBuffer T, java.nio.IntBuffer NLVLS, java.nio.FloatBuffer PCCL, java.nio.FloatBuffer TCCL, java.nio.FloatBuffer HCCL) - { - boolean _direct = BufferFactory.isDirect(MIX); - if (P != null && _direct != BufferFactory.isDirect(P)) - throw new RuntimeException("Argument \"P\" : Buffers passed to this method must all be either direct or indirect"); - if (HT != null && _direct != BufferFactory.isDirect(HT)) - throw new RuntimeException("Argument \"HT\" : Buffers passed to this method must all be either direct or indirect"); - if (T != null && _direct != BufferFactory.isDirect(T)) - throw new RuntimeException("Argument \"T\" : Buffers passed to this method must all be either direct or indirect"); - if (NLVLS != null && _direct != BufferFactory.isDirect(NLVLS)) - throw new RuntimeException("Argument \"NLVLS\" : Buffers passed to this method must all be either direct or indirect"); - if (PCCL != null && _direct != BufferFactory.isDirect(PCCL)) - throw new RuntimeException("Argument \"PCCL\" : Buffers passed to this method must all be either direct or indirect"); - if (TCCL != null && _direct != BufferFactory.isDirect(TCCL)) - throw new RuntimeException("Argument \"TCCL\" : Buffers passed to this method must all be either direct or indirect"); - if (HCCL != null && _direct != BufferFactory.isDirect(HCCL)) - throw new RuntimeException("Argument \"HCCL\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - cclpar0(MIX, BufferFactory.getDirectBufferByteOffset(MIX), P, BufferFactory.getDirectBufferByteOffset(P), HT, BufferFactory.getDirectBufferByteOffset(HT), T, BufferFactory.getDirectBufferByteOffset(T), NLVLS, BufferFactory.getDirectBufferByteOffset(NLVLS), PCCL, BufferFactory.getDirectBufferByteOffset(PCCL), TCCL, BufferFactory.getDirectBufferByteOffset(TCCL), HCCL, BufferFactory.getDirectBufferByteOffset(HCCL)); - } else { - cclpar1(BufferFactory.getArray(MIX), BufferFactory.getIndirectBufferByteOffset(MIX), BufferFactory.getArray(P), BufferFactory.getIndirectBufferByteOffset(P), BufferFactory.getArray(HT), BufferFactory.getIndirectBufferByteOffset(HT), BufferFactory.getArray(T), BufferFactory.getIndirectBufferByteOffset(T), BufferFactory.getArray(NLVLS), BufferFactory.getIndirectBufferByteOffset(NLVLS), BufferFactory.getArray(PCCL), BufferFactory.getIndirectBufferByteOffset(PCCL), BufferFactory.getArray(TCCL), BufferFactory.getIndirectBufferByteOffset(TCCL), BufferFactory.getArray(HCCL), BufferFactory.getIndirectBufferByteOffset(HCCL)); - } - } - - /** Entry point to C language function:
void cclpar(float * MIX, float * P, float * HT, float * T, int * NLVLS, float * PCCL, float * TCCL, float * HCCL); */ - private static native void cclpar0(Object MIX, int MIX_byte_offset, Object P, int P_byte_offset, Object HT, int HT_byte_offset, Object T, int T_byte_offset, Object NLVLS, int NLVLS_byte_offset, Object PCCL, int PCCL_byte_offset, Object TCCL, int TCCL_byte_offset, Object HCCL, int HCCL_byte_offset); - - /** Entry point to C language function:
void cclpar(float * MIX, float * P, float * HT, float * T, int * NLVLS, float * PCCL, float * TCCL, float * HCCL); */ - private static native void cclpar1(Object MIX, int MIX_byte_offset, Object P, int P_byte_offset, Object HT, int HT_byte_offset, Object T, int T_byte_offset, Object NLVLS, int NLVLS_byte_offset, Object PCCL, int PCCL_byte_offset, Object TCCL, int TCCL_byte_offset, Object HCCL, int HCCL_byte_offset); - - /** Interface to C language function:
void cclpar(float * MIX, float * P, float * HT, float * T, int * NLVLS, float * PCCL, float * TCCL, float * HCCL); */ - public static void cclpar(float[] MIX, int MIX_offset, float[] P, int P_offset, float[] HT, int HT_offset, float[] T, int T_offset, int[] NLVLS, int NLVLS_offset, float[] PCCL, int PCCL_offset, float[] TCCL, int TCCL_offset, float[] HCCL, int HCCL_offset) - { - if(MIX != null && MIX.length <= MIX_offset) - throw new RuntimeException("array offset argument \"MIX_offset\" (" + MIX_offset + ") equals or exceeds array length (" + MIX.length + ")"); - if(P != null && P.length <= P_offset) - throw new RuntimeException("array offset argument \"P_offset\" (" + P_offset + ") equals or exceeds array length (" + P.length + ")"); - if(HT != null && HT.length <= HT_offset) - throw new RuntimeException("array offset argument \"HT_offset\" (" + HT_offset + ") equals or exceeds array length (" + HT.length + ")"); - if(T != null && T.length <= T_offset) - throw new RuntimeException("array offset argument \"T_offset\" (" + T_offset + ") equals or exceeds array length (" + T.length + ")"); - if(NLVLS != null && NLVLS.length <= NLVLS_offset) - throw new RuntimeException("array offset argument \"NLVLS_offset\" (" + NLVLS_offset + ") equals or exceeds array length (" + NLVLS.length + ")"); - if(PCCL != null && PCCL.length <= PCCL_offset) - throw new RuntimeException("array offset argument \"PCCL_offset\" (" + PCCL_offset + ") equals or exceeds array length (" + PCCL.length + ")"); - if(TCCL != null && TCCL.length <= TCCL_offset) - throw new RuntimeException("array offset argument \"TCCL_offset\" (" + TCCL_offset + ") equals or exceeds array length (" + TCCL.length + ")"); - if(HCCL != null && HCCL.length <= HCCL_offset) - throw new RuntimeException("array offset argument \"HCCL_offset\" (" + HCCL_offset + ") equals or exceeds array length (" + HCCL.length + ")"); - cclpar1(MIX, BufferFactory.SIZEOF_FLOAT * MIX_offset, P, BufferFactory.SIZEOF_FLOAT * P_offset, HT, BufferFactory.SIZEOF_FLOAT * HT_offset, T, BufferFactory.SIZEOF_FLOAT * T_offset, NLVLS, BufferFactory.SIZEOF_INT * NLVLS_offset, PCCL, BufferFactory.SIZEOF_FLOAT * PCCL_offset, TCCL, BufferFactory.SIZEOF_FLOAT * TCCL_offset, HCCL, BufferFactory.SIZEOF_FLOAT * HCCL_offset); - - } - - /** Interface to C language function:
int cgp(float * tempip, float * dwptip, float * presip, float * thetawip, float * sfcpres, float * toppres, int * iw, float * deltap); */ - public static int cgp(java.nio.FloatBuffer tempip, java.nio.FloatBuffer dwptip, java.nio.FloatBuffer presip, java.nio.FloatBuffer thetawip, java.nio.FloatBuffer sfcpres, java.nio.FloatBuffer toppres, java.nio.IntBuffer iw, java.nio.FloatBuffer deltap) - { - boolean _direct = BufferFactory.isDirect(tempip); - if (dwptip != null && _direct != BufferFactory.isDirect(dwptip)) - throw new RuntimeException("Argument \"dwptip\" : Buffers passed to this method must all be either direct or indirect"); - if (presip != null && _direct != BufferFactory.isDirect(presip)) - throw new RuntimeException("Argument \"presip\" : Buffers passed to this method must all be either direct or indirect"); - if (thetawip != null && _direct != BufferFactory.isDirect(thetawip)) - throw new RuntimeException("Argument \"thetawip\" : Buffers passed to this method must all be either direct or indirect"); - if (sfcpres != null && _direct != BufferFactory.isDirect(sfcpres)) - throw new RuntimeException("Argument \"sfcpres\" : Buffers passed to this method must all be either direct or indirect"); - if (toppres != null && _direct != BufferFactory.isDirect(toppres)) - throw new RuntimeException("Argument \"toppres\" : Buffers passed to this method must all be either direct or indirect"); - if (iw != null && _direct != BufferFactory.isDirect(iw)) - throw new RuntimeException("Argument \"iw\" : Buffers passed to this method must all be either direct or indirect"); - if (deltap != null && _direct != BufferFactory.isDirect(deltap)) - throw new RuntimeException("Argument \"deltap\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - return cgp0(tempip, BufferFactory.getDirectBufferByteOffset(tempip), dwptip, BufferFactory.getDirectBufferByteOffset(dwptip), presip, BufferFactory.getDirectBufferByteOffset(presip), thetawip, BufferFactory.getDirectBufferByteOffset(thetawip), sfcpres, BufferFactory.getDirectBufferByteOffset(sfcpres), toppres, BufferFactory.getDirectBufferByteOffset(toppres), iw, BufferFactory.getDirectBufferByteOffset(iw), deltap, BufferFactory.getDirectBufferByteOffset(deltap)); - } else { - return cgp1(BufferFactory.getArray(tempip), BufferFactory.getIndirectBufferByteOffset(tempip), BufferFactory.getArray(dwptip), BufferFactory.getIndirectBufferByteOffset(dwptip), BufferFactory.getArray(presip), BufferFactory.getIndirectBufferByteOffset(presip), BufferFactory.getArray(thetawip), BufferFactory.getIndirectBufferByteOffset(thetawip), BufferFactory.getArray(sfcpres), BufferFactory.getIndirectBufferByteOffset(sfcpres), BufferFactory.getArray(toppres), BufferFactory.getIndirectBufferByteOffset(toppres), BufferFactory.getArray(iw), BufferFactory.getIndirectBufferByteOffset(iw), BufferFactory.getArray(deltap), BufferFactory.getIndirectBufferByteOffset(deltap)); - } - } - - /** Entry point to C language function:
int cgp(float * tempip, float * dwptip, float * presip, float * thetawip, float * sfcpres, float * toppres, int * iw, float * deltap); */ - private static native int cgp0(Object tempip, int tempip_byte_offset, Object dwptip, int dwptip_byte_offset, Object presip, int presip_byte_offset, Object thetawip, int thetawip_byte_offset, Object sfcpres, int sfcpres_byte_offset, Object toppres, int toppres_byte_offset, Object iw, int iw_byte_offset, Object deltap, int deltap_byte_offset); - - /** Entry point to C language function:
int cgp(float * tempip, float * dwptip, float * presip, float * thetawip, float * sfcpres, float * toppres, int * iw, float * deltap); */ - private static native int cgp1(Object tempip, int tempip_byte_offset, Object dwptip, int dwptip_byte_offset, Object presip, int presip_byte_offset, Object thetawip, int thetawip_byte_offset, Object sfcpres, int sfcpres_byte_offset, Object toppres, int toppres_byte_offset, Object iw, int iw_byte_offset, Object deltap, int deltap_byte_offset); - - /** Interface to C language function:
int cgp(float * tempip, float * dwptip, float * presip, float * thetawip, float * sfcpres, float * toppres, int * iw, float * deltap); */ - public static int cgp(float[] tempip, int tempip_offset, float[] dwptip, int dwptip_offset, float[] presip, int presip_offset, float[] thetawip, int thetawip_offset, float[] sfcpres, int sfcpres_offset, float[] toppres, int toppres_offset, int[] iw, int iw_offset, float[] deltap, int deltap_offset) - { - if(tempip != null && tempip.length <= tempip_offset) - throw new RuntimeException("array offset argument \"tempip_offset\" (" + tempip_offset + ") equals or exceeds array length (" + tempip.length + ")"); - if(dwptip != null && dwptip.length <= dwptip_offset) - throw new RuntimeException("array offset argument \"dwptip_offset\" (" + dwptip_offset + ") equals or exceeds array length (" + dwptip.length + ")"); - if(presip != null && presip.length <= presip_offset) - throw new RuntimeException("array offset argument \"presip_offset\" (" + presip_offset + ") equals or exceeds array length (" + presip.length + ")"); - if(thetawip != null && thetawip.length <= thetawip_offset) - throw new RuntimeException("array offset argument \"thetawip_offset\" (" + thetawip_offset + ") equals or exceeds array length (" + thetawip.length + ")"); - if(sfcpres != null && sfcpres.length <= sfcpres_offset) - throw new RuntimeException("array offset argument \"sfcpres_offset\" (" + sfcpres_offset + ") equals or exceeds array length (" + sfcpres.length + ")"); - if(toppres != null && toppres.length <= toppres_offset) - throw new RuntimeException("array offset argument \"toppres_offset\" (" + toppres_offset + ") equals or exceeds array length (" + toppres.length + ")"); - if(iw != null && iw.length <= iw_offset) - throw new RuntimeException("array offset argument \"iw_offset\" (" + iw_offset + ") equals or exceeds array length (" + iw.length + ")"); - if(deltap != null && deltap.length <= deltap_offset) - throw new RuntimeException("array offset argument \"deltap_offset\" (" + deltap_offset + ") equals or exceeds array length (" + deltap.length + ")"); - return cgp1(tempip, BufferFactory.SIZEOF_FLOAT * tempip_offset, dwptip, BufferFactory.SIZEOF_FLOAT * dwptip_offset, presip, BufferFactory.SIZEOF_FLOAT * presip_offset, thetawip, BufferFactory.SIZEOF_FLOAT * thetawip_offset, sfcpres, BufferFactory.SIZEOF_FLOAT * sfcpres_offset, toppres, BufferFactory.SIZEOF_FLOAT * toppres_offset, iw, BufferFactory.SIZEOF_INT * iw_offset, deltap, BufferFactory.SIZEOF_FLOAT * deltap_offset); - - } - - /** Interface to C language function:
void comp_by(float * u, float * v, float * uu, float * vv, int * mni, int * ni, int * nj, float * control, float * comp, float * comp2); */ - public static void comp_by(java.nio.FloatBuffer u, java.nio.FloatBuffer v, java.nio.FloatBuffer uu, java.nio.FloatBuffer vv, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj, java.nio.FloatBuffer control, java.nio.FloatBuffer comp, java.nio.FloatBuffer comp2) - { - boolean _direct = BufferFactory.isDirect(u); - if (v != null && _direct != BufferFactory.isDirect(v)) - throw new RuntimeException("Argument \"v\" : Buffers passed to this method must all be either direct or indirect"); - if (uu != null && _direct != BufferFactory.isDirect(uu)) - throw new RuntimeException("Argument \"uu\" : Buffers passed to this method must all be either direct or indirect"); - if (vv != null && _direct != BufferFactory.isDirect(vv)) - throw new RuntimeException("Argument \"vv\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (control != null && _direct != BufferFactory.isDirect(control)) - throw new RuntimeException("Argument \"control\" : Buffers passed to this method must all be either direct or indirect"); - if (comp != null && _direct != BufferFactory.isDirect(comp)) - throw new RuntimeException("Argument \"comp\" : Buffers passed to this method must all be either direct or indirect"); - if (comp2 != null && _direct != BufferFactory.isDirect(comp2)) - throw new RuntimeException("Argument \"comp2\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - comp_by0(u, BufferFactory.getDirectBufferByteOffset(u), v, BufferFactory.getDirectBufferByteOffset(v), uu, BufferFactory.getDirectBufferByteOffset(uu), vv, BufferFactory.getDirectBufferByteOffset(vv), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj), control, BufferFactory.getDirectBufferByteOffset(control), comp, BufferFactory.getDirectBufferByteOffset(comp), comp2, BufferFactory.getDirectBufferByteOffset(comp2)); - } else { - comp_by1(BufferFactory.getArray(u), BufferFactory.getIndirectBufferByteOffset(u), BufferFactory.getArray(v), BufferFactory.getIndirectBufferByteOffset(v), BufferFactory.getArray(uu), BufferFactory.getIndirectBufferByteOffset(uu), BufferFactory.getArray(vv), BufferFactory.getIndirectBufferByteOffset(vv), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj), BufferFactory.getArray(control), BufferFactory.getIndirectBufferByteOffset(control), BufferFactory.getArray(comp), BufferFactory.getIndirectBufferByteOffset(comp), BufferFactory.getArray(comp2), BufferFactory.getIndirectBufferByteOffset(comp2)); - } - } - - /** Entry point to C language function:
void comp_by(float * u, float * v, float * uu, float * vv, int * mni, int * ni, int * nj, float * control, float * comp, float * comp2); */ - private static native void comp_by0(Object u, int u_byte_offset, Object v, int v_byte_offset, Object uu, int uu_byte_offset, Object vv, int vv_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object control, int control_byte_offset, Object comp, int comp_byte_offset, Object comp2, int comp2_byte_offset); - - /** Entry point to C language function:
void comp_by(float * u, float * v, float * uu, float * vv, int * mni, int * ni, int * nj, float * control, float * comp, float * comp2); */ - private static native void comp_by1(Object u, int u_byte_offset, Object v, int v_byte_offset, Object uu, int uu_byte_offset, Object vv, int vv_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object control, int control_byte_offset, Object comp, int comp_byte_offset, Object comp2, int comp2_byte_offset); - - /** Interface to C language function:
void comp_by(float * u, float * v, float * uu, float * vv, int * mni, int * ni, int * nj, float * control, float * comp, float * comp2); */ - public static void comp_by(float[] u, int u_offset, float[] v, int v_offset, float[] uu, int uu_offset, float[] vv, int vv_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset, float[] control, int control_offset, float[] comp, int comp_offset, float[] comp2, int comp2_offset) - { - if(u != null && u.length <= u_offset) - throw new RuntimeException("array offset argument \"u_offset\" (" + u_offset + ") equals or exceeds array length (" + u.length + ")"); - if(v != null && v.length <= v_offset) - throw new RuntimeException("array offset argument \"v_offset\" (" + v_offset + ") equals or exceeds array length (" + v.length + ")"); - if(uu != null && uu.length <= uu_offset) - throw new RuntimeException("array offset argument \"uu_offset\" (" + uu_offset + ") equals or exceeds array length (" + uu.length + ")"); - if(vv != null && vv.length <= vv_offset) - throw new RuntimeException("array offset argument \"vv_offset\" (" + vv_offset + ") equals or exceeds array length (" + vv.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - if(control != null && control.length <= control_offset) - throw new RuntimeException("array offset argument \"control_offset\" (" + control_offset + ") equals or exceeds array length (" + control.length + ")"); - if(comp != null && comp.length <= comp_offset) - throw new RuntimeException("array offset argument \"comp_offset\" (" + comp_offset + ") equals or exceeds array length (" + comp.length + ")"); - if(comp2 != null && comp2.length <= comp2_offset) - throw new RuntimeException("array offset argument \"comp2_offset\" (" + comp2_offset + ") equals or exceeds array length (" + comp2.length + ")"); - comp_by1(u, BufferFactory.SIZEOF_FLOAT * u_offset, v, BufferFactory.SIZEOF_FLOAT * v_offset, uu, BufferFactory.SIZEOF_FLOAT * uu_offset, vv, BufferFactory.SIZEOF_FLOAT * vv_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset, control, BufferFactory.SIZEOF_FLOAT * control_offset, comp, BufferFactory.SIZEOF_FLOAT * comp_offset, comp2, BufferFactory.SIZEOF_FLOAT * comp2_offset); - - } - - /** Interface to C language function:
void createSlice(const float * * vc3d, float * vc2d, const float * * slice3d, int mnx, int nx, int ny, int nz, int sense, float * slice); */ - public static void createSlice(java.nio.FloatBuffer[] vc3d, java.nio.FloatBuffer vc2d, java.nio.FloatBuffer[] slice3d, int mnx, int nx, int ny, int nz, int sense, java.nio.FloatBuffer slice) - { - int[] vc3d_byte_offset_array = new int[vc3d.length]; - if (vc3d != null) { - for (int _ctr = 0; _ctr < vc3d.length; _ctr++) { - if (!BufferFactory.isDirect(vc3d[_ctr])) { - throw new RuntimeException("Element " + _ctr + " of argument \"vc3d\" was not a direct buffer"); - } - vc3d_byte_offset_array[_ctr] = BufferFactory.getDirectBufferByteOffset(vc3d[_ctr]); - } - } - boolean _direct = BufferFactory.isDirect(vc2d); - int[] slice3d_byte_offset_array = new int[slice3d.length]; - if (slice3d != null) { - for (int _ctr = 0; _ctr < slice3d.length; _ctr++) { - if (!BufferFactory.isDirect(slice3d[_ctr])) { - throw new RuntimeException("Element " + _ctr + " of argument \"slice3d\" was not a direct buffer"); - } - slice3d_byte_offset_array[_ctr] = BufferFactory.getDirectBufferByteOffset(slice3d[_ctr]); - } - } - if (slice != null && _direct != BufferFactory.isDirect(slice)) - throw new RuntimeException("Argument \"slice\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - createSlice0(vc3d, vc3d_byte_offset_array, vc2d, BufferFactory.getDirectBufferByteOffset(vc2d), slice3d, slice3d_byte_offset_array, mnx, nx, ny, nz, sense, slice, BufferFactory.getDirectBufferByteOffset(slice)); - } else { - createSlice1(vc3d, vc3d_byte_offset_array, BufferFactory.getArray(vc2d), BufferFactory.getIndirectBufferByteOffset(vc2d), slice3d, slice3d_byte_offset_array, mnx, nx, ny, nz, sense, BufferFactory.getArray(slice), BufferFactory.getIndirectBufferByteOffset(slice)); - } - } - - /** Entry point to C language function:
void createSlice(const float * * vc3d, float * vc2d, const float * * slice3d, int mnx, int nx, int ny, int nz, int sense, float * slice); */ - private static native void createSlice0(Object[] vc3d, int[] vc3d_byte_offset_array, Object vc2d, int vc2d_byte_offset, Object[] slice3d, int[] slice3d_byte_offset_array, int mnx, int nx, int ny, int nz, int sense, Object slice, int slice_byte_offset); - - /** Entry point to C language function:
void createSlice(const float * * vc3d, float * vc2d, const float * * slice3d, int mnx, int nx, int ny, int nz, int sense, float * slice); */ - private static native void createSlice1(Object[] vc3d, int[] vc3d_byte_offset_array, Object vc2d, int vc2d_byte_offset, Object[] slice3d, int[] slice3d_byte_offset_array, int mnx, int nx, int ny, int nz, int sense, Object slice, int slice_byte_offset); - - /** Interface to C language function:
void createSlice(const float * * vc3d, float * vc2d, const float * * slice3d, int mnx, int nx, int ny, int nz, int sense, float * slice); */ - public static void createSlice(java.nio.FloatBuffer[] vc3d, float[] vc2d, int vc2d_offset, java.nio.FloatBuffer[] slice3d, int mnx, int nx, int ny, int nz, int sense, float[] slice, int slice_offset) - { - int[] vc3d_byte_offset_array = new int[vc3d.length]; - if (vc3d != null) { - for (int _ctr = 0; _ctr < vc3d.length; _ctr++) { - if (!BufferFactory.isDirect(vc3d[_ctr])) { - throw new RuntimeException("Element " + _ctr + " of argument \"vc3d\" was not a direct buffer"); - } - vc3d_byte_offset_array[_ctr] = BufferFactory.getDirectBufferByteOffset(vc3d[_ctr]); - } - } - if(vc2d != null && vc2d.length <= vc2d_offset) - throw new RuntimeException("array offset argument \"vc2d_offset\" (" + vc2d_offset + ") equals or exceeds array length (" + vc2d.length + ")"); - int[] slice3d_byte_offset_array = new int[slice3d.length]; - if (slice3d != null) { - for (int _ctr = 0; _ctr < slice3d.length; _ctr++) { - if (!BufferFactory.isDirect(slice3d[_ctr])) { - throw new RuntimeException("Element " + _ctr + " of argument \"slice3d\" was not a direct buffer"); - } - slice3d_byte_offset_array[_ctr] = BufferFactory.getDirectBufferByteOffset(slice3d[_ctr]); - } - } - if(slice != null && slice.length <= slice_offset) - throw new RuntimeException("array offset argument \"slice_offset\" (" + slice_offset + ") equals or exceeds array length (" + slice.length + ")"); - createSlice1(vc3d, vc3d_byte_offset_array, vc2d, BufferFactory.SIZEOF_FLOAT * vc2d_offset, slice3d, slice3d_byte_offset_array, mnx, nx, ny, nz, sense, slice, BufferFactory.SIZEOF_FLOAT * slice_offset); - - } - - /** Interface to C language function:
void createSlices(float * vc3d, float * param3d, int sense, int nx, int ny, int nz, float * vcC, int nc, float * paramC); */ - public static void createSlices(java.nio.FloatBuffer vc3d, java.nio.FloatBuffer param3d, int sense, int nx, int ny, int nz, java.nio.FloatBuffer vcC, int nc, java.nio.FloatBuffer paramC) - { - boolean _direct = BufferFactory.isDirect(vc3d); - if (param3d != null && _direct != BufferFactory.isDirect(param3d)) - throw new RuntimeException("Argument \"param3d\" : Buffers passed to this method must all be either direct or indirect"); - if (vcC != null && _direct != BufferFactory.isDirect(vcC)) - throw new RuntimeException("Argument \"vcC\" : Buffers passed to this method must all be either direct or indirect"); - if (paramC != null && _direct != BufferFactory.isDirect(paramC)) - throw new RuntimeException("Argument \"paramC\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - createSlices0(vc3d, BufferFactory.getDirectBufferByteOffset(vc3d), param3d, BufferFactory.getDirectBufferByteOffset(param3d), sense, nx, ny, nz, vcC, BufferFactory.getDirectBufferByteOffset(vcC), nc, paramC, BufferFactory.getDirectBufferByteOffset(paramC)); - } else { - createSlices1(BufferFactory.getArray(vc3d), BufferFactory.getIndirectBufferByteOffset(vc3d), BufferFactory.getArray(param3d), BufferFactory.getIndirectBufferByteOffset(param3d), sense, nx, ny, nz, BufferFactory.getArray(vcC), BufferFactory.getIndirectBufferByteOffset(vcC), nc, BufferFactory.getArray(paramC), BufferFactory.getIndirectBufferByteOffset(paramC)); - } - } - - /** Entry point to C language function:
void createSlices(float * vc3d, float * param3d, int sense, int nx, int ny, int nz, float * vcC, int nc, float * paramC); */ - private static native void createSlices0(Object vc3d, int vc3d_byte_offset, Object param3d, int param3d_byte_offset, int sense, int nx, int ny, int nz, Object vcC, int vcC_byte_offset, int nc, Object paramC, int paramC_byte_offset); - - /** Entry point to C language function:
void createSlices(float * vc3d, float * param3d, int sense, int nx, int ny, int nz, float * vcC, int nc, float * paramC); */ - private static native void createSlices1(Object vc3d, int vc3d_byte_offset, Object param3d, int param3d_byte_offset, int sense, int nx, int ny, int nz, Object vcC, int vcC_byte_offset, int nc, Object paramC, int paramC_byte_offset); - - /** Interface to C language function:
void createSlices(float * vc3d, float * param3d, int sense, int nx, int ny, int nz, float * vcC, int nc, float * paramC); */ - public static void createSlices(float[] vc3d, int vc3d_offset, float[] param3d, int param3d_offset, int sense, int nx, int ny, int nz, float[] vcC, int vcC_offset, int nc, float[] paramC, int paramC_offset) - { - if(vc3d != null && vc3d.length <= vc3d_offset) - throw new RuntimeException("array offset argument \"vc3d_offset\" (" + vc3d_offset + ") equals or exceeds array length (" + vc3d.length + ")"); - if(param3d != null && param3d.length <= param3d_offset) - throw new RuntimeException("array offset argument \"param3d_offset\" (" + param3d_offset + ") equals or exceeds array length (" + param3d.length + ")"); - if(vcC != null && vcC.length <= vcC_offset) - throw new RuntimeException("array offset argument \"vcC_offset\" (" + vcC_offset + ") equals or exceeds array length (" + vcC.length + ")"); - if(paramC != null && paramC.length <= paramC_offset) - throw new RuntimeException("array offset argument \"paramC_offset\" (" + paramC_offset + ") equals or exceeds array length (" + paramC.length + ")"); - createSlices1(vc3d, BufferFactory.SIZEOF_FLOAT * vc3d_offset, param3d, BufferFactory.SIZEOF_FLOAT * param3d_offset, sense, nx, ny, nz, vcC, BufferFactory.SIZEOF_FLOAT * vcC_offset, nc, paramC, BufferFactory.SIZEOF_FLOAT * paramC_offset); - - } - - /** Interface to C language function:
void crossvectors(float * aX, float * aY, float * bX, float * bY, float * result, int * mni, int * ni, int * nj); */ - public static void crossvectors(java.nio.FloatBuffer aX, java.nio.FloatBuffer aY, java.nio.FloatBuffer bX, java.nio.FloatBuffer bY, java.nio.FloatBuffer result, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj) - { - boolean _direct = BufferFactory.isDirect(aX); - if (aY != null && _direct != BufferFactory.isDirect(aY)) - throw new RuntimeException("Argument \"aY\" : Buffers passed to this method must all be either direct or indirect"); - if (bX != null && _direct != BufferFactory.isDirect(bX)) - throw new RuntimeException("Argument \"bX\" : Buffers passed to this method must all be either direct or indirect"); - if (bY != null && _direct != BufferFactory.isDirect(bY)) - throw new RuntimeException("Argument \"bY\" : Buffers passed to this method must all be either direct or indirect"); - if (result != null && _direct != BufferFactory.isDirect(result)) - throw new RuntimeException("Argument \"result\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - crossvectors0(aX, BufferFactory.getDirectBufferByteOffset(aX), aY, BufferFactory.getDirectBufferByteOffset(aY), bX, BufferFactory.getDirectBufferByteOffset(bX), bY, BufferFactory.getDirectBufferByteOffset(bY), result, BufferFactory.getDirectBufferByteOffset(result), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj)); - } else { - crossvectors1(BufferFactory.getArray(aX), BufferFactory.getIndirectBufferByteOffset(aX), BufferFactory.getArray(aY), BufferFactory.getIndirectBufferByteOffset(aY), BufferFactory.getArray(bX), BufferFactory.getIndirectBufferByteOffset(bX), BufferFactory.getArray(bY), BufferFactory.getIndirectBufferByteOffset(bY), BufferFactory.getArray(result), BufferFactory.getIndirectBufferByteOffset(result), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj)); - } - } - - /** Entry point to C language function:
void crossvectors(float * aX, float * aY, float * bX, float * bY, float * result, int * mni, int * ni, int * nj); */ - private static native void crossvectors0(Object aX, int aX_byte_offset, Object aY, int aY_byte_offset, Object bX, int bX_byte_offset, Object bY, int bY_byte_offset, Object result, int result_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset); - - /** Entry point to C language function:
void crossvectors(float * aX, float * aY, float * bX, float * bY, float * result, int * mni, int * ni, int * nj); */ - private static native void crossvectors1(Object aX, int aX_byte_offset, Object aY, int aY_byte_offset, Object bX, int bX_byte_offset, Object bY, int bY_byte_offset, Object result, int result_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset); - - /** Interface to C language function:
void crossvectors(float * aX, float * aY, float * bX, float * bY, float * result, int * mni, int * ni, int * nj); */ - public static void crossvectors(float[] aX, int aX_offset, float[] aY, int aY_offset, float[] bX, int bX_offset, float[] bY, int bY_offset, float[] result, int result_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset) - { - if(aX != null && aX.length <= aX_offset) - throw new RuntimeException("array offset argument \"aX_offset\" (" + aX_offset + ") equals or exceeds array length (" + aX.length + ")"); - if(aY != null && aY.length <= aY_offset) - throw new RuntimeException("array offset argument \"aY_offset\" (" + aY_offset + ") equals or exceeds array length (" + aY.length + ")"); - if(bX != null && bX.length <= bX_offset) - throw new RuntimeException("array offset argument \"bX_offset\" (" + bX_offset + ") equals or exceeds array length (" + bX.length + ")"); - if(bY != null && bY.length <= bY_offset) - throw new RuntimeException("array offset argument \"bY_offset\" (" + bY_offset + ") equals or exceeds array length (" + bY.length + ")"); - if(result != null && result.length <= result_offset) - throw new RuntimeException("array offset argument \"result_offset\" (" + result_offset + ") equals or exceeds array length (" + result.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - crossvectors1(aX, BufferFactory.SIZEOF_FLOAT * aX_offset, aY, BufferFactory.SIZEOF_FLOAT * aY_offset, bX, BufferFactory.SIZEOF_FLOAT * bX_offset, bY, BufferFactory.SIZEOF_FLOAT * bY_offset, result, BufferFactory.SIZEOF_FLOAT * result_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset); - - } - - /** Interface to C language function:
void ctop(float * P, float * HT, float * VV, float * PEQLEV, int * NPAR, float * CLDTOP); */ - public static void ctop(java.nio.FloatBuffer P, java.nio.FloatBuffer HT, java.nio.FloatBuffer VV, java.nio.FloatBuffer PEQLEV, java.nio.IntBuffer NPAR, java.nio.FloatBuffer CLDTOP) - { - boolean _direct = BufferFactory.isDirect(P); - if (HT != null && _direct != BufferFactory.isDirect(HT)) - throw new RuntimeException("Argument \"HT\" : Buffers passed to this method must all be either direct or indirect"); - if (VV != null && _direct != BufferFactory.isDirect(VV)) - throw new RuntimeException("Argument \"VV\" : Buffers passed to this method must all be either direct or indirect"); - if (PEQLEV != null && _direct != BufferFactory.isDirect(PEQLEV)) - throw new RuntimeException("Argument \"PEQLEV\" : Buffers passed to this method must all be either direct or indirect"); - if (NPAR != null && _direct != BufferFactory.isDirect(NPAR)) - throw new RuntimeException("Argument \"NPAR\" : Buffers passed to this method must all be either direct or indirect"); - if (CLDTOP != null && _direct != BufferFactory.isDirect(CLDTOP)) - throw new RuntimeException("Argument \"CLDTOP\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - ctop0(P, BufferFactory.getDirectBufferByteOffset(P), HT, BufferFactory.getDirectBufferByteOffset(HT), VV, BufferFactory.getDirectBufferByteOffset(VV), PEQLEV, BufferFactory.getDirectBufferByteOffset(PEQLEV), NPAR, BufferFactory.getDirectBufferByteOffset(NPAR), CLDTOP, BufferFactory.getDirectBufferByteOffset(CLDTOP)); - } else { - ctop1(BufferFactory.getArray(P), BufferFactory.getIndirectBufferByteOffset(P), BufferFactory.getArray(HT), BufferFactory.getIndirectBufferByteOffset(HT), BufferFactory.getArray(VV), BufferFactory.getIndirectBufferByteOffset(VV), BufferFactory.getArray(PEQLEV), BufferFactory.getIndirectBufferByteOffset(PEQLEV), BufferFactory.getArray(NPAR), BufferFactory.getIndirectBufferByteOffset(NPAR), BufferFactory.getArray(CLDTOP), BufferFactory.getIndirectBufferByteOffset(CLDTOP)); - } - } - - /** Entry point to C language function:
void ctop(float * P, float * HT, float * VV, float * PEQLEV, int * NPAR, float * CLDTOP); */ - private static native void ctop0(Object P, int P_byte_offset, Object HT, int HT_byte_offset, Object VV, int VV_byte_offset, Object PEQLEV, int PEQLEV_byte_offset, Object NPAR, int NPAR_byte_offset, Object CLDTOP, int CLDTOP_byte_offset); - - /** Entry point to C language function:
void ctop(float * P, float * HT, float * VV, float * PEQLEV, int * NPAR, float * CLDTOP); */ - private static native void ctop1(Object P, int P_byte_offset, Object HT, int HT_byte_offset, Object VV, int VV_byte_offset, Object PEQLEV, int PEQLEV_byte_offset, Object NPAR, int NPAR_byte_offset, Object CLDTOP, int CLDTOP_byte_offset); - - /** Interface to C language function:
void ctop(float * P, float * HT, float * VV, float * PEQLEV, int * NPAR, float * CLDTOP); */ - public static void ctop(float[] P, int P_offset, float[] HT, int HT_offset, float[] VV, int VV_offset, float[] PEQLEV, int PEQLEV_offset, int[] NPAR, int NPAR_offset, float[] CLDTOP, int CLDTOP_offset) - { - if(P != null && P.length <= P_offset) - throw new RuntimeException("array offset argument \"P_offset\" (" + P_offset + ") equals or exceeds array length (" + P.length + ")"); - if(HT != null && HT.length <= HT_offset) - throw new RuntimeException("array offset argument \"HT_offset\" (" + HT_offset + ") equals or exceeds array length (" + HT.length + ")"); - if(VV != null && VV.length <= VV_offset) - throw new RuntimeException("array offset argument \"VV_offset\" (" + VV_offset + ") equals or exceeds array length (" + VV.length + ")"); - if(PEQLEV != null && PEQLEV.length <= PEQLEV_offset) - throw new RuntimeException("array offset argument \"PEQLEV_offset\" (" + PEQLEV_offset + ") equals or exceeds array length (" + PEQLEV.length + ")"); - if(NPAR != null && NPAR.length <= NPAR_offset) - throw new RuntimeException("array offset argument \"NPAR_offset\" (" + NPAR_offset + ") equals or exceeds array length (" + NPAR.length + ")"); - if(CLDTOP != null && CLDTOP.length <= CLDTOP_offset) - throw new RuntimeException("array offset argument \"CLDTOP_offset\" (" + CLDTOP_offset + ") equals or exceeds array length (" + CLDTOP.length + ")"); - ctop1(P, BufferFactory.SIZEOF_FLOAT * P_offset, HT, BufferFactory.SIZEOF_FLOAT * HT_offset, VV, BufferFactory.SIZEOF_FLOAT * VV_offset, PEQLEV, BufferFactory.SIZEOF_FLOAT * PEQLEV_offset, NPAR, BufferFactory.SIZEOF_INT * NPAR_offset, CLDTOP, BufferFactory.SIZEOF_FLOAT * CLDTOP_offset); - - } - - /** Interface to C language function:
void cv_date2jul(int * YR, int * MON, int * DAY, int * JD, int * ISTATUS); */ - public static void cv_date2jul(java.nio.IntBuffer YR, java.nio.IntBuffer MON, java.nio.IntBuffer DAY, java.nio.IntBuffer JD, java.nio.IntBuffer ISTATUS) - { - boolean _direct = BufferFactory.isDirect(YR); - if (MON != null && _direct != BufferFactory.isDirect(MON)) - throw new RuntimeException("Argument \"MON\" : Buffers passed to this method must all be either direct or indirect"); - if (DAY != null && _direct != BufferFactory.isDirect(DAY)) - throw new RuntimeException("Argument \"DAY\" : Buffers passed to this method must all be either direct or indirect"); - if (JD != null && _direct != BufferFactory.isDirect(JD)) - throw new RuntimeException("Argument \"JD\" : Buffers passed to this method must all be either direct or indirect"); - if (ISTATUS != null && _direct != BufferFactory.isDirect(ISTATUS)) - throw new RuntimeException("Argument \"ISTATUS\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - cv_date2jul0(YR, BufferFactory.getDirectBufferByteOffset(YR), MON, BufferFactory.getDirectBufferByteOffset(MON), DAY, BufferFactory.getDirectBufferByteOffset(DAY), JD, BufferFactory.getDirectBufferByteOffset(JD), ISTATUS, BufferFactory.getDirectBufferByteOffset(ISTATUS)); - } else { - cv_date2jul1(BufferFactory.getArray(YR), BufferFactory.getIndirectBufferByteOffset(YR), BufferFactory.getArray(MON), BufferFactory.getIndirectBufferByteOffset(MON), BufferFactory.getArray(DAY), BufferFactory.getIndirectBufferByteOffset(DAY), BufferFactory.getArray(JD), BufferFactory.getIndirectBufferByteOffset(JD), BufferFactory.getArray(ISTATUS), BufferFactory.getIndirectBufferByteOffset(ISTATUS)); - } - } - - /** Entry point to C language function:
void cv_date2jul(int * YR, int * MON, int * DAY, int * JD, int * ISTATUS); */ - private static native void cv_date2jul0(Object YR, int YR_byte_offset, Object MON, int MON_byte_offset, Object DAY, int DAY_byte_offset, Object JD, int JD_byte_offset, Object ISTATUS, int ISTATUS_byte_offset); - - /** Entry point to C language function:
void cv_date2jul(int * YR, int * MON, int * DAY, int * JD, int * ISTATUS); */ - private static native void cv_date2jul1(Object YR, int YR_byte_offset, Object MON, int MON_byte_offset, Object DAY, int DAY_byte_offset, Object JD, int JD_byte_offset, Object ISTATUS, int ISTATUS_byte_offset); - - /** Interface to C language function:
void cv_date2jul(int * YR, int * MON, int * DAY, int * JD, int * ISTATUS); */ - public static void cv_date2jul(int[] YR, int YR_offset, int[] MON, int MON_offset, int[] DAY, int DAY_offset, int[] JD, int JD_offset, int[] ISTATUS, int ISTATUS_offset) - { - if(YR != null && YR.length <= YR_offset) - throw new RuntimeException("array offset argument \"YR_offset\" (" + YR_offset + ") equals or exceeds array length (" + YR.length + ")"); - if(MON != null && MON.length <= MON_offset) - throw new RuntimeException("array offset argument \"MON_offset\" (" + MON_offset + ") equals or exceeds array length (" + MON.length + ")"); - if(DAY != null && DAY.length <= DAY_offset) - throw new RuntimeException("array offset argument \"DAY_offset\" (" + DAY_offset + ") equals or exceeds array length (" + DAY.length + ")"); - if(JD != null && JD.length <= JD_offset) - throw new RuntimeException("array offset argument \"JD_offset\" (" + JD_offset + ") equals or exceeds array length (" + JD.length + ")"); - if(ISTATUS != null && ISTATUS.length <= ISTATUS_offset) - throw new RuntimeException("array offset argument \"ISTATUS_offset\" (" + ISTATUS_offset + ") equals or exceeds array length (" + ISTATUS.length + ")"); - cv_date2jul1(YR, BufferFactory.SIZEOF_INT * YR_offset, MON, BufferFactory.SIZEOF_INT * MON_offset, DAY, BufferFactory.SIZEOF_INT * DAY_offset, JD, BufferFactory.SIZEOF_INT * JD_offset, ISTATUS, BufferFactory.SIZEOF_INT * ISTATUS_offset); - - } - - /** Interface to C language function:
void cvgust(float * dd7, float * ui, int * gstpot); */ - public static void cvgust(java.nio.FloatBuffer dd7, java.nio.FloatBuffer ui, java.nio.IntBuffer gstpot) - { - boolean _direct = BufferFactory.isDirect(dd7); - if (ui != null && _direct != BufferFactory.isDirect(ui)) - throw new RuntimeException("Argument \"ui\" : Buffers passed to this method must all be either direct or indirect"); - if (gstpot != null && _direct != BufferFactory.isDirect(gstpot)) - throw new RuntimeException("Argument \"gstpot\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - cvgust0(dd7, BufferFactory.getDirectBufferByteOffset(dd7), ui, BufferFactory.getDirectBufferByteOffset(ui), gstpot, BufferFactory.getDirectBufferByteOffset(gstpot)); - } else { - cvgust1(BufferFactory.getArray(dd7), BufferFactory.getIndirectBufferByteOffset(dd7), BufferFactory.getArray(ui), BufferFactory.getIndirectBufferByteOffset(ui), BufferFactory.getArray(gstpot), BufferFactory.getIndirectBufferByteOffset(gstpot)); - } - } - - /** Entry point to C language function:
void cvgust(float * dd7, float * ui, int * gstpot); */ - private static native void cvgust0(Object dd7, int dd7_byte_offset, Object ui, int ui_byte_offset, Object gstpot, int gstpot_byte_offset); - - /** Entry point to C language function:
void cvgust(float * dd7, float * ui, int * gstpot); */ - private static native void cvgust1(Object dd7, int dd7_byte_offset, Object ui, int ui_byte_offset, Object gstpot, int gstpot_byte_offset); - - /** Interface to C language function:
void cvgust(float * dd7, float * ui, int * gstpot); */ - public static void cvgust(float[] dd7, int dd7_offset, float[] ui, int ui_offset, int[] gstpot, int gstpot_offset) - { - if(dd7 != null && dd7.length <= dd7_offset) - throw new RuntimeException("array offset argument \"dd7_offset\" (" + dd7_offset + ") equals or exceeds array length (" + dd7.length + ")"); - if(ui != null && ui.length <= ui_offset) - throw new RuntimeException("array offset argument \"ui_offset\" (" + ui_offset + ") equals or exceeds array length (" + ui.length + ")"); - if(gstpot != null && gstpot.length <= gstpot_offset) - throw new RuntimeException("array offset argument \"gstpot_offset\" (" + gstpot_offset + ") equals or exceeds array length (" + gstpot.length + ")"); - cvgust1(dd7, BufferFactory.SIZEOF_FLOAT * dd7_offset, ui, BufferFactory.SIZEOF_FLOAT * ui_offset, gstpot, BufferFactory.SIZEOF_INT * gstpot_offset); - - } - - /** Interface to C language function:
void dcapeFunc(float usetv, const float * * p_dat, const float * * t_dat, const float * * td_dat, float * p0, float * th0, float * sh0, int mnx, int nx, int ny, int nz, float max_evap, float max_rh, float * dcape_dat); */ - public static void dcapeFunc(float usetv, java.nio.FloatBuffer[] p_dat, java.nio.FloatBuffer[] t_dat, java.nio.FloatBuffer[] td_dat, java.nio.FloatBuffer p0, java.nio.FloatBuffer th0, java.nio.FloatBuffer sh0, int mnx, int nx, int ny, int nz, float max_evap, float max_rh, java.nio.FloatBuffer dcape_dat) - { - int[] p_dat_byte_offset_array = new int[p_dat.length]; - if (p_dat != null) { - for (int _ctr = 0; _ctr < p_dat.length; _ctr++) { - if (!BufferFactory.isDirect(p_dat[_ctr])) { - throw new RuntimeException("Element " + _ctr + " of argument \"p_dat\" was not a direct buffer"); - } - p_dat_byte_offset_array[_ctr] = BufferFactory.getDirectBufferByteOffset(p_dat[_ctr]); - } - } - int[] t_dat_byte_offset_array = new int[t_dat.length]; - if (t_dat != null) { - for (int _ctr = 0; _ctr < t_dat.length; _ctr++) { - if (!BufferFactory.isDirect(t_dat[_ctr])) { - throw new RuntimeException("Element " + _ctr + " of argument \"t_dat\" was not a direct buffer"); - } - t_dat_byte_offset_array[_ctr] = BufferFactory.getDirectBufferByteOffset(t_dat[_ctr]); - } - } - int[] td_dat_byte_offset_array = new int[td_dat.length]; - if (td_dat != null) { - for (int _ctr = 0; _ctr < td_dat.length; _ctr++) { - if (!BufferFactory.isDirect(td_dat[_ctr])) { - throw new RuntimeException("Element " + _ctr + " of argument \"td_dat\" was not a direct buffer"); - } - td_dat_byte_offset_array[_ctr] = BufferFactory.getDirectBufferByteOffset(td_dat[_ctr]); - } - } - boolean _direct = BufferFactory.isDirect(p0); - if (th0 != null && _direct != BufferFactory.isDirect(th0)) - throw new RuntimeException("Argument \"th0\" : Buffers passed to this method must all be either direct or indirect"); - if (sh0 != null && _direct != BufferFactory.isDirect(sh0)) - throw new RuntimeException("Argument \"sh0\" : Buffers passed to this method must all be either direct or indirect"); - if (dcape_dat != null && _direct != BufferFactory.isDirect(dcape_dat)) - throw new RuntimeException("Argument \"dcape_dat\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - dcapeFunc0(usetv, p_dat, p_dat_byte_offset_array, t_dat, t_dat_byte_offset_array, td_dat, td_dat_byte_offset_array, p0, BufferFactory.getDirectBufferByteOffset(p0), th0, BufferFactory.getDirectBufferByteOffset(th0), sh0, BufferFactory.getDirectBufferByteOffset(sh0), mnx, nx, ny, nz, max_evap, max_rh, dcape_dat, BufferFactory.getDirectBufferByteOffset(dcape_dat)); - } else { - dcapeFunc1(usetv, p_dat, p_dat_byte_offset_array, t_dat, t_dat_byte_offset_array, td_dat, td_dat_byte_offset_array, BufferFactory.getArray(p0), BufferFactory.getIndirectBufferByteOffset(p0), BufferFactory.getArray(th0), BufferFactory.getIndirectBufferByteOffset(th0), BufferFactory.getArray(sh0), BufferFactory.getIndirectBufferByteOffset(sh0), mnx, nx, ny, nz, max_evap, max_rh, BufferFactory.getArray(dcape_dat), BufferFactory.getIndirectBufferByteOffset(dcape_dat)); - } - } - - /** Entry point to C language function:
void dcapeFunc(float usetv, const float * * p_dat, const float * * t_dat, const float * * td_dat, float * p0, float * th0, float * sh0, int mnx, int nx, int ny, int nz, float max_evap, float max_rh, float * dcape_dat); */ - private static native void dcapeFunc0(float usetv, Object[] p_dat, int[] p_dat_byte_offset_array, Object[] t_dat, int[] t_dat_byte_offset_array, Object[] td_dat, int[] td_dat_byte_offset_array, Object p0, int p0_byte_offset, Object th0, int th0_byte_offset, Object sh0, int sh0_byte_offset, int mnx, int nx, int ny, int nz, float max_evap, float max_rh, Object dcape_dat, int dcape_dat_byte_offset); - - /** Entry point to C language function:
void dcapeFunc(float usetv, const float * * p_dat, const float * * t_dat, const float * * td_dat, float * p0, float * th0, float * sh0, int mnx, int nx, int ny, int nz, float max_evap, float max_rh, float * dcape_dat); */ - private static native void dcapeFunc1(float usetv, Object[] p_dat, int[] p_dat_byte_offset_array, Object[] t_dat, int[] t_dat_byte_offset_array, Object[] td_dat, int[] td_dat_byte_offset_array, Object p0, int p0_byte_offset, Object th0, int th0_byte_offset, Object sh0, int sh0_byte_offset, int mnx, int nx, int ny, int nz, float max_evap, float max_rh, Object dcape_dat, int dcape_dat_byte_offset); - - /** Interface to C language function:
void dcapeFunc(float usetv, const float * * p_dat, const float * * t_dat, const float * * td_dat, float * p0, float * th0, float * sh0, int mnx, int nx, int ny, int nz, float max_evap, float max_rh, float * dcape_dat); */ - public static void dcapeFunc(float usetv, java.nio.FloatBuffer[] p_dat, java.nio.FloatBuffer[] t_dat, java.nio.FloatBuffer[] td_dat, float[] p0, int p0_offset, float[] th0, int th0_offset, float[] sh0, int sh0_offset, int mnx, int nx, int ny, int nz, float max_evap, float max_rh, float[] dcape_dat, int dcape_dat_offset) - { - int[] p_dat_byte_offset_array = new int[p_dat.length]; - if (p_dat != null) { - for (int _ctr = 0; _ctr < p_dat.length; _ctr++) { - if (!BufferFactory.isDirect(p_dat[_ctr])) { - throw new RuntimeException("Element " + _ctr + " of argument \"p_dat\" was not a direct buffer"); - } - p_dat_byte_offset_array[_ctr] = BufferFactory.getDirectBufferByteOffset(p_dat[_ctr]); - } - } - int[] t_dat_byte_offset_array = new int[t_dat.length]; - if (t_dat != null) { - for (int _ctr = 0; _ctr < t_dat.length; _ctr++) { - if (!BufferFactory.isDirect(t_dat[_ctr])) { - throw new RuntimeException("Element " + _ctr + " of argument \"t_dat\" was not a direct buffer"); - } - t_dat_byte_offset_array[_ctr] = BufferFactory.getDirectBufferByteOffset(t_dat[_ctr]); - } - } - int[] td_dat_byte_offset_array = new int[td_dat.length]; - if (td_dat != null) { - for (int _ctr = 0; _ctr < td_dat.length; _ctr++) { - if (!BufferFactory.isDirect(td_dat[_ctr])) { - throw new RuntimeException("Element " + _ctr + " of argument \"td_dat\" was not a direct buffer"); - } - td_dat_byte_offset_array[_ctr] = BufferFactory.getDirectBufferByteOffset(td_dat[_ctr]); - } - } - if(p0 != null && p0.length <= p0_offset) - throw new RuntimeException("array offset argument \"p0_offset\" (" + p0_offset + ") equals or exceeds array length (" + p0.length + ")"); - if(th0 != null && th0.length <= th0_offset) - throw new RuntimeException("array offset argument \"th0_offset\" (" + th0_offset + ") equals or exceeds array length (" + th0.length + ")"); - if(sh0 != null && sh0.length <= sh0_offset) - throw new RuntimeException("array offset argument \"sh0_offset\" (" + sh0_offset + ") equals or exceeds array length (" + sh0.length + ")"); - if(dcape_dat != null && dcape_dat.length <= dcape_dat_offset) - throw new RuntimeException("array offset argument \"dcape_dat_offset\" (" + dcape_dat_offset + ") equals or exceeds array length (" + dcape_dat.length + ")"); - dcapeFunc1(usetv, p_dat, p_dat_byte_offset_array, t_dat, t_dat_byte_offset_array, td_dat, td_dat_byte_offset_array, p0, BufferFactory.SIZEOF_FLOAT * p0_offset, th0, BufferFactory.SIZEOF_FLOAT * th0_offset, sh0, BufferFactory.SIZEOF_FLOAT * sh0_offset, mnx, nx, ny, nz, max_evap, max_rh, dcape_dat, BufferFactory.SIZEOF_FLOAT * dcape_dat_offset); - - } - - /** Interface to C language function:
void ddff(float * U, float * V, float * DIR, float * SPD, int * NLVLS); */ - public static void ddff(java.nio.FloatBuffer U, java.nio.FloatBuffer V, java.nio.FloatBuffer DIR, java.nio.FloatBuffer SPD, java.nio.IntBuffer NLVLS) - { - boolean _direct = BufferFactory.isDirect(U); - if (V != null && _direct != BufferFactory.isDirect(V)) - throw new RuntimeException("Argument \"V\" : Buffers passed to this method must all be either direct or indirect"); - if (DIR != null && _direct != BufferFactory.isDirect(DIR)) - throw new RuntimeException("Argument \"DIR\" : Buffers passed to this method must all be either direct or indirect"); - if (SPD != null && _direct != BufferFactory.isDirect(SPD)) - throw new RuntimeException("Argument \"SPD\" : Buffers passed to this method must all be either direct or indirect"); - if (NLVLS != null && _direct != BufferFactory.isDirect(NLVLS)) - throw new RuntimeException("Argument \"NLVLS\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - ddff0(U, BufferFactory.getDirectBufferByteOffset(U), V, BufferFactory.getDirectBufferByteOffset(V), DIR, BufferFactory.getDirectBufferByteOffset(DIR), SPD, BufferFactory.getDirectBufferByteOffset(SPD), NLVLS, BufferFactory.getDirectBufferByteOffset(NLVLS)); - } else { - ddff1(BufferFactory.getArray(U), BufferFactory.getIndirectBufferByteOffset(U), BufferFactory.getArray(V), BufferFactory.getIndirectBufferByteOffset(V), BufferFactory.getArray(DIR), BufferFactory.getIndirectBufferByteOffset(DIR), BufferFactory.getArray(SPD), BufferFactory.getIndirectBufferByteOffset(SPD), BufferFactory.getArray(NLVLS), BufferFactory.getIndirectBufferByteOffset(NLVLS)); - } - } - - /** Entry point to C language function:
void ddff(float * U, float * V, float * DIR, float * SPD, int * NLVLS); */ - private static native void ddff0(Object U, int U_byte_offset, Object V, int V_byte_offset, Object DIR, int DIR_byte_offset, Object SPD, int SPD_byte_offset, Object NLVLS, int NLVLS_byte_offset); - - /** Entry point to C language function:
void ddff(float * U, float * V, float * DIR, float * SPD, int * NLVLS); */ - private static native void ddff1(Object U, int U_byte_offset, Object V, int V_byte_offset, Object DIR, int DIR_byte_offset, Object SPD, int SPD_byte_offset, Object NLVLS, int NLVLS_byte_offset); - - /** Interface to C language function:
void ddff(float * U, float * V, float * DIR, float * SPD, int * NLVLS); */ - public static void ddff(float[] U, int U_offset, float[] V, int V_offset, float[] DIR, int DIR_offset, float[] SPD, int SPD_offset, int[] NLVLS, int NLVLS_offset) - { - if(U != null && U.length <= U_offset) - throw new RuntimeException("array offset argument \"U_offset\" (" + U_offset + ") equals or exceeds array length (" + U.length + ")"); - if(V != null && V.length <= V_offset) - throw new RuntimeException("array offset argument \"V_offset\" (" + V_offset + ") equals or exceeds array length (" + V.length + ")"); - if(DIR != null && DIR.length <= DIR_offset) - throw new RuntimeException("array offset argument \"DIR_offset\" (" + DIR_offset + ") equals or exceeds array length (" + DIR.length + ")"); - if(SPD != null && SPD.length <= SPD_offset) - throw new RuntimeException("array offset argument \"SPD_offset\" (" + SPD_offset + ") equals or exceeds array length (" + SPD.length + ")"); - if(NLVLS != null && NLVLS.length <= NLVLS_offset) - throw new RuntimeException("array offset argument \"NLVLS_offset\" (" + NLVLS_offset + ") equals or exceeds array length (" + NLVLS.length + ")"); - ddff1(U, BufferFactory.SIZEOF_FLOAT * U_offset, V, BufferFactory.SIZEOF_FLOAT * V_offset, DIR, BufferFactory.SIZEOF_FLOAT * DIR_offset, SPD, BufferFactory.SIZEOF_FLOAT * SPD_offset, NLVLS, BufferFactory.SIZEOF_INT * NLVLS_offset); - - } - - /** Interface to C language function:
void defineSlice(const float * * vc3d, const float * * param3d, int mnx, int nx, int ny, int nz, float param, int sense, float * vc2d); */ - public static void defineSlice(java.nio.FloatBuffer[] vc3d, java.nio.FloatBuffer[] param3d, int mnx, int nx, int ny, int nz, float param, int sense, java.nio.FloatBuffer vc2d) - { - int[] vc3d_byte_offset_array = new int[vc3d.length]; - if (vc3d != null) { - for (int _ctr = 0; _ctr < vc3d.length; _ctr++) { - if (!BufferFactory.isDirect(vc3d[_ctr])) { - throw new RuntimeException("Element " + _ctr + " of argument \"vc3d\" was not a direct buffer"); - } - vc3d_byte_offset_array[_ctr] = BufferFactory.getDirectBufferByteOffset(vc3d[_ctr]); - } - } - int[] param3d_byte_offset_array = new int[param3d.length]; - if (param3d != null) { - for (int _ctr = 0; _ctr < param3d.length; _ctr++) { - if (!BufferFactory.isDirect(param3d[_ctr])) { - throw new RuntimeException("Element " + _ctr + " of argument \"param3d\" was not a direct buffer"); - } - param3d_byte_offset_array[_ctr] = BufferFactory.getDirectBufferByteOffset(param3d[_ctr]); - } - } - boolean _direct = BufferFactory.isDirect(vc2d); - if (_direct) { - defineSlice0(vc3d, vc3d_byte_offset_array, param3d, param3d_byte_offset_array, mnx, nx, ny, nz, param, sense, vc2d, BufferFactory.getDirectBufferByteOffset(vc2d)); - } else { - defineSlice1(vc3d, vc3d_byte_offset_array, param3d, param3d_byte_offset_array, mnx, nx, ny, nz, param, sense, BufferFactory.getArray(vc2d), BufferFactory.getIndirectBufferByteOffset(vc2d)); - } - } - - /** Entry point to C language function:
void defineSlice(const float * * vc3d, const float * * param3d, int mnx, int nx, int ny, int nz, float param, int sense, float * vc2d); */ - private static native void defineSlice0(Object[] vc3d, int[] vc3d_byte_offset_array, Object[] param3d, int[] param3d_byte_offset_array, int mnx, int nx, int ny, int nz, float param, int sense, Object vc2d, int vc2d_byte_offset); - - /** Entry point to C language function:
void defineSlice(const float * * vc3d, const float * * param3d, int mnx, int nx, int ny, int nz, float param, int sense, float * vc2d); */ - private static native void defineSlice1(Object[] vc3d, int[] vc3d_byte_offset_array, Object[] param3d, int[] param3d_byte_offset_array, int mnx, int nx, int ny, int nz, float param, int sense, Object vc2d, int vc2d_byte_offset); - - /** Interface to C language function:
void defineSlice(const float * * vc3d, const float * * param3d, int mnx, int nx, int ny, int nz, float param, int sense, float * vc2d); */ - public static void defineSlice(java.nio.FloatBuffer[] vc3d, java.nio.FloatBuffer[] param3d, int mnx, int nx, int ny, int nz, float param, int sense, float[] vc2d, int vc2d_offset) - { - int[] vc3d_byte_offset_array = new int[vc3d.length]; - if (vc3d != null) { - for (int _ctr = 0; _ctr < vc3d.length; _ctr++) { - if (!BufferFactory.isDirect(vc3d[_ctr])) { - throw new RuntimeException("Element " + _ctr + " of argument \"vc3d\" was not a direct buffer"); - } - vc3d_byte_offset_array[_ctr] = BufferFactory.getDirectBufferByteOffset(vc3d[_ctr]); - } - } - int[] param3d_byte_offset_array = new int[param3d.length]; - if (param3d != null) { - for (int _ctr = 0; _ctr < param3d.length; _ctr++) { - if (!BufferFactory.isDirect(param3d[_ctr])) { - throw new RuntimeException("Element " + _ctr + " of argument \"param3d\" was not a direct buffer"); - } - param3d_byte_offset_array[_ctr] = BufferFactory.getDirectBufferByteOffset(param3d[_ctr]); - } - } - if(vc2d != null && vc2d.length <= vc2d_offset) - throw new RuntimeException("array offset argument \"vc2d_offset\" (" + vc2d_offset + ") equals or exceeds array length (" + vc2d.length + ")"); - defineSlice1(vc3d, vc3d_byte_offset_array, param3d, param3d_byte_offset_array, mnx, nx, ny, nz, param, sense, vc2d, BufferFactory.SIZEOF_FLOAT * vc2d_offset); - - } - - /** Interface to C language function:
void defineSlices(float * vc3d, int senseA, float * param3d, int senseB, int nx, int ny, int nz, float * paramC, int nc, float * vcC); */ - public static void defineSlices(java.nio.FloatBuffer vc3d, int senseA, java.nio.FloatBuffer param3d, int senseB, int nx, int ny, int nz, java.nio.FloatBuffer paramC, int nc, java.nio.FloatBuffer vcC) - { - boolean _direct = BufferFactory.isDirect(vc3d); - if (param3d != null && _direct != BufferFactory.isDirect(param3d)) - throw new RuntimeException("Argument \"param3d\" : Buffers passed to this method must all be either direct or indirect"); - if (paramC != null && _direct != BufferFactory.isDirect(paramC)) - throw new RuntimeException("Argument \"paramC\" : Buffers passed to this method must all be either direct or indirect"); - if (vcC != null && _direct != BufferFactory.isDirect(vcC)) - throw new RuntimeException("Argument \"vcC\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - defineSlices0(vc3d, BufferFactory.getDirectBufferByteOffset(vc3d), senseA, param3d, BufferFactory.getDirectBufferByteOffset(param3d), senseB, nx, ny, nz, paramC, BufferFactory.getDirectBufferByteOffset(paramC), nc, vcC, BufferFactory.getDirectBufferByteOffset(vcC)); - } else { - defineSlices1(BufferFactory.getArray(vc3d), BufferFactory.getIndirectBufferByteOffset(vc3d), senseA, BufferFactory.getArray(param3d), BufferFactory.getIndirectBufferByteOffset(param3d), senseB, nx, ny, nz, BufferFactory.getArray(paramC), BufferFactory.getIndirectBufferByteOffset(paramC), nc, BufferFactory.getArray(vcC), BufferFactory.getIndirectBufferByteOffset(vcC)); - } - } - - /** Entry point to C language function:
void defineSlices(float * vc3d, int senseA, float * param3d, int senseB, int nx, int ny, int nz, float * paramC, int nc, float * vcC); */ - private static native void defineSlices0(Object vc3d, int vc3d_byte_offset, int senseA, Object param3d, int param3d_byte_offset, int senseB, int nx, int ny, int nz, Object paramC, int paramC_byte_offset, int nc, Object vcC, int vcC_byte_offset); - - /** Entry point to C language function:
void defineSlices(float * vc3d, int senseA, float * param3d, int senseB, int nx, int ny, int nz, float * paramC, int nc, float * vcC); */ - private static native void defineSlices1(Object vc3d, int vc3d_byte_offset, int senseA, Object param3d, int param3d_byte_offset, int senseB, int nx, int ny, int nz, Object paramC, int paramC_byte_offset, int nc, Object vcC, int vcC_byte_offset); - - /** Interface to C language function:
void defineSlices(float * vc3d, int senseA, float * param3d, int senseB, int nx, int ny, int nz, float * paramC, int nc, float * vcC); */ - public static void defineSlices(float[] vc3d, int vc3d_offset, int senseA, float[] param3d, int param3d_offset, int senseB, int nx, int ny, int nz, float[] paramC, int paramC_offset, int nc, float[] vcC, int vcC_offset) - { - if(vc3d != null && vc3d.length <= vc3d_offset) - throw new RuntimeException("array offset argument \"vc3d_offset\" (" + vc3d_offset + ") equals or exceeds array length (" + vc3d.length + ")"); - if(param3d != null && param3d.length <= param3d_offset) - throw new RuntimeException("array offset argument \"param3d_offset\" (" + param3d_offset + ") equals or exceeds array length (" + param3d.length + ")"); - if(paramC != null && paramC.length <= paramC_offset) - throw new RuntimeException("array offset argument \"paramC_offset\" (" + paramC_offset + ") equals or exceeds array length (" + paramC.length + ")"); - if(vcC != null && vcC.length <= vcC_offset) - throw new RuntimeException("array offset argument \"vcC_offset\" (" + vcC_offset + ") equals or exceeds array length (" + vcC.length + ")"); - defineSlices1(vc3d, BufferFactory.SIZEOF_FLOAT * vc3d_offset, senseA, param3d, BufferFactory.SIZEOF_FLOAT * param3d_offset, senseB, nx, ny, nz, paramC, BufferFactory.SIZEOF_FLOAT * paramC_offset, nc, vcC, BufferFactory.SIZEOF_FLOAT * vcC_offset); - - } - - /** Interface to C language function:
void deftrk(float * tcb, float * pcb, float * thdpar, float * eptpar); */ - public static void deftrk(java.nio.FloatBuffer tcb, java.nio.FloatBuffer pcb, java.nio.FloatBuffer thdpar, java.nio.FloatBuffer eptpar) - { - boolean _direct = BufferFactory.isDirect(tcb); - if (pcb != null && _direct != BufferFactory.isDirect(pcb)) - throw new RuntimeException("Argument \"pcb\" : Buffers passed to this method must all be either direct or indirect"); - if (thdpar != null && _direct != BufferFactory.isDirect(thdpar)) - throw new RuntimeException("Argument \"thdpar\" : Buffers passed to this method must all be either direct or indirect"); - if (eptpar != null && _direct != BufferFactory.isDirect(eptpar)) - throw new RuntimeException("Argument \"eptpar\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - deftrk0(tcb, BufferFactory.getDirectBufferByteOffset(tcb), pcb, BufferFactory.getDirectBufferByteOffset(pcb), thdpar, BufferFactory.getDirectBufferByteOffset(thdpar), eptpar, BufferFactory.getDirectBufferByteOffset(eptpar)); - } else { - deftrk1(BufferFactory.getArray(tcb), BufferFactory.getIndirectBufferByteOffset(tcb), BufferFactory.getArray(pcb), BufferFactory.getIndirectBufferByteOffset(pcb), BufferFactory.getArray(thdpar), BufferFactory.getIndirectBufferByteOffset(thdpar), BufferFactory.getArray(eptpar), BufferFactory.getIndirectBufferByteOffset(eptpar)); - } - } - - /** Entry point to C language function:
void deftrk(float * tcb, float * pcb, float * thdpar, float * eptpar); */ - private static native void deftrk0(Object tcb, int tcb_byte_offset, Object pcb, int pcb_byte_offset, Object thdpar, int thdpar_byte_offset, Object eptpar, int eptpar_byte_offset); - - /** Entry point to C language function:
void deftrk(float * tcb, float * pcb, float * thdpar, float * eptpar); */ - private static native void deftrk1(Object tcb, int tcb_byte_offset, Object pcb, int pcb_byte_offset, Object thdpar, int thdpar_byte_offset, Object eptpar, int eptpar_byte_offset); - - /** Interface to C language function:
void deftrk(float * tcb, float * pcb, float * thdpar, float * eptpar); */ - public static void deftrk(float[] tcb, int tcb_offset, float[] pcb, int pcb_offset, float[] thdpar, int thdpar_offset, float[] eptpar, int eptpar_offset) - { - if(tcb != null && tcb.length <= tcb_offset) - throw new RuntimeException("array offset argument \"tcb_offset\" (" + tcb_offset + ") equals or exceeds array length (" + tcb.length + ")"); - if(pcb != null && pcb.length <= pcb_offset) - throw new RuntimeException("array offset argument \"pcb_offset\" (" + pcb_offset + ") equals or exceeds array length (" + pcb.length + ")"); - if(thdpar != null && thdpar.length <= thdpar_offset) - throw new RuntimeException("array offset argument \"thdpar_offset\" (" + thdpar_offset + ") equals or exceeds array length (" + thdpar.length + ")"); - if(eptpar != null && eptpar.length <= eptpar_offset) - throw new RuntimeException("array offset argument \"eptpar_offset\" (" + eptpar_offset + ") equals or exceeds array length (" + eptpar.length + ")"); - deftrk1(tcb, BufferFactory.SIZEOF_FLOAT * tcb_offset, pcb, BufferFactory.SIZEOF_FLOAT * pcb_offset, thdpar, BufferFactory.SIZEOF_FLOAT * thdpar_offset, eptpar, BufferFactory.SIZEOF_FLOAT * eptpar_offset); - - } - - /** Interface to C language function:
void density(float * P, float * TVIR, int * NLVLS, float * RHO); */ - public static void density(java.nio.FloatBuffer P, java.nio.FloatBuffer TVIR, java.nio.IntBuffer NLVLS, java.nio.FloatBuffer RHO) - { - boolean _direct = BufferFactory.isDirect(P); - if (TVIR != null && _direct != BufferFactory.isDirect(TVIR)) - throw new RuntimeException("Argument \"TVIR\" : Buffers passed to this method must all be either direct or indirect"); - if (NLVLS != null && _direct != BufferFactory.isDirect(NLVLS)) - throw new RuntimeException("Argument \"NLVLS\" : Buffers passed to this method must all be either direct or indirect"); - if (RHO != null && _direct != BufferFactory.isDirect(RHO)) - throw new RuntimeException("Argument \"RHO\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - density0(P, BufferFactory.getDirectBufferByteOffset(P), TVIR, BufferFactory.getDirectBufferByteOffset(TVIR), NLVLS, BufferFactory.getDirectBufferByteOffset(NLVLS), RHO, BufferFactory.getDirectBufferByteOffset(RHO)); - } else { - density1(BufferFactory.getArray(P), BufferFactory.getIndirectBufferByteOffset(P), BufferFactory.getArray(TVIR), BufferFactory.getIndirectBufferByteOffset(TVIR), BufferFactory.getArray(NLVLS), BufferFactory.getIndirectBufferByteOffset(NLVLS), BufferFactory.getArray(RHO), BufferFactory.getIndirectBufferByteOffset(RHO)); - } - } - - /** Entry point to C language function:
void density(float * P, float * TVIR, int * NLVLS, float * RHO); */ - private static native void density0(Object P, int P_byte_offset, Object TVIR, int TVIR_byte_offset, Object NLVLS, int NLVLS_byte_offset, Object RHO, int RHO_byte_offset); - - /** Entry point to C language function:
void density(float * P, float * TVIR, int * NLVLS, float * RHO); */ - private static native void density1(Object P, int P_byte_offset, Object TVIR, int TVIR_byte_offset, Object NLVLS, int NLVLS_byte_offset, Object RHO, int RHO_byte_offset); - - /** Interface to C language function:
void density(float * P, float * TVIR, int * NLVLS, float * RHO); */ - public static void density(float[] P, int P_offset, float[] TVIR, int TVIR_offset, int[] NLVLS, int NLVLS_offset, float[] RHO, int RHO_offset) - { - if(P != null && P.length <= P_offset) - throw new RuntimeException("array offset argument \"P_offset\" (" + P_offset + ") equals or exceeds array length (" + P.length + ")"); - if(TVIR != null && TVIR.length <= TVIR_offset) - throw new RuntimeException("array offset argument \"TVIR_offset\" (" + TVIR_offset + ") equals or exceeds array length (" + TVIR.length + ")"); - if(NLVLS != null && NLVLS.length <= NLVLS_offset) - throw new RuntimeException("array offset argument \"NLVLS_offset\" (" + NLVLS_offset + ") equals or exceeds array length (" + NLVLS.length + ")"); - if(RHO != null && RHO.length <= RHO_offset) - throw new RuntimeException("array offset argument \"RHO_offset\" (" + RHO_offset + ") equals or exceeds array length (" + RHO.length + ")"); - density1(P, BufferFactory.SIZEOF_FLOAT * P_offset, TVIR, BufferFactory.SIZEOF_FLOAT * TVIR_offset, NLVLS, BufferFactory.SIZEOF_INT * NLVLS_offset, RHO, BufferFactory.SIZEOF_FLOAT * RHO_offset); - - } - - /** Interface to C language function:
void derivative(float * a1, float * a2, float * b1, float * b2, float * result, int * mni, int * ni, int * nj); */ - public static void derivative(java.nio.FloatBuffer a1, java.nio.FloatBuffer a2, java.nio.FloatBuffer b1, java.nio.FloatBuffer b2, java.nio.FloatBuffer result, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj) - { - boolean _direct = BufferFactory.isDirect(a1); - if (a2 != null && _direct != BufferFactory.isDirect(a2)) - throw new RuntimeException("Argument \"a2\" : Buffers passed to this method must all be either direct or indirect"); - if (b1 != null && _direct != BufferFactory.isDirect(b1)) - throw new RuntimeException("Argument \"b1\" : Buffers passed to this method must all be either direct or indirect"); - if (b2 != null && _direct != BufferFactory.isDirect(b2)) - throw new RuntimeException("Argument \"b2\" : Buffers passed to this method must all be either direct or indirect"); - if (result != null && _direct != BufferFactory.isDirect(result)) - throw new RuntimeException("Argument \"result\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - derivative0(a1, BufferFactory.getDirectBufferByteOffset(a1), a2, BufferFactory.getDirectBufferByteOffset(a2), b1, BufferFactory.getDirectBufferByteOffset(b1), b2, BufferFactory.getDirectBufferByteOffset(b2), result, BufferFactory.getDirectBufferByteOffset(result), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj)); - } else { - derivative1(BufferFactory.getArray(a1), BufferFactory.getIndirectBufferByteOffset(a1), BufferFactory.getArray(a2), BufferFactory.getIndirectBufferByteOffset(a2), BufferFactory.getArray(b1), BufferFactory.getIndirectBufferByteOffset(b1), BufferFactory.getArray(b2), BufferFactory.getIndirectBufferByteOffset(b2), BufferFactory.getArray(result), BufferFactory.getIndirectBufferByteOffset(result), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj)); - } - } - - /** Entry point to C language function:
void derivative(float * a1, float * a2, float * b1, float * b2, float * result, int * mni, int * ni, int * nj); */ - private static native void derivative0(Object a1, int a1_byte_offset, Object a2, int a2_byte_offset, Object b1, int b1_byte_offset, Object b2, int b2_byte_offset, Object result, int result_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset); - - /** Entry point to C language function:
void derivative(float * a1, float * a2, float * b1, float * b2, float * result, int * mni, int * ni, int * nj); */ - private static native void derivative1(Object a1, int a1_byte_offset, Object a2, int a2_byte_offset, Object b1, int b1_byte_offset, Object b2, int b2_byte_offset, Object result, int result_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset); - - /** Interface to C language function:
void derivative(float * a1, float * a2, float * b1, float * b2, float * result, int * mni, int * ni, int * nj); */ - public static void derivative(float[] a1, int a1_offset, float[] a2, int a2_offset, float[] b1, int b1_offset, float[] b2, int b2_offset, float[] result, int result_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset) - { - if(a1 != null && a1.length <= a1_offset) - throw new RuntimeException("array offset argument \"a1_offset\" (" + a1_offset + ") equals or exceeds array length (" + a1.length + ")"); - if(a2 != null && a2.length <= a2_offset) - throw new RuntimeException("array offset argument \"a2_offset\" (" + a2_offset + ") equals or exceeds array length (" + a2.length + ")"); - if(b1 != null && b1.length <= b1_offset) - throw new RuntimeException("array offset argument \"b1_offset\" (" + b1_offset + ") equals or exceeds array length (" + b1.length + ")"); - if(b2 != null && b2.length <= b2_offset) - throw new RuntimeException("array offset argument \"b2_offset\" (" + b2_offset + ") equals or exceeds array length (" + b2.length + ")"); - if(result != null && result.length <= result_offset) - throw new RuntimeException("array offset argument \"result_offset\" (" + result_offset + ") equals or exceeds array length (" + result.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - derivative1(a1, BufferFactory.SIZEOF_FLOAT * a1_offset, a2, BufferFactory.SIZEOF_FLOAT * a2_offset, b1, BufferFactory.SIZEOF_FLOAT * b1_offset, b2, BufferFactory.SIZEOF_FLOAT * b2_offset, result, BufferFactory.SIZEOF_FLOAT * result_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset); - - } - - /** Interface to C language function:
void dist_filter(float * a, float * npts, float * result, int * mni, int * ni, int * nj); */ - public static void dist_filter(java.nio.FloatBuffer a, java.nio.FloatBuffer npts, java.nio.FloatBuffer result, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj) - { - boolean _direct = BufferFactory.isDirect(a); - if (npts != null && _direct != BufferFactory.isDirect(npts)) - throw new RuntimeException("Argument \"npts\" : Buffers passed to this method must all be either direct or indirect"); - if (result != null && _direct != BufferFactory.isDirect(result)) - throw new RuntimeException("Argument \"result\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - dist_filter0(a, BufferFactory.getDirectBufferByteOffset(a), npts, BufferFactory.getDirectBufferByteOffset(npts), result, BufferFactory.getDirectBufferByteOffset(result), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj)); - } else { - dist_filter1(BufferFactory.getArray(a), BufferFactory.getIndirectBufferByteOffset(a), BufferFactory.getArray(npts), BufferFactory.getIndirectBufferByteOffset(npts), BufferFactory.getArray(result), BufferFactory.getIndirectBufferByteOffset(result), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj)); - } - } - - /** Entry point to C language function:
void dist_filter(float * a, float * npts, float * result, int * mni, int * ni, int * nj); */ - private static native void dist_filter0(Object a, int a_byte_offset, Object npts, int npts_byte_offset, Object result, int result_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset); - - /** Entry point to C language function:
void dist_filter(float * a, float * npts, float * result, int * mni, int * ni, int * nj); */ - private static native void dist_filter1(Object a, int a_byte_offset, Object npts, int npts_byte_offset, Object result, int result_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset); - - /** Interface to C language function:
void dist_filter(float * a, float * npts, float * result, int * mni, int * ni, int * nj); */ - public static void dist_filter(float[] a, int a_offset, float[] npts, int npts_offset, float[] result, int result_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset) - { - if(a != null && a.length <= a_offset) - throw new RuntimeException("array offset argument \"a_offset\" (" + a_offset + ") equals or exceeds array length (" + a.length + ")"); - if(npts != null && npts.length <= npts_offset) - throw new RuntimeException("array offset argument \"npts_offset\" (" + npts_offset + ") equals or exceeds array length (" + npts.length + ")"); - if(result != null && result.length <= result_offset) - throw new RuntimeException("array offset argument \"result_offset\" (" + result_offset + ") equals or exceeds array length (" + result.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - dist_filter1(a, BufferFactory.SIZEOF_FLOAT * a_offset, npts, BufferFactory.SIZEOF_FLOAT * npts_offset, result, BufferFactory.SIZEOF_FLOAT * result_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset); - - } - - /** Interface to C language function:
void div_aray(float * a, float * b, float * result, int * mni, int * ni, int * nj); */ - public static void div_aray(java.nio.FloatBuffer a, java.nio.FloatBuffer b, java.nio.FloatBuffer result, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj) - { - boolean _direct = BufferFactory.isDirect(a); - if (b != null && _direct != BufferFactory.isDirect(b)) - throw new RuntimeException("Argument \"b\" : Buffers passed to this method must all be either direct or indirect"); - if (result != null && _direct != BufferFactory.isDirect(result)) - throw new RuntimeException("Argument \"result\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - div_aray0(a, BufferFactory.getDirectBufferByteOffset(a), b, BufferFactory.getDirectBufferByteOffset(b), result, BufferFactory.getDirectBufferByteOffset(result), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj)); - } else { - div_aray1(BufferFactory.getArray(a), BufferFactory.getIndirectBufferByteOffset(a), BufferFactory.getArray(b), BufferFactory.getIndirectBufferByteOffset(b), BufferFactory.getArray(result), BufferFactory.getIndirectBufferByteOffset(result), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj)); - } - } - - /** Entry point to C language function:
void div_aray(float * a, float * b, float * result, int * mni, int * ni, int * nj); */ - private static native void div_aray0(Object a, int a_byte_offset, Object b, int b_byte_offset, Object result, int result_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset); - - /** Entry point to C language function:
void div_aray(float * a, float * b, float * result, int * mni, int * ni, int * nj); */ - private static native void div_aray1(Object a, int a_byte_offset, Object b, int b_byte_offset, Object result, int result_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset); - - /** Interface to C language function:
void div_aray(float * a, float * b, float * result, int * mni, int * ni, int * nj); */ - public static void div_aray(float[] a, int a_offset, float[] b, int b_offset, float[] result, int result_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset) - { - if(a != null && a.length <= a_offset) - throw new RuntimeException("array offset argument \"a_offset\" (" + a_offset + ") equals or exceeds array length (" + a.length + ")"); - if(b != null && b.length <= b_offset) - throw new RuntimeException("array offset argument \"b_offset\" (" + b_offset + ") equals or exceeds array length (" + b.length + ")"); - if(result != null && result.length <= result_offset) - throw new RuntimeException("array offset argument \"result_offset\" (" + result_offset + ") equals or exceeds array length (" + result.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - div_aray1(a, BufferFactory.SIZEOF_FLOAT * a_offset, b, BufferFactory.SIZEOF_FLOAT * b_offset, result, BufferFactory.SIZEOF_FLOAT * result_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset); - - } - - /** Interface to C language function:
float dmixr(float * temp, float * pres, int * iw); */ - public static float dmixr(java.nio.FloatBuffer temp, java.nio.FloatBuffer pres, java.nio.IntBuffer iw) - { - boolean _direct = BufferFactory.isDirect(temp); - if (pres != null && _direct != BufferFactory.isDirect(pres)) - throw new RuntimeException("Argument \"pres\" : Buffers passed to this method must all be either direct or indirect"); - if (iw != null && _direct != BufferFactory.isDirect(iw)) - throw new RuntimeException("Argument \"iw\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - return dmixr0(temp, BufferFactory.getDirectBufferByteOffset(temp), pres, BufferFactory.getDirectBufferByteOffset(pres), iw, BufferFactory.getDirectBufferByteOffset(iw)); - } else { - return dmixr1(BufferFactory.getArray(temp), BufferFactory.getIndirectBufferByteOffset(temp), BufferFactory.getArray(pres), BufferFactory.getIndirectBufferByteOffset(pres), BufferFactory.getArray(iw), BufferFactory.getIndirectBufferByteOffset(iw)); - } - } - - /** Entry point to C language function:
float dmixr(float * temp, float * pres, int * iw); */ - private static native float dmixr0(Object temp, int temp_byte_offset, Object pres, int pres_byte_offset, Object iw, int iw_byte_offset); - - /** Entry point to C language function:
float dmixr(float * temp, float * pres, int * iw); */ - private static native float dmixr1(Object temp, int temp_byte_offset, Object pres, int pres_byte_offset, Object iw, int iw_byte_offset); - - /** Interface to C language function:
float dmixr(float * temp, float * pres, int * iw); */ - public static float dmixr(float[] temp, int temp_offset, float[] pres, int pres_offset, int[] iw, int iw_offset) - { - if(temp != null && temp.length <= temp_offset) - throw new RuntimeException("array offset argument \"temp_offset\" (" + temp_offset + ") equals or exceeds array length (" + temp.length + ")"); - if(pres != null && pres.length <= pres_offset) - throw new RuntimeException("array offset argument \"pres_offset\" (" + pres_offset + ") equals or exceeds array length (" + pres.length + ")"); - if(iw != null && iw.length <= iw_offset) - throw new RuntimeException("array offset argument \"iw_offset\" (" + iw_offset + ") equals or exceeds array length (" + iw.length + ")"); - return dmixr1(temp, BufferFactory.SIZEOF_FLOAT * temp_offset, pres, BufferFactory.SIZEOF_FLOAT * pres_offset, iw, BufferFactory.SIZEOF_INT * iw_offset); - - } - - /** Interface to C language function:
void dotvectors(float * aX, float * aY, float * bX, float * bY, float * result, int * mni, int * ni, int * nj); */ - public static void dotvectors(java.nio.FloatBuffer aX, java.nio.FloatBuffer aY, java.nio.FloatBuffer bX, java.nio.FloatBuffer bY, java.nio.FloatBuffer result, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj) - { - boolean _direct = BufferFactory.isDirect(aX); - if (aY != null && _direct != BufferFactory.isDirect(aY)) - throw new RuntimeException("Argument \"aY\" : Buffers passed to this method must all be either direct or indirect"); - if (bX != null && _direct != BufferFactory.isDirect(bX)) - throw new RuntimeException("Argument \"bX\" : Buffers passed to this method must all be either direct or indirect"); - if (bY != null && _direct != BufferFactory.isDirect(bY)) - throw new RuntimeException("Argument \"bY\" : Buffers passed to this method must all be either direct or indirect"); - if (result != null && _direct != BufferFactory.isDirect(result)) - throw new RuntimeException("Argument \"result\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - dotvectors0(aX, BufferFactory.getDirectBufferByteOffset(aX), aY, BufferFactory.getDirectBufferByteOffset(aY), bX, BufferFactory.getDirectBufferByteOffset(bX), bY, BufferFactory.getDirectBufferByteOffset(bY), result, BufferFactory.getDirectBufferByteOffset(result), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj)); - } else { - dotvectors1(BufferFactory.getArray(aX), BufferFactory.getIndirectBufferByteOffset(aX), BufferFactory.getArray(aY), BufferFactory.getIndirectBufferByteOffset(aY), BufferFactory.getArray(bX), BufferFactory.getIndirectBufferByteOffset(bX), BufferFactory.getArray(bY), BufferFactory.getIndirectBufferByteOffset(bY), BufferFactory.getArray(result), BufferFactory.getIndirectBufferByteOffset(result), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj)); - } - } - - /** Entry point to C language function:
void dotvectors(float * aX, float * aY, float * bX, float * bY, float * result, int * mni, int * ni, int * nj); */ - private static native void dotvectors0(Object aX, int aX_byte_offset, Object aY, int aY_byte_offset, Object bX, int bX_byte_offset, Object bY, int bY_byte_offset, Object result, int result_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset); - - /** Entry point to C language function:
void dotvectors(float * aX, float * aY, float * bX, float * bY, float * result, int * mni, int * ni, int * nj); */ - private static native void dotvectors1(Object aX, int aX_byte_offset, Object aY, int aY_byte_offset, Object bX, int bX_byte_offset, Object bY, int bY_byte_offset, Object result, int result_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset); - - /** Interface to C language function:
void dotvectors(float * aX, float * aY, float * bX, float * bY, float * result, int * mni, int * ni, int * nj); */ - public static void dotvectors(float[] aX, int aX_offset, float[] aY, int aY_offset, float[] bX, int bX_offset, float[] bY, int bY_offset, float[] result, int result_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset) - { - if(aX != null && aX.length <= aX_offset) - throw new RuntimeException("array offset argument \"aX_offset\" (" + aX_offset + ") equals or exceeds array length (" + aX.length + ")"); - if(aY != null && aY.length <= aY_offset) - throw new RuntimeException("array offset argument \"aY_offset\" (" + aY_offset + ") equals or exceeds array length (" + aY.length + ")"); - if(bX != null && bX.length <= bX_offset) - throw new RuntimeException("array offset argument \"bX_offset\" (" + bX_offset + ") equals or exceeds array length (" + bX.length + ")"); - if(bY != null && bY.length <= bY_offset) - throw new RuntimeException("array offset argument \"bY_offset\" (" + bY_offset + ") equals or exceeds array length (" + bY.length + ")"); - if(result != null && result.length <= result_offset) - throw new RuntimeException("array offset argument \"result_offset\" (" + result_offset + ") equals or exceeds array length (" + result.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - dotvectors1(aX, BufferFactory.SIZEOF_FLOAT * aX_offset, aY, BufferFactory.SIZEOF_FLOAT * aY_offset, bX, BufferFactory.SIZEOF_FLOAT * bX_offset, bY, BufferFactory.SIZEOF_FLOAT * bY_offset, result, BufferFactory.SIZEOF_FLOAT * result_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset); - - } - - /** Interface to C language function:
float dzdlnp(float * , float * , float * ); */ - public static float dzdlnp(java.nio.FloatBuffer arg0, java.nio.FloatBuffer arg1, java.nio.FloatBuffer arg2) - { - boolean _direct = BufferFactory.isDirect(arg0); - if (arg1 != null && _direct != BufferFactory.isDirect(arg1)) - throw new RuntimeException("Argument \"arg1\" : Buffers passed to this method must all be either direct or indirect"); - if (arg2 != null && _direct != BufferFactory.isDirect(arg2)) - throw new RuntimeException("Argument \"arg2\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - return dzdlnp0(arg0, BufferFactory.getDirectBufferByteOffset(arg0), arg1, BufferFactory.getDirectBufferByteOffset(arg1), arg2, BufferFactory.getDirectBufferByteOffset(arg2)); - } else { - return dzdlnp1(BufferFactory.getArray(arg0), BufferFactory.getIndirectBufferByteOffset(arg0), BufferFactory.getArray(arg1), BufferFactory.getIndirectBufferByteOffset(arg1), BufferFactory.getArray(arg2), BufferFactory.getIndirectBufferByteOffset(arg2)); - } - } - - /** Entry point to C language function:
float dzdlnp(float * , float * , float * ); */ - private static native float dzdlnp0(Object arg0, int arg0_byte_offset, Object arg1, int arg1_byte_offset, Object arg2, int arg2_byte_offset); - - /** Entry point to C language function:
float dzdlnp(float * , float * , float * ); */ - private static native float dzdlnp1(Object arg0, int arg0_byte_offset, Object arg1, int arg1_byte_offset, Object arg2, int arg2_byte_offset); - - /** Interface to C language function:
float dzdlnp(float * , float * , float * ); */ - public static float dzdlnp(float[] arg0, int arg0_offset, float[] arg1, int arg1_offset, float[] arg2, int arg2_offset) - { - if(arg0 != null && arg0.length <= arg0_offset) - throw new RuntimeException("array offset argument \"arg0_offset\" (" + arg0_offset + ") equals or exceeds array length (" + arg0.length + ")"); - if(arg1 != null && arg1.length <= arg1_offset) - throw new RuntimeException("array offset argument \"arg1_offset\" (" + arg1_offset + ") equals or exceeds array length (" + arg1.length + ")"); - if(arg2 != null && arg2.length <= arg2_offset) - throw new RuntimeException("array offset argument \"arg2_offset\" (" + arg2_offset + ") equals or exceeds array length (" + arg2.length + ")"); - return dzdlnp1(arg0, BufferFactory.SIZEOF_FLOAT * arg0_offset, arg1, BufferFactory.SIZEOF_FLOAT * arg1_offset, arg2, BufferFactory.SIZEOF_FLOAT * arg2_offset); - - } - - /** Interface to C language function:
float ept(float * t, float * td, float * p); */ - public static float ept(java.nio.FloatBuffer t, java.nio.FloatBuffer td, java.nio.FloatBuffer p) - { - boolean _direct = BufferFactory.isDirect(t); - if (td != null && _direct != BufferFactory.isDirect(td)) - throw new RuntimeException("Argument \"td\" : Buffers passed to this method must all be either direct or indirect"); - if (p != null && _direct != BufferFactory.isDirect(p)) - throw new RuntimeException("Argument \"p\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - return ept0(t, BufferFactory.getDirectBufferByteOffset(t), td, BufferFactory.getDirectBufferByteOffset(td), p, BufferFactory.getDirectBufferByteOffset(p)); - } else { - return ept1(BufferFactory.getArray(t), BufferFactory.getIndirectBufferByteOffset(t), BufferFactory.getArray(td), BufferFactory.getIndirectBufferByteOffset(td), BufferFactory.getArray(p), BufferFactory.getIndirectBufferByteOffset(p)); - } - } - - /** Entry point to C language function:
float ept(float * t, float * td, float * p); */ - private static native float ept0(Object t, int t_byte_offset, Object td, int td_byte_offset, Object p, int p_byte_offset); - - /** Entry point to C language function:
float ept(float * t, float * td, float * p); */ - private static native float ept1(Object t, int t_byte_offset, Object td, int td_byte_offset, Object p, int p_byte_offset); - - /** Interface to C language function:
float ept(float * t, float * td, float * p); */ - public static float ept(float[] t, int t_offset, float[] td, int td_offset, float[] p, int p_offset) - { - if(t != null && t.length <= t_offset) - throw new RuntimeException("array offset argument \"t_offset\" (" + t_offset + ") equals or exceeds array length (" + t.length + ")"); - if(td != null && td.length <= td_offset) - throw new RuntimeException("array offset argument \"td_offset\" (" + td_offset + ") equals or exceeds array length (" + td.length + ")"); - if(p != null && p.length <= p_offset) - throw new RuntimeException("array offset argument \"p_offset\" (" + p_offset + ") equals or exceeds array length (" + p.length + ")"); - return ept1(t, BufferFactory.SIZEOF_FLOAT * t_offset, td, BufferFactory.SIZEOF_FLOAT * td_offset, p, BufferFactory.SIZEOF_FLOAT * p_offset); - - } - - /** Interface to C language function:
void eqlev(float * P, float * HT, float * TP, float * TE, float * PLFC, float * EPTPAR, int * NPAR, float * PEQLEV, float * HEQLEV, float * TEQLEV); */ - public static void eqlev(java.nio.FloatBuffer P, java.nio.FloatBuffer HT, java.nio.FloatBuffer TP, java.nio.FloatBuffer TE, java.nio.FloatBuffer PLFC, java.nio.FloatBuffer EPTPAR, java.nio.IntBuffer NPAR, java.nio.FloatBuffer PEQLEV, java.nio.FloatBuffer HEQLEV, java.nio.FloatBuffer TEQLEV) - { - boolean _direct = BufferFactory.isDirect(P); - if (HT != null && _direct != BufferFactory.isDirect(HT)) - throw new RuntimeException("Argument \"HT\" : Buffers passed to this method must all be either direct or indirect"); - if (TP != null && _direct != BufferFactory.isDirect(TP)) - throw new RuntimeException("Argument \"TP\" : Buffers passed to this method must all be either direct or indirect"); - if (TE != null && _direct != BufferFactory.isDirect(TE)) - throw new RuntimeException("Argument \"TE\" : Buffers passed to this method must all be either direct or indirect"); - if (PLFC != null && _direct != BufferFactory.isDirect(PLFC)) - throw new RuntimeException("Argument \"PLFC\" : Buffers passed to this method must all be either direct or indirect"); - if (EPTPAR != null && _direct != BufferFactory.isDirect(EPTPAR)) - throw new RuntimeException("Argument \"EPTPAR\" : Buffers passed to this method must all be either direct or indirect"); - if (NPAR != null && _direct != BufferFactory.isDirect(NPAR)) - throw new RuntimeException("Argument \"NPAR\" : Buffers passed to this method must all be either direct or indirect"); - if (PEQLEV != null && _direct != BufferFactory.isDirect(PEQLEV)) - throw new RuntimeException("Argument \"PEQLEV\" : Buffers passed to this method must all be either direct or indirect"); - if (HEQLEV != null && _direct != BufferFactory.isDirect(HEQLEV)) - throw new RuntimeException("Argument \"HEQLEV\" : Buffers passed to this method must all be either direct or indirect"); - if (TEQLEV != null && _direct != BufferFactory.isDirect(TEQLEV)) - throw new RuntimeException("Argument \"TEQLEV\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - eqlev0(P, BufferFactory.getDirectBufferByteOffset(P), HT, BufferFactory.getDirectBufferByteOffset(HT), TP, BufferFactory.getDirectBufferByteOffset(TP), TE, BufferFactory.getDirectBufferByteOffset(TE), PLFC, BufferFactory.getDirectBufferByteOffset(PLFC), EPTPAR, BufferFactory.getDirectBufferByteOffset(EPTPAR), NPAR, BufferFactory.getDirectBufferByteOffset(NPAR), PEQLEV, BufferFactory.getDirectBufferByteOffset(PEQLEV), HEQLEV, BufferFactory.getDirectBufferByteOffset(HEQLEV), TEQLEV, BufferFactory.getDirectBufferByteOffset(TEQLEV)); - } else { - eqlev1(BufferFactory.getArray(P), BufferFactory.getIndirectBufferByteOffset(P), BufferFactory.getArray(HT), BufferFactory.getIndirectBufferByteOffset(HT), BufferFactory.getArray(TP), BufferFactory.getIndirectBufferByteOffset(TP), BufferFactory.getArray(TE), BufferFactory.getIndirectBufferByteOffset(TE), BufferFactory.getArray(PLFC), BufferFactory.getIndirectBufferByteOffset(PLFC), BufferFactory.getArray(EPTPAR), BufferFactory.getIndirectBufferByteOffset(EPTPAR), BufferFactory.getArray(NPAR), BufferFactory.getIndirectBufferByteOffset(NPAR), BufferFactory.getArray(PEQLEV), BufferFactory.getIndirectBufferByteOffset(PEQLEV), BufferFactory.getArray(HEQLEV), BufferFactory.getIndirectBufferByteOffset(HEQLEV), BufferFactory.getArray(TEQLEV), BufferFactory.getIndirectBufferByteOffset(TEQLEV)); - } - } - - /** Entry point to C language function:
void eqlev(float * P, float * HT, float * TP, float * TE, float * PLFC, float * EPTPAR, int * NPAR, float * PEQLEV, float * HEQLEV, float * TEQLEV); */ - private static native void eqlev0(Object P, int P_byte_offset, Object HT, int HT_byte_offset, Object TP, int TP_byte_offset, Object TE, int TE_byte_offset, Object PLFC, int PLFC_byte_offset, Object EPTPAR, int EPTPAR_byte_offset, Object NPAR, int NPAR_byte_offset, Object PEQLEV, int PEQLEV_byte_offset, Object HEQLEV, int HEQLEV_byte_offset, Object TEQLEV, int TEQLEV_byte_offset); - - /** Entry point to C language function:
void eqlev(float * P, float * HT, float * TP, float * TE, float * PLFC, float * EPTPAR, int * NPAR, float * PEQLEV, float * HEQLEV, float * TEQLEV); */ - private static native void eqlev1(Object P, int P_byte_offset, Object HT, int HT_byte_offset, Object TP, int TP_byte_offset, Object TE, int TE_byte_offset, Object PLFC, int PLFC_byte_offset, Object EPTPAR, int EPTPAR_byte_offset, Object NPAR, int NPAR_byte_offset, Object PEQLEV, int PEQLEV_byte_offset, Object HEQLEV, int HEQLEV_byte_offset, Object TEQLEV, int TEQLEV_byte_offset); - - /** Interface to C language function:
void eqlev(float * P, float * HT, float * TP, float * TE, float * PLFC, float * EPTPAR, int * NPAR, float * PEQLEV, float * HEQLEV, float * TEQLEV); */ - public static void eqlev(float[] P, int P_offset, float[] HT, int HT_offset, float[] TP, int TP_offset, float[] TE, int TE_offset, float[] PLFC, int PLFC_offset, float[] EPTPAR, int EPTPAR_offset, int[] NPAR, int NPAR_offset, float[] PEQLEV, int PEQLEV_offset, float[] HEQLEV, int HEQLEV_offset, float[] TEQLEV, int TEQLEV_offset) - { - if(P != null && P.length <= P_offset) - throw new RuntimeException("array offset argument \"P_offset\" (" + P_offset + ") equals or exceeds array length (" + P.length + ")"); - if(HT != null && HT.length <= HT_offset) - throw new RuntimeException("array offset argument \"HT_offset\" (" + HT_offset + ") equals or exceeds array length (" + HT.length + ")"); - if(TP != null && TP.length <= TP_offset) - throw new RuntimeException("array offset argument \"TP_offset\" (" + TP_offset + ") equals or exceeds array length (" + TP.length + ")"); - if(TE != null && TE.length <= TE_offset) - throw new RuntimeException("array offset argument \"TE_offset\" (" + TE_offset + ") equals or exceeds array length (" + TE.length + ")"); - if(PLFC != null && PLFC.length <= PLFC_offset) - throw new RuntimeException("array offset argument \"PLFC_offset\" (" + PLFC_offset + ") equals or exceeds array length (" + PLFC.length + ")"); - if(EPTPAR != null && EPTPAR.length <= EPTPAR_offset) - throw new RuntimeException("array offset argument \"EPTPAR_offset\" (" + EPTPAR_offset + ") equals or exceeds array length (" + EPTPAR.length + ")"); - if(NPAR != null && NPAR.length <= NPAR_offset) - throw new RuntimeException("array offset argument \"NPAR_offset\" (" + NPAR_offset + ") equals or exceeds array length (" + NPAR.length + ")"); - if(PEQLEV != null && PEQLEV.length <= PEQLEV_offset) - throw new RuntimeException("array offset argument \"PEQLEV_offset\" (" + PEQLEV_offset + ") equals or exceeds array length (" + PEQLEV.length + ")"); - if(HEQLEV != null && HEQLEV.length <= HEQLEV_offset) - throw new RuntimeException("array offset argument \"HEQLEV_offset\" (" + HEQLEV_offset + ") equals or exceeds array length (" + HEQLEV.length + ")"); - if(TEQLEV != null && TEQLEV.length <= TEQLEV_offset) - throw new RuntimeException("array offset argument \"TEQLEV_offset\" (" + TEQLEV_offset + ") equals or exceeds array length (" + TEQLEV.length + ")"); - eqlev1(P, BufferFactory.SIZEOF_FLOAT * P_offset, HT, BufferFactory.SIZEOF_FLOAT * HT_offset, TP, BufferFactory.SIZEOF_FLOAT * TP_offset, TE, BufferFactory.SIZEOF_FLOAT * TE_offset, PLFC, BufferFactory.SIZEOF_FLOAT * PLFC_offset, EPTPAR, BufferFactory.SIZEOF_FLOAT * EPTPAR_offset, NPAR, BufferFactory.SIZEOF_INT * NPAR_offset, PEQLEV, BufferFactory.SIZEOF_FLOAT * PEQLEV_offset, HEQLEV, BufferFactory.SIZEOF_FLOAT * HEQLEV_offset, TEQLEV, BufferFactory.SIZEOF_FLOAT * TEQLEV_offset); - - } - - /** Interface to C language function:
void eqp(float * DELTAP, float * P, float * HT, float * T, float * TD, int * N, float * PP, float * HTT, float * TT, float * TTD, int * NN); */ - public static void eqp(java.nio.FloatBuffer DELTAP, java.nio.FloatBuffer P, java.nio.FloatBuffer HT, java.nio.FloatBuffer T, java.nio.FloatBuffer TD, java.nio.IntBuffer N, java.nio.FloatBuffer PP, java.nio.FloatBuffer HTT, java.nio.FloatBuffer TT, java.nio.FloatBuffer TTD, java.nio.IntBuffer NN) - { - boolean _direct = BufferFactory.isDirect(DELTAP); - if (P != null && _direct != BufferFactory.isDirect(P)) - throw new RuntimeException("Argument \"P\" : Buffers passed to this method must all be either direct or indirect"); - if (HT != null && _direct != BufferFactory.isDirect(HT)) - throw new RuntimeException("Argument \"HT\" : Buffers passed to this method must all be either direct or indirect"); - if (T != null && _direct != BufferFactory.isDirect(T)) - throw new RuntimeException("Argument \"T\" : Buffers passed to this method must all be either direct or indirect"); - if (TD != null && _direct != BufferFactory.isDirect(TD)) - throw new RuntimeException("Argument \"TD\" : Buffers passed to this method must all be either direct or indirect"); - if (N != null && _direct != BufferFactory.isDirect(N)) - throw new RuntimeException("Argument \"N\" : Buffers passed to this method must all be either direct or indirect"); - if (PP != null && _direct != BufferFactory.isDirect(PP)) - throw new RuntimeException("Argument \"PP\" : Buffers passed to this method must all be either direct or indirect"); - if (HTT != null && _direct != BufferFactory.isDirect(HTT)) - throw new RuntimeException("Argument \"HTT\" : Buffers passed to this method must all be either direct or indirect"); - if (TT != null && _direct != BufferFactory.isDirect(TT)) - throw new RuntimeException("Argument \"TT\" : Buffers passed to this method must all be either direct or indirect"); - if (TTD != null && _direct != BufferFactory.isDirect(TTD)) - throw new RuntimeException("Argument \"TTD\" : Buffers passed to this method must all be either direct or indirect"); - if (NN != null && _direct != BufferFactory.isDirect(NN)) - throw new RuntimeException("Argument \"NN\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - eqp0(DELTAP, BufferFactory.getDirectBufferByteOffset(DELTAP), P, BufferFactory.getDirectBufferByteOffset(P), HT, BufferFactory.getDirectBufferByteOffset(HT), T, BufferFactory.getDirectBufferByteOffset(T), TD, BufferFactory.getDirectBufferByteOffset(TD), N, BufferFactory.getDirectBufferByteOffset(N), PP, BufferFactory.getDirectBufferByteOffset(PP), HTT, BufferFactory.getDirectBufferByteOffset(HTT), TT, BufferFactory.getDirectBufferByteOffset(TT), TTD, BufferFactory.getDirectBufferByteOffset(TTD), NN, BufferFactory.getDirectBufferByteOffset(NN)); - } else { - eqp1(BufferFactory.getArray(DELTAP), BufferFactory.getIndirectBufferByteOffset(DELTAP), BufferFactory.getArray(P), BufferFactory.getIndirectBufferByteOffset(P), BufferFactory.getArray(HT), BufferFactory.getIndirectBufferByteOffset(HT), BufferFactory.getArray(T), BufferFactory.getIndirectBufferByteOffset(T), BufferFactory.getArray(TD), BufferFactory.getIndirectBufferByteOffset(TD), BufferFactory.getArray(N), BufferFactory.getIndirectBufferByteOffset(N), BufferFactory.getArray(PP), BufferFactory.getIndirectBufferByteOffset(PP), BufferFactory.getArray(HTT), BufferFactory.getIndirectBufferByteOffset(HTT), BufferFactory.getArray(TT), BufferFactory.getIndirectBufferByteOffset(TT), BufferFactory.getArray(TTD), BufferFactory.getIndirectBufferByteOffset(TTD), BufferFactory.getArray(NN), BufferFactory.getIndirectBufferByteOffset(NN)); - } - } - - /** Entry point to C language function:
void eqp(float * DELTAP, float * P, float * HT, float * T, float * TD, int * N, float * PP, float * HTT, float * TT, float * TTD, int * NN); */ - private static native void eqp0(Object DELTAP, int DELTAP_byte_offset, Object P, int P_byte_offset, Object HT, int HT_byte_offset, Object T, int T_byte_offset, Object TD, int TD_byte_offset, Object N, int N_byte_offset, Object PP, int PP_byte_offset, Object HTT, int HTT_byte_offset, Object TT, int TT_byte_offset, Object TTD, int TTD_byte_offset, Object NN, int NN_byte_offset); - - /** Entry point to C language function:
void eqp(float * DELTAP, float * P, float * HT, float * T, float * TD, int * N, float * PP, float * HTT, float * TT, float * TTD, int * NN); */ - private static native void eqp1(Object DELTAP, int DELTAP_byte_offset, Object P, int P_byte_offset, Object HT, int HT_byte_offset, Object T, int T_byte_offset, Object TD, int TD_byte_offset, Object N, int N_byte_offset, Object PP, int PP_byte_offset, Object HTT, int HTT_byte_offset, Object TT, int TT_byte_offset, Object TTD, int TTD_byte_offset, Object NN, int NN_byte_offset); - - /** Interface to C language function:
void eqp(float * DELTAP, float * P, float * HT, float * T, float * TD, int * N, float * PP, float * HTT, float * TT, float * TTD, int * NN); */ - public static void eqp(float[] DELTAP, int DELTAP_offset, float[] P, int P_offset, float[] HT, int HT_offset, float[] T, int T_offset, float[] TD, int TD_offset, int[] N, int N_offset, float[] PP, int PP_offset, float[] HTT, int HTT_offset, float[] TT, int TT_offset, float[] TTD, int TTD_offset, int[] NN, int NN_offset) - { - if(DELTAP != null && DELTAP.length <= DELTAP_offset) - throw new RuntimeException("array offset argument \"DELTAP_offset\" (" + DELTAP_offset + ") equals or exceeds array length (" + DELTAP.length + ")"); - if(P != null && P.length <= P_offset) - throw new RuntimeException("array offset argument \"P_offset\" (" + P_offset + ") equals or exceeds array length (" + P.length + ")"); - if(HT != null && HT.length <= HT_offset) - throw new RuntimeException("array offset argument \"HT_offset\" (" + HT_offset + ") equals or exceeds array length (" + HT.length + ")"); - if(T != null && T.length <= T_offset) - throw new RuntimeException("array offset argument \"T_offset\" (" + T_offset + ") equals or exceeds array length (" + T.length + ")"); - if(TD != null && TD.length <= TD_offset) - throw new RuntimeException("array offset argument \"TD_offset\" (" + TD_offset + ") equals or exceeds array length (" + TD.length + ")"); - if(N != null && N.length <= N_offset) - throw new RuntimeException("array offset argument \"N_offset\" (" + N_offset + ") equals or exceeds array length (" + N.length + ")"); - if(PP != null && PP.length <= PP_offset) - throw new RuntimeException("array offset argument \"PP_offset\" (" + PP_offset + ") equals or exceeds array length (" + PP.length + ")"); - if(HTT != null && HTT.length <= HTT_offset) - throw new RuntimeException("array offset argument \"HTT_offset\" (" + HTT_offset + ") equals or exceeds array length (" + HTT.length + ")"); - if(TT != null && TT.length <= TT_offset) - throw new RuntimeException("array offset argument \"TT_offset\" (" + TT_offset + ") equals or exceeds array length (" + TT.length + ")"); - if(TTD != null && TTD.length <= TTD_offset) - throw new RuntimeException("array offset argument \"TTD_offset\" (" + TTD_offset + ") equals or exceeds array length (" + TTD.length + ")"); - if(NN != null && NN.length <= NN_offset) - throw new RuntimeException("array offset argument \"NN_offset\" (" + NN_offset + ") equals or exceeds array length (" + NN.length + ")"); - eqp1(DELTAP, BufferFactory.SIZEOF_FLOAT * DELTAP_offset, P, BufferFactory.SIZEOF_FLOAT * P_offset, HT, BufferFactory.SIZEOF_FLOAT * HT_offset, T, BufferFactory.SIZEOF_FLOAT * T_offset, TD, BufferFactory.SIZEOF_FLOAT * TD_offset, N, BufferFactory.SIZEOF_INT * N_offset, PP, BufferFactory.SIZEOF_FLOAT * PP_offset, HTT, BufferFactory.SIZEOF_FLOAT * HTT_offset, TT, BufferFactory.SIZEOF_FLOAT * TT_offset, TTD, BufferFactory.SIZEOF_FLOAT * TTD_offset, NN, BufferFactory.SIZEOF_INT * NN_offset); - - } - - /** Interface to C language function:
float esat(float * T); */ - public static float esat(java.nio.FloatBuffer T) - { - boolean _direct = BufferFactory.isDirect(T); - if (_direct) { - return esat0(T, BufferFactory.getDirectBufferByteOffset(T)); - } else { - return esat1(BufferFactory.getArray(T), BufferFactory.getIndirectBufferByteOffset(T)); - } - } - - /** Entry point to C language function:
float esat(float * T); */ - private static native float esat0(Object T, int T_byte_offset); - - /** Entry point to C language function:
float esat(float * T); */ - private static native float esat1(Object T, int T_byte_offset); - - /** Interface to C language function:
float esat(float * T); */ - public static float esat(float[] T, int T_offset) - { - if(T != null && T.length <= T_offset) - throw new RuntimeException("array offset argument \"T_offset\" (" + T_offset + ") equals or exceeds array length (" + T.length + ")"); - return esat1(T, BufferFactory.SIZEOF_FLOAT * T_offset); - - } - - /** Interface to C language function:
void exp_aray(float * a, float * b, int * mni, int * ni, int * nj); */ - public static void exp_aray(java.nio.FloatBuffer a, java.nio.FloatBuffer b, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj) - { - boolean _direct = BufferFactory.isDirect(a); - if (b != null && _direct != BufferFactory.isDirect(b)) - throw new RuntimeException("Argument \"b\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - exp_aray0(a, BufferFactory.getDirectBufferByteOffset(a), b, BufferFactory.getDirectBufferByteOffset(b), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj)); - } else { - exp_aray1(BufferFactory.getArray(a), BufferFactory.getIndirectBufferByteOffset(a), BufferFactory.getArray(b), BufferFactory.getIndirectBufferByteOffset(b), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj)); - } - } - - /** Entry point to C language function:
void exp_aray(float * a, float * b, int * mni, int * ni, int * nj); */ - private static native void exp_aray0(Object a, int a_byte_offset, Object b, int b_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset); - - /** Entry point to C language function:
void exp_aray(float * a, float * b, int * mni, int * ni, int * nj); */ - private static native void exp_aray1(Object a, int a_byte_offset, Object b, int b_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset); - - /** Interface to C language function:
void exp_aray(float * a, float * b, int * mni, int * ni, int * nj); */ - public static void exp_aray(float[] a, int a_offset, float[] b, int b_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset) - { - if(a != null && a.length <= a_offset) - throw new RuntimeException("array offset argument \"a_offset\" (" + a_offset + ") equals or exceeds array length (" + a.length + ")"); - if(b != null && b.length <= b_offset) - throw new RuntimeException("array offset argument \"b_offset\" (" + b_offset + ") equals or exceeds array length (" + b.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - exp_aray1(a, BufferFactory.SIZEOF_FLOAT * a_offset, b, BufferFactory.SIZEOF_FLOAT * b_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset); - - } - - /** Interface to C language function:
void fndiverg(float * zmid, float * ztop, float * zbot, float * ptop, float * pbot, int * mni, int * ni, int * nj, float * dx, float * dy, float * f, float * fnx, float * fny, float * w1, float * dtdx, float * dtdy, float * qx, float * qy, float * fndiv); */ - public static void fndiverg(java.nio.FloatBuffer zmid, java.nio.FloatBuffer ztop, java.nio.FloatBuffer zbot, java.nio.FloatBuffer ptop, java.nio.FloatBuffer pbot, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj, java.nio.FloatBuffer dx, java.nio.FloatBuffer dy, java.nio.FloatBuffer f, java.nio.FloatBuffer fnx, java.nio.FloatBuffer fny, java.nio.FloatBuffer w1, java.nio.FloatBuffer dtdx, java.nio.FloatBuffer dtdy, java.nio.FloatBuffer qx, java.nio.FloatBuffer qy, java.nio.FloatBuffer fndiv) - { - boolean _direct = BufferFactory.isDirect(zmid); - if (ztop != null && _direct != BufferFactory.isDirect(ztop)) - throw new RuntimeException("Argument \"ztop\" : Buffers passed to this method must all be either direct or indirect"); - if (zbot != null && _direct != BufferFactory.isDirect(zbot)) - throw new RuntimeException("Argument \"zbot\" : Buffers passed to this method must all be either direct or indirect"); - if (ptop != null && _direct != BufferFactory.isDirect(ptop)) - throw new RuntimeException("Argument \"ptop\" : Buffers passed to this method must all be either direct or indirect"); - if (pbot != null && _direct != BufferFactory.isDirect(pbot)) - throw new RuntimeException("Argument \"pbot\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (dx != null && _direct != BufferFactory.isDirect(dx)) - throw new RuntimeException("Argument \"dx\" : Buffers passed to this method must all be either direct or indirect"); - if (dy != null && _direct != BufferFactory.isDirect(dy)) - throw new RuntimeException("Argument \"dy\" : Buffers passed to this method must all be either direct or indirect"); - if (f != null && _direct != BufferFactory.isDirect(f)) - throw new RuntimeException("Argument \"f\" : Buffers passed to this method must all be either direct or indirect"); - if (fnx != null && _direct != BufferFactory.isDirect(fnx)) - throw new RuntimeException("Argument \"fnx\" : Buffers passed to this method must all be either direct or indirect"); - if (fny != null && _direct != BufferFactory.isDirect(fny)) - throw new RuntimeException("Argument \"fny\" : Buffers passed to this method must all be either direct or indirect"); - if (w1 != null && _direct != BufferFactory.isDirect(w1)) - throw new RuntimeException("Argument \"w1\" : Buffers passed to this method must all be either direct or indirect"); - if (dtdx != null && _direct != BufferFactory.isDirect(dtdx)) - throw new RuntimeException("Argument \"dtdx\" : Buffers passed to this method must all be either direct or indirect"); - if (dtdy != null && _direct != BufferFactory.isDirect(dtdy)) - throw new RuntimeException("Argument \"dtdy\" : Buffers passed to this method must all be either direct or indirect"); - if (qx != null && _direct != BufferFactory.isDirect(qx)) - throw new RuntimeException("Argument \"qx\" : Buffers passed to this method must all be either direct or indirect"); - if (qy != null && _direct != BufferFactory.isDirect(qy)) - throw new RuntimeException("Argument \"qy\" : Buffers passed to this method must all be either direct or indirect"); - if (fndiv != null && _direct != BufferFactory.isDirect(fndiv)) - throw new RuntimeException("Argument \"fndiv\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - fndiverg0(zmid, BufferFactory.getDirectBufferByteOffset(zmid), ztop, BufferFactory.getDirectBufferByteOffset(ztop), zbot, BufferFactory.getDirectBufferByteOffset(zbot), ptop, BufferFactory.getDirectBufferByteOffset(ptop), pbot, BufferFactory.getDirectBufferByteOffset(pbot), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj), dx, BufferFactory.getDirectBufferByteOffset(dx), dy, BufferFactory.getDirectBufferByteOffset(dy), f, BufferFactory.getDirectBufferByteOffset(f), fnx, BufferFactory.getDirectBufferByteOffset(fnx), fny, BufferFactory.getDirectBufferByteOffset(fny), w1, BufferFactory.getDirectBufferByteOffset(w1), dtdx, BufferFactory.getDirectBufferByteOffset(dtdx), dtdy, BufferFactory.getDirectBufferByteOffset(dtdy), qx, BufferFactory.getDirectBufferByteOffset(qx), qy, BufferFactory.getDirectBufferByteOffset(qy), fndiv, BufferFactory.getDirectBufferByteOffset(fndiv)); - } else { - fndiverg1(BufferFactory.getArray(zmid), BufferFactory.getIndirectBufferByteOffset(zmid), BufferFactory.getArray(ztop), BufferFactory.getIndirectBufferByteOffset(ztop), BufferFactory.getArray(zbot), BufferFactory.getIndirectBufferByteOffset(zbot), BufferFactory.getArray(ptop), BufferFactory.getIndirectBufferByteOffset(ptop), BufferFactory.getArray(pbot), BufferFactory.getIndirectBufferByteOffset(pbot), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj), BufferFactory.getArray(dx), BufferFactory.getIndirectBufferByteOffset(dx), BufferFactory.getArray(dy), BufferFactory.getIndirectBufferByteOffset(dy), BufferFactory.getArray(f), BufferFactory.getIndirectBufferByteOffset(f), BufferFactory.getArray(fnx), BufferFactory.getIndirectBufferByteOffset(fnx), BufferFactory.getArray(fny), BufferFactory.getIndirectBufferByteOffset(fny), BufferFactory.getArray(w1), BufferFactory.getIndirectBufferByteOffset(w1), BufferFactory.getArray(dtdx), BufferFactory.getIndirectBufferByteOffset(dtdx), BufferFactory.getArray(dtdy), BufferFactory.getIndirectBufferByteOffset(dtdy), BufferFactory.getArray(qx), BufferFactory.getIndirectBufferByteOffset(qx), BufferFactory.getArray(qy), BufferFactory.getIndirectBufferByteOffset(qy), BufferFactory.getArray(fndiv), BufferFactory.getIndirectBufferByteOffset(fndiv)); - } - } - - /** Entry point to C language function:
void fndiverg(float * zmid, float * ztop, float * zbot, float * ptop, float * pbot, int * mni, int * ni, int * nj, float * dx, float * dy, float * f, float * fnx, float * fny, float * w1, float * dtdx, float * dtdy, float * qx, float * qy, float * fndiv); */ - private static native void fndiverg0(Object zmid, int zmid_byte_offset, Object ztop, int ztop_byte_offset, Object zbot, int zbot_byte_offset, Object ptop, int ptop_byte_offset, Object pbot, int pbot_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object dx, int dx_byte_offset, Object dy, int dy_byte_offset, Object f, int f_byte_offset, Object fnx, int fnx_byte_offset, Object fny, int fny_byte_offset, Object w1, int w1_byte_offset, Object dtdx, int dtdx_byte_offset, Object dtdy, int dtdy_byte_offset, Object qx, int qx_byte_offset, Object qy, int qy_byte_offset, Object fndiv, int fndiv_byte_offset); - - /** Entry point to C language function:
void fndiverg(float * zmid, float * ztop, float * zbot, float * ptop, float * pbot, int * mni, int * ni, int * nj, float * dx, float * dy, float * f, float * fnx, float * fny, float * w1, float * dtdx, float * dtdy, float * qx, float * qy, float * fndiv); */ - private static native void fndiverg1(Object zmid, int zmid_byte_offset, Object ztop, int ztop_byte_offset, Object zbot, int zbot_byte_offset, Object ptop, int ptop_byte_offset, Object pbot, int pbot_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object dx, int dx_byte_offset, Object dy, int dy_byte_offset, Object f, int f_byte_offset, Object fnx, int fnx_byte_offset, Object fny, int fny_byte_offset, Object w1, int w1_byte_offset, Object dtdx, int dtdx_byte_offset, Object dtdy, int dtdy_byte_offset, Object qx, int qx_byte_offset, Object qy, int qy_byte_offset, Object fndiv, int fndiv_byte_offset); - - /** Interface to C language function:
void fndiverg(float * zmid, float * ztop, float * zbot, float * ptop, float * pbot, int * mni, int * ni, int * nj, float * dx, float * dy, float * f, float * fnx, float * fny, float * w1, float * dtdx, float * dtdy, float * qx, float * qy, float * fndiv); */ - public static void fndiverg(float[] zmid, int zmid_offset, float[] ztop, int ztop_offset, float[] zbot, int zbot_offset, float[] ptop, int ptop_offset, float[] pbot, int pbot_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset, float[] dx, int dx_offset, float[] dy, int dy_offset, float[] f, int f_offset, float[] fnx, int fnx_offset, float[] fny, int fny_offset, float[] w1, int w1_offset, float[] dtdx, int dtdx_offset, float[] dtdy, int dtdy_offset, float[] qx, int qx_offset, float[] qy, int qy_offset, float[] fndiv, int fndiv_offset) - { - if(zmid != null && zmid.length <= zmid_offset) - throw new RuntimeException("array offset argument \"zmid_offset\" (" + zmid_offset + ") equals or exceeds array length (" + zmid.length + ")"); - if(ztop != null && ztop.length <= ztop_offset) - throw new RuntimeException("array offset argument \"ztop_offset\" (" + ztop_offset + ") equals or exceeds array length (" + ztop.length + ")"); - if(zbot != null && zbot.length <= zbot_offset) - throw new RuntimeException("array offset argument \"zbot_offset\" (" + zbot_offset + ") equals or exceeds array length (" + zbot.length + ")"); - if(ptop != null && ptop.length <= ptop_offset) - throw new RuntimeException("array offset argument \"ptop_offset\" (" + ptop_offset + ") equals or exceeds array length (" + ptop.length + ")"); - if(pbot != null && pbot.length <= pbot_offset) - throw new RuntimeException("array offset argument \"pbot_offset\" (" + pbot_offset + ") equals or exceeds array length (" + pbot.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - if(dx != null && dx.length <= dx_offset) - throw new RuntimeException("array offset argument \"dx_offset\" (" + dx_offset + ") equals or exceeds array length (" + dx.length + ")"); - if(dy != null && dy.length <= dy_offset) - throw new RuntimeException("array offset argument \"dy_offset\" (" + dy_offset + ") equals or exceeds array length (" + dy.length + ")"); - if(f != null && f.length <= f_offset) - throw new RuntimeException("array offset argument \"f_offset\" (" + f_offset + ") equals or exceeds array length (" + f.length + ")"); - if(fnx != null && fnx.length <= fnx_offset) - throw new RuntimeException("array offset argument \"fnx_offset\" (" + fnx_offset + ") equals or exceeds array length (" + fnx.length + ")"); - if(fny != null && fny.length <= fny_offset) - throw new RuntimeException("array offset argument \"fny_offset\" (" + fny_offset + ") equals or exceeds array length (" + fny.length + ")"); - if(w1 != null && w1.length <= w1_offset) - throw new RuntimeException("array offset argument \"w1_offset\" (" + w1_offset + ") equals or exceeds array length (" + w1.length + ")"); - if(dtdx != null && dtdx.length <= dtdx_offset) - throw new RuntimeException("array offset argument \"dtdx_offset\" (" + dtdx_offset + ") equals or exceeds array length (" + dtdx.length + ")"); - if(dtdy != null && dtdy.length <= dtdy_offset) - throw new RuntimeException("array offset argument \"dtdy_offset\" (" + dtdy_offset + ") equals or exceeds array length (" + dtdy.length + ")"); - if(qx != null && qx.length <= qx_offset) - throw new RuntimeException("array offset argument \"qx_offset\" (" + qx_offset + ") equals or exceeds array length (" + qx.length + ")"); - if(qy != null && qy.length <= qy_offset) - throw new RuntimeException("array offset argument \"qy_offset\" (" + qy_offset + ") equals or exceeds array length (" + qy.length + ")"); - if(fndiv != null && fndiv.length <= fndiv_offset) - throw new RuntimeException("array offset argument \"fndiv_offset\" (" + fndiv_offset + ") equals or exceeds array length (" + fndiv.length + ")"); - fndiverg1(zmid, BufferFactory.SIZEOF_FLOAT * zmid_offset, ztop, BufferFactory.SIZEOF_FLOAT * ztop_offset, zbot, BufferFactory.SIZEOF_FLOAT * zbot_offset, ptop, BufferFactory.SIZEOF_FLOAT * ptop_offset, pbot, BufferFactory.SIZEOF_FLOAT * pbot_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset, dx, BufferFactory.SIZEOF_FLOAT * dx_offset, dy, BufferFactory.SIZEOF_FLOAT * dy_offset, f, BufferFactory.SIZEOF_FLOAT * f_offset, fnx, BufferFactory.SIZEOF_FLOAT * fnx_offset, fny, BufferFactory.SIZEOF_FLOAT * fny_offset, w1, BufferFactory.SIZEOF_FLOAT * w1_offset, dtdx, BufferFactory.SIZEOF_FLOAT * dtdx_offset, dtdy, BufferFactory.SIZEOF_FLOAT * dtdy_offset, qx, BufferFactory.SIZEOF_FLOAT * qx_offset, qy, BufferFactory.SIZEOF_FLOAT * qy_offset, fndiv, BufferFactory.SIZEOF_FLOAT * fndiv_offset); - - } - - /** Interface to C language function:
void forecast(int * yr, int * mon, int * day, int * hour, int * min, char * stnid, int * snow, float * slat, float * slon, float * p, float * ht, float * t, float * td, int * nlvls, float * ftmax, int * status); */ - public static void forecast(java.nio.IntBuffer yr, java.nio.IntBuffer mon, java.nio.IntBuffer day, java.nio.IntBuffer hour, java.nio.IntBuffer min, java.nio.ByteBuffer stnid, java.nio.IntBuffer snow, java.nio.FloatBuffer slat, java.nio.FloatBuffer slon, java.nio.FloatBuffer p, java.nio.FloatBuffer ht, java.nio.FloatBuffer t, java.nio.FloatBuffer td, java.nio.IntBuffer nlvls, java.nio.FloatBuffer ftmax, java.nio.IntBuffer status) - { - boolean _direct = BufferFactory.isDirect(yr); - if (mon != null && _direct != BufferFactory.isDirect(mon)) - throw new RuntimeException("Argument \"mon\" : Buffers passed to this method must all be either direct or indirect"); - if (day != null && _direct != BufferFactory.isDirect(day)) - throw new RuntimeException("Argument \"day\" : Buffers passed to this method must all be either direct or indirect"); - if (hour != null && _direct != BufferFactory.isDirect(hour)) - throw new RuntimeException("Argument \"hour\" : Buffers passed to this method must all be either direct or indirect"); - if (min != null && _direct != BufferFactory.isDirect(min)) - throw new RuntimeException("Argument \"min\" : Buffers passed to this method must all be either direct or indirect"); - if (stnid != null && _direct != BufferFactory.isDirect(stnid)) - throw new RuntimeException("Argument \"stnid\" : Buffers passed to this method must all be either direct or indirect"); - if (snow != null && _direct != BufferFactory.isDirect(snow)) - throw new RuntimeException("Argument \"snow\" : Buffers passed to this method must all be either direct or indirect"); - if (slat != null && _direct != BufferFactory.isDirect(slat)) - throw new RuntimeException("Argument \"slat\" : Buffers passed to this method must all be either direct or indirect"); - if (slon != null && _direct != BufferFactory.isDirect(slon)) - throw new RuntimeException("Argument \"slon\" : Buffers passed to this method must all be either direct or indirect"); - if (p != null && _direct != BufferFactory.isDirect(p)) - throw new RuntimeException("Argument \"p\" : Buffers passed to this method must all be either direct or indirect"); - if (ht != null && _direct != BufferFactory.isDirect(ht)) - throw new RuntimeException("Argument \"ht\" : Buffers passed to this method must all be either direct or indirect"); - if (t != null && _direct != BufferFactory.isDirect(t)) - throw new RuntimeException("Argument \"t\" : Buffers passed to this method must all be either direct or indirect"); - if (td != null && _direct != BufferFactory.isDirect(td)) - throw new RuntimeException("Argument \"td\" : Buffers passed to this method must all be either direct or indirect"); - if (nlvls != null && _direct != BufferFactory.isDirect(nlvls)) - throw new RuntimeException("Argument \"nlvls\" : Buffers passed to this method must all be either direct or indirect"); - if (ftmax != null && _direct != BufferFactory.isDirect(ftmax)) - throw new RuntimeException("Argument \"ftmax\" : Buffers passed to this method must all be either direct or indirect"); - if (status != null && _direct != BufferFactory.isDirect(status)) - throw new RuntimeException("Argument \"status\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - forecast0(yr, BufferFactory.getDirectBufferByteOffset(yr), mon, BufferFactory.getDirectBufferByteOffset(mon), day, BufferFactory.getDirectBufferByteOffset(day), hour, BufferFactory.getDirectBufferByteOffset(hour), min, BufferFactory.getDirectBufferByteOffset(min), stnid, BufferFactory.getDirectBufferByteOffset(stnid), snow, BufferFactory.getDirectBufferByteOffset(snow), slat, BufferFactory.getDirectBufferByteOffset(slat), slon, BufferFactory.getDirectBufferByteOffset(slon), p, BufferFactory.getDirectBufferByteOffset(p), ht, BufferFactory.getDirectBufferByteOffset(ht), t, BufferFactory.getDirectBufferByteOffset(t), td, BufferFactory.getDirectBufferByteOffset(td), nlvls, BufferFactory.getDirectBufferByteOffset(nlvls), ftmax, BufferFactory.getDirectBufferByteOffset(ftmax), status, BufferFactory.getDirectBufferByteOffset(status)); - } else { - forecast1(BufferFactory.getArray(yr), BufferFactory.getIndirectBufferByteOffset(yr), BufferFactory.getArray(mon), BufferFactory.getIndirectBufferByteOffset(mon), BufferFactory.getArray(day), BufferFactory.getIndirectBufferByteOffset(day), BufferFactory.getArray(hour), BufferFactory.getIndirectBufferByteOffset(hour), BufferFactory.getArray(min), BufferFactory.getIndirectBufferByteOffset(min), BufferFactory.getArray(stnid), BufferFactory.getIndirectBufferByteOffset(stnid), BufferFactory.getArray(snow), BufferFactory.getIndirectBufferByteOffset(snow), BufferFactory.getArray(slat), BufferFactory.getIndirectBufferByteOffset(slat), BufferFactory.getArray(slon), BufferFactory.getIndirectBufferByteOffset(slon), BufferFactory.getArray(p), BufferFactory.getIndirectBufferByteOffset(p), BufferFactory.getArray(ht), BufferFactory.getIndirectBufferByteOffset(ht), BufferFactory.getArray(t), BufferFactory.getIndirectBufferByteOffset(t), BufferFactory.getArray(td), BufferFactory.getIndirectBufferByteOffset(td), BufferFactory.getArray(nlvls), BufferFactory.getIndirectBufferByteOffset(nlvls), BufferFactory.getArray(ftmax), BufferFactory.getIndirectBufferByteOffset(ftmax), BufferFactory.getArray(status), BufferFactory.getIndirectBufferByteOffset(status)); - } - } - - /** Entry point to C language function:
void forecast(int * yr, int * mon, int * day, int * hour, int * min, char * stnid, int * snow, float * slat, float * slon, float * p, float * ht, float * t, float * td, int * nlvls, float * ftmax, int * status); */ - private static native void forecast0(Object yr, int yr_byte_offset, Object mon, int mon_byte_offset, Object day, int day_byte_offset, Object hour, int hour_byte_offset, Object min, int min_byte_offset, Object stnid, int stnid_byte_offset, Object snow, int snow_byte_offset, Object slat, int slat_byte_offset, Object slon, int slon_byte_offset, Object p, int p_byte_offset, Object ht, int ht_byte_offset, Object t, int t_byte_offset, Object td, int td_byte_offset, Object nlvls, int nlvls_byte_offset, Object ftmax, int ftmax_byte_offset, Object status, int status_byte_offset); - - /** Entry point to C language function:
void forecast(int * yr, int * mon, int * day, int * hour, int * min, char * stnid, int * snow, float * slat, float * slon, float * p, float * ht, float * t, float * td, int * nlvls, float * ftmax, int * status); */ - private static native void forecast1(Object yr, int yr_byte_offset, Object mon, int mon_byte_offset, Object day, int day_byte_offset, Object hour, int hour_byte_offset, Object min, int min_byte_offset, Object stnid, int stnid_byte_offset, Object snow, int snow_byte_offset, Object slat, int slat_byte_offset, Object slon, int slon_byte_offset, Object p, int p_byte_offset, Object ht, int ht_byte_offset, Object t, int t_byte_offset, Object td, int td_byte_offset, Object nlvls, int nlvls_byte_offset, Object ftmax, int ftmax_byte_offset, Object status, int status_byte_offset); - - /** Interface to C language function:
void forecast(int * yr, int * mon, int * day, int * hour, int * min, char * stnid, int * snow, float * slat, float * slon, float * p, float * ht, float * t, float * td, int * nlvls, float * ftmax, int * status); */ - public static void forecast(int[] yr, int yr_offset, int[] mon, int mon_offset, int[] day, int day_offset, int[] hour, int hour_offset, int[] min, int min_offset, byte[] stnid, int stnid_offset, int[] snow, int snow_offset, float[] slat, int slat_offset, float[] slon, int slon_offset, float[] p, int p_offset, float[] ht, int ht_offset, float[] t, int t_offset, float[] td, int td_offset, int[] nlvls, int nlvls_offset, float[] ftmax, int ftmax_offset, int[] status, int status_offset) - { - if(yr != null && yr.length <= yr_offset) - throw new RuntimeException("array offset argument \"yr_offset\" (" + yr_offset + ") equals or exceeds array length (" + yr.length + ")"); - if(mon != null && mon.length <= mon_offset) - throw new RuntimeException("array offset argument \"mon_offset\" (" + mon_offset + ") equals or exceeds array length (" + mon.length + ")"); - if(day != null && day.length <= day_offset) - throw new RuntimeException("array offset argument \"day_offset\" (" + day_offset + ") equals or exceeds array length (" + day.length + ")"); - if(hour != null && hour.length <= hour_offset) - throw new RuntimeException("array offset argument \"hour_offset\" (" + hour_offset + ") equals or exceeds array length (" + hour.length + ")"); - if(min != null && min.length <= min_offset) - throw new RuntimeException("array offset argument \"min_offset\" (" + min_offset + ") equals or exceeds array length (" + min.length + ")"); - if(stnid != null && stnid.length <= stnid_offset) - throw new RuntimeException("array offset argument \"stnid_offset\" (" + stnid_offset + ") equals or exceeds array length (" + stnid.length + ")"); - if(snow != null && snow.length <= snow_offset) - throw new RuntimeException("array offset argument \"snow_offset\" (" + snow_offset + ") equals or exceeds array length (" + snow.length + ")"); - if(slat != null && slat.length <= slat_offset) - throw new RuntimeException("array offset argument \"slat_offset\" (" + slat_offset + ") equals or exceeds array length (" + slat.length + ")"); - if(slon != null && slon.length <= slon_offset) - throw new RuntimeException("array offset argument \"slon_offset\" (" + slon_offset + ") equals or exceeds array length (" + slon.length + ")"); - if(p != null && p.length <= p_offset) - throw new RuntimeException("array offset argument \"p_offset\" (" + p_offset + ") equals or exceeds array length (" + p.length + ")"); - if(ht != null && ht.length <= ht_offset) - throw new RuntimeException("array offset argument \"ht_offset\" (" + ht_offset + ") equals or exceeds array length (" + ht.length + ")"); - if(t != null && t.length <= t_offset) - throw new RuntimeException("array offset argument \"t_offset\" (" + t_offset + ") equals or exceeds array length (" + t.length + ")"); - if(td != null && td.length <= td_offset) - throw new RuntimeException("array offset argument \"td_offset\" (" + td_offset + ") equals or exceeds array length (" + td.length + ")"); - if(nlvls != null && nlvls.length <= nlvls_offset) - throw new RuntimeException("array offset argument \"nlvls_offset\" (" + nlvls_offset + ") equals or exceeds array length (" + nlvls.length + ")"); - if(ftmax != null && ftmax.length <= ftmax_offset) - throw new RuntimeException("array offset argument \"ftmax_offset\" (" + ftmax_offset + ") equals or exceeds array length (" + ftmax.length + ")"); - if(status != null && status.length <= status_offset) - throw new RuntimeException("array offset argument \"status_offset\" (" + status_offset + ") equals or exceeds array length (" + status.length + ")"); - forecast1(yr, BufferFactory.SIZEOF_INT * yr_offset, mon, BufferFactory.SIZEOF_INT * mon_offset, day, BufferFactory.SIZEOF_INT * day_offset, hour, BufferFactory.SIZEOF_INT * hour_offset, min, BufferFactory.SIZEOF_INT * min_offset, stnid, stnid_offset, snow, BufferFactory.SIZEOF_INT * snow_offset, slat, BufferFactory.SIZEOF_FLOAT * slat_offset, slon, BufferFactory.SIZEOF_FLOAT * slon_offset, p, BufferFactory.SIZEOF_FLOAT * p_offset, ht, BufferFactory.SIZEOF_FLOAT * ht_offset, t, BufferFactory.SIZEOF_FLOAT * t_offset, td, BufferFactory.SIZEOF_FLOAT * td_offset, nlvls, BufferFactory.SIZEOF_INT * nlvls_offset, ftmax, BufferFactory.SIZEOF_FLOAT * ftmax_offset, status, BufferFactory.SIZEOF_INT * status_offset); - - } - - /** Interface to C language function:
void fortconbuf(float * Array, int * Work, int * mnx, int * nx, int * ny, float * scale, float * offset, int * mode, float * seed, float * xpoints, float * ypoints, int * npoints, float * badlo, float * badhi, int * status); */ - public static void fortconbuf(java.nio.FloatBuffer Array, java.nio.IntBuffer Work, java.nio.IntBuffer mnx, java.nio.IntBuffer nx, java.nio.IntBuffer ny, java.nio.FloatBuffer scale, java.nio.FloatBuffer offset, java.nio.IntBuffer mode, java.nio.FloatBuffer seed, java.nio.FloatBuffer xpoints, java.nio.FloatBuffer ypoints, java.nio.IntBuffer npoints, java.nio.FloatBuffer badlo, java.nio.FloatBuffer badhi, java.nio.IntBuffer status) - { - boolean _direct = BufferFactory.isDirect(Array); - if (Work != null && _direct != BufferFactory.isDirect(Work)) - throw new RuntimeException("Argument \"Work\" : Buffers passed to this method must all be either direct or indirect"); - if (mnx != null && _direct != BufferFactory.isDirect(mnx)) - throw new RuntimeException("Argument \"mnx\" : Buffers passed to this method must all be either direct or indirect"); - if (nx != null && _direct != BufferFactory.isDirect(nx)) - throw new RuntimeException("Argument \"nx\" : Buffers passed to this method must all be either direct or indirect"); - if (ny != null && _direct != BufferFactory.isDirect(ny)) - throw new RuntimeException("Argument \"ny\" : Buffers passed to this method must all be either direct or indirect"); - if (scale != null && _direct != BufferFactory.isDirect(scale)) - throw new RuntimeException("Argument \"scale\" : Buffers passed to this method must all be either direct or indirect"); - if (offset != null && _direct != BufferFactory.isDirect(offset)) - throw new RuntimeException("Argument \"offset\" : Buffers passed to this method must all be either direct or indirect"); - if (mode != null && _direct != BufferFactory.isDirect(mode)) - throw new RuntimeException("Argument \"mode\" : Buffers passed to this method must all be either direct or indirect"); - if (seed != null && _direct != BufferFactory.isDirect(seed)) - throw new RuntimeException("Argument \"seed\" : Buffers passed to this method must all be either direct or indirect"); - if (xpoints != null && _direct != BufferFactory.isDirect(xpoints)) - throw new RuntimeException("Argument \"xpoints\" : Buffers passed to this method must all be either direct or indirect"); - if (ypoints != null && _direct != BufferFactory.isDirect(ypoints)) - throw new RuntimeException("Argument \"ypoints\" : Buffers passed to this method must all be either direct or indirect"); - if (npoints != null && _direct != BufferFactory.isDirect(npoints)) - throw new RuntimeException("Argument \"npoints\" : Buffers passed to this method must all be either direct or indirect"); - if (badlo != null && _direct != BufferFactory.isDirect(badlo)) - throw new RuntimeException("Argument \"badlo\" : Buffers passed to this method must all be either direct or indirect"); - if (badhi != null && _direct != BufferFactory.isDirect(badhi)) - throw new RuntimeException("Argument \"badhi\" : Buffers passed to this method must all be either direct or indirect"); - if (status != null && _direct != BufferFactory.isDirect(status)) - throw new RuntimeException("Argument \"status\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - fortconbuf0(Array, BufferFactory.getDirectBufferByteOffset(Array), Work, BufferFactory.getDirectBufferByteOffset(Work), mnx, BufferFactory.getDirectBufferByteOffset(mnx), nx, BufferFactory.getDirectBufferByteOffset(nx), ny, BufferFactory.getDirectBufferByteOffset(ny), scale, BufferFactory.getDirectBufferByteOffset(scale), offset, BufferFactory.getDirectBufferByteOffset(offset), mode, BufferFactory.getDirectBufferByteOffset(mode), seed, BufferFactory.getDirectBufferByteOffset(seed), xpoints, BufferFactory.getDirectBufferByteOffset(xpoints), ypoints, BufferFactory.getDirectBufferByteOffset(ypoints), npoints, BufferFactory.getDirectBufferByteOffset(npoints), badlo, BufferFactory.getDirectBufferByteOffset(badlo), badhi, BufferFactory.getDirectBufferByteOffset(badhi), status, BufferFactory.getDirectBufferByteOffset(status)); - } else { - fortconbuf1(BufferFactory.getArray(Array), BufferFactory.getIndirectBufferByteOffset(Array), BufferFactory.getArray(Work), BufferFactory.getIndirectBufferByteOffset(Work), BufferFactory.getArray(mnx), BufferFactory.getIndirectBufferByteOffset(mnx), BufferFactory.getArray(nx), BufferFactory.getIndirectBufferByteOffset(nx), BufferFactory.getArray(ny), BufferFactory.getIndirectBufferByteOffset(ny), BufferFactory.getArray(scale), BufferFactory.getIndirectBufferByteOffset(scale), BufferFactory.getArray(offset), BufferFactory.getIndirectBufferByteOffset(offset), BufferFactory.getArray(mode), BufferFactory.getIndirectBufferByteOffset(mode), BufferFactory.getArray(seed), BufferFactory.getIndirectBufferByteOffset(seed), BufferFactory.getArray(xpoints), BufferFactory.getIndirectBufferByteOffset(xpoints), BufferFactory.getArray(ypoints), BufferFactory.getIndirectBufferByteOffset(ypoints), BufferFactory.getArray(npoints), BufferFactory.getIndirectBufferByteOffset(npoints), BufferFactory.getArray(badlo), BufferFactory.getIndirectBufferByteOffset(badlo), BufferFactory.getArray(badhi), BufferFactory.getIndirectBufferByteOffset(badhi), BufferFactory.getArray(status), BufferFactory.getIndirectBufferByteOffset(status)); - } - } - - /** Entry point to C language function:
void fortconbuf(float * Array, int * Work, int * mnx, int * nx, int * ny, float * scale, float * offset, int * mode, float * seed, float * xpoints, float * ypoints, int * npoints, float * badlo, float * badhi, int * status); */ - private static native void fortconbuf0(Object Array, int Array_byte_offset, Object Work, int Work_byte_offset, Object mnx, int mnx_byte_offset, Object nx, int nx_byte_offset, Object ny, int ny_byte_offset, Object scale, int scale_byte_offset, Object offset, int offset_byte_offset, Object mode, int mode_byte_offset, Object seed, int seed_byte_offset, Object xpoints, int xpoints_byte_offset, Object ypoints, int ypoints_byte_offset, Object npoints, int npoints_byte_offset, Object badlo, int badlo_byte_offset, Object badhi, int badhi_byte_offset, Object status, int status_byte_offset); - - /** Entry point to C language function:
void fortconbuf(float * Array, int * Work, int * mnx, int * nx, int * ny, float * scale, float * offset, int * mode, float * seed, float * xpoints, float * ypoints, int * npoints, float * badlo, float * badhi, int * status); */ - private static native void fortconbuf1(Object Array, int Array_byte_offset, Object Work, int Work_byte_offset, Object mnx, int mnx_byte_offset, Object nx, int nx_byte_offset, Object ny, int ny_byte_offset, Object scale, int scale_byte_offset, Object offset, int offset_byte_offset, Object mode, int mode_byte_offset, Object seed, int seed_byte_offset, Object xpoints, int xpoints_byte_offset, Object ypoints, int ypoints_byte_offset, Object npoints, int npoints_byte_offset, Object badlo, int badlo_byte_offset, Object badhi, int badhi_byte_offset, Object status, int status_byte_offset); - - /** Interface to C language function:
void fortconbuf(float * Array, int * Work, int * mnx, int * nx, int * ny, float * scale, float * offset, int * mode, float * seed, float * xpoints, float * ypoints, int * npoints, float * badlo, float * badhi, int * status); */ - public static void fortconbuf(float[] Array, int Array_offset, int[] Work, int Work_offset, int[] mnx, int mnx_offset, int[] nx, int nx_offset, int[] ny, int ny_offset, float[] scale, int scale_offset, float[] offset, int offset_offset, int[] mode, int mode_offset, float[] seed, int seed_offset, float[] xpoints, int xpoints_offset, float[] ypoints, int ypoints_offset, int[] npoints, int npoints_offset, float[] badlo, int badlo_offset, float[] badhi, int badhi_offset, int[] status, int status_offset) - { - if(Array != null && Array.length <= Array_offset) - throw new RuntimeException("array offset argument \"Array_offset\" (" + Array_offset + ") equals or exceeds array length (" + Array.length + ")"); - if(Work != null && Work.length <= Work_offset) - throw new RuntimeException("array offset argument \"Work_offset\" (" + Work_offset + ") equals or exceeds array length (" + Work.length + ")"); - if(mnx != null && mnx.length <= mnx_offset) - throw new RuntimeException("array offset argument \"mnx_offset\" (" + mnx_offset + ") equals or exceeds array length (" + mnx.length + ")"); - if(nx != null && nx.length <= nx_offset) - throw new RuntimeException("array offset argument \"nx_offset\" (" + nx_offset + ") equals or exceeds array length (" + nx.length + ")"); - if(ny != null && ny.length <= ny_offset) - throw new RuntimeException("array offset argument \"ny_offset\" (" + ny_offset + ") equals or exceeds array length (" + ny.length + ")"); - if(scale != null && scale.length <= scale_offset) - throw new RuntimeException("array offset argument \"scale_offset\" (" + scale_offset + ") equals or exceeds array length (" + scale.length + ")"); - if(offset != null && offset.length <= offset_offset) - throw new RuntimeException("array offset argument \"offset_offset\" (" + offset_offset + ") equals or exceeds array length (" + offset.length + ")"); - if(mode != null && mode.length <= mode_offset) - throw new RuntimeException("array offset argument \"mode_offset\" (" + mode_offset + ") equals or exceeds array length (" + mode.length + ")"); - if(seed != null && seed.length <= seed_offset) - throw new RuntimeException("array offset argument \"seed_offset\" (" + seed_offset + ") equals or exceeds array length (" + seed.length + ")"); - if(xpoints != null && xpoints.length <= xpoints_offset) - throw new RuntimeException("array offset argument \"xpoints_offset\" (" + xpoints_offset + ") equals or exceeds array length (" + xpoints.length + ")"); - if(ypoints != null && ypoints.length <= ypoints_offset) - throw new RuntimeException("array offset argument \"ypoints_offset\" (" + ypoints_offset + ") equals or exceeds array length (" + ypoints.length + ")"); - if(npoints != null && npoints.length <= npoints_offset) - throw new RuntimeException("array offset argument \"npoints_offset\" (" + npoints_offset + ") equals or exceeds array length (" + npoints.length + ")"); - if(badlo != null && badlo.length <= badlo_offset) - throw new RuntimeException("array offset argument \"badlo_offset\" (" + badlo_offset + ") equals or exceeds array length (" + badlo.length + ")"); - if(badhi != null && badhi.length <= badhi_offset) - throw new RuntimeException("array offset argument \"badhi_offset\" (" + badhi_offset + ") equals or exceeds array length (" + badhi.length + ")"); - if(status != null && status.length <= status_offset) - throw new RuntimeException("array offset argument \"status_offset\" (" + status_offset + ") equals or exceeds array length (" + status.length + ")"); - fortconbuf1(Array, BufferFactory.SIZEOF_FLOAT * Array_offset, Work, BufferFactory.SIZEOF_INT * Work_offset, mnx, BufferFactory.SIZEOF_INT * mnx_offset, nx, BufferFactory.SIZEOF_INT * nx_offset, ny, BufferFactory.SIZEOF_INT * ny_offset, scale, BufferFactory.SIZEOF_FLOAT * scale_offset, offset, BufferFactory.SIZEOF_FLOAT * offset_offset, mode, BufferFactory.SIZEOF_INT * mode_offset, seed, BufferFactory.SIZEOF_FLOAT * seed_offset, xpoints, BufferFactory.SIZEOF_FLOAT * xpoints_offset, ypoints, BufferFactory.SIZEOF_FLOAT * ypoints_offset, npoints, BufferFactory.SIZEOF_INT * npoints_offset, badlo, BufferFactory.SIZEOF_FLOAT * badlo_offset, badhi, BufferFactory.SIZEOF_FLOAT * badhi_offset, status, BufferFactory.SIZEOF_INT * status_offset); - - } - - /** Interface to C language function:
void frontogen(float * zmid, float * ztop, float * zbot, float * ptop, float * pbot, int * mni, int * ni, int * nj, float * dx, float * dy, float * f, float * w1, float * w2, float * w3, float * dtdx, float * dtdy, float * qx, float * qy, float * fgen); */ - public static void frontogen(java.nio.FloatBuffer zmid, java.nio.FloatBuffer ztop, java.nio.FloatBuffer zbot, java.nio.FloatBuffer ptop, java.nio.FloatBuffer pbot, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj, java.nio.FloatBuffer dx, java.nio.FloatBuffer dy, java.nio.FloatBuffer f, java.nio.FloatBuffer w1, java.nio.FloatBuffer w2, java.nio.FloatBuffer w3, java.nio.FloatBuffer dtdx, java.nio.FloatBuffer dtdy, java.nio.FloatBuffer qx, java.nio.FloatBuffer qy, java.nio.FloatBuffer fgen) - { - boolean _direct = BufferFactory.isDirect(zmid); - if (ztop != null && _direct != BufferFactory.isDirect(ztop)) - throw new RuntimeException("Argument \"ztop\" : Buffers passed to this method must all be either direct or indirect"); - if (zbot != null && _direct != BufferFactory.isDirect(zbot)) - throw new RuntimeException("Argument \"zbot\" : Buffers passed to this method must all be either direct or indirect"); - if (ptop != null && _direct != BufferFactory.isDirect(ptop)) - throw new RuntimeException("Argument \"ptop\" : Buffers passed to this method must all be either direct or indirect"); - if (pbot != null && _direct != BufferFactory.isDirect(pbot)) - throw new RuntimeException("Argument \"pbot\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (dx != null && _direct != BufferFactory.isDirect(dx)) - throw new RuntimeException("Argument \"dx\" : Buffers passed to this method must all be either direct or indirect"); - if (dy != null && _direct != BufferFactory.isDirect(dy)) - throw new RuntimeException("Argument \"dy\" : Buffers passed to this method must all be either direct or indirect"); - if (f != null && _direct != BufferFactory.isDirect(f)) - throw new RuntimeException("Argument \"f\" : Buffers passed to this method must all be either direct or indirect"); - if (w1 != null && _direct != BufferFactory.isDirect(w1)) - throw new RuntimeException("Argument \"w1\" : Buffers passed to this method must all be either direct or indirect"); - if (w2 != null && _direct != BufferFactory.isDirect(w2)) - throw new RuntimeException("Argument \"w2\" : Buffers passed to this method must all be either direct or indirect"); - if (w3 != null && _direct != BufferFactory.isDirect(w3)) - throw new RuntimeException("Argument \"w3\" : Buffers passed to this method must all be either direct or indirect"); - if (dtdx != null && _direct != BufferFactory.isDirect(dtdx)) - throw new RuntimeException("Argument \"dtdx\" : Buffers passed to this method must all be either direct or indirect"); - if (dtdy != null && _direct != BufferFactory.isDirect(dtdy)) - throw new RuntimeException("Argument \"dtdy\" : Buffers passed to this method must all be either direct or indirect"); - if (qx != null && _direct != BufferFactory.isDirect(qx)) - throw new RuntimeException("Argument \"qx\" : Buffers passed to this method must all be either direct or indirect"); - if (qy != null && _direct != BufferFactory.isDirect(qy)) - throw new RuntimeException("Argument \"qy\" : Buffers passed to this method must all be either direct or indirect"); - if (fgen != null && _direct != BufferFactory.isDirect(fgen)) - throw new RuntimeException("Argument \"fgen\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - frontogen0(zmid, BufferFactory.getDirectBufferByteOffset(zmid), ztop, BufferFactory.getDirectBufferByteOffset(ztop), zbot, BufferFactory.getDirectBufferByteOffset(zbot), ptop, BufferFactory.getDirectBufferByteOffset(ptop), pbot, BufferFactory.getDirectBufferByteOffset(pbot), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj), dx, BufferFactory.getDirectBufferByteOffset(dx), dy, BufferFactory.getDirectBufferByteOffset(dy), f, BufferFactory.getDirectBufferByteOffset(f), w1, BufferFactory.getDirectBufferByteOffset(w1), w2, BufferFactory.getDirectBufferByteOffset(w2), w3, BufferFactory.getDirectBufferByteOffset(w3), dtdx, BufferFactory.getDirectBufferByteOffset(dtdx), dtdy, BufferFactory.getDirectBufferByteOffset(dtdy), qx, BufferFactory.getDirectBufferByteOffset(qx), qy, BufferFactory.getDirectBufferByteOffset(qy), fgen, BufferFactory.getDirectBufferByteOffset(fgen)); - } else { - frontogen1(BufferFactory.getArray(zmid), BufferFactory.getIndirectBufferByteOffset(zmid), BufferFactory.getArray(ztop), BufferFactory.getIndirectBufferByteOffset(ztop), BufferFactory.getArray(zbot), BufferFactory.getIndirectBufferByteOffset(zbot), BufferFactory.getArray(ptop), BufferFactory.getIndirectBufferByteOffset(ptop), BufferFactory.getArray(pbot), BufferFactory.getIndirectBufferByteOffset(pbot), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj), BufferFactory.getArray(dx), BufferFactory.getIndirectBufferByteOffset(dx), BufferFactory.getArray(dy), BufferFactory.getIndirectBufferByteOffset(dy), BufferFactory.getArray(f), BufferFactory.getIndirectBufferByteOffset(f), BufferFactory.getArray(w1), BufferFactory.getIndirectBufferByteOffset(w1), BufferFactory.getArray(w2), BufferFactory.getIndirectBufferByteOffset(w2), BufferFactory.getArray(w3), BufferFactory.getIndirectBufferByteOffset(w3), BufferFactory.getArray(dtdx), BufferFactory.getIndirectBufferByteOffset(dtdx), BufferFactory.getArray(dtdy), BufferFactory.getIndirectBufferByteOffset(dtdy), BufferFactory.getArray(qx), BufferFactory.getIndirectBufferByteOffset(qx), BufferFactory.getArray(qy), BufferFactory.getIndirectBufferByteOffset(qy), BufferFactory.getArray(fgen), BufferFactory.getIndirectBufferByteOffset(fgen)); - } - } - - /** Entry point to C language function:
void frontogen(float * zmid, float * ztop, float * zbot, float * ptop, float * pbot, int * mni, int * ni, int * nj, float * dx, float * dy, float * f, float * w1, float * w2, float * w3, float * dtdx, float * dtdy, float * qx, float * qy, float * fgen); */ - private static native void frontogen0(Object zmid, int zmid_byte_offset, Object ztop, int ztop_byte_offset, Object zbot, int zbot_byte_offset, Object ptop, int ptop_byte_offset, Object pbot, int pbot_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object dx, int dx_byte_offset, Object dy, int dy_byte_offset, Object f, int f_byte_offset, Object w1, int w1_byte_offset, Object w2, int w2_byte_offset, Object w3, int w3_byte_offset, Object dtdx, int dtdx_byte_offset, Object dtdy, int dtdy_byte_offset, Object qx, int qx_byte_offset, Object qy, int qy_byte_offset, Object fgen, int fgen_byte_offset); - - /** Entry point to C language function:
void frontogen(float * zmid, float * ztop, float * zbot, float * ptop, float * pbot, int * mni, int * ni, int * nj, float * dx, float * dy, float * f, float * w1, float * w2, float * w3, float * dtdx, float * dtdy, float * qx, float * qy, float * fgen); */ - private static native void frontogen1(Object zmid, int zmid_byte_offset, Object ztop, int ztop_byte_offset, Object zbot, int zbot_byte_offset, Object ptop, int ptop_byte_offset, Object pbot, int pbot_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object dx, int dx_byte_offset, Object dy, int dy_byte_offset, Object f, int f_byte_offset, Object w1, int w1_byte_offset, Object w2, int w2_byte_offset, Object w3, int w3_byte_offset, Object dtdx, int dtdx_byte_offset, Object dtdy, int dtdy_byte_offset, Object qx, int qx_byte_offset, Object qy, int qy_byte_offset, Object fgen, int fgen_byte_offset); - - /** Interface to C language function:
void frontogen(float * zmid, float * ztop, float * zbot, float * ptop, float * pbot, int * mni, int * ni, int * nj, float * dx, float * dy, float * f, float * w1, float * w2, float * w3, float * dtdx, float * dtdy, float * qx, float * qy, float * fgen); */ - public static void frontogen(float[] zmid, int zmid_offset, float[] ztop, int ztop_offset, float[] zbot, int zbot_offset, float[] ptop, int ptop_offset, float[] pbot, int pbot_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset, float[] dx, int dx_offset, float[] dy, int dy_offset, float[] f, int f_offset, float[] w1, int w1_offset, float[] w2, int w2_offset, float[] w3, int w3_offset, float[] dtdx, int dtdx_offset, float[] dtdy, int dtdy_offset, float[] qx, int qx_offset, float[] qy, int qy_offset, float[] fgen, int fgen_offset) - { - if(zmid != null && zmid.length <= zmid_offset) - throw new RuntimeException("array offset argument \"zmid_offset\" (" + zmid_offset + ") equals or exceeds array length (" + zmid.length + ")"); - if(ztop != null && ztop.length <= ztop_offset) - throw new RuntimeException("array offset argument \"ztop_offset\" (" + ztop_offset + ") equals or exceeds array length (" + ztop.length + ")"); - if(zbot != null && zbot.length <= zbot_offset) - throw new RuntimeException("array offset argument \"zbot_offset\" (" + zbot_offset + ") equals or exceeds array length (" + zbot.length + ")"); - if(ptop != null && ptop.length <= ptop_offset) - throw new RuntimeException("array offset argument \"ptop_offset\" (" + ptop_offset + ") equals or exceeds array length (" + ptop.length + ")"); - if(pbot != null && pbot.length <= pbot_offset) - throw new RuntimeException("array offset argument \"pbot_offset\" (" + pbot_offset + ") equals or exceeds array length (" + pbot.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - if(dx != null && dx.length <= dx_offset) - throw new RuntimeException("array offset argument \"dx_offset\" (" + dx_offset + ") equals or exceeds array length (" + dx.length + ")"); - if(dy != null && dy.length <= dy_offset) - throw new RuntimeException("array offset argument \"dy_offset\" (" + dy_offset + ") equals or exceeds array length (" + dy.length + ")"); - if(f != null && f.length <= f_offset) - throw new RuntimeException("array offset argument \"f_offset\" (" + f_offset + ") equals or exceeds array length (" + f.length + ")"); - if(w1 != null && w1.length <= w1_offset) - throw new RuntimeException("array offset argument \"w1_offset\" (" + w1_offset + ") equals or exceeds array length (" + w1.length + ")"); - if(w2 != null && w2.length <= w2_offset) - throw new RuntimeException("array offset argument \"w2_offset\" (" + w2_offset + ") equals or exceeds array length (" + w2.length + ")"); - if(w3 != null && w3.length <= w3_offset) - throw new RuntimeException("array offset argument \"w3_offset\" (" + w3_offset + ") equals or exceeds array length (" + w3.length + ")"); - if(dtdx != null && dtdx.length <= dtdx_offset) - throw new RuntimeException("array offset argument \"dtdx_offset\" (" + dtdx_offset + ") equals or exceeds array length (" + dtdx.length + ")"); - if(dtdy != null && dtdy.length <= dtdy_offset) - throw new RuntimeException("array offset argument \"dtdy_offset\" (" + dtdy_offset + ") equals or exceeds array length (" + dtdy.length + ")"); - if(qx != null && qx.length <= qx_offset) - throw new RuntimeException("array offset argument \"qx_offset\" (" + qx_offset + ") equals or exceeds array length (" + qx.length + ")"); - if(qy != null && qy.length <= qy_offset) - throw new RuntimeException("array offset argument \"qy_offset\" (" + qy_offset + ") equals or exceeds array length (" + qy.length + ")"); - if(fgen != null && fgen.length <= fgen_offset) - throw new RuntimeException("array offset argument \"fgen_offset\" (" + fgen_offset + ") equals or exceeds array length (" + fgen.length + ")"); - frontogen1(zmid, BufferFactory.SIZEOF_FLOAT * zmid_offset, ztop, BufferFactory.SIZEOF_FLOAT * ztop_offset, zbot, BufferFactory.SIZEOF_FLOAT * zbot_offset, ptop, BufferFactory.SIZEOF_FLOAT * ptop_offset, pbot, BufferFactory.SIZEOF_FLOAT * pbot_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset, dx, BufferFactory.SIZEOF_FLOAT * dx_offset, dy, BufferFactory.SIZEOF_FLOAT * dy_offset, f, BufferFactory.SIZEOF_FLOAT * f_offset, w1, BufferFactory.SIZEOF_FLOAT * w1_offset, w2, BufferFactory.SIZEOF_FLOAT * w2_offset, w3, BufferFactory.SIZEOF_FLOAT * w3_offset, dtdx, BufferFactory.SIZEOF_FLOAT * dtdx_offset, dtdy, BufferFactory.SIZEOF_FLOAT * dtdy_offset, qx, BufferFactory.SIZEOF_FLOAT * qx_offset, qy, BufferFactory.SIZEOF_FLOAT * qy_offset, fgen, BufferFactory.SIZEOF_FLOAT * fgen_offset); - - } - - /** Interface to C language function:
void frzlev(float * ELEV, float * P, float * HT, float * T, int * NLVLS, float * PFRZ, float * HFRZ); */ - public static void frzlev(java.nio.FloatBuffer ELEV, java.nio.FloatBuffer P, java.nio.FloatBuffer HT, java.nio.FloatBuffer T, java.nio.IntBuffer NLVLS, java.nio.FloatBuffer PFRZ, java.nio.FloatBuffer HFRZ) - { - boolean _direct = BufferFactory.isDirect(ELEV); - if (P != null && _direct != BufferFactory.isDirect(P)) - throw new RuntimeException("Argument \"P\" : Buffers passed to this method must all be either direct or indirect"); - if (HT != null && _direct != BufferFactory.isDirect(HT)) - throw new RuntimeException("Argument \"HT\" : Buffers passed to this method must all be either direct or indirect"); - if (T != null && _direct != BufferFactory.isDirect(T)) - throw new RuntimeException("Argument \"T\" : Buffers passed to this method must all be either direct or indirect"); - if (NLVLS != null && _direct != BufferFactory.isDirect(NLVLS)) - throw new RuntimeException("Argument \"NLVLS\" : Buffers passed to this method must all be either direct or indirect"); - if (PFRZ != null && _direct != BufferFactory.isDirect(PFRZ)) - throw new RuntimeException("Argument \"PFRZ\" : Buffers passed to this method must all be either direct or indirect"); - if (HFRZ != null && _direct != BufferFactory.isDirect(HFRZ)) - throw new RuntimeException("Argument \"HFRZ\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - frzlev0(ELEV, BufferFactory.getDirectBufferByteOffset(ELEV), P, BufferFactory.getDirectBufferByteOffset(P), HT, BufferFactory.getDirectBufferByteOffset(HT), T, BufferFactory.getDirectBufferByteOffset(T), NLVLS, BufferFactory.getDirectBufferByteOffset(NLVLS), PFRZ, BufferFactory.getDirectBufferByteOffset(PFRZ), HFRZ, BufferFactory.getDirectBufferByteOffset(HFRZ)); - } else { - frzlev1(BufferFactory.getArray(ELEV), BufferFactory.getIndirectBufferByteOffset(ELEV), BufferFactory.getArray(P), BufferFactory.getIndirectBufferByteOffset(P), BufferFactory.getArray(HT), BufferFactory.getIndirectBufferByteOffset(HT), BufferFactory.getArray(T), BufferFactory.getIndirectBufferByteOffset(T), BufferFactory.getArray(NLVLS), BufferFactory.getIndirectBufferByteOffset(NLVLS), BufferFactory.getArray(PFRZ), BufferFactory.getIndirectBufferByteOffset(PFRZ), BufferFactory.getArray(HFRZ), BufferFactory.getIndirectBufferByteOffset(HFRZ)); - } - } - - /** Entry point to C language function:
void frzlev(float * ELEV, float * P, float * HT, float * T, int * NLVLS, float * PFRZ, float * HFRZ); */ - private static native void frzlev0(Object ELEV, int ELEV_byte_offset, Object P, int P_byte_offset, Object HT, int HT_byte_offset, Object T, int T_byte_offset, Object NLVLS, int NLVLS_byte_offset, Object PFRZ, int PFRZ_byte_offset, Object HFRZ, int HFRZ_byte_offset); - - /** Entry point to C language function:
void frzlev(float * ELEV, float * P, float * HT, float * T, int * NLVLS, float * PFRZ, float * HFRZ); */ - private static native void frzlev1(Object ELEV, int ELEV_byte_offset, Object P, int P_byte_offset, Object HT, int HT_byte_offset, Object T, int T_byte_offset, Object NLVLS, int NLVLS_byte_offset, Object PFRZ, int PFRZ_byte_offset, Object HFRZ, int HFRZ_byte_offset); - - /** Interface to C language function:
void frzlev(float * ELEV, float * P, float * HT, float * T, int * NLVLS, float * PFRZ, float * HFRZ); */ - public static void frzlev(float[] ELEV, int ELEV_offset, float[] P, int P_offset, float[] HT, int HT_offset, float[] T, int T_offset, int[] NLVLS, int NLVLS_offset, float[] PFRZ, int PFRZ_offset, float[] HFRZ, int HFRZ_offset) - { - if(ELEV != null && ELEV.length <= ELEV_offset) - throw new RuntimeException("array offset argument \"ELEV_offset\" (" + ELEV_offset + ") equals or exceeds array length (" + ELEV.length + ")"); - if(P != null && P.length <= P_offset) - throw new RuntimeException("array offset argument \"P_offset\" (" + P_offset + ") equals or exceeds array length (" + P.length + ")"); - if(HT != null && HT.length <= HT_offset) - throw new RuntimeException("array offset argument \"HT_offset\" (" + HT_offset + ") equals or exceeds array length (" + HT.length + ")"); - if(T != null && T.length <= T_offset) - throw new RuntimeException("array offset argument \"T_offset\" (" + T_offset + ") equals or exceeds array length (" + T.length + ")"); - if(NLVLS != null && NLVLS.length <= NLVLS_offset) - throw new RuntimeException("array offset argument \"NLVLS_offset\" (" + NLVLS_offset + ") equals or exceeds array length (" + NLVLS.length + ")"); - if(PFRZ != null && PFRZ.length <= PFRZ_offset) - throw new RuntimeException("array offset argument \"PFRZ_offset\" (" + PFRZ_offset + ") equals or exceeds array length (" + PFRZ.length + ")"); - if(HFRZ != null && HFRZ.length <= HFRZ_offset) - throw new RuntimeException("array offset argument \"HFRZ_offset\" (" + HFRZ_offset + ") equals or exceeds array length (" + HFRZ.length + ")"); - frzlev1(ELEV, BufferFactory.SIZEOF_FLOAT * ELEV_offset, P, BufferFactory.SIZEOF_FLOAT * P_offset, HT, BufferFactory.SIZEOF_FLOAT * HT_offset, T, BufferFactory.SIZEOF_FLOAT * T_offset, NLVLS, BufferFactory.SIZEOF_INT * NLVLS_offset, PFRZ, BufferFactory.SIZEOF_FLOAT * PFRZ_offset, HFRZ, BufferFactory.SIZEOF_FLOAT * HFRZ_offset); - - } - - /** Interface to C language function:
void fsdiverg(float * zmid, float * ztop, float * zbot, float * ptop, float * pbot, int * mni, int * ni, int * nj, float * dx, float * dy, float * f, float * fsx, float * fsy, float * w1, float * dtdx, float * dtdy, float * qx, float * qy, float * fsdiv); */ - public static void fsdiverg(java.nio.FloatBuffer zmid, java.nio.FloatBuffer ztop, java.nio.FloatBuffer zbot, java.nio.FloatBuffer ptop, java.nio.FloatBuffer pbot, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj, java.nio.FloatBuffer dx, java.nio.FloatBuffer dy, java.nio.FloatBuffer f, java.nio.FloatBuffer fsx, java.nio.FloatBuffer fsy, java.nio.FloatBuffer w1, java.nio.FloatBuffer dtdx, java.nio.FloatBuffer dtdy, java.nio.FloatBuffer qx, java.nio.FloatBuffer qy, java.nio.FloatBuffer fsdiv) - { - boolean _direct = BufferFactory.isDirect(zmid); - if (ztop != null && _direct != BufferFactory.isDirect(ztop)) - throw new RuntimeException("Argument \"ztop\" : Buffers passed to this method must all be either direct or indirect"); - if (zbot != null && _direct != BufferFactory.isDirect(zbot)) - throw new RuntimeException("Argument \"zbot\" : Buffers passed to this method must all be either direct or indirect"); - if (ptop != null && _direct != BufferFactory.isDirect(ptop)) - throw new RuntimeException("Argument \"ptop\" : Buffers passed to this method must all be either direct or indirect"); - if (pbot != null && _direct != BufferFactory.isDirect(pbot)) - throw new RuntimeException("Argument \"pbot\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (dx != null && _direct != BufferFactory.isDirect(dx)) - throw new RuntimeException("Argument \"dx\" : Buffers passed to this method must all be either direct or indirect"); - if (dy != null && _direct != BufferFactory.isDirect(dy)) - throw new RuntimeException("Argument \"dy\" : Buffers passed to this method must all be either direct or indirect"); - if (f != null && _direct != BufferFactory.isDirect(f)) - throw new RuntimeException("Argument \"f\" : Buffers passed to this method must all be either direct or indirect"); - if (fsx != null && _direct != BufferFactory.isDirect(fsx)) - throw new RuntimeException("Argument \"fsx\" : Buffers passed to this method must all be either direct or indirect"); - if (fsy != null && _direct != BufferFactory.isDirect(fsy)) - throw new RuntimeException("Argument \"fsy\" : Buffers passed to this method must all be either direct or indirect"); - if (w1 != null && _direct != BufferFactory.isDirect(w1)) - throw new RuntimeException("Argument \"w1\" : Buffers passed to this method must all be either direct or indirect"); - if (dtdx != null && _direct != BufferFactory.isDirect(dtdx)) - throw new RuntimeException("Argument \"dtdx\" : Buffers passed to this method must all be either direct or indirect"); - if (dtdy != null && _direct != BufferFactory.isDirect(dtdy)) - throw new RuntimeException("Argument \"dtdy\" : Buffers passed to this method must all be either direct or indirect"); - if (qx != null && _direct != BufferFactory.isDirect(qx)) - throw new RuntimeException("Argument \"qx\" : Buffers passed to this method must all be either direct or indirect"); - if (qy != null && _direct != BufferFactory.isDirect(qy)) - throw new RuntimeException("Argument \"qy\" : Buffers passed to this method must all be either direct or indirect"); - if (fsdiv != null && _direct != BufferFactory.isDirect(fsdiv)) - throw new RuntimeException("Argument \"fsdiv\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - fsdiverg0(zmid, BufferFactory.getDirectBufferByteOffset(zmid), ztop, BufferFactory.getDirectBufferByteOffset(ztop), zbot, BufferFactory.getDirectBufferByteOffset(zbot), ptop, BufferFactory.getDirectBufferByteOffset(ptop), pbot, BufferFactory.getDirectBufferByteOffset(pbot), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj), dx, BufferFactory.getDirectBufferByteOffset(dx), dy, BufferFactory.getDirectBufferByteOffset(dy), f, BufferFactory.getDirectBufferByteOffset(f), fsx, BufferFactory.getDirectBufferByteOffset(fsx), fsy, BufferFactory.getDirectBufferByteOffset(fsy), w1, BufferFactory.getDirectBufferByteOffset(w1), dtdx, BufferFactory.getDirectBufferByteOffset(dtdx), dtdy, BufferFactory.getDirectBufferByteOffset(dtdy), qx, BufferFactory.getDirectBufferByteOffset(qx), qy, BufferFactory.getDirectBufferByteOffset(qy), fsdiv, BufferFactory.getDirectBufferByteOffset(fsdiv)); - } else { - fsdiverg1(BufferFactory.getArray(zmid), BufferFactory.getIndirectBufferByteOffset(zmid), BufferFactory.getArray(ztop), BufferFactory.getIndirectBufferByteOffset(ztop), BufferFactory.getArray(zbot), BufferFactory.getIndirectBufferByteOffset(zbot), BufferFactory.getArray(ptop), BufferFactory.getIndirectBufferByteOffset(ptop), BufferFactory.getArray(pbot), BufferFactory.getIndirectBufferByteOffset(pbot), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj), BufferFactory.getArray(dx), BufferFactory.getIndirectBufferByteOffset(dx), BufferFactory.getArray(dy), BufferFactory.getIndirectBufferByteOffset(dy), BufferFactory.getArray(f), BufferFactory.getIndirectBufferByteOffset(f), BufferFactory.getArray(fsx), BufferFactory.getIndirectBufferByteOffset(fsx), BufferFactory.getArray(fsy), BufferFactory.getIndirectBufferByteOffset(fsy), BufferFactory.getArray(w1), BufferFactory.getIndirectBufferByteOffset(w1), BufferFactory.getArray(dtdx), BufferFactory.getIndirectBufferByteOffset(dtdx), BufferFactory.getArray(dtdy), BufferFactory.getIndirectBufferByteOffset(dtdy), BufferFactory.getArray(qx), BufferFactory.getIndirectBufferByteOffset(qx), BufferFactory.getArray(qy), BufferFactory.getIndirectBufferByteOffset(qy), BufferFactory.getArray(fsdiv), BufferFactory.getIndirectBufferByteOffset(fsdiv)); - } - } - - /** Entry point to C language function:
void fsdiverg(float * zmid, float * ztop, float * zbot, float * ptop, float * pbot, int * mni, int * ni, int * nj, float * dx, float * dy, float * f, float * fsx, float * fsy, float * w1, float * dtdx, float * dtdy, float * qx, float * qy, float * fsdiv); */ - private static native void fsdiverg0(Object zmid, int zmid_byte_offset, Object ztop, int ztop_byte_offset, Object zbot, int zbot_byte_offset, Object ptop, int ptop_byte_offset, Object pbot, int pbot_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object dx, int dx_byte_offset, Object dy, int dy_byte_offset, Object f, int f_byte_offset, Object fsx, int fsx_byte_offset, Object fsy, int fsy_byte_offset, Object w1, int w1_byte_offset, Object dtdx, int dtdx_byte_offset, Object dtdy, int dtdy_byte_offset, Object qx, int qx_byte_offset, Object qy, int qy_byte_offset, Object fsdiv, int fsdiv_byte_offset); - - /** Entry point to C language function:
void fsdiverg(float * zmid, float * ztop, float * zbot, float * ptop, float * pbot, int * mni, int * ni, int * nj, float * dx, float * dy, float * f, float * fsx, float * fsy, float * w1, float * dtdx, float * dtdy, float * qx, float * qy, float * fsdiv); */ - private static native void fsdiverg1(Object zmid, int zmid_byte_offset, Object ztop, int ztop_byte_offset, Object zbot, int zbot_byte_offset, Object ptop, int ptop_byte_offset, Object pbot, int pbot_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object dx, int dx_byte_offset, Object dy, int dy_byte_offset, Object f, int f_byte_offset, Object fsx, int fsx_byte_offset, Object fsy, int fsy_byte_offset, Object w1, int w1_byte_offset, Object dtdx, int dtdx_byte_offset, Object dtdy, int dtdy_byte_offset, Object qx, int qx_byte_offset, Object qy, int qy_byte_offset, Object fsdiv, int fsdiv_byte_offset); - - /** Interface to C language function:
void fsdiverg(float * zmid, float * ztop, float * zbot, float * ptop, float * pbot, int * mni, int * ni, int * nj, float * dx, float * dy, float * f, float * fsx, float * fsy, float * w1, float * dtdx, float * dtdy, float * qx, float * qy, float * fsdiv); */ - public static void fsdiverg(float[] zmid, int zmid_offset, float[] ztop, int ztop_offset, float[] zbot, int zbot_offset, float[] ptop, int ptop_offset, float[] pbot, int pbot_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset, float[] dx, int dx_offset, float[] dy, int dy_offset, float[] f, int f_offset, float[] fsx, int fsx_offset, float[] fsy, int fsy_offset, float[] w1, int w1_offset, float[] dtdx, int dtdx_offset, float[] dtdy, int dtdy_offset, float[] qx, int qx_offset, float[] qy, int qy_offset, float[] fsdiv, int fsdiv_offset) - { - if(zmid != null && zmid.length <= zmid_offset) - throw new RuntimeException("array offset argument \"zmid_offset\" (" + zmid_offset + ") equals or exceeds array length (" + zmid.length + ")"); - if(ztop != null && ztop.length <= ztop_offset) - throw new RuntimeException("array offset argument \"ztop_offset\" (" + ztop_offset + ") equals or exceeds array length (" + ztop.length + ")"); - if(zbot != null && zbot.length <= zbot_offset) - throw new RuntimeException("array offset argument \"zbot_offset\" (" + zbot_offset + ") equals or exceeds array length (" + zbot.length + ")"); - if(ptop != null && ptop.length <= ptop_offset) - throw new RuntimeException("array offset argument \"ptop_offset\" (" + ptop_offset + ") equals or exceeds array length (" + ptop.length + ")"); - if(pbot != null && pbot.length <= pbot_offset) - throw new RuntimeException("array offset argument \"pbot_offset\" (" + pbot_offset + ") equals or exceeds array length (" + pbot.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - if(dx != null && dx.length <= dx_offset) - throw new RuntimeException("array offset argument \"dx_offset\" (" + dx_offset + ") equals or exceeds array length (" + dx.length + ")"); - if(dy != null && dy.length <= dy_offset) - throw new RuntimeException("array offset argument \"dy_offset\" (" + dy_offset + ") equals or exceeds array length (" + dy.length + ")"); - if(f != null && f.length <= f_offset) - throw new RuntimeException("array offset argument \"f_offset\" (" + f_offset + ") equals or exceeds array length (" + f.length + ")"); - if(fsx != null && fsx.length <= fsx_offset) - throw new RuntimeException("array offset argument \"fsx_offset\" (" + fsx_offset + ") equals or exceeds array length (" + fsx.length + ")"); - if(fsy != null && fsy.length <= fsy_offset) - throw new RuntimeException("array offset argument \"fsy_offset\" (" + fsy_offset + ") equals or exceeds array length (" + fsy.length + ")"); - if(w1 != null && w1.length <= w1_offset) - throw new RuntimeException("array offset argument \"w1_offset\" (" + w1_offset + ") equals or exceeds array length (" + w1.length + ")"); - if(dtdx != null && dtdx.length <= dtdx_offset) - throw new RuntimeException("array offset argument \"dtdx_offset\" (" + dtdx_offset + ") equals or exceeds array length (" + dtdx.length + ")"); - if(dtdy != null && dtdy.length <= dtdy_offset) - throw new RuntimeException("array offset argument \"dtdy_offset\" (" + dtdy_offset + ") equals or exceeds array length (" + dtdy.length + ")"); - if(qx != null && qx.length <= qx_offset) - throw new RuntimeException("array offset argument \"qx_offset\" (" + qx_offset + ") equals or exceeds array length (" + qx.length + ")"); - if(qy != null && qy.length <= qy_offset) - throw new RuntimeException("array offset argument \"qy_offset\" (" + qy_offset + ") equals or exceeds array length (" + qy.length + ")"); - if(fsdiv != null && fsdiv.length <= fsdiv_offset) - throw new RuntimeException("array offset argument \"fsdiv_offset\" (" + fsdiv_offset + ") equals or exceeds array length (" + fsdiv.length + ")"); - fsdiverg1(zmid, BufferFactory.SIZEOF_FLOAT * zmid_offset, ztop, BufferFactory.SIZEOF_FLOAT * ztop_offset, zbot, BufferFactory.SIZEOF_FLOAT * zbot_offset, ptop, BufferFactory.SIZEOF_FLOAT * ptop_offset, pbot, BufferFactory.SIZEOF_FLOAT * pbot_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset, dx, BufferFactory.SIZEOF_FLOAT * dx_offset, dy, BufferFactory.SIZEOF_FLOAT * dy_offset, f, BufferFactory.SIZEOF_FLOAT * f_offset, fsx, BufferFactory.SIZEOF_FLOAT * fsx_offset, fsy, BufferFactory.SIZEOF_FLOAT * fsy_offset, w1, BufferFactory.SIZEOF_FLOAT * w1_offset, dtdx, BufferFactory.SIZEOF_FLOAT * dtdx_offset, dtdy, BufferFactory.SIZEOF_FLOAT * dtdy_offset, qx, BufferFactory.SIZEOF_FLOAT * qx_offset, qy, BufferFactory.SIZEOF_FLOAT * qy_offset, fsdiv, BufferFactory.SIZEOF_FLOAT * fsdiv_offset); - - } - - /** Interface to C language function:
void g2gkinematics(float * Udx, float * Vdy, float * Par, float * SpaX, float * SpaY, int * mnx, int * mny, int * nx, int * ny, int * choice, float * Scalar); */ - public static void g2gkinematics(java.nio.FloatBuffer Udx, java.nio.FloatBuffer Vdy, java.nio.FloatBuffer Par, java.nio.FloatBuffer SpaX, java.nio.FloatBuffer SpaY, java.nio.IntBuffer mnx, java.nio.IntBuffer mny, java.nio.IntBuffer nx, java.nio.IntBuffer ny, java.nio.IntBuffer choice, java.nio.FloatBuffer Scalar) - { - boolean _direct = BufferFactory.isDirect(Udx); - if (Vdy != null && _direct != BufferFactory.isDirect(Vdy)) - throw new RuntimeException("Argument \"Vdy\" : Buffers passed to this method must all be either direct or indirect"); - if (Par != null && _direct != BufferFactory.isDirect(Par)) - throw new RuntimeException("Argument \"Par\" : Buffers passed to this method must all be either direct or indirect"); - if (SpaX != null && _direct != BufferFactory.isDirect(SpaX)) - throw new RuntimeException("Argument \"SpaX\" : Buffers passed to this method must all be either direct or indirect"); - if (SpaY != null && _direct != BufferFactory.isDirect(SpaY)) - throw new RuntimeException("Argument \"SpaY\" : Buffers passed to this method must all be either direct or indirect"); - if (mnx != null && _direct != BufferFactory.isDirect(mnx)) - throw new RuntimeException("Argument \"mnx\" : Buffers passed to this method must all be either direct or indirect"); - if (mny != null && _direct != BufferFactory.isDirect(mny)) - throw new RuntimeException("Argument \"mny\" : Buffers passed to this method must all be either direct or indirect"); - if (nx != null && _direct != BufferFactory.isDirect(nx)) - throw new RuntimeException("Argument \"nx\" : Buffers passed to this method must all be either direct or indirect"); - if (ny != null && _direct != BufferFactory.isDirect(ny)) - throw new RuntimeException("Argument \"ny\" : Buffers passed to this method must all be either direct or indirect"); - if (choice != null && _direct != BufferFactory.isDirect(choice)) - throw new RuntimeException("Argument \"choice\" : Buffers passed to this method must all be either direct or indirect"); - if (Scalar != null && _direct != BufferFactory.isDirect(Scalar)) - throw new RuntimeException("Argument \"Scalar\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - g2gkinematics0(Udx, BufferFactory.getDirectBufferByteOffset(Udx), Vdy, BufferFactory.getDirectBufferByteOffset(Vdy), Par, BufferFactory.getDirectBufferByteOffset(Par), SpaX, BufferFactory.getDirectBufferByteOffset(SpaX), SpaY, BufferFactory.getDirectBufferByteOffset(SpaY), mnx, BufferFactory.getDirectBufferByteOffset(mnx), mny, BufferFactory.getDirectBufferByteOffset(mny), nx, BufferFactory.getDirectBufferByteOffset(nx), ny, BufferFactory.getDirectBufferByteOffset(ny), choice, BufferFactory.getDirectBufferByteOffset(choice), Scalar, BufferFactory.getDirectBufferByteOffset(Scalar)); - } else { - g2gkinematics1(BufferFactory.getArray(Udx), BufferFactory.getIndirectBufferByteOffset(Udx), BufferFactory.getArray(Vdy), BufferFactory.getIndirectBufferByteOffset(Vdy), BufferFactory.getArray(Par), BufferFactory.getIndirectBufferByteOffset(Par), BufferFactory.getArray(SpaX), BufferFactory.getIndirectBufferByteOffset(SpaX), BufferFactory.getArray(SpaY), BufferFactory.getIndirectBufferByteOffset(SpaY), BufferFactory.getArray(mnx), BufferFactory.getIndirectBufferByteOffset(mnx), BufferFactory.getArray(mny), BufferFactory.getIndirectBufferByteOffset(mny), BufferFactory.getArray(nx), BufferFactory.getIndirectBufferByteOffset(nx), BufferFactory.getArray(ny), BufferFactory.getIndirectBufferByteOffset(ny), BufferFactory.getArray(choice), BufferFactory.getIndirectBufferByteOffset(choice), BufferFactory.getArray(Scalar), BufferFactory.getIndirectBufferByteOffset(Scalar)); - } - } - - /** Entry point to C language function:
void g2gkinematics(float * Udx, float * Vdy, float * Par, float * SpaX, float * SpaY, int * mnx, int * mny, int * nx, int * ny, int * choice, float * Scalar); */ - private static native void g2gkinematics0(Object Udx, int Udx_byte_offset, Object Vdy, int Vdy_byte_offset, Object Par, int Par_byte_offset, Object SpaX, int SpaX_byte_offset, Object SpaY, int SpaY_byte_offset, Object mnx, int mnx_byte_offset, Object mny, int mny_byte_offset, Object nx, int nx_byte_offset, Object ny, int ny_byte_offset, Object choice, int choice_byte_offset, Object Scalar, int Scalar_byte_offset); - - /** Entry point to C language function:
void g2gkinematics(float * Udx, float * Vdy, float * Par, float * SpaX, float * SpaY, int * mnx, int * mny, int * nx, int * ny, int * choice, float * Scalar); */ - private static native void g2gkinematics1(Object Udx, int Udx_byte_offset, Object Vdy, int Vdy_byte_offset, Object Par, int Par_byte_offset, Object SpaX, int SpaX_byte_offset, Object SpaY, int SpaY_byte_offset, Object mnx, int mnx_byte_offset, Object mny, int mny_byte_offset, Object nx, int nx_byte_offset, Object ny, int ny_byte_offset, Object choice, int choice_byte_offset, Object Scalar, int Scalar_byte_offset); - - /** Interface to C language function:
void g2gkinematics(float * Udx, float * Vdy, float * Par, float * SpaX, float * SpaY, int * mnx, int * mny, int * nx, int * ny, int * choice, float * Scalar); */ - public static void g2gkinematics(float[] Udx, int Udx_offset, float[] Vdy, int Vdy_offset, float[] Par, int Par_offset, float[] SpaX, int SpaX_offset, float[] SpaY, int SpaY_offset, int[] mnx, int mnx_offset, int[] mny, int mny_offset, int[] nx, int nx_offset, int[] ny, int ny_offset, int[] choice, int choice_offset, float[] Scalar, int Scalar_offset) - { - if(Udx != null && Udx.length <= Udx_offset) - throw new RuntimeException("array offset argument \"Udx_offset\" (" + Udx_offset + ") equals or exceeds array length (" + Udx.length + ")"); - if(Vdy != null && Vdy.length <= Vdy_offset) - throw new RuntimeException("array offset argument \"Vdy_offset\" (" + Vdy_offset + ") equals or exceeds array length (" + Vdy.length + ")"); - if(Par != null && Par.length <= Par_offset) - throw new RuntimeException("array offset argument \"Par_offset\" (" + Par_offset + ") equals or exceeds array length (" + Par.length + ")"); - if(SpaX != null && SpaX.length <= SpaX_offset) - throw new RuntimeException("array offset argument \"SpaX_offset\" (" + SpaX_offset + ") equals or exceeds array length (" + SpaX.length + ")"); - if(SpaY != null && SpaY.length <= SpaY_offset) - throw new RuntimeException("array offset argument \"SpaY_offset\" (" + SpaY_offset + ") equals or exceeds array length (" + SpaY.length + ")"); - if(mnx != null && mnx.length <= mnx_offset) - throw new RuntimeException("array offset argument \"mnx_offset\" (" + mnx_offset + ") equals or exceeds array length (" + mnx.length + ")"); - if(mny != null && mny.length <= mny_offset) - throw new RuntimeException("array offset argument \"mny_offset\" (" + mny_offset + ") equals or exceeds array length (" + mny.length + ")"); - if(nx != null && nx.length <= nx_offset) - throw new RuntimeException("array offset argument \"nx_offset\" (" + nx_offset + ") equals or exceeds array length (" + nx.length + ")"); - if(ny != null && ny.length <= ny_offset) - throw new RuntimeException("array offset argument \"ny_offset\" (" + ny_offset + ") equals or exceeds array length (" + ny.length + ")"); - if(choice != null && choice.length <= choice_offset) - throw new RuntimeException("array offset argument \"choice_offset\" (" + choice_offset + ") equals or exceeds array length (" + choice.length + ")"); - if(Scalar != null && Scalar.length <= Scalar_offset) - throw new RuntimeException("array offset argument \"Scalar_offset\" (" + Scalar_offset + ") equals or exceeds array length (" + Scalar.length + ")"); - g2gkinematics1(Udx, BufferFactory.SIZEOF_FLOAT * Udx_offset, Vdy, BufferFactory.SIZEOF_FLOAT * Vdy_offset, Par, BufferFactory.SIZEOF_FLOAT * Par_offset, SpaX, BufferFactory.SIZEOF_FLOAT * SpaX_offset, SpaY, BufferFactory.SIZEOF_FLOAT * SpaY_offset, mnx, BufferFactory.SIZEOF_INT * mnx_offset, mny, BufferFactory.SIZEOF_INT * mny_offset, nx, BufferFactory.SIZEOF_INT * nx_offset, ny, BufferFactory.SIZEOF_INT * ny_offset, choice, BufferFactory.SIZEOF_INT * choice_offset, Scalar, BufferFactory.SIZEOF_FLOAT * Scalar_offset); - - } - - /** Interface to C language function:
void gusts(float * p, float * t, float * td, int * np, int * gstpot); */ - public static void gusts(java.nio.FloatBuffer p, java.nio.FloatBuffer t, java.nio.FloatBuffer td, java.nio.IntBuffer np, java.nio.IntBuffer gstpot) - { - boolean _direct = BufferFactory.isDirect(p); - if (t != null && _direct != BufferFactory.isDirect(t)) - throw new RuntimeException("Argument \"t\" : Buffers passed to this method must all be either direct or indirect"); - if (td != null && _direct != BufferFactory.isDirect(td)) - throw new RuntimeException("Argument \"td\" : Buffers passed to this method must all be either direct or indirect"); - if (np != null && _direct != BufferFactory.isDirect(np)) - throw new RuntimeException("Argument \"np\" : Buffers passed to this method must all be either direct or indirect"); - if (gstpot != null && _direct != BufferFactory.isDirect(gstpot)) - throw new RuntimeException("Argument \"gstpot\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - gusts0(p, BufferFactory.getDirectBufferByteOffset(p), t, BufferFactory.getDirectBufferByteOffset(t), td, BufferFactory.getDirectBufferByteOffset(td), np, BufferFactory.getDirectBufferByteOffset(np), gstpot, BufferFactory.getDirectBufferByteOffset(gstpot)); - } else { - gusts1(BufferFactory.getArray(p), BufferFactory.getIndirectBufferByteOffset(p), BufferFactory.getArray(t), BufferFactory.getIndirectBufferByteOffset(t), BufferFactory.getArray(td), BufferFactory.getIndirectBufferByteOffset(td), BufferFactory.getArray(np), BufferFactory.getIndirectBufferByteOffset(np), BufferFactory.getArray(gstpot), BufferFactory.getIndirectBufferByteOffset(gstpot)); - } - } - - /** Entry point to C language function:
void gusts(float * p, float * t, float * td, int * np, int * gstpot); */ - private static native void gusts0(Object p, int p_byte_offset, Object t, int t_byte_offset, Object td, int td_byte_offset, Object np, int np_byte_offset, Object gstpot, int gstpot_byte_offset); - - /** Entry point to C language function:
void gusts(float * p, float * t, float * td, int * np, int * gstpot); */ - private static native void gusts1(Object p, int p_byte_offset, Object t, int t_byte_offset, Object td, int td_byte_offset, Object np, int np_byte_offset, Object gstpot, int gstpot_byte_offset); - - /** Interface to C language function:
void gusts(float * p, float * t, float * td, int * np, int * gstpot); */ - public static void gusts(float[] p, int p_offset, float[] t, int t_offset, float[] td, int td_offset, int[] np, int np_offset, int[] gstpot, int gstpot_offset) - { - if(p != null && p.length <= p_offset) - throw new RuntimeException("array offset argument \"p_offset\" (" + p_offset + ") equals or exceeds array length (" + p.length + ")"); - if(t != null && t.length <= t_offset) - throw new RuntimeException("array offset argument \"t_offset\" (" + t_offset + ") equals or exceeds array length (" + t.length + ")"); - if(td != null && td.length <= td_offset) - throw new RuntimeException("array offset argument \"td_offset\" (" + td_offset + ") equals or exceeds array length (" + td.length + ")"); - if(np != null && np.length <= np_offset) - throw new RuntimeException("array offset argument \"np_offset\" (" + np_offset + ") equals or exceeds array length (" + np.length + ")"); - if(gstpot != null && gstpot.length <= gstpot_offset) - throw new RuntimeException("array offset argument \"gstpot_offset\" (" + gstpot_offset + ") equals or exceeds array length (" + gstpot.length + ")"); - gusts1(p, BufferFactory.SIZEOF_FLOAT * p_offset, t, BufferFactory.SIZEOF_FLOAT * t_offset, td, BufferFactory.SIZEOF_FLOAT * td_offset, np, BufferFactory.SIZEOF_INT * np_offset, gstpot, BufferFactory.SIZEOF_INT * gstpot_offset); - - } - - /** Interface to C language function:
void hailsiz(float * VVMAX, float * HSIZE); */ - public static void hailsiz(java.nio.FloatBuffer VVMAX, java.nio.FloatBuffer HSIZE) - { - boolean _direct = BufferFactory.isDirect(VVMAX); - if (HSIZE != null && _direct != BufferFactory.isDirect(HSIZE)) - throw new RuntimeException("Argument \"HSIZE\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - hailsiz0(VVMAX, BufferFactory.getDirectBufferByteOffset(VVMAX), HSIZE, BufferFactory.getDirectBufferByteOffset(HSIZE)); - } else { - hailsiz1(BufferFactory.getArray(VVMAX), BufferFactory.getIndirectBufferByteOffset(VVMAX), BufferFactory.getArray(HSIZE), BufferFactory.getIndirectBufferByteOffset(HSIZE)); - } - } - - /** Entry point to C language function:
void hailsiz(float * VVMAX, float * HSIZE); */ - private static native void hailsiz0(Object VVMAX, int VVMAX_byte_offset, Object HSIZE, int HSIZE_byte_offset); - - /** Entry point to C language function:
void hailsiz(float * VVMAX, float * HSIZE); */ - private static native void hailsiz1(Object VVMAX, int VVMAX_byte_offset, Object HSIZE, int HSIZE_byte_offset); - - /** Interface to C language function:
void hailsiz(float * VVMAX, float * HSIZE); */ - public static void hailsiz(float[] VVMAX, int VVMAX_offset, float[] HSIZE, int HSIZE_offset) - { - if(VVMAX != null && VVMAX.length <= VVMAX_offset) - throw new RuntimeException("array offset argument \"VVMAX_offset\" (" + VVMAX_offset + ") equals or exceeds array length (" + VVMAX.length + ")"); - if(HSIZE != null && HSIZE.length <= HSIZE_offset) - throw new RuntimeException("array offset argument \"HSIZE_offset\" (" + HSIZE_offset + ") equals or exceeds array length (" + HSIZE.length + ")"); - hailsiz1(VVMAX, BufferFactory.SIZEOF_FLOAT * VVMAX_offset, HSIZE, BufferFactory.SIZEOF_FLOAT * HSIZE_offset); - - } - - /** Interface to C language function:
void heliComp(const float * * u, const float * * v, float * umot, float * vmot, int mnx, int nx, int ny, int nz, float * heli); */ - public static void heliComp(java.nio.FloatBuffer[] u, java.nio.FloatBuffer[] v, java.nio.FloatBuffer umot, java.nio.FloatBuffer vmot, int mnx, int nx, int ny, int nz, java.nio.FloatBuffer heli) - { - int[] u_byte_offset_array = new int[u.length]; - if (u != null) { - for (int _ctr = 0; _ctr < u.length; _ctr++) { - if (!BufferFactory.isDirect(u[_ctr])) { - throw new RuntimeException("Element " + _ctr + " of argument \"u\" was not a direct buffer"); - } - u_byte_offset_array[_ctr] = BufferFactory.getDirectBufferByteOffset(u[_ctr]); - } - } - int[] v_byte_offset_array = new int[v.length]; - if (v != null) { - for (int _ctr = 0; _ctr < v.length; _ctr++) { - if (!BufferFactory.isDirect(v[_ctr])) { - throw new RuntimeException("Element " + _ctr + " of argument \"v\" was not a direct buffer"); - } - v_byte_offset_array[_ctr] = BufferFactory.getDirectBufferByteOffset(v[_ctr]); - } - } - boolean _direct = BufferFactory.isDirect(umot); - if (vmot != null && _direct != BufferFactory.isDirect(vmot)) - throw new RuntimeException("Argument \"vmot\" : Buffers passed to this method must all be either direct or indirect"); - if (heli != null && _direct != BufferFactory.isDirect(heli)) - throw new RuntimeException("Argument \"heli\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - heliComp0(u, u_byte_offset_array, v, v_byte_offset_array, umot, BufferFactory.getDirectBufferByteOffset(umot), vmot, BufferFactory.getDirectBufferByteOffset(vmot), mnx, nx, ny, nz, heli, BufferFactory.getDirectBufferByteOffset(heli)); - } else { - heliComp1(u, u_byte_offset_array, v, v_byte_offset_array, BufferFactory.getArray(umot), BufferFactory.getIndirectBufferByteOffset(umot), BufferFactory.getArray(vmot), BufferFactory.getIndirectBufferByteOffset(vmot), mnx, nx, ny, nz, BufferFactory.getArray(heli), BufferFactory.getIndirectBufferByteOffset(heli)); - } - } - - /** Entry point to C language function:
void heliComp(const float * * u, const float * * v, float * umot, float * vmot, int mnx, int nx, int ny, int nz, float * heli); */ - private static native void heliComp0(Object[] u, int[] u_byte_offset_array, Object[] v, int[] v_byte_offset_array, Object umot, int umot_byte_offset, Object vmot, int vmot_byte_offset, int mnx, int nx, int ny, int nz, Object heli, int heli_byte_offset); - - /** Entry point to C language function:
void heliComp(const float * * u, const float * * v, float * umot, float * vmot, int mnx, int nx, int ny, int nz, float * heli); */ - private static native void heliComp1(Object[] u, int[] u_byte_offset_array, Object[] v, int[] v_byte_offset_array, Object umot, int umot_byte_offset, Object vmot, int vmot_byte_offset, int mnx, int nx, int ny, int nz, Object heli, int heli_byte_offset); - - /** Interface to C language function:
void heliComp(const float * * u, const float * * v, float * umot, float * vmot, int mnx, int nx, int ny, int nz, float * heli); */ - public static void heliComp(java.nio.FloatBuffer[] u, java.nio.FloatBuffer[] v, float[] umot, int umot_offset, float[] vmot, int vmot_offset, int mnx, int nx, int ny, int nz, float[] heli, int heli_offset) - { - int[] u_byte_offset_array = new int[u.length]; - if (u != null) { - for (int _ctr = 0; _ctr < u.length; _ctr++) { - if (!BufferFactory.isDirect(u[_ctr])) { - throw new RuntimeException("Element " + _ctr + " of argument \"u\" was not a direct buffer"); - } - u_byte_offset_array[_ctr] = BufferFactory.getDirectBufferByteOffset(u[_ctr]); - } - } - int[] v_byte_offset_array = new int[v.length]; - if (v != null) { - for (int _ctr = 0; _ctr < v.length; _ctr++) { - if (!BufferFactory.isDirect(v[_ctr])) { - throw new RuntimeException("Element " + _ctr + " of argument \"v\" was not a direct buffer"); - } - v_byte_offset_array[_ctr] = BufferFactory.getDirectBufferByteOffset(v[_ctr]); - } - } - if(umot != null && umot.length <= umot_offset) - throw new RuntimeException("array offset argument \"umot_offset\" (" + umot_offset + ") equals or exceeds array length (" + umot.length + ")"); - if(vmot != null && vmot.length <= vmot_offset) - throw new RuntimeException("array offset argument \"vmot_offset\" (" + vmot_offset + ") equals or exceeds array length (" + vmot.length + ")"); - if(heli != null && heli.length <= heli_offset) - throw new RuntimeException("array offset argument \"heli_offset\" (" + heli_offset + ") equals or exceeds array length (" + heli.length + ")"); - heliComp1(u, u_byte_offset_array, v, v_byte_offset_array, umot, BufferFactory.SIZEOF_FLOAT * umot_offset, vmot, BufferFactory.SIZEOF_FLOAT * vmot_offset, mnx, nx, ny, nz, heli, BufferFactory.SIZEOF_FLOAT * heli_offset); - - } - - /** Interface to C language function:
void hgt2pres(float * z, float * p, int * mni, int * ni, int * nj); */ - public static void hgt2pres(java.nio.FloatBuffer z, java.nio.FloatBuffer p, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj) - { - boolean _direct = BufferFactory.isDirect(z); - if (p != null && _direct != BufferFactory.isDirect(p)) - throw new RuntimeException("Argument \"p\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - hgt2pres0(z, BufferFactory.getDirectBufferByteOffset(z), p, BufferFactory.getDirectBufferByteOffset(p), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj)); - } else { - hgt2pres1(BufferFactory.getArray(z), BufferFactory.getIndirectBufferByteOffset(z), BufferFactory.getArray(p), BufferFactory.getIndirectBufferByteOffset(p), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj)); - } - } - - /** Entry point to C language function:
void hgt2pres(float * z, float * p, int * mni, int * ni, int * nj); */ - private static native void hgt2pres0(Object z, int z_byte_offset, Object p, int p_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset); - - /** Entry point to C language function:
void hgt2pres(float * z, float * p, int * mni, int * ni, int * nj); */ - private static native void hgt2pres1(Object z, int z_byte_offset, Object p, int p_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset); - - /** Interface to C language function:
void hgt2pres(float * z, float * p, int * mni, int * ni, int * nj); */ - public static void hgt2pres(float[] z, int z_offset, float[] p, int p_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset) - { - if(z != null && z.length <= z_offset) - throw new RuntimeException("array offset argument \"z_offset\" (" + z_offset + ") equals or exceeds array length (" + z.length + ")"); - if(p != null && p.length <= p_offset) - throw new RuntimeException("array offset argument \"p_offset\" (" + p_offset + ") equals or exceeds array length (" + p.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - hgt2pres1(z, BufferFactory.SIZEOF_FLOAT * z_offset, p, BufferFactory.SIZEOF_FLOAT * p_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset); - - } - - /** Interface to C language function:
void interp(float p1, float p2, float temp1, float temp2, float td1, float td2, float levelP, float * interT, float * interTd); */ - public static void interp(float p1, float p2, float temp1, float temp2, float td1, float td2, float levelP, java.nio.FloatBuffer interT, java.nio.FloatBuffer interTd) - { - boolean _direct = BufferFactory.isDirect(interT); - if (interTd != null && _direct != BufferFactory.isDirect(interTd)) - throw new RuntimeException("Argument \"interTd\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - interp0(p1, p2, temp1, temp2, td1, td2, levelP, interT, BufferFactory.getDirectBufferByteOffset(interT), interTd, BufferFactory.getDirectBufferByteOffset(interTd)); - } else { - interp1(p1, p2, temp1, temp2, td1, td2, levelP, BufferFactory.getArray(interT), BufferFactory.getIndirectBufferByteOffset(interT), BufferFactory.getArray(interTd), BufferFactory.getIndirectBufferByteOffset(interTd)); - } - } - - /** Entry point to C language function:
void interp(float p1, float p2, float temp1, float temp2, float td1, float td2, float levelP, float * interT, float * interTd); */ - private static native void interp0(float p1, float p2, float temp1, float temp2, float td1, float td2, float levelP, Object interT, int interT_byte_offset, Object interTd, int interTd_byte_offset); - - /** Entry point to C language function:
void interp(float p1, float p2, float temp1, float temp2, float td1, float td2, float levelP, float * interT, float * interTd); */ - private static native void interp1(float p1, float p2, float temp1, float temp2, float td1, float td2, float levelP, Object interT, int interT_byte_offset, Object interTd, int interTd_byte_offset); - - /** Interface to C language function:
void interp(float p1, float p2, float temp1, float temp2, float td1, float td2, float levelP, float * interT, float * interTd); */ - public static void interp(float p1, float p2, float temp1, float temp2, float td1, float td2, float levelP, float[] interT, int interT_offset, float[] interTd, int interTd_offset) - { - if(interT != null && interT.length <= interT_offset) - throw new RuntimeException("array offset argument \"interT_offset\" (" + interT_offset + ") equals or exceeds array length (" + interT.length + ")"); - if(interTd != null && interTd.length <= interTd_offset) - throw new RuntimeException("array offset argument \"interTd_offset\" (" + interTd_offset + ") equals or exceeds array length (" + interTd.length + ")"); - interp1(p1, p2, temp1, temp2, td1, td2, levelP, interT, BufferFactory.SIZEOF_FLOAT * interT_offset, interTd, BufferFactory.SIZEOF_FLOAT * interTd_offset); - - } - - /** Interface to C language function:
float interp1(float * , float * , float * , float * , float * ); */ - public static float interp1(java.nio.FloatBuffer arg0, java.nio.FloatBuffer arg1, java.nio.FloatBuffer arg2, java.nio.FloatBuffer arg3, java.nio.FloatBuffer arg4) - { - boolean _direct = BufferFactory.isDirect(arg0); - if (arg1 != null && _direct != BufferFactory.isDirect(arg1)) - throw new RuntimeException("Argument \"arg1\" : Buffers passed to this method must all be either direct or indirect"); - if (arg2 != null && _direct != BufferFactory.isDirect(arg2)) - throw new RuntimeException("Argument \"arg2\" : Buffers passed to this method must all be either direct or indirect"); - if (arg3 != null && _direct != BufferFactory.isDirect(arg3)) - throw new RuntimeException("Argument \"arg3\" : Buffers passed to this method must all be either direct or indirect"); - if (arg4 != null && _direct != BufferFactory.isDirect(arg4)) - throw new RuntimeException("Argument \"arg4\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - return interp10(arg0, BufferFactory.getDirectBufferByteOffset(arg0), arg1, BufferFactory.getDirectBufferByteOffset(arg1), arg2, BufferFactory.getDirectBufferByteOffset(arg2), arg3, BufferFactory.getDirectBufferByteOffset(arg3), arg4, BufferFactory.getDirectBufferByteOffset(arg4)); - } else { - return interp11(BufferFactory.getArray(arg0), BufferFactory.getIndirectBufferByteOffset(arg0), BufferFactory.getArray(arg1), BufferFactory.getIndirectBufferByteOffset(arg1), BufferFactory.getArray(arg2), BufferFactory.getIndirectBufferByteOffset(arg2), BufferFactory.getArray(arg3), BufferFactory.getIndirectBufferByteOffset(arg3), BufferFactory.getArray(arg4), BufferFactory.getIndirectBufferByteOffset(arg4)); - } - } - - /** Entry point to C language function:
float interp1(float * , float * , float * , float * , float * ); */ - private static native float interp10(Object arg0, int arg0_byte_offset, Object arg1, int arg1_byte_offset, Object arg2, int arg2_byte_offset, Object arg3, int arg3_byte_offset, Object arg4, int arg4_byte_offset); - - /** Entry point to C language function:
float interp1(float * , float * , float * , float * , float * ); */ - private static native float interp11(Object arg0, int arg0_byte_offset, Object arg1, int arg1_byte_offset, Object arg2, int arg2_byte_offset, Object arg3, int arg3_byte_offset, Object arg4, int arg4_byte_offset); - - /** Interface to C language function:
float interp1(float * , float * , float * , float * , float * ); */ - public static float interp1(float[] arg0, int arg0_offset, float[] arg1, int arg1_offset, float[] arg2, int arg2_offset, float[] arg3, int arg3_offset, float[] arg4, int arg4_offset) - { - if(arg0 != null && arg0.length <= arg0_offset) - throw new RuntimeException("array offset argument \"arg0_offset\" (" + arg0_offset + ") equals or exceeds array length (" + arg0.length + ")"); - if(arg1 != null && arg1.length <= arg1_offset) - throw new RuntimeException("array offset argument \"arg1_offset\" (" + arg1_offset + ") equals or exceeds array length (" + arg1.length + ")"); - if(arg2 != null && arg2.length <= arg2_offset) - throw new RuntimeException("array offset argument \"arg2_offset\" (" + arg2_offset + ") equals or exceeds array length (" + arg2.length + ")"); - if(arg3 != null && arg3.length <= arg3_offset) - throw new RuntimeException("array offset argument \"arg3_offset\" (" + arg3_offset + ") equals or exceeds array length (" + arg3.length + ")"); - if(arg4 != null && arg4.length <= arg4_offset) - throw new RuntimeException("array offset argument \"arg4_offset\" (" + arg4_offset + ") equals or exceeds array length (" + arg4.length + ")"); - return interp11(arg0, BufferFactory.SIZEOF_FLOAT * arg0_offset, arg1, BufferFactory.SIZEOF_FLOAT * arg1_offset, arg2, BufferFactory.SIZEOF_FLOAT * arg2_offset, arg3, BufferFactory.SIZEOF_FLOAT * arg3_offset, arg4, BufferFactory.SIZEOF_FLOAT * arg4_offset); - - } - - /** Interface to C language function:
void intpos(float * VDIF, float * HT, float * P, float * T, int * NLVLS); */ - public static void intpos(java.nio.FloatBuffer VDIF, java.nio.FloatBuffer HT, java.nio.FloatBuffer P, java.nio.FloatBuffer T, java.nio.IntBuffer NLVLS) - { - boolean _direct = BufferFactory.isDirect(VDIF); - if (HT != null && _direct != BufferFactory.isDirect(HT)) - throw new RuntimeException("Argument \"HT\" : Buffers passed to this method must all be either direct or indirect"); - if (P != null && _direct != BufferFactory.isDirect(P)) - throw new RuntimeException("Argument \"P\" : Buffers passed to this method must all be either direct or indirect"); - if (T != null && _direct != BufferFactory.isDirect(T)) - throw new RuntimeException("Argument \"T\" : Buffers passed to this method must all be either direct or indirect"); - if (NLVLS != null && _direct != BufferFactory.isDirect(NLVLS)) - throw new RuntimeException("Argument \"NLVLS\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - intpos0(VDIF, BufferFactory.getDirectBufferByteOffset(VDIF), HT, BufferFactory.getDirectBufferByteOffset(HT), P, BufferFactory.getDirectBufferByteOffset(P), T, BufferFactory.getDirectBufferByteOffset(T), NLVLS, BufferFactory.getDirectBufferByteOffset(NLVLS)); - } else { - intpos1(BufferFactory.getArray(VDIF), BufferFactory.getIndirectBufferByteOffset(VDIF), BufferFactory.getArray(HT), BufferFactory.getIndirectBufferByteOffset(HT), BufferFactory.getArray(P), BufferFactory.getIndirectBufferByteOffset(P), BufferFactory.getArray(T), BufferFactory.getIndirectBufferByteOffset(T), BufferFactory.getArray(NLVLS), BufferFactory.getIndirectBufferByteOffset(NLVLS)); - } - } - - /** Entry point to C language function:
void intpos(float * VDIF, float * HT, float * P, float * T, int * NLVLS); */ - private static native void intpos0(Object VDIF, int VDIF_byte_offset, Object HT, int HT_byte_offset, Object P, int P_byte_offset, Object T, int T_byte_offset, Object NLVLS, int NLVLS_byte_offset); - - /** Entry point to C language function:
void intpos(float * VDIF, float * HT, float * P, float * T, int * NLVLS); */ - private static native void intpos1(Object VDIF, int VDIF_byte_offset, Object HT, int HT_byte_offset, Object P, int P_byte_offset, Object T, int T_byte_offset, Object NLVLS, int NLVLS_byte_offset); - - /** Interface to C language function:
void intpos(float * VDIF, float * HT, float * P, float * T, int * NLVLS); */ - public static void intpos(float[] VDIF, int VDIF_offset, float[] HT, int HT_offset, float[] P, int P_offset, float[] T, int T_offset, int[] NLVLS, int NLVLS_offset) - { - if(VDIF != null && VDIF.length <= VDIF_offset) - throw new RuntimeException("array offset argument \"VDIF_offset\" (" + VDIF_offset + ") equals or exceeds array length (" + VDIF.length + ")"); - if(HT != null && HT.length <= HT_offset) - throw new RuntimeException("array offset argument \"HT_offset\" (" + HT_offset + ") equals or exceeds array length (" + HT.length + ")"); - if(P != null && P.length <= P_offset) - throw new RuntimeException("array offset argument \"P_offset\" (" + P_offset + ") equals or exceeds array length (" + P.length + ")"); - if(T != null && T.length <= T_offset) - throw new RuntimeException("array offset argument \"T_offset\" (" + T_offset + ") equals or exceeds array length (" + T.length + ")"); - if(NLVLS != null && NLVLS.length <= NLVLS_offset) - throw new RuntimeException("array offset argument \"NLVLS_offset\" (" + NLVLS_offset + ") equals or exceeds array length (" + NLVLS.length + ")"); - intpos1(VDIF, BufferFactory.SIZEOF_FLOAT * VDIF_offset, HT, BufferFactory.SIZEOF_FLOAT * HT_offset, P, BufferFactory.SIZEOF_FLOAT * P_offset, T, BufferFactory.SIZEOF_FLOAT * T_offset, NLVLS, BufferFactory.SIZEOF_INT * NLVLS_offset); - - } - - /** Interface to C language function:
void lapserate(float * tlo, float * pzlo, float * thi, float * pzhi, int * vc, int * mnx, int * nx, int * ny, float * lapse); */ - public static void lapserate(java.nio.FloatBuffer tlo, java.nio.FloatBuffer pzlo, java.nio.FloatBuffer thi, java.nio.FloatBuffer pzhi, java.nio.IntBuffer vc, java.nio.IntBuffer mnx, java.nio.IntBuffer nx, java.nio.IntBuffer ny, java.nio.FloatBuffer lapse) - { - boolean _direct = BufferFactory.isDirect(tlo); - if (pzlo != null && _direct != BufferFactory.isDirect(pzlo)) - throw new RuntimeException("Argument \"pzlo\" : Buffers passed to this method must all be either direct or indirect"); - if (thi != null && _direct != BufferFactory.isDirect(thi)) - throw new RuntimeException("Argument \"thi\" : Buffers passed to this method must all be either direct or indirect"); - if (pzhi != null && _direct != BufferFactory.isDirect(pzhi)) - throw new RuntimeException("Argument \"pzhi\" : Buffers passed to this method must all be either direct or indirect"); - if (vc != null && _direct != BufferFactory.isDirect(vc)) - throw new RuntimeException("Argument \"vc\" : Buffers passed to this method must all be either direct or indirect"); - if (mnx != null && _direct != BufferFactory.isDirect(mnx)) - throw new RuntimeException("Argument \"mnx\" : Buffers passed to this method must all be either direct or indirect"); - if (nx != null && _direct != BufferFactory.isDirect(nx)) - throw new RuntimeException("Argument \"nx\" : Buffers passed to this method must all be either direct or indirect"); - if (ny != null && _direct != BufferFactory.isDirect(ny)) - throw new RuntimeException("Argument \"ny\" : Buffers passed to this method must all be either direct or indirect"); - if (lapse != null && _direct != BufferFactory.isDirect(lapse)) - throw new RuntimeException("Argument \"lapse\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - lapserate0(tlo, BufferFactory.getDirectBufferByteOffset(tlo), pzlo, BufferFactory.getDirectBufferByteOffset(pzlo), thi, BufferFactory.getDirectBufferByteOffset(thi), pzhi, BufferFactory.getDirectBufferByteOffset(pzhi), vc, BufferFactory.getDirectBufferByteOffset(vc), mnx, BufferFactory.getDirectBufferByteOffset(mnx), nx, BufferFactory.getDirectBufferByteOffset(nx), ny, BufferFactory.getDirectBufferByteOffset(ny), lapse, BufferFactory.getDirectBufferByteOffset(lapse)); - } else { - lapserate1(BufferFactory.getArray(tlo), BufferFactory.getIndirectBufferByteOffset(tlo), BufferFactory.getArray(pzlo), BufferFactory.getIndirectBufferByteOffset(pzlo), BufferFactory.getArray(thi), BufferFactory.getIndirectBufferByteOffset(thi), BufferFactory.getArray(pzhi), BufferFactory.getIndirectBufferByteOffset(pzhi), BufferFactory.getArray(vc), BufferFactory.getIndirectBufferByteOffset(vc), BufferFactory.getArray(mnx), BufferFactory.getIndirectBufferByteOffset(mnx), BufferFactory.getArray(nx), BufferFactory.getIndirectBufferByteOffset(nx), BufferFactory.getArray(ny), BufferFactory.getIndirectBufferByteOffset(ny), BufferFactory.getArray(lapse), BufferFactory.getIndirectBufferByteOffset(lapse)); - } - } - - /** Entry point to C language function:
void lapserate(float * tlo, float * pzlo, float * thi, float * pzhi, int * vc, int * mnx, int * nx, int * ny, float * lapse); */ - private static native void lapserate0(Object tlo, int tlo_byte_offset, Object pzlo, int pzlo_byte_offset, Object thi, int thi_byte_offset, Object pzhi, int pzhi_byte_offset, Object vc, int vc_byte_offset, Object mnx, int mnx_byte_offset, Object nx, int nx_byte_offset, Object ny, int ny_byte_offset, Object lapse, int lapse_byte_offset); - - /** Entry point to C language function:
void lapserate(float * tlo, float * pzlo, float * thi, float * pzhi, int * vc, int * mnx, int * nx, int * ny, float * lapse); */ - private static native void lapserate1(Object tlo, int tlo_byte_offset, Object pzlo, int pzlo_byte_offset, Object thi, int thi_byte_offset, Object pzhi, int pzhi_byte_offset, Object vc, int vc_byte_offset, Object mnx, int mnx_byte_offset, Object nx, int nx_byte_offset, Object ny, int ny_byte_offset, Object lapse, int lapse_byte_offset); - - /** Interface to C language function:
void lapserate(float * tlo, float * pzlo, float * thi, float * pzhi, int * vc, int * mnx, int * nx, int * ny, float * lapse); */ - public static void lapserate(float[] tlo, int tlo_offset, float[] pzlo, int pzlo_offset, float[] thi, int thi_offset, float[] pzhi, int pzhi_offset, int[] vc, int vc_offset, int[] mnx, int mnx_offset, int[] nx, int nx_offset, int[] ny, int ny_offset, float[] lapse, int lapse_offset) - { - if(tlo != null && tlo.length <= tlo_offset) - throw new RuntimeException("array offset argument \"tlo_offset\" (" + tlo_offset + ") equals or exceeds array length (" + tlo.length + ")"); - if(pzlo != null && pzlo.length <= pzlo_offset) - throw new RuntimeException("array offset argument \"pzlo_offset\" (" + pzlo_offset + ") equals or exceeds array length (" + pzlo.length + ")"); - if(thi != null && thi.length <= thi_offset) - throw new RuntimeException("array offset argument \"thi_offset\" (" + thi_offset + ") equals or exceeds array length (" + thi.length + ")"); - if(pzhi != null && pzhi.length <= pzhi_offset) - throw new RuntimeException("array offset argument \"pzhi_offset\" (" + pzhi_offset + ") equals or exceeds array length (" + pzhi.length + ")"); - if(vc != null && vc.length <= vc_offset) - throw new RuntimeException("array offset argument \"vc_offset\" (" + vc_offset + ") equals or exceeds array length (" + vc.length + ")"); - if(mnx != null && mnx.length <= mnx_offset) - throw new RuntimeException("array offset argument \"mnx_offset\" (" + mnx_offset + ") equals or exceeds array length (" + mnx.length + ")"); - if(nx != null && nx.length <= nx_offset) - throw new RuntimeException("array offset argument \"nx_offset\" (" + nx_offset + ") equals or exceeds array length (" + nx.length + ")"); - if(ny != null && ny.length <= ny_offset) - throw new RuntimeException("array offset argument \"ny_offset\" (" + ny_offset + ") equals or exceeds array length (" + ny.length + ")"); - if(lapse != null && lapse.length <= lapse_offset) - throw new RuntimeException("array offset argument \"lapse_offset\" (" + lapse_offset + ") equals or exceeds array length (" + lapse.length + ")"); - lapserate1(tlo, BufferFactory.SIZEOF_FLOAT * tlo_offset, pzlo, BufferFactory.SIZEOF_FLOAT * pzlo_offset, thi, BufferFactory.SIZEOF_FLOAT * thi_offset, pzhi, BufferFactory.SIZEOF_FLOAT * pzhi_offset, vc, BufferFactory.SIZEOF_INT * vc_offset, mnx, BufferFactory.SIZEOF_INT * mnx_offset, nx, BufferFactory.SIZEOF_INT * nx_offset, ny, BufferFactory.SIZEOF_INT * ny_offset, lapse, BufferFactory.SIZEOF_FLOAT * lapse_offset); - - } - - /** Interface to C language function:
void lclpar(float * MIX, float * TS, float * P, float * HT, float * T, float * TD, int * NLVLS, float * PLCL, float * TLCL, float * HLCL); */ - public static void lclpar(java.nio.FloatBuffer MIX, java.nio.FloatBuffer TS, java.nio.FloatBuffer P, java.nio.FloatBuffer HT, java.nio.FloatBuffer T, java.nio.FloatBuffer TD, java.nio.IntBuffer NLVLS, java.nio.FloatBuffer PLCL, java.nio.FloatBuffer TLCL, java.nio.FloatBuffer HLCL) - { - boolean _direct = BufferFactory.isDirect(MIX); - if (TS != null && _direct != BufferFactory.isDirect(TS)) - throw new RuntimeException("Argument \"TS\" : Buffers passed to this method must all be either direct or indirect"); - if (P != null && _direct != BufferFactory.isDirect(P)) - throw new RuntimeException("Argument \"P\" : Buffers passed to this method must all be either direct or indirect"); - if (HT != null && _direct != BufferFactory.isDirect(HT)) - throw new RuntimeException("Argument \"HT\" : Buffers passed to this method must all be either direct or indirect"); - if (T != null && _direct != BufferFactory.isDirect(T)) - throw new RuntimeException("Argument \"T\" : Buffers passed to this method must all be either direct or indirect"); - if (TD != null && _direct != BufferFactory.isDirect(TD)) - throw new RuntimeException("Argument \"TD\" : Buffers passed to this method must all be either direct or indirect"); - if (NLVLS != null && _direct != BufferFactory.isDirect(NLVLS)) - throw new RuntimeException("Argument \"NLVLS\" : Buffers passed to this method must all be either direct or indirect"); - if (PLCL != null && _direct != BufferFactory.isDirect(PLCL)) - throw new RuntimeException("Argument \"PLCL\" : Buffers passed to this method must all be either direct or indirect"); - if (TLCL != null && _direct != BufferFactory.isDirect(TLCL)) - throw new RuntimeException("Argument \"TLCL\" : Buffers passed to this method must all be either direct or indirect"); - if (HLCL != null && _direct != BufferFactory.isDirect(HLCL)) - throw new RuntimeException("Argument \"HLCL\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - lclpar0(MIX, BufferFactory.getDirectBufferByteOffset(MIX), TS, BufferFactory.getDirectBufferByteOffset(TS), P, BufferFactory.getDirectBufferByteOffset(P), HT, BufferFactory.getDirectBufferByteOffset(HT), T, BufferFactory.getDirectBufferByteOffset(T), TD, BufferFactory.getDirectBufferByteOffset(TD), NLVLS, BufferFactory.getDirectBufferByteOffset(NLVLS), PLCL, BufferFactory.getDirectBufferByteOffset(PLCL), TLCL, BufferFactory.getDirectBufferByteOffset(TLCL), HLCL, BufferFactory.getDirectBufferByteOffset(HLCL)); - } else { - lclpar1(BufferFactory.getArray(MIX), BufferFactory.getIndirectBufferByteOffset(MIX), BufferFactory.getArray(TS), BufferFactory.getIndirectBufferByteOffset(TS), BufferFactory.getArray(P), BufferFactory.getIndirectBufferByteOffset(P), BufferFactory.getArray(HT), BufferFactory.getIndirectBufferByteOffset(HT), BufferFactory.getArray(T), BufferFactory.getIndirectBufferByteOffset(T), BufferFactory.getArray(TD), BufferFactory.getIndirectBufferByteOffset(TD), BufferFactory.getArray(NLVLS), BufferFactory.getIndirectBufferByteOffset(NLVLS), BufferFactory.getArray(PLCL), BufferFactory.getIndirectBufferByteOffset(PLCL), BufferFactory.getArray(TLCL), BufferFactory.getIndirectBufferByteOffset(TLCL), BufferFactory.getArray(HLCL), BufferFactory.getIndirectBufferByteOffset(HLCL)); - } - } - - /** Entry point to C language function:
void lclpar(float * MIX, float * TS, float * P, float * HT, float * T, float * TD, int * NLVLS, float * PLCL, float * TLCL, float * HLCL); */ - private static native void lclpar0(Object MIX, int MIX_byte_offset, Object TS, int TS_byte_offset, Object P, int P_byte_offset, Object HT, int HT_byte_offset, Object T, int T_byte_offset, Object TD, int TD_byte_offset, Object NLVLS, int NLVLS_byte_offset, Object PLCL, int PLCL_byte_offset, Object TLCL, int TLCL_byte_offset, Object HLCL, int HLCL_byte_offset); - - /** Entry point to C language function:
void lclpar(float * MIX, float * TS, float * P, float * HT, float * T, float * TD, int * NLVLS, float * PLCL, float * TLCL, float * HLCL); */ - private static native void lclpar1(Object MIX, int MIX_byte_offset, Object TS, int TS_byte_offset, Object P, int P_byte_offset, Object HT, int HT_byte_offset, Object T, int T_byte_offset, Object TD, int TD_byte_offset, Object NLVLS, int NLVLS_byte_offset, Object PLCL, int PLCL_byte_offset, Object TLCL, int TLCL_byte_offset, Object HLCL, int HLCL_byte_offset); - - /** Interface to C language function:
void lclpar(float * MIX, float * TS, float * P, float * HT, float * T, float * TD, int * NLVLS, float * PLCL, float * TLCL, float * HLCL); */ - public static void lclpar(float[] MIX, int MIX_offset, float[] TS, int TS_offset, float[] P, int P_offset, float[] HT, int HT_offset, float[] T, int T_offset, float[] TD, int TD_offset, int[] NLVLS, int NLVLS_offset, float[] PLCL, int PLCL_offset, float[] TLCL, int TLCL_offset, float[] HLCL, int HLCL_offset) - { - if(MIX != null && MIX.length <= MIX_offset) - throw new RuntimeException("array offset argument \"MIX_offset\" (" + MIX_offset + ") equals or exceeds array length (" + MIX.length + ")"); - if(TS != null && TS.length <= TS_offset) - throw new RuntimeException("array offset argument \"TS_offset\" (" + TS_offset + ") equals or exceeds array length (" + TS.length + ")"); - if(P != null && P.length <= P_offset) - throw new RuntimeException("array offset argument \"P_offset\" (" + P_offset + ") equals or exceeds array length (" + P.length + ")"); - if(HT != null && HT.length <= HT_offset) - throw new RuntimeException("array offset argument \"HT_offset\" (" + HT_offset + ") equals or exceeds array length (" + HT.length + ")"); - if(T != null && T.length <= T_offset) - throw new RuntimeException("array offset argument \"T_offset\" (" + T_offset + ") equals or exceeds array length (" + T.length + ")"); - if(TD != null && TD.length <= TD_offset) - throw new RuntimeException("array offset argument \"TD_offset\" (" + TD_offset + ") equals or exceeds array length (" + TD.length + ")"); - if(NLVLS != null && NLVLS.length <= NLVLS_offset) - throw new RuntimeException("array offset argument \"NLVLS_offset\" (" + NLVLS_offset + ") equals or exceeds array length (" + NLVLS.length + ")"); - if(PLCL != null && PLCL.length <= PLCL_offset) - throw new RuntimeException("array offset argument \"PLCL_offset\" (" + PLCL_offset + ") equals or exceeds array length (" + PLCL.length + ")"); - if(TLCL != null && TLCL.length <= TLCL_offset) - throw new RuntimeException("array offset argument \"TLCL_offset\" (" + TLCL_offset + ") equals or exceeds array length (" + TLCL.length + ")"); - if(HLCL != null && HLCL.length <= HLCL_offset) - throw new RuntimeException("array offset argument \"HLCL_offset\" (" + HLCL_offset + ") equals or exceeds array length (" + HLCL.length + ")"); - lclpar1(MIX, BufferFactory.SIZEOF_FLOAT * MIX_offset, TS, BufferFactory.SIZEOF_FLOAT * TS_offset, P, BufferFactory.SIZEOF_FLOAT * P_offset, HT, BufferFactory.SIZEOF_FLOAT * HT_offset, T, BufferFactory.SIZEOF_FLOAT * T_offset, TD, BufferFactory.SIZEOF_FLOAT * TD_offset, NLVLS, BufferFactory.SIZEOF_INT * NLVLS_offset, PLCL, BufferFactory.SIZEOF_FLOAT * PLCL_offset, TLCL, BufferFactory.SIZEOF_FLOAT * TLCL_offset, HLCL, BufferFactory.SIZEOF_FLOAT * HLCL_offset); - - } - - /** Interface to C language function:
void lfcpar(float * EPTPAR, float * PCB, float * TCB, float * HCB, float * T1, float * T2, float * P1, float * HT1, int * NPAR, float * PLFC1, float * HLFC1, float * TLFC1, float * PLFC2, float * HLFC2, float * TLFC2); */ - public static void lfcpar(java.nio.FloatBuffer EPTPAR, java.nio.FloatBuffer PCB, java.nio.FloatBuffer TCB, java.nio.FloatBuffer HCB, java.nio.FloatBuffer T1, java.nio.FloatBuffer T2, java.nio.FloatBuffer P1, java.nio.FloatBuffer HT1, java.nio.IntBuffer NPAR, java.nio.FloatBuffer PLFC1, java.nio.FloatBuffer HLFC1, java.nio.FloatBuffer TLFC1, java.nio.FloatBuffer PLFC2, java.nio.FloatBuffer HLFC2, java.nio.FloatBuffer TLFC2) - { - boolean _direct = BufferFactory.isDirect(EPTPAR); - if (PCB != null && _direct != BufferFactory.isDirect(PCB)) - throw new RuntimeException("Argument \"PCB\" : Buffers passed to this method must all be either direct or indirect"); - if (TCB != null && _direct != BufferFactory.isDirect(TCB)) - throw new RuntimeException("Argument \"TCB\" : Buffers passed to this method must all be either direct or indirect"); - if (HCB != null && _direct != BufferFactory.isDirect(HCB)) - throw new RuntimeException("Argument \"HCB\" : Buffers passed to this method must all be either direct or indirect"); - if (T1 != null && _direct != BufferFactory.isDirect(T1)) - throw new RuntimeException("Argument \"T1\" : Buffers passed to this method must all be either direct or indirect"); - if (T2 != null && _direct != BufferFactory.isDirect(T2)) - throw new RuntimeException("Argument \"T2\" : Buffers passed to this method must all be either direct or indirect"); - if (P1 != null && _direct != BufferFactory.isDirect(P1)) - throw new RuntimeException("Argument \"P1\" : Buffers passed to this method must all be either direct or indirect"); - if (HT1 != null && _direct != BufferFactory.isDirect(HT1)) - throw new RuntimeException("Argument \"HT1\" : Buffers passed to this method must all be either direct or indirect"); - if (NPAR != null && _direct != BufferFactory.isDirect(NPAR)) - throw new RuntimeException("Argument \"NPAR\" : Buffers passed to this method must all be either direct or indirect"); - if (PLFC1 != null && _direct != BufferFactory.isDirect(PLFC1)) - throw new RuntimeException("Argument \"PLFC1\" : Buffers passed to this method must all be either direct or indirect"); - if (HLFC1 != null && _direct != BufferFactory.isDirect(HLFC1)) - throw new RuntimeException("Argument \"HLFC1\" : Buffers passed to this method must all be either direct or indirect"); - if (TLFC1 != null && _direct != BufferFactory.isDirect(TLFC1)) - throw new RuntimeException("Argument \"TLFC1\" : Buffers passed to this method must all be either direct or indirect"); - if (PLFC2 != null && _direct != BufferFactory.isDirect(PLFC2)) - throw new RuntimeException("Argument \"PLFC2\" : Buffers passed to this method must all be either direct or indirect"); - if (HLFC2 != null && _direct != BufferFactory.isDirect(HLFC2)) - throw new RuntimeException("Argument \"HLFC2\" : Buffers passed to this method must all be either direct or indirect"); - if (TLFC2 != null && _direct != BufferFactory.isDirect(TLFC2)) - throw new RuntimeException("Argument \"TLFC2\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - lfcpar0(EPTPAR, BufferFactory.getDirectBufferByteOffset(EPTPAR), PCB, BufferFactory.getDirectBufferByteOffset(PCB), TCB, BufferFactory.getDirectBufferByteOffset(TCB), HCB, BufferFactory.getDirectBufferByteOffset(HCB), T1, BufferFactory.getDirectBufferByteOffset(T1), T2, BufferFactory.getDirectBufferByteOffset(T2), P1, BufferFactory.getDirectBufferByteOffset(P1), HT1, BufferFactory.getDirectBufferByteOffset(HT1), NPAR, BufferFactory.getDirectBufferByteOffset(NPAR), PLFC1, BufferFactory.getDirectBufferByteOffset(PLFC1), HLFC1, BufferFactory.getDirectBufferByteOffset(HLFC1), TLFC1, BufferFactory.getDirectBufferByteOffset(TLFC1), PLFC2, BufferFactory.getDirectBufferByteOffset(PLFC2), HLFC2, BufferFactory.getDirectBufferByteOffset(HLFC2), TLFC2, BufferFactory.getDirectBufferByteOffset(TLFC2)); - } else { - lfcpar1(BufferFactory.getArray(EPTPAR), BufferFactory.getIndirectBufferByteOffset(EPTPAR), BufferFactory.getArray(PCB), BufferFactory.getIndirectBufferByteOffset(PCB), BufferFactory.getArray(TCB), BufferFactory.getIndirectBufferByteOffset(TCB), BufferFactory.getArray(HCB), BufferFactory.getIndirectBufferByteOffset(HCB), BufferFactory.getArray(T1), BufferFactory.getIndirectBufferByteOffset(T1), BufferFactory.getArray(T2), BufferFactory.getIndirectBufferByteOffset(T2), BufferFactory.getArray(P1), BufferFactory.getIndirectBufferByteOffset(P1), BufferFactory.getArray(HT1), BufferFactory.getIndirectBufferByteOffset(HT1), BufferFactory.getArray(NPAR), BufferFactory.getIndirectBufferByteOffset(NPAR), BufferFactory.getArray(PLFC1), BufferFactory.getIndirectBufferByteOffset(PLFC1), BufferFactory.getArray(HLFC1), BufferFactory.getIndirectBufferByteOffset(HLFC1), BufferFactory.getArray(TLFC1), BufferFactory.getIndirectBufferByteOffset(TLFC1), BufferFactory.getArray(PLFC2), BufferFactory.getIndirectBufferByteOffset(PLFC2), BufferFactory.getArray(HLFC2), BufferFactory.getIndirectBufferByteOffset(HLFC2), BufferFactory.getArray(TLFC2), BufferFactory.getIndirectBufferByteOffset(TLFC2)); - } - } - - /** Entry point to C language function:
void lfcpar(float * EPTPAR, float * PCB, float * TCB, float * HCB, float * T1, float * T2, float * P1, float * HT1, int * NPAR, float * PLFC1, float * HLFC1, float * TLFC1, float * PLFC2, float * HLFC2, float * TLFC2); */ - private static native void lfcpar0(Object EPTPAR, int EPTPAR_byte_offset, Object PCB, int PCB_byte_offset, Object TCB, int TCB_byte_offset, Object HCB, int HCB_byte_offset, Object T1, int T1_byte_offset, Object T2, int T2_byte_offset, Object P1, int P1_byte_offset, Object HT1, int HT1_byte_offset, Object NPAR, int NPAR_byte_offset, Object PLFC1, int PLFC1_byte_offset, Object HLFC1, int HLFC1_byte_offset, Object TLFC1, int TLFC1_byte_offset, Object PLFC2, int PLFC2_byte_offset, Object HLFC2, int HLFC2_byte_offset, Object TLFC2, int TLFC2_byte_offset); - - /** Entry point to C language function:
void lfcpar(float * EPTPAR, float * PCB, float * TCB, float * HCB, float * T1, float * T2, float * P1, float * HT1, int * NPAR, float * PLFC1, float * HLFC1, float * TLFC1, float * PLFC2, float * HLFC2, float * TLFC2); */ - private static native void lfcpar1(Object EPTPAR, int EPTPAR_byte_offset, Object PCB, int PCB_byte_offset, Object TCB, int TCB_byte_offset, Object HCB, int HCB_byte_offset, Object T1, int T1_byte_offset, Object T2, int T2_byte_offset, Object P1, int P1_byte_offset, Object HT1, int HT1_byte_offset, Object NPAR, int NPAR_byte_offset, Object PLFC1, int PLFC1_byte_offset, Object HLFC1, int HLFC1_byte_offset, Object TLFC1, int TLFC1_byte_offset, Object PLFC2, int PLFC2_byte_offset, Object HLFC2, int HLFC2_byte_offset, Object TLFC2, int TLFC2_byte_offset); - - /** Interface to C language function:
void lfcpar(float * EPTPAR, float * PCB, float * TCB, float * HCB, float * T1, float * T2, float * P1, float * HT1, int * NPAR, float * PLFC1, float * HLFC1, float * TLFC1, float * PLFC2, float * HLFC2, float * TLFC2); */ - public static void lfcpar(float[] EPTPAR, int EPTPAR_offset, float[] PCB, int PCB_offset, float[] TCB, int TCB_offset, float[] HCB, int HCB_offset, float[] T1, int T1_offset, float[] T2, int T2_offset, float[] P1, int P1_offset, float[] HT1, int HT1_offset, int[] NPAR, int NPAR_offset, float[] PLFC1, int PLFC1_offset, float[] HLFC1, int HLFC1_offset, float[] TLFC1, int TLFC1_offset, float[] PLFC2, int PLFC2_offset, float[] HLFC2, int HLFC2_offset, float[] TLFC2, int TLFC2_offset) - { - if(EPTPAR != null && EPTPAR.length <= EPTPAR_offset) - throw new RuntimeException("array offset argument \"EPTPAR_offset\" (" + EPTPAR_offset + ") equals or exceeds array length (" + EPTPAR.length + ")"); - if(PCB != null && PCB.length <= PCB_offset) - throw new RuntimeException("array offset argument \"PCB_offset\" (" + PCB_offset + ") equals or exceeds array length (" + PCB.length + ")"); - if(TCB != null && TCB.length <= TCB_offset) - throw new RuntimeException("array offset argument \"TCB_offset\" (" + TCB_offset + ") equals or exceeds array length (" + TCB.length + ")"); - if(HCB != null && HCB.length <= HCB_offset) - throw new RuntimeException("array offset argument \"HCB_offset\" (" + HCB_offset + ") equals or exceeds array length (" + HCB.length + ")"); - if(T1 != null && T1.length <= T1_offset) - throw new RuntimeException("array offset argument \"T1_offset\" (" + T1_offset + ") equals or exceeds array length (" + T1.length + ")"); - if(T2 != null && T2.length <= T2_offset) - throw new RuntimeException("array offset argument \"T2_offset\" (" + T2_offset + ") equals or exceeds array length (" + T2.length + ")"); - if(P1 != null && P1.length <= P1_offset) - throw new RuntimeException("array offset argument \"P1_offset\" (" + P1_offset + ") equals or exceeds array length (" + P1.length + ")"); - if(HT1 != null && HT1.length <= HT1_offset) - throw new RuntimeException("array offset argument \"HT1_offset\" (" + HT1_offset + ") equals or exceeds array length (" + HT1.length + ")"); - if(NPAR != null && NPAR.length <= NPAR_offset) - throw new RuntimeException("array offset argument \"NPAR_offset\" (" + NPAR_offset + ") equals or exceeds array length (" + NPAR.length + ")"); - if(PLFC1 != null && PLFC1.length <= PLFC1_offset) - throw new RuntimeException("array offset argument \"PLFC1_offset\" (" + PLFC1_offset + ") equals or exceeds array length (" + PLFC1.length + ")"); - if(HLFC1 != null && HLFC1.length <= HLFC1_offset) - throw new RuntimeException("array offset argument \"HLFC1_offset\" (" + HLFC1_offset + ") equals or exceeds array length (" + HLFC1.length + ")"); - if(TLFC1 != null && TLFC1.length <= TLFC1_offset) - throw new RuntimeException("array offset argument \"TLFC1_offset\" (" + TLFC1_offset + ") equals or exceeds array length (" + TLFC1.length + ")"); - if(PLFC2 != null && PLFC2.length <= PLFC2_offset) - throw new RuntimeException("array offset argument \"PLFC2_offset\" (" + PLFC2_offset + ") equals or exceeds array length (" + PLFC2.length + ")"); - if(HLFC2 != null && HLFC2.length <= HLFC2_offset) - throw new RuntimeException("array offset argument \"HLFC2_offset\" (" + HLFC2_offset + ") equals or exceeds array length (" + HLFC2.length + ")"); - if(TLFC2 != null && TLFC2.length <= TLFC2_offset) - throw new RuntimeException("array offset argument \"TLFC2_offset\" (" + TLFC2_offset + ") equals or exceeds array length (" + TLFC2.length + ")"); - lfcpar1(EPTPAR, BufferFactory.SIZEOF_FLOAT * EPTPAR_offset, PCB, BufferFactory.SIZEOF_FLOAT * PCB_offset, TCB, BufferFactory.SIZEOF_FLOAT * TCB_offset, HCB, BufferFactory.SIZEOF_FLOAT * HCB_offset, T1, BufferFactory.SIZEOF_FLOAT * T1_offset, T2, BufferFactory.SIZEOF_FLOAT * T2_offset, P1, BufferFactory.SIZEOF_FLOAT * P1_offset, HT1, BufferFactory.SIZEOF_FLOAT * HT1_offset, NPAR, BufferFactory.SIZEOF_INT * NPAR_offset, PLFC1, BufferFactory.SIZEOF_FLOAT * PLFC1_offset, HLFC1, BufferFactory.SIZEOF_FLOAT * HLFC1_offset, TLFC1, BufferFactory.SIZEOF_FLOAT * TLFC1_offset, PLFC2, BufferFactory.SIZEOF_FLOAT * PLFC2_offset, HLFC2, BufferFactory.SIZEOF_FLOAT * HLFC2_offset, TLFC2, BufferFactory.SIZEOF_FLOAT * TLFC2_offset); - - } - - /** Interface to C language function:
void liftedp(float * P, float * T, float * HT, float * TVIR, int * NLVLS, int * NPAR, float * PCB, float * HCB, float * TCB, float * WCB, float * THDPAR, float * EPTPAR, float * PL, float * TL, float * PP, float * HTP, float * TP, float * TVIRP, float * TE, float * TVIRE, int * NPARCEL); */ - public static void liftedp(java.nio.FloatBuffer P, java.nio.FloatBuffer T, java.nio.FloatBuffer HT, java.nio.FloatBuffer TVIR, java.nio.IntBuffer NLVLS, java.nio.IntBuffer NPAR, java.nio.FloatBuffer PCB, java.nio.FloatBuffer HCB, java.nio.FloatBuffer TCB, java.nio.FloatBuffer WCB, java.nio.FloatBuffer THDPAR, java.nio.FloatBuffer EPTPAR, java.nio.FloatBuffer PL, java.nio.FloatBuffer TL, java.nio.FloatBuffer PP, java.nio.FloatBuffer HTP, java.nio.FloatBuffer TP, java.nio.FloatBuffer TVIRP, java.nio.FloatBuffer TE, java.nio.FloatBuffer TVIRE, java.nio.IntBuffer NPARCEL) - { - boolean _direct = BufferFactory.isDirect(P); - if (T != null && _direct != BufferFactory.isDirect(T)) - throw new RuntimeException("Argument \"T\" : Buffers passed to this method must all be either direct or indirect"); - if (HT != null && _direct != BufferFactory.isDirect(HT)) - throw new RuntimeException("Argument \"HT\" : Buffers passed to this method must all be either direct or indirect"); - if (TVIR != null && _direct != BufferFactory.isDirect(TVIR)) - throw new RuntimeException("Argument \"TVIR\" : Buffers passed to this method must all be either direct or indirect"); - if (NLVLS != null && _direct != BufferFactory.isDirect(NLVLS)) - throw new RuntimeException("Argument \"NLVLS\" : Buffers passed to this method must all be either direct or indirect"); - if (NPAR != null && _direct != BufferFactory.isDirect(NPAR)) - throw new RuntimeException("Argument \"NPAR\" : Buffers passed to this method must all be either direct or indirect"); - if (PCB != null && _direct != BufferFactory.isDirect(PCB)) - throw new RuntimeException("Argument \"PCB\" : Buffers passed to this method must all be either direct or indirect"); - if (HCB != null && _direct != BufferFactory.isDirect(HCB)) - throw new RuntimeException("Argument \"HCB\" : Buffers passed to this method must all be either direct or indirect"); - if (TCB != null && _direct != BufferFactory.isDirect(TCB)) - throw new RuntimeException("Argument \"TCB\" : Buffers passed to this method must all be either direct or indirect"); - if (WCB != null && _direct != BufferFactory.isDirect(WCB)) - throw new RuntimeException("Argument \"WCB\" : Buffers passed to this method must all be either direct or indirect"); - if (THDPAR != null && _direct != BufferFactory.isDirect(THDPAR)) - throw new RuntimeException("Argument \"THDPAR\" : Buffers passed to this method must all be either direct or indirect"); - if (EPTPAR != null && _direct != BufferFactory.isDirect(EPTPAR)) - throw new RuntimeException("Argument \"EPTPAR\" : Buffers passed to this method must all be either direct or indirect"); - if (PL != null && _direct != BufferFactory.isDirect(PL)) - throw new RuntimeException("Argument \"PL\" : Buffers passed to this method must all be either direct or indirect"); - if (TL != null && _direct != BufferFactory.isDirect(TL)) - throw new RuntimeException("Argument \"TL\" : Buffers passed to this method must all be either direct or indirect"); - if (PP != null && _direct != BufferFactory.isDirect(PP)) - throw new RuntimeException("Argument \"PP\" : Buffers passed to this method must all be either direct or indirect"); - if (HTP != null && _direct != BufferFactory.isDirect(HTP)) - throw new RuntimeException("Argument \"HTP\" : Buffers passed to this method must all be either direct or indirect"); - if (TP != null && _direct != BufferFactory.isDirect(TP)) - throw new RuntimeException("Argument \"TP\" : Buffers passed to this method must all be either direct or indirect"); - if (TVIRP != null && _direct != BufferFactory.isDirect(TVIRP)) - throw new RuntimeException("Argument \"TVIRP\" : Buffers passed to this method must all be either direct or indirect"); - if (TE != null && _direct != BufferFactory.isDirect(TE)) - throw new RuntimeException("Argument \"TE\" : Buffers passed to this method must all be either direct or indirect"); - if (TVIRE != null && _direct != BufferFactory.isDirect(TVIRE)) - throw new RuntimeException("Argument \"TVIRE\" : Buffers passed to this method must all be either direct or indirect"); - if (NPARCEL != null && _direct != BufferFactory.isDirect(NPARCEL)) - throw new RuntimeException("Argument \"NPARCEL\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - liftedp0(P, BufferFactory.getDirectBufferByteOffset(P), T, BufferFactory.getDirectBufferByteOffset(T), HT, BufferFactory.getDirectBufferByteOffset(HT), TVIR, BufferFactory.getDirectBufferByteOffset(TVIR), NLVLS, BufferFactory.getDirectBufferByteOffset(NLVLS), NPAR, BufferFactory.getDirectBufferByteOffset(NPAR), PCB, BufferFactory.getDirectBufferByteOffset(PCB), HCB, BufferFactory.getDirectBufferByteOffset(HCB), TCB, BufferFactory.getDirectBufferByteOffset(TCB), WCB, BufferFactory.getDirectBufferByteOffset(WCB), THDPAR, BufferFactory.getDirectBufferByteOffset(THDPAR), EPTPAR, BufferFactory.getDirectBufferByteOffset(EPTPAR), PL, BufferFactory.getDirectBufferByteOffset(PL), TL, BufferFactory.getDirectBufferByteOffset(TL), PP, BufferFactory.getDirectBufferByteOffset(PP), HTP, BufferFactory.getDirectBufferByteOffset(HTP), TP, BufferFactory.getDirectBufferByteOffset(TP), TVIRP, BufferFactory.getDirectBufferByteOffset(TVIRP), TE, BufferFactory.getDirectBufferByteOffset(TE), TVIRE, BufferFactory.getDirectBufferByteOffset(TVIRE), NPARCEL, BufferFactory.getDirectBufferByteOffset(NPARCEL)); - } else { - liftedp1(BufferFactory.getArray(P), BufferFactory.getIndirectBufferByteOffset(P), BufferFactory.getArray(T), BufferFactory.getIndirectBufferByteOffset(T), BufferFactory.getArray(HT), BufferFactory.getIndirectBufferByteOffset(HT), BufferFactory.getArray(TVIR), BufferFactory.getIndirectBufferByteOffset(TVIR), BufferFactory.getArray(NLVLS), BufferFactory.getIndirectBufferByteOffset(NLVLS), BufferFactory.getArray(NPAR), BufferFactory.getIndirectBufferByteOffset(NPAR), BufferFactory.getArray(PCB), BufferFactory.getIndirectBufferByteOffset(PCB), BufferFactory.getArray(HCB), BufferFactory.getIndirectBufferByteOffset(HCB), BufferFactory.getArray(TCB), BufferFactory.getIndirectBufferByteOffset(TCB), BufferFactory.getArray(WCB), BufferFactory.getIndirectBufferByteOffset(WCB), BufferFactory.getArray(THDPAR), BufferFactory.getIndirectBufferByteOffset(THDPAR), BufferFactory.getArray(EPTPAR), BufferFactory.getIndirectBufferByteOffset(EPTPAR), BufferFactory.getArray(PL), BufferFactory.getIndirectBufferByteOffset(PL), BufferFactory.getArray(TL), BufferFactory.getIndirectBufferByteOffset(TL), BufferFactory.getArray(PP), BufferFactory.getIndirectBufferByteOffset(PP), BufferFactory.getArray(HTP), BufferFactory.getIndirectBufferByteOffset(HTP), BufferFactory.getArray(TP), BufferFactory.getIndirectBufferByteOffset(TP), BufferFactory.getArray(TVIRP), BufferFactory.getIndirectBufferByteOffset(TVIRP), BufferFactory.getArray(TE), BufferFactory.getIndirectBufferByteOffset(TE), BufferFactory.getArray(TVIRE), BufferFactory.getIndirectBufferByteOffset(TVIRE), BufferFactory.getArray(NPARCEL), BufferFactory.getIndirectBufferByteOffset(NPARCEL)); - } - } - - /** Entry point to C language function:
void liftedp(float * P, float * T, float * HT, float * TVIR, int * NLVLS, int * NPAR, float * PCB, float * HCB, float * TCB, float * WCB, float * THDPAR, float * EPTPAR, float * PL, float * TL, float * PP, float * HTP, float * TP, float * TVIRP, float * TE, float * TVIRE, int * NPARCEL); */ - private static native void liftedp0(Object P, int P_byte_offset, Object T, int T_byte_offset, Object HT, int HT_byte_offset, Object TVIR, int TVIR_byte_offset, Object NLVLS, int NLVLS_byte_offset, Object NPAR, int NPAR_byte_offset, Object PCB, int PCB_byte_offset, Object HCB, int HCB_byte_offset, Object TCB, int TCB_byte_offset, Object WCB, int WCB_byte_offset, Object THDPAR, int THDPAR_byte_offset, Object EPTPAR, int EPTPAR_byte_offset, Object PL, int PL_byte_offset, Object TL, int TL_byte_offset, Object PP, int PP_byte_offset, Object HTP, int HTP_byte_offset, Object TP, int TP_byte_offset, Object TVIRP, int TVIRP_byte_offset, Object TE, int TE_byte_offset, Object TVIRE, int TVIRE_byte_offset, Object NPARCEL, int NPARCEL_byte_offset); - - /** Entry point to C language function:
void liftedp(float * P, float * T, float * HT, float * TVIR, int * NLVLS, int * NPAR, float * PCB, float * HCB, float * TCB, float * WCB, float * THDPAR, float * EPTPAR, float * PL, float * TL, float * PP, float * HTP, float * TP, float * TVIRP, float * TE, float * TVIRE, int * NPARCEL); */ - private static native void liftedp1(Object P, int P_byte_offset, Object T, int T_byte_offset, Object HT, int HT_byte_offset, Object TVIR, int TVIR_byte_offset, Object NLVLS, int NLVLS_byte_offset, Object NPAR, int NPAR_byte_offset, Object PCB, int PCB_byte_offset, Object HCB, int HCB_byte_offset, Object TCB, int TCB_byte_offset, Object WCB, int WCB_byte_offset, Object THDPAR, int THDPAR_byte_offset, Object EPTPAR, int EPTPAR_byte_offset, Object PL, int PL_byte_offset, Object TL, int TL_byte_offset, Object PP, int PP_byte_offset, Object HTP, int HTP_byte_offset, Object TP, int TP_byte_offset, Object TVIRP, int TVIRP_byte_offset, Object TE, int TE_byte_offset, Object TVIRE, int TVIRE_byte_offset, Object NPARCEL, int NPARCEL_byte_offset); - - /** Interface to C language function:
void liftedp(float * P, float * T, float * HT, float * TVIR, int * NLVLS, int * NPAR, float * PCB, float * HCB, float * TCB, float * WCB, float * THDPAR, float * EPTPAR, float * PL, float * TL, float * PP, float * HTP, float * TP, float * TVIRP, float * TE, float * TVIRE, int * NPARCEL); */ - public static void liftedp(float[] P, int P_offset, float[] T, int T_offset, float[] HT, int HT_offset, float[] TVIR, int TVIR_offset, int[] NLVLS, int NLVLS_offset, int[] NPAR, int NPAR_offset, float[] PCB, int PCB_offset, float[] HCB, int HCB_offset, float[] TCB, int TCB_offset, float[] WCB, int WCB_offset, float[] THDPAR, int THDPAR_offset, float[] EPTPAR, int EPTPAR_offset, float[] PL, int PL_offset, float[] TL, int TL_offset, float[] PP, int PP_offset, float[] HTP, int HTP_offset, float[] TP, int TP_offset, float[] TVIRP, int TVIRP_offset, float[] TE, int TE_offset, float[] TVIRE, int TVIRE_offset, int[] NPARCEL, int NPARCEL_offset) - { - if(P != null && P.length <= P_offset) - throw new RuntimeException("array offset argument \"P_offset\" (" + P_offset + ") equals or exceeds array length (" + P.length + ")"); - if(T != null && T.length <= T_offset) - throw new RuntimeException("array offset argument \"T_offset\" (" + T_offset + ") equals or exceeds array length (" + T.length + ")"); - if(HT != null && HT.length <= HT_offset) - throw new RuntimeException("array offset argument \"HT_offset\" (" + HT_offset + ") equals or exceeds array length (" + HT.length + ")"); - if(TVIR != null && TVIR.length <= TVIR_offset) - throw new RuntimeException("array offset argument \"TVIR_offset\" (" + TVIR_offset + ") equals or exceeds array length (" + TVIR.length + ")"); - if(NLVLS != null && NLVLS.length <= NLVLS_offset) - throw new RuntimeException("array offset argument \"NLVLS_offset\" (" + NLVLS_offset + ") equals or exceeds array length (" + NLVLS.length + ")"); - if(NPAR != null && NPAR.length <= NPAR_offset) - throw new RuntimeException("array offset argument \"NPAR_offset\" (" + NPAR_offset + ") equals or exceeds array length (" + NPAR.length + ")"); - if(PCB != null && PCB.length <= PCB_offset) - throw new RuntimeException("array offset argument \"PCB_offset\" (" + PCB_offset + ") equals or exceeds array length (" + PCB.length + ")"); - if(HCB != null && HCB.length <= HCB_offset) - throw new RuntimeException("array offset argument \"HCB_offset\" (" + HCB_offset + ") equals or exceeds array length (" + HCB.length + ")"); - if(TCB != null && TCB.length <= TCB_offset) - throw new RuntimeException("array offset argument \"TCB_offset\" (" + TCB_offset + ") equals or exceeds array length (" + TCB.length + ")"); - if(WCB != null && WCB.length <= WCB_offset) - throw new RuntimeException("array offset argument \"WCB_offset\" (" + WCB_offset + ") equals or exceeds array length (" + WCB.length + ")"); - if(THDPAR != null && THDPAR.length <= THDPAR_offset) - throw new RuntimeException("array offset argument \"THDPAR_offset\" (" + THDPAR_offset + ") equals or exceeds array length (" + THDPAR.length + ")"); - if(EPTPAR != null && EPTPAR.length <= EPTPAR_offset) - throw new RuntimeException("array offset argument \"EPTPAR_offset\" (" + EPTPAR_offset + ") equals or exceeds array length (" + EPTPAR.length + ")"); - if(PL != null && PL.length <= PL_offset) - throw new RuntimeException("array offset argument \"PL_offset\" (" + PL_offset + ") equals or exceeds array length (" + PL.length + ")"); - if(TL != null && TL.length <= TL_offset) - throw new RuntimeException("array offset argument \"TL_offset\" (" + TL_offset + ") equals or exceeds array length (" + TL.length + ")"); - if(PP != null && PP.length <= PP_offset) - throw new RuntimeException("array offset argument \"PP_offset\" (" + PP_offset + ") equals or exceeds array length (" + PP.length + ")"); - if(HTP != null && HTP.length <= HTP_offset) - throw new RuntimeException("array offset argument \"HTP_offset\" (" + HTP_offset + ") equals or exceeds array length (" + HTP.length + ")"); - if(TP != null && TP.length <= TP_offset) - throw new RuntimeException("array offset argument \"TP_offset\" (" + TP_offset + ") equals or exceeds array length (" + TP.length + ")"); - if(TVIRP != null && TVIRP.length <= TVIRP_offset) - throw new RuntimeException("array offset argument \"TVIRP_offset\" (" + TVIRP_offset + ") equals or exceeds array length (" + TVIRP.length + ")"); - if(TE != null && TE.length <= TE_offset) - throw new RuntimeException("array offset argument \"TE_offset\" (" + TE_offset + ") equals or exceeds array length (" + TE.length + ")"); - if(TVIRE != null && TVIRE.length <= TVIRE_offset) - throw new RuntimeException("array offset argument \"TVIRE_offset\" (" + TVIRE_offset + ") equals or exceeds array length (" + TVIRE.length + ")"); - if(NPARCEL != null && NPARCEL.length <= NPARCEL_offset) - throw new RuntimeException("array offset argument \"NPARCEL_offset\" (" + NPARCEL_offset + ") equals or exceeds array length (" + NPARCEL.length + ")"); - liftedp1(P, BufferFactory.SIZEOF_FLOAT * P_offset, T, BufferFactory.SIZEOF_FLOAT * T_offset, HT, BufferFactory.SIZEOF_FLOAT * HT_offset, TVIR, BufferFactory.SIZEOF_FLOAT * TVIR_offset, NLVLS, BufferFactory.SIZEOF_INT * NLVLS_offset, NPAR, BufferFactory.SIZEOF_INT * NPAR_offset, PCB, BufferFactory.SIZEOF_FLOAT * PCB_offset, HCB, BufferFactory.SIZEOF_FLOAT * HCB_offset, TCB, BufferFactory.SIZEOF_FLOAT * TCB_offset, WCB, BufferFactory.SIZEOF_FLOAT * WCB_offset, THDPAR, BufferFactory.SIZEOF_FLOAT * THDPAR_offset, EPTPAR, BufferFactory.SIZEOF_FLOAT * EPTPAR_offset, PL, BufferFactory.SIZEOF_FLOAT * PL_offset, TL, BufferFactory.SIZEOF_FLOAT * TL_offset, PP, BufferFactory.SIZEOF_FLOAT * PP_offset, HTP, BufferFactory.SIZEOF_FLOAT * HTP_offset, TP, BufferFactory.SIZEOF_FLOAT * TP_offset, TVIRP, BufferFactory.SIZEOF_FLOAT * TVIRP_offset, TE, BufferFactory.SIZEOF_FLOAT * TE_offset, TVIRE, BufferFactory.SIZEOF_FLOAT * TVIRE_offset, NPARCEL, BufferFactory.SIZEOF_INT * NPARCEL_offset); - - } - - /** Interface to C language function:
void lintrans(float * a, float * mult, float * add, float * result, int * mni, int * ni, int * nj); */ - public static void lintrans(java.nio.FloatBuffer a, java.nio.FloatBuffer mult, java.nio.FloatBuffer add, java.nio.FloatBuffer result, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj) - { - boolean _direct = BufferFactory.isDirect(a); - if (mult != null && _direct != BufferFactory.isDirect(mult)) - throw new RuntimeException("Argument \"mult\" : Buffers passed to this method must all be either direct or indirect"); - if (add != null && _direct != BufferFactory.isDirect(add)) - throw new RuntimeException("Argument \"add\" : Buffers passed to this method must all be either direct or indirect"); - if (result != null && _direct != BufferFactory.isDirect(result)) - throw new RuntimeException("Argument \"result\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - lintrans0(a, BufferFactory.getDirectBufferByteOffset(a), mult, BufferFactory.getDirectBufferByteOffset(mult), add, BufferFactory.getDirectBufferByteOffset(add), result, BufferFactory.getDirectBufferByteOffset(result), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj)); - } else { - lintrans1(BufferFactory.getArray(a), BufferFactory.getIndirectBufferByteOffset(a), BufferFactory.getArray(mult), BufferFactory.getIndirectBufferByteOffset(mult), BufferFactory.getArray(add), BufferFactory.getIndirectBufferByteOffset(add), BufferFactory.getArray(result), BufferFactory.getIndirectBufferByteOffset(result), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj)); - } - } - - /** Entry point to C language function:
void lintrans(float * a, float * mult, float * add, float * result, int * mni, int * ni, int * nj); */ - private static native void lintrans0(Object a, int a_byte_offset, Object mult, int mult_byte_offset, Object add, int add_byte_offset, Object result, int result_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset); - - /** Entry point to C language function:
void lintrans(float * a, float * mult, float * add, float * result, int * mni, int * ni, int * nj); */ - private static native void lintrans1(Object a, int a_byte_offset, Object mult, int mult_byte_offset, Object add, int add_byte_offset, Object result, int result_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset); - - /** Interface to C language function:
void lintrans(float * a, float * mult, float * add, float * result, int * mni, int * ni, int * nj); */ - public static void lintrans(float[] a, int a_offset, float[] mult, int mult_offset, float[] add, int add_offset, float[] result, int result_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset) - { - if(a != null && a.length <= a_offset) - throw new RuntimeException("array offset argument \"a_offset\" (" + a_offset + ") equals or exceeds array length (" + a.length + ")"); - if(mult != null && mult.length <= mult_offset) - throw new RuntimeException("array offset argument \"mult_offset\" (" + mult_offset + ") equals or exceeds array length (" + mult.length + ")"); - if(add != null && add.length <= add_offset) - throw new RuntimeException("array offset argument \"add_offset\" (" + add_offset + ") equals or exceeds array length (" + add.length + ")"); - if(result != null && result.length <= result_offset) - throw new RuntimeException("array offset argument \"result_offset\" (" + result_offset + ") equals or exceeds array length (" + result.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - lintrans1(a, BufferFactory.SIZEOF_FLOAT * a_offset, mult, BufferFactory.SIZEOF_FLOAT * mult_offset, add, BufferFactory.SIZEOF_FLOAT * add_offset, result, BufferFactory.SIZEOF_FLOAT * result_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset); - - } - - /** Interface to C language function:
void matsln(float * Array, float * yVector, int * work, float * soln, int * mn, int * n, int * ok); */ - public static void matsln(java.nio.FloatBuffer Array, java.nio.FloatBuffer yVector, java.nio.IntBuffer work, java.nio.FloatBuffer soln, java.nio.IntBuffer mn, java.nio.IntBuffer n, java.nio.IntBuffer ok) - { - boolean _direct = BufferFactory.isDirect(Array); - if (yVector != null && _direct != BufferFactory.isDirect(yVector)) - throw new RuntimeException("Argument \"yVector\" : Buffers passed to this method must all be either direct or indirect"); - if (work != null && _direct != BufferFactory.isDirect(work)) - throw new RuntimeException("Argument \"work\" : Buffers passed to this method must all be either direct or indirect"); - if (soln != null && _direct != BufferFactory.isDirect(soln)) - throw new RuntimeException("Argument \"soln\" : Buffers passed to this method must all be either direct or indirect"); - if (mn != null && _direct != BufferFactory.isDirect(mn)) - throw new RuntimeException("Argument \"mn\" : Buffers passed to this method must all be either direct or indirect"); - if (n != null && _direct != BufferFactory.isDirect(n)) - throw new RuntimeException("Argument \"n\" : Buffers passed to this method must all be either direct or indirect"); - if (ok != null && _direct != BufferFactory.isDirect(ok)) - throw new RuntimeException("Argument \"ok\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - matsln0(Array, BufferFactory.getDirectBufferByteOffset(Array), yVector, BufferFactory.getDirectBufferByteOffset(yVector), work, BufferFactory.getDirectBufferByteOffset(work), soln, BufferFactory.getDirectBufferByteOffset(soln), mn, BufferFactory.getDirectBufferByteOffset(mn), n, BufferFactory.getDirectBufferByteOffset(n), ok, BufferFactory.getDirectBufferByteOffset(ok)); - } else { - matsln1(BufferFactory.getArray(Array), BufferFactory.getIndirectBufferByteOffset(Array), BufferFactory.getArray(yVector), BufferFactory.getIndirectBufferByteOffset(yVector), BufferFactory.getArray(work), BufferFactory.getIndirectBufferByteOffset(work), BufferFactory.getArray(soln), BufferFactory.getIndirectBufferByteOffset(soln), BufferFactory.getArray(mn), BufferFactory.getIndirectBufferByteOffset(mn), BufferFactory.getArray(n), BufferFactory.getIndirectBufferByteOffset(n), BufferFactory.getArray(ok), BufferFactory.getIndirectBufferByteOffset(ok)); - } - } - - /** Entry point to C language function:
void matsln(float * Array, float * yVector, int * work, float * soln, int * mn, int * n, int * ok); */ - private static native void matsln0(Object Array, int Array_byte_offset, Object yVector, int yVector_byte_offset, Object work, int work_byte_offset, Object soln, int soln_byte_offset, Object mn, int mn_byte_offset, Object n, int n_byte_offset, Object ok, int ok_byte_offset); - - /** Entry point to C language function:
void matsln(float * Array, float * yVector, int * work, float * soln, int * mn, int * n, int * ok); */ - private static native void matsln1(Object Array, int Array_byte_offset, Object yVector, int yVector_byte_offset, Object work, int work_byte_offset, Object soln, int soln_byte_offset, Object mn, int mn_byte_offset, Object n, int n_byte_offset, Object ok, int ok_byte_offset); - - /** Interface to C language function:
void matsln(float * Array, float * yVector, int * work, float * soln, int * mn, int * n, int * ok); */ - public static void matsln(float[] Array, int Array_offset, float[] yVector, int yVector_offset, int[] work, int work_offset, float[] soln, int soln_offset, int[] mn, int mn_offset, int[] n, int n_offset, int[] ok, int ok_offset) - { - if(Array != null && Array.length <= Array_offset) - throw new RuntimeException("array offset argument \"Array_offset\" (" + Array_offset + ") equals or exceeds array length (" + Array.length + ")"); - if(yVector != null && yVector.length <= yVector_offset) - throw new RuntimeException("array offset argument \"yVector_offset\" (" + yVector_offset + ") equals or exceeds array length (" + yVector.length + ")"); - if(work != null && work.length <= work_offset) - throw new RuntimeException("array offset argument \"work_offset\" (" + work_offset + ") equals or exceeds array length (" + work.length + ")"); - if(soln != null && soln.length <= soln_offset) - throw new RuntimeException("array offset argument \"soln_offset\" (" + soln_offset + ") equals or exceeds array length (" + soln.length + ")"); - if(mn != null && mn.length <= mn_offset) - throw new RuntimeException("array offset argument \"mn_offset\" (" + mn_offset + ") equals or exceeds array length (" + mn.length + ")"); - if(n != null && n.length <= n_offset) - throw new RuntimeException("array offset argument \"n_offset\" (" + n_offset + ") equals or exceeds array length (" + n.length + ")"); - if(ok != null && ok.length <= ok_offset) - throw new RuntimeException("array offset argument \"ok_offset\" (" + ok_offset + ") equals or exceeds array length (" + ok.length + ")"); - matsln1(Array, BufferFactory.SIZEOF_FLOAT * Array_offset, yVector, BufferFactory.SIZEOF_FLOAT * yVector_offset, work, BufferFactory.SIZEOF_INT * work_offset, soln, BufferFactory.SIZEOF_FLOAT * soln_offset, mn, BufferFactory.SIZEOF_INT * mn_offset, n, BufferFactory.SIZEOF_INT * n_offset, ok, BufferFactory.SIZEOF_INT * ok_offset); - - } - - /** Interface to C language function:
void max_min(float * a, float * b, float * result, int * mni, int * ni, int * nj, int * mode); */ - public static void max_min(java.nio.FloatBuffer a, java.nio.FloatBuffer b, java.nio.FloatBuffer result, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj, java.nio.IntBuffer mode) - { - boolean _direct = BufferFactory.isDirect(a); - if (b != null && _direct != BufferFactory.isDirect(b)) - throw new RuntimeException("Argument \"b\" : Buffers passed to this method must all be either direct or indirect"); - if (result != null && _direct != BufferFactory.isDirect(result)) - throw new RuntimeException("Argument \"result\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (mode != null && _direct != BufferFactory.isDirect(mode)) - throw new RuntimeException("Argument \"mode\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - max_min0(a, BufferFactory.getDirectBufferByteOffset(a), b, BufferFactory.getDirectBufferByteOffset(b), result, BufferFactory.getDirectBufferByteOffset(result), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj), mode, BufferFactory.getDirectBufferByteOffset(mode)); - } else { - max_min1(BufferFactory.getArray(a), BufferFactory.getIndirectBufferByteOffset(a), BufferFactory.getArray(b), BufferFactory.getIndirectBufferByteOffset(b), BufferFactory.getArray(result), BufferFactory.getIndirectBufferByteOffset(result), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj), BufferFactory.getArray(mode), BufferFactory.getIndirectBufferByteOffset(mode)); - } - } - - /** Entry point to C language function:
void max_min(float * a, float * b, float * result, int * mni, int * ni, int * nj, int * mode); */ - private static native void max_min0(Object a, int a_byte_offset, Object b, int b_byte_offset, Object result, int result_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object mode, int mode_byte_offset); - - /** Entry point to C language function:
void max_min(float * a, float * b, float * result, int * mni, int * ni, int * nj, int * mode); */ - private static native void max_min1(Object a, int a_byte_offset, Object b, int b_byte_offset, Object result, int result_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object mode, int mode_byte_offset); - - /** Interface to C language function:
void max_min(float * a, float * b, float * result, int * mni, int * ni, int * nj, int * mode); */ - public static void max_min(float[] a, int a_offset, float[] b, int b_offset, float[] result, int result_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset, int[] mode, int mode_offset) - { - if(a != null && a.length <= a_offset) - throw new RuntimeException("array offset argument \"a_offset\" (" + a_offset + ") equals or exceeds array length (" + a.length + ")"); - if(b != null && b.length <= b_offset) - throw new RuntimeException("array offset argument \"b_offset\" (" + b_offset + ") equals or exceeds array length (" + b.length + ")"); - if(result != null && result.length <= result_offset) - throw new RuntimeException("array offset argument \"result_offset\" (" + result_offset + ") equals or exceeds array length (" + result.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - if(mode != null && mode.length <= mode_offset) - throw new RuntimeException("array offset argument \"mode_offset\" (" + mode_offset + ") equals or exceeds array length (" + mode.length + ")"); - max_min1(a, BufferFactory.SIZEOF_FLOAT * a_offset, b, BufferFactory.SIZEOF_FLOAT * b_offset, result, BufferFactory.SIZEOF_FLOAT * result_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset, mode, BufferFactory.SIZEOF_INT * mode_offset); - - } - - /** Interface to C language function:
void mixrat(float * p, float * t, float * rh, int * mni, int * ni, int * nj, float * q); */ - public static void mixrat(java.nio.FloatBuffer p, java.nio.FloatBuffer t, java.nio.FloatBuffer rh, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj, java.nio.FloatBuffer q) - { - boolean _direct = BufferFactory.isDirect(p); - if (t != null && _direct != BufferFactory.isDirect(t)) - throw new RuntimeException("Argument \"t\" : Buffers passed to this method must all be either direct or indirect"); - if (rh != null && _direct != BufferFactory.isDirect(rh)) - throw new RuntimeException("Argument \"rh\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (q != null && _direct != BufferFactory.isDirect(q)) - throw new RuntimeException("Argument \"q\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - mixrat0(p, BufferFactory.getDirectBufferByteOffset(p), t, BufferFactory.getDirectBufferByteOffset(t), rh, BufferFactory.getDirectBufferByteOffset(rh), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj), q, BufferFactory.getDirectBufferByteOffset(q)); - } else { - mixrat1(BufferFactory.getArray(p), BufferFactory.getIndirectBufferByteOffset(p), BufferFactory.getArray(t), BufferFactory.getIndirectBufferByteOffset(t), BufferFactory.getArray(rh), BufferFactory.getIndirectBufferByteOffset(rh), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj), BufferFactory.getArray(q), BufferFactory.getIndirectBufferByteOffset(q)); - } - } - - /** Entry point to C language function:
void mixrat(float * p, float * t, float * rh, int * mni, int * ni, int * nj, float * q); */ - private static native void mixrat0(Object p, int p_byte_offset, Object t, int t_byte_offset, Object rh, int rh_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object q, int q_byte_offset); - - /** Entry point to C language function:
void mixrat(float * p, float * t, float * rh, int * mni, int * ni, int * nj, float * q); */ - private static native void mixrat1(Object p, int p_byte_offset, Object t, int t_byte_offset, Object rh, int rh_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object q, int q_byte_offset); - - /** Interface to C language function:
void mixrat(float * p, float * t, float * rh, int * mni, int * ni, int * nj, float * q); */ - public static void mixrat(float[] p, int p_offset, float[] t, int t_offset, float[] rh, int rh_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset, float[] q, int q_offset) - { - if(p != null && p.length <= p_offset) - throw new RuntimeException("array offset argument \"p_offset\" (" + p_offset + ") equals or exceeds array length (" + p.length + ")"); - if(t != null && t.length <= t_offset) - throw new RuntimeException("array offset argument \"t_offset\" (" + t_offset + ") equals or exceeds array length (" + t.length + ")"); - if(rh != null && rh.length <= rh_offset) - throw new RuntimeException("array offset argument \"rh_offset\" (" + rh_offset + ") equals or exceeds array length (" + rh.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - if(q != null && q.length <= q_offset) - throw new RuntimeException("array offset argument \"q_offset\" (" + q_offset + ") equals or exceeds array length (" + q.length + ")"); - mixrat1(p, BufferFactory.SIZEOF_FLOAT * p_offset, t, BufferFactory.SIZEOF_FLOAT * t_offset, rh, BufferFactory.SIZEOF_FLOAT * rh_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset, q, BufferFactory.SIZEOF_FLOAT * q_offset); - - } - - /** Interface to C language function:
void mslp2thkns(float * mslp, float * hgt, float * thkns, int * mni, int * ni, int * nj); */ - public static void mslp2thkns(java.nio.FloatBuffer mslp, java.nio.FloatBuffer hgt, java.nio.FloatBuffer thkns, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj) - { - boolean _direct = BufferFactory.isDirect(mslp); - if (hgt != null && _direct != BufferFactory.isDirect(hgt)) - throw new RuntimeException("Argument \"hgt\" : Buffers passed to this method must all be either direct or indirect"); - if (thkns != null && _direct != BufferFactory.isDirect(thkns)) - throw new RuntimeException("Argument \"thkns\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - mslp2thkns0(mslp, BufferFactory.getDirectBufferByteOffset(mslp), hgt, BufferFactory.getDirectBufferByteOffset(hgt), thkns, BufferFactory.getDirectBufferByteOffset(thkns), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj)); - } else { - mslp2thkns1(BufferFactory.getArray(mslp), BufferFactory.getIndirectBufferByteOffset(mslp), BufferFactory.getArray(hgt), BufferFactory.getIndirectBufferByteOffset(hgt), BufferFactory.getArray(thkns), BufferFactory.getIndirectBufferByteOffset(thkns), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj)); - } - } - - /** Entry point to C language function:
void mslp2thkns(float * mslp, float * hgt, float * thkns, int * mni, int * ni, int * nj); */ - private static native void mslp2thkns0(Object mslp, int mslp_byte_offset, Object hgt, int hgt_byte_offset, Object thkns, int thkns_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset); - - /** Entry point to C language function:
void mslp2thkns(float * mslp, float * hgt, float * thkns, int * mni, int * ni, int * nj); */ - private static native void mslp2thkns1(Object mslp, int mslp_byte_offset, Object hgt, int hgt_byte_offset, Object thkns, int thkns_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset); - - /** Interface to C language function:
void mslp2thkns(float * mslp, float * hgt, float * thkns, int * mni, int * ni, int * nj); */ - public static void mslp2thkns(float[] mslp, int mslp_offset, float[] hgt, int hgt_offset, float[] thkns, int thkns_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset) - { - if(mslp != null && mslp.length <= mslp_offset) - throw new RuntimeException("array offset argument \"mslp_offset\" (" + mslp_offset + ") equals or exceeds array length (" + mslp.length + ")"); - if(hgt != null && hgt.length <= hgt_offset) - throw new RuntimeException("array offset argument \"hgt_offset\" (" + hgt_offset + ") equals or exceeds array length (" + hgt.length + ")"); - if(thkns != null && thkns.length <= thkns_offset) - throw new RuntimeException("array offset argument \"thkns_offset\" (" + thkns_offset + ") equals or exceeds array length (" + thkns.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - mslp2thkns1(mslp, BufferFactory.SIZEOF_FLOAT * mslp_offset, hgt, BufferFactory.SIZEOF_FLOAT * hgt_offset, thkns, BufferFactory.SIZEOF_FLOAT * thkns_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset); - - } - - /** Interface to C language function:
void mult_aray(float * a, float * b, float * result, int * mni, int * ni, int * nj); */ - public static void mult_aray(java.nio.FloatBuffer a, java.nio.FloatBuffer b, java.nio.FloatBuffer result, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj) - { - boolean _direct = BufferFactory.isDirect(a); - if (b != null && _direct != BufferFactory.isDirect(b)) - throw new RuntimeException("Argument \"b\" : Buffers passed to this method must all be either direct or indirect"); - if (result != null && _direct != BufferFactory.isDirect(result)) - throw new RuntimeException("Argument \"result\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - mult_aray0(a, BufferFactory.getDirectBufferByteOffset(a), b, BufferFactory.getDirectBufferByteOffset(b), result, BufferFactory.getDirectBufferByteOffset(result), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj)); - } else { - mult_aray1(BufferFactory.getArray(a), BufferFactory.getIndirectBufferByteOffset(a), BufferFactory.getArray(b), BufferFactory.getIndirectBufferByteOffset(b), BufferFactory.getArray(result), BufferFactory.getIndirectBufferByteOffset(result), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj)); - } - } - - /** Entry point to C language function:
void mult_aray(float * a, float * b, float * result, int * mni, int * ni, int * nj); */ - private static native void mult_aray0(Object a, int a_byte_offset, Object b, int b_byte_offset, Object result, int result_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset); - - /** Entry point to C language function:
void mult_aray(float * a, float * b, float * result, int * mni, int * ni, int * nj); */ - private static native void mult_aray1(Object a, int a_byte_offset, Object b, int b_byte_offset, Object result, int result_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset); - - /** Interface to C language function:
void mult_aray(float * a, float * b, float * result, int * mni, int * ni, int * nj); */ - public static void mult_aray(float[] a, int a_offset, float[] b, int b_offset, float[] result, int result_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset) - { - if(a != null && a.length <= a_offset) - throw new RuntimeException("array offset argument \"a_offset\" (" + a_offset + ") equals or exceeds array length (" + a.length + ")"); - if(b != null && b.length <= b_offset) - throw new RuntimeException("array offset argument \"b_offset\" (" + b_offset + ") equals or exceeds array length (" + b.length + ")"); - if(result != null && result.length <= result_offset) - throw new RuntimeException("array offset argument \"result_offset\" (" + result_offset + ") equals or exceeds array length (" + result.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - mult_aray1(a, BufferFactory.SIZEOF_FLOAT * a_offset, b, BufferFactory.SIZEOF_FLOAT * b_offset, result, BufferFactory.SIZEOF_FLOAT * result_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset); - - } - - /** Interface to C language function:
void mult_by_cnst(float * a, float * cnst, float * result, int * mni, int * ni, int * nj); */ - public static void mult_by_cnst(java.nio.FloatBuffer a, java.nio.FloatBuffer cnst, java.nio.FloatBuffer result, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj) - { - boolean _direct = BufferFactory.isDirect(a); - if (cnst != null && _direct != BufferFactory.isDirect(cnst)) - throw new RuntimeException("Argument \"cnst\" : Buffers passed to this method must all be either direct or indirect"); - if (result != null && _direct != BufferFactory.isDirect(result)) - throw new RuntimeException("Argument \"result\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - mult_by_cnst0(a, BufferFactory.getDirectBufferByteOffset(a), cnst, BufferFactory.getDirectBufferByteOffset(cnst), result, BufferFactory.getDirectBufferByteOffset(result), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj)); - } else { - mult_by_cnst1(BufferFactory.getArray(a), BufferFactory.getIndirectBufferByteOffset(a), BufferFactory.getArray(cnst), BufferFactory.getIndirectBufferByteOffset(cnst), BufferFactory.getArray(result), BufferFactory.getIndirectBufferByteOffset(result), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj)); - } - } - - /** Entry point to C language function:
void mult_by_cnst(float * a, float * cnst, float * result, int * mni, int * ni, int * nj); */ - private static native void mult_by_cnst0(Object a, int a_byte_offset, Object cnst, int cnst_byte_offset, Object result, int result_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset); - - /** Entry point to C language function:
void mult_by_cnst(float * a, float * cnst, float * result, int * mni, int * ni, int * nj); */ - private static native void mult_by_cnst1(Object a, int a_byte_offset, Object cnst, int cnst_byte_offset, Object result, int result_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset); - - /** Interface to C language function:
void mult_by_cnst(float * a, float * cnst, float * result, int * mni, int * ni, int * nj); */ - public static void mult_by_cnst(float[] a, int a_offset, float[] cnst, int cnst_offset, float[] result, int result_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset) - { - if(a != null && a.length <= a_offset) - throw new RuntimeException("array offset argument \"a_offset\" (" + a_offset + ") equals or exceeds array length (" + a.length + ")"); - if(cnst != null && cnst.length <= cnst_offset) - throw new RuntimeException("array offset argument \"cnst_offset\" (" + cnst_offset + ") equals or exceeds array length (" + cnst.length + ")"); - if(result != null && result.length <= result_offset) - throw new RuntimeException("array offset argument \"result_offset\" (" + result_offset + ") equals or exceeds array length (" + result.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - mult_by_cnst1(a, BufferFactory.SIZEOF_FLOAT * a_offset, cnst, BufferFactory.SIZEOF_FLOAT * cnst_offset, result, BufferFactory.SIZEOF_FLOAT * result_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset); - - } - - /** Interface to C language function:
void mxtp(float * ANSOL, float * DELTAP, float * SFCP, float * P2, float * TL, float * DELTAZ, int * LVL, float * CTMAX); */ - public static void mxtp(java.nio.FloatBuffer ANSOL, java.nio.FloatBuffer DELTAP, java.nio.FloatBuffer SFCP, java.nio.FloatBuffer P2, java.nio.FloatBuffer TL, java.nio.FloatBuffer DELTAZ, java.nio.IntBuffer LVL, java.nio.FloatBuffer CTMAX) - { - boolean _direct = BufferFactory.isDirect(ANSOL); - if (DELTAP != null && _direct != BufferFactory.isDirect(DELTAP)) - throw new RuntimeException("Argument \"DELTAP\" : Buffers passed to this method must all be either direct or indirect"); - if (SFCP != null && _direct != BufferFactory.isDirect(SFCP)) - throw new RuntimeException("Argument \"SFCP\" : Buffers passed to this method must all be either direct or indirect"); - if (P2 != null && _direct != BufferFactory.isDirect(P2)) - throw new RuntimeException("Argument \"P2\" : Buffers passed to this method must all be either direct or indirect"); - if (TL != null && _direct != BufferFactory.isDirect(TL)) - throw new RuntimeException("Argument \"TL\" : Buffers passed to this method must all be either direct or indirect"); - if (DELTAZ != null && _direct != BufferFactory.isDirect(DELTAZ)) - throw new RuntimeException("Argument \"DELTAZ\" : Buffers passed to this method must all be either direct or indirect"); - if (LVL != null && _direct != BufferFactory.isDirect(LVL)) - throw new RuntimeException("Argument \"LVL\" : Buffers passed to this method must all be either direct or indirect"); - if (CTMAX != null && _direct != BufferFactory.isDirect(CTMAX)) - throw new RuntimeException("Argument \"CTMAX\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - mxtp0(ANSOL, BufferFactory.getDirectBufferByteOffset(ANSOL), DELTAP, BufferFactory.getDirectBufferByteOffset(DELTAP), SFCP, BufferFactory.getDirectBufferByteOffset(SFCP), P2, BufferFactory.getDirectBufferByteOffset(P2), TL, BufferFactory.getDirectBufferByteOffset(TL), DELTAZ, BufferFactory.getDirectBufferByteOffset(DELTAZ), LVL, BufferFactory.getDirectBufferByteOffset(LVL), CTMAX, BufferFactory.getDirectBufferByteOffset(CTMAX)); - } else { - mxtp1(BufferFactory.getArray(ANSOL), BufferFactory.getIndirectBufferByteOffset(ANSOL), BufferFactory.getArray(DELTAP), BufferFactory.getIndirectBufferByteOffset(DELTAP), BufferFactory.getArray(SFCP), BufferFactory.getIndirectBufferByteOffset(SFCP), BufferFactory.getArray(P2), BufferFactory.getIndirectBufferByteOffset(P2), BufferFactory.getArray(TL), BufferFactory.getIndirectBufferByteOffset(TL), BufferFactory.getArray(DELTAZ), BufferFactory.getIndirectBufferByteOffset(DELTAZ), BufferFactory.getArray(LVL), BufferFactory.getIndirectBufferByteOffset(LVL), BufferFactory.getArray(CTMAX), BufferFactory.getIndirectBufferByteOffset(CTMAX)); - } - } - - /** Entry point to C language function:
void mxtp(float * ANSOL, float * DELTAP, float * SFCP, float * P2, float * TL, float * DELTAZ, int * LVL, float * CTMAX); */ - private static native void mxtp0(Object ANSOL, int ANSOL_byte_offset, Object DELTAP, int DELTAP_byte_offset, Object SFCP, int SFCP_byte_offset, Object P2, int P2_byte_offset, Object TL, int TL_byte_offset, Object DELTAZ, int DELTAZ_byte_offset, Object LVL, int LVL_byte_offset, Object CTMAX, int CTMAX_byte_offset); - - /** Entry point to C language function:
void mxtp(float * ANSOL, float * DELTAP, float * SFCP, float * P2, float * TL, float * DELTAZ, int * LVL, float * CTMAX); */ - private static native void mxtp1(Object ANSOL, int ANSOL_byte_offset, Object DELTAP, int DELTAP_byte_offset, Object SFCP, int SFCP_byte_offset, Object P2, int P2_byte_offset, Object TL, int TL_byte_offset, Object DELTAZ, int DELTAZ_byte_offset, Object LVL, int LVL_byte_offset, Object CTMAX, int CTMAX_byte_offset); - - /** Interface to C language function:
void mxtp(float * ANSOL, float * DELTAP, float * SFCP, float * P2, float * TL, float * DELTAZ, int * LVL, float * CTMAX); */ - public static void mxtp(float[] ANSOL, int ANSOL_offset, float[] DELTAP, int DELTAP_offset, float[] SFCP, int SFCP_offset, float[] P2, int P2_offset, float[] TL, int TL_offset, float[] DELTAZ, int DELTAZ_offset, int[] LVL, int LVL_offset, float[] CTMAX, int CTMAX_offset) - { - if(ANSOL != null && ANSOL.length <= ANSOL_offset) - throw new RuntimeException("array offset argument \"ANSOL_offset\" (" + ANSOL_offset + ") equals or exceeds array length (" + ANSOL.length + ")"); - if(DELTAP != null && DELTAP.length <= DELTAP_offset) - throw new RuntimeException("array offset argument \"DELTAP_offset\" (" + DELTAP_offset + ") equals or exceeds array length (" + DELTAP.length + ")"); - if(SFCP != null && SFCP.length <= SFCP_offset) - throw new RuntimeException("array offset argument \"SFCP_offset\" (" + SFCP_offset + ") equals or exceeds array length (" + SFCP.length + ")"); - if(P2 != null && P2.length <= P2_offset) - throw new RuntimeException("array offset argument \"P2_offset\" (" + P2_offset + ") equals or exceeds array length (" + P2.length + ")"); - if(TL != null && TL.length <= TL_offset) - throw new RuntimeException("array offset argument \"TL_offset\" (" + TL_offset + ") equals or exceeds array length (" + TL.length + ")"); - if(DELTAZ != null && DELTAZ.length <= DELTAZ_offset) - throw new RuntimeException("array offset argument \"DELTAZ_offset\" (" + DELTAZ_offset + ") equals or exceeds array length (" + DELTAZ.length + ")"); - if(LVL != null && LVL.length <= LVL_offset) - throw new RuntimeException("array offset argument \"LVL_offset\" (" + LVL_offset + ") equals or exceeds array length (" + LVL.length + ")"); - if(CTMAX != null && CTMAX.length <= CTMAX_offset) - throw new RuntimeException("array offset argument \"CTMAX_offset\" (" + CTMAX_offset + ") equals or exceeds array length (" + CTMAX.length + ")"); - mxtp1(ANSOL, BufferFactory.SIZEOF_FLOAT * ANSOL_offset, DELTAP, BufferFactory.SIZEOF_FLOAT * DELTAP_offset, SFCP, BufferFactory.SIZEOF_FLOAT * SFCP_offset, P2, BufferFactory.SIZEOF_FLOAT * P2_offset, TL, BufferFactory.SIZEOF_FLOAT * TL_offset, DELTAZ, BufferFactory.SIZEOF_FLOAT * DELTAZ_offset, LVL, BufferFactory.SIZEOF_INT * LVL_offset, CTMAX, BufferFactory.SIZEOF_FLOAT * CTMAX_offset); - - } - - /** Interface to C language function:
float mytw(float * t, float * td, float * p); */ - public static float mytw(java.nio.FloatBuffer t, java.nio.FloatBuffer td, java.nio.FloatBuffer p) - { - boolean _direct = BufferFactory.isDirect(t); - if (td != null && _direct != BufferFactory.isDirect(td)) - throw new RuntimeException("Argument \"td\" : Buffers passed to this method must all be either direct or indirect"); - if (p != null && _direct != BufferFactory.isDirect(p)) - throw new RuntimeException("Argument \"p\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - return mytw0(t, BufferFactory.getDirectBufferByteOffset(t), td, BufferFactory.getDirectBufferByteOffset(td), p, BufferFactory.getDirectBufferByteOffset(p)); - } else { - return mytw1(BufferFactory.getArray(t), BufferFactory.getIndirectBufferByteOffset(t), BufferFactory.getArray(td), BufferFactory.getIndirectBufferByteOffset(td), BufferFactory.getArray(p), BufferFactory.getIndirectBufferByteOffset(p)); - } - } - - /** Entry point to C language function:
float mytw(float * t, float * td, float * p); */ - private static native float mytw0(Object t, int t_byte_offset, Object td, int td_byte_offset, Object p, int p_byte_offset); - - /** Entry point to C language function:
float mytw(float * t, float * td, float * p); */ - private static native float mytw1(Object t, int t_byte_offset, Object td, int td_byte_offset, Object p, int p_byte_offset); - - /** Interface to C language function:
float mytw(float * t, float * td, float * p); */ - public static float mytw(float[] t, int t_offset, float[] td, int td_offset, float[] p, int p_offset) - { - if(t != null && t.length <= t_offset) - throw new RuntimeException("array offset argument \"t_offset\" (" + t_offset + ") equals or exceeds array length (" + t.length + ")"); - if(td != null && td.length <= td_offset) - throw new RuntimeException("array offset argument \"td_offset\" (" + td_offset + ") equals or exceeds array length (" + td.length + ")"); - if(p != null && p.length <= p_offset) - throw new RuntimeException("array offset argument \"p_offset\" (" + p_offset + ") equals or exceeds array length (" + p.length + ")"); - return mytw1(t, BufferFactory.SIZEOF_FLOAT * t_offset, td, BufferFactory.SIZEOF_FLOAT * td_offset, p, BufferFactory.SIZEOF_FLOAT * p_offset); - - } - - /** Interface to C language function:
void nadgdt(float * u, float * v, float * a, int * mni, int * ni, int * nj, float * dx, float * dy, float * dadxdt, float * dadydt); */ - public static void nadgdt(java.nio.FloatBuffer u, java.nio.FloatBuffer v, java.nio.FloatBuffer a, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj, java.nio.FloatBuffer dx, java.nio.FloatBuffer dy, java.nio.FloatBuffer dadxdt, java.nio.FloatBuffer dadydt) - { - boolean _direct = BufferFactory.isDirect(u); - if (v != null && _direct != BufferFactory.isDirect(v)) - throw new RuntimeException("Argument \"v\" : Buffers passed to this method must all be either direct or indirect"); - if (a != null && _direct != BufferFactory.isDirect(a)) - throw new RuntimeException("Argument \"a\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (dx != null && _direct != BufferFactory.isDirect(dx)) - throw new RuntimeException("Argument \"dx\" : Buffers passed to this method must all be either direct or indirect"); - if (dy != null && _direct != BufferFactory.isDirect(dy)) - throw new RuntimeException("Argument \"dy\" : Buffers passed to this method must all be either direct or indirect"); - if (dadxdt != null && _direct != BufferFactory.isDirect(dadxdt)) - throw new RuntimeException("Argument \"dadxdt\" : Buffers passed to this method must all be either direct or indirect"); - if (dadydt != null && _direct != BufferFactory.isDirect(dadydt)) - throw new RuntimeException("Argument \"dadydt\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - nadgdt0(u, BufferFactory.getDirectBufferByteOffset(u), v, BufferFactory.getDirectBufferByteOffset(v), a, BufferFactory.getDirectBufferByteOffset(a), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj), dx, BufferFactory.getDirectBufferByteOffset(dx), dy, BufferFactory.getDirectBufferByteOffset(dy), dadxdt, BufferFactory.getDirectBufferByteOffset(dadxdt), dadydt, BufferFactory.getDirectBufferByteOffset(dadydt)); - } else { - nadgdt1(BufferFactory.getArray(u), BufferFactory.getIndirectBufferByteOffset(u), BufferFactory.getArray(v), BufferFactory.getIndirectBufferByteOffset(v), BufferFactory.getArray(a), BufferFactory.getIndirectBufferByteOffset(a), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj), BufferFactory.getArray(dx), BufferFactory.getIndirectBufferByteOffset(dx), BufferFactory.getArray(dy), BufferFactory.getIndirectBufferByteOffset(dy), BufferFactory.getArray(dadxdt), BufferFactory.getIndirectBufferByteOffset(dadxdt), BufferFactory.getArray(dadydt), BufferFactory.getIndirectBufferByteOffset(dadydt)); - } - } - - /** Entry point to C language function:
void nadgdt(float * u, float * v, float * a, int * mni, int * ni, int * nj, float * dx, float * dy, float * dadxdt, float * dadydt); */ - private static native void nadgdt0(Object u, int u_byte_offset, Object v, int v_byte_offset, Object a, int a_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object dx, int dx_byte_offset, Object dy, int dy_byte_offset, Object dadxdt, int dadxdt_byte_offset, Object dadydt, int dadydt_byte_offset); - - /** Entry point to C language function:
void nadgdt(float * u, float * v, float * a, int * mni, int * ni, int * nj, float * dx, float * dy, float * dadxdt, float * dadydt); */ - private static native void nadgdt1(Object u, int u_byte_offset, Object v, int v_byte_offset, Object a, int a_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object dx, int dx_byte_offset, Object dy, int dy_byte_offset, Object dadxdt, int dadxdt_byte_offset, Object dadydt, int dadydt_byte_offset); - - /** Interface to C language function:
void nadgdt(float * u, float * v, float * a, int * mni, int * ni, int * nj, float * dx, float * dy, float * dadxdt, float * dadydt); */ - public static void nadgdt(float[] u, int u_offset, float[] v, int v_offset, float[] a, int a_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset, float[] dx, int dx_offset, float[] dy, int dy_offset, float[] dadxdt, int dadxdt_offset, float[] dadydt, int dadydt_offset) - { - if(u != null && u.length <= u_offset) - throw new RuntimeException("array offset argument \"u_offset\" (" + u_offset + ") equals or exceeds array length (" + u.length + ")"); - if(v != null && v.length <= v_offset) - throw new RuntimeException("array offset argument \"v_offset\" (" + v_offset + ") equals or exceeds array length (" + v.length + ")"); - if(a != null && a.length <= a_offset) - throw new RuntimeException("array offset argument \"a_offset\" (" + a_offset + ") equals or exceeds array length (" + a.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - if(dx != null && dx.length <= dx_offset) - throw new RuntimeException("array offset argument \"dx_offset\" (" + dx_offset + ") equals or exceeds array length (" + dx.length + ")"); - if(dy != null && dy.length <= dy_offset) - throw new RuntimeException("array offset argument \"dy_offset\" (" + dy_offset + ") equals or exceeds array length (" + dy.length + ")"); - if(dadxdt != null && dadxdt.length <= dadxdt_offset) - throw new RuntimeException("array offset argument \"dadxdt_offset\" (" + dadxdt_offset + ") equals or exceeds array length (" + dadxdt.length + ")"); - if(dadydt != null && dadydt.length <= dadydt_offset) - throw new RuntimeException("array offset argument \"dadydt_offset\" (" + dadydt_offset + ") equals or exceeds array length (" + dadydt.length + ")"); - nadgdt1(u, BufferFactory.SIZEOF_FLOAT * u_offset, v, BufferFactory.SIZEOF_FLOAT * v_offset, a, BufferFactory.SIZEOF_FLOAT * a_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset, dx, BufferFactory.SIZEOF_FLOAT * dx_offset, dy, BufferFactory.SIZEOF_FLOAT * dy_offset, dadxdt, BufferFactory.SIZEOF_FLOAT * dadxdt_offset, dadydt, BufferFactory.SIZEOF_FLOAT * dadydt_offset); - - } - - /** Interface to C language function:
void natlog(float * a, float * b, int * mni, int * ni, int * nj); */ - public static void natlog(java.nio.FloatBuffer a, java.nio.FloatBuffer b, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj) - { - boolean _direct = BufferFactory.isDirect(a); - if (b != null && _direct != BufferFactory.isDirect(b)) - throw new RuntimeException("Argument \"b\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - natlog0(a, BufferFactory.getDirectBufferByteOffset(a), b, BufferFactory.getDirectBufferByteOffset(b), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj)); - } else { - natlog1(BufferFactory.getArray(a), BufferFactory.getIndirectBufferByteOffset(a), BufferFactory.getArray(b), BufferFactory.getIndirectBufferByteOffset(b), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj)); - } - } - - /** Entry point to C language function:
void natlog(float * a, float * b, int * mni, int * ni, int * nj); */ - private static native void natlog0(Object a, int a_byte_offset, Object b, int b_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset); - - /** Entry point to C language function:
void natlog(float * a, float * b, int * mni, int * ni, int * nj); */ - private static native void natlog1(Object a, int a_byte_offset, Object b, int b_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset); - - /** Interface to C language function:
void natlog(float * a, float * b, int * mni, int * ni, int * nj); */ - public static void natlog(float[] a, int a_offset, float[] b, int b_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset) - { - if(a != null && a.length <= a_offset) - throw new RuntimeException("array offset argument \"a_offset\" (" + a_offset + ") equals or exceeds array length (" + a.length + ")"); - if(b != null && b.length <= b_offset) - throw new RuntimeException("array offset argument \"b_offset\" (" + b_offset + ") equals or exceeds array length (" + b.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - natlog1(a, BufferFactory.SIZEOF_FLOAT * a_offset, b, BufferFactory.SIZEOF_FLOAT * b_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset); - - } - - /** Interface to C language function:
void negarea(float * PCB, float * TCB, float * HCB, float * PLFC, float * HLFC, float * TLFC, float * THDPAR, float * EPTPAR, float * P, float * HT, float * TE, float * TP, int * NPAR, float * CINFRMCAPE, float * NEGBUOY); */ - public static void negarea(java.nio.FloatBuffer PCB, java.nio.FloatBuffer TCB, java.nio.FloatBuffer HCB, java.nio.FloatBuffer PLFC, java.nio.FloatBuffer HLFC, java.nio.FloatBuffer TLFC, java.nio.FloatBuffer THDPAR, java.nio.FloatBuffer EPTPAR, java.nio.FloatBuffer P, java.nio.FloatBuffer HT, java.nio.FloatBuffer TE, java.nio.FloatBuffer TP, java.nio.IntBuffer NPAR, java.nio.FloatBuffer CINFRMCAPE, java.nio.FloatBuffer NEGBUOY) - { - boolean _direct = BufferFactory.isDirect(PCB); - if (TCB != null && _direct != BufferFactory.isDirect(TCB)) - throw new RuntimeException("Argument \"TCB\" : Buffers passed to this method must all be either direct or indirect"); - if (HCB != null && _direct != BufferFactory.isDirect(HCB)) - throw new RuntimeException("Argument \"HCB\" : Buffers passed to this method must all be either direct or indirect"); - if (PLFC != null && _direct != BufferFactory.isDirect(PLFC)) - throw new RuntimeException("Argument \"PLFC\" : Buffers passed to this method must all be either direct or indirect"); - if (HLFC != null && _direct != BufferFactory.isDirect(HLFC)) - throw new RuntimeException("Argument \"HLFC\" : Buffers passed to this method must all be either direct or indirect"); - if (TLFC != null && _direct != BufferFactory.isDirect(TLFC)) - throw new RuntimeException("Argument \"TLFC\" : Buffers passed to this method must all be either direct or indirect"); - if (THDPAR != null && _direct != BufferFactory.isDirect(THDPAR)) - throw new RuntimeException("Argument \"THDPAR\" : Buffers passed to this method must all be either direct or indirect"); - if (EPTPAR != null && _direct != BufferFactory.isDirect(EPTPAR)) - throw new RuntimeException("Argument \"EPTPAR\" : Buffers passed to this method must all be either direct or indirect"); - if (P != null && _direct != BufferFactory.isDirect(P)) - throw new RuntimeException("Argument \"P\" : Buffers passed to this method must all be either direct or indirect"); - if (HT != null && _direct != BufferFactory.isDirect(HT)) - throw new RuntimeException("Argument \"HT\" : Buffers passed to this method must all be either direct or indirect"); - if (TE != null && _direct != BufferFactory.isDirect(TE)) - throw new RuntimeException("Argument \"TE\" : Buffers passed to this method must all be either direct or indirect"); - if (TP != null && _direct != BufferFactory.isDirect(TP)) - throw new RuntimeException("Argument \"TP\" : Buffers passed to this method must all be either direct or indirect"); - if (NPAR != null && _direct != BufferFactory.isDirect(NPAR)) - throw new RuntimeException("Argument \"NPAR\" : Buffers passed to this method must all be either direct or indirect"); - if (CINFRMCAPE != null && _direct != BufferFactory.isDirect(CINFRMCAPE)) - throw new RuntimeException("Argument \"CINFRMCAPE\" : Buffers passed to this method must all be either direct or indirect"); - if (NEGBUOY != null && _direct != BufferFactory.isDirect(NEGBUOY)) - throw new RuntimeException("Argument \"NEGBUOY\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - negarea0(PCB, BufferFactory.getDirectBufferByteOffset(PCB), TCB, BufferFactory.getDirectBufferByteOffset(TCB), HCB, BufferFactory.getDirectBufferByteOffset(HCB), PLFC, BufferFactory.getDirectBufferByteOffset(PLFC), HLFC, BufferFactory.getDirectBufferByteOffset(HLFC), TLFC, BufferFactory.getDirectBufferByteOffset(TLFC), THDPAR, BufferFactory.getDirectBufferByteOffset(THDPAR), EPTPAR, BufferFactory.getDirectBufferByteOffset(EPTPAR), P, BufferFactory.getDirectBufferByteOffset(P), HT, BufferFactory.getDirectBufferByteOffset(HT), TE, BufferFactory.getDirectBufferByteOffset(TE), TP, BufferFactory.getDirectBufferByteOffset(TP), NPAR, BufferFactory.getDirectBufferByteOffset(NPAR), CINFRMCAPE, BufferFactory.getDirectBufferByteOffset(CINFRMCAPE), NEGBUOY, BufferFactory.getDirectBufferByteOffset(NEGBUOY)); - } else { - negarea1(BufferFactory.getArray(PCB), BufferFactory.getIndirectBufferByteOffset(PCB), BufferFactory.getArray(TCB), BufferFactory.getIndirectBufferByteOffset(TCB), BufferFactory.getArray(HCB), BufferFactory.getIndirectBufferByteOffset(HCB), BufferFactory.getArray(PLFC), BufferFactory.getIndirectBufferByteOffset(PLFC), BufferFactory.getArray(HLFC), BufferFactory.getIndirectBufferByteOffset(HLFC), BufferFactory.getArray(TLFC), BufferFactory.getIndirectBufferByteOffset(TLFC), BufferFactory.getArray(THDPAR), BufferFactory.getIndirectBufferByteOffset(THDPAR), BufferFactory.getArray(EPTPAR), BufferFactory.getIndirectBufferByteOffset(EPTPAR), BufferFactory.getArray(P), BufferFactory.getIndirectBufferByteOffset(P), BufferFactory.getArray(HT), BufferFactory.getIndirectBufferByteOffset(HT), BufferFactory.getArray(TE), BufferFactory.getIndirectBufferByteOffset(TE), BufferFactory.getArray(TP), BufferFactory.getIndirectBufferByteOffset(TP), BufferFactory.getArray(NPAR), BufferFactory.getIndirectBufferByteOffset(NPAR), BufferFactory.getArray(CINFRMCAPE), BufferFactory.getIndirectBufferByteOffset(CINFRMCAPE), BufferFactory.getArray(NEGBUOY), BufferFactory.getIndirectBufferByteOffset(NEGBUOY)); - } - } - - /** Entry point to C language function:
void negarea(float * PCB, float * TCB, float * HCB, float * PLFC, float * HLFC, float * TLFC, float * THDPAR, float * EPTPAR, float * P, float * HT, float * TE, float * TP, int * NPAR, float * CINFRMCAPE, float * NEGBUOY); */ - private static native void negarea0(Object PCB, int PCB_byte_offset, Object TCB, int TCB_byte_offset, Object HCB, int HCB_byte_offset, Object PLFC, int PLFC_byte_offset, Object HLFC, int HLFC_byte_offset, Object TLFC, int TLFC_byte_offset, Object THDPAR, int THDPAR_byte_offset, Object EPTPAR, int EPTPAR_byte_offset, Object P, int P_byte_offset, Object HT, int HT_byte_offset, Object TE, int TE_byte_offset, Object TP, int TP_byte_offset, Object NPAR, int NPAR_byte_offset, Object CINFRMCAPE, int CINFRMCAPE_byte_offset, Object NEGBUOY, int NEGBUOY_byte_offset); - - /** Entry point to C language function:
void negarea(float * PCB, float * TCB, float * HCB, float * PLFC, float * HLFC, float * TLFC, float * THDPAR, float * EPTPAR, float * P, float * HT, float * TE, float * TP, int * NPAR, float * CINFRMCAPE, float * NEGBUOY); */ - private static native void negarea1(Object PCB, int PCB_byte_offset, Object TCB, int TCB_byte_offset, Object HCB, int HCB_byte_offset, Object PLFC, int PLFC_byte_offset, Object HLFC, int HLFC_byte_offset, Object TLFC, int TLFC_byte_offset, Object THDPAR, int THDPAR_byte_offset, Object EPTPAR, int EPTPAR_byte_offset, Object P, int P_byte_offset, Object HT, int HT_byte_offset, Object TE, int TE_byte_offset, Object TP, int TP_byte_offset, Object NPAR, int NPAR_byte_offset, Object CINFRMCAPE, int CINFRMCAPE_byte_offset, Object NEGBUOY, int NEGBUOY_byte_offset); - - /** Interface to C language function:
void negarea(float * PCB, float * TCB, float * HCB, float * PLFC, float * HLFC, float * TLFC, float * THDPAR, float * EPTPAR, float * P, float * HT, float * TE, float * TP, int * NPAR, float * CINFRMCAPE, float * NEGBUOY); */ - public static void negarea(float[] PCB, int PCB_offset, float[] TCB, int TCB_offset, float[] HCB, int HCB_offset, float[] PLFC, int PLFC_offset, float[] HLFC, int HLFC_offset, float[] TLFC, int TLFC_offset, float[] THDPAR, int THDPAR_offset, float[] EPTPAR, int EPTPAR_offset, float[] P, int P_offset, float[] HT, int HT_offset, float[] TE, int TE_offset, float[] TP, int TP_offset, int[] NPAR, int NPAR_offset, float[] CINFRMCAPE, int CINFRMCAPE_offset, float[] NEGBUOY, int NEGBUOY_offset) - { - if(PCB != null && PCB.length <= PCB_offset) - throw new RuntimeException("array offset argument \"PCB_offset\" (" + PCB_offset + ") equals or exceeds array length (" + PCB.length + ")"); - if(TCB != null && TCB.length <= TCB_offset) - throw new RuntimeException("array offset argument \"TCB_offset\" (" + TCB_offset + ") equals or exceeds array length (" + TCB.length + ")"); - if(HCB != null && HCB.length <= HCB_offset) - throw new RuntimeException("array offset argument \"HCB_offset\" (" + HCB_offset + ") equals or exceeds array length (" + HCB.length + ")"); - if(PLFC != null && PLFC.length <= PLFC_offset) - throw new RuntimeException("array offset argument \"PLFC_offset\" (" + PLFC_offset + ") equals or exceeds array length (" + PLFC.length + ")"); - if(HLFC != null && HLFC.length <= HLFC_offset) - throw new RuntimeException("array offset argument \"HLFC_offset\" (" + HLFC_offset + ") equals or exceeds array length (" + HLFC.length + ")"); - if(TLFC != null && TLFC.length <= TLFC_offset) - throw new RuntimeException("array offset argument \"TLFC_offset\" (" + TLFC_offset + ") equals or exceeds array length (" + TLFC.length + ")"); - if(THDPAR != null && THDPAR.length <= THDPAR_offset) - throw new RuntimeException("array offset argument \"THDPAR_offset\" (" + THDPAR_offset + ") equals or exceeds array length (" + THDPAR.length + ")"); - if(EPTPAR != null && EPTPAR.length <= EPTPAR_offset) - throw new RuntimeException("array offset argument \"EPTPAR_offset\" (" + EPTPAR_offset + ") equals or exceeds array length (" + EPTPAR.length + ")"); - if(P != null && P.length <= P_offset) - throw new RuntimeException("array offset argument \"P_offset\" (" + P_offset + ") equals or exceeds array length (" + P.length + ")"); - if(HT != null && HT.length <= HT_offset) - throw new RuntimeException("array offset argument \"HT_offset\" (" + HT_offset + ") equals or exceeds array length (" + HT.length + ")"); - if(TE != null && TE.length <= TE_offset) - throw new RuntimeException("array offset argument \"TE_offset\" (" + TE_offset + ") equals or exceeds array length (" + TE.length + ")"); - if(TP != null && TP.length <= TP_offset) - throw new RuntimeException("array offset argument \"TP_offset\" (" + TP_offset + ") equals or exceeds array length (" + TP.length + ")"); - if(NPAR != null && NPAR.length <= NPAR_offset) - throw new RuntimeException("array offset argument \"NPAR_offset\" (" + NPAR_offset + ") equals or exceeds array length (" + NPAR.length + ")"); - if(CINFRMCAPE != null && CINFRMCAPE.length <= CINFRMCAPE_offset) - throw new RuntimeException("array offset argument \"CINFRMCAPE_offset\" (" + CINFRMCAPE_offset + ") equals or exceeds array length (" + CINFRMCAPE.length + ")"); - if(NEGBUOY != null && NEGBUOY.length <= NEGBUOY_offset) - throw new RuntimeException("array offset argument \"NEGBUOY_offset\" (" + NEGBUOY_offset + ") equals or exceeds array length (" + NEGBUOY.length + ")"); - negarea1(PCB, BufferFactory.SIZEOF_FLOAT * PCB_offset, TCB, BufferFactory.SIZEOF_FLOAT * TCB_offset, HCB, BufferFactory.SIZEOF_FLOAT * HCB_offset, PLFC, BufferFactory.SIZEOF_FLOAT * PLFC_offset, HLFC, BufferFactory.SIZEOF_FLOAT * HLFC_offset, TLFC, BufferFactory.SIZEOF_FLOAT * TLFC_offset, THDPAR, BufferFactory.SIZEOF_FLOAT * THDPAR_offset, EPTPAR, BufferFactory.SIZEOF_FLOAT * EPTPAR_offset, P, BufferFactory.SIZEOF_FLOAT * P_offset, HT, BufferFactory.SIZEOF_FLOAT * HT_offset, TE, BufferFactory.SIZEOF_FLOAT * TE_offset, TP, BufferFactory.SIZEOF_FLOAT * TP_offset, NPAR, BufferFactory.SIZEOF_INT * NPAR_offset, CINFRMCAPE, BufferFactory.SIZEOF_FLOAT * CINFRMCAPE_offset, NEGBUOY, BufferFactory.SIZEOF_FLOAT * NEGBUOY_offset); - - } - - /** Interface to C language function:
void posarea(float * PLFC, float * PEQLEV, float * TLFC, float * TEQLEV, float * HLFC, float * HEQLEV, float * EPTPAR, float * P, float * HT, float * TE, float * TP, int * NPAR, float * BUOY, float * CIN); */ - public static void posarea(java.nio.FloatBuffer PLFC, java.nio.FloatBuffer PEQLEV, java.nio.FloatBuffer TLFC, java.nio.FloatBuffer TEQLEV, java.nio.FloatBuffer HLFC, java.nio.FloatBuffer HEQLEV, java.nio.FloatBuffer EPTPAR, java.nio.FloatBuffer P, java.nio.FloatBuffer HT, java.nio.FloatBuffer TE, java.nio.FloatBuffer TP, java.nio.IntBuffer NPAR, java.nio.FloatBuffer BUOY, java.nio.FloatBuffer CIN) - { - boolean _direct = BufferFactory.isDirect(PLFC); - if (PEQLEV != null && _direct != BufferFactory.isDirect(PEQLEV)) - throw new RuntimeException("Argument \"PEQLEV\" : Buffers passed to this method must all be either direct or indirect"); - if (TLFC != null && _direct != BufferFactory.isDirect(TLFC)) - throw new RuntimeException("Argument \"TLFC\" : Buffers passed to this method must all be either direct or indirect"); - if (TEQLEV != null && _direct != BufferFactory.isDirect(TEQLEV)) - throw new RuntimeException("Argument \"TEQLEV\" : Buffers passed to this method must all be either direct or indirect"); - if (HLFC != null && _direct != BufferFactory.isDirect(HLFC)) - throw new RuntimeException("Argument \"HLFC\" : Buffers passed to this method must all be either direct or indirect"); - if (HEQLEV != null && _direct != BufferFactory.isDirect(HEQLEV)) - throw new RuntimeException("Argument \"HEQLEV\" : Buffers passed to this method must all be either direct or indirect"); - if (EPTPAR != null && _direct != BufferFactory.isDirect(EPTPAR)) - throw new RuntimeException("Argument \"EPTPAR\" : Buffers passed to this method must all be either direct or indirect"); - if (P != null && _direct != BufferFactory.isDirect(P)) - throw new RuntimeException("Argument \"P\" : Buffers passed to this method must all be either direct or indirect"); - if (HT != null && _direct != BufferFactory.isDirect(HT)) - throw new RuntimeException("Argument \"HT\" : Buffers passed to this method must all be either direct or indirect"); - if (TE != null && _direct != BufferFactory.isDirect(TE)) - throw new RuntimeException("Argument \"TE\" : Buffers passed to this method must all be either direct or indirect"); - if (TP != null && _direct != BufferFactory.isDirect(TP)) - throw new RuntimeException("Argument \"TP\" : Buffers passed to this method must all be either direct or indirect"); - if (NPAR != null && _direct != BufferFactory.isDirect(NPAR)) - throw new RuntimeException("Argument \"NPAR\" : Buffers passed to this method must all be either direct or indirect"); - if (BUOY != null && _direct != BufferFactory.isDirect(BUOY)) - throw new RuntimeException("Argument \"BUOY\" : Buffers passed to this method must all be either direct or indirect"); - if (CIN != null && _direct != BufferFactory.isDirect(CIN)) - throw new RuntimeException("Argument \"CIN\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - posarea0(PLFC, BufferFactory.getDirectBufferByteOffset(PLFC), PEQLEV, BufferFactory.getDirectBufferByteOffset(PEQLEV), TLFC, BufferFactory.getDirectBufferByteOffset(TLFC), TEQLEV, BufferFactory.getDirectBufferByteOffset(TEQLEV), HLFC, BufferFactory.getDirectBufferByteOffset(HLFC), HEQLEV, BufferFactory.getDirectBufferByteOffset(HEQLEV), EPTPAR, BufferFactory.getDirectBufferByteOffset(EPTPAR), P, BufferFactory.getDirectBufferByteOffset(P), HT, BufferFactory.getDirectBufferByteOffset(HT), TE, BufferFactory.getDirectBufferByteOffset(TE), TP, BufferFactory.getDirectBufferByteOffset(TP), NPAR, BufferFactory.getDirectBufferByteOffset(NPAR), BUOY, BufferFactory.getDirectBufferByteOffset(BUOY), CIN, BufferFactory.getDirectBufferByteOffset(CIN)); - } else { - posarea1(BufferFactory.getArray(PLFC), BufferFactory.getIndirectBufferByteOffset(PLFC), BufferFactory.getArray(PEQLEV), BufferFactory.getIndirectBufferByteOffset(PEQLEV), BufferFactory.getArray(TLFC), BufferFactory.getIndirectBufferByteOffset(TLFC), BufferFactory.getArray(TEQLEV), BufferFactory.getIndirectBufferByteOffset(TEQLEV), BufferFactory.getArray(HLFC), BufferFactory.getIndirectBufferByteOffset(HLFC), BufferFactory.getArray(HEQLEV), BufferFactory.getIndirectBufferByteOffset(HEQLEV), BufferFactory.getArray(EPTPAR), BufferFactory.getIndirectBufferByteOffset(EPTPAR), BufferFactory.getArray(P), BufferFactory.getIndirectBufferByteOffset(P), BufferFactory.getArray(HT), BufferFactory.getIndirectBufferByteOffset(HT), BufferFactory.getArray(TE), BufferFactory.getIndirectBufferByteOffset(TE), BufferFactory.getArray(TP), BufferFactory.getIndirectBufferByteOffset(TP), BufferFactory.getArray(NPAR), BufferFactory.getIndirectBufferByteOffset(NPAR), BufferFactory.getArray(BUOY), BufferFactory.getIndirectBufferByteOffset(BUOY), BufferFactory.getArray(CIN), BufferFactory.getIndirectBufferByteOffset(CIN)); - } - } - - /** Entry point to C language function:
void posarea(float * PLFC, float * PEQLEV, float * TLFC, float * TEQLEV, float * HLFC, float * HEQLEV, float * EPTPAR, float * P, float * HT, float * TE, float * TP, int * NPAR, float * BUOY, float * CIN); */ - private static native void posarea0(Object PLFC, int PLFC_byte_offset, Object PEQLEV, int PEQLEV_byte_offset, Object TLFC, int TLFC_byte_offset, Object TEQLEV, int TEQLEV_byte_offset, Object HLFC, int HLFC_byte_offset, Object HEQLEV, int HEQLEV_byte_offset, Object EPTPAR, int EPTPAR_byte_offset, Object P, int P_byte_offset, Object HT, int HT_byte_offset, Object TE, int TE_byte_offset, Object TP, int TP_byte_offset, Object NPAR, int NPAR_byte_offset, Object BUOY, int BUOY_byte_offset, Object CIN, int CIN_byte_offset); - - /** Entry point to C language function:
void posarea(float * PLFC, float * PEQLEV, float * TLFC, float * TEQLEV, float * HLFC, float * HEQLEV, float * EPTPAR, float * P, float * HT, float * TE, float * TP, int * NPAR, float * BUOY, float * CIN); */ - private static native void posarea1(Object PLFC, int PLFC_byte_offset, Object PEQLEV, int PEQLEV_byte_offset, Object TLFC, int TLFC_byte_offset, Object TEQLEV, int TEQLEV_byte_offset, Object HLFC, int HLFC_byte_offset, Object HEQLEV, int HEQLEV_byte_offset, Object EPTPAR, int EPTPAR_byte_offset, Object P, int P_byte_offset, Object HT, int HT_byte_offset, Object TE, int TE_byte_offset, Object TP, int TP_byte_offset, Object NPAR, int NPAR_byte_offset, Object BUOY, int BUOY_byte_offset, Object CIN, int CIN_byte_offset); - - /** Interface to C language function:
void posarea(float * PLFC, float * PEQLEV, float * TLFC, float * TEQLEV, float * HLFC, float * HEQLEV, float * EPTPAR, float * P, float * HT, float * TE, float * TP, int * NPAR, float * BUOY, float * CIN); */ - public static void posarea(float[] PLFC, int PLFC_offset, float[] PEQLEV, int PEQLEV_offset, float[] TLFC, int TLFC_offset, float[] TEQLEV, int TEQLEV_offset, float[] HLFC, int HLFC_offset, float[] HEQLEV, int HEQLEV_offset, float[] EPTPAR, int EPTPAR_offset, float[] P, int P_offset, float[] HT, int HT_offset, float[] TE, int TE_offset, float[] TP, int TP_offset, int[] NPAR, int NPAR_offset, float[] BUOY, int BUOY_offset, float[] CIN, int CIN_offset) - { - if(PLFC != null && PLFC.length <= PLFC_offset) - throw new RuntimeException("array offset argument \"PLFC_offset\" (" + PLFC_offset + ") equals or exceeds array length (" + PLFC.length + ")"); - if(PEQLEV != null && PEQLEV.length <= PEQLEV_offset) - throw new RuntimeException("array offset argument \"PEQLEV_offset\" (" + PEQLEV_offset + ") equals or exceeds array length (" + PEQLEV.length + ")"); - if(TLFC != null && TLFC.length <= TLFC_offset) - throw new RuntimeException("array offset argument \"TLFC_offset\" (" + TLFC_offset + ") equals or exceeds array length (" + TLFC.length + ")"); - if(TEQLEV != null && TEQLEV.length <= TEQLEV_offset) - throw new RuntimeException("array offset argument \"TEQLEV_offset\" (" + TEQLEV_offset + ") equals or exceeds array length (" + TEQLEV.length + ")"); - if(HLFC != null && HLFC.length <= HLFC_offset) - throw new RuntimeException("array offset argument \"HLFC_offset\" (" + HLFC_offset + ") equals or exceeds array length (" + HLFC.length + ")"); - if(HEQLEV != null && HEQLEV.length <= HEQLEV_offset) - throw new RuntimeException("array offset argument \"HEQLEV_offset\" (" + HEQLEV_offset + ") equals or exceeds array length (" + HEQLEV.length + ")"); - if(EPTPAR != null && EPTPAR.length <= EPTPAR_offset) - throw new RuntimeException("array offset argument \"EPTPAR_offset\" (" + EPTPAR_offset + ") equals or exceeds array length (" + EPTPAR.length + ")"); - if(P != null && P.length <= P_offset) - throw new RuntimeException("array offset argument \"P_offset\" (" + P_offset + ") equals or exceeds array length (" + P.length + ")"); - if(HT != null && HT.length <= HT_offset) - throw new RuntimeException("array offset argument \"HT_offset\" (" + HT_offset + ") equals or exceeds array length (" + HT.length + ")"); - if(TE != null && TE.length <= TE_offset) - throw new RuntimeException("array offset argument \"TE_offset\" (" + TE_offset + ") equals or exceeds array length (" + TE.length + ")"); - if(TP != null && TP.length <= TP_offset) - throw new RuntimeException("array offset argument \"TP_offset\" (" + TP_offset + ") equals or exceeds array length (" + TP.length + ")"); - if(NPAR != null && NPAR.length <= NPAR_offset) - throw new RuntimeException("array offset argument \"NPAR_offset\" (" + NPAR_offset + ") equals or exceeds array length (" + NPAR.length + ")"); - if(BUOY != null && BUOY.length <= BUOY_offset) - throw new RuntimeException("array offset argument \"BUOY_offset\" (" + BUOY_offset + ") equals or exceeds array length (" + BUOY.length + ")"); - if(CIN != null && CIN.length <= CIN_offset) - throw new RuntimeException("array offset argument \"CIN_offset\" (" + CIN_offset + ") equals or exceeds array length (" + CIN.length + ")"); - posarea1(PLFC, BufferFactory.SIZEOF_FLOAT * PLFC_offset, PEQLEV, BufferFactory.SIZEOF_FLOAT * PEQLEV_offset, TLFC, BufferFactory.SIZEOF_FLOAT * TLFC_offset, TEQLEV, BufferFactory.SIZEOF_FLOAT * TEQLEV_offset, HLFC, BufferFactory.SIZEOF_FLOAT * HLFC_offset, HEQLEV, BufferFactory.SIZEOF_FLOAT * HEQLEV_offset, EPTPAR, BufferFactory.SIZEOF_FLOAT * EPTPAR_offset, P, BufferFactory.SIZEOF_FLOAT * P_offset, HT, BufferFactory.SIZEOF_FLOAT * HT_offset, TE, BufferFactory.SIZEOF_FLOAT * TE_offset, TP, BufferFactory.SIZEOF_FLOAT * TP_offset, NPAR, BufferFactory.SIZEOF_INT * NPAR_offset, BUOY, BufferFactory.SIZEOF_FLOAT * BUOY_offset, CIN, BufferFactory.SIZEOF_FLOAT * CIN_offset); - - } - - /** Interface to C language function:
float pottemp(float * temp, float * dwpt, float * pres, int * iw); */ - public static float pottemp(java.nio.FloatBuffer temp, java.nio.FloatBuffer dwpt, java.nio.FloatBuffer pres, java.nio.IntBuffer iw) - { - boolean _direct = BufferFactory.isDirect(temp); - if (dwpt != null && _direct != BufferFactory.isDirect(dwpt)) - throw new RuntimeException("Argument \"dwpt\" : Buffers passed to this method must all be either direct or indirect"); - if (pres != null && _direct != BufferFactory.isDirect(pres)) - throw new RuntimeException("Argument \"pres\" : Buffers passed to this method must all be either direct or indirect"); - if (iw != null && _direct != BufferFactory.isDirect(iw)) - throw new RuntimeException("Argument \"iw\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - return pottemp0(temp, BufferFactory.getDirectBufferByteOffset(temp), dwpt, BufferFactory.getDirectBufferByteOffset(dwpt), pres, BufferFactory.getDirectBufferByteOffset(pres), iw, BufferFactory.getDirectBufferByteOffset(iw)); - } else { - return pottemp1(BufferFactory.getArray(temp), BufferFactory.getIndirectBufferByteOffset(temp), BufferFactory.getArray(dwpt), BufferFactory.getIndirectBufferByteOffset(dwpt), BufferFactory.getArray(pres), BufferFactory.getIndirectBufferByteOffset(pres), BufferFactory.getArray(iw), BufferFactory.getIndirectBufferByteOffset(iw)); - } - } - - /** Entry point to C language function:
float pottemp(float * temp, float * dwpt, float * pres, int * iw); */ - private static native float pottemp0(Object temp, int temp_byte_offset, Object dwpt, int dwpt_byte_offset, Object pres, int pres_byte_offset, Object iw, int iw_byte_offset); - - /** Entry point to C language function:
float pottemp(float * temp, float * dwpt, float * pres, int * iw); */ - private static native float pottemp1(Object temp, int temp_byte_offset, Object dwpt, int dwpt_byte_offset, Object pres, int pres_byte_offset, Object iw, int iw_byte_offset); - - /** Interface to C language function:
float pottemp(float * temp, float * dwpt, float * pres, int * iw); */ - public static float pottemp(float[] temp, int temp_offset, float[] dwpt, int dwpt_offset, float[] pres, int pres_offset, int[] iw, int iw_offset) - { - if(temp != null && temp.length <= temp_offset) - throw new RuntimeException("array offset argument \"temp_offset\" (" + temp_offset + ") equals or exceeds array length (" + temp.length + ")"); - if(dwpt != null && dwpt.length <= dwpt_offset) - throw new RuntimeException("array offset argument \"dwpt_offset\" (" + dwpt_offset + ") equals or exceeds array length (" + dwpt.length + ")"); - if(pres != null && pres.length <= pres_offset) - throw new RuntimeException("array offset argument \"pres_offset\" (" + pres_offset + ") equals or exceeds array length (" + pres.length + ")"); - if(iw != null && iw.length <= iw_offset) - throw new RuntimeException("array offset argument \"iw_offset\" (" + iw_offset + ") equals or exceeds array length (" + iw.length + ")"); - return pottemp1(temp, BufferFactory.SIZEOF_FLOAT * temp_offset, dwpt, BufferFactory.SIZEOF_FLOAT * dwpt_offset, pres, BufferFactory.SIZEOF_FLOAT * pres_offset, iw, BufferFactory.SIZEOF_INT * iw_offset); - - } - - /** Interface to C language function:
void powercalc(float * a, float * b, float * result, int * mni, int * ni, int * nj); */ - public static void powercalc(java.nio.FloatBuffer a, java.nio.FloatBuffer b, java.nio.FloatBuffer result, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj) - { - boolean _direct = BufferFactory.isDirect(a); - if (b != null && _direct != BufferFactory.isDirect(b)) - throw new RuntimeException("Argument \"b\" : Buffers passed to this method must all be either direct or indirect"); - if (result != null && _direct != BufferFactory.isDirect(result)) - throw new RuntimeException("Argument \"result\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - powercalc0(a, BufferFactory.getDirectBufferByteOffset(a), b, BufferFactory.getDirectBufferByteOffset(b), result, BufferFactory.getDirectBufferByteOffset(result), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj)); - } else { - powercalc1(BufferFactory.getArray(a), BufferFactory.getIndirectBufferByteOffset(a), BufferFactory.getArray(b), BufferFactory.getIndirectBufferByteOffset(b), BufferFactory.getArray(result), BufferFactory.getIndirectBufferByteOffset(result), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj)); - } - } - - /** Entry point to C language function:
void powercalc(float * a, float * b, float * result, int * mni, int * ni, int * nj); */ - private static native void powercalc0(Object a, int a_byte_offset, Object b, int b_byte_offset, Object result, int result_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset); - - /** Entry point to C language function:
void powercalc(float * a, float * b, float * result, int * mni, int * ni, int * nj); */ - private static native void powercalc1(Object a, int a_byte_offset, Object b, int b_byte_offset, Object result, int result_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset); - - /** Interface to C language function:
void powercalc(float * a, float * b, float * result, int * mni, int * ni, int * nj); */ - public static void powercalc(float[] a, int a_offset, float[] b, int b_offset, float[] result, int result_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset) - { - if(a != null && a.length <= a_offset) - throw new RuntimeException("array offset argument \"a_offset\" (" + a_offset + ") equals or exceeds array length (" + a.length + ")"); - if(b != null && b.length <= b_offset) - throw new RuntimeException("array offset argument \"b_offset\" (" + b_offset + ") equals or exceeds array length (" + b.length + ")"); - if(result != null && result.length <= result_offset) - throw new RuntimeException("array offset argument \"result_offset\" (" + result_offset + ") equals or exceeds array length (" + result.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - powercalc1(a, BufferFactory.SIZEOF_FLOAT * a_offset, b, BufferFactory.SIZEOF_FLOAT * b_offset, result, BufferFactory.SIZEOF_FLOAT * result_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset); - - } - - /** Interface to C language function:
void pseudolift(int * n, float * pstart, float * pfinish, float * soln); */ - public static void pseudolift(java.nio.IntBuffer n, java.nio.FloatBuffer pstart, java.nio.FloatBuffer pfinish, java.nio.FloatBuffer soln) - { - boolean _direct = BufferFactory.isDirect(n); - if (pstart != null && _direct != BufferFactory.isDirect(pstart)) - throw new RuntimeException("Argument \"pstart\" : Buffers passed to this method must all be either direct or indirect"); - if (pfinish != null && _direct != BufferFactory.isDirect(pfinish)) - throw new RuntimeException("Argument \"pfinish\" : Buffers passed to this method must all be either direct or indirect"); - if (soln != null && _direct != BufferFactory.isDirect(soln)) - throw new RuntimeException("Argument \"soln\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - pseudolift0(n, BufferFactory.getDirectBufferByteOffset(n), pstart, BufferFactory.getDirectBufferByteOffset(pstart), pfinish, BufferFactory.getDirectBufferByteOffset(pfinish), soln, BufferFactory.getDirectBufferByteOffset(soln)); - } else { - pseudolift1(BufferFactory.getArray(n), BufferFactory.getIndirectBufferByteOffset(n), BufferFactory.getArray(pstart), BufferFactory.getIndirectBufferByteOffset(pstart), BufferFactory.getArray(pfinish), BufferFactory.getIndirectBufferByteOffset(pfinish), BufferFactory.getArray(soln), BufferFactory.getIndirectBufferByteOffset(soln)); - } - } - - /** Entry point to C language function:
void pseudolift(int * n, float * pstart, float * pfinish, float * soln); */ - private static native void pseudolift0(Object n, int n_byte_offset, Object pstart, int pstart_byte_offset, Object pfinish, int pfinish_byte_offset, Object soln, int soln_byte_offset); - - /** Entry point to C language function:
void pseudolift(int * n, float * pstart, float * pfinish, float * soln); */ - private static native void pseudolift1(Object n, int n_byte_offset, Object pstart, int pstart_byte_offset, Object pfinish, int pfinish_byte_offset, Object soln, int soln_byte_offset); - - /** Interface to C language function:
void pseudolift(int * n, float * pstart, float * pfinish, float * soln); */ - public static void pseudolift(int[] n, int n_offset, float[] pstart, int pstart_offset, float[] pfinish, int pfinish_offset, float[] soln, int soln_offset) - { - if(n != null && n.length <= n_offset) - throw new RuntimeException("array offset argument \"n_offset\" (" + n_offset + ") equals or exceeds array length (" + n.length + ")"); - if(pstart != null && pstart.length <= pstart_offset) - throw new RuntimeException("array offset argument \"pstart_offset\" (" + pstart_offset + ") equals or exceeds array length (" + pstart.length + ")"); - if(pfinish != null && pfinish.length <= pfinish_offset) - throw new RuntimeException("array offset argument \"pfinish_offset\" (" + pfinish_offset + ") equals or exceeds array length (" + pfinish.length + ")"); - if(soln != null && soln.length <= soln_offset) - throw new RuntimeException("array offset argument \"soln_offset\" (" + soln_offset + ") equals or exceeds array length (" + soln.length + ")"); - pseudolift1(n, BufferFactory.SIZEOF_INT * n_offset, pstart, BufferFactory.SIZEOF_FLOAT * pstart_offset, pfinish, BufferFactory.SIZEOF_FLOAT * pfinish_offset, soln, BufferFactory.SIZEOF_FLOAT * soln_offset); - - } - - /** Interface to C language function:
float ptozsa(float * ); */ - public static float ptozsa(java.nio.FloatBuffer arg0) - { - boolean _direct = BufferFactory.isDirect(arg0); - if (_direct) { - return ptozsa0(arg0, BufferFactory.getDirectBufferByteOffset(arg0)); - } else { - return ptozsa1(BufferFactory.getArray(arg0), BufferFactory.getIndirectBufferByteOffset(arg0)); - } - } - - /** Entry point to C language function:
float ptozsa(float * ); */ - private static native float ptozsa0(Object arg0, int arg0_byte_offset); - - /** Entry point to C language function:
float ptozsa(float * ); */ - private static native float ptozsa1(Object arg0, int arg0_byte_offset); - - /** Interface to C language function:
float ptozsa(float * ); */ - public static float ptozsa(float[] arg0, int arg0_offset) - { - if(arg0 != null && arg0.length <= arg0_offset) - throw new RuntimeException("array offset argument \"arg0_offset\" (" + arg0_offset + ") equals or exceeds array length (" + arg0.length + ")"); - return ptozsa1(arg0, BufferFactory.SIZEOF_FLOAT * arg0_offset); - - } - - /** Interface to C language function:
void pvalue(float * pres, float * p, int * np, float * param, float * value); */ - public static void pvalue(java.nio.FloatBuffer pres, java.nio.FloatBuffer p, java.nio.IntBuffer np, java.nio.FloatBuffer param, java.nio.FloatBuffer value) - { - boolean _direct = BufferFactory.isDirect(pres); - if (p != null && _direct != BufferFactory.isDirect(p)) - throw new RuntimeException("Argument \"p\" : Buffers passed to this method must all be either direct or indirect"); - if (np != null && _direct != BufferFactory.isDirect(np)) - throw new RuntimeException("Argument \"np\" : Buffers passed to this method must all be either direct or indirect"); - if (param != null && _direct != BufferFactory.isDirect(param)) - throw new RuntimeException("Argument \"param\" : Buffers passed to this method must all be either direct or indirect"); - if (value != null && _direct != BufferFactory.isDirect(value)) - throw new RuntimeException("Argument \"value\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - pvalue0(pres, BufferFactory.getDirectBufferByteOffset(pres), p, BufferFactory.getDirectBufferByteOffset(p), np, BufferFactory.getDirectBufferByteOffset(np), param, BufferFactory.getDirectBufferByteOffset(param), value, BufferFactory.getDirectBufferByteOffset(value)); - } else { - pvalue1(BufferFactory.getArray(pres), BufferFactory.getIndirectBufferByteOffset(pres), BufferFactory.getArray(p), BufferFactory.getIndirectBufferByteOffset(p), BufferFactory.getArray(np), BufferFactory.getIndirectBufferByteOffset(np), BufferFactory.getArray(param), BufferFactory.getIndirectBufferByteOffset(param), BufferFactory.getArray(value), BufferFactory.getIndirectBufferByteOffset(value)); - } - } - - /** Entry point to C language function:
void pvalue(float * pres, float * p, int * np, float * param, float * value); */ - private static native void pvalue0(Object pres, int pres_byte_offset, Object p, int p_byte_offset, Object np, int np_byte_offset, Object param, int param_byte_offset, Object value, int value_byte_offset); - - /** Entry point to C language function:
void pvalue(float * pres, float * p, int * np, float * param, float * value); */ - private static native void pvalue1(Object pres, int pres_byte_offset, Object p, int p_byte_offset, Object np, int np_byte_offset, Object param, int param_byte_offset, Object value, int value_byte_offset); - - /** Interface to C language function:
void pvalue(float * pres, float * p, int * np, float * param, float * value); */ - public static void pvalue(float[] pres, int pres_offset, float[] p, int p_offset, int[] np, int np_offset, float[] param, int param_offset, float[] value, int value_offset) - { - if(pres != null && pres.length <= pres_offset) - throw new RuntimeException("array offset argument \"pres_offset\" (" + pres_offset + ") equals or exceeds array length (" + pres.length + ")"); - if(p != null && p.length <= p_offset) - throw new RuntimeException("array offset argument \"p_offset\" (" + p_offset + ") equals or exceeds array length (" + p.length + ")"); - if(np != null && np.length <= np_offset) - throw new RuntimeException("array offset argument \"np_offset\" (" + np_offset + ") equals or exceeds array length (" + np.length + ")"); - if(param != null && param.length <= param_offset) - throw new RuntimeException("array offset argument \"param_offset\" (" + param_offset + ") equals or exceeds array length (" + param.length + ")"); - if(value != null && value.length <= value_offset) - throw new RuntimeException("array offset argument \"value_offset\" (" + value_offset + ") equals or exceeds array length (" + value.length + ")"); - pvalue1(pres, BufferFactory.SIZEOF_FLOAT * pres_offset, p, BufferFactory.SIZEOF_FLOAT * p_offset, np, BufferFactory.SIZEOF_INT * np_offset, param, BufferFactory.SIZEOF_FLOAT * param_offset, value, BufferFactory.SIZEOF_FLOAT * value_offset); - - } - - /** Interface to C language function:
void pvpres(float * t_up, float * t_low, float * p_up, float * p_low, float * pvort, int * mni, int * ni, int * nj, float * u_up, float * v_up, float * u_low, float * v_low, float * avort1, float * avort2, float * dtdx1, float * dtdy1, float * dtdx2, float * dtdy2, float * dx, float * dy, float * coriolis); */ - public static void pvpres(java.nio.FloatBuffer t_up, java.nio.FloatBuffer t_low, java.nio.FloatBuffer p_up, java.nio.FloatBuffer p_low, java.nio.FloatBuffer pvort, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj, java.nio.FloatBuffer u_up, java.nio.FloatBuffer v_up, java.nio.FloatBuffer u_low, java.nio.FloatBuffer v_low, java.nio.FloatBuffer avort1, java.nio.FloatBuffer avort2, java.nio.FloatBuffer dtdx1, java.nio.FloatBuffer dtdy1, java.nio.FloatBuffer dtdx2, java.nio.FloatBuffer dtdy2, java.nio.FloatBuffer dx, java.nio.FloatBuffer dy, java.nio.FloatBuffer coriolis) - { - boolean _direct = BufferFactory.isDirect(t_up); - if (t_low != null && _direct != BufferFactory.isDirect(t_low)) - throw new RuntimeException("Argument \"t_low\" : Buffers passed to this method must all be either direct or indirect"); - if (p_up != null && _direct != BufferFactory.isDirect(p_up)) - throw new RuntimeException("Argument \"p_up\" : Buffers passed to this method must all be either direct or indirect"); - if (p_low != null && _direct != BufferFactory.isDirect(p_low)) - throw new RuntimeException("Argument \"p_low\" : Buffers passed to this method must all be either direct or indirect"); - if (pvort != null && _direct != BufferFactory.isDirect(pvort)) - throw new RuntimeException("Argument \"pvort\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (u_up != null && _direct != BufferFactory.isDirect(u_up)) - throw new RuntimeException("Argument \"u_up\" : Buffers passed to this method must all be either direct or indirect"); - if (v_up != null && _direct != BufferFactory.isDirect(v_up)) - throw new RuntimeException("Argument \"v_up\" : Buffers passed to this method must all be either direct or indirect"); - if (u_low != null && _direct != BufferFactory.isDirect(u_low)) - throw new RuntimeException("Argument \"u_low\" : Buffers passed to this method must all be either direct or indirect"); - if (v_low != null && _direct != BufferFactory.isDirect(v_low)) - throw new RuntimeException("Argument \"v_low\" : Buffers passed to this method must all be either direct or indirect"); - if (avort1 != null && _direct != BufferFactory.isDirect(avort1)) - throw new RuntimeException("Argument \"avort1\" : Buffers passed to this method must all be either direct or indirect"); - if (avort2 != null && _direct != BufferFactory.isDirect(avort2)) - throw new RuntimeException("Argument \"avort2\" : Buffers passed to this method must all be either direct or indirect"); - if (dtdx1 != null && _direct != BufferFactory.isDirect(dtdx1)) - throw new RuntimeException("Argument \"dtdx1\" : Buffers passed to this method must all be either direct or indirect"); - if (dtdy1 != null && _direct != BufferFactory.isDirect(dtdy1)) - throw new RuntimeException("Argument \"dtdy1\" : Buffers passed to this method must all be either direct or indirect"); - if (dtdx2 != null && _direct != BufferFactory.isDirect(dtdx2)) - throw new RuntimeException("Argument \"dtdx2\" : Buffers passed to this method must all be either direct or indirect"); - if (dtdy2 != null && _direct != BufferFactory.isDirect(dtdy2)) - throw new RuntimeException("Argument \"dtdy2\" : Buffers passed to this method must all be either direct or indirect"); - if (dx != null && _direct != BufferFactory.isDirect(dx)) - throw new RuntimeException("Argument \"dx\" : Buffers passed to this method must all be either direct or indirect"); - if (dy != null && _direct != BufferFactory.isDirect(dy)) - throw new RuntimeException("Argument \"dy\" : Buffers passed to this method must all be either direct or indirect"); - if (coriolis != null && _direct != BufferFactory.isDirect(coriolis)) - throw new RuntimeException("Argument \"coriolis\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - pvpres0(t_up, BufferFactory.getDirectBufferByteOffset(t_up), t_low, BufferFactory.getDirectBufferByteOffset(t_low), p_up, BufferFactory.getDirectBufferByteOffset(p_up), p_low, BufferFactory.getDirectBufferByteOffset(p_low), pvort, BufferFactory.getDirectBufferByteOffset(pvort), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj), u_up, BufferFactory.getDirectBufferByteOffset(u_up), v_up, BufferFactory.getDirectBufferByteOffset(v_up), u_low, BufferFactory.getDirectBufferByteOffset(u_low), v_low, BufferFactory.getDirectBufferByteOffset(v_low), avort1, BufferFactory.getDirectBufferByteOffset(avort1), avort2, BufferFactory.getDirectBufferByteOffset(avort2), dtdx1, BufferFactory.getDirectBufferByteOffset(dtdx1), dtdy1, BufferFactory.getDirectBufferByteOffset(dtdy1), dtdx2, BufferFactory.getDirectBufferByteOffset(dtdx2), dtdy2, BufferFactory.getDirectBufferByteOffset(dtdy2), dx, BufferFactory.getDirectBufferByteOffset(dx), dy, BufferFactory.getDirectBufferByteOffset(dy), coriolis, BufferFactory.getDirectBufferByteOffset(coriolis)); - } else { - pvpres1(BufferFactory.getArray(t_up), BufferFactory.getIndirectBufferByteOffset(t_up), BufferFactory.getArray(t_low), BufferFactory.getIndirectBufferByteOffset(t_low), BufferFactory.getArray(p_up), BufferFactory.getIndirectBufferByteOffset(p_up), BufferFactory.getArray(p_low), BufferFactory.getIndirectBufferByteOffset(p_low), BufferFactory.getArray(pvort), BufferFactory.getIndirectBufferByteOffset(pvort), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj), BufferFactory.getArray(u_up), BufferFactory.getIndirectBufferByteOffset(u_up), BufferFactory.getArray(v_up), BufferFactory.getIndirectBufferByteOffset(v_up), BufferFactory.getArray(u_low), BufferFactory.getIndirectBufferByteOffset(u_low), BufferFactory.getArray(v_low), BufferFactory.getIndirectBufferByteOffset(v_low), BufferFactory.getArray(avort1), BufferFactory.getIndirectBufferByteOffset(avort1), BufferFactory.getArray(avort2), BufferFactory.getIndirectBufferByteOffset(avort2), BufferFactory.getArray(dtdx1), BufferFactory.getIndirectBufferByteOffset(dtdx1), BufferFactory.getArray(dtdy1), BufferFactory.getIndirectBufferByteOffset(dtdy1), BufferFactory.getArray(dtdx2), BufferFactory.getIndirectBufferByteOffset(dtdx2), BufferFactory.getArray(dtdy2), BufferFactory.getIndirectBufferByteOffset(dtdy2), BufferFactory.getArray(dx), BufferFactory.getIndirectBufferByteOffset(dx), BufferFactory.getArray(dy), BufferFactory.getIndirectBufferByteOffset(dy), BufferFactory.getArray(coriolis), BufferFactory.getIndirectBufferByteOffset(coriolis)); - } - } - - /** Entry point to C language function:
void pvpres(float * t_up, float * t_low, float * p_up, float * p_low, float * pvort, int * mni, int * ni, int * nj, float * u_up, float * v_up, float * u_low, float * v_low, float * avort1, float * avort2, float * dtdx1, float * dtdy1, float * dtdx2, float * dtdy2, float * dx, float * dy, float * coriolis); */ - private static native void pvpres0(Object t_up, int t_up_byte_offset, Object t_low, int t_low_byte_offset, Object p_up, int p_up_byte_offset, Object p_low, int p_low_byte_offset, Object pvort, int pvort_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object u_up, int u_up_byte_offset, Object v_up, int v_up_byte_offset, Object u_low, int u_low_byte_offset, Object v_low, int v_low_byte_offset, Object avort1, int avort1_byte_offset, Object avort2, int avort2_byte_offset, Object dtdx1, int dtdx1_byte_offset, Object dtdy1, int dtdy1_byte_offset, Object dtdx2, int dtdx2_byte_offset, Object dtdy2, int dtdy2_byte_offset, Object dx, int dx_byte_offset, Object dy, int dy_byte_offset, Object coriolis, int coriolis_byte_offset); - - /** Entry point to C language function:
void pvpres(float * t_up, float * t_low, float * p_up, float * p_low, float * pvort, int * mni, int * ni, int * nj, float * u_up, float * v_up, float * u_low, float * v_low, float * avort1, float * avort2, float * dtdx1, float * dtdy1, float * dtdx2, float * dtdy2, float * dx, float * dy, float * coriolis); */ - private static native void pvpres1(Object t_up, int t_up_byte_offset, Object t_low, int t_low_byte_offset, Object p_up, int p_up_byte_offset, Object p_low, int p_low_byte_offset, Object pvort, int pvort_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object u_up, int u_up_byte_offset, Object v_up, int v_up_byte_offset, Object u_low, int u_low_byte_offset, Object v_low, int v_low_byte_offset, Object avort1, int avort1_byte_offset, Object avort2, int avort2_byte_offset, Object dtdx1, int dtdx1_byte_offset, Object dtdy1, int dtdy1_byte_offset, Object dtdx2, int dtdx2_byte_offset, Object dtdy2, int dtdy2_byte_offset, Object dx, int dx_byte_offset, Object dy, int dy_byte_offset, Object coriolis, int coriolis_byte_offset); - - /** Interface to C language function:
void pvpres(float * t_up, float * t_low, float * p_up, float * p_low, float * pvort, int * mni, int * ni, int * nj, float * u_up, float * v_up, float * u_low, float * v_low, float * avort1, float * avort2, float * dtdx1, float * dtdy1, float * dtdx2, float * dtdy2, float * dx, float * dy, float * coriolis); */ - public static void pvpres(float[] t_up, int t_up_offset, float[] t_low, int t_low_offset, float[] p_up, int p_up_offset, float[] p_low, int p_low_offset, float[] pvort, int pvort_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset, float[] u_up, int u_up_offset, float[] v_up, int v_up_offset, float[] u_low, int u_low_offset, float[] v_low, int v_low_offset, float[] avort1, int avort1_offset, float[] avort2, int avort2_offset, float[] dtdx1, int dtdx1_offset, float[] dtdy1, int dtdy1_offset, float[] dtdx2, int dtdx2_offset, float[] dtdy2, int dtdy2_offset, float[] dx, int dx_offset, float[] dy, int dy_offset, float[] coriolis, int coriolis_offset) - { - if(t_up != null && t_up.length <= t_up_offset) - throw new RuntimeException("array offset argument \"t_up_offset\" (" + t_up_offset + ") equals or exceeds array length (" + t_up.length + ")"); - if(t_low != null && t_low.length <= t_low_offset) - throw new RuntimeException("array offset argument \"t_low_offset\" (" + t_low_offset + ") equals or exceeds array length (" + t_low.length + ")"); - if(p_up != null && p_up.length <= p_up_offset) - throw new RuntimeException("array offset argument \"p_up_offset\" (" + p_up_offset + ") equals or exceeds array length (" + p_up.length + ")"); - if(p_low != null && p_low.length <= p_low_offset) - throw new RuntimeException("array offset argument \"p_low_offset\" (" + p_low_offset + ") equals or exceeds array length (" + p_low.length + ")"); - if(pvort != null && pvort.length <= pvort_offset) - throw new RuntimeException("array offset argument \"pvort_offset\" (" + pvort_offset + ") equals or exceeds array length (" + pvort.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - if(u_up != null && u_up.length <= u_up_offset) - throw new RuntimeException("array offset argument \"u_up_offset\" (" + u_up_offset + ") equals or exceeds array length (" + u_up.length + ")"); - if(v_up != null && v_up.length <= v_up_offset) - throw new RuntimeException("array offset argument \"v_up_offset\" (" + v_up_offset + ") equals or exceeds array length (" + v_up.length + ")"); - if(u_low != null && u_low.length <= u_low_offset) - throw new RuntimeException("array offset argument \"u_low_offset\" (" + u_low_offset + ") equals or exceeds array length (" + u_low.length + ")"); - if(v_low != null && v_low.length <= v_low_offset) - throw new RuntimeException("array offset argument \"v_low_offset\" (" + v_low_offset + ") equals or exceeds array length (" + v_low.length + ")"); - if(avort1 != null && avort1.length <= avort1_offset) - throw new RuntimeException("array offset argument \"avort1_offset\" (" + avort1_offset + ") equals or exceeds array length (" + avort1.length + ")"); - if(avort2 != null && avort2.length <= avort2_offset) - throw new RuntimeException("array offset argument \"avort2_offset\" (" + avort2_offset + ") equals or exceeds array length (" + avort2.length + ")"); - if(dtdx1 != null && dtdx1.length <= dtdx1_offset) - throw new RuntimeException("array offset argument \"dtdx1_offset\" (" + dtdx1_offset + ") equals or exceeds array length (" + dtdx1.length + ")"); - if(dtdy1 != null && dtdy1.length <= dtdy1_offset) - throw new RuntimeException("array offset argument \"dtdy1_offset\" (" + dtdy1_offset + ") equals or exceeds array length (" + dtdy1.length + ")"); - if(dtdx2 != null && dtdx2.length <= dtdx2_offset) - throw new RuntimeException("array offset argument \"dtdx2_offset\" (" + dtdx2_offset + ") equals or exceeds array length (" + dtdx2.length + ")"); - if(dtdy2 != null && dtdy2.length <= dtdy2_offset) - throw new RuntimeException("array offset argument \"dtdy2_offset\" (" + dtdy2_offset + ") equals or exceeds array length (" + dtdy2.length + ")"); - if(dx != null && dx.length <= dx_offset) - throw new RuntimeException("array offset argument \"dx_offset\" (" + dx_offset + ") equals or exceeds array length (" + dx.length + ")"); - if(dy != null && dy.length <= dy_offset) - throw new RuntimeException("array offset argument \"dy_offset\" (" + dy_offset + ") equals or exceeds array length (" + dy.length + ")"); - if(coriolis != null && coriolis.length <= coriolis_offset) - throw new RuntimeException("array offset argument \"coriolis_offset\" (" + coriolis_offset + ") equals or exceeds array length (" + coriolis.length + ")"); - pvpres1(t_up, BufferFactory.SIZEOF_FLOAT * t_up_offset, t_low, BufferFactory.SIZEOF_FLOAT * t_low_offset, p_up, BufferFactory.SIZEOF_FLOAT * p_up_offset, p_low, BufferFactory.SIZEOF_FLOAT * p_low_offset, pvort, BufferFactory.SIZEOF_FLOAT * pvort_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset, u_up, BufferFactory.SIZEOF_FLOAT * u_up_offset, v_up, BufferFactory.SIZEOF_FLOAT * v_up_offset, u_low, BufferFactory.SIZEOF_FLOAT * u_low_offset, v_low, BufferFactory.SIZEOF_FLOAT * v_low_offset, avort1, BufferFactory.SIZEOF_FLOAT * avort1_offset, avort2, BufferFactory.SIZEOF_FLOAT * avort2_offset, dtdx1, BufferFactory.SIZEOF_FLOAT * dtdx1_offset, dtdy1, BufferFactory.SIZEOF_FLOAT * dtdy1_offset, dtdx2, BufferFactory.SIZEOF_FLOAT * dtdx2_offset, dtdy2, BufferFactory.SIZEOF_FLOAT * dtdy2_offset, dx, BufferFactory.SIZEOF_FLOAT * dx_offset, dy, BufferFactory.SIZEOF_FLOAT * dy_offset, coriolis, BufferFactory.SIZEOF_FLOAT * coriolis_offset); - - } - - /** Interface to C language function:
void qvector(float * zmid, float * ztop, float * zbot, float * ptop, float * pbot, int * mni, int * ni, int * nj, float * dx, float * dy, float * f, float * dugdx, float * dvgdx, float * dugdy, float * dvgdy, float * dtdx, float * dtdy, float * qx, float * qy); */ - public static void qvector(java.nio.FloatBuffer zmid, java.nio.FloatBuffer ztop, java.nio.FloatBuffer zbot, java.nio.FloatBuffer ptop, java.nio.FloatBuffer pbot, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj, java.nio.FloatBuffer dx, java.nio.FloatBuffer dy, java.nio.FloatBuffer f, java.nio.FloatBuffer dugdx, java.nio.FloatBuffer dvgdx, java.nio.FloatBuffer dugdy, java.nio.FloatBuffer dvgdy, java.nio.FloatBuffer dtdx, java.nio.FloatBuffer dtdy, java.nio.FloatBuffer qx, java.nio.FloatBuffer qy) - { - boolean _direct = BufferFactory.isDirect(zmid); - if (ztop != null && _direct != BufferFactory.isDirect(ztop)) - throw new RuntimeException("Argument \"ztop\" : Buffers passed to this method must all be either direct or indirect"); - if (zbot != null && _direct != BufferFactory.isDirect(zbot)) - throw new RuntimeException("Argument \"zbot\" : Buffers passed to this method must all be either direct or indirect"); - if (ptop != null && _direct != BufferFactory.isDirect(ptop)) - throw new RuntimeException("Argument \"ptop\" : Buffers passed to this method must all be either direct or indirect"); - if (pbot != null && _direct != BufferFactory.isDirect(pbot)) - throw new RuntimeException("Argument \"pbot\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (dx != null && _direct != BufferFactory.isDirect(dx)) - throw new RuntimeException("Argument \"dx\" : Buffers passed to this method must all be either direct or indirect"); - if (dy != null && _direct != BufferFactory.isDirect(dy)) - throw new RuntimeException("Argument \"dy\" : Buffers passed to this method must all be either direct or indirect"); - if (f != null && _direct != BufferFactory.isDirect(f)) - throw new RuntimeException("Argument \"f\" : Buffers passed to this method must all be either direct or indirect"); - if (dugdx != null && _direct != BufferFactory.isDirect(dugdx)) - throw new RuntimeException("Argument \"dugdx\" : Buffers passed to this method must all be either direct or indirect"); - if (dvgdx != null && _direct != BufferFactory.isDirect(dvgdx)) - throw new RuntimeException("Argument \"dvgdx\" : Buffers passed to this method must all be either direct or indirect"); - if (dugdy != null && _direct != BufferFactory.isDirect(dugdy)) - throw new RuntimeException("Argument \"dugdy\" : Buffers passed to this method must all be either direct or indirect"); - if (dvgdy != null && _direct != BufferFactory.isDirect(dvgdy)) - throw new RuntimeException("Argument \"dvgdy\" : Buffers passed to this method must all be either direct or indirect"); - if (dtdx != null && _direct != BufferFactory.isDirect(dtdx)) - throw new RuntimeException("Argument \"dtdx\" : Buffers passed to this method must all be either direct or indirect"); - if (dtdy != null && _direct != BufferFactory.isDirect(dtdy)) - throw new RuntimeException("Argument \"dtdy\" : Buffers passed to this method must all be either direct or indirect"); - if (qx != null && _direct != BufferFactory.isDirect(qx)) - throw new RuntimeException("Argument \"qx\" : Buffers passed to this method must all be either direct or indirect"); - if (qy != null && _direct != BufferFactory.isDirect(qy)) - throw new RuntimeException("Argument \"qy\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - qvector0(zmid, BufferFactory.getDirectBufferByteOffset(zmid), ztop, BufferFactory.getDirectBufferByteOffset(ztop), zbot, BufferFactory.getDirectBufferByteOffset(zbot), ptop, BufferFactory.getDirectBufferByteOffset(ptop), pbot, BufferFactory.getDirectBufferByteOffset(pbot), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj), dx, BufferFactory.getDirectBufferByteOffset(dx), dy, BufferFactory.getDirectBufferByteOffset(dy), f, BufferFactory.getDirectBufferByteOffset(f), dugdx, BufferFactory.getDirectBufferByteOffset(dugdx), dvgdx, BufferFactory.getDirectBufferByteOffset(dvgdx), dugdy, BufferFactory.getDirectBufferByteOffset(dugdy), dvgdy, BufferFactory.getDirectBufferByteOffset(dvgdy), dtdx, BufferFactory.getDirectBufferByteOffset(dtdx), dtdy, BufferFactory.getDirectBufferByteOffset(dtdy), qx, BufferFactory.getDirectBufferByteOffset(qx), qy, BufferFactory.getDirectBufferByteOffset(qy)); - } else { - qvector1(BufferFactory.getArray(zmid), BufferFactory.getIndirectBufferByteOffset(zmid), BufferFactory.getArray(ztop), BufferFactory.getIndirectBufferByteOffset(ztop), BufferFactory.getArray(zbot), BufferFactory.getIndirectBufferByteOffset(zbot), BufferFactory.getArray(ptop), BufferFactory.getIndirectBufferByteOffset(ptop), BufferFactory.getArray(pbot), BufferFactory.getIndirectBufferByteOffset(pbot), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj), BufferFactory.getArray(dx), BufferFactory.getIndirectBufferByteOffset(dx), BufferFactory.getArray(dy), BufferFactory.getIndirectBufferByteOffset(dy), BufferFactory.getArray(f), BufferFactory.getIndirectBufferByteOffset(f), BufferFactory.getArray(dugdx), BufferFactory.getIndirectBufferByteOffset(dugdx), BufferFactory.getArray(dvgdx), BufferFactory.getIndirectBufferByteOffset(dvgdx), BufferFactory.getArray(dugdy), BufferFactory.getIndirectBufferByteOffset(dugdy), BufferFactory.getArray(dvgdy), BufferFactory.getIndirectBufferByteOffset(dvgdy), BufferFactory.getArray(dtdx), BufferFactory.getIndirectBufferByteOffset(dtdx), BufferFactory.getArray(dtdy), BufferFactory.getIndirectBufferByteOffset(dtdy), BufferFactory.getArray(qx), BufferFactory.getIndirectBufferByteOffset(qx), BufferFactory.getArray(qy), BufferFactory.getIndirectBufferByteOffset(qy)); - } - } - - /** Entry point to C language function:
void qvector(float * zmid, float * ztop, float * zbot, float * ptop, float * pbot, int * mni, int * ni, int * nj, float * dx, float * dy, float * f, float * dugdx, float * dvgdx, float * dugdy, float * dvgdy, float * dtdx, float * dtdy, float * qx, float * qy); */ - private static native void qvector0(Object zmid, int zmid_byte_offset, Object ztop, int ztop_byte_offset, Object zbot, int zbot_byte_offset, Object ptop, int ptop_byte_offset, Object pbot, int pbot_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object dx, int dx_byte_offset, Object dy, int dy_byte_offset, Object f, int f_byte_offset, Object dugdx, int dugdx_byte_offset, Object dvgdx, int dvgdx_byte_offset, Object dugdy, int dugdy_byte_offset, Object dvgdy, int dvgdy_byte_offset, Object dtdx, int dtdx_byte_offset, Object dtdy, int dtdy_byte_offset, Object qx, int qx_byte_offset, Object qy, int qy_byte_offset); - - /** Entry point to C language function:
void qvector(float * zmid, float * ztop, float * zbot, float * ptop, float * pbot, int * mni, int * ni, int * nj, float * dx, float * dy, float * f, float * dugdx, float * dvgdx, float * dugdy, float * dvgdy, float * dtdx, float * dtdy, float * qx, float * qy); */ - private static native void qvector1(Object zmid, int zmid_byte_offset, Object ztop, int ztop_byte_offset, Object zbot, int zbot_byte_offset, Object ptop, int ptop_byte_offset, Object pbot, int pbot_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object dx, int dx_byte_offset, Object dy, int dy_byte_offset, Object f, int f_byte_offset, Object dugdx, int dugdx_byte_offset, Object dvgdx, int dvgdx_byte_offset, Object dugdy, int dugdy_byte_offset, Object dvgdy, int dvgdy_byte_offset, Object dtdx, int dtdx_byte_offset, Object dtdy, int dtdy_byte_offset, Object qx, int qx_byte_offset, Object qy, int qy_byte_offset); - - /** Interface to C language function:
void qvector(float * zmid, float * ztop, float * zbot, float * ptop, float * pbot, int * mni, int * ni, int * nj, float * dx, float * dy, float * f, float * dugdx, float * dvgdx, float * dugdy, float * dvgdy, float * dtdx, float * dtdy, float * qx, float * qy); */ - public static void qvector(float[] zmid, int zmid_offset, float[] ztop, int ztop_offset, float[] zbot, int zbot_offset, float[] ptop, int ptop_offset, float[] pbot, int pbot_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset, float[] dx, int dx_offset, float[] dy, int dy_offset, float[] f, int f_offset, float[] dugdx, int dugdx_offset, float[] dvgdx, int dvgdx_offset, float[] dugdy, int dugdy_offset, float[] dvgdy, int dvgdy_offset, float[] dtdx, int dtdx_offset, float[] dtdy, int dtdy_offset, float[] qx, int qx_offset, float[] qy, int qy_offset) - { - if(zmid != null && zmid.length <= zmid_offset) - throw new RuntimeException("array offset argument \"zmid_offset\" (" + zmid_offset + ") equals or exceeds array length (" + zmid.length + ")"); - if(ztop != null && ztop.length <= ztop_offset) - throw new RuntimeException("array offset argument \"ztop_offset\" (" + ztop_offset + ") equals or exceeds array length (" + ztop.length + ")"); - if(zbot != null && zbot.length <= zbot_offset) - throw new RuntimeException("array offset argument \"zbot_offset\" (" + zbot_offset + ") equals or exceeds array length (" + zbot.length + ")"); - if(ptop != null && ptop.length <= ptop_offset) - throw new RuntimeException("array offset argument \"ptop_offset\" (" + ptop_offset + ") equals or exceeds array length (" + ptop.length + ")"); - if(pbot != null && pbot.length <= pbot_offset) - throw new RuntimeException("array offset argument \"pbot_offset\" (" + pbot_offset + ") equals or exceeds array length (" + pbot.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - if(dx != null && dx.length <= dx_offset) - throw new RuntimeException("array offset argument \"dx_offset\" (" + dx_offset + ") equals or exceeds array length (" + dx.length + ")"); - if(dy != null && dy.length <= dy_offset) - throw new RuntimeException("array offset argument \"dy_offset\" (" + dy_offset + ") equals or exceeds array length (" + dy.length + ")"); - if(f != null && f.length <= f_offset) - throw new RuntimeException("array offset argument \"f_offset\" (" + f_offset + ") equals or exceeds array length (" + f.length + ")"); - if(dugdx != null && dugdx.length <= dugdx_offset) - throw new RuntimeException("array offset argument \"dugdx_offset\" (" + dugdx_offset + ") equals or exceeds array length (" + dugdx.length + ")"); - if(dvgdx != null && dvgdx.length <= dvgdx_offset) - throw new RuntimeException("array offset argument \"dvgdx_offset\" (" + dvgdx_offset + ") equals or exceeds array length (" + dvgdx.length + ")"); - if(dugdy != null && dugdy.length <= dugdy_offset) - throw new RuntimeException("array offset argument \"dugdy_offset\" (" + dugdy_offset + ") equals or exceeds array length (" + dugdy.length + ")"); - if(dvgdy != null && dvgdy.length <= dvgdy_offset) - throw new RuntimeException("array offset argument \"dvgdy_offset\" (" + dvgdy_offset + ") equals or exceeds array length (" + dvgdy.length + ")"); - if(dtdx != null && dtdx.length <= dtdx_offset) - throw new RuntimeException("array offset argument \"dtdx_offset\" (" + dtdx_offset + ") equals or exceeds array length (" + dtdx.length + ")"); - if(dtdy != null && dtdy.length <= dtdy_offset) - throw new RuntimeException("array offset argument \"dtdy_offset\" (" + dtdy_offset + ") equals or exceeds array length (" + dtdy.length + ")"); - if(qx != null && qx.length <= qx_offset) - throw new RuntimeException("array offset argument \"qx_offset\" (" + qx_offset + ") equals or exceeds array length (" + qx.length + ")"); - if(qy != null && qy.length <= qy_offset) - throw new RuntimeException("array offset argument \"qy_offset\" (" + qy_offset + ") equals or exceeds array length (" + qy.length + ")"); - qvector1(zmid, BufferFactory.SIZEOF_FLOAT * zmid_offset, ztop, BufferFactory.SIZEOF_FLOAT * ztop_offset, zbot, BufferFactory.SIZEOF_FLOAT * zbot_offset, ptop, BufferFactory.SIZEOF_FLOAT * ptop_offset, pbot, BufferFactory.SIZEOF_FLOAT * pbot_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset, dx, BufferFactory.SIZEOF_FLOAT * dx_offset, dy, BufferFactory.SIZEOF_FLOAT * dy_offset, f, BufferFactory.SIZEOF_FLOAT * f_offset, dugdx, BufferFactory.SIZEOF_FLOAT * dugdx_offset, dvgdx, BufferFactory.SIZEOF_FLOAT * dvgdx_offset, dugdy, BufferFactory.SIZEOF_FLOAT * dugdy_offset, dvgdy, BufferFactory.SIZEOF_FLOAT * dvgdy_offset, dtdx, BufferFactory.SIZEOF_FLOAT * dtdx_offset, dtdy, BufferFactory.SIZEOF_FLOAT * dtdy_offset, qx, BufferFactory.SIZEOF_FLOAT * qx_offset, qy, BufferFactory.SIZEOF_FLOAT * qy_offset); - - } - - /** Interface to C language function:
void radiation(float * lat, float * lng, float * lsm, int * jd, float * hr, float * bext, float * od, float * solrad); */ - public static void radiation(java.nio.FloatBuffer lat, java.nio.FloatBuffer lng, java.nio.FloatBuffer lsm, java.nio.IntBuffer jd, java.nio.FloatBuffer hr, java.nio.FloatBuffer bext, java.nio.FloatBuffer od, java.nio.FloatBuffer solrad) - { - boolean _direct = BufferFactory.isDirect(lat); - if (lng != null && _direct != BufferFactory.isDirect(lng)) - throw new RuntimeException("Argument \"lng\" : Buffers passed to this method must all be either direct or indirect"); - if (lsm != null && _direct != BufferFactory.isDirect(lsm)) - throw new RuntimeException("Argument \"lsm\" : Buffers passed to this method must all be either direct or indirect"); - if (jd != null && _direct != BufferFactory.isDirect(jd)) - throw new RuntimeException("Argument \"jd\" : Buffers passed to this method must all be either direct or indirect"); - if (hr != null && _direct != BufferFactory.isDirect(hr)) - throw new RuntimeException("Argument \"hr\" : Buffers passed to this method must all be either direct or indirect"); - if (bext != null && _direct != BufferFactory.isDirect(bext)) - throw new RuntimeException("Argument \"bext\" : Buffers passed to this method must all be either direct or indirect"); - if (od != null && _direct != BufferFactory.isDirect(od)) - throw new RuntimeException("Argument \"od\" : Buffers passed to this method must all be either direct or indirect"); - if (solrad != null && _direct != BufferFactory.isDirect(solrad)) - throw new RuntimeException("Argument \"solrad\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - radiation0(lat, BufferFactory.getDirectBufferByteOffset(lat), lng, BufferFactory.getDirectBufferByteOffset(lng), lsm, BufferFactory.getDirectBufferByteOffset(lsm), jd, BufferFactory.getDirectBufferByteOffset(jd), hr, BufferFactory.getDirectBufferByteOffset(hr), bext, BufferFactory.getDirectBufferByteOffset(bext), od, BufferFactory.getDirectBufferByteOffset(od), solrad, BufferFactory.getDirectBufferByteOffset(solrad)); - } else { - radiation1(BufferFactory.getArray(lat), BufferFactory.getIndirectBufferByteOffset(lat), BufferFactory.getArray(lng), BufferFactory.getIndirectBufferByteOffset(lng), BufferFactory.getArray(lsm), BufferFactory.getIndirectBufferByteOffset(lsm), BufferFactory.getArray(jd), BufferFactory.getIndirectBufferByteOffset(jd), BufferFactory.getArray(hr), BufferFactory.getIndirectBufferByteOffset(hr), BufferFactory.getArray(bext), BufferFactory.getIndirectBufferByteOffset(bext), BufferFactory.getArray(od), BufferFactory.getIndirectBufferByteOffset(od), BufferFactory.getArray(solrad), BufferFactory.getIndirectBufferByteOffset(solrad)); - } - } - - /** Entry point to C language function:
void radiation(float * lat, float * lng, float * lsm, int * jd, float * hr, float * bext, float * od, float * solrad); */ - private static native void radiation0(Object lat, int lat_byte_offset, Object lng, int lng_byte_offset, Object lsm, int lsm_byte_offset, Object jd, int jd_byte_offset, Object hr, int hr_byte_offset, Object bext, int bext_byte_offset, Object od, int od_byte_offset, Object solrad, int solrad_byte_offset); - - /** Entry point to C language function:
void radiation(float * lat, float * lng, float * lsm, int * jd, float * hr, float * bext, float * od, float * solrad); */ - private static native void radiation1(Object lat, int lat_byte_offset, Object lng, int lng_byte_offset, Object lsm, int lsm_byte_offset, Object jd, int jd_byte_offset, Object hr, int hr_byte_offset, Object bext, int bext_byte_offset, Object od, int od_byte_offset, Object solrad, int solrad_byte_offset); - - /** Interface to C language function:
void radiation(float * lat, float * lng, float * lsm, int * jd, float * hr, float * bext, float * od, float * solrad); */ - public static void radiation(float[] lat, int lat_offset, float[] lng, int lng_offset, float[] lsm, int lsm_offset, int[] jd, int jd_offset, float[] hr, int hr_offset, float[] bext, int bext_offset, float[] od, int od_offset, float[] solrad, int solrad_offset) - { - if(lat != null && lat.length <= lat_offset) - throw new RuntimeException("array offset argument \"lat_offset\" (" + lat_offset + ") equals or exceeds array length (" + lat.length + ")"); - if(lng != null && lng.length <= lng_offset) - throw new RuntimeException("array offset argument \"lng_offset\" (" + lng_offset + ") equals or exceeds array length (" + lng.length + ")"); - if(lsm != null && lsm.length <= lsm_offset) - throw new RuntimeException("array offset argument \"lsm_offset\" (" + lsm_offset + ") equals or exceeds array length (" + lsm.length + ")"); - if(jd != null && jd.length <= jd_offset) - throw new RuntimeException("array offset argument \"jd_offset\" (" + jd_offset + ") equals or exceeds array length (" + jd.length + ")"); - if(hr != null && hr.length <= hr_offset) - throw new RuntimeException("array offset argument \"hr_offset\" (" + hr_offset + ") equals or exceeds array length (" + hr.length + ")"); - if(bext != null && bext.length <= bext_offset) - throw new RuntimeException("array offset argument \"bext_offset\" (" + bext_offset + ") equals or exceeds array length (" + bext.length + ")"); - if(od != null && od.length <= od_offset) - throw new RuntimeException("array offset argument \"od_offset\" (" + od_offset + ") equals or exceeds array length (" + od.length + ")"); - if(solrad != null && solrad.length <= solrad_offset) - throw new RuntimeException("array offset argument \"solrad_offset\" (" + solrad_offset + ") equals or exceeds array length (" + solrad.length + ")"); - radiation1(lat, BufferFactory.SIZEOF_FLOAT * lat_offset, lng, BufferFactory.SIZEOF_FLOAT * lng_offset, lsm, BufferFactory.SIZEOF_FLOAT * lsm_offset, jd, BufferFactory.SIZEOF_INT * jd_offset, hr, BufferFactory.SIZEOF_FLOAT * hr_offset, bext, BufferFactory.SIZEOF_FLOAT * bext_offset, od, BufferFactory.SIZEOF_FLOAT * od_offset, solrad, BufferFactory.SIZEOF_FLOAT * solrad_offset); - - } - - /** Interface to C language function:
float rang2d(const float * data, int * mnx, int * nx, int * ny, float * minData, float * maxData); */ - public static float rang2d(java.nio.FloatBuffer data, java.nio.IntBuffer mnx, java.nio.IntBuffer nx, java.nio.IntBuffer ny, java.nio.FloatBuffer minData, java.nio.FloatBuffer maxData) - { - boolean _direct = BufferFactory.isDirect(data); - if (mnx != null && _direct != BufferFactory.isDirect(mnx)) - throw new RuntimeException("Argument \"mnx\" : Buffers passed to this method must all be either direct or indirect"); - if (nx != null && _direct != BufferFactory.isDirect(nx)) - throw new RuntimeException("Argument \"nx\" : Buffers passed to this method must all be either direct or indirect"); - if (ny != null && _direct != BufferFactory.isDirect(ny)) - throw new RuntimeException("Argument \"ny\" : Buffers passed to this method must all be either direct or indirect"); - if (minData != null && _direct != BufferFactory.isDirect(minData)) - throw new RuntimeException("Argument \"minData\" : Buffers passed to this method must all be either direct or indirect"); - if (maxData != null && _direct != BufferFactory.isDirect(maxData)) - throw new RuntimeException("Argument \"maxData\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - return rang2d0(data, BufferFactory.getDirectBufferByteOffset(data), mnx, BufferFactory.getDirectBufferByteOffset(mnx), nx, BufferFactory.getDirectBufferByteOffset(nx), ny, BufferFactory.getDirectBufferByteOffset(ny), minData, BufferFactory.getDirectBufferByteOffset(minData), maxData, BufferFactory.getDirectBufferByteOffset(maxData)); - } else { - return rang2d1(BufferFactory.getArray(data), BufferFactory.getIndirectBufferByteOffset(data), BufferFactory.getArray(mnx), BufferFactory.getIndirectBufferByteOffset(mnx), BufferFactory.getArray(nx), BufferFactory.getIndirectBufferByteOffset(nx), BufferFactory.getArray(ny), BufferFactory.getIndirectBufferByteOffset(ny), BufferFactory.getArray(minData), BufferFactory.getIndirectBufferByteOffset(minData), BufferFactory.getArray(maxData), BufferFactory.getIndirectBufferByteOffset(maxData)); - } - } - - /** Entry point to C language function:
float rang2d(const float * data, int * mnx, int * nx, int * ny, float * minData, float * maxData); */ - private static native float rang2d0(Object data, int data_byte_offset, Object mnx, int mnx_byte_offset, Object nx, int nx_byte_offset, Object ny, int ny_byte_offset, Object minData, int minData_byte_offset, Object maxData, int maxData_byte_offset); - - /** Entry point to C language function:
float rang2d(const float * data, int * mnx, int * nx, int * ny, float * minData, float * maxData); */ - private static native float rang2d1(Object data, int data_byte_offset, Object mnx, int mnx_byte_offset, Object nx, int nx_byte_offset, Object ny, int ny_byte_offset, Object minData, int minData_byte_offset, Object maxData, int maxData_byte_offset); - - /** Interface to C language function:
float rang2d(const float * data, int * mnx, int * nx, int * ny, float * minData, float * maxData); */ - public static float rang2d(float[] data, int data_offset, int[] mnx, int mnx_offset, int[] nx, int nx_offset, int[] ny, int ny_offset, float[] minData, int minData_offset, float[] maxData, int maxData_offset) - { - if(data != null && data.length <= data_offset) - throw new RuntimeException("array offset argument \"data_offset\" (" + data_offset + ") equals or exceeds array length (" + data.length + ")"); - if(mnx != null && mnx.length <= mnx_offset) - throw new RuntimeException("array offset argument \"mnx_offset\" (" + mnx_offset + ") equals or exceeds array length (" + mnx.length + ")"); - if(nx != null && nx.length <= nx_offset) - throw new RuntimeException("array offset argument \"nx_offset\" (" + nx_offset + ") equals or exceeds array length (" + nx.length + ")"); - if(ny != null && ny.length <= ny_offset) - throw new RuntimeException("array offset argument \"ny_offset\" (" + ny_offset + ") equals or exceeds array length (" + ny.length + ")"); - if(minData != null && minData.length <= minData_offset) - throw new RuntimeException("array offset argument \"minData_offset\" (" + minData_offset + ") equals or exceeds array length (" + minData.length + ")"); - if(maxData != null && maxData.length <= maxData_offset) - throw new RuntimeException("array offset argument \"maxData_offset\" (" + maxData_offset + ") equals or exceeds array length (" + maxData.length + ")"); - return rang2d1(data, BufferFactory.SIZEOF_FLOAT * data_offset, mnx, BufferFactory.SIZEOF_INT * mnx_offset, nx, BufferFactory.SIZEOF_INT * nx_offset, ny, BufferFactory.SIZEOF_INT * ny_offset, minData, BufferFactory.SIZEOF_FLOAT * minData_offset, maxData, BufferFactory.SIZEOF_FLOAT * maxData_offset); - - } - - /** Interface to C language function:
void replinrange(float * a, int * tsttyp, float * lo, float * hi, float * repl, float * result, int * mni, int * ni, int * nj); */ - public static void replinrange(java.nio.FloatBuffer a, java.nio.IntBuffer tsttyp, java.nio.FloatBuffer lo, java.nio.FloatBuffer hi, java.nio.FloatBuffer repl, java.nio.FloatBuffer result, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj) - { - boolean _direct = BufferFactory.isDirect(a); - if (tsttyp != null && _direct != BufferFactory.isDirect(tsttyp)) - throw new RuntimeException("Argument \"tsttyp\" : Buffers passed to this method must all be either direct or indirect"); - if (lo != null && _direct != BufferFactory.isDirect(lo)) - throw new RuntimeException("Argument \"lo\" : Buffers passed to this method must all be either direct or indirect"); - if (hi != null && _direct != BufferFactory.isDirect(hi)) - throw new RuntimeException("Argument \"hi\" : Buffers passed to this method must all be either direct or indirect"); - if (repl != null && _direct != BufferFactory.isDirect(repl)) - throw new RuntimeException("Argument \"repl\" : Buffers passed to this method must all be either direct or indirect"); - if (result != null && _direct != BufferFactory.isDirect(result)) - throw new RuntimeException("Argument \"result\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - replinrange0(a, BufferFactory.getDirectBufferByteOffset(a), tsttyp, BufferFactory.getDirectBufferByteOffset(tsttyp), lo, BufferFactory.getDirectBufferByteOffset(lo), hi, BufferFactory.getDirectBufferByteOffset(hi), repl, BufferFactory.getDirectBufferByteOffset(repl), result, BufferFactory.getDirectBufferByteOffset(result), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj)); - } else { - replinrange1(BufferFactory.getArray(a), BufferFactory.getIndirectBufferByteOffset(a), BufferFactory.getArray(tsttyp), BufferFactory.getIndirectBufferByteOffset(tsttyp), BufferFactory.getArray(lo), BufferFactory.getIndirectBufferByteOffset(lo), BufferFactory.getArray(hi), BufferFactory.getIndirectBufferByteOffset(hi), BufferFactory.getArray(repl), BufferFactory.getIndirectBufferByteOffset(repl), BufferFactory.getArray(result), BufferFactory.getIndirectBufferByteOffset(result), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj)); - } - } - - /** Entry point to C language function:
void replinrange(float * a, int * tsttyp, float * lo, float * hi, float * repl, float * result, int * mni, int * ni, int * nj); */ - private static native void replinrange0(Object a, int a_byte_offset, Object tsttyp, int tsttyp_byte_offset, Object lo, int lo_byte_offset, Object hi, int hi_byte_offset, Object repl, int repl_byte_offset, Object result, int result_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset); - - /** Entry point to C language function:
void replinrange(float * a, int * tsttyp, float * lo, float * hi, float * repl, float * result, int * mni, int * ni, int * nj); */ - private static native void replinrange1(Object a, int a_byte_offset, Object tsttyp, int tsttyp_byte_offset, Object lo, int lo_byte_offset, Object hi, int hi_byte_offset, Object repl, int repl_byte_offset, Object result, int result_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset); - - /** Interface to C language function:
void replinrange(float * a, int * tsttyp, float * lo, float * hi, float * repl, float * result, int * mni, int * ni, int * nj); */ - public static void replinrange(float[] a, int a_offset, int[] tsttyp, int tsttyp_offset, float[] lo, int lo_offset, float[] hi, int hi_offset, float[] repl, int repl_offset, float[] result, int result_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset) - { - if(a != null && a.length <= a_offset) - throw new RuntimeException("array offset argument \"a_offset\" (" + a_offset + ") equals or exceeds array length (" + a.length + ")"); - if(tsttyp != null && tsttyp.length <= tsttyp_offset) - throw new RuntimeException("array offset argument \"tsttyp_offset\" (" + tsttyp_offset + ") equals or exceeds array length (" + tsttyp.length + ")"); - if(lo != null && lo.length <= lo_offset) - throw new RuntimeException("array offset argument \"lo_offset\" (" + lo_offset + ") equals or exceeds array length (" + lo.length + ")"); - if(hi != null && hi.length <= hi_offset) - throw new RuntimeException("array offset argument \"hi_offset\" (" + hi_offset + ") equals or exceeds array length (" + hi.length + ")"); - if(repl != null && repl.length <= repl_offset) - throw new RuntimeException("array offset argument \"repl_offset\" (" + repl_offset + ") equals or exceeds array length (" + repl.length + ")"); - if(result != null && result.length <= result_offset) - throw new RuntimeException("array offset argument \"result_offset\" (" + result_offset + ") equals or exceeds array length (" + result.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - replinrange1(a, BufferFactory.SIZEOF_FLOAT * a_offset, tsttyp, BufferFactory.SIZEOF_INT * tsttyp_offset, lo, BufferFactory.SIZEOF_FLOAT * lo_offset, hi, BufferFactory.SIZEOF_FLOAT * hi_offset, repl, BufferFactory.SIZEOF_FLOAT * repl_offset, result, BufferFactory.SIZEOF_FLOAT * result_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset); - - } - - /** Interface to C language function:
void rhbar(float * ENDLVL, int * MRH, int * NCLYR, float * SFCP, float * P, float * TL, float * TDL); */ - public static void rhbar(java.nio.FloatBuffer ENDLVL, java.nio.IntBuffer MRH, java.nio.IntBuffer NCLYR, java.nio.FloatBuffer SFCP, java.nio.FloatBuffer P, java.nio.FloatBuffer TL, java.nio.FloatBuffer TDL) - { - boolean _direct = BufferFactory.isDirect(ENDLVL); - if (MRH != null && _direct != BufferFactory.isDirect(MRH)) - throw new RuntimeException("Argument \"MRH\" : Buffers passed to this method must all be either direct or indirect"); - if (NCLYR != null && _direct != BufferFactory.isDirect(NCLYR)) - throw new RuntimeException("Argument \"NCLYR\" : Buffers passed to this method must all be either direct or indirect"); - if (SFCP != null && _direct != BufferFactory.isDirect(SFCP)) - throw new RuntimeException("Argument \"SFCP\" : Buffers passed to this method must all be either direct or indirect"); - if (P != null && _direct != BufferFactory.isDirect(P)) - throw new RuntimeException("Argument \"P\" : Buffers passed to this method must all be either direct or indirect"); - if (TL != null && _direct != BufferFactory.isDirect(TL)) - throw new RuntimeException("Argument \"TL\" : Buffers passed to this method must all be either direct or indirect"); - if (TDL != null && _direct != BufferFactory.isDirect(TDL)) - throw new RuntimeException("Argument \"TDL\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - rhbar0(ENDLVL, BufferFactory.getDirectBufferByteOffset(ENDLVL), MRH, BufferFactory.getDirectBufferByteOffset(MRH), NCLYR, BufferFactory.getDirectBufferByteOffset(NCLYR), SFCP, BufferFactory.getDirectBufferByteOffset(SFCP), P, BufferFactory.getDirectBufferByteOffset(P), TL, BufferFactory.getDirectBufferByteOffset(TL), TDL, BufferFactory.getDirectBufferByteOffset(TDL)); - } else { - rhbar1(BufferFactory.getArray(ENDLVL), BufferFactory.getIndirectBufferByteOffset(ENDLVL), BufferFactory.getArray(MRH), BufferFactory.getIndirectBufferByteOffset(MRH), BufferFactory.getArray(NCLYR), BufferFactory.getIndirectBufferByteOffset(NCLYR), BufferFactory.getArray(SFCP), BufferFactory.getIndirectBufferByteOffset(SFCP), BufferFactory.getArray(P), BufferFactory.getIndirectBufferByteOffset(P), BufferFactory.getArray(TL), BufferFactory.getIndirectBufferByteOffset(TL), BufferFactory.getArray(TDL), BufferFactory.getIndirectBufferByteOffset(TDL)); - } - } - - /** Entry point to C language function:
void rhbar(float * ENDLVL, int * MRH, int * NCLYR, float * SFCP, float * P, float * TL, float * TDL); */ - private static native void rhbar0(Object ENDLVL, int ENDLVL_byte_offset, Object MRH, int MRH_byte_offset, Object NCLYR, int NCLYR_byte_offset, Object SFCP, int SFCP_byte_offset, Object P, int P_byte_offset, Object TL, int TL_byte_offset, Object TDL, int TDL_byte_offset); - - /** Entry point to C language function:
void rhbar(float * ENDLVL, int * MRH, int * NCLYR, float * SFCP, float * P, float * TL, float * TDL); */ - private static native void rhbar1(Object ENDLVL, int ENDLVL_byte_offset, Object MRH, int MRH_byte_offset, Object NCLYR, int NCLYR_byte_offset, Object SFCP, int SFCP_byte_offset, Object P, int P_byte_offset, Object TL, int TL_byte_offset, Object TDL, int TDL_byte_offset); - - /** Interface to C language function:
void rhbar(float * ENDLVL, int * MRH, int * NCLYR, float * SFCP, float * P, float * TL, float * TDL); */ - public static void rhbar(float[] ENDLVL, int ENDLVL_offset, int[] MRH, int MRH_offset, int[] NCLYR, int NCLYR_offset, float[] SFCP, int SFCP_offset, float[] P, int P_offset, float[] TL, int TL_offset, float[] TDL, int TDL_offset) - { - if(ENDLVL != null && ENDLVL.length <= ENDLVL_offset) - throw new RuntimeException("array offset argument \"ENDLVL_offset\" (" + ENDLVL_offset + ") equals or exceeds array length (" + ENDLVL.length + ")"); - if(MRH != null && MRH.length <= MRH_offset) - throw new RuntimeException("array offset argument \"MRH_offset\" (" + MRH_offset + ") equals or exceeds array length (" + MRH.length + ")"); - if(NCLYR != null && NCLYR.length <= NCLYR_offset) - throw new RuntimeException("array offset argument \"NCLYR_offset\" (" + NCLYR_offset + ") equals or exceeds array length (" + NCLYR.length + ")"); - if(SFCP != null && SFCP.length <= SFCP_offset) - throw new RuntimeException("array offset argument \"SFCP_offset\" (" + SFCP_offset + ") equals or exceeds array length (" + SFCP.length + ")"); - if(P != null && P.length <= P_offset) - throw new RuntimeException("array offset argument \"P_offset\" (" + P_offset + ") equals or exceeds array length (" + P.length + ")"); - if(TL != null && TL.length <= TL_offset) - throw new RuntimeException("array offset argument \"TL_offset\" (" + TL_offset + ") equals or exceeds array length (" + TL.length + ")"); - if(TDL != null && TDL.length <= TDL_offset) - throw new RuntimeException("array offset argument \"TDL_offset\" (" + TDL_offset + ") equals or exceeds array length (" + TDL.length + ")"); - rhbar1(ENDLVL, BufferFactory.SIZEOF_FLOAT * ENDLVL_offset, MRH, BufferFactory.SIZEOF_INT * MRH_offset, NCLYR, BufferFactory.SIZEOF_INT * NCLYR_offset, SFCP, BufferFactory.SIZEOF_FLOAT * SFCP_offset, P, BufferFactory.SIZEOF_FLOAT * P_offset, TL, BufferFactory.SIZEOF_FLOAT * TL_offset, TDL, BufferFactory.SIZEOF_FLOAT * TDL_offset); - - } - - /** Interface to C language function:
void richno(float * HT, float * HW, float * UW, float * VW, float * RHO, int * NLVLS, int * NW, float * BUOY, float * RICHNUM); */ - public static void richno(java.nio.FloatBuffer HT, java.nio.FloatBuffer HW, java.nio.FloatBuffer UW, java.nio.FloatBuffer VW, java.nio.FloatBuffer RHO, java.nio.IntBuffer NLVLS, java.nio.IntBuffer NW, java.nio.FloatBuffer BUOY, java.nio.FloatBuffer RICHNUM) - { - boolean _direct = BufferFactory.isDirect(HT); - if (HW != null && _direct != BufferFactory.isDirect(HW)) - throw new RuntimeException("Argument \"HW\" : Buffers passed to this method must all be either direct or indirect"); - if (UW != null && _direct != BufferFactory.isDirect(UW)) - throw new RuntimeException("Argument \"UW\" : Buffers passed to this method must all be either direct or indirect"); - if (VW != null && _direct != BufferFactory.isDirect(VW)) - throw new RuntimeException("Argument \"VW\" : Buffers passed to this method must all be either direct or indirect"); - if (RHO != null && _direct != BufferFactory.isDirect(RHO)) - throw new RuntimeException("Argument \"RHO\" : Buffers passed to this method must all be either direct or indirect"); - if (NLVLS != null && _direct != BufferFactory.isDirect(NLVLS)) - throw new RuntimeException("Argument \"NLVLS\" : Buffers passed to this method must all be either direct or indirect"); - if (NW != null && _direct != BufferFactory.isDirect(NW)) - throw new RuntimeException("Argument \"NW\" : Buffers passed to this method must all be either direct or indirect"); - if (BUOY != null && _direct != BufferFactory.isDirect(BUOY)) - throw new RuntimeException("Argument \"BUOY\" : Buffers passed to this method must all be either direct or indirect"); - if (RICHNUM != null && _direct != BufferFactory.isDirect(RICHNUM)) - throw new RuntimeException("Argument \"RICHNUM\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - richno0(HT, BufferFactory.getDirectBufferByteOffset(HT), HW, BufferFactory.getDirectBufferByteOffset(HW), UW, BufferFactory.getDirectBufferByteOffset(UW), VW, BufferFactory.getDirectBufferByteOffset(VW), RHO, BufferFactory.getDirectBufferByteOffset(RHO), NLVLS, BufferFactory.getDirectBufferByteOffset(NLVLS), NW, BufferFactory.getDirectBufferByteOffset(NW), BUOY, BufferFactory.getDirectBufferByteOffset(BUOY), RICHNUM, BufferFactory.getDirectBufferByteOffset(RICHNUM)); - } else { - richno1(BufferFactory.getArray(HT), BufferFactory.getIndirectBufferByteOffset(HT), BufferFactory.getArray(HW), BufferFactory.getIndirectBufferByteOffset(HW), BufferFactory.getArray(UW), BufferFactory.getIndirectBufferByteOffset(UW), BufferFactory.getArray(VW), BufferFactory.getIndirectBufferByteOffset(VW), BufferFactory.getArray(RHO), BufferFactory.getIndirectBufferByteOffset(RHO), BufferFactory.getArray(NLVLS), BufferFactory.getIndirectBufferByteOffset(NLVLS), BufferFactory.getArray(NW), BufferFactory.getIndirectBufferByteOffset(NW), BufferFactory.getArray(BUOY), BufferFactory.getIndirectBufferByteOffset(BUOY), BufferFactory.getArray(RICHNUM), BufferFactory.getIndirectBufferByteOffset(RICHNUM)); - } - } - - /** Entry point to C language function:
void richno(float * HT, float * HW, float * UW, float * VW, float * RHO, int * NLVLS, int * NW, float * BUOY, float * RICHNUM); */ - private static native void richno0(Object HT, int HT_byte_offset, Object HW, int HW_byte_offset, Object UW, int UW_byte_offset, Object VW, int VW_byte_offset, Object RHO, int RHO_byte_offset, Object NLVLS, int NLVLS_byte_offset, Object NW, int NW_byte_offset, Object BUOY, int BUOY_byte_offset, Object RICHNUM, int RICHNUM_byte_offset); - - /** Entry point to C language function:
void richno(float * HT, float * HW, float * UW, float * VW, float * RHO, int * NLVLS, int * NW, float * BUOY, float * RICHNUM); */ - private static native void richno1(Object HT, int HT_byte_offset, Object HW, int HW_byte_offset, Object UW, int UW_byte_offset, Object VW, int VW_byte_offset, Object RHO, int RHO_byte_offset, Object NLVLS, int NLVLS_byte_offset, Object NW, int NW_byte_offset, Object BUOY, int BUOY_byte_offset, Object RICHNUM, int RICHNUM_byte_offset); - - /** Interface to C language function:
void richno(float * HT, float * HW, float * UW, float * VW, float * RHO, int * NLVLS, int * NW, float * BUOY, float * RICHNUM); */ - public static void richno(float[] HT, int HT_offset, float[] HW, int HW_offset, float[] UW, int UW_offset, float[] VW, int VW_offset, float[] RHO, int RHO_offset, int[] NLVLS, int NLVLS_offset, int[] NW, int NW_offset, float[] BUOY, int BUOY_offset, float[] RICHNUM, int RICHNUM_offset) - { - if(HT != null && HT.length <= HT_offset) - throw new RuntimeException("array offset argument \"HT_offset\" (" + HT_offset + ") equals or exceeds array length (" + HT.length + ")"); - if(HW != null && HW.length <= HW_offset) - throw new RuntimeException("array offset argument \"HW_offset\" (" + HW_offset + ") equals or exceeds array length (" + HW.length + ")"); - if(UW != null && UW.length <= UW_offset) - throw new RuntimeException("array offset argument \"UW_offset\" (" + UW_offset + ") equals or exceeds array length (" + UW.length + ")"); - if(VW != null && VW.length <= VW_offset) - throw new RuntimeException("array offset argument \"VW_offset\" (" + VW_offset + ") equals or exceeds array length (" + VW.length + ")"); - if(RHO != null && RHO.length <= RHO_offset) - throw new RuntimeException("array offset argument \"RHO_offset\" (" + RHO_offset + ") equals or exceeds array length (" + RHO.length + ")"); - if(NLVLS != null && NLVLS.length <= NLVLS_offset) - throw new RuntimeException("array offset argument \"NLVLS_offset\" (" + NLVLS_offset + ") equals or exceeds array length (" + NLVLS.length + ")"); - if(NW != null && NW.length <= NW_offset) - throw new RuntimeException("array offset argument \"NW_offset\" (" + NW_offset + ") equals or exceeds array length (" + NW.length + ")"); - if(BUOY != null && BUOY.length <= BUOY_offset) - throw new RuntimeException("array offset argument \"BUOY_offset\" (" + BUOY_offset + ") equals or exceeds array length (" + BUOY.length + ")"); - if(RICHNUM != null && RICHNUM.length <= RICHNUM_offset) - throw new RuntimeException("array offset argument \"RICHNUM_offset\" (" + RICHNUM_offset + ") equals or exceeds array length (" + RICHNUM.length + ")"); - richno1(HT, BufferFactory.SIZEOF_FLOAT * HT_offset, HW, BufferFactory.SIZEOF_FLOAT * HW_offset, UW, BufferFactory.SIZEOF_FLOAT * UW_offset, VW, BufferFactory.SIZEOF_FLOAT * VW_offset, RHO, BufferFactory.SIZEOF_FLOAT * RHO_offset, NLVLS, BufferFactory.SIZEOF_INT * NLVLS_offset, NW, BufferFactory.SIZEOF_INT * NW_offset, BUOY, BufferFactory.SIZEOF_FLOAT * BUOY_offset, RICHNUM, BufferFactory.SIZEOF_FLOAT * RICHNUM_offset); - - } - - /** Interface to C language function:
void rotvectors(float * aX, float * aY, float * angle, float * bX, float * bY, int * mni, int * ni, int * nj); */ - public static void rotvectors(java.nio.FloatBuffer aX, java.nio.FloatBuffer aY, java.nio.FloatBuffer angle, java.nio.FloatBuffer bX, java.nio.FloatBuffer bY, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj) - { - boolean _direct = BufferFactory.isDirect(aX); - if (aY != null && _direct != BufferFactory.isDirect(aY)) - throw new RuntimeException("Argument \"aY\" : Buffers passed to this method must all be either direct or indirect"); - if (angle != null && _direct != BufferFactory.isDirect(angle)) - throw new RuntimeException("Argument \"angle\" : Buffers passed to this method must all be either direct or indirect"); - if (bX != null && _direct != BufferFactory.isDirect(bX)) - throw new RuntimeException("Argument \"bX\" : Buffers passed to this method must all be either direct or indirect"); - if (bY != null && _direct != BufferFactory.isDirect(bY)) - throw new RuntimeException("Argument \"bY\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - rotvectors0(aX, BufferFactory.getDirectBufferByteOffset(aX), aY, BufferFactory.getDirectBufferByteOffset(aY), angle, BufferFactory.getDirectBufferByteOffset(angle), bX, BufferFactory.getDirectBufferByteOffset(bX), bY, BufferFactory.getDirectBufferByteOffset(bY), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj)); - } else { - rotvectors1(BufferFactory.getArray(aX), BufferFactory.getIndirectBufferByteOffset(aX), BufferFactory.getArray(aY), BufferFactory.getIndirectBufferByteOffset(aY), BufferFactory.getArray(angle), BufferFactory.getIndirectBufferByteOffset(angle), BufferFactory.getArray(bX), BufferFactory.getIndirectBufferByteOffset(bX), BufferFactory.getArray(bY), BufferFactory.getIndirectBufferByteOffset(bY), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj)); - } - } - - /** Entry point to C language function:
void rotvectors(float * aX, float * aY, float * angle, float * bX, float * bY, int * mni, int * ni, int * nj); */ - private static native void rotvectors0(Object aX, int aX_byte_offset, Object aY, int aY_byte_offset, Object angle, int angle_byte_offset, Object bX, int bX_byte_offset, Object bY, int bY_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset); - - /** Entry point to C language function:
void rotvectors(float * aX, float * aY, float * angle, float * bX, float * bY, int * mni, int * ni, int * nj); */ - private static native void rotvectors1(Object aX, int aX_byte_offset, Object aY, int aY_byte_offset, Object angle, int angle_byte_offset, Object bX, int bX_byte_offset, Object bY, int bY_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset); - - /** Interface to C language function:
void rotvectors(float * aX, float * aY, float * angle, float * bX, float * bY, int * mni, int * ni, int * nj); */ - public static void rotvectors(float[] aX, int aX_offset, float[] aY, int aY_offset, float[] angle, int angle_offset, float[] bX, int bX_offset, float[] bY, int bY_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset) - { - if(aX != null && aX.length <= aX_offset) - throw new RuntimeException("array offset argument \"aX_offset\" (" + aX_offset + ") equals or exceeds array length (" + aX.length + ")"); - if(aY != null && aY.length <= aY_offset) - throw new RuntimeException("array offset argument \"aY_offset\" (" + aY_offset + ") equals or exceeds array length (" + aY.length + ")"); - if(angle != null && angle.length <= angle_offset) - throw new RuntimeException("array offset argument \"angle_offset\" (" + angle_offset + ") equals or exceeds array length (" + angle.length + ")"); - if(bX != null && bX.length <= bX_offset) - throw new RuntimeException("array offset argument \"bX_offset\" (" + bX_offset + ") equals or exceeds array length (" + bX.length + ")"); - if(bY != null && bY.length <= bY_offset) - throw new RuntimeException("array offset argument \"bY_offset\" (" + bY_offset + ") equals or exceeds array length (" + bY.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - rotvectors1(aX, BufferFactory.SIZEOF_FLOAT * aX_offset, aY, BufferFactory.SIZEOF_FLOAT * aY_offset, angle, BufferFactory.SIZEOF_FLOAT * angle_offset, bX, BufferFactory.SIZEOF_FLOAT * bX_offset, bY, BufferFactory.SIZEOF_FLOAT * bY_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset); - - } - - /** Interface to C language function:
void sampleSlice(const float * * vc3d, float * vc2d, const float * * slice3d, int mnx, int nx, int ny, int nz, int sense, int hyb, float * slice); */ - public static void sampleSlice(java.nio.FloatBuffer[] vc3d, java.nio.FloatBuffer vc2d, java.nio.FloatBuffer[] slice3d, int mnx, int nx, int ny, int nz, int sense, int hyb, java.nio.FloatBuffer slice) - { - int[] vc3d_byte_offset_array = new int[vc3d.length]; - if (vc3d != null) { - for (int _ctr = 0; _ctr < vc3d.length; _ctr++) { - if (!BufferFactory.isDirect(vc3d[_ctr])) { - throw new RuntimeException("Element " + _ctr + " of argument \"vc3d\" was not a direct buffer"); - } - vc3d_byte_offset_array[_ctr] = BufferFactory.getDirectBufferByteOffset(vc3d[_ctr]); - } - } - boolean _direct = BufferFactory.isDirect(vc2d); - int[] slice3d_byte_offset_array = new int[slice3d.length]; - if (slice3d != null) { - for (int _ctr = 0; _ctr < slice3d.length; _ctr++) { - if (!BufferFactory.isDirect(slice3d[_ctr])) { - throw new RuntimeException("Element " + _ctr + " of argument \"slice3d\" was not a direct buffer"); - } - slice3d_byte_offset_array[_ctr] = BufferFactory.getDirectBufferByteOffset(slice3d[_ctr]); - } - } - if (slice != null && _direct != BufferFactory.isDirect(slice)) - throw new RuntimeException("Argument \"slice\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - sampleSlice0(vc3d, vc3d_byte_offset_array, vc2d, BufferFactory.getDirectBufferByteOffset(vc2d), slice3d, slice3d_byte_offset_array, mnx, nx, ny, nz, sense, hyb, slice, BufferFactory.getDirectBufferByteOffset(slice)); - } else { - sampleSlice1(vc3d, vc3d_byte_offset_array, BufferFactory.getArray(vc2d), BufferFactory.getIndirectBufferByteOffset(vc2d), slice3d, slice3d_byte_offset_array, mnx, nx, ny, nz, sense, hyb, BufferFactory.getArray(slice), BufferFactory.getIndirectBufferByteOffset(slice)); - } - } - - /** Entry point to C language function:
void sampleSlice(const float * * vc3d, float * vc2d, const float * * slice3d, int mnx, int nx, int ny, int nz, int sense, int hyb, float * slice); */ - private static native void sampleSlice0(Object[] vc3d, int[] vc3d_byte_offset_array, Object vc2d, int vc2d_byte_offset, Object[] slice3d, int[] slice3d_byte_offset_array, int mnx, int nx, int ny, int nz, int sense, int hyb, Object slice, int slice_byte_offset); - - /** Entry point to C language function:
void sampleSlice(const float * * vc3d, float * vc2d, const float * * slice3d, int mnx, int nx, int ny, int nz, int sense, int hyb, float * slice); */ - private static native void sampleSlice1(Object[] vc3d, int[] vc3d_byte_offset_array, Object vc2d, int vc2d_byte_offset, Object[] slice3d, int[] slice3d_byte_offset_array, int mnx, int nx, int ny, int nz, int sense, int hyb, Object slice, int slice_byte_offset); - - /** Interface to C language function:
void sampleSlice(const float * * vc3d, float * vc2d, const float * * slice3d, int mnx, int nx, int ny, int nz, int sense, int hyb, float * slice); */ - public static void sampleSlice(java.nio.FloatBuffer[] vc3d, float[] vc2d, int vc2d_offset, java.nio.FloatBuffer[] slice3d, int mnx, int nx, int ny, int nz, int sense, int hyb, float[] slice, int slice_offset) - { - int[] vc3d_byte_offset_array = new int[vc3d.length]; - if (vc3d != null) { - for (int _ctr = 0; _ctr < vc3d.length; _ctr++) { - if (!BufferFactory.isDirect(vc3d[_ctr])) { - throw new RuntimeException("Element " + _ctr + " of argument \"vc3d\" was not a direct buffer"); - } - vc3d_byte_offset_array[_ctr] = BufferFactory.getDirectBufferByteOffset(vc3d[_ctr]); - } - } - if(vc2d != null && vc2d.length <= vc2d_offset) - throw new RuntimeException("array offset argument \"vc2d_offset\" (" + vc2d_offset + ") equals or exceeds array length (" + vc2d.length + ")"); - int[] slice3d_byte_offset_array = new int[slice3d.length]; - if (slice3d != null) { - for (int _ctr = 0; _ctr < slice3d.length; _ctr++) { - if (!BufferFactory.isDirect(slice3d[_ctr])) { - throw new RuntimeException("Element " + _ctr + " of argument \"slice3d\" was not a direct buffer"); - } - slice3d_byte_offset_array[_ctr] = BufferFactory.getDirectBufferByteOffset(slice3d[_ctr]); - } - } - if(slice != null && slice.length <= slice_offset) - throw new RuntimeException("array offset argument \"slice_offset\" (" + slice_offset + ") equals or exceeds array length (" + slice.length + ")"); - sampleSlice1(vc3d, vc3d_byte_offset_array, vc2d, BufferFactory.SIZEOF_FLOAT * vc2d_offset, slice3d, slice3d_byte_offset_array, mnx, nx, ny, nz, sense, hyb, slice, BufferFactory.SIZEOF_FLOAT * slice_offset); - - } - - /** Interface to C language function:
int scaleless_analysis(float * xind, float * yind, float * values, int * nv, int * nx, int * ny, float * grid); */ - public static int scaleless_analysis(java.nio.FloatBuffer xind, java.nio.FloatBuffer yind, java.nio.FloatBuffer values, java.nio.IntBuffer nv, java.nio.IntBuffer nx, java.nio.IntBuffer ny, java.nio.FloatBuffer grid) - { - boolean _direct = BufferFactory.isDirect(xind); - if (yind != null && _direct != BufferFactory.isDirect(yind)) - throw new RuntimeException("Argument \"yind\" : Buffers passed to this method must all be either direct or indirect"); - if (values != null && _direct != BufferFactory.isDirect(values)) - throw new RuntimeException("Argument \"values\" : Buffers passed to this method must all be either direct or indirect"); - if (nv != null && _direct != BufferFactory.isDirect(nv)) - throw new RuntimeException("Argument \"nv\" : Buffers passed to this method must all be either direct or indirect"); - if (nx != null && _direct != BufferFactory.isDirect(nx)) - throw new RuntimeException("Argument \"nx\" : Buffers passed to this method must all be either direct or indirect"); - if (ny != null && _direct != BufferFactory.isDirect(ny)) - throw new RuntimeException("Argument \"ny\" : Buffers passed to this method must all be either direct or indirect"); - if (grid != null && _direct != BufferFactory.isDirect(grid)) - throw new RuntimeException("Argument \"grid\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - return scaleless_analysis0(xind, BufferFactory.getDirectBufferByteOffset(xind), yind, BufferFactory.getDirectBufferByteOffset(yind), values, BufferFactory.getDirectBufferByteOffset(values), nv, BufferFactory.getDirectBufferByteOffset(nv), nx, BufferFactory.getDirectBufferByteOffset(nx), ny, BufferFactory.getDirectBufferByteOffset(ny), grid, BufferFactory.getDirectBufferByteOffset(grid)); - } else { - return scaleless_analysis1(BufferFactory.getArray(xind), BufferFactory.getIndirectBufferByteOffset(xind), BufferFactory.getArray(yind), BufferFactory.getIndirectBufferByteOffset(yind), BufferFactory.getArray(values), BufferFactory.getIndirectBufferByteOffset(values), BufferFactory.getArray(nv), BufferFactory.getIndirectBufferByteOffset(nv), BufferFactory.getArray(nx), BufferFactory.getIndirectBufferByteOffset(nx), BufferFactory.getArray(ny), BufferFactory.getIndirectBufferByteOffset(ny), BufferFactory.getArray(grid), BufferFactory.getIndirectBufferByteOffset(grid)); - } - } - - /** Entry point to C language function:
int scaleless_analysis(float * xind, float * yind, float * values, int * nv, int * nx, int * ny, float * grid); */ - private static native int scaleless_analysis0(Object xind, int xind_byte_offset, Object yind, int yind_byte_offset, Object values, int values_byte_offset, Object nv, int nv_byte_offset, Object nx, int nx_byte_offset, Object ny, int ny_byte_offset, Object grid, int grid_byte_offset); - - /** Entry point to C language function:
int scaleless_analysis(float * xind, float * yind, float * values, int * nv, int * nx, int * ny, float * grid); */ - private static native int scaleless_analysis1(Object xind, int xind_byte_offset, Object yind, int yind_byte_offset, Object values, int values_byte_offset, Object nv, int nv_byte_offset, Object nx, int nx_byte_offset, Object ny, int ny_byte_offset, Object grid, int grid_byte_offset); - - /** Interface to C language function:
int scaleless_analysis(float * xind, float * yind, float * values, int * nv, int * nx, int * ny, float * grid); */ - public static int scaleless_analysis(float[] xind, int xind_offset, float[] yind, int yind_offset, float[] values, int values_offset, int[] nv, int nv_offset, int[] nx, int nx_offset, int[] ny, int ny_offset, float[] grid, int grid_offset) - { - if(xind != null && xind.length <= xind_offset) - throw new RuntimeException("array offset argument \"xind_offset\" (" + xind_offset + ") equals or exceeds array length (" + xind.length + ")"); - if(yind != null && yind.length <= yind_offset) - throw new RuntimeException("array offset argument \"yind_offset\" (" + yind_offset + ") equals or exceeds array length (" + yind.length + ")"); - if(values != null && values.length <= values_offset) - throw new RuntimeException("array offset argument \"values_offset\" (" + values_offset + ") equals or exceeds array length (" + values.length + ")"); - if(nv != null && nv.length <= nv_offset) - throw new RuntimeException("array offset argument \"nv_offset\" (" + nv_offset + ") equals or exceeds array length (" + nv.length + ")"); - if(nx != null && nx.length <= nx_offset) - throw new RuntimeException("array offset argument \"nx_offset\" (" + nx_offset + ") equals or exceeds array length (" + nx.length + ")"); - if(ny != null && ny.length <= ny_offset) - throw new RuntimeException("array offset argument \"ny_offset\" (" + ny_offset + ") equals or exceeds array length (" + ny.length + ")"); - if(grid != null && grid.length <= grid_offset) - throw new RuntimeException("array offset argument \"grid_offset\" (" + grid_offset + ") equals or exceeds array length (" + grid.length + ")"); - return scaleless_analysis1(xind, BufferFactory.SIZEOF_FLOAT * xind_offset, yind, BufferFactory.SIZEOF_FLOAT * yind_offset, values, BufferFactory.SIZEOF_FLOAT * values_offset, nv, BufferFactory.SIZEOF_INT * nv_offset, nx, BufferFactory.SIZEOF_INT * nx_offset, ny, BufferFactory.SIZEOF_INT * ny_offset, grid, BufferFactory.SIZEOF_FLOAT * grid_offset); - - } - - /** Interface to C language function:
void setqsmooth(int * npass, float * smthwgt); */ - public static void setqsmooth(java.nio.IntBuffer npass, java.nio.FloatBuffer smthwgt) - { - boolean _direct = BufferFactory.isDirect(npass); - if (smthwgt != null && _direct != BufferFactory.isDirect(smthwgt)) - throw new RuntimeException("Argument \"smthwgt\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - setqsmooth0(npass, BufferFactory.getDirectBufferByteOffset(npass), smthwgt, BufferFactory.getDirectBufferByteOffset(smthwgt)); - } else { - setqsmooth1(BufferFactory.getArray(npass), BufferFactory.getIndirectBufferByteOffset(npass), BufferFactory.getArray(smthwgt), BufferFactory.getIndirectBufferByteOffset(smthwgt)); - } - } - - /** Entry point to C language function:
void setqsmooth(int * npass, float * smthwgt); */ - private static native void setqsmooth0(Object npass, int npass_byte_offset, Object smthwgt, int smthwgt_byte_offset); - - /** Entry point to C language function:
void setqsmooth(int * npass, float * smthwgt); */ - private static native void setqsmooth1(Object npass, int npass_byte_offset, Object smthwgt, int smthwgt_byte_offset); - - /** Interface to C language function:
void setqsmooth(int * npass, float * smthwgt); */ - public static void setqsmooth(int[] npass, int npass_offset, float[] smthwgt, int smthwgt_offset) - { - if(npass != null && npass.length <= npass_offset) - throw new RuntimeException("array offset argument \"npass_offset\" (" + npass_offset + ") equals or exceeds array length (" + npass.length + ")"); - if(smthwgt != null && smthwgt.length <= smthwgt_offset) - throw new RuntimeException("array offset argument \"smthwgt_offset\" (" + smthwgt_offset + ") equals or exceeds array length (" + smthwgt.length + ")"); - setqsmooth1(npass, BufferFactory.SIZEOF_INT * npass_offset, smthwgt, BufferFactory.SIZEOF_FLOAT * smthwgt_offset); - - } - - /** Interface to C language function:
void slfront(float * z, float * t, float * p, float * dx, float * dy, float * coriolis, int * mni, int * ni, int * nj, float * fgen, float * slqx, float * slqy, float * w1, float * w2, float * w3, float * dtdx, float * dtdy); */ - public static void slfront(java.nio.FloatBuffer z, java.nio.FloatBuffer t, java.nio.FloatBuffer p, java.nio.FloatBuffer dx, java.nio.FloatBuffer dy, java.nio.FloatBuffer coriolis, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj, java.nio.FloatBuffer fgen, java.nio.FloatBuffer slqx, java.nio.FloatBuffer slqy, java.nio.FloatBuffer w1, java.nio.FloatBuffer w2, java.nio.FloatBuffer w3, java.nio.FloatBuffer dtdx, java.nio.FloatBuffer dtdy) - { - boolean _direct = BufferFactory.isDirect(z); - if (t != null && _direct != BufferFactory.isDirect(t)) - throw new RuntimeException("Argument \"t\" : Buffers passed to this method must all be either direct or indirect"); - if (p != null && _direct != BufferFactory.isDirect(p)) - throw new RuntimeException("Argument \"p\" : Buffers passed to this method must all be either direct or indirect"); - if (dx != null && _direct != BufferFactory.isDirect(dx)) - throw new RuntimeException("Argument \"dx\" : Buffers passed to this method must all be either direct or indirect"); - if (dy != null && _direct != BufferFactory.isDirect(dy)) - throw new RuntimeException("Argument \"dy\" : Buffers passed to this method must all be either direct or indirect"); - if (coriolis != null && _direct != BufferFactory.isDirect(coriolis)) - throw new RuntimeException("Argument \"coriolis\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (fgen != null && _direct != BufferFactory.isDirect(fgen)) - throw new RuntimeException("Argument \"fgen\" : Buffers passed to this method must all be either direct or indirect"); - if (slqx != null && _direct != BufferFactory.isDirect(slqx)) - throw new RuntimeException("Argument \"slqx\" : Buffers passed to this method must all be either direct or indirect"); - if (slqy != null && _direct != BufferFactory.isDirect(slqy)) - throw new RuntimeException("Argument \"slqy\" : Buffers passed to this method must all be either direct or indirect"); - if (w1 != null && _direct != BufferFactory.isDirect(w1)) - throw new RuntimeException("Argument \"w1\" : Buffers passed to this method must all be either direct or indirect"); - if (w2 != null && _direct != BufferFactory.isDirect(w2)) - throw new RuntimeException("Argument \"w2\" : Buffers passed to this method must all be either direct or indirect"); - if (w3 != null && _direct != BufferFactory.isDirect(w3)) - throw new RuntimeException("Argument \"w3\" : Buffers passed to this method must all be either direct or indirect"); - if (dtdx != null && _direct != BufferFactory.isDirect(dtdx)) - throw new RuntimeException("Argument \"dtdx\" : Buffers passed to this method must all be either direct or indirect"); - if (dtdy != null && _direct != BufferFactory.isDirect(dtdy)) - throw new RuntimeException("Argument \"dtdy\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - slfront0(z, BufferFactory.getDirectBufferByteOffset(z), t, BufferFactory.getDirectBufferByteOffset(t), p, BufferFactory.getDirectBufferByteOffset(p), dx, BufferFactory.getDirectBufferByteOffset(dx), dy, BufferFactory.getDirectBufferByteOffset(dy), coriolis, BufferFactory.getDirectBufferByteOffset(coriolis), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj), fgen, BufferFactory.getDirectBufferByteOffset(fgen), slqx, BufferFactory.getDirectBufferByteOffset(slqx), slqy, BufferFactory.getDirectBufferByteOffset(slqy), w1, BufferFactory.getDirectBufferByteOffset(w1), w2, BufferFactory.getDirectBufferByteOffset(w2), w3, BufferFactory.getDirectBufferByteOffset(w3), dtdx, BufferFactory.getDirectBufferByteOffset(dtdx), dtdy, BufferFactory.getDirectBufferByteOffset(dtdy)); - } else { - slfront1(BufferFactory.getArray(z), BufferFactory.getIndirectBufferByteOffset(z), BufferFactory.getArray(t), BufferFactory.getIndirectBufferByteOffset(t), BufferFactory.getArray(p), BufferFactory.getIndirectBufferByteOffset(p), BufferFactory.getArray(dx), BufferFactory.getIndirectBufferByteOffset(dx), BufferFactory.getArray(dy), BufferFactory.getIndirectBufferByteOffset(dy), BufferFactory.getArray(coriolis), BufferFactory.getIndirectBufferByteOffset(coriolis), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj), BufferFactory.getArray(fgen), BufferFactory.getIndirectBufferByteOffset(fgen), BufferFactory.getArray(slqx), BufferFactory.getIndirectBufferByteOffset(slqx), BufferFactory.getArray(slqy), BufferFactory.getIndirectBufferByteOffset(slqy), BufferFactory.getArray(w1), BufferFactory.getIndirectBufferByteOffset(w1), BufferFactory.getArray(w2), BufferFactory.getIndirectBufferByteOffset(w2), BufferFactory.getArray(w3), BufferFactory.getIndirectBufferByteOffset(w3), BufferFactory.getArray(dtdx), BufferFactory.getIndirectBufferByteOffset(dtdx), BufferFactory.getArray(dtdy), BufferFactory.getIndirectBufferByteOffset(dtdy)); - } - } - - /** Entry point to C language function:
void slfront(float * z, float * t, float * p, float * dx, float * dy, float * coriolis, int * mni, int * ni, int * nj, float * fgen, float * slqx, float * slqy, float * w1, float * w2, float * w3, float * dtdx, float * dtdy); */ - private static native void slfront0(Object z, int z_byte_offset, Object t, int t_byte_offset, Object p, int p_byte_offset, Object dx, int dx_byte_offset, Object dy, int dy_byte_offset, Object coriolis, int coriolis_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object fgen, int fgen_byte_offset, Object slqx, int slqx_byte_offset, Object slqy, int slqy_byte_offset, Object w1, int w1_byte_offset, Object w2, int w2_byte_offset, Object w3, int w3_byte_offset, Object dtdx, int dtdx_byte_offset, Object dtdy, int dtdy_byte_offset); - - /** Entry point to C language function:
void slfront(float * z, float * t, float * p, float * dx, float * dy, float * coriolis, int * mni, int * ni, int * nj, float * fgen, float * slqx, float * slqy, float * w1, float * w2, float * w3, float * dtdx, float * dtdy); */ - private static native void slfront1(Object z, int z_byte_offset, Object t, int t_byte_offset, Object p, int p_byte_offset, Object dx, int dx_byte_offset, Object dy, int dy_byte_offset, Object coriolis, int coriolis_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object fgen, int fgen_byte_offset, Object slqx, int slqx_byte_offset, Object slqy, int slqy_byte_offset, Object w1, int w1_byte_offset, Object w2, int w2_byte_offset, Object w3, int w3_byte_offset, Object dtdx, int dtdx_byte_offset, Object dtdy, int dtdy_byte_offset); - - /** Interface to C language function:
void slfront(float * z, float * t, float * p, float * dx, float * dy, float * coriolis, int * mni, int * ni, int * nj, float * fgen, float * slqx, float * slqy, float * w1, float * w2, float * w3, float * dtdx, float * dtdy); */ - public static void slfront(float[] z, int z_offset, float[] t, int t_offset, float[] p, int p_offset, float[] dx, int dx_offset, float[] dy, int dy_offset, float[] coriolis, int coriolis_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset, float[] fgen, int fgen_offset, float[] slqx, int slqx_offset, float[] slqy, int slqy_offset, float[] w1, int w1_offset, float[] w2, int w2_offset, float[] w3, int w3_offset, float[] dtdx, int dtdx_offset, float[] dtdy, int dtdy_offset) - { - if(z != null && z.length <= z_offset) - throw new RuntimeException("array offset argument \"z_offset\" (" + z_offset + ") equals or exceeds array length (" + z.length + ")"); - if(t != null && t.length <= t_offset) - throw new RuntimeException("array offset argument \"t_offset\" (" + t_offset + ") equals or exceeds array length (" + t.length + ")"); - if(p != null && p.length <= p_offset) - throw new RuntimeException("array offset argument \"p_offset\" (" + p_offset + ") equals or exceeds array length (" + p.length + ")"); - if(dx != null && dx.length <= dx_offset) - throw new RuntimeException("array offset argument \"dx_offset\" (" + dx_offset + ") equals or exceeds array length (" + dx.length + ")"); - if(dy != null && dy.length <= dy_offset) - throw new RuntimeException("array offset argument \"dy_offset\" (" + dy_offset + ") equals or exceeds array length (" + dy.length + ")"); - if(coriolis != null && coriolis.length <= coriolis_offset) - throw new RuntimeException("array offset argument \"coriolis_offset\" (" + coriolis_offset + ") equals or exceeds array length (" + coriolis.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - if(fgen != null && fgen.length <= fgen_offset) - throw new RuntimeException("array offset argument \"fgen_offset\" (" + fgen_offset + ") equals or exceeds array length (" + fgen.length + ")"); - if(slqx != null && slqx.length <= slqx_offset) - throw new RuntimeException("array offset argument \"slqx_offset\" (" + slqx_offset + ") equals or exceeds array length (" + slqx.length + ")"); - if(slqy != null && slqy.length <= slqy_offset) - throw new RuntimeException("array offset argument \"slqy_offset\" (" + slqy_offset + ") equals or exceeds array length (" + slqy.length + ")"); - if(w1 != null && w1.length <= w1_offset) - throw new RuntimeException("array offset argument \"w1_offset\" (" + w1_offset + ") equals or exceeds array length (" + w1.length + ")"); - if(w2 != null && w2.length <= w2_offset) - throw new RuntimeException("array offset argument \"w2_offset\" (" + w2_offset + ") equals or exceeds array length (" + w2.length + ")"); - if(w3 != null && w3.length <= w3_offset) - throw new RuntimeException("array offset argument \"w3_offset\" (" + w3_offset + ") equals or exceeds array length (" + w3.length + ")"); - if(dtdx != null && dtdx.length <= dtdx_offset) - throw new RuntimeException("array offset argument \"dtdx_offset\" (" + dtdx_offset + ") equals or exceeds array length (" + dtdx.length + ")"); - if(dtdy != null && dtdy.length <= dtdy_offset) - throw new RuntimeException("array offset argument \"dtdy_offset\" (" + dtdy_offset + ") equals or exceeds array length (" + dtdy.length + ")"); - slfront1(z, BufferFactory.SIZEOF_FLOAT * z_offset, t, BufferFactory.SIZEOF_FLOAT * t_offset, p, BufferFactory.SIZEOF_FLOAT * p_offset, dx, BufferFactory.SIZEOF_FLOAT * dx_offset, dy, BufferFactory.SIZEOF_FLOAT * dy_offset, coriolis, BufferFactory.SIZEOF_FLOAT * coriolis_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset, fgen, BufferFactory.SIZEOF_FLOAT * fgen_offset, slqx, BufferFactory.SIZEOF_FLOAT * slqx_offset, slqy, BufferFactory.SIZEOF_FLOAT * slqy_offset, w1, BufferFactory.SIZEOF_FLOAT * w1_offset, w2, BufferFactory.SIZEOF_FLOAT * w2_offset, w3, BufferFactory.SIZEOF_FLOAT * w3_offset, dtdx, BufferFactory.SIZEOF_FLOAT * dtdx_offset, dtdy, BufferFactory.SIZEOF_FLOAT * dtdy_offset); - - } - - /** Interface to C language function:
void slqvect(float * z, float * t, float * p, float * dx, float * dy, float * coriolis, int * mni, int * ni, int * nj, float * slqx, float * slqy, float * dugdx, float * dugdy, float * dvgdx, float * dvgdy, float * dtdx, float * dtdy); */ - public static void slqvect(java.nio.FloatBuffer z, java.nio.FloatBuffer t, java.nio.FloatBuffer p, java.nio.FloatBuffer dx, java.nio.FloatBuffer dy, java.nio.FloatBuffer coriolis, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj, java.nio.FloatBuffer slqx, java.nio.FloatBuffer slqy, java.nio.FloatBuffer dugdx, java.nio.FloatBuffer dugdy, java.nio.FloatBuffer dvgdx, java.nio.FloatBuffer dvgdy, java.nio.FloatBuffer dtdx, java.nio.FloatBuffer dtdy) - { - boolean _direct = BufferFactory.isDirect(z); - if (t != null && _direct != BufferFactory.isDirect(t)) - throw new RuntimeException("Argument \"t\" : Buffers passed to this method must all be either direct or indirect"); - if (p != null && _direct != BufferFactory.isDirect(p)) - throw new RuntimeException("Argument \"p\" : Buffers passed to this method must all be either direct or indirect"); - if (dx != null && _direct != BufferFactory.isDirect(dx)) - throw new RuntimeException("Argument \"dx\" : Buffers passed to this method must all be either direct or indirect"); - if (dy != null && _direct != BufferFactory.isDirect(dy)) - throw new RuntimeException("Argument \"dy\" : Buffers passed to this method must all be either direct or indirect"); - if (coriolis != null && _direct != BufferFactory.isDirect(coriolis)) - throw new RuntimeException("Argument \"coriolis\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (slqx != null && _direct != BufferFactory.isDirect(slqx)) - throw new RuntimeException("Argument \"slqx\" : Buffers passed to this method must all be either direct or indirect"); - if (slqy != null && _direct != BufferFactory.isDirect(slqy)) - throw new RuntimeException("Argument \"slqy\" : Buffers passed to this method must all be either direct or indirect"); - if (dugdx != null && _direct != BufferFactory.isDirect(dugdx)) - throw new RuntimeException("Argument \"dugdx\" : Buffers passed to this method must all be either direct or indirect"); - if (dugdy != null && _direct != BufferFactory.isDirect(dugdy)) - throw new RuntimeException("Argument \"dugdy\" : Buffers passed to this method must all be either direct or indirect"); - if (dvgdx != null && _direct != BufferFactory.isDirect(dvgdx)) - throw new RuntimeException("Argument \"dvgdx\" : Buffers passed to this method must all be either direct or indirect"); - if (dvgdy != null && _direct != BufferFactory.isDirect(dvgdy)) - throw new RuntimeException("Argument \"dvgdy\" : Buffers passed to this method must all be either direct or indirect"); - if (dtdx != null && _direct != BufferFactory.isDirect(dtdx)) - throw new RuntimeException("Argument \"dtdx\" : Buffers passed to this method must all be either direct or indirect"); - if (dtdy != null && _direct != BufferFactory.isDirect(dtdy)) - throw new RuntimeException("Argument \"dtdy\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - slqvect0(z, BufferFactory.getDirectBufferByteOffset(z), t, BufferFactory.getDirectBufferByteOffset(t), p, BufferFactory.getDirectBufferByteOffset(p), dx, BufferFactory.getDirectBufferByteOffset(dx), dy, BufferFactory.getDirectBufferByteOffset(dy), coriolis, BufferFactory.getDirectBufferByteOffset(coriolis), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj), slqx, BufferFactory.getDirectBufferByteOffset(slqx), slqy, BufferFactory.getDirectBufferByteOffset(slqy), dugdx, BufferFactory.getDirectBufferByteOffset(dugdx), dugdy, BufferFactory.getDirectBufferByteOffset(dugdy), dvgdx, BufferFactory.getDirectBufferByteOffset(dvgdx), dvgdy, BufferFactory.getDirectBufferByteOffset(dvgdy), dtdx, BufferFactory.getDirectBufferByteOffset(dtdx), dtdy, BufferFactory.getDirectBufferByteOffset(dtdy)); - } else { - slqvect1(BufferFactory.getArray(z), BufferFactory.getIndirectBufferByteOffset(z), BufferFactory.getArray(t), BufferFactory.getIndirectBufferByteOffset(t), BufferFactory.getArray(p), BufferFactory.getIndirectBufferByteOffset(p), BufferFactory.getArray(dx), BufferFactory.getIndirectBufferByteOffset(dx), BufferFactory.getArray(dy), BufferFactory.getIndirectBufferByteOffset(dy), BufferFactory.getArray(coriolis), BufferFactory.getIndirectBufferByteOffset(coriolis), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj), BufferFactory.getArray(slqx), BufferFactory.getIndirectBufferByteOffset(slqx), BufferFactory.getArray(slqy), BufferFactory.getIndirectBufferByteOffset(slqy), BufferFactory.getArray(dugdx), BufferFactory.getIndirectBufferByteOffset(dugdx), BufferFactory.getArray(dugdy), BufferFactory.getIndirectBufferByteOffset(dugdy), BufferFactory.getArray(dvgdx), BufferFactory.getIndirectBufferByteOffset(dvgdx), BufferFactory.getArray(dvgdy), BufferFactory.getIndirectBufferByteOffset(dvgdy), BufferFactory.getArray(dtdx), BufferFactory.getIndirectBufferByteOffset(dtdx), BufferFactory.getArray(dtdy), BufferFactory.getIndirectBufferByteOffset(dtdy)); - } - } - - /** Entry point to C language function:
void slqvect(float * z, float * t, float * p, float * dx, float * dy, float * coriolis, int * mni, int * ni, int * nj, float * slqx, float * slqy, float * dugdx, float * dugdy, float * dvgdx, float * dvgdy, float * dtdx, float * dtdy); */ - private static native void slqvect0(Object z, int z_byte_offset, Object t, int t_byte_offset, Object p, int p_byte_offset, Object dx, int dx_byte_offset, Object dy, int dy_byte_offset, Object coriolis, int coriolis_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object slqx, int slqx_byte_offset, Object slqy, int slqy_byte_offset, Object dugdx, int dugdx_byte_offset, Object dugdy, int dugdy_byte_offset, Object dvgdx, int dvgdx_byte_offset, Object dvgdy, int dvgdy_byte_offset, Object dtdx, int dtdx_byte_offset, Object dtdy, int dtdy_byte_offset); - - /** Entry point to C language function:
void slqvect(float * z, float * t, float * p, float * dx, float * dy, float * coriolis, int * mni, int * ni, int * nj, float * slqx, float * slqy, float * dugdx, float * dugdy, float * dvgdx, float * dvgdy, float * dtdx, float * dtdy); */ - private static native void slqvect1(Object z, int z_byte_offset, Object t, int t_byte_offset, Object p, int p_byte_offset, Object dx, int dx_byte_offset, Object dy, int dy_byte_offset, Object coriolis, int coriolis_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object slqx, int slqx_byte_offset, Object slqy, int slqy_byte_offset, Object dugdx, int dugdx_byte_offset, Object dugdy, int dugdy_byte_offset, Object dvgdx, int dvgdx_byte_offset, Object dvgdy, int dvgdy_byte_offset, Object dtdx, int dtdx_byte_offset, Object dtdy, int dtdy_byte_offset); - - /** Interface to C language function:
void slqvect(float * z, float * t, float * p, float * dx, float * dy, float * coriolis, int * mni, int * ni, int * nj, float * slqx, float * slqy, float * dugdx, float * dugdy, float * dvgdx, float * dvgdy, float * dtdx, float * dtdy); */ - public static void slqvect(float[] z, int z_offset, float[] t, int t_offset, float[] p, int p_offset, float[] dx, int dx_offset, float[] dy, int dy_offset, float[] coriolis, int coriolis_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset, float[] slqx, int slqx_offset, float[] slqy, int slqy_offset, float[] dugdx, int dugdx_offset, float[] dugdy, int dugdy_offset, float[] dvgdx, int dvgdx_offset, float[] dvgdy, int dvgdy_offset, float[] dtdx, int dtdx_offset, float[] dtdy, int dtdy_offset) - { - if(z != null && z.length <= z_offset) - throw new RuntimeException("array offset argument \"z_offset\" (" + z_offset + ") equals or exceeds array length (" + z.length + ")"); - if(t != null && t.length <= t_offset) - throw new RuntimeException("array offset argument \"t_offset\" (" + t_offset + ") equals or exceeds array length (" + t.length + ")"); - if(p != null && p.length <= p_offset) - throw new RuntimeException("array offset argument \"p_offset\" (" + p_offset + ") equals or exceeds array length (" + p.length + ")"); - if(dx != null && dx.length <= dx_offset) - throw new RuntimeException("array offset argument \"dx_offset\" (" + dx_offset + ") equals or exceeds array length (" + dx.length + ")"); - if(dy != null && dy.length <= dy_offset) - throw new RuntimeException("array offset argument \"dy_offset\" (" + dy_offset + ") equals or exceeds array length (" + dy.length + ")"); - if(coriolis != null && coriolis.length <= coriolis_offset) - throw new RuntimeException("array offset argument \"coriolis_offset\" (" + coriolis_offset + ") equals or exceeds array length (" + coriolis.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - if(slqx != null && slqx.length <= slqx_offset) - throw new RuntimeException("array offset argument \"slqx_offset\" (" + slqx_offset + ") equals or exceeds array length (" + slqx.length + ")"); - if(slqy != null && slqy.length <= slqy_offset) - throw new RuntimeException("array offset argument \"slqy_offset\" (" + slqy_offset + ") equals or exceeds array length (" + slqy.length + ")"); - if(dugdx != null && dugdx.length <= dugdx_offset) - throw new RuntimeException("array offset argument \"dugdx_offset\" (" + dugdx_offset + ") equals or exceeds array length (" + dugdx.length + ")"); - if(dugdy != null && dugdy.length <= dugdy_offset) - throw new RuntimeException("array offset argument \"dugdy_offset\" (" + dugdy_offset + ") equals or exceeds array length (" + dugdy.length + ")"); - if(dvgdx != null && dvgdx.length <= dvgdx_offset) - throw new RuntimeException("array offset argument \"dvgdx_offset\" (" + dvgdx_offset + ") equals or exceeds array length (" + dvgdx.length + ")"); - if(dvgdy != null && dvgdy.length <= dvgdy_offset) - throw new RuntimeException("array offset argument \"dvgdy_offset\" (" + dvgdy_offset + ") equals or exceeds array length (" + dvgdy.length + ")"); - if(dtdx != null && dtdx.length <= dtdx_offset) - throw new RuntimeException("array offset argument \"dtdx_offset\" (" + dtdx_offset + ") equals or exceeds array length (" + dtdx.length + ")"); - if(dtdy != null && dtdy.length <= dtdy_offset) - throw new RuntimeException("array offset argument \"dtdy_offset\" (" + dtdy_offset + ") equals or exceeds array length (" + dtdy.length + ")"); - slqvect1(z, BufferFactory.SIZEOF_FLOAT * z_offset, t, BufferFactory.SIZEOF_FLOAT * t_offset, p, BufferFactory.SIZEOF_FLOAT * p_offset, dx, BufferFactory.SIZEOF_FLOAT * dx_offset, dy, BufferFactory.SIZEOF_FLOAT * dy_offset, coriolis, BufferFactory.SIZEOF_FLOAT * coriolis_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset, slqx, BufferFactory.SIZEOF_FLOAT * slqx_offset, slqy, BufferFactory.SIZEOF_FLOAT * slqy_offset, dugdx, BufferFactory.SIZEOF_FLOAT * dugdx_offset, dugdy, BufferFactory.SIZEOF_FLOAT * dugdy_offset, dvgdx, BufferFactory.SIZEOF_FLOAT * dvgdx_offset, dvgdy, BufferFactory.SIZEOF_FLOAT * dvgdy_offset, dtdx, BufferFactory.SIZEOF_FLOAT * dtdx_offset, dtdy, BufferFactory.SIZEOF_FLOAT * dtdy_offset); - - } - - /** Interface to C language function:
void solax(int * JULDAY, int * MONTH, float * SLAT, int * TYMINC, int * TSTART, int * TSTOP, float * TSRAD); */ - public static void solax(java.nio.IntBuffer JULDAY, java.nio.IntBuffer MONTH, java.nio.FloatBuffer SLAT, java.nio.IntBuffer TYMINC, java.nio.IntBuffer TSTART, java.nio.IntBuffer TSTOP, java.nio.FloatBuffer TSRAD) - { - boolean _direct = BufferFactory.isDirect(JULDAY); - if (MONTH != null && _direct != BufferFactory.isDirect(MONTH)) - throw new RuntimeException("Argument \"MONTH\" : Buffers passed to this method must all be either direct or indirect"); - if (SLAT != null && _direct != BufferFactory.isDirect(SLAT)) - throw new RuntimeException("Argument \"SLAT\" : Buffers passed to this method must all be either direct or indirect"); - if (TYMINC != null && _direct != BufferFactory.isDirect(TYMINC)) - throw new RuntimeException("Argument \"TYMINC\" : Buffers passed to this method must all be either direct or indirect"); - if (TSTART != null && _direct != BufferFactory.isDirect(TSTART)) - throw new RuntimeException("Argument \"TSTART\" : Buffers passed to this method must all be either direct or indirect"); - if (TSTOP != null && _direct != BufferFactory.isDirect(TSTOP)) - throw new RuntimeException("Argument \"TSTOP\" : Buffers passed to this method must all be either direct or indirect"); - if (TSRAD != null && _direct != BufferFactory.isDirect(TSRAD)) - throw new RuntimeException("Argument \"TSRAD\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - solax0(JULDAY, BufferFactory.getDirectBufferByteOffset(JULDAY), MONTH, BufferFactory.getDirectBufferByteOffset(MONTH), SLAT, BufferFactory.getDirectBufferByteOffset(SLAT), TYMINC, BufferFactory.getDirectBufferByteOffset(TYMINC), TSTART, BufferFactory.getDirectBufferByteOffset(TSTART), TSTOP, BufferFactory.getDirectBufferByteOffset(TSTOP), TSRAD, BufferFactory.getDirectBufferByteOffset(TSRAD)); - } else { - solax1(BufferFactory.getArray(JULDAY), BufferFactory.getIndirectBufferByteOffset(JULDAY), BufferFactory.getArray(MONTH), BufferFactory.getIndirectBufferByteOffset(MONTH), BufferFactory.getArray(SLAT), BufferFactory.getIndirectBufferByteOffset(SLAT), BufferFactory.getArray(TYMINC), BufferFactory.getIndirectBufferByteOffset(TYMINC), BufferFactory.getArray(TSTART), BufferFactory.getIndirectBufferByteOffset(TSTART), BufferFactory.getArray(TSTOP), BufferFactory.getIndirectBufferByteOffset(TSTOP), BufferFactory.getArray(TSRAD), BufferFactory.getIndirectBufferByteOffset(TSRAD)); - } - } - - /** Entry point to C language function:
void solax(int * JULDAY, int * MONTH, float * SLAT, int * TYMINC, int * TSTART, int * TSTOP, float * TSRAD); */ - private static native void solax0(Object JULDAY, int JULDAY_byte_offset, Object MONTH, int MONTH_byte_offset, Object SLAT, int SLAT_byte_offset, Object TYMINC, int TYMINC_byte_offset, Object TSTART, int TSTART_byte_offset, Object TSTOP, int TSTOP_byte_offset, Object TSRAD, int TSRAD_byte_offset); - - /** Entry point to C language function:
void solax(int * JULDAY, int * MONTH, float * SLAT, int * TYMINC, int * TSTART, int * TSTOP, float * TSRAD); */ - private static native void solax1(Object JULDAY, int JULDAY_byte_offset, Object MONTH, int MONTH_byte_offset, Object SLAT, int SLAT_byte_offset, Object TYMINC, int TYMINC_byte_offset, Object TSTART, int TSTART_byte_offset, Object TSTOP, int TSTOP_byte_offset, Object TSRAD, int TSRAD_byte_offset); - - /** Interface to C language function:
void solax(int * JULDAY, int * MONTH, float * SLAT, int * TYMINC, int * TSTART, int * TSTOP, float * TSRAD); */ - public static void solax(int[] JULDAY, int JULDAY_offset, int[] MONTH, int MONTH_offset, float[] SLAT, int SLAT_offset, int[] TYMINC, int TYMINC_offset, int[] TSTART, int TSTART_offset, int[] TSTOP, int TSTOP_offset, float[] TSRAD, int TSRAD_offset) - { - if(JULDAY != null && JULDAY.length <= JULDAY_offset) - throw new RuntimeException("array offset argument \"JULDAY_offset\" (" + JULDAY_offset + ") equals or exceeds array length (" + JULDAY.length + ")"); - if(MONTH != null && MONTH.length <= MONTH_offset) - throw new RuntimeException("array offset argument \"MONTH_offset\" (" + MONTH_offset + ") equals or exceeds array length (" + MONTH.length + ")"); - if(SLAT != null && SLAT.length <= SLAT_offset) - throw new RuntimeException("array offset argument \"SLAT_offset\" (" + SLAT_offset + ") equals or exceeds array length (" + SLAT.length + ")"); - if(TYMINC != null && TYMINC.length <= TYMINC_offset) - throw new RuntimeException("array offset argument \"TYMINC_offset\" (" + TYMINC_offset + ") equals or exceeds array length (" + TYMINC.length + ")"); - if(TSTART != null && TSTART.length <= TSTART_offset) - throw new RuntimeException("array offset argument \"TSTART_offset\" (" + TSTART_offset + ") equals or exceeds array length (" + TSTART.length + ")"); - if(TSTOP != null && TSTOP.length <= TSTOP_offset) - throw new RuntimeException("array offset argument \"TSTOP_offset\" (" + TSTOP_offset + ") equals or exceeds array length (" + TSTOP.length + ")"); - if(TSRAD != null && TSRAD.length <= TSRAD_offset) - throw new RuntimeException("array offset argument \"TSRAD_offset\" (" + TSRAD_offset + ") equals or exceeds array length (" + TSRAD.length + ")"); - solax1(JULDAY, BufferFactory.SIZEOF_INT * JULDAY_offset, MONTH, BufferFactory.SIZEOF_INT * MONTH_offset, SLAT, BufferFactory.SIZEOF_FLOAT * SLAT_offset, TYMINC, BufferFactory.SIZEOF_INT * TYMINC_offset, TSTART, BufferFactory.SIZEOF_INT * TSTART_offset, TSTOP, BufferFactory.SIZEOF_INT * TSTOP_offset, TSRAD, BufferFactory.SIZEOF_FLOAT * TSRAD_offset); - - } - - /** Interface to C language function:
void spechum(float * p, float * t, float * rh, int * mni, int * ni, int * nj, float * q); */ - public static void spechum(java.nio.FloatBuffer p, java.nio.FloatBuffer t, java.nio.FloatBuffer rh, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj, java.nio.FloatBuffer q) - { - boolean _direct = BufferFactory.isDirect(p); - if (t != null && _direct != BufferFactory.isDirect(t)) - throw new RuntimeException("Argument \"t\" : Buffers passed to this method must all be either direct or indirect"); - if (rh != null && _direct != BufferFactory.isDirect(rh)) - throw new RuntimeException("Argument \"rh\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (q != null && _direct != BufferFactory.isDirect(q)) - throw new RuntimeException("Argument \"q\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - spechum0(p, BufferFactory.getDirectBufferByteOffset(p), t, BufferFactory.getDirectBufferByteOffset(t), rh, BufferFactory.getDirectBufferByteOffset(rh), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj), q, BufferFactory.getDirectBufferByteOffset(q)); - } else { - spechum1(BufferFactory.getArray(p), BufferFactory.getIndirectBufferByteOffset(p), BufferFactory.getArray(t), BufferFactory.getIndirectBufferByteOffset(t), BufferFactory.getArray(rh), BufferFactory.getIndirectBufferByteOffset(rh), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj), BufferFactory.getArray(q), BufferFactory.getIndirectBufferByteOffset(q)); - } - } - - /** Entry point to C language function:
void spechum(float * p, float * t, float * rh, int * mni, int * ni, int * nj, float * q); */ - private static native void spechum0(Object p, int p_byte_offset, Object t, int t_byte_offset, Object rh, int rh_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object q, int q_byte_offset); - - /** Entry point to C language function:
void spechum(float * p, float * t, float * rh, int * mni, int * ni, int * nj, float * q); */ - private static native void spechum1(Object p, int p_byte_offset, Object t, int t_byte_offset, Object rh, int rh_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object q, int q_byte_offset); - - /** Interface to C language function:
void spechum(float * p, float * t, float * rh, int * mni, int * ni, int * nj, float * q); */ - public static void spechum(float[] p, int p_offset, float[] t, int t_offset, float[] rh, int rh_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset, float[] q, int q_offset) - { - if(p != null && p.length <= p_offset) - throw new RuntimeException("array offset argument \"p_offset\" (" + p_offset + ") equals or exceeds array length (" + p.length + ")"); - if(t != null && t.length <= t_offset) - throw new RuntimeException("array offset argument \"t_offset\" (" + t_offset + ") equals or exceeds array length (" + t.length + ")"); - if(rh != null && rh.length <= rh_offset) - throw new RuntimeException("array offset argument \"rh_offset\" (" + rh_offset + ") equals or exceeds array length (" + rh.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - if(q != null && q.length <= q_offset) - throw new RuntimeException("array offset argument \"q_offset\" (" + q_offset + ") equals or exceeds array length (" + q.length + ")"); - spechum1(p, BufferFactory.SIZEOF_FLOAT * p_offset, t, BufferFactory.SIZEOF_FLOAT * t_offset, rh, BufferFactory.SIZEOF_FLOAT * rh_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset, q, BufferFactory.SIZEOF_FLOAT * q_offset); - - } - - /** Interface to C language function:
void spechum2(float * p, float * td, int * mni, int * ni, int * nj, float * q); */ - public static void spechum2(java.nio.FloatBuffer p, java.nio.FloatBuffer td, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj, java.nio.FloatBuffer q) - { - boolean _direct = BufferFactory.isDirect(p); - if (td != null && _direct != BufferFactory.isDirect(td)) - throw new RuntimeException("Argument \"td\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (q != null && _direct != BufferFactory.isDirect(q)) - throw new RuntimeException("Argument \"q\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - spechum20(p, BufferFactory.getDirectBufferByteOffset(p), td, BufferFactory.getDirectBufferByteOffset(td), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj), q, BufferFactory.getDirectBufferByteOffset(q)); - } else { - spechum21(BufferFactory.getArray(p), BufferFactory.getIndirectBufferByteOffset(p), BufferFactory.getArray(td), BufferFactory.getIndirectBufferByteOffset(td), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj), BufferFactory.getArray(q), BufferFactory.getIndirectBufferByteOffset(q)); - } - } - - /** Entry point to C language function:
void spechum2(float * p, float * td, int * mni, int * ni, int * nj, float * q); */ - private static native void spechum20(Object p, int p_byte_offset, Object td, int td_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object q, int q_byte_offset); - - /** Entry point to C language function:
void spechum2(float * p, float * td, int * mni, int * ni, int * nj, float * q); */ - private static native void spechum21(Object p, int p_byte_offset, Object td, int td_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object q, int q_byte_offset); - - /** Interface to C language function:
void spechum2(float * p, float * td, int * mni, int * ni, int * nj, float * q); */ - public static void spechum2(float[] p, int p_offset, float[] td, int td_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset, float[] q, int q_offset) - { - if(p != null && p.length <= p_offset) - throw new RuntimeException("array offset argument \"p_offset\" (" + p_offset + ") equals or exceeds array length (" + p.length + ")"); - if(td != null && td.length <= td_offset) - throw new RuntimeException("array offset argument \"td_offset\" (" + td_offset + ") equals or exceeds array length (" + td.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - if(q != null && q.length <= q_offset) - throw new RuntimeException("array offset argument \"q_offset\" (" + q_offset + ") equals or exceeds array length (" + q.length + ")"); - spechum21(p, BufferFactory.SIZEOF_FLOAT * p_offset, td, BufferFactory.SIZEOF_FLOAT * td_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset, q, BufferFactory.SIZEOF_FLOAT * q_offset); - - } - - /** Interface to C language function:
void strmpak(const float * U, const float * V, int * work, const int * mnx, const int * nx, const int * ny, const float * asize, const float * xpoints, const float * ypoints, const int * npoints, const float * minspc, const float * maxspc, const float * badlo, const float * badhi); */ - public static void strmpak(java.nio.FloatBuffer U, java.nio.FloatBuffer V, java.nio.IntBuffer work, java.nio.IntBuffer mnx, java.nio.IntBuffer nx, java.nio.IntBuffer ny, java.nio.FloatBuffer asize, java.nio.FloatBuffer xpoints, java.nio.FloatBuffer ypoints, java.nio.IntBuffer npoints, java.nio.FloatBuffer minspc, java.nio.FloatBuffer maxspc, java.nio.FloatBuffer badlo, java.nio.FloatBuffer badhi) - { - boolean _direct = BufferFactory.isDirect(U); - if (V != null && _direct != BufferFactory.isDirect(V)) - throw new RuntimeException("Argument \"V\" : Buffers passed to this method must all be either direct or indirect"); - if (work != null && _direct != BufferFactory.isDirect(work)) - throw new RuntimeException("Argument \"work\" : Buffers passed to this method must all be either direct or indirect"); - if (mnx != null && _direct != BufferFactory.isDirect(mnx)) - throw new RuntimeException("Argument \"mnx\" : Buffers passed to this method must all be either direct or indirect"); - if (nx != null && _direct != BufferFactory.isDirect(nx)) - throw new RuntimeException("Argument \"nx\" : Buffers passed to this method must all be either direct or indirect"); - if (ny != null && _direct != BufferFactory.isDirect(ny)) - throw new RuntimeException("Argument \"ny\" : Buffers passed to this method must all be either direct or indirect"); - if (asize != null && _direct != BufferFactory.isDirect(asize)) - throw new RuntimeException("Argument \"asize\" : Buffers passed to this method must all be either direct or indirect"); - if (xpoints != null && _direct != BufferFactory.isDirect(xpoints)) - throw new RuntimeException("Argument \"xpoints\" : Buffers passed to this method must all be either direct or indirect"); - if (ypoints != null && _direct != BufferFactory.isDirect(ypoints)) - throw new RuntimeException("Argument \"ypoints\" : Buffers passed to this method must all be either direct or indirect"); - if (npoints != null && _direct != BufferFactory.isDirect(npoints)) - throw new RuntimeException("Argument \"npoints\" : Buffers passed to this method must all be either direct or indirect"); - if (minspc != null && _direct != BufferFactory.isDirect(minspc)) - throw new RuntimeException("Argument \"minspc\" : Buffers passed to this method must all be either direct or indirect"); - if (maxspc != null && _direct != BufferFactory.isDirect(maxspc)) - throw new RuntimeException("Argument \"maxspc\" : Buffers passed to this method must all be either direct or indirect"); - if (badlo != null && _direct != BufferFactory.isDirect(badlo)) - throw new RuntimeException("Argument \"badlo\" : Buffers passed to this method must all be either direct or indirect"); - if (badhi != null && _direct != BufferFactory.isDirect(badhi)) - throw new RuntimeException("Argument \"badhi\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - strmpak0(U, BufferFactory.getDirectBufferByteOffset(U), V, BufferFactory.getDirectBufferByteOffset(V), work, BufferFactory.getDirectBufferByteOffset(work), mnx, BufferFactory.getDirectBufferByteOffset(mnx), nx, BufferFactory.getDirectBufferByteOffset(nx), ny, BufferFactory.getDirectBufferByteOffset(ny), asize, BufferFactory.getDirectBufferByteOffset(asize), xpoints, BufferFactory.getDirectBufferByteOffset(xpoints), ypoints, BufferFactory.getDirectBufferByteOffset(ypoints), npoints, BufferFactory.getDirectBufferByteOffset(npoints), minspc, BufferFactory.getDirectBufferByteOffset(minspc), maxspc, BufferFactory.getDirectBufferByteOffset(maxspc), badlo, BufferFactory.getDirectBufferByteOffset(badlo), badhi, BufferFactory.getDirectBufferByteOffset(badhi)); - } else { - strmpak1(BufferFactory.getArray(U), BufferFactory.getIndirectBufferByteOffset(U), BufferFactory.getArray(V), BufferFactory.getIndirectBufferByteOffset(V), BufferFactory.getArray(work), BufferFactory.getIndirectBufferByteOffset(work), BufferFactory.getArray(mnx), BufferFactory.getIndirectBufferByteOffset(mnx), BufferFactory.getArray(nx), BufferFactory.getIndirectBufferByteOffset(nx), BufferFactory.getArray(ny), BufferFactory.getIndirectBufferByteOffset(ny), BufferFactory.getArray(asize), BufferFactory.getIndirectBufferByteOffset(asize), BufferFactory.getArray(xpoints), BufferFactory.getIndirectBufferByteOffset(xpoints), BufferFactory.getArray(ypoints), BufferFactory.getIndirectBufferByteOffset(ypoints), BufferFactory.getArray(npoints), BufferFactory.getIndirectBufferByteOffset(npoints), BufferFactory.getArray(minspc), BufferFactory.getIndirectBufferByteOffset(minspc), BufferFactory.getArray(maxspc), BufferFactory.getIndirectBufferByteOffset(maxspc), BufferFactory.getArray(badlo), BufferFactory.getIndirectBufferByteOffset(badlo), BufferFactory.getArray(badhi), BufferFactory.getIndirectBufferByteOffset(badhi)); - } - } - - /** Entry point to C language function:
void strmpak(const float * U, const float * V, int * work, const int * mnx, const int * nx, const int * ny, const float * asize, const float * xpoints, const float * ypoints, const int * npoints, const float * minspc, const float * maxspc, const float * badlo, const float * badhi); */ - private static native void strmpak0(Object U, int U_byte_offset, Object V, int V_byte_offset, Object work, int work_byte_offset, Object mnx, int mnx_byte_offset, Object nx, int nx_byte_offset, Object ny, int ny_byte_offset, Object asize, int asize_byte_offset, Object xpoints, int xpoints_byte_offset, Object ypoints, int ypoints_byte_offset, Object npoints, int npoints_byte_offset, Object minspc, int minspc_byte_offset, Object maxspc, int maxspc_byte_offset, Object badlo, int badlo_byte_offset, Object badhi, int badhi_byte_offset); - - /** Entry point to C language function:
void strmpak(const float * U, const float * V, int * work, const int * mnx, const int * nx, const int * ny, const float * asize, const float * xpoints, const float * ypoints, const int * npoints, const float * minspc, const float * maxspc, const float * badlo, const float * badhi); */ - private static native void strmpak1(Object U, int U_byte_offset, Object V, int V_byte_offset, Object work, int work_byte_offset, Object mnx, int mnx_byte_offset, Object nx, int nx_byte_offset, Object ny, int ny_byte_offset, Object asize, int asize_byte_offset, Object xpoints, int xpoints_byte_offset, Object ypoints, int ypoints_byte_offset, Object npoints, int npoints_byte_offset, Object minspc, int minspc_byte_offset, Object maxspc, int maxspc_byte_offset, Object badlo, int badlo_byte_offset, Object badhi, int badhi_byte_offset); - - /** Interface to C language function:
void strmpak(const float * U, const float * V, int * work, const int * mnx, const int * nx, const int * ny, const float * asize, const float * xpoints, const float * ypoints, const int * npoints, const float * minspc, const float * maxspc, const float * badlo, const float * badhi); */ - public static void strmpak(float[] U, int U_offset, float[] V, int V_offset, int[] work, int work_offset, int[] mnx, int mnx_offset, int[] nx, int nx_offset, int[] ny, int ny_offset, float[] asize, int asize_offset, float[] xpoints, int xpoints_offset, float[] ypoints, int ypoints_offset, int[] npoints, int npoints_offset, float[] minspc, int minspc_offset, float[] maxspc, int maxspc_offset, float[] badlo, int badlo_offset, float[] badhi, int badhi_offset) - { - if(U != null && U.length <= U_offset) - throw new RuntimeException("array offset argument \"U_offset\" (" + U_offset + ") equals or exceeds array length (" + U.length + ")"); - if(V != null && V.length <= V_offset) - throw new RuntimeException("array offset argument \"V_offset\" (" + V_offset + ") equals or exceeds array length (" + V.length + ")"); - if(work != null && work.length <= work_offset) - throw new RuntimeException("array offset argument \"work_offset\" (" + work_offset + ") equals or exceeds array length (" + work.length + ")"); - if(mnx != null && mnx.length <= mnx_offset) - throw new RuntimeException("array offset argument \"mnx_offset\" (" + mnx_offset + ") equals or exceeds array length (" + mnx.length + ")"); - if(nx != null && nx.length <= nx_offset) - throw new RuntimeException("array offset argument \"nx_offset\" (" + nx_offset + ") equals or exceeds array length (" + nx.length + ")"); - if(ny != null && ny.length <= ny_offset) - throw new RuntimeException("array offset argument \"ny_offset\" (" + ny_offset + ") equals or exceeds array length (" + ny.length + ")"); - if(asize != null && asize.length <= asize_offset) - throw new RuntimeException("array offset argument \"asize_offset\" (" + asize_offset + ") equals or exceeds array length (" + asize.length + ")"); - if(xpoints != null && xpoints.length <= xpoints_offset) - throw new RuntimeException("array offset argument \"xpoints_offset\" (" + xpoints_offset + ") equals or exceeds array length (" + xpoints.length + ")"); - if(ypoints != null && ypoints.length <= ypoints_offset) - throw new RuntimeException("array offset argument \"ypoints_offset\" (" + ypoints_offset + ") equals or exceeds array length (" + ypoints.length + ")"); - if(npoints != null && npoints.length <= npoints_offset) - throw new RuntimeException("array offset argument \"npoints_offset\" (" + npoints_offset + ") equals or exceeds array length (" + npoints.length + ")"); - if(minspc != null && minspc.length <= minspc_offset) - throw new RuntimeException("array offset argument \"minspc_offset\" (" + minspc_offset + ") equals or exceeds array length (" + minspc.length + ")"); - if(maxspc != null && maxspc.length <= maxspc_offset) - throw new RuntimeException("array offset argument \"maxspc_offset\" (" + maxspc_offset + ") equals or exceeds array length (" + maxspc.length + ")"); - if(badlo != null && badlo.length <= badlo_offset) - throw new RuntimeException("array offset argument \"badlo_offset\" (" + badlo_offset + ") equals or exceeds array length (" + badlo.length + ")"); - if(badhi != null && badhi.length <= badhi_offset) - throw new RuntimeException("array offset argument \"badhi_offset\" (" + badhi_offset + ") equals or exceeds array length (" + badhi.length + ")"); - strmpak1(U, BufferFactory.SIZEOF_FLOAT * U_offset, V, BufferFactory.SIZEOF_FLOAT * V_offset, work, BufferFactory.SIZEOF_INT * work_offset, mnx, BufferFactory.SIZEOF_INT * mnx_offset, nx, BufferFactory.SIZEOF_INT * nx_offset, ny, BufferFactory.SIZEOF_INT * ny_offset, asize, BufferFactory.SIZEOF_FLOAT * asize_offset, xpoints, BufferFactory.SIZEOF_FLOAT * xpoints_offset, ypoints, BufferFactory.SIZEOF_FLOAT * ypoints_offset, npoints, BufferFactory.SIZEOF_INT * npoints_offset, minspc, BufferFactory.SIZEOF_FLOAT * minspc_offset, maxspc, BufferFactory.SIZEOF_FLOAT * maxspc_offset, badlo, BufferFactory.SIZEOF_FLOAT * badlo_offset, badhi, BufferFactory.SIZEOF_FLOAT * badhi_offset); - - } - - /** Interface to C language function:
void strmsmth(float * smoothness, int * npass); */ - public static void strmsmth(java.nio.FloatBuffer smoothness, java.nio.IntBuffer npass) - { - boolean _direct = BufferFactory.isDirect(smoothness); - if (npass != null && _direct != BufferFactory.isDirect(npass)) - throw new RuntimeException("Argument \"npass\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - strmsmth0(smoothness, BufferFactory.getDirectBufferByteOffset(smoothness), npass, BufferFactory.getDirectBufferByteOffset(npass)); - } else { - strmsmth1(BufferFactory.getArray(smoothness), BufferFactory.getIndirectBufferByteOffset(smoothness), BufferFactory.getArray(npass), BufferFactory.getIndirectBufferByteOffset(npass)); - } - } - - /** Entry point to C language function:
void strmsmth(float * smoothness, int * npass); */ - private static native void strmsmth0(Object smoothness, int smoothness_byte_offset, Object npass, int npass_byte_offset); - - /** Entry point to C language function:
void strmsmth(float * smoothness, int * npass); */ - private static native void strmsmth1(Object smoothness, int smoothness_byte_offset, Object npass, int npass_byte_offset); - - /** Interface to C language function:
void strmsmth(float * smoothness, int * npass); */ - public static void strmsmth(float[] smoothness, int smoothness_offset, int[] npass, int npass_offset) - { - if(smoothness != null && smoothness.length <= smoothness_offset) - throw new RuntimeException("array offset argument \"smoothness_offset\" (" + smoothness_offset + ") equals or exceeds array length (" + smoothness.length + ")"); - if(npass != null && npass.length <= npass_offset) - throw new RuntimeException("array offset argument \"npass_offset\" (" + npass_offset + ") equals or exceeds array length (" + npass.length + ")"); - strmsmth1(smoothness, BufferFactory.SIZEOF_FLOAT * smoothness_offset, npass, BufferFactory.SIZEOF_INT * npass_offset); - - } - - /** Interface to C language function:
void sub_aray(float * inp, float * b, float * result, int * mni, int * ni, int * nj); */ - public static void sub_aray(java.nio.FloatBuffer inp, java.nio.FloatBuffer b, java.nio.FloatBuffer result, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj) - { - boolean _direct = BufferFactory.isDirect(inp); - if (b != null && _direct != BufferFactory.isDirect(b)) - throw new RuntimeException("Argument \"b\" : Buffers passed to this method must all be either direct or indirect"); - if (result != null && _direct != BufferFactory.isDirect(result)) - throw new RuntimeException("Argument \"result\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - sub_aray0(inp, BufferFactory.getDirectBufferByteOffset(inp), b, BufferFactory.getDirectBufferByteOffset(b), result, BufferFactory.getDirectBufferByteOffset(result), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj)); - } else { - sub_aray1(BufferFactory.getArray(inp), BufferFactory.getIndirectBufferByteOffset(inp), BufferFactory.getArray(b), BufferFactory.getIndirectBufferByteOffset(b), BufferFactory.getArray(result), BufferFactory.getIndirectBufferByteOffset(result), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj)); - } - } - - /** Entry point to C language function:
void sub_aray(float * inp, float * b, float * result, int * mni, int * ni, int * nj); */ - private static native void sub_aray0(Object inp, int inp_byte_offset, Object b, int b_byte_offset, Object result, int result_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset); - - /** Entry point to C language function:
void sub_aray(float * inp, float * b, float * result, int * mni, int * ni, int * nj); */ - private static native void sub_aray1(Object inp, int inp_byte_offset, Object b, int b_byte_offset, Object result, int result_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset); - - /** Interface to C language function:
void sub_aray(float * inp, float * b, float * result, int * mni, int * ni, int * nj); */ - public static void sub_aray(float[] inp, int inp_offset, float[] b, int b_offset, float[] result, int result_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset) - { - if(inp != null && inp.length <= inp_offset) - throw new RuntimeException("array offset argument \"inp_offset\" (" + inp_offset + ") equals or exceeds array length (" + inp.length + ")"); - if(b != null && b.length <= b_offset) - throw new RuntimeException("array offset argument \"b_offset\" (" + b_offset + ") equals or exceeds array length (" + b.length + ")"); - if(result != null && result.length <= result_offset) - throw new RuntimeException("array offset argument \"result_offset\" (" + result_offset + ") equals or exceeds array length (" + result.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - sub_aray1(inp, BufferFactory.SIZEOF_FLOAT * inp_offset, b, BufferFactory.SIZEOF_FLOAT * b_offset, result, BufferFactory.SIZEOF_FLOAT * result_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset); - - } - - /** Interface to C language function:
void sweat(float * P, float * T, float * TD, int * NLVLS, float * PW, float * UW, float * VW, int * NW, float * SWIDX); */ - public static void sweat(java.nio.FloatBuffer P, java.nio.FloatBuffer T, java.nio.FloatBuffer TD, java.nio.IntBuffer NLVLS, java.nio.FloatBuffer PW, java.nio.FloatBuffer UW, java.nio.FloatBuffer VW, java.nio.IntBuffer NW, java.nio.FloatBuffer SWIDX) - { - boolean _direct = BufferFactory.isDirect(P); - if (T != null && _direct != BufferFactory.isDirect(T)) - throw new RuntimeException("Argument \"T\" : Buffers passed to this method must all be either direct or indirect"); - if (TD != null && _direct != BufferFactory.isDirect(TD)) - throw new RuntimeException("Argument \"TD\" : Buffers passed to this method must all be either direct or indirect"); - if (NLVLS != null && _direct != BufferFactory.isDirect(NLVLS)) - throw new RuntimeException("Argument \"NLVLS\" : Buffers passed to this method must all be either direct or indirect"); - if (PW != null && _direct != BufferFactory.isDirect(PW)) - throw new RuntimeException("Argument \"PW\" : Buffers passed to this method must all be either direct or indirect"); - if (UW != null && _direct != BufferFactory.isDirect(UW)) - throw new RuntimeException("Argument \"UW\" : Buffers passed to this method must all be either direct or indirect"); - if (VW != null && _direct != BufferFactory.isDirect(VW)) - throw new RuntimeException("Argument \"VW\" : Buffers passed to this method must all be either direct or indirect"); - if (NW != null && _direct != BufferFactory.isDirect(NW)) - throw new RuntimeException("Argument \"NW\" : Buffers passed to this method must all be either direct or indirect"); - if (SWIDX != null && _direct != BufferFactory.isDirect(SWIDX)) - throw new RuntimeException("Argument \"SWIDX\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - sweat0(P, BufferFactory.getDirectBufferByteOffset(P), T, BufferFactory.getDirectBufferByteOffset(T), TD, BufferFactory.getDirectBufferByteOffset(TD), NLVLS, BufferFactory.getDirectBufferByteOffset(NLVLS), PW, BufferFactory.getDirectBufferByteOffset(PW), UW, BufferFactory.getDirectBufferByteOffset(UW), VW, BufferFactory.getDirectBufferByteOffset(VW), NW, BufferFactory.getDirectBufferByteOffset(NW), SWIDX, BufferFactory.getDirectBufferByteOffset(SWIDX)); - } else { - sweat1(BufferFactory.getArray(P), BufferFactory.getIndirectBufferByteOffset(P), BufferFactory.getArray(T), BufferFactory.getIndirectBufferByteOffset(T), BufferFactory.getArray(TD), BufferFactory.getIndirectBufferByteOffset(TD), BufferFactory.getArray(NLVLS), BufferFactory.getIndirectBufferByteOffset(NLVLS), BufferFactory.getArray(PW), BufferFactory.getIndirectBufferByteOffset(PW), BufferFactory.getArray(UW), BufferFactory.getIndirectBufferByteOffset(UW), BufferFactory.getArray(VW), BufferFactory.getIndirectBufferByteOffset(VW), BufferFactory.getArray(NW), BufferFactory.getIndirectBufferByteOffset(NW), BufferFactory.getArray(SWIDX), BufferFactory.getIndirectBufferByteOffset(SWIDX)); - } - } - - /** Entry point to C language function:
void sweat(float * P, float * T, float * TD, int * NLVLS, float * PW, float * UW, float * VW, int * NW, float * SWIDX); */ - private static native void sweat0(Object P, int P_byte_offset, Object T, int T_byte_offset, Object TD, int TD_byte_offset, Object NLVLS, int NLVLS_byte_offset, Object PW, int PW_byte_offset, Object UW, int UW_byte_offset, Object VW, int VW_byte_offset, Object NW, int NW_byte_offset, Object SWIDX, int SWIDX_byte_offset); - - /** Entry point to C language function:
void sweat(float * P, float * T, float * TD, int * NLVLS, float * PW, float * UW, float * VW, int * NW, float * SWIDX); */ - private static native void sweat1(Object P, int P_byte_offset, Object T, int T_byte_offset, Object TD, int TD_byte_offset, Object NLVLS, int NLVLS_byte_offset, Object PW, int PW_byte_offset, Object UW, int UW_byte_offset, Object VW, int VW_byte_offset, Object NW, int NW_byte_offset, Object SWIDX, int SWIDX_byte_offset); - - /** Interface to C language function:
void sweat(float * P, float * T, float * TD, int * NLVLS, float * PW, float * UW, float * VW, int * NW, float * SWIDX); */ - public static void sweat(float[] P, int P_offset, float[] T, int T_offset, float[] TD, int TD_offset, int[] NLVLS, int NLVLS_offset, float[] PW, int PW_offset, float[] UW, int UW_offset, float[] VW, int VW_offset, int[] NW, int NW_offset, float[] SWIDX, int SWIDX_offset) - { - if(P != null && P.length <= P_offset) - throw new RuntimeException("array offset argument \"P_offset\" (" + P_offset + ") equals or exceeds array length (" + P.length + ")"); - if(T != null && T.length <= T_offset) - throw new RuntimeException("array offset argument \"T_offset\" (" + T_offset + ") equals or exceeds array length (" + T.length + ")"); - if(TD != null && TD.length <= TD_offset) - throw new RuntimeException("array offset argument \"TD_offset\" (" + TD_offset + ") equals or exceeds array length (" + TD.length + ")"); - if(NLVLS != null && NLVLS.length <= NLVLS_offset) - throw new RuntimeException("array offset argument \"NLVLS_offset\" (" + NLVLS_offset + ") equals or exceeds array length (" + NLVLS.length + ")"); - if(PW != null && PW.length <= PW_offset) - throw new RuntimeException("array offset argument \"PW_offset\" (" + PW_offset + ") equals or exceeds array length (" + PW.length + ")"); - if(UW != null && UW.length <= UW_offset) - throw new RuntimeException("array offset argument \"UW_offset\" (" + UW_offset + ") equals or exceeds array length (" + UW.length + ")"); - if(VW != null && VW.length <= VW_offset) - throw new RuntimeException("array offset argument \"VW_offset\" (" + VW_offset + ") equals or exceeds array length (" + VW.length + ")"); - if(NW != null && NW.length <= NW_offset) - throw new RuntimeException("array offset argument \"NW_offset\" (" + NW_offset + ") equals or exceeds array length (" + NW.length + ")"); - if(SWIDX != null && SWIDX.length <= SWIDX_offset) - throw new RuntimeException("array offset argument \"SWIDX_offset\" (" + SWIDX_offset + ") equals or exceeds array length (" + SWIDX.length + ")"); - sweat1(P, BufferFactory.SIZEOF_FLOAT * P_offset, T, BufferFactory.SIZEOF_FLOAT * T_offset, TD, BufferFactory.SIZEOF_FLOAT * TD_offset, NLVLS, BufferFactory.SIZEOF_INT * NLVLS_offset, PW, BufferFactory.SIZEOF_FLOAT * PW_offset, UW, BufferFactory.SIZEOF_FLOAT * UW_offset, VW, BufferFactory.SIZEOF_FLOAT * VW_offset, NW, BufferFactory.SIZEOF_INT * NW_offset, SWIDX, BufferFactory.SIZEOF_FLOAT * SWIDX_offset); - - } - - /** Interface to C language function:
void sweatidx(float * tt, float * td8, float * u8, float * v8, float * u5, float * v5, int * mni, int * ni, int * nj, float * q); */ - public static void sweatidx(java.nio.FloatBuffer tt, java.nio.FloatBuffer td8, java.nio.FloatBuffer u8, java.nio.FloatBuffer v8, java.nio.FloatBuffer u5, java.nio.FloatBuffer v5, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj, java.nio.FloatBuffer q) - { - boolean _direct = BufferFactory.isDirect(tt); - if (td8 != null && _direct != BufferFactory.isDirect(td8)) - throw new RuntimeException("Argument \"td8\" : Buffers passed to this method must all be either direct or indirect"); - if (u8 != null && _direct != BufferFactory.isDirect(u8)) - throw new RuntimeException("Argument \"u8\" : Buffers passed to this method must all be either direct or indirect"); - if (v8 != null && _direct != BufferFactory.isDirect(v8)) - throw new RuntimeException("Argument \"v8\" : Buffers passed to this method must all be either direct or indirect"); - if (u5 != null && _direct != BufferFactory.isDirect(u5)) - throw new RuntimeException("Argument \"u5\" : Buffers passed to this method must all be either direct or indirect"); - if (v5 != null && _direct != BufferFactory.isDirect(v5)) - throw new RuntimeException("Argument \"v5\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (q != null && _direct != BufferFactory.isDirect(q)) - throw new RuntimeException("Argument \"q\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - sweatidx0(tt, BufferFactory.getDirectBufferByteOffset(tt), td8, BufferFactory.getDirectBufferByteOffset(td8), u8, BufferFactory.getDirectBufferByteOffset(u8), v8, BufferFactory.getDirectBufferByteOffset(v8), u5, BufferFactory.getDirectBufferByteOffset(u5), v5, BufferFactory.getDirectBufferByteOffset(v5), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj), q, BufferFactory.getDirectBufferByteOffset(q)); - } else { - sweatidx1(BufferFactory.getArray(tt), BufferFactory.getIndirectBufferByteOffset(tt), BufferFactory.getArray(td8), BufferFactory.getIndirectBufferByteOffset(td8), BufferFactory.getArray(u8), BufferFactory.getIndirectBufferByteOffset(u8), BufferFactory.getArray(v8), BufferFactory.getIndirectBufferByteOffset(v8), BufferFactory.getArray(u5), BufferFactory.getIndirectBufferByteOffset(u5), BufferFactory.getArray(v5), BufferFactory.getIndirectBufferByteOffset(v5), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj), BufferFactory.getArray(q), BufferFactory.getIndirectBufferByteOffset(q)); - } - } - - /** Entry point to C language function:
void sweatidx(float * tt, float * td8, float * u8, float * v8, float * u5, float * v5, int * mni, int * ni, int * nj, float * q); */ - private static native void sweatidx0(Object tt, int tt_byte_offset, Object td8, int td8_byte_offset, Object u8, int u8_byte_offset, Object v8, int v8_byte_offset, Object u5, int u5_byte_offset, Object v5, int v5_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object q, int q_byte_offset); - - /** Entry point to C language function:
void sweatidx(float * tt, float * td8, float * u8, float * v8, float * u5, float * v5, int * mni, int * ni, int * nj, float * q); */ - private static native void sweatidx1(Object tt, int tt_byte_offset, Object td8, int td8_byte_offset, Object u8, int u8_byte_offset, Object v8, int v8_byte_offset, Object u5, int u5_byte_offset, Object v5, int v5_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object q, int q_byte_offset); - - /** Interface to C language function:
void sweatidx(float * tt, float * td8, float * u8, float * v8, float * u5, float * v5, int * mni, int * ni, int * nj, float * q); */ - public static void sweatidx(float[] tt, int tt_offset, float[] td8, int td8_offset, float[] u8, int u8_offset, float[] v8, int v8_offset, float[] u5, int u5_offset, float[] v5, int v5_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset, float[] q, int q_offset) - { - if(tt != null && tt.length <= tt_offset) - throw new RuntimeException("array offset argument \"tt_offset\" (" + tt_offset + ") equals or exceeds array length (" + tt.length + ")"); - if(td8 != null && td8.length <= td8_offset) - throw new RuntimeException("array offset argument \"td8_offset\" (" + td8_offset + ") equals or exceeds array length (" + td8.length + ")"); - if(u8 != null && u8.length <= u8_offset) - throw new RuntimeException("array offset argument \"u8_offset\" (" + u8_offset + ") equals or exceeds array length (" + u8.length + ")"); - if(v8 != null && v8.length <= v8_offset) - throw new RuntimeException("array offset argument \"v8_offset\" (" + v8_offset + ") equals or exceeds array length (" + v8.length + ")"); - if(u5 != null && u5.length <= u5_offset) - throw new RuntimeException("array offset argument \"u5_offset\" (" + u5_offset + ") equals or exceeds array length (" + u5.length + ")"); - if(v5 != null && v5.length <= v5_offset) - throw new RuntimeException("array offset argument \"v5_offset\" (" + v5_offset + ") equals or exceeds array length (" + v5.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - if(q != null && q.length <= q_offset) - throw new RuntimeException("array offset argument \"q_offset\" (" + q_offset + ") equals or exceeds array length (" + q.length + ")"); - sweatidx1(tt, BufferFactory.SIZEOF_FLOAT * tt_offset, td8, BufferFactory.SIZEOF_FLOAT * td8_offset, u8, BufferFactory.SIZEOF_FLOAT * u8_offset, v8, BufferFactory.SIZEOF_FLOAT * v8_offset, u5, BufferFactory.SIZEOF_FLOAT * u5_offset, v5, BufferFactory.SIZEOF_FLOAT * v5_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset, q, BufferFactory.SIZEOF_FLOAT * q_offset); - - } - - /** Interface to C language function:
void temp2theta(float * p, int * aflgp, float * t, int * aflgt, float * theta, int * mni, int * ni, int * nj); */ - public static void temp2theta(java.nio.FloatBuffer p, java.nio.IntBuffer aflgp, java.nio.FloatBuffer t, java.nio.IntBuffer aflgt, java.nio.FloatBuffer theta, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj) - { - boolean _direct = BufferFactory.isDirect(p); - if (aflgp != null && _direct != BufferFactory.isDirect(aflgp)) - throw new RuntimeException("Argument \"aflgp\" : Buffers passed to this method must all be either direct or indirect"); - if (t != null && _direct != BufferFactory.isDirect(t)) - throw new RuntimeException("Argument \"t\" : Buffers passed to this method must all be either direct or indirect"); - if (aflgt != null && _direct != BufferFactory.isDirect(aflgt)) - throw new RuntimeException("Argument \"aflgt\" : Buffers passed to this method must all be either direct or indirect"); - if (theta != null && _direct != BufferFactory.isDirect(theta)) - throw new RuntimeException("Argument \"theta\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - temp2theta0(p, BufferFactory.getDirectBufferByteOffset(p), aflgp, BufferFactory.getDirectBufferByteOffset(aflgp), t, BufferFactory.getDirectBufferByteOffset(t), aflgt, BufferFactory.getDirectBufferByteOffset(aflgt), theta, BufferFactory.getDirectBufferByteOffset(theta), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj)); - } else { - temp2theta1(BufferFactory.getArray(p), BufferFactory.getIndirectBufferByteOffset(p), BufferFactory.getArray(aflgp), BufferFactory.getIndirectBufferByteOffset(aflgp), BufferFactory.getArray(t), BufferFactory.getIndirectBufferByteOffset(t), BufferFactory.getArray(aflgt), BufferFactory.getIndirectBufferByteOffset(aflgt), BufferFactory.getArray(theta), BufferFactory.getIndirectBufferByteOffset(theta), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj)); - } - } - - /** Entry point to C language function:
void temp2theta(float * p, int * aflgp, float * t, int * aflgt, float * theta, int * mni, int * ni, int * nj); */ - private static native void temp2theta0(Object p, int p_byte_offset, Object aflgp, int aflgp_byte_offset, Object t, int t_byte_offset, Object aflgt, int aflgt_byte_offset, Object theta, int theta_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset); - - /** Entry point to C language function:
void temp2theta(float * p, int * aflgp, float * t, int * aflgt, float * theta, int * mni, int * ni, int * nj); */ - private static native void temp2theta1(Object p, int p_byte_offset, Object aflgp, int aflgp_byte_offset, Object t, int t_byte_offset, Object aflgt, int aflgt_byte_offset, Object theta, int theta_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset); - - /** Interface to C language function:
void temp2theta(float * p, int * aflgp, float * t, int * aflgt, float * theta, int * mni, int * ni, int * nj); */ - public static void temp2theta(float[] p, int p_offset, int[] aflgp, int aflgp_offset, float[] t, int t_offset, int[] aflgt, int aflgt_offset, float[] theta, int theta_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset) - { - if(p != null && p.length <= p_offset) - throw new RuntimeException("array offset argument \"p_offset\" (" + p_offset + ") equals or exceeds array length (" + p.length + ")"); - if(aflgp != null && aflgp.length <= aflgp_offset) - throw new RuntimeException("array offset argument \"aflgp_offset\" (" + aflgp_offset + ") equals or exceeds array length (" + aflgp.length + ")"); - if(t != null && t.length <= t_offset) - throw new RuntimeException("array offset argument \"t_offset\" (" + t_offset + ") equals or exceeds array length (" + t.length + ")"); - if(aflgt != null && aflgt.length <= aflgt_offset) - throw new RuntimeException("array offset argument \"aflgt_offset\" (" + aflgt_offset + ") equals or exceeds array length (" + aflgt.length + ")"); - if(theta != null && theta.length <= theta_offset) - throw new RuntimeException("array offset argument \"theta_offset\" (" + theta_offset + ") equals or exceeds array length (" + theta.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - temp2theta1(p, BufferFactory.SIZEOF_FLOAT * p_offset, aflgp, BufferFactory.SIZEOF_INT * aflgp_offset, t, BufferFactory.SIZEOF_FLOAT * t_offset, aflgt, BufferFactory.SIZEOF_INT * aflgt_offset, theta, BufferFactory.SIZEOF_FLOAT * theta_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset); - - } - - /** Interface to C language function:
void temp_mixratio(float * press, float * mixratio, float * tempmr); */ - public static void temp_mixratio(java.nio.FloatBuffer press, java.nio.FloatBuffer mixratio, java.nio.FloatBuffer tempmr) - { - boolean _direct = BufferFactory.isDirect(press); - if (mixratio != null && _direct != BufferFactory.isDirect(mixratio)) - throw new RuntimeException("Argument \"mixratio\" : Buffers passed to this method must all be either direct or indirect"); - if (tempmr != null && _direct != BufferFactory.isDirect(tempmr)) - throw new RuntimeException("Argument \"tempmr\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - temp_mixratio0(press, BufferFactory.getDirectBufferByteOffset(press), mixratio, BufferFactory.getDirectBufferByteOffset(mixratio), tempmr, BufferFactory.getDirectBufferByteOffset(tempmr)); - } else { - temp_mixratio1(BufferFactory.getArray(press), BufferFactory.getIndirectBufferByteOffset(press), BufferFactory.getArray(mixratio), BufferFactory.getIndirectBufferByteOffset(mixratio), BufferFactory.getArray(tempmr), BufferFactory.getIndirectBufferByteOffset(tempmr)); - } - } - - /** Entry point to C language function:
void temp_mixratio(float * press, float * mixratio, float * tempmr); */ - private static native void temp_mixratio0(Object press, int press_byte_offset, Object mixratio, int mixratio_byte_offset, Object tempmr, int tempmr_byte_offset); - - /** Entry point to C language function:
void temp_mixratio(float * press, float * mixratio, float * tempmr); */ - private static native void temp_mixratio1(Object press, int press_byte_offset, Object mixratio, int mixratio_byte_offset, Object tempmr, int tempmr_byte_offset); - - /** Interface to C language function:
void temp_mixratio(float * press, float * mixratio, float * tempmr); */ - public static void temp_mixratio(float[] press, int press_offset, float[] mixratio, int mixratio_offset, float[] tempmr, int tempmr_offset) - { - if(press != null && press.length <= press_offset) - throw new RuntimeException("array offset argument \"press_offset\" (" + press_offset + ") equals or exceeds array length (" + press.length + ")"); - if(mixratio != null && mixratio.length <= mixratio_offset) - throw new RuntimeException("array offset argument \"mixratio_offset\" (" + mixratio_offset + ") equals or exceeds array length (" + mixratio.length + ")"); - if(tempmr != null && tempmr.length <= tempmr_offset) - throw new RuntimeException("array offset argument \"tempmr_offset\" (" + tempmr_offset + ") equals or exceeds array length (" + tempmr.length + ")"); - temp_mixratio1(press, BufferFactory.SIZEOF_FLOAT * press_offset, mixratio, BufferFactory.SIZEOF_FLOAT * mixratio_offset, tempmr, BufferFactory.SIZEOF_FLOAT * tempmr_offset); - - } - - /** Interface to C language function:
float temp_of_te(const float * te, const float * press); */ - public static float temp_of_te(java.nio.FloatBuffer te, java.nio.FloatBuffer press) - { - boolean _direct = BufferFactory.isDirect(te); - if (press != null && _direct != BufferFactory.isDirect(press)) - throw new RuntimeException("Argument \"press\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - return temp_of_te0(te, BufferFactory.getDirectBufferByteOffset(te), press, BufferFactory.getDirectBufferByteOffset(press)); - } else { - return temp_of_te1(BufferFactory.getArray(te), BufferFactory.getIndirectBufferByteOffset(te), BufferFactory.getArray(press), BufferFactory.getIndirectBufferByteOffset(press)); - } - } - - /** Entry point to C language function:
float temp_of_te(const float * te, const float * press); */ - private static native float temp_of_te0(Object te, int te_byte_offset, Object press, int press_byte_offset); - - /** Entry point to C language function:
float temp_of_te(const float * te, const float * press); */ - private static native float temp_of_te1(Object te, int te_byte_offset, Object press, int press_byte_offset); - - /** Interface to C language function:
float temp_of_te(const float * te, const float * press); */ - public static float temp_of_te(float[] te, int te_offset, float[] press, int press_offset) - { - if(te != null && te.length <= te_offset) - throw new RuntimeException("array offset argument \"te_offset\" (" + te_offset + ") equals or exceeds array length (" + te.length + ")"); - if(press != null && press.length <= press_offset) - throw new RuntimeException("array offset argument \"press_offset\" (" + press_offset + ") equals or exceeds array length (" + press.length + ")"); - return temp_of_te1(te, BufferFactory.SIZEOF_FLOAT * te_offset, press, BufferFactory.SIZEOF_FLOAT * press_offset); - - } - - /** Interface to C language function:
void theta2temp(float * p, int * aflgp, float * theta, int * aflgth, float * t, int * mni, int * ni, int * nj); */ - public static void theta2temp(java.nio.FloatBuffer p, java.nio.IntBuffer aflgp, java.nio.FloatBuffer theta, java.nio.IntBuffer aflgth, java.nio.FloatBuffer t, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj) - { - boolean _direct = BufferFactory.isDirect(p); - if (aflgp != null && _direct != BufferFactory.isDirect(aflgp)) - throw new RuntimeException("Argument \"aflgp\" : Buffers passed to this method must all be either direct or indirect"); - if (theta != null && _direct != BufferFactory.isDirect(theta)) - throw new RuntimeException("Argument \"theta\" : Buffers passed to this method must all be either direct or indirect"); - if (aflgth != null && _direct != BufferFactory.isDirect(aflgth)) - throw new RuntimeException("Argument \"aflgth\" : Buffers passed to this method must all be either direct or indirect"); - if (t != null && _direct != BufferFactory.isDirect(t)) - throw new RuntimeException("Argument \"t\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - theta2temp0(p, BufferFactory.getDirectBufferByteOffset(p), aflgp, BufferFactory.getDirectBufferByteOffset(aflgp), theta, BufferFactory.getDirectBufferByteOffset(theta), aflgth, BufferFactory.getDirectBufferByteOffset(aflgth), t, BufferFactory.getDirectBufferByteOffset(t), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj)); - } else { - theta2temp1(BufferFactory.getArray(p), BufferFactory.getIndirectBufferByteOffset(p), BufferFactory.getArray(aflgp), BufferFactory.getIndirectBufferByteOffset(aflgp), BufferFactory.getArray(theta), BufferFactory.getIndirectBufferByteOffset(theta), BufferFactory.getArray(aflgth), BufferFactory.getIndirectBufferByteOffset(aflgth), BufferFactory.getArray(t), BufferFactory.getIndirectBufferByteOffset(t), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj)); - } - } - - /** Entry point to C language function:
void theta2temp(float * p, int * aflgp, float * theta, int * aflgth, float * t, int * mni, int * ni, int * nj); */ - private static native void theta2temp0(Object p, int p_byte_offset, Object aflgp, int aflgp_byte_offset, Object theta, int theta_byte_offset, Object aflgth, int aflgth_byte_offset, Object t, int t_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset); - - /** Entry point to C language function:
void theta2temp(float * p, int * aflgp, float * theta, int * aflgth, float * t, int * mni, int * ni, int * nj); */ - private static native void theta2temp1(Object p, int p_byte_offset, Object aflgp, int aflgp_byte_offset, Object theta, int theta_byte_offset, Object aflgth, int aflgth_byte_offset, Object t, int t_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset); - - /** Interface to C language function:
void theta2temp(float * p, int * aflgp, float * theta, int * aflgth, float * t, int * mni, int * ni, int * nj); */ - public static void theta2temp(float[] p, int p_offset, int[] aflgp, int aflgp_offset, float[] theta, int theta_offset, int[] aflgth, int aflgth_offset, float[] t, int t_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset) - { - if(p != null && p.length <= p_offset) - throw new RuntimeException("array offset argument \"p_offset\" (" + p_offset + ") equals or exceeds array length (" + p.length + ")"); - if(aflgp != null && aflgp.length <= aflgp_offset) - throw new RuntimeException("array offset argument \"aflgp_offset\" (" + aflgp_offset + ") equals or exceeds array length (" + aflgp.length + ")"); - if(theta != null && theta.length <= theta_offset) - throw new RuntimeException("array offset argument \"theta_offset\" (" + theta_offset + ") equals or exceeds array length (" + theta.length + ")"); - if(aflgth != null && aflgth.length <= aflgth_offset) - throw new RuntimeException("array offset argument \"aflgth_offset\" (" + aflgth_offset + ") equals or exceeds array length (" + aflgth.length + ")"); - if(t != null && t.length <= t_offset) - throw new RuntimeException("array offset argument \"t_offset\" (" + t_offset + ") equals or exceeds array length (" + t.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - theta2temp1(p, BufferFactory.SIZEOF_FLOAT * p_offset, aflgp, BufferFactory.SIZEOF_INT * aflgp_offset, theta, BufferFactory.SIZEOF_FLOAT * theta_offset, aflgth, BufferFactory.SIZEOF_INT * aflgth_offset, t, BufferFactory.SIZEOF_FLOAT * t_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset); - - } - - /** Interface to C language function:
float thetawa(float * temp, float * dwpt, float * pres, int * iw, int * ier); */ - public static float thetawa(java.nio.FloatBuffer temp, java.nio.FloatBuffer dwpt, java.nio.FloatBuffer pres, java.nio.IntBuffer iw, java.nio.IntBuffer ier) - { - boolean _direct = BufferFactory.isDirect(temp); - if (dwpt != null && _direct != BufferFactory.isDirect(dwpt)) - throw new RuntimeException("Argument \"dwpt\" : Buffers passed to this method must all be either direct or indirect"); - if (pres != null && _direct != BufferFactory.isDirect(pres)) - throw new RuntimeException("Argument \"pres\" : Buffers passed to this method must all be either direct or indirect"); - if (iw != null && _direct != BufferFactory.isDirect(iw)) - throw new RuntimeException("Argument \"iw\" : Buffers passed to this method must all be either direct or indirect"); - if (ier != null && _direct != BufferFactory.isDirect(ier)) - throw new RuntimeException("Argument \"ier\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - return thetawa0(temp, BufferFactory.getDirectBufferByteOffset(temp), dwpt, BufferFactory.getDirectBufferByteOffset(dwpt), pres, BufferFactory.getDirectBufferByteOffset(pres), iw, BufferFactory.getDirectBufferByteOffset(iw), ier, BufferFactory.getDirectBufferByteOffset(ier)); - } else { - return thetawa1(BufferFactory.getArray(temp), BufferFactory.getIndirectBufferByteOffset(temp), BufferFactory.getArray(dwpt), BufferFactory.getIndirectBufferByteOffset(dwpt), BufferFactory.getArray(pres), BufferFactory.getIndirectBufferByteOffset(pres), BufferFactory.getArray(iw), BufferFactory.getIndirectBufferByteOffset(iw), BufferFactory.getArray(ier), BufferFactory.getIndirectBufferByteOffset(ier)); - } - } - - /** Entry point to C language function:
float thetawa(float * temp, float * dwpt, float * pres, int * iw, int * ier); */ - private static native float thetawa0(Object temp, int temp_byte_offset, Object dwpt, int dwpt_byte_offset, Object pres, int pres_byte_offset, Object iw, int iw_byte_offset, Object ier, int ier_byte_offset); - - /** Entry point to C language function:
float thetawa(float * temp, float * dwpt, float * pres, int * iw, int * ier); */ - private static native float thetawa1(Object temp, int temp_byte_offset, Object dwpt, int dwpt_byte_offset, Object pres, int pres_byte_offset, Object iw, int iw_byte_offset, Object ier, int ier_byte_offset); - - /** Interface to C language function:
float thetawa(float * temp, float * dwpt, float * pres, int * iw, int * ier); */ - public static float thetawa(float[] temp, int temp_offset, float[] dwpt, int dwpt_offset, float[] pres, int pres_offset, int[] iw, int iw_offset, int[] ier, int ier_offset) - { - if(temp != null && temp.length <= temp_offset) - throw new RuntimeException("array offset argument \"temp_offset\" (" + temp_offset + ") equals or exceeds array length (" + temp.length + ")"); - if(dwpt != null && dwpt.length <= dwpt_offset) - throw new RuntimeException("array offset argument \"dwpt_offset\" (" + dwpt_offset + ") equals or exceeds array length (" + dwpt.length + ")"); - if(pres != null && pres.length <= pres_offset) - throw new RuntimeException("array offset argument \"pres_offset\" (" + pres_offset + ") equals or exceeds array length (" + pres.length + ")"); - if(iw != null && iw.length <= iw_offset) - throw new RuntimeException("array offset argument \"iw_offset\" (" + iw_offset + ") equals or exceeds array length (" + iw.length + ")"); - if(ier != null && ier.length <= ier_offset) - throw new RuntimeException("array offset argument \"ier_offset\" (" + ier_offset + ") equals or exceeds array length (" + ier.length + ")"); - return thetawa1(temp, BufferFactory.SIZEOF_FLOAT * temp_offset, dwpt, BufferFactory.SIZEOF_FLOAT * dwpt_offset, pres, BufferFactory.SIZEOF_FLOAT * pres_offset, iw, BufferFactory.SIZEOF_INT * iw_offset, ier, BufferFactory.SIZEOF_INT * ier_offset); - - } - - /** Interface to C language function:
void totals(float * P, float * T, float * TD, int * NLVLS, float * TOTIDX, float * CRSTOT, float * VERTOT); */ - public static void totals(java.nio.FloatBuffer P, java.nio.FloatBuffer T, java.nio.FloatBuffer TD, java.nio.IntBuffer NLVLS, java.nio.FloatBuffer TOTIDX, java.nio.FloatBuffer CRSTOT, java.nio.FloatBuffer VERTOT) - { - boolean _direct = BufferFactory.isDirect(P); - if (T != null && _direct != BufferFactory.isDirect(T)) - throw new RuntimeException("Argument \"T\" : Buffers passed to this method must all be either direct or indirect"); - if (TD != null && _direct != BufferFactory.isDirect(TD)) - throw new RuntimeException("Argument \"TD\" : Buffers passed to this method must all be either direct or indirect"); - if (NLVLS != null && _direct != BufferFactory.isDirect(NLVLS)) - throw new RuntimeException("Argument \"NLVLS\" : Buffers passed to this method must all be either direct or indirect"); - if (TOTIDX != null && _direct != BufferFactory.isDirect(TOTIDX)) - throw new RuntimeException("Argument \"TOTIDX\" : Buffers passed to this method must all be either direct or indirect"); - if (CRSTOT != null && _direct != BufferFactory.isDirect(CRSTOT)) - throw new RuntimeException("Argument \"CRSTOT\" : Buffers passed to this method must all be either direct or indirect"); - if (VERTOT != null && _direct != BufferFactory.isDirect(VERTOT)) - throw new RuntimeException("Argument \"VERTOT\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - totals0(P, BufferFactory.getDirectBufferByteOffset(P), T, BufferFactory.getDirectBufferByteOffset(T), TD, BufferFactory.getDirectBufferByteOffset(TD), NLVLS, BufferFactory.getDirectBufferByteOffset(NLVLS), TOTIDX, BufferFactory.getDirectBufferByteOffset(TOTIDX), CRSTOT, BufferFactory.getDirectBufferByteOffset(CRSTOT), VERTOT, BufferFactory.getDirectBufferByteOffset(VERTOT)); - } else { - totals1(BufferFactory.getArray(P), BufferFactory.getIndirectBufferByteOffset(P), BufferFactory.getArray(T), BufferFactory.getIndirectBufferByteOffset(T), BufferFactory.getArray(TD), BufferFactory.getIndirectBufferByteOffset(TD), BufferFactory.getArray(NLVLS), BufferFactory.getIndirectBufferByteOffset(NLVLS), BufferFactory.getArray(TOTIDX), BufferFactory.getIndirectBufferByteOffset(TOTIDX), BufferFactory.getArray(CRSTOT), BufferFactory.getIndirectBufferByteOffset(CRSTOT), BufferFactory.getArray(VERTOT), BufferFactory.getIndirectBufferByteOffset(VERTOT)); - } - } - - /** Entry point to C language function:
void totals(float * P, float * T, float * TD, int * NLVLS, float * TOTIDX, float * CRSTOT, float * VERTOT); */ - private static native void totals0(Object P, int P_byte_offset, Object T, int T_byte_offset, Object TD, int TD_byte_offset, Object NLVLS, int NLVLS_byte_offset, Object TOTIDX, int TOTIDX_byte_offset, Object CRSTOT, int CRSTOT_byte_offset, Object VERTOT, int VERTOT_byte_offset); - - /** Entry point to C language function:
void totals(float * P, float * T, float * TD, int * NLVLS, float * TOTIDX, float * CRSTOT, float * VERTOT); */ - private static native void totals1(Object P, int P_byte_offset, Object T, int T_byte_offset, Object TD, int TD_byte_offset, Object NLVLS, int NLVLS_byte_offset, Object TOTIDX, int TOTIDX_byte_offset, Object CRSTOT, int CRSTOT_byte_offset, Object VERTOT, int VERTOT_byte_offset); - - /** Interface to C language function:
void totals(float * P, float * T, float * TD, int * NLVLS, float * TOTIDX, float * CRSTOT, float * VERTOT); */ - public static void totals(float[] P, int P_offset, float[] T, int T_offset, float[] TD, int TD_offset, int[] NLVLS, int NLVLS_offset, float[] TOTIDX, int TOTIDX_offset, float[] CRSTOT, int CRSTOT_offset, float[] VERTOT, int VERTOT_offset) - { - if(P != null && P.length <= P_offset) - throw new RuntimeException("array offset argument \"P_offset\" (" + P_offset + ") equals or exceeds array length (" + P.length + ")"); - if(T != null && T.length <= T_offset) - throw new RuntimeException("array offset argument \"T_offset\" (" + T_offset + ") equals or exceeds array length (" + T.length + ")"); - if(TD != null && TD.length <= TD_offset) - throw new RuntimeException("array offset argument \"TD_offset\" (" + TD_offset + ") equals or exceeds array length (" + TD.length + ")"); - if(NLVLS != null && NLVLS.length <= NLVLS_offset) - throw new RuntimeException("array offset argument \"NLVLS_offset\" (" + NLVLS_offset + ") equals or exceeds array length (" + NLVLS.length + ")"); - if(TOTIDX != null && TOTIDX.length <= TOTIDX_offset) - throw new RuntimeException("array offset argument \"TOTIDX_offset\" (" + TOTIDX_offset + ") equals or exceeds array length (" + TOTIDX.length + ")"); - if(CRSTOT != null && CRSTOT.length <= CRSTOT_offset) - throw new RuntimeException("array offset argument \"CRSTOT_offset\" (" + CRSTOT_offset + ") equals or exceeds array length (" + CRSTOT.length + ")"); - if(VERTOT != null && VERTOT.length <= VERTOT_offset) - throw new RuntimeException("array offset argument \"VERTOT_offset\" (" + VERTOT_offset + ") equals or exceeds array length (" + VERTOT.length + ")"); - totals1(P, BufferFactory.SIZEOF_FLOAT * P_offset, T, BufferFactory.SIZEOF_FLOAT * T_offset, TD, BufferFactory.SIZEOF_FLOAT * TD_offset, NLVLS, BufferFactory.SIZEOF_INT * NLVLS_offset, TOTIDX, BufferFactory.SIZEOF_FLOAT * TOTIDX_offset, CRSTOT, BufferFactory.SIZEOF_FLOAT * CRSTOT_offset, VERTOT, BufferFactory.SIZEOF_FLOAT * VERTOT_offset); - - } - - /** Interface to C language function:
void tplcl(float * tk, float * td, float * pinit, float * tl, float * pl, int * ier); */ - public static void tplcl(java.nio.FloatBuffer tk, java.nio.FloatBuffer td, java.nio.FloatBuffer pinit, java.nio.FloatBuffer tl, java.nio.FloatBuffer pl, java.nio.IntBuffer ier) - { - boolean _direct = BufferFactory.isDirect(tk); - if (td != null && _direct != BufferFactory.isDirect(td)) - throw new RuntimeException("Argument \"td\" : Buffers passed to this method must all be either direct or indirect"); - if (pinit != null && _direct != BufferFactory.isDirect(pinit)) - throw new RuntimeException("Argument \"pinit\" : Buffers passed to this method must all be either direct or indirect"); - if (tl != null && _direct != BufferFactory.isDirect(tl)) - throw new RuntimeException("Argument \"tl\" : Buffers passed to this method must all be either direct or indirect"); - if (pl != null && _direct != BufferFactory.isDirect(pl)) - throw new RuntimeException("Argument \"pl\" : Buffers passed to this method must all be either direct or indirect"); - if (ier != null && _direct != BufferFactory.isDirect(ier)) - throw new RuntimeException("Argument \"ier\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - tplcl0(tk, BufferFactory.getDirectBufferByteOffset(tk), td, BufferFactory.getDirectBufferByteOffset(td), pinit, BufferFactory.getDirectBufferByteOffset(pinit), tl, BufferFactory.getDirectBufferByteOffset(tl), pl, BufferFactory.getDirectBufferByteOffset(pl), ier, BufferFactory.getDirectBufferByteOffset(ier)); - } else { - tplcl1(BufferFactory.getArray(tk), BufferFactory.getIndirectBufferByteOffset(tk), BufferFactory.getArray(td), BufferFactory.getIndirectBufferByteOffset(td), BufferFactory.getArray(pinit), BufferFactory.getIndirectBufferByteOffset(pinit), BufferFactory.getArray(tl), BufferFactory.getIndirectBufferByteOffset(tl), BufferFactory.getArray(pl), BufferFactory.getIndirectBufferByteOffset(pl), BufferFactory.getArray(ier), BufferFactory.getIndirectBufferByteOffset(ier)); - } - } - - /** Entry point to C language function:
void tplcl(float * tk, float * td, float * pinit, float * tl, float * pl, int * ier); */ - private static native void tplcl0(Object tk, int tk_byte_offset, Object td, int td_byte_offset, Object pinit, int pinit_byte_offset, Object tl, int tl_byte_offset, Object pl, int pl_byte_offset, Object ier, int ier_byte_offset); - - /** Entry point to C language function:
void tplcl(float * tk, float * td, float * pinit, float * tl, float * pl, int * ier); */ - private static native void tplcl1(Object tk, int tk_byte_offset, Object td, int td_byte_offset, Object pinit, int pinit_byte_offset, Object tl, int tl_byte_offset, Object pl, int pl_byte_offset, Object ier, int ier_byte_offset); - - /** Interface to C language function:
void tplcl(float * tk, float * td, float * pinit, float * tl, float * pl, int * ier); */ - public static void tplcl(float[] tk, int tk_offset, float[] td, int td_offset, float[] pinit, int pinit_offset, float[] tl, int tl_offset, float[] pl, int pl_offset, int[] ier, int ier_offset) - { - if(tk != null && tk.length <= tk_offset) - throw new RuntimeException("array offset argument \"tk_offset\" (" + tk_offset + ") equals or exceeds array length (" + tk.length + ")"); - if(td != null && td.length <= td_offset) - throw new RuntimeException("array offset argument \"td_offset\" (" + td_offset + ") equals or exceeds array length (" + td.length + ")"); - if(pinit != null && pinit.length <= pinit_offset) - throw new RuntimeException("array offset argument \"pinit_offset\" (" + pinit_offset + ") equals or exceeds array length (" + pinit.length + ")"); - if(tl != null && tl.length <= tl_offset) - throw new RuntimeException("array offset argument \"tl_offset\" (" + tl_offset + ") equals or exceeds array length (" + tl.length + ")"); - if(pl != null && pl.length <= pl_offset) - throw new RuntimeException("array offset argument \"pl_offset\" (" + pl_offset + ") equals or exceeds array length (" + pl.length + ")"); - if(ier != null && ier.length <= ier_offset) - throw new RuntimeException("array offset argument \"ier_offset\" (" + ier_offset + ") equals or exceeds array length (" + ier.length + ")"); - tplcl1(tk, BufferFactory.SIZEOF_FLOAT * tk_offset, td, BufferFactory.SIZEOF_FLOAT * td_offset, pinit, BufferFactory.SIZEOF_FLOAT * pinit_offset, tl, BufferFactory.SIZEOF_FLOAT * tl_offset, pl, BufferFactory.SIZEOF_FLOAT * pl_offset, ier, BufferFactory.SIZEOF_INT * ier_offset); - - } - - /** Interface to C language function:
void tpzlcl(float * tk, float * tdk, float * pinit, int * iw, float * tl, float * pl, float * zl, int * ier); */ - public static void tpzlcl(java.nio.FloatBuffer tk, java.nio.FloatBuffer tdk, java.nio.FloatBuffer pinit, java.nio.IntBuffer iw, java.nio.FloatBuffer tl, java.nio.FloatBuffer pl, java.nio.FloatBuffer zl, java.nio.IntBuffer ier) - { - boolean _direct = BufferFactory.isDirect(tk); - if (tdk != null && _direct != BufferFactory.isDirect(tdk)) - throw new RuntimeException("Argument \"tdk\" : Buffers passed to this method must all be either direct or indirect"); - if (pinit != null && _direct != BufferFactory.isDirect(pinit)) - throw new RuntimeException("Argument \"pinit\" : Buffers passed to this method must all be either direct or indirect"); - if (iw != null && _direct != BufferFactory.isDirect(iw)) - throw new RuntimeException("Argument \"iw\" : Buffers passed to this method must all be either direct or indirect"); - if (tl != null && _direct != BufferFactory.isDirect(tl)) - throw new RuntimeException("Argument \"tl\" : Buffers passed to this method must all be either direct or indirect"); - if (pl != null && _direct != BufferFactory.isDirect(pl)) - throw new RuntimeException("Argument \"pl\" : Buffers passed to this method must all be either direct or indirect"); - if (zl != null && _direct != BufferFactory.isDirect(zl)) - throw new RuntimeException("Argument \"zl\" : Buffers passed to this method must all be either direct or indirect"); - if (ier != null && _direct != BufferFactory.isDirect(ier)) - throw new RuntimeException("Argument \"ier\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - tpzlcl0(tk, BufferFactory.getDirectBufferByteOffset(tk), tdk, BufferFactory.getDirectBufferByteOffset(tdk), pinit, BufferFactory.getDirectBufferByteOffset(pinit), iw, BufferFactory.getDirectBufferByteOffset(iw), tl, BufferFactory.getDirectBufferByteOffset(tl), pl, BufferFactory.getDirectBufferByteOffset(pl), zl, BufferFactory.getDirectBufferByteOffset(zl), ier, BufferFactory.getDirectBufferByteOffset(ier)); - } else { - tpzlcl1(BufferFactory.getArray(tk), BufferFactory.getIndirectBufferByteOffset(tk), BufferFactory.getArray(tdk), BufferFactory.getIndirectBufferByteOffset(tdk), BufferFactory.getArray(pinit), BufferFactory.getIndirectBufferByteOffset(pinit), BufferFactory.getArray(iw), BufferFactory.getIndirectBufferByteOffset(iw), BufferFactory.getArray(tl), BufferFactory.getIndirectBufferByteOffset(tl), BufferFactory.getArray(pl), BufferFactory.getIndirectBufferByteOffset(pl), BufferFactory.getArray(zl), BufferFactory.getIndirectBufferByteOffset(zl), BufferFactory.getArray(ier), BufferFactory.getIndirectBufferByteOffset(ier)); - } - } - - /** Entry point to C language function:
void tpzlcl(float * tk, float * tdk, float * pinit, int * iw, float * tl, float * pl, float * zl, int * ier); */ - private static native void tpzlcl0(Object tk, int tk_byte_offset, Object tdk, int tdk_byte_offset, Object pinit, int pinit_byte_offset, Object iw, int iw_byte_offset, Object tl, int tl_byte_offset, Object pl, int pl_byte_offset, Object zl, int zl_byte_offset, Object ier, int ier_byte_offset); - - /** Entry point to C language function:
void tpzlcl(float * tk, float * tdk, float * pinit, int * iw, float * tl, float * pl, float * zl, int * ier); */ - private static native void tpzlcl1(Object tk, int tk_byte_offset, Object tdk, int tdk_byte_offset, Object pinit, int pinit_byte_offset, Object iw, int iw_byte_offset, Object tl, int tl_byte_offset, Object pl, int pl_byte_offset, Object zl, int zl_byte_offset, Object ier, int ier_byte_offset); - - /** Interface to C language function:
void tpzlcl(float * tk, float * tdk, float * pinit, int * iw, float * tl, float * pl, float * zl, int * ier); */ - public static void tpzlcl(float[] tk, int tk_offset, float[] tdk, int tdk_offset, float[] pinit, int pinit_offset, int[] iw, int iw_offset, float[] tl, int tl_offset, float[] pl, int pl_offset, float[] zl, int zl_offset, int[] ier, int ier_offset) - { - if(tk != null && tk.length <= tk_offset) - throw new RuntimeException("array offset argument \"tk_offset\" (" + tk_offset + ") equals or exceeds array length (" + tk.length + ")"); - if(tdk != null && tdk.length <= tdk_offset) - throw new RuntimeException("array offset argument \"tdk_offset\" (" + tdk_offset + ") equals or exceeds array length (" + tdk.length + ")"); - if(pinit != null && pinit.length <= pinit_offset) - throw new RuntimeException("array offset argument \"pinit_offset\" (" + pinit_offset + ") equals or exceeds array length (" + pinit.length + ")"); - if(iw != null && iw.length <= iw_offset) - throw new RuntimeException("array offset argument \"iw_offset\" (" + iw_offset + ") equals or exceeds array length (" + iw.length + ")"); - if(tl != null && tl.length <= tl_offset) - throw new RuntimeException("array offset argument \"tl_offset\" (" + tl_offset + ") equals or exceeds array length (" + tl.length + ")"); - if(pl != null && pl.length <= pl_offset) - throw new RuntimeException("array offset argument \"pl_offset\" (" + pl_offset + ") equals or exceeds array length (" + pl.length + ")"); - if(zl != null && zl.length <= zl_offset) - throw new RuntimeException("array offset argument \"zl_offset\" (" + zl_offset + ") equals or exceeds array length (" + zl.length + ")"); - if(ier != null && ier.length <= ier_offset) - throw new RuntimeException("array offset argument \"ier_offset\" (" + ier_offset + ") equals or exceeds array length (" + ier.length + ")"); - tpzlcl1(tk, BufferFactory.SIZEOF_FLOAT * tk_offset, tdk, BufferFactory.SIZEOF_FLOAT * tdk_offset, pinit, BufferFactory.SIZEOF_FLOAT * pinit_offset, iw, BufferFactory.SIZEOF_INT * iw_offset, tl, BufferFactory.SIZEOF_FLOAT * tl_offset, pl, BufferFactory.SIZEOF_FLOAT * pl_offset, zl, BufferFactory.SIZEOF_FLOAT * zl_offset, ier, BufferFactory.SIZEOF_INT * ier_offset); - - } - - /** Interface to C language function:
float tsa(float * os, float * pres); */ - public static float tsa(java.nio.FloatBuffer os, java.nio.FloatBuffer pres) - { - boolean _direct = BufferFactory.isDirect(os); - if (pres != null && _direct != BufferFactory.isDirect(pres)) - throw new RuntimeException("Argument \"pres\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - return tsa0(os, BufferFactory.getDirectBufferByteOffset(os), pres, BufferFactory.getDirectBufferByteOffset(pres)); - } else { - return tsa1(BufferFactory.getArray(os), BufferFactory.getIndirectBufferByteOffset(os), BufferFactory.getArray(pres), BufferFactory.getIndirectBufferByteOffset(pres)); - } - } - - /** Entry point to C language function:
float tsa(float * os, float * pres); */ - private static native float tsa0(Object os, int os_byte_offset, Object pres, int pres_byte_offset); - - /** Entry point to C language function:
float tsa(float * os, float * pres); */ - private static native float tsa1(Object os, int os_byte_offset, Object pres, int pres_byte_offset); - - /** Interface to C language function:
float tsa(float * os, float * pres); */ - public static float tsa(float[] os, int os_offset, float[] pres, int pres_offset) - { - if(os != null && os.length <= os_offset) - throw new RuntimeException("array offset argument \"os_offset\" (" + os_offset + ") equals or exceeds array length (" + os.length + ")"); - if(pres != null && pres.length <= pres_offset) - throw new RuntimeException("array offset argument \"pres_offset\" (" + pres_offset + ") equals or exceeds array length (" + pres.length + ")"); - return tsa1(os, BufferFactory.SIZEOF_FLOAT * os_offset, pres, BufferFactory.SIZEOF_FLOAT * pres_offset); - - } - - /** Interface to C language function:
void tsoar(float * elev, float * p, float * z, float * t, float * theta, int * nl, float * Tpmax, float * PTLXEC, float * zlnec, float * tlnec, float * zlxec, float * tlxec, float * soarindx, float * Trigtemp); */ - public static void tsoar(java.nio.FloatBuffer elev, java.nio.FloatBuffer p, java.nio.FloatBuffer z, java.nio.FloatBuffer t, java.nio.FloatBuffer theta, java.nio.IntBuffer nl, java.nio.FloatBuffer Tpmax, java.nio.FloatBuffer PTLXEC, java.nio.FloatBuffer zlnec, java.nio.FloatBuffer tlnec, java.nio.FloatBuffer zlxec, java.nio.FloatBuffer tlxec, java.nio.FloatBuffer soarindx, java.nio.FloatBuffer Trigtemp) - { - boolean _direct = BufferFactory.isDirect(elev); - if (p != null && _direct != BufferFactory.isDirect(p)) - throw new RuntimeException("Argument \"p\" : Buffers passed to this method must all be either direct or indirect"); - if (z != null && _direct != BufferFactory.isDirect(z)) - throw new RuntimeException("Argument \"z\" : Buffers passed to this method must all be either direct or indirect"); - if (t != null && _direct != BufferFactory.isDirect(t)) - throw new RuntimeException("Argument \"t\" : Buffers passed to this method must all be either direct or indirect"); - if (theta != null && _direct != BufferFactory.isDirect(theta)) - throw new RuntimeException("Argument \"theta\" : Buffers passed to this method must all be either direct or indirect"); - if (nl != null && _direct != BufferFactory.isDirect(nl)) - throw new RuntimeException("Argument \"nl\" : Buffers passed to this method must all be either direct or indirect"); - if (Tpmax != null && _direct != BufferFactory.isDirect(Tpmax)) - throw new RuntimeException("Argument \"Tpmax\" : Buffers passed to this method must all be either direct or indirect"); - if (PTLXEC != null && _direct != BufferFactory.isDirect(PTLXEC)) - throw new RuntimeException("Argument \"PTLXEC\" : Buffers passed to this method must all be either direct or indirect"); - if (zlnec != null && _direct != BufferFactory.isDirect(zlnec)) - throw new RuntimeException("Argument \"zlnec\" : Buffers passed to this method must all be either direct or indirect"); - if (tlnec != null && _direct != BufferFactory.isDirect(tlnec)) - throw new RuntimeException("Argument \"tlnec\" : Buffers passed to this method must all be either direct or indirect"); - if (zlxec != null && _direct != BufferFactory.isDirect(zlxec)) - throw new RuntimeException("Argument \"zlxec\" : Buffers passed to this method must all be either direct or indirect"); - if (tlxec != null && _direct != BufferFactory.isDirect(tlxec)) - throw new RuntimeException("Argument \"tlxec\" : Buffers passed to this method must all be either direct or indirect"); - if (soarindx != null && _direct != BufferFactory.isDirect(soarindx)) - throw new RuntimeException("Argument \"soarindx\" : Buffers passed to this method must all be either direct or indirect"); - if (Trigtemp != null && _direct != BufferFactory.isDirect(Trigtemp)) - throw new RuntimeException("Argument \"Trigtemp\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - tsoar0(elev, BufferFactory.getDirectBufferByteOffset(elev), p, BufferFactory.getDirectBufferByteOffset(p), z, BufferFactory.getDirectBufferByteOffset(z), t, BufferFactory.getDirectBufferByteOffset(t), theta, BufferFactory.getDirectBufferByteOffset(theta), nl, BufferFactory.getDirectBufferByteOffset(nl), Tpmax, BufferFactory.getDirectBufferByteOffset(Tpmax), PTLXEC, BufferFactory.getDirectBufferByteOffset(PTLXEC), zlnec, BufferFactory.getDirectBufferByteOffset(zlnec), tlnec, BufferFactory.getDirectBufferByteOffset(tlnec), zlxec, BufferFactory.getDirectBufferByteOffset(zlxec), tlxec, BufferFactory.getDirectBufferByteOffset(tlxec), soarindx, BufferFactory.getDirectBufferByteOffset(soarindx), Trigtemp, BufferFactory.getDirectBufferByteOffset(Trigtemp)); - } else { - tsoar1(BufferFactory.getArray(elev), BufferFactory.getIndirectBufferByteOffset(elev), BufferFactory.getArray(p), BufferFactory.getIndirectBufferByteOffset(p), BufferFactory.getArray(z), BufferFactory.getIndirectBufferByteOffset(z), BufferFactory.getArray(t), BufferFactory.getIndirectBufferByteOffset(t), BufferFactory.getArray(theta), BufferFactory.getIndirectBufferByteOffset(theta), BufferFactory.getArray(nl), BufferFactory.getIndirectBufferByteOffset(nl), BufferFactory.getArray(Tpmax), BufferFactory.getIndirectBufferByteOffset(Tpmax), BufferFactory.getArray(PTLXEC), BufferFactory.getIndirectBufferByteOffset(PTLXEC), BufferFactory.getArray(zlnec), BufferFactory.getIndirectBufferByteOffset(zlnec), BufferFactory.getArray(tlnec), BufferFactory.getIndirectBufferByteOffset(tlnec), BufferFactory.getArray(zlxec), BufferFactory.getIndirectBufferByteOffset(zlxec), BufferFactory.getArray(tlxec), BufferFactory.getIndirectBufferByteOffset(tlxec), BufferFactory.getArray(soarindx), BufferFactory.getIndirectBufferByteOffset(soarindx), BufferFactory.getArray(Trigtemp), BufferFactory.getIndirectBufferByteOffset(Trigtemp)); - } - } - - /** Entry point to C language function:
void tsoar(float * elev, float * p, float * z, float * t, float * theta, int * nl, float * Tpmax, float * PTLXEC, float * zlnec, float * tlnec, float * zlxec, float * tlxec, float * soarindx, float * Trigtemp); */ - private static native void tsoar0(Object elev, int elev_byte_offset, Object p, int p_byte_offset, Object z, int z_byte_offset, Object t, int t_byte_offset, Object theta, int theta_byte_offset, Object nl, int nl_byte_offset, Object Tpmax, int Tpmax_byte_offset, Object PTLXEC, int PTLXEC_byte_offset, Object zlnec, int zlnec_byte_offset, Object tlnec, int tlnec_byte_offset, Object zlxec, int zlxec_byte_offset, Object tlxec, int tlxec_byte_offset, Object soarindx, int soarindx_byte_offset, Object Trigtemp, int Trigtemp_byte_offset); - - /** Entry point to C language function:
void tsoar(float * elev, float * p, float * z, float * t, float * theta, int * nl, float * Tpmax, float * PTLXEC, float * zlnec, float * tlnec, float * zlxec, float * tlxec, float * soarindx, float * Trigtemp); */ - private static native void tsoar1(Object elev, int elev_byte_offset, Object p, int p_byte_offset, Object z, int z_byte_offset, Object t, int t_byte_offset, Object theta, int theta_byte_offset, Object nl, int nl_byte_offset, Object Tpmax, int Tpmax_byte_offset, Object PTLXEC, int PTLXEC_byte_offset, Object zlnec, int zlnec_byte_offset, Object tlnec, int tlnec_byte_offset, Object zlxec, int zlxec_byte_offset, Object tlxec, int tlxec_byte_offset, Object soarindx, int soarindx_byte_offset, Object Trigtemp, int Trigtemp_byte_offset); - - /** Interface to C language function:
void tsoar(float * elev, float * p, float * z, float * t, float * theta, int * nl, float * Tpmax, float * PTLXEC, float * zlnec, float * tlnec, float * zlxec, float * tlxec, float * soarindx, float * Trigtemp); */ - public static void tsoar(float[] elev, int elev_offset, float[] p, int p_offset, float[] z, int z_offset, float[] t, int t_offset, float[] theta, int theta_offset, int[] nl, int nl_offset, float[] Tpmax, int Tpmax_offset, float[] PTLXEC, int PTLXEC_offset, float[] zlnec, int zlnec_offset, float[] tlnec, int tlnec_offset, float[] zlxec, int zlxec_offset, float[] tlxec, int tlxec_offset, float[] soarindx, int soarindx_offset, float[] Trigtemp, int Trigtemp_offset) - { - if(elev != null && elev.length <= elev_offset) - throw new RuntimeException("array offset argument \"elev_offset\" (" + elev_offset + ") equals or exceeds array length (" + elev.length + ")"); - if(p != null && p.length <= p_offset) - throw new RuntimeException("array offset argument \"p_offset\" (" + p_offset + ") equals or exceeds array length (" + p.length + ")"); - if(z != null && z.length <= z_offset) - throw new RuntimeException("array offset argument \"z_offset\" (" + z_offset + ") equals or exceeds array length (" + z.length + ")"); - if(t != null && t.length <= t_offset) - throw new RuntimeException("array offset argument \"t_offset\" (" + t_offset + ") equals or exceeds array length (" + t.length + ")"); - if(theta != null && theta.length <= theta_offset) - throw new RuntimeException("array offset argument \"theta_offset\" (" + theta_offset + ") equals or exceeds array length (" + theta.length + ")"); - if(nl != null && nl.length <= nl_offset) - throw new RuntimeException("array offset argument \"nl_offset\" (" + nl_offset + ") equals or exceeds array length (" + nl.length + ")"); - if(Tpmax != null && Tpmax.length <= Tpmax_offset) - throw new RuntimeException("array offset argument \"Tpmax_offset\" (" + Tpmax_offset + ") equals or exceeds array length (" + Tpmax.length + ")"); - if(PTLXEC != null && PTLXEC.length <= PTLXEC_offset) - throw new RuntimeException("array offset argument \"PTLXEC_offset\" (" + PTLXEC_offset + ") equals or exceeds array length (" + PTLXEC.length + ")"); - if(zlnec != null && zlnec.length <= zlnec_offset) - throw new RuntimeException("array offset argument \"zlnec_offset\" (" + zlnec_offset + ") equals or exceeds array length (" + zlnec.length + ")"); - if(tlnec != null && tlnec.length <= tlnec_offset) - throw new RuntimeException("array offset argument \"tlnec_offset\" (" + tlnec_offset + ") equals or exceeds array length (" + tlnec.length + ")"); - if(zlxec != null && zlxec.length <= zlxec_offset) - throw new RuntimeException("array offset argument \"zlxec_offset\" (" + zlxec_offset + ") equals or exceeds array length (" + zlxec.length + ")"); - if(tlxec != null && tlxec.length <= tlxec_offset) - throw new RuntimeException("array offset argument \"tlxec_offset\" (" + tlxec_offset + ") equals or exceeds array length (" + tlxec.length + ")"); - if(soarindx != null && soarindx.length <= soarindx_offset) - throw new RuntimeException("array offset argument \"soarindx_offset\" (" + soarindx_offset + ") equals or exceeds array length (" + soarindx.length + ")"); - if(Trigtemp != null && Trigtemp.length <= Trigtemp_offset) - throw new RuntimeException("array offset argument \"Trigtemp_offset\" (" + Trigtemp_offset + ") equals or exceeds array length (" + Trigtemp.length + ")"); - tsoar1(elev, BufferFactory.SIZEOF_FLOAT * elev_offset, p, BufferFactory.SIZEOF_FLOAT * p_offset, z, BufferFactory.SIZEOF_FLOAT * z_offset, t, BufferFactory.SIZEOF_FLOAT * t_offset, theta, BufferFactory.SIZEOF_FLOAT * theta_offset, nl, BufferFactory.SIZEOF_INT * nl_offset, Tpmax, BufferFactory.SIZEOF_FLOAT * Tpmax_offset, PTLXEC, BufferFactory.SIZEOF_FLOAT * PTLXEC_offset, zlnec, BufferFactory.SIZEOF_FLOAT * zlnec_offset, tlnec, BufferFactory.SIZEOF_FLOAT * tlnec_offset, zlxec, BufferFactory.SIZEOF_FLOAT * zlxec_offset, tlxec, BufferFactory.SIZEOF_FLOAT * tlxec_offset, soarindx, BufferFactory.SIZEOF_FLOAT * soarindx_offset, Trigtemp, BufferFactory.SIZEOF_FLOAT * Trigtemp_offset); - - } - - /** Interface to C language function:
void tv2temp(float * tv, float * q, int * mni, int * ni, int * nj, float * t); */ - public static void tv2temp(java.nio.FloatBuffer tv, java.nio.FloatBuffer q, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj, java.nio.FloatBuffer t) - { - boolean _direct = BufferFactory.isDirect(tv); - if (q != null && _direct != BufferFactory.isDirect(q)) - throw new RuntimeException("Argument \"q\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (t != null && _direct != BufferFactory.isDirect(t)) - throw new RuntimeException("Argument \"t\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - tv2temp0(tv, BufferFactory.getDirectBufferByteOffset(tv), q, BufferFactory.getDirectBufferByteOffset(q), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj), t, BufferFactory.getDirectBufferByteOffset(t)); - } else { - tv2temp1(BufferFactory.getArray(tv), BufferFactory.getIndirectBufferByteOffset(tv), BufferFactory.getArray(q), BufferFactory.getIndirectBufferByteOffset(q), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj), BufferFactory.getArray(t), BufferFactory.getIndirectBufferByteOffset(t)); - } - } - - /** Entry point to C language function:
void tv2temp(float * tv, float * q, int * mni, int * ni, int * nj, float * t); */ - private static native void tv2temp0(Object tv, int tv_byte_offset, Object q, int q_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object t, int t_byte_offset); - - /** Entry point to C language function:
void tv2temp(float * tv, float * q, int * mni, int * ni, int * nj, float * t); */ - private static native void tv2temp1(Object tv, int tv_byte_offset, Object q, int q_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset, Object t, int t_byte_offset); - - /** Interface to C language function:
void tv2temp(float * tv, float * q, int * mni, int * ni, int * nj, float * t); */ - public static void tv2temp(float[] tv, int tv_offset, float[] q, int q_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset, float[] t, int t_offset) - { - if(tv != null && tv.length <= tv_offset) - throw new RuntimeException("array offset argument \"tv_offset\" (" + tv_offset + ") equals or exceeds array length (" + tv.length + ")"); - if(q != null && q.length <= q_offset) - throw new RuntimeException("array offset argument \"q_offset\" (" + q_offset + ") equals or exceeds array length (" + q.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - if(t != null && t.length <= t_offset) - throw new RuntimeException("array offset argument \"t_offset\" (" + t_offset + ") equals or exceeds array length (" + t.length + ")"); - tv2temp1(tv, BufferFactory.SIZEOF_FLOAT * tv_offset, q, BufferFactory.SIZEOF_FLOAT * q_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset, t, BufferFactory.SIZEOF_FLOAT * t_offset); - - } - - /** Interface to C language function:
void uvcomp(float * DIR, float * SPD, float * U, float * V, int * NLVLS); */ - public static void uvcomp(java.nio.FloatBuffer DIR, java.nio.FloatBuffer SPD, java.nio.FloatBuffer U, java.nio.FloatBuffer V, java.nio.IntBuffer NLVLS) - { - boolean _direct = BufferFactory.isDirect(DIR); - if (SPD != null && _direct != BufferFactory.isDirect(SPD)) - throw new RuntimeException("Argument \"SPD\" : Buffers passed to this method must all be either direct or indirect"); - if (U != null && _direct != BufferFactory.isDirect(U)) - throw new RuntimeException("Argument \"U\" : Buffers passed to this method must all be either direct or indirect"); - if (V != null && _direct != BufferFactory.isDirect(V)) - throw new RuntimeException("Argument \"V\" : Buffers passed to this method must all be either direct or indirect"); - if (NLVLS != null && _direct != BufferFactory.isDirect(NLVLS)) - throw new RuntimeException("Argument \"NLVLS\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - uvcomp0(DIR, BufferFactory.getDirectBufferByteOffset(DIR), SPD, BufferFactory.getDirectBufferByteOffset(SPD), U, BufferFactory.getDirectBufferByteOffset(U), V, BufferFactory.getDirectBufferByteOffset(V), NLVLS, BufferFactory.getDirectBufferByteOffset(NLVLS)); - } else { - uvcomp1(BufferFactory.getArray(DIR), BufferFactory.getIndirectBufferByteOffset(DIR), BufferFactory.getArray(SPD), BufferFactory.getIndirectBufferByteOffset(SPD), BufferFactory.getArray(U), BufferFactory.getIndirectBufferByteOffset(U), BufferFactory.getArray(V), BufferFactory.getIndirectBufferByteOffset(V), BufferFactory.getArray(NLVLS), BufferFactory.getIndirectBufferByteOffset(NLVLS)); - } - } - - /** Entry point to C language function:
void uvcomp(float * DIR, float * SPD, float * U, float * V, int * NLVLS); */ - private static native void uvcomp0(Object DIR, int DIR_byte_offset, Object SPD, int SPD_byte_offset, Object U, int U_byte_offset, Object V, int V_byte_offset, Object NLVLS, int NLVLS_byte_offset); - - /** Entry point to C language function:
void uvcomp(float * DIR, float * SPD, float * U, float * V, int * NLVLS); */ - private static native void uvcomp1(Object DIR, int DIR_byte_offset, Object SPD, int SPD_byte_offset, Object U, int U_byte_offset, Object V, int V_byte_offset, Object NLVLS, int NLVLS_byte_offset); - - /** Interface to C language function:
void uvcomp(float * DIR, float * SPD, float * U, float * V, int * NLVLS); */ - public static void uvcomp(float[] DIR, int DIR_offset, float[] SPD, int SPD_offset, float[] U, int U_offset, float[] V, int V_offset, int[] NLVLS, int NLVLS_offset) - { - if(DIR != null && DIR.length <= DIR_offset) - throw new RuntimeException("array offset argument \"DIR_offset\" (" + DIR_offset + ") equals or exceeds array length (" + DIR.length + ")"); - if(SPD != null && SPD.length <= SPD_offset) - throw new RuntimeException("array offset argument \"SPD_offset\" (" + SPD_offset + ") equals or exceeds array length (" + SPD.length + ")"); - if(U != null && U.length <= U_offset) - throw new RuntimeException("array offset argument \"U_offset\" (" + U_offset + ") equals or exceeds array length (" + U.length + ")"); - if(V != null && V.length <= V_offset) - throw new RuntimeException("array offset argument \"V_offset\" (" + V_offset + ") equals or exceeds array length (" + V.length + ")"); - if(NLVLS != null && NLVLS.length <= NLVLS_offset) - throw new RuntimeException("array offset argument \"NLVLS_offset\" (" + NLVLS_offset + ") equals or exceeds array length (" + NLVLS.length + ")"); - uvcomp1(DIR, BufferFactory.SIZEOF_FLOAT * DIR_offset, SPD, BufferFactory.SIZEOF_FLOAT * SPD_offset, U, BufferFactory.SIZEOF_FLOAT * U_offset, V, BufferFactory.SIZEOF_FLOAT * V_offset, NLVLS, BufferFactory.SIZEOF_INT * NLVLS_offset); - - } - - /** Interface to C language function:
void ver_pts(float * a, float * count, int * init, int * mni, int * ni, int * nj); */ - public static void ver_pts(java.nio.FloatBuffer a, java.nio.FloatBuffer count, java.nio.IntBuffer init, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj) - { - boolean _direct = BufferFactory.isDirect(a); - if (count != null && _direct != BufferFactory.isDirect(count)) - throw new RuntimeException("Argument \"count\" : Buffers passed to this method must all be either direct or indirect"); - if (init != null && _direct != BufferFactory.isDirect(init)) - throw new RuntimeException("Argument \"init\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - ver_pts0(a, BufferFactory.getDirectBufferByteOffset(a), count, BufferFactory.getDirectBufferByteOffset(count), init, BufferFactory.getDirectBufferByteOffset(init), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj)); - } else { - ver_pts1(BufferFactory.getArray(a), BufferFactory.getIndirectBufferByteOffset(a), BufferFactory.getArray(count), BufferFactory.getIndirectBufferByteOffset(count), BufferFactory.getArray(init), BufferFactory.getIndirectBufferByteOffset(init), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj)); - } - } - - /** Entry point to C language function:
void ver_pts(float * a, float * count, int * init, int * mni, int * ni, int * nj); */ - private static native void ver_pts0(Object a, int a_byte_offset, Object count, int count_byte_offset, Object init, int init_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset); - - /** Entry point to C language function:
void ver_pts(float * a, float * count, int * init, int * mni, int * ni, int * nj); */ - private static native void ver_pts1(Object a, int a_byte_offset, Object count, int count_byte_offset, Object init, int init_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset); - - /** Interface to C language function:
void ver_pts(float * a, float * count, int * init, int * mni, int * ni, int * nj); */ - public static void ver_pts(float[] a, int a_offset, float[] count, int count_offset, int[] init, int init_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset) - { - if(a != null && a.length <= a_offset) - throw new RuntimeException("array offset argument \"a_offset\" (" + a_offset + ") equals or exceeds array length (" + a.length + ")"); - if(count != null && count.length <= count_offset) - throw new RuntimeException("array offset argument \"count_offset\" (" + count_offset + ") equals or exceeds array length (" + count.length + ")"); - if(init != null && init.length <= init_offset) - throw new RuntimeException("array offset argument \"init_offset\" (" + init_offset + ") equals or exceeds array length (" + init.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - ver_pts1(a, BufferFactory.SIZEOF_FLOAT * a_offset, count, BufferFactory.SIZEOF_FLOAT * count_offset, init, BufferFactory.SIZEOF_INT * init_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset); - - } - - /** Interface to C language function:
float virttemp(float * T, float * Td, float * P); */ - public static float virttemp(java.nio.FloatBuffer T, java.nio.FloatBuffer Td, java.nio.FloatBuffer P) - { - boolean _direct = BufferFactory.isDirect(T); - if (Td != null && _direct != BufferFactory.isDirect(Td)) - throw new RuntimeException("Argument \"Td\" : Buffers passed to this method must all be either direct or indirect"); - if (P != null && _direct != BufferFactory.isDirect(P)) - throw new RuntimeException("Argument \"P\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - return virttemp0(T, BufferFactory.getDirectBufferByteOffset(T), Td, BufferFactory.getDirectBufferByteOffset(Td), P, BufferFactory.getDirectBufferByteOffset(P)); - } else { - return virttemp1(BufferFactory.getArray(T), BufferFactory.getIndirectBufferByteOffset(T), BufferFactory.getArray(Td), BufferFactory.getIndirectBufferByteOffset(Td), BufferFactory.getArray(P), BufferFactory.getIndirectBufferByteOffset(P)); - } - } - - /** Entry point to C language function:
float virttemp(float * T, float * Td, float * P); */ - private static native float virttemp0(Object T, int T_byte_offset, Object Td, int Td_byte_offset, Object P, int P_byte_offset); - - /** Entry point to C language function:
float virttemp(float * T, float * Td, float * P); */ - private static native float virttemp1(Object T, int T_byte_offset, Object Td, int Td_byte_offset, Object P, int P_byte_offset); - - /** Interface to C language function:
float virttemp(float * T, float * Td, float * P); */ - public static float virttemp(float[] T, int T_offset, float[] Td, int Td_offset, float[] P, int P_offset) - { - if(T != null && T.length <= T_offset) - throw new RuntimeException("array offset argument \"T_offset\" (" + T_offset + ") equals or exceeds array length (" + T.length + ")"); - if(Td != null && Td.length <= Td_offset) - throw new RuntimeException("array offset argument \"Td_offset\" (" + Td_offset + ") equals or exceeds array length (" + Td.length + ")"); - if(P != null && P.length <= P_offset) - throw new RuntimeException("array offset argument \"P_offset\" (" + P_offset + ") equals or exceeds array length (" + P.length + ")"); - return virttemp1(T, BufferFactory.SIZEOF_FLOAT * T_offset, Td, BufferFactory.SIZEOF_FLOAT * Td_offset, P, BufferFactory.SIZEOF_FLOAT * P_offset); - - } - - /** Interface to C language function:
void virtualt(float * T, float * TD, float * P, int * NLVLS, float * TVIR); */ - public static void virtualt(java.nio.FloatBuffer T, java.nio.FloatBuffer TD, java.nio.FloatBuffer P, java.nio.IntBuffer NLVLS, java.nio.FloatBuffer TVIR) - { - boolean _direct = BufferFactory.isDirect(T); - if (TD != null && _direct != BufferFactory.isDirect(TD)) - throw new RuntimeException("Argument \"TD\" : Buffers passed to this method must all be either direct or indirect"); - if (P != null && _direct != BufferFactory.isDirect(P)) - throw new RuntimeException("Argument \"P\" : Buffers passed to this method must all be either direct or indirect"); - if (NLVLS != null && _direct != BufferFactory.isDirect(NLVLS)) - throw new RuntimeException("Argument \"NLVLS\" : Buffers passed to this method must all be either direct or indirect"); - if (TVIR != null && _direct != BufferFactory.isDirect(TVIR)) - throw new RuntimeException("Argument \"TVIR\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - virtualt0(T, BufferFactory.getDirectBufferByteOffset(T), TD, BufferFactory.getDirectBufferByteOffset(TD), P, BufferFactory.getDirectBufferByteOffset(P), NLVLS, BufferFactory.getDirectBufferByteOffset(NLVLS), TVIR, BufferFactory.getDirectBufferByteOffset(TVIR)); - } else { - virtualt1(BufferFactory.getArray(T), BufferFactory.getIndirectBufferByteOffset(T), BufferFactory.getArray(TD), BufferFactory.getIndirectBufferByteOffset(TD), BufferFactory.getArray(P), BufferFactory.getIndirectBufferByteOffset(P), BufferFactory.getArray(NLVLS), BufferFactory.getIndirectBufferByteOffset(NLVLS), BufferFactory.getArray(TVIR), BufferFactory.getIndirectBufferByteOffset(TVIR)); - } - } - - /** Entry point to C language function:
void virtualt(float * T, float * TD, float * P, int * NLVLS, float * TVIR); */ - private static native void virtualt0(Object T, int T_byte_offset, Object TD, int TD_byte_offset, Object P, int P_byte_offset, Object NLVLS, int NLVLS_byte_offset, Object TVIR, int TVIR_byte_offset); - - /** Entry point to C language function:
void virtualt(float * T, float * TD, float * P, int * NLVLS, float * TVIR); */ - private static native void virtualt1(Object T, int T_byte_offset, Object TD, int TD_byte_offset, Object P, int P_byte_offset, Object NLVLS, int NLVLS_byte_offset, Object TVIR, int TVIR_byte_offset); - - /** Interface to C language function:
void virtualt(float * T, float * TD, float * P, int * NLVLS, float * TVIR); */ - public static void virtualt(float[] T, int T_offset, float[] TD, int TD_offset, float[] P, int P_offset, int[] NLVLS, int NLVLS_offset, float[] TVIR, int TVIR_offset) - { - if(T != null && T.length <= T_offset) - throw new RuntimeException("array offset argument \"T_offset\" (" + T_offset + ") equals or exceeds array length (" + T.length + ")"); - if(TD != null && TD.length <= TD_offset) - throw new RuntimeException("array offset argument \"TD_offset\" (" + TD_offset + ") equals or exceeds array length (" + TD.length + ")"); - if(P != null && P.length <= P_offset) - throw new RuntimeException("array offset argument \"P_offset\" (" + P_offset + ") equals or exceeds array length (" + P.length + ")"); - if(NLVLS != null && NLVLS.length <= NLVLS_offset) - throw new RuntimeException("array offset argument \"NLVLS_offset\" (" + NLVLS_offset + ") equals or exceeds array length (" + NLVLS.length + ")"); - if(TVIR != null && TVIR.length <= TVIR_offset) - throw new RuntimeException("array offset argument \"TVIR_offset\" (" + TVIR_offset + ") equals or exceeds array length (" + TVIR.length + ")"); - virtualt1(T, BufferFactory.SIZEOF_FLOAT * T_offset, TD, BufferFactory.SIZEOF_FLOAT * TD_offset, P, BufferFactory.SIZEOF_FLOAT * P_offset, NLVLS, BufferFactory.SIZEOF_INT * NLVLS_offset, TVIR, BufferFactory.SIZEOF_FLOAT * TVIR_offset); - - } - - /** Interface to C language function:
float vp(float * tk, int * iw); */ - public static float vp(java.nio.FloatBuffer tk, java.nio.IntBuffer iw) - { - boolean _direct = BufferFactory.isDirect(tk); - if (iw != null && _direct != BufferFactory.isDirect(iw)) - throw new RuntimeException("Argument \"iw\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - return vp0(tk, BufferFactory.getDirectBufferByteOffset(tk), iw, BufferFactory.getDirectBufferByteOffset(iw)); - } else { - return vp1(BufferFactory.getArray(tk), BufferFactory.getIndirectBufferByteOffset(tk), BufferFactory.getArray(iw), BufferFactory.getIndirectBufferByteOffset(iw)); - } - } - - /** Entry point to C language function:
float vp(float * tk, int * iw); */ - private static native float vp0(Object tk, int tk_byte_offset, Object iw, int iw_byte_offset); - - /** Entry point to C language function:
float vp(float * tk, int * iw); */ - private static native float vp1(Object tk, int tk_byte_offset, Object iw, int iw_byte_offset); - - /** Interface to C language function:
float vp(float * tk, int * iw); */ - public static float vp(float[] tk, int tk_offset, int[] iw, int iw_offset) - { - if(tk != null && tk.length <= tk_offset) - throw new RuntimeException("array offset argument \"tk_offset\" (" + tk_offset + ") equals or exceeds array length (" + tk.length + ")"); - if(iw != null && iw.length <= iw_offset) - throw new RuntimeException("array offset argument \"iw_offset\" (" + iw_offset + ") equals or exceeds array length (" + iw.length + ")"); - return vp1(tk, BufferFactory.SIZEOF_FLOAT * tk_offset, iw, BufferFactory.SIZEOF_INT * iw_offset); - - } - - /** Interface to C language function:
void vvel(float * pcb, float * PEQLEV, float * P, float * HT, float * TP, float * TVE, float * TVP, float * WLCL, int * NPAR, float * VV, float * VVMAX); */ - public static void vvel(java.nio.FloatBuffer pcb, java.nio.FloatBuffer PEQLEV, java.nio.FloatBuffer P, java.nio.FloatBuffer HT, java.nio.FloatBuffer TP, java.nio.FloatBuffer TVE, java.nio.FloatBuffer TVP, java.nio.FloatBuffer WLCL, java.nio.IntBuffer NPAR, java.nio.FloatBuffer VV, java.nio.FloatBuffer VVMAX) - { - boolean _direct = BufferFactory.isDirect(pcb); - if (PEQLEV != null && _direct != BufferFactory.isDirect(PEQLEV)) - throw new RuntimeException("Argument \"PEQLEV\" : Buffers passed to this method must all be either direct or indirect"); - if (P != null && _direct != BufferFactory.isDirect(P)) - throw new RuntimeException("Argument \"P\" : Buffers passed to this method must all be either direct or indirect"); - if (HT != null && _direct != BufferFactory.isDirect(HT)) - throw new RuntimeException("Argument \"HT\" : Buffers passed to this method must all be either direct or indirect"); - if (TP != null && _direct != BufferFactory.isDirect(TP)) - throw new RuntimeException("Argument \"TP\" : Buffers passed to this method must all be either direct or indirect"); - if (TVE != null && _direct != BufferFactory.isDirect(TVE)) - throw new RuntimeException("Argument \"TVE\" : Buffers passed to this method must all be either direct or indirect"); - if (TVP != null && _direct != BufferFactory.isDirect(TVP)) - throw new RuntimeException("Argument \"TVP\" : Buffers passed to this method must all be either direct or indirect"); - if (WLCL != null && _direct != BufferFactory.isDirect(WLCL)) - throw new RuntimeException("Argument \"WLCL\" : Buffers passed to this method must all be either direct or indirect"); - if (NPAR != null && _direct != BufferFactory.isDirect(NPAR)) - throw new RuntimeException("Argument \"NPAR\" : Buffers passed to this method must all be either direct or indirect"); - if (VV != null && _direct != BufferFactory.isDirect(VV)) - throw new RuntimeException("Argument \"VV\" : Buffers passed to this method must all be either direct or indirect"); - if (VVMAX != null && _direct != BufferFactory.isDirect(VVMAX)) - throw new RuntimeException("Argument \"VVMAX\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - vvel0(pcb, BufferFactory.getDirectBufferByteOffset(pcb), PEQLEV, BufferFactory.getDirectBufferByteOffset(PEQLEV), P, BufferFactory.getDirectBufferByteOffset(P), HT, BufferFactory.getDirectBufferByteOffset(HT), TP, BufferFactory.getDirectBufferByteOffset(TP), TVE, BufferFactory.getDirectBufferByteOffset(TVE), TVP, BufferFactory.getDirectBufferByteOffset(TVP), WLCL, BufferFactory.getDirectBufferByteOffset(WLCL), NPAR, BufferFactory.getDirectBufferByteOffset(NPAR), VV, BufferFactory.getDirectBufferByteOffset(VV), VVMAX, BufferFactory.getDirectBufferByteOffset(VVMAX)); - } else { - vvel1(BufferFactory.getArray(pcb), BufferFactory.getIndirectBufferByteOffset(pcb), BufferFactory.getArray(PEQLEV), BufferFactory.getIndirectBufferByteOffset(PEQLEV), BufferFactory.getArray(P), BufferFactory.getIndirectBufferByteOffset(P), BufferFactory.getArray(HT), BufferFactory.getIndirectBufferByteOffset(HT), BufferFactory.getArray(TP), BufferFactory.getIndirectBufferByteOffset(TP), BufferFactory.getArray(TVE), BufferFactory.getIndirectBufferByteOffset(TVE), BufferFactory.getArray(TVP), BufferFactory.getIndirectBufferByteOffset(TVP), BufferFactory.getArray(WLCL), BufferFactory.getIndirectBufferByteOffset(WLCL), BufferFactory.getArray(NPAR), BufferFactory.getIndirectBufferByteOffset(NPAR), BufferFactory.getArray(VV), BufferFactory.getIndirectBufferByteOffset(VV), BufferFactory.getArray(VVMAX), BufferFactory.getIndirectBufferByteOffset(VVMAX)); - } - } - - /** Entry point to C language function:
void vvel(float * pcb, float * PEQLEV, float * P, float * HT, float * TP, float * TVE, float * TVP, float * WLCL, int * NPAR, float * VV, float * VVMAX); */ - private static native void vvel0(Object pcb, int pcb_byte_offset, Object PEQLEV, int PEQLEV_byte_offset, Object P, int P_byte_offset, Object HT, int HT_byte_offset, Object TP, int TP_byte_offset, Object TVE, int TVE_byte_offset, Object TVP, int TVP_byte_offset, Object WLCL, int WLCL_byte_offset, Object NPAR, int NPAR_byte_offset, Object VV, int VV_byte_offset, Object VVMAX, int VVMAX_byte_offset); - - /** Entry point to C language function:
void vvel(float * pcb, float * PEQLEV, float * P, float * HT, float * TP, float * TVE, float * TVP, float * WLCL, int * NPAR, float * VV, float * VVMAX); */ - private static native void vvel1(Object pcb, int pcb_byte_offset, Object PEQLEV, int PEQLEV_byte_offset, Object P, int P_byte_offset, Object HT, int HT_byte_offset, Object TP, int TP_byte_offset, Object TVE, int TVE_byte_offset, Object TVP, int TVP_byte_offset, Object WLCL, int WLCL_byte_offset, Object NPAR, int NPAR_byte_offset, Object VV, int VV_byte_offset, Object VVMAX, int VVMAX_byte_offset); - - /** Interface to C language function:
void vvel(float * pcb, float * PEQLEV, float * P, float * HT, float * TP, float * TVE, float * TVP, float * WLCL, int * NPAR, float * VV, float * VVMAX); */ - public static void vvel(float[] pcb, int pcb_offset, float[] PEQLEV, int PEQLEV_offset, float[] P, int P_offset, float[] HT, int HT_offset, float[] TP, int TP_offset, float[] TVE, int TVE_offset, float[] TVP, int TVP_offset, float[] WLCL, int WLCL_offset, int[] NPAR, int NPAR_offset, float[] VV, int VV_offset, float[] VVMAX, int VVMAX_offset) - { - if(pcb != null && pcb.length <= pcb_offset) - throw new RuntimeException("array offset argument \"pcb_offset\" (" + pcb_offset + ") equals or exceeds array length (" + pcb.length + ")"); - if(PEQLEV != null && PEQLEV.length <= PEQLEV_offset) - throw new RuntimeException("array offset argument \"PEQLEV_offset\" (" + PEQLEV_offset + ") equals or exceeds array length (" + PEQLEV.length + ")"); - if(P != null && P.length <= P_offset) - throw new RuntimeException("array offset argument \"P_offset\" (" + P_offset + ") equals or exceeds array length (" + P.length + ")"); - if(HT != null && HT.length <= HT_offset) - throw new RuntimeException("array offset argument \"HT_offset\" (" + HT_offset + ") equals or exceeds array length (" + HT.length + ")"); - if(TP != null && TP.length <= TP_offset) - throw new RuntimeException("array offset argument \"TP_offset\" (" + TP_offset + ") equals or exceeds array length (" + TP.length + ")"); - if(TVE != null && TVE.length <= TVE_offset) - throw new RuntimeException("array offset argument \"TVE_offset\" (" + TVE_offset + ") equals or exceeds array length (" + TVE.length + ")"); - if(TVP != null && TVP.length <= TVP_offset) - throw new RuntimeException("array offset argument \"TVP_offset\" (" + TVP_offset + ") equals or exceeds array length (" + TVP.length + ")"); - if(WLCL != null && WLCL.length <= WLCL_offset) - throw new RuntimeException("array offset argument \"WLCL_offset\" (" + WLCL_offset + ") equals or exceeds array length (" + WLCL.length + ")"); - if(NPAR != null && NPAR.length <= NPAR_offset) - throw new RuntimeException("array offset argument \"NPAR_offset\" (" + NPAR_offset + ") equals or exceeds array length (" + NPAR.length + ")"); - if(VV != null && VV.length <= VV_offset) - throw new RuntimeException("array offset argument \"VV_offset\" (" + VV_offset + ") equals or exceeds array length (" + VV.length + ")"); - if(VVMAX != null && VVMAX.length <= VVMAX_offset) - throw new RuntimeException("array offset argument \"VVMAX_offset\" (" + VVMAX_offset + ") equals or exceeds array length (" + VVMAX.length + ")"); - vvel1(pcb, BufferFactory.SIZEOF_FLOAT * pcb_offset, PEQLEV, BufferFactory.SIZEOF_FLOAT * PEQLEV_offset, P, BufferFactory.SIZEOF_FLOAT * P_offset, HT, BufferFactory.SIZEOF_FLOAT * HT_offset, TP, BufferFactory.SIZEOF_FLOAT * TP_offset, TVE, BufferFactory.SIZEOF_FLOAT * TVE_offset, TVP, BufferFactory.SIZEOF_FLOAT * TVP_offset, WLCL, BufferFactory.SIZEOF_FLOAT * WLCL_offset, NPAR, BufferFactory.SIZEOF_INT * NPAR_offset, VV, BufferFactory.SIZEOF_FLOAT * VV_offset, VVMAX, BufferFactory.SIZEOF_FLOAT * VVMAX_offset); - - } - - /** Interface to C language function:
void wbzero(float * ELEV, float * P, float * HT, float * Tt, float * TD, int * NLVLS, float * PWBZ, float * HWBZ, float * TWBZ); */ - public static void wbzero(java.nio.FloatBuffer ELEV, java.nio.FloatBuffer P, java.nio.FloatBuffer HT, java.nio.FloatBuffer Tt, java.nio.FloatBuffer TD, java.nio.IntBuffer NLVLS, java.nio.FloatBuffer PWBZ, java.nio.FloatBuffer HWBZ, java.nio.FloatBuffer TWBZ) - { - boolean _direct = BufferFactory.isDirect(ELEV); - if (P != null && _direct != BufferFactory.isDirect(P)) - throw new RuntimeException("Argument \"P\" : Buffers passed to this method must all be either direct or indirect"); - if (HT != null && _direct != BufferFactory.isDirect(HT)) - throw new RuntimeException("Argument \"HT\" : Buffers passed to this method must all be either direct or indirect"); - if (Tt != null && _direct != BufferFactory.isDirect(Tt)) - throw new RuntimeException("Argument \"Tt\" : Buffers passed to this method must all be either direct or indirect"); - if (TD != null && _direct != BufferFactory.isDirect(TD)) - throw new RuntimeException("Argument \"TD\" : Buffers passed to this method must all be either direct or indirect"); - if (NLVLS != null && _direct != BufferFactory.isDirect(NLVLS)) - throw new RuntimeException("Argument \"NLVLS\" : Buffers passed to this method must all be either direct or indirect"); - if (PWBZ != null && _direct != BufferFactory.isDirect(PWBZ)) - throw new RuntimeException("Argument \"PWBZ\" : Buffers passed to this method must all be either direct or indirect"); - if (HWBZ != null && _direct != BufferFactory.isDirect(HWBZ)) - throw new RuntimeException("Argument \"HWBZ\" : Buffers passed to this method must all be either direct or indirect"); - if (TWBZ != null && _direct != BufferFactory.isDirect(TWBZ)) - throw new RuntimeException("Argument \"TWBZ\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - wbzero0(ELEV, BufferFactory.getDirectBufferByteOffset(ELEV), P, BufferFactory.getDirectBufferByteOffset(P), HT, BufferFactory.getDirectBufferByteOffset(HT), Tt, BufferFactory.getDirectBufferByteOffset(Tt), TD, BufferFactory.getDirectBufferByteOffset(TD), NLVLS, BufferFactory.getDirectBufferByteOffset(NLVLS), PWBZ, BufferFactory.getDirectBufferByteOffset(PWBZ), HWBZ, BufferFactory.getDirectBufferByteOffset(HWBZ), TWBZ, BufferFactory.getDirectBufferByteOffset(TWBZ)); - } else { - wbzero1(BufferFactory.getArray(ELEV), BufferFactory.getIndirectBufferByteOffset(ELEV), BufferFactory.getArray(P), BufferFactory.getIndirectBufferByteOffset(P), BufferFactory.getArray(HT), BufferFactory.getIndirectBufferByteOffset(HT), BufferFactory.getArray(Tt), BufferFactory.getIndirectBufferByteOffset(Tt), BufferFactory.getArray(TD), BufferFactory.getIndirectBufferByteOffset(TD), BufferFactory.getArray(NLVLS), BufferFactory.getIndirectBufferByteOffset(NLVLS), BufferFactory.getArray(PWBZ), BufferFactory.getIndirectBufferByteOffset(PWBZ), BufferFactory.getArray(HWBZ), BufferFactory.getIndirectBufferByteOffset(HWBZ), BufferFactory.getArray(TWBZ), BufferFactory.getIndirectBufferByteOffset(TWBZ)); - } - } - - /** Entry point to C language function:
void wbzero(float * ELEV, float * P, float * HT, float * Tt, float * TD, int * NLVLS, float * PWBZ, float * HWBZ, float * TWBZ); */ - private static native void wbzero0(Object ELEV, int ELEV_byte_offset, Object P, int P_byte_offset, Object HT, int HT_byte_offset, Object Tt, int Tt_byte_offset, Object TD, int TD_byte_offset, Object NLVLS, int NLVLS_byte_offset, Object PWBZ, int PWBZ_byte_offset, Object HWBZ, int HWBZ_byte_offset, Object TWBZ, int TWBZ_byte_offset); - - /** Entry point to C language function:
void wbzero(float * ELEV, float * P, float * HT, float * Tt, float * TD, int * NLVLS, float * PWBZ, float * HWBZ, float * TWBZ); */ - private static native void wbzero1(Object ELEV, int ELEV_byte_offset, Object P, int P_byte_offset, Object HT, int HT_byte_offset, Object Tt, int Tt_byte_offset, Object TD, int TD_byte_offset, Object NLVLS, int NLVLS_byte_offset, Object PWBZ, int PWBZ_byte_offset, Object HWBZ, int HWBZ_byte_offset, Object TWBZ, int TWBZ_byte_offset); - - /** Interface to C language function:
void wbzero(float * ELEV, float * P, float * HT, float * Tt, float * TD, int * NLVLS, float * PWBZ, float * HWBZ, float * TWBZ); */ - public static void wbzero(float[] ELEV, int ELEV_offset, float[] P, int P_offset, float[] HT, int HT_offset, float[] Tt, int Tt_offset, float[] TD, int TD_offset, int[] NLVLS, int NLVLS_offset, float[] PWBZ, int PWBZ_offset, float[] HWBZ, int HWBZ_offset, float[] TWBZ, int TWBZ_offset) - { - if(ELEV != null && ELEV.length <= ELEV_offset) - throw new RuntimeException("array offset argument \"ELEV_offset\" (" + ELEV_offset + ") equals or exceeds array length (" + ELEV.length + ")"); - if(P != null && P.length <= P_offset) - throw new RuntimeException("array offset argument \"P_offset\" (" + P_offset + ") equals or exceeds array length (" + P.length + ")"); - if(HT != null && HT.length <= HT_offset) - throw new RuntimeException("array offset argument \"HT_offset\" (" + HT_offset + ") equals or exceeds array length (" + HT.length + ")"); - if(Tt != null && Tt.length <= Tt_offset) - throw new RuntimeException("array offset argument \"Tt_offset\" (" + Tt_offset + ") equals or exceeds array length (" + Tt.length + ")"); - if(TD != null && TD.length <= TD_offset) - throw new RuntimeException("array offset argument \"TD_offset\" (" + TD_offset + ") equals or exceeds array length (" + TD.length + ")"); - if(NLVLS != null && NLVLS.length <= NLVLS_offset) - throw new RuntimeException("array offset argument \"NLVLS_offset\" (" + NLVLS_offset + ") equals or exceeds array length (" + NLVLS.length + ")"); - if(PWBZ != null && PWBZ.length <= PWBZ_offset) - throw new RuntimeException("array offset argument \"PWBZ_offset\" (" + PWBZ_offset + ") equals or exceeds array length (" + PWBZ.length + ")"); - if(HWBZ != null && HWBZ.length <= HWBZ_offset) - throw new RuntimeException("array offset argument \"HWBZ_offset\" (" + HWBZ_offset + ") equals or exceeds array length (" + HWBZ.length + ")"); - if(TWBZ != null && TWBZ.length <= TWBZ_offset) - throw new RuntimeException("array offset argument \"TWBZ_offset\" (" + TWBZ_offset + ") equals or exceeds array length (" + TWBZ.length + ")"); - wbzero1(ELEV, BufferFactory.SIZEOF_FLOAT * ELEV_offset, P, BufferFactory.SIZEOF_FLOAT * P_offset, HT, BufferFactory.SIZEOF_FLOAT * HT_offset, Tt, BufferFactory.SIZEOF_FLOAT * Tt_offset, TD, BufferFactory.SIZEOF_FLOAT * TD_offset, NLVLS, BufferFactory.SIZEOF_INT * NLVLS_offset, PWBZ, BufferFactory.SIZEOF_FLOAT * PWBZ_offset, HWBZ, BufferFactory.SIZEOF_FLOAT * HWBZ_offset, TWBZ, BufferFactory.SIZEOF_FLOAT * TWBZ_offset); - - } - - /** Interface to C language function:
void winddir(float * u, float * v, float * ff, int * mni, int * ni, int * nj); */ - public static void winddir(java.nio.FloatBuffer u, java.nio.FloatBuffer v, java.nio.FloatBuffer ff, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj) - { - boolean _direct = BufferFactory.isDirect(u); - if (v != null && _direct != BufferFactory.isDirect(v)) - throw new RuntimeException("Argument \"v\" : Buffers passed to this method must all be either direct or indirect"); - if (ff != null && _direct != BufferFactory.isDirect(ff)) - throw new RuntimeException("Argument \"ff\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - winddir0(u, BufferFactory.getDirectBufferByteOffset(u), v, BufferFactory.getDirectBufferByteOffset(v), ff, BufferFactory.getDirectBufferByteOffset(ff), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj)); - } else { - winddir1(BufferFactory.getArray(u), BufferFactory.getIndirectBufferByteOffset(u), BufferFactory.getArray(v), BufferFactory.getIndirectBufferByteOffset(v), BufferFactory.getArray(ff), BufferFactory.getIndirectBufferByteOffset(ff), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj)); - } - } - - /** Entry point to C language function:
void winddir(float * u, float * v, float * ff, int * mni, int * ni, int * nj); */ - private static native void winddir0(Object u, int u_byte_offset, Object v, int v_byte_offset, Object ff, int ff_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset); - - /** Entry point to C language function:
void winddir(float * u, float * v, float * ff, int * mni, int * ni, int * nj); */ - private static native void winddir1(Object u, int u_byte_offset, Object v, int v_byte_offset, Object ff, int ff_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset); - - /** Interface to C language function:
void winddir(float * u, float * v, float * ff, int * mni, int * ni, int * nj); */ - public static void winddir(float[] u, int u_offset, float[] v, int v_offset, float[] ff, int ff_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset) - { - if(u != null && u.length <= u_offset) - throw new RuntimeException("array offset argument \"u_offset\" (" + u_offset + ") equals or exceeds array length (" + u.length + ")"); - if(v != null && v.length <= v_offset) - throw new RuntimeException("array offset argument \"v_offset\" (" + v_offset + ") equals or exceeds array length (" + v.length + ")"); - if(ff != null && ff.length <= ff_offset) - throw new RuntimeException("array offset argument \"ff_offset\" (" + ff_offset + ") equals or exceeds array length (" + ff.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - winddir1(u, BufferFactory.SIZEOF_FLOAT * u_offset, v, BufferFactory.SIZEOF_FLOAT * v_offset, ff, BufferFactory.SIZEOF_FLOAT * ff_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset); - - } - - /** Interface to C language function:
void windspeed(float * u, float * v, float * ff, int * mni, int * ni, int * nj); */ - public static void windspeed(java.nio.FloatBuffer u, java.nio.FloatBuffer v, java.nio.FloatBuffer ff, java.nio.IntBuffer mni, java.nio.IntBuffer ni, java.nio.IntBuffer nj) - { - boolean _direct = BufferFactory.isDirect(u); - if (v != null && _direct != BufferFactory.isDirect(v)) - throw new RuntimeException("Argument \"v\" : Buffers passed to this method must all be either direct or indirect"); - if (ff != null && _direct != BufferFactory.isDirect(ff)) - throw new RuntimeException("Argument \"ff\" : Buffers passed to this method must all be either direct or indirect"); - if (mni != null && _direct != BufferFactory.isDirect(mni)) - throw new RuntimeException("Argument \"mni\" : Buffers passed to this method must all be either direct or indirect"); - if (ni != null && _direct != BufferFactory.isDirect(ni)) - throw new RuntimeException("Argument \"ni\" : Buffers passed to this method must all be either direct or indirect"); - if (nj != null && _direct != BufferFactory.isDirect(nj)) - throw new RuntimeException("Argument \"nj\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - windspeed0(u, BufferFactory.getDirectBufferByteOffset(u), v, BufferFactory.getDirectBufferByteOffset(v), ff, BufferFactory.getDirectBufferByteOffset(ff), mni, BufferFactory.getDirectBufferByteOffset(mni), ni, BufferFactory.getDirectBufferByteOffset(ni), nj, BufferFactory.getDirectBufferByteOffset(nj)); - } else { - windspeed1(BufferFactory.getArray(u), BufferFactory.getIndirectBufferByteOffset(u), BufferFactory.getArray(v), BufferFactory.getIndirectBufferByteOffset(v), BufferFactory.getArray(ff), BufferFactory.getIndirectBufferByteOffset(ff), BufferFactory.getArray(mni), BufferFactory.getIndirectBufferByteOffset(mni), BufferFactory.getArray(ni), BufferFactory.getIndirectBufferByteOffset(ni), BufferFactory.getArray(nj), BufferFactory.getIndirectBufferByteOffset(nj)); - } - } - - /** Entry point to C language function:
void windspeed(float * u, float * v, float * ff, int * mni, int * ni, int * nj); */ - private static native void windspeed0(Object u, int u_byte_offset, Object v, int v_byte_offset, Object ff, int ff_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset); - - /** Entry point to C language function:
void windspeed(float * u, float * v, float * ff, int * mni, int * ni, int * nj); */ - private static native void windspeed1(Object u, int u_byte_offset, Object v, int v_byte_offset, Object ff, int ff_byte_offset, Object mni, int mni_byte_offset, Object ni, int ni_byte_offset, Object nj, int nj_byte_offset); - - /** Interface to C language function:
void windspeed(float * u, float * v, float * ff, int * mni, int * ni, int * nj); */ - public static void windspeed(float[] u, int u_offset, float[] v, int v_offset, float[] ff, int ff_offset, int[] mni, int mni_offset, int[] ni, int ni_offset, int[] nj, int nj_offset) - { - if(u != null && u.length <= u_offset) - throw new RuntimeException("array offset argument \"u_offset\" (" + u_offset + ") equals or exceeds array length (" + u.length + ")"); - if(v != null && v.length <= v_offset) - throw new RuntimeException("array offset argument \"v_offset\" (" + v_offset + ") equals or exceeds array length (" + v.length + ")"); - if(ff != null && ff.length <= ff_offset) - throw new RuntimeException("array offset argument \"ff_offset\" (" + ff_offset + ") equals or exceeds array length (" + ff.length + ")"); - if(mni != null && mni.length <= mni_offset) - throw new RuntimeException("array offset argument \"mni_offset\" (" + mni_offset + ") equals or exceeds array length (" + mni.length + ")"); - if(ni != null && ni.length <= ni_offset) - throw new RuntimeException("array offset argument \"ni_offset\" (" + ni_offset + ") equals or exceeds array length (" + ni.length + ")"); - if(nj != null && nj.length <= nj_offset) - throw new RuntimeException("array offset argument \"nj_offset\" (" + nj_offset + ") equals or exceeds array length (" + nj.length + ")"); - windspeed1(u, BufferFactory.SIZEOF_FLOAT * u_offset, v, BufferFactory.SIZEOF_FLOAT * v_offset, ff, BufferFactory.SIZEOF_FLOAT * ff_offset, mni, BufferFactory.SIZEOF_INT * mni_offset, ni, BufferFactory.SIZEOF_INT * ni_offset, nj, BufferFactory.SIZEOF_INT * nj_offset); - - } - - /** Interface to C language function:
void wndrho(float * RHO, float * HT, int * NLVLS, float * HW, int * NW, float * RHOW); */ - public static void wndrho(java.nio.FloatBuffer RHO, java.nio.FloatBuffer HT, java.nio.IntBuffer NLVLS, java.nio.FloatBuffer HW, java.nio.IntBuffer NW, java.nio.FloatBuffer RHOW) - { - boolean _direct = BufferFactory.isDirect(RHO); - if (HT != null && _direct != BufferFactory.isDirect(HT)) - throw new RuntimeException("Argument \"HT\" : Buffers passed to this method must all be either direct or indirect"); - if (NLVLS != null && _direct != BufferFactory.isDirect(NLVLS)) - throw new RuntimeException("Argument \"NLVLS\" : Buffers passed to this method must all be either direct or indirect"); - if (HW != null && _direct != BufferFactory.isDirect(HW)) - throw new RuntimeException("Argument \"HW\" : Buffers passed to this method must all be either direct or indirect"); - if (NW != null && _direct != BufferFactory.isDirect(NW)) - throw new RuntimeException("Argument \"NW\" : Buffers passed to this method must all be either direct or indirect"); - if (RHOW != null && _direct != BufferFactory.isDirect(RHOW)) - throw new RuntimeException("Argument \"RHOW\" : Buffers passed to this method must all be either direct or indirect"); - if (_direct) { - wndrho0(RHO, BufferFactory.getDirectBufferByteOffset(RHO), HT, BufferFactory.getDirectBufferByteOffset(HT), NLVLS, BufferFactory.getDirectBufferByteOffset(NLVLS), HW, BufferFactory.getDirectBufferByteOffset(HW), NW, BufferFactory.getDirectBufferByteOffset(NW), RHOW, BufferFactory.getDirectBufferByteOffset(RHOW)); - } else { - wndrho1(BufferFactory.getArray(RHO), BufferFactory.getIndirectBufferByteOffset(RHO), BufferFactory.getArray(HT), BufferFactory.getIndirectBufferByteOffset(HT), BufferFactory.getArray(NLVLS), BufferFactory.getIndirectBufferByteOffset(NLVLS), BufferFactory.getArray(HW), BufferFactory.getIndirectBufferByteOffset(HW), BufferFactory.getArray(NW), BufferFactory.getIndirectBufferByteOffset(NW), BufferFactory.getArray(RHOW), BufferFactory.getIndirectBufferByteOffset(RHOW)); - } - } - - /** Entry point to C language function:
void wndrho(float * RHO, float * HT, int * NLVLS, float * HW, int * NW, float * RHOW); */ - private static native void wndrho0(Object RHO, int RHO_byte_offset, Object HT, int HT_byte_offset, Object NLVLS, int NLVLS_byte_offset, Object HW, int HW_byte_offset, Object NW, int NW_byte_offset, Object RHOW, int RHOW_byte_offset); - - /** Entry point to C language function:
void wndrho(float * RHO, float * HT, int * NLVLS, float * HW, int * NW, float * RHOW); */ - private static native void wndrho1(Object RHO, int RHO_byte_offset, Object HT, int HT_byte_offset, Object NLVLS, int NLVLS_byte_offset, Object HW, int HW_byte_offset, Object NW, int NW_byte_offset, Object RHOW, int RHOW_byte_offset); - - /** Interface to C language function:
void wndrho(float * RHO, float * HT, int * NLVLS, float * HW, int * NW, float * RHOW); */ - public static void wndrho(float[] RHO, int RHO_offset, float[] HT, int HT_offset, int[] NLVLS, int NLVLS_offset, float[] HW, int HW_offset, int[] NW, int NW_offset, float[] RHOW, int RHOW_offset) - { - if(RHO != null && RHO.length <= RHO_offset) - throw new RuntimeException("array offset argument \"RHO_offset\" (" + RHO_offset + ") equals or exceeds array length (" + RHO.length + ")"); - if(HT != null && HT.length <= HT_offset) - throw new RuntimeException("array offset argument \"HT_offset\" (" + HT_offset + ") equals or exceeds array length (" + HT.length + ")"); - if(NLVLS != null && NLVLS.length <= NLVLS_offset) - throw new RuntimeException("array offset argument \"NLVLS_offset\" (" + NLVLS_offset + ") equals or exceeds array length (" + NLVLS.length + ")"); - if(HW != null && HW.length <= HW_offset) - throw new RuntimeException("array offset argument \"HW_offset\" (" + HW_offset + ") equals or exceeds array length (" + HW.length + ")"); - if(NW != null && NW.length <= NW_offset) - throw new RuntimeException("array offset argument \"NW_offset\" (" + NW_offset + ") equals or exceeds array length (" + NW.length + ")"); - if(RHOW != null && RHOW.length <= RHOW_offset) - throw new RuntimeException("array offset argument \"RHOW_offset\" (" + RHOW_offset + ") equals or exceeds array length (" + RHOW.length + ")"); - wndrho1(RHO, BufferFactory.SIZEOF_FLOAT * RHO_offset, HT, BufferFactory.SIZEOF_FLOAT * HT_offset, NLVLS, BufferFactory.SIZEOF_INT * NLVLS_offset, HW, BufferFactory.SIZEOF_FLOAT * HW_offset, NW, BufferFactory.SIZEOF_INT * NW_offset, RHOW, BufferFactory.SIZEOF_FLOAT * RHOW_offset); - - } - - /** Interface to C language function:
float ztopsa(float * ); */ - public static float ztopsa(java.nio.FloatBuffer arg0) - { - boolean _direct = BufferFactory.isDirect(arg0); - if (_direct) { - return ztopsa0(arg0, BufferFactory.getDirectBufferByteOffset(arg0)); - } else { - return ztopsa1(BufferFactory.getArray(arg0), BufferFactory.getIndirectBufferByteOffset(arg0)); - } - } - - /** Entry point to C language function:
float ztopsa(float * ); */ - private static native float ztopsa0(Object arg0, int arg0_byte_offset); - - /** Entry point to C language function:
float ztopsa(float * ); */ - private static native float ztopsa1(Object arg0, int arg0_byte_offset); - - /** Interface to C language function:
float ztopsa(float * ); */ - public static float ztopsa(float[] arg0, int arg0_offset) - { - if(arg0 != null && arg0.length <= arg0_offset) - throw new RuntimeException("array offset argument \"arg0_offset\" (" + arg0_offset + ") equals or exceeds array length (" + arg0.length + ")"); - return ztopsa1(arg0, BufferFactory.SIZEOF_FLOAT * arg0_offset); - - } - - -} // end of class Meteolibrary diff --git a/edexOsgi/meteolib.jni/src/meteolib/jni/Activator.java b/edexOsgi/meteolib.jni/src/meteolib/jni/Activator.java deleted file mode 100644 index 56fce3b33b..0000000000 --- a/edexOsgi/meteolib.jni/src/meteolib/jni/Activator.java +++ /dev/null @@ -1,156 +0,0 @@ -package meteolib.jni; - -import java.io.IOException; -import java.net.URL; -import java.util.Enumeration; - -import org.eclipse.core.runtime.FileLocator; -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.osgi.framework.Bundle; -import org.osgi.framework.BundleContext; -import org.apache.commons.lang.SystemUtils; - -/** - * The activator class controls the plug-in life cycle - */ -public class Activator extends AbstractUIPlugin { - - // The plug-in ID - public static final String PLUGIN_ID = "meteolib.jni"; - - private static final String METEOLIB = "meteoLib"; - private static final String METEOLIB_LIBRARY_NAME = - System.mapLibraryName(METEOLIB); - - // The shared instance - private static Activator plugin; - - private static String nativeLibraryPath; - - /** - * The constructor - */ - public Activator() { - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext - * ) - */ - @Override - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - nativeLibraryPath = findNativeLibraryPath(); - } - - /** - * - * @return the location of the meteolib native library - * @throws IOException - */ - public static String getNativeLibraryPath() throws IOException { - - if (nativeLibraryPath == null) { - nativeLibraryPath = findNativeLibraryPath(); - } - - return nativeLibraryPath; - } - - private static String findNativeLibraryPath() throws IOException { - Bundle b = Activator.getDefault().getBundle(); - @SuppressWarnings("unchecked") - Enumeration enumeration = - b.findEntries("/", METEOLIB_LIBRARY_NAME, true); - - /* - * We should have one element. - */ - if (!enumeration.hasMoreElements()) - { - return null; - } - - /* - * Extract the location of the shared library. - */ - URL url = - FileLocator.resolve((URL) enumeration.nextElement()); - /* - * Will be the empty string if it does - * not exist. - */ - String nativeLibraryPath = - url.getFile(); - if (nativeLibraryPath == null || nativeLibraryPath.equalsIgnoreCase("")) - { - return null; - } - - /* - * We do not need to reformat the path for Windows here because - * Java does not care. - */ - System.load(nativeLibraryPath); - - // Re-format for Windows. - if (SystemUtils.IS_OS_WINDOWS) - { - /* - * We reformat here because this is the path that will be - * returned to python scripts that use the meteoLib library. - */ - return formatWindowsPath(nativeLibraryPath); - } - - return nativeLibraryPath; - } - - private static String formatWindowsPath(String nativeLibraryPath) { - /* - * Remove the leading "/" if there is one. - */ - if (nativeLibraryPath.startsWith("/")) - { - int length = nativeLibraryPath.length(); - nativeLibraryPath = nativeLibraryPath.substring(1, length); - } - - /* - * Replace all file path separators with the Windows version of - * a file path separator. - */ - if (nativeLibraryPath.contains("/")) - { - nativeLibraryPath = nativeLibraryPath.replace("/", "\\"); - } - - return nativeLibraryPath; - } - - /* - * (non-Javadoc) - * - * @see - * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext - * ) - */ - @Override - public void stop(BundleContext context) throws Exception { - plugin = null; - super.stop(context); - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static Activator getDefault() { - return plugin; - } -} \ No newline at end of file diff --git a/edexOsgi/meteolib.jni/update.xml b/edexOsgi/meteolib.jni/update.xml deleted file mode 100644 index cab08d32d4..0000000000 --- a/edexOsgi/meteolib.jni/update.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - Update the so and the java from the files built through the native - library build system. - - - - - - - - - - - diff --git a/nativeLib/rary.meteorological/.cproject b/nativeLib/rary.meteorological/.cproject deleted file mode 100644 index 9d280da42d..0000000000 --- a/nativeLib/rary.meteorological/.cproject +++ /dev/null @@ -1,504 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/nativeLib/rary.meteorological/.gitignore b/nativeLib/rary.meteorological/.gitignore deleted file mode 100644 index b037bec333..0000000000 --- a/nativeLib/rary.meteorological/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/i386-pc-linux-gnu.debug diff --git a/nativeLib/rary.meteorological/.project b/nativeLib/rary.meteorological/.project deleted file mode 100644 index 1f8115a715..0000000000 --- a/nativeLib/rary.meteorological/.project +++ /dev/null @@ -1,84 +0,0 @@ - - - rary.meteorological - - - build.native - rary.cots.java - tool.gluegen - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, - - - ?name? - - - - org.eclipse.cdt.make.core.append_environment - true - - - org.eclipse.cdt.make.core.autoBuildTarget - all - - - org.eclipse.cdt.make.core.buildArguments - -j2 - - - org.eclipse.cdt.make.core.buildCommand - make - - - org.eclipse.cdt.make.core.buildLocation - ${workspace_loc:/rary.meteorological/i386-pc-linux-gnu.debug-sysv} - - - org.eclipse.cdt.make.core.cleanBuildTarget - clean - - - org.eclipse.cdt.make.core.contents - org.eclipse.cdt.make.core.activeConfigSettings - - - org.eclipse.cdt.make.core.enableAutoBuild - false - - - org.eclipse.cdt.make.core.enableCleanBuild - true - - - org.eclipse.cdt.make.core.enableFullBuild - true - - - org.eclipse.cdt.make.core.fullBuildTarget - all - - - org.eclipse.cdt.make.core.stopOnError - true - - - org.eclipse.cdt.make.core.useDefaultBuildCmd - true - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.core.cnature - - diff --git a/nativeLib/rary.meteorological/.settings/org.eclipse.cdt.core.prefs b/nativeLib/rary.meteorological/.settings/org.eclipse.cdt.core.prefs deleted file mode 100644 index 16f0337a29..0000000000 --- a/nativeLib/rary.meteorological/.settings/org.eclipse.cdt.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -#Wed Feb 01 17:07:12 CST 2012 -eclipse.preferences.version=1 -environment/project/cdt.managedbuild.config.gnu.so.debug.630675783.1284293642= -environment/project/cdt.managedbuild.config.gnu.so.debug.630675783.1284293642/COMPILE_FILETYPE/delimiter=; -environment/project/cdt.managedbuild.config.gnu.so.debug.630675783.1284293642/COMPILE_FILETYPE/operation=append -environment/project/cdt.managedbuild.config.gnu.so.debug.630675783.1284293642/COMPILE_FILETYPE/value=../../tool.gluegen/etc -environment/project/cdt.managedbuild.config.gnu.so.debug.630675783.1284293642/PATH/delimiter=; -environment/project/cdt.managedbuild.config.gnu.so.debug.630675783.1284293642/PATH/operation=replace -environment/project/cdt.managedbuild.config.gnu.so.debug.630675783.1284293642/PATH/value=../../tool.gluegen/bin\:${env_var\:PATH} -environment/project/cdt.managedbuild.config.gnu.so.debug.630675783.1284293642/append=true -environment/project/cdt.managedbuild.config.gnu.so.debug.630675783.1284293642/appendContributed=true diff --git a/nativeLib/rary.meteorological/.settings/org.eclipse.core.runtime.prefs b/nativeLib/rary.meteorological/.settings/org.eclipse.core.runtime.prefs deleted file mode 100644 index e8c348c590..0000000000 --- a/nativeLib/rary.meteorological/.settings/org.eclipse.core.runtime.prefs +++ /dev/null @@ -1,4 +0,0 @@ -#Fri Oct 02 11:43:38 CDT 2009 -content-types/enabled=true -content-types/org.eclipse.cdt.core.cSource/file-extensions=f,ggen -eclipse.preferences.version=1 diff --git a/nativeLib/rary.meteorological/doc/MeteoLib Documentation.pdf b/nativeLib/rary.meteorological/doc/MeteoLib Documentation.pdf deleted file mode 100644 index 259a861377..0000000000 Binary files a/nativeLib/rary.meteorological/doc/MeteoLib Documentation.pdf and /dev/null differ diff --git a/nativeLib/rary.meteorological/gluegen/meteoLib.ggen b/nativeLib/rary.meteorological/gluegen/meteoLib.ggen deleted file mode 100644 index 03d919dbb6..0000000000 --- a/nativeLib/rary.meteorological/gluegen/meteoLib.ggen +++ /dev/null @@ -1,10 +0,0 @@ -/* - - Package com.raytheon.edex.meteolibrary - Style AllStatic - JavaClass Meteolibrary - CustomCCode #include "meteoLib.h" - -*/ - -#include "meteoLib.h" diff --git a/nativeLib/rary.meteorological/inc/ExtFtn.h b/nativeLib/rary.meteorological/inc/ExtFtn.h deleted file mode 100755 index c762bd74df..0000000000 --- a/nativeLib/rary.meteorological/inc/ExtFtn.h +++ /dev/null @@ -1,115 +0,0 @@ -/* -This software is in the public domain, furnished "as is", without technical -support, and with no warranty, express or implied, as to its usefulness for -any purpose. - -ExtFtn.h - -Some fortran compilers mangle the external symbols so that they do not -conflict with symbols from modules written in other languages. In order -to link an executable that calls Fortran functions from a C function, the -C function must reference the mangled name. - -This macro performs the following mangling operations on a Fortran function -depending on the following compilation switches. - --DFTN_PREPEND_UNDERSCORE (i.e. _ftnfunc) --DFTN_APPEND_UNDERSCORE(i.e. ftnfunc_) --DFTN_PREPEND_DOUBLESCORE (i.e. __ftnfunc) --DFTN_APPEND_DOUBLESCORE (i.e. ftnfunc__) - -If no switches are used, then no name mangling is done. - -All external fortran declarations should be replaced with a call to -this macro: - -EXT_FTN (funcReturnValue, funcName, funcArgs) - -For example, the declaration: - -extern "C" void gridbarbs(const float* uudd, const float* vvff); - -becomes - -EXT_FTN (void, gridbarbs, (const float* uudd, const float* vvff)) - -We know this is kind of ugly. Ideally, you would just replace -extern "C" with EXT_FTN. Unfortunately, the C preprocessor won't -allow that. - --- implementation --------------------------------------------------------- - -This macro does two jobs. First task is to come up with a new -external declaration with the mangled name, which is fairly trivial. - -The second task is to make sure all invocations of the function -reference the mangled function name. This is not so trivial. -If CPP allowed us to nest macros definitions, we could do something like this: - - #ifdef FTN_APPEND_UNDERSCORE - #define EXT_FUN(rval,fn,args)\ - extern "C" rval fn ## _ args;\ - #define fn fn ## _ - #endif - -But the CPP is not that sophisticated. The alternative we came up with -is to use a function pointer. The name of the pointer is the non-mangled -function name, and it is initialized to point to the mangled function. - -This works but there is a few loose ends we had to tie down. The -function pointer has to be file scope (static). If its global, -it would be very easy to have duplicate symbols defined. It is -possible that the declaration could be in a header file with lots -of other Fortran declarations. If a module never references a -declaration, GCC will spit out an unused variable warning for the -function pointer that goes with the declaration. To get around -that, we use the GCC builtin unused attribute. Not pretty, but -does the trick. - -One final note. We originally intended the compiler switches to be more -flexible where a prefix and a suffix string can be specified. Unfortunately, -due to limitations of the CPP, we couldn't get that to work. -*/ - -#ifndef _ExtFtn_h -#define _ExtFtn_h - -#ifdef __GNUC__ - #define __UNUSED __attribute__ ((unused)) -#else - #define __UNUSED -#endif - -#ifdef __cplusplus - #define EXTERN_C extern "C" -#else - #define EXTERN_C extern -#endif - -#define EXT_FTN__(funcReturnVal,funcName,funcArgs,pre,post)\ - EXTERN_C funcReturnVal pre ## funcName ## post funcArgs;\ - static funcReturnVal (*funcName) funcArgs __UNUSED=pre ## funcName ## post; - -#if defined (FTN_APPEND_UNDERSCORE) - #define EXT_FTN(funcReturnVal,funcName,funcArgs)\ - EXT_FTN__(funcReturnVal,funcName,funcArgs, ,_) - #define FTN_MANGLE(funcName) funcName ## _ -#elif defined (FTN_PREPEND_UNDERSCORE) - #define EXT_FTN(funcReturnVal,funcName,funcArgs)\ - EXT_FTN__(funcReturnVal,funcName,funcArgs,_, ) - #define FTN_MANGLE(funcName) _ ## funcName -#elif defined (FTN_PREPEND_DOUBLESCORE) - #define EXT_FTN(funcReturnVal,funcName,funcArgs)\ - EXT_FTN__(funcReturnVal,funcName,funcArgs,__, ) - #define FTN_MANGLE(funcName) __ ## funcName -#elif defined (FTN_APPEND_DOUBLESCORE) - #define EXT_FTN(funcReturnVal,funcName,funcArgs)\ - EXT_FTN__(funcReturnVal,funcName,funcArgs, ,__) - #define FTN_MANGLE(funcName) funcName ## __ -#else - #define EXT_FTN(funcReturnVal,funcName,funcArgs)\ - EXTERN_C funcReturnVal funcName funcArgs; - #define FTN_MANGLE(funcName) funcName -#endif - -#endif diff --git a/nativeLib/rary.meteorological/inc/meteoLib.h b/nativeLib/rary.meteorological/inc/meteoLib.h deleted file mode 100644 index 4495a80c77..0000000000 --- a/nativeLib/rary.meteorological/inc/meteoLib.h +++ /dev/null @@ -1,524 +0,0 @@ - -#ifndef _meteoLib_h -#define _meteoLib_h - -#include "ExtFtn.h" - -static int VortFun __UNUSED =1; -static int DivFun __UNUSED =2; -static int VadvFun __UNUSED =3; -static int ParDivFun __UNUSED =4; -static int AdvFun __UNUSED =5; -static int LaplFun __UNUSED =6; -static int GradFun __UNUSED =7; -static int GeoFun __UNUSED =8; -static int DefFun __UNUSED =9; -static int DefVecFun __UNUSED =10; -/*static int GeoDefFun __UNUSED =11;*/ -/*static int GeoDefVecFun __UNUSED =12;*/ -/*static int AgeoFun __UNUSED =13;*/ -static int RidgeFun __UNUSED =14; -static int VcontFun __UNUSED =17; - -/* Not called from Fortran or implemented in Fortran */ -//extern "C" { - -float adiabatic_te (const float * temp, const float * press); - -float calcHeatIndex (float temp, float dewPoint); - -float calcWindChill (float temp, float windSpd); - -void heliComp(const float ** u, const float ** v, float * umot, float * vmot, - int mnx, int nx, int ny, int nz, - float * heli); - -void defineSlice(const float ** vc3d, const float ** param3d, - int mnx, int nx, int ny, int nz, float param, int sense, - float * vc2d); - -void createSlice(const float ** vc3d, float * vc2d, const float ** slice3d, - int mnx, int nx, int ny, int nz, int sense, - float * slice); - -void sampleSlice(const float ** vc3d, float * vc2d, const float ** slice3d, - int mnx, int nx, int ny, int nz, int sense, int hyb, - float * slice); - -void defineSlices(float * vc3d, int senseA, - float * param3d, int senseB, - int nx, int ny, int nz, - float * paramC, int nc, float * vcC); - -void createSlices(float * vc3d, float * param3d, int sense, - int nx, int ny, int nz, - float * vcC, int nc, float * paramC); - -int capeFunc(float usetv, const float ** p_dat, const float ** tve_dat, - float * p0, float * th0, float * sh0, - int mnx, int nx, int ny, int nz, - float * cape_dat, float * cin_dat); - -int dcapeFunc(float usetv, const float ** p_dat, const float ** t_dat, const float ** - td_dat, float * p0, float * th0, float * sh0, - int mnx, int nx, int ny, int nz, - float max_evap, float max_rh, float * dcape_dat); -//} -EXT_FTN (void, g2gkinematics, (float * Udx, float * Vdy, float * Par, - float * SpaX, float * SpaY, - int * mnx, int * mny, int * nx, int * ny, - int * choice, float * Scalar)) - -EXT_FTN (void, alt2press, (float * alt, float * z, - int * mni, int * ni, int * nj, float * p)) - -EXT_FTN (void, hgt2pres, (float * z, float * p, - int * mni, int * ni, int * nj)) - -EXT_FTN (void, add_by_cnst, (float * a, float * cnst, float * result, - int * mni, int * ni, int * nj)) - -EXT_FTN (void, mult_by_cnst, (float * a, float * cnst, float * result, - int * mni, int * ni, int * nj)) - -EXT_FTN (void, max_min, (float * a, float * b, float * result, - int * mni, int * ni, int * nj, int * mode)) - -EXT_FTN (void, add_aray, (float * a, float * b, float * result, - int * mni, int * ni, int * nj, int * mode)) - -EXT_FTN (void, sub_aray, (float * inp, float * b, float * result, - int * mni, int * ni, int * nj)) - -EXT_FTN (void, ver_pts, (float * a, float * count, int * init, - int * mni, int * ni, int * nj)) - -EXT_FTN (void, lintrans, (float * a, float * mult, float * add, float * result, - int * mni, int * ni, int * nj)) - -EXT_FTN (void, replinrange, (float * a, int * tsttyp, float * lo, float * hi, - float * repl, - float * result, int * mni, int * ni, int * nj)) - -EXT_FTN (void, dist_filter, (float * a, float * npts, float * result, - int * mni, int * ni, int * nj)) - -EXT_FTN (void, calccondpr, (float * p, float * t, float * rh, - int * mni, int * ni, int * nj, float * q)) - -EXT_FTN (void, calccondprdef, (float * p, float * t, float * rh, - int * mni, int * ni, int * nj, float * q)) - -EXT_FTN (void, calcdpd, (float * t, float * rh, - int * mni, int * ni, int * nj, float * dpd)) - -EXT_FTN (void, calctd, (float * t, float * rh, - int * mni, int * ni, int * nj, float * td)) - -EXT_FTN (void, calctd2, (float * p, float * t, float * q, - int * mni, int * ni, int * nj, float * td)) - -EXT_FTN (void, calctw, (float * p, float * t, float * rh, - int * mni, int * ni, int * nj, float * tw)) - -EXT_FTN (float, mytw, (float * t, float * td, float * p)); - -EXT_FTN (void, spechum, (float * p, float * t, float * rh, - int * mni, int * ni, int * nj, float * q)) - -EXT_FTN (void, mixrat, (float * p, float * t, float * rh, - int * mni, int * ni, int * nj, float * q)) - -EXT_FTN (void, spechum2, (float * p, float * td, - int * mni, int * ni, int * nj, float * q)) - -EXT_FTN (void, calcthetae, (float * p, float * t, float * rh, - int * mni, int * ni, int * nj, float * q)) - -EXT_FTN (void, calcthetae2, (float * p, float * t, float * td, - int * mni, int * ni, int * nj, float * q)) - -EXT_FTN (void, calcrh, (float * t, float * td, - int * mni, int * ni, int * nj, float * rh)) - -EXT_FTN (void, calcrh2, (float * p, float * t, float * q, - int * mni, int * ni, int * nj, float * rh)) - -EXT_FTN (void, windspeed, (float * u, float * v, float * ff, - int * mni, int * ni, int * nj)) - -EXT_FTN (void, winddir, (float * u, float * v, float * ff, - int * mni, int * ni, int * nj)) - -EXT_FTN (void, temp2theta, (float * p, int * aflgp, float * t, int * aflgt, - float * theta, int * mni, int * ni, int * nj)) - -EXT_FTN (void, theta2temp, (float * p, int * aflgp, float * theta, - int * aflgth, - float * t, int * mni, int * ni, int * nj)) - -EXT_FTN (void, tv2temp, (float * tv, float * q, - int * mni, int * ni, int * nj, float * t)) - -EXT_FTN (void, calctv, (float * p, float * t, float * rh, - int * mni, int * ni, int * nj, float * tv)) - -EXT_FTN (void, calctv2, (float * t, float * q, - int * mni, int * ni, int * nj, float * tv)) - -EXT_FTN (void, calcpv, (float * p_up, float * p_low, - float * o_up, float * o_low, float * pvort, - int * mni, int * ni, int * nj, - float * u_up, float * v_up, float * u_low,float *v_low, - float * avort1, float * avort2, - float * dx, float * dy, float * coriolis)) - -EXT_FTN (void, pvpres, (float * t_up, float * t_low, float * p_up,float* p_low, - float * pvort, int * mni, int * ni, int * nj, - float * u_up, float * v_up, float * u_low, - float * v_low, - float * avort1, float * avort2, - float * dtdx1, float * dtdy1, float * dtdx2, - float * dtdy2, - float * dx, float * dy, float * coriolis)) - -EXT_FTN (void, lapserate, (float * tlo, float * pzlo, float * thi, - float * pzhi, - int * vc, int * mnx, int * nx, int * ny, - float * lapse)) - -EXT_FTN (void, calcli, (float * p, float * t, float * rh, - float * t5, float * p5, - int * mni, int * ni, int * nj, float * li)) - -EXT_FTN (void, sweatidx, (float * tt, float * td8, - float * u8, float * v8, float * u5, float * v5, - int * mni, int * ni, int * nj, float * q)) - -EXT_FTN (void, derivative, (float * a1, float * a2, float * b1, float * b2, - float * result, int * mni, int * ni, int * nj)) - -EXT_FTN (void, div_aray, (float * a, float * b, - float * result, int * mni, int * ni, int * nj)) - -EXT_FTN (void, mult_aray, (float * a, float * b, - float * result, int * mni, int * ni, int * nj)) - -EXT_FTN (void, dotvectors, (float * aX, float * aY, float * bX, float * bY, - float * result, int * mni, int * ni, int * nj)) - -EXT_FTN (void, crossvectors, (float * aX, float * aY, float * bX, float * bY, - float * result, int * mni, int * ni, int * nj)) - -EXT_FTN (void, rotvectors, (float * aX, float * aY, - float * angle, float * bX, float * bY, - int * mni, int * ni, int * nj)) - -EXT_FTN (void, exp_aray, (float * a, float * b, - int * mni, int * ni, int * nj)) - -EXT_FTN (void, natlog, (float * a, float * b, - int * mni, int * ni, int * nj)) - -EXT_FTN (void, powercalc, (float * a, float * b, - float * result, int * mni, int * ni, int * nj)) - -EXT_FTN (void, mslp2thkns, (float * mslp, float * hgt, - float * thkns, int * mni, int * ni, int * nj)) - -EXT_FTN (void, nadgdt, (float * u, float * v, float * a, - int * mni, int * ni, int * nj, - float * dx, float * dy, - float * dadxdt, float * dadydt)) - -EXT_FTN (void, comp_by, (float * u, float * v, float * uu, float * vv, - int * mni, int * ni, int * nj, float * control, - float * comp, float * comp2)) - -EXT_FTN (void, setqsmooth, (int * npass, float * smthwgt)) - -EXT_FTN (void, slqvect, (float * z, float * t, float * p, - float * dx, float * dy, float * coriolis, - int * mni, int * ni, int * nj, - float * slqx, float * slqy, - float * dugdx, float * dugdy, float * dvgdx, - float * dvgdy, - float * dtdx, float * dtdy)) - -EXT_FTN (void, qvector, (float * zmid, float * ztop, float * zbot, - float * ptop, float * pbot, - int * mni, int * ni, int * nj, - float * dx, float * dy, float * f, - float * dugdx, float * dvgdx, float * dugdy, - float * dvgdy, - float * dtdx, float * dtdy, float * qx, float * qy)) - -EXT_FTN (void, slfront, (float * z, float * t, float * p, - float * dx, float * dy, float * coriolis, - int * mni, int * ni, int * nj, float * fgen, - float * slqx, float * slqy, - float * w1, float * w2, float * w3, - float * dtdx, float * dtdy)) - -EXT_FTN (void, frontogen, (float * zmid, float * ztop, float * zbot, - float * ptop, float * pbot, - int * mni, int * ni, int * nj, - float * dx, float * dy, float * f, - float * w1, float * w2, float * w3, - float * dtdx, float * dtdy, float * qx, float * qy, - float * fgen)) - -EXT_FTN (void, fndiverg, (float * zmid, float * ztop, float * zbot, - float * ptop, float * pbot, - int * mni, int * ni, int * nj, - float * dx, float * dy, float * f, - float * fnx, float * fny, float * w1, - float * dtdx, float * dtdy, float * qx, float * qy, - float * fndiv)) - -EXT_FTN (void, fsdiverg, (float * zmid, float * ztop, float * zbot, - float * ptop, float * pbot, - int * mni, int * ni, int * nj, - float * dx, float * dy, float * f, - float * fsx, float * fsy, float * w1, - float * dtdx, float * dtdy, float * qx, float * qy, - float * fsdiv)) - -EXT_FTN (float, ptozsa, (float *)) - -EXT_FTN (float, ztopsa, (float *)) - -EXT_FTN (void, interp, ( float p1, float p2, float temp1, float temp2, - float td1, float td2, float levelP, - float * interT, float * interTd )) - -EXT_FTN (void, calckidx, (float * press, float * temp, float * td, - int numOfLevel, float * K )) - -EXT_FTN (void, calctotidx, (float * press, float * temp, float * td, - int numOfLevel, float * total )) - -EXT_FTN (void, radiation, (float * lat, float * lng, float * lsm, int * jd, - float * hr, float * bext, float * od, - float * solrad )) - -EXT_FTN (void, richno, (float * HT, float * HW, float * UW, float * VW, - float * RHO, - int * NLVLS, int * NW, float * BUOY, float * RICHNUM)) - -EXT_FTN (void, wndrho, (float * RHO, float * HT, int * NLVLS, - float * HW, int * NW, float * RHOW)) - -EXT_FTN (void, density, (float * P, float * TVIR, int * NLVLS, float * RHO)) - -EXT_FTN (float, interp1, (float *, float *, float *, float *, float *)) - -EXT_FTN (float, dzdlnp, (float *, float *, float *)) - -EXT_FTN (float, rang2d, (const float * data, int * mnx, int * nx, int * ny, - float * minData, float * maxData)) - -EXT_FTN (void, avwind, (float * ELEV, float * TOP, float * BOT, float * HW, - float * PW, float * TW, float * UW, float * VW, - int * NW, - float * UAVG, float * VAVG, float * AVDIR, - float * AVSPD)) - -EXT_FTN (void, ctop, (float * P, float * HT, float * VV, - float * PEQLEV, int * NPAR, float * CLDTOP)) - -EXT_FTN (void, eqlev, (float * P, float * HT, float * TP, float * TE, - float * PLFC, - float * EPTPAR, int * NPAR, float * PEQLEV, - float * HEQLEV, float * TEQLEV)) - -EXT_FTN (void, hailsiz, (float * VVMAX, float * HSIZE)) - -EXT_FTN (void, mxtp, (float * ANSOL, float * DELTAP, - float * SFCP, float * P2, float * TL, - float * DELTAZ, int * LVL, float * CTMAX)) - -EXT_FTN (void, liftedp, (float * P, float * T, float * HT, - float * TVIR, int * NLVLS, - int * NPAR, float * PCB, float * HCB, - float * TCB, float * WCB, - float * THDPAR, float * EPTPAR, - float * PL, float * TL, - float * PP, float * HTP, float * TP, - float * TVIRP, float * TE, - float * TVIRE, int * NPARCEL)) - -EXT_FTN (void, sweat, (float * P, float * T, float * TD, - int * NLVLS, float * PW, float * UW, - float * VW, int * NW, float * SWIDX)) - -EXT_FTN (void, uvcomp, (float * DIR, float * SPD, - float * U, float * V, int * NLVLS)) - -EXT_FTN (void, cclpar, (float * MIX, float * P, - float * HT, float * T, int * NLVLS, - float * PCCL, float * TCCL, float * HCCL)) - -EXT_FTN (void, lclpar, (float * MIX, float * TS, - float * P, float * HT, float * T, float * TD, - int * NLVLS, float * PLCL, float * TLCL, float * HLCL)) - -EXT_FTN (void, lfcpar, (float * EPTPAR, float * PCB, - float * TCB, float * HCB, float * T1, float * T2, - float * P1, float * HT1, int * NPAR, - float * PLFC1, float * HLFC1, float * TLFC1, - float * PLFC2, float * HLFC2, float * TLFC2)) - -EXT_FTN (void, ddff, (float * U, float * V, float * DIR, - float * SPD, int * NLVLS)) - -EXT_FTN (void, frzlev, (float * ELEV, float * P, - float * HT, float * T, int * NLVLS, - float * PFRZ, float * HFRZ)) - -EXT_FTN (void, intpos, (float * VDIF, float * HT, - float * P, float * T, int * NLVLS)) - -EXT_FTN (void, negarea, (float * PCB, float * TCB, float * HCB, float * PLFC, - float * HLFC, float * TLFC, - float * THDPAR, float * EPTPAR, - float * P, float * HT, float * TE, - float * TP, int * NPAR, - float * CINFRMCAPE, float * NEGBUOY)) - -EXT_FTN (void, posarea, (float * PLFC, float * PEQLEV, - float * TLFC, float * TEQLEV, - float * HLFC, float * HEQLEV, - float * EPTPAR, float * P, - float * HT, float * TE, - float * TP, int * NPAR, float * BUOY, float * CIN)) - -EXT_FTN (void, totals, (float * P, float * T, float * TD, - int * NLVLS, float * TOTIDX, - float * CRSTOT, float * VERTOT)) - -EXT_FTN (void, vvel, (float * pcb, float * PEQLEV, - float * P, float * HT, float * TP, - float * TVE, float * TVP, float * WLCL, int * NPAR, - float * VV, float * VVMAX)) - -EXT_FTN (float, esat, (float * T)) - -EXT_FTN (void, temp_mixratio, ( float * press, float * mixratio, - float * tempmr )) - -EXT_FTN (void, solax, (int * JULDAY, int * MONTH, float * SLAT, int * TYMINC, - int * TSTART, int * TSTOP, float * TSRAD)) - -EXT_FTN (void, eqp, (float * DELTAP, float * P, float * HT, - float * T, float * TD, - int * N, float * PP, float * HTT, - float * TT, float * TTD, int * NN)) - -EXT_FTN (void, rhbar, (float * ENDLVL, int * MRH, - int * NCLYR, float * SFCP, - float * P, float * TL, float * TDL)) - -EXT_FTN (void, forecast, (int * yr, int * mon, int * day, - int * hour, int * min, - char * stnid, int * snow, - float * slat, float * slon, - float * p, float * ht, - float * t, float * td, int * nlvls, - float * ftmax, int * status)) - -EXT_FTN (void, cv_date2jul, (int * YR, int * MON, - int * DAY, int * JD, int * ISTATUS)) - -EXT_FTN (float, virttemp, (float * T, float * Td, float * P)) - -EXT_FTN (void, virtualt, (float * T, float * TD, float * P, - int * NLVLS, float * TVIR)) - -EXT_FTN (void, wbzero, (float * ELEV, float * P, float *HT, - float *Tt, float * TD, - int * NLVLS, float * PWBZ, - float * HWBZ, float * TWBZ)) - -EXT_FTN (void, tsoar, (float * elev, float * p, float * z, - float * t, float * theta, int * nl, - float * Tpmax, float * PTLXEC, - float * zlnec, float * tlnec, - float * zlxec, float * tlxec, - float * soarindx, float * Trigtemp)) - -EXT_FTN (void, gusts, (float * p, float * t, float * td, - int * np, int * gstpot)) - -EXT_FTN (void, deftrk, (float * tcb, float * pcb, - float * thdpar, float * eptpar)) - -EXT_FTN (void, pvalue, (float * pres, float * p, - int * np, float * param, float * value)) - -EXT_FTN (void, cvgust, (float * dd7, float * ui, int * gstpot)) - -EXT_FTN (float, thetawa, (float * temp, float * dwpt, - float * pres, int * iw, int * ier)) - -EXT_FTN (int, cgp, (float * tempip, float * dwptip, - float * presip, float * thetawip, - float * sfcpres, float * toppres, - int * iw, float * deltap)) - -EXT_FTN (void, tpzlcl, (float * tk, float * tdk, float * pinit, int * iw, - float * tl, float * pl, float * zl, int * ier)) - -EXT_FTN (float, pottemp, (float * temp, float * dwpt, float * pres, int * iw)) - -EXT_FTN (float, dmixr, (float * temp, float * pres, int * iw)) - -EXT_FTN (void, pseudolift, (int * n, float * pstart, - float * pfinish, float * soln)) - -EXT_FTN (float, vp, (float * tk, int * iw)) - -EXT_FTN (void, calchelicity, (float * HW, float * PW, - float * UW, float * VW, int * NW, - float * elev, float * ztop, - float * ghx, float * ghy, - float * diravg, float * spdavg, - float * stmdir, float * stmspd, - float * helicity, float * SRHel)) - -EXT_FTN (void, tplcl, (float * tk,float * td, - float * pinit,float * tl,float * pl,int * ier)) - -EXT_FTN (float, temp_of_te, ( const float * te, const float * press)) - -EXT_FTN (float, ept, (float * t, float * td, float * p)) - -EXT_FTN (float, tsa, (float * os, float * pres)) - -EXT_FTN (void, fortconbuf, (float * Array, int * Work, - int * mnx, int * nx, int * ny, - float * scale, float * offset, - int * mode, float * seed, - float * xpoints, float * ypoints, int * npoints, - float * badlo, float * badhi, int * status)) - -EXT_FTN (void, strmpak, (const float * U, const float * V, int * work, const int * mnx, - const int * nx, const int * ny, const float * asize, const float * - xpoints, const float * ypoints, const int * npoints, const float * - minspc, const float * maxspc, const float * badlo, const float * - badhi)); - -EXT_FTN (void, strmsmth, (float * smoothness, int * npass)); - - - -EXT_FTN (void, matsln, (float * Array, float * yVector, - int * work, float * soln, - int * mn, int * n, int * ok)) - -#if 1 -EXT_FTN (int, scaleless_analysis, (float * xind, float * yind, float * values, - int * nv, int * nx, int * ny, float * grid)) -#endif - -#endif diff --git a/nativeLib/rary.meteorological/inc/va_advanced.h b/nativeLib/rary.meteorological/inc/va_advanced.h deleted file mode 100644 index 26db23715e..0000000000 --- a/nativeLib/rary.meteorological/inc/va_advanced.h +++ /dev/null @@ -1,27 +0,0 @@ - -#ifndef _va_advanced_h -#define _va_advanced_h - -#ifdef __cplusplus -extern "C" { -#endif - -void va_weighting(float wgt); - -void va_just_goodness(int ); - -void va_aspect(float a); - -void va_literal(int mn, int mx); - -void va_dist_pass(int ); - -void va_recomp(int ); -void va_advanced(float lats[], float lons[], int goodness[], - float dist[], int ns); - -#ifdef __cplusplus -}; -#endif - -#endif diff --git a/nativeLib/rary.meteorological/inc/vis_assign.h b/nativeLib/rary.meteorological/inc/vis_assign.h deleted file mode 100644 index 38b43a2ec3..0000000000 --- a/nativeLib/rary.meteorological/inc/vis_assign.h +++ /dev/null @@ -1,18 +0,0 @@ - -#ifndef _vis_assign_h -#define _vis_assign_h - -#ifdef __cplusplus -extern "C" { -#endif - -void use_goodness_values(int ug); - -void vis_assign(float lats[], float lons[], int goodness[], - float dist[], int ns); - -#ifdef __cplusplus -}; -#endif - -#endif diff --git a/nativeLib/rary.meteorological/rary.meteorological.ecl b/nativeLib/rary.meteorological/rary.meteorological.ecl deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/nativeLib/rary.meteorological/src/BulkRichNo.f b/nativeLib/rary.meteorological/src/BulkRichNo.f deleted file mode 100755 index 60522caf8a..0000000000 --- a/nativeLib/rary.meteorological/src/BulkRichNo.f +++ /dev/null @@ -1,235 +0,0 @@ - SUBROUTINE RICHNO(HT,HW,UW,VW,RHO,NLVLS,NW,BUOY,RICHNUM) - IMPLICIT NONE -C -C Statement of purpose. -C --------------------- -C Compute the dimensionless bulk Richardson number as defined by -C Weisman and Klemp (1982). -C -C History. -C -------- -C Tom Schlatter Late 1982 Original code based on MWR article by -C Weisman and Klemp (1982). -C D. Baker 01 Jun 84 Removed computation of positive energy... -C made it an input argument. -C D. Baker 01 Jul 85 Updated code for documentation. -C J. Ramer 16 Jun 92 Added divide-by-zero prevention. -C D. Perry 10 Oct 96 Adapted code for WFO -C -C Description of input and output. -C -------------------------------- -C On input: -C --------- -C HT Real Array Sounding heights (m asl). -C HW Real Array Heights of wind reports (m asl). -C UW Real Array Wind u-components (m/s). -C VW Real Array Wind v-components (m/s). -C RHO Real Array Air density at each sounding level (kg/m**3). -C NLVLS Integer Number of sounding levels passed. -C NW Integer Number of wind levels passed. -C BUOY Real Positive buoyant energy (J/kg). -C -C On output: -C ---------- -C RICHNUM Real Dimensionless bulk Richardson number. -C -C -C Local array dimension. -C - integer MNL - PARAMETER (MNL=500) -C -C Input arguments. -C - INTEGER NLVLS,NW,qc - REAL HT(NLVLS),HW(NW),UW(NW),VW(NW),RHO(NLVLS) - REAL BUOY -C -C Output arguments. -C - REAL RICHNUM -C -C Local variables/arrays. -C - REAL RULAY,RVLAY,RLAY,DZ,UL,VL,U6,V6,SUMU,SUMV - REAL SUMR,SUMUL,SUMVL,SUMRL,HBL,HTOP,SKE - REAL RHOW(MNL) - INTEGER I -C -C Constants. -C - integer FLAG, HALFKM, SIXKM - PARAMETER (FLAG=99999.0) - PARAMETER (HALFKM=500.0) - PARAMETER (SIXKM=6000.0) - RICHNUM=FLAG -C -C Interpolate an air density value to each reported wind level. -C - IF (NLVLS.NE.NW) THEN - CALL WNDRHO(RHO,HT,NLVLS,HW,NW,RHOW) - ELSE - DO 3 I=1,NLVLS - RHOW(I)=RHO(I) -3 CONTINUE - END IF -C -C do some QC. -C - qc=1 - DO 4 I=2,NW - If (UW(I).ne.UW(1) .and. VW(I).ne.VW(1)) qc=0 -4 CONTINUE - If (qc.eq.1)Write (*,*) 'Monotonic winds in RICH' - If (NLVLS.lt.3 .or. NLVLS.gt.500) Then - Write (*,*) NLVLS,' sounding levels in RICH.' - qc=1 - End If - If (NW.lt.3 .or. NW.gt.500) Then - Write (*,*) NW,' wind levels in RICH.' - qc=1 - End If - DO 5 I=1,NW - If (RHOW(I).le.0.0) Then - Write (*,*) 'Bad value for RHOW ',I,RHOW(i) - qc=1 - Goto 6 - End If -5 CONTINUE -6 CONTINUE - DO 7 I=2,NW - If (HW(I)-HW(I-1).le.0.0) Then - Write (*,*) 'Bad wind heights ',I,HW(I-1),HW(I) - qc=1 - Goto 8 - End If -7 CONTINUE -8 CONTINUE - DO 15 I=1,NLVLS - If (RHO(I).le.0.0) Then - Write (*,*) 'Bad value for RHO ',I,RHOW(i) - qc=1 - Goto 16 - End If -15 CONTINUE -16 CONTINUE - DO 17 I=2,NLVLS - If (HT(I)-HT(I-1).le.0.0) Then - Write (*,*) 'Bad sounding heights ',I,HT(I-1),HT(I) - qc=1 - Goto 18 - End If -17 CONTINUE -18 CONTINUE - - If (qc.eq.1) Return - -C -C Initialize sums. -C - SUMU=0. - SUMV=0. - SUMR=0. - SUMUL=0. - SUMVL=0. - SUMRL=0. -C -C Define shear layer bounds (above ground level). -C - HBL=HW(1)+HALFKM - HTOP=HW(1)+SIXKM - IF (HW(NW).LT.HTOP .OR. HW(2).GT.HTOP) GO TO 999 -C -C Loop to calculate shear terms. -C -c initialize RULAY, RVLAY, RLAY, DZ - i=1 - RULAY=0.5*(RHOW(I)*UW(I)) - RVLAY=0.5*(RHOW(I)*VW(I)) - RLAY=0.5*(RHOW(I)) - DZ=HW(I) - - DO 100 I=2,NW - RULAY=0.5*(RHOW(I)*UW(I)+RHOW(I-1)*UW(I-1)) - RVLAY=0.5*(RHOW(I)*VW(I)+RHOW(I-1)*VW(I-1)) - RLAY=0.5*(RHOW(I)+RHOW(I-1)) - DZ=HW(I)-HW(I-1) - IF (HW(I).GT.HTOP) GO TO 101 - SUMU=SUMU+RULAY*DZ - SUMV=SUMV+RVLAY*DZ - SUMR=SUMR+RLAY*DZ - IF (HW(I).GT.HBL .AND. I.GT.2) GO TO 100 - SUMUL=SUMUL+RULAY*DZ - SUMVL=SUMVL+RVLAY*DZ - SUMRL=SUMRL+RLAY*DZ -100 CONTINUE - -101 SUMU=SUMU+RULAY*DZ - SUMV=SUMV+RVLAY*DZ - SUMR=SUMR+RLAY*DZ - IF (SUMR.LE.0.0) THEN - U6=0.0 - V6=0.0 - ELSE - U6=SUMU/SUMR - V6=SUMV/SUMR - END IF - IF (SUMRL.LE.0.0) THEN - UL=0.0 - VL=0.0 - ELSE - UL=SUMUL/SUMRL - VL=SUMVL/SUMRL - END IF -c Write (*,*) 'IN RICH BUOY,UL,VL,U6,V6' -c Write (*,*) BUOY,UL,VL,U6,V6 -C -C Calculate one-half the square of the shear vector in the -C lowest 6 km. -C - U6=U6-UL - V6=V6-VL - SKE=0.5*(U6*U6+V6*V6) -C -C Compute the bulk richardson number. -C - if (SKE.gt.0) RICHNUM=BUOY/SKE -C -C Exit. -C -999 RETURN - END - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/nativeLib/rary.meteorological/src/Fortran.f b/nativeLib/rary.meteorological/src/Fortran.f deleted file mode 100755 index 052cd77311..0000000000 --- a/nativeLib/rary.meteorological/src/Fortran.f +++ /dev/null @@ -1,51 +0,0 @@ - subroutine Fortran_main - - IMPLICIT NONE - REAL VP, ESAT,ZTOPSA,PTOZSA - REAL ADD - INTEGER MNI, NI, NJ, ANSWER, TRY - REAL TOADD, TEMPFLOAT, PRESSFLOAT, TEMPCELSHIGH, TEMPCELSLOW - REAL DEWCELS,WINDINESS,DEWFLOAT, HEIGHT, VERTVELOCITY, FINAL - REAL PR, HE - - PARAMETER(VERTVELOCITY=30) - PARAMETER(TEMPFLOAT=298) - PARAMETER(PRESSFLOAT=1100) - PARAMETER(TEMPCELSHIGH=31) - PARAMETER(TEMPCELSLOW=11) - PARAMETER(DEWFLOAT=291); - PARAMETER(DEWCELS=23) - PARAMETER(WINDINESS=17) - PARAMETER(TOADD=3) - PARAMETER(MNI=3) - PARAMETER(NI=3) - PARAMETER(NJ=1) - PARAMETER(HEIGHT=500) - - CHARACTER CLASS*128 - INTEGER J, MODE - PARAMETER(MODE=0) - REAL A(MNI),B(MNI),C(MNI),D(MNI),RESULT(MNI),ELEVATION(MNI) - REAL TEMPARRAY(MNI),DEWARRAY(MNI),PRESSARRAY(MNI),RH(MNI) - REAL TEMPAT(MNI),SPECHUMID(MNI),CELSIUS(MNI),UCOMP(MNI),VCOMP(MNI) - REAL AIRDENSITY(MNI), HEIGHTARRAY(MNI), P(MNI),H(MNI),T(MNI) - REAL WORK(MNI) - A=(/2,5,7/) - B=(/3,5,10/) - C=(/2,6,3/) - D=(/10,5,4/) - UCOMP=(/2,6,7/) - VCOMP=(/8,4,10/) - TEMPARRAY=(/283,293,303/) - CELSIUS=(/10.0,20.0,30.0/) - DEWARRAY=(/277,287,297/) - PRESSARRAY=(/890,990,1090/) - ELEVATION=(/500,1000,1500/) - RH=(/47,74,56/) - TEMPAT=(/260,264,259/) - SPECHUMID=(/23,27,13/) - AIRDENSITY=(/1.4,1.3,1.1/) - HEIGHTARRAY=(/430,423,403/) - - CALL FORTCONBUF(RESULT,WORK,MNI,NI,NJ,3,3,3,3,3,3,5,10,TRY) - END diff --git a/nativeLib/rary.meteorological/src/IntrinsicFunctions.f b/nativeLib/rary.meteorological/src/IntrinsicFunctions.f deleted file mode 100755 index bd4909b06f..0000000000 --- a/nativeLib/rary.meteorological/src/IntrinsicFunctions.f +++ /dev/null @@ -1,232 +0,0 @@ -c----------------------------------------- -c intrinsic function ODD is not implemented by g77. -c 0 is equiv. to .FALSE., any other = .TRUE. -c----------------------------------------- - Logical*2 Function b1_odd (arg) - Implicit None - byte arg - Integer*4 a - - a = arg -c print *, 'b1_odd (', a, ') = ', (mod (a,2) .ne. 0) - - b1_odd = (mod (a,2) .ne. 0) - return - end - -c----------------------------------------- -c intrinsic function ODD is not implemented by g77. -c 0 is equiv. to .FALSE., any other = .TRUE. -c----------------------------------------- - Logical*2 Function i4_odd (arg) - Implicit None - integer arg - Integer*4 a - - a = arg -c print *, 'i4_odd(',a,') = ', (mod (a,2) .ne. 0) - - i4_odd = (mod (a,2) .ne. 0) - return - end - -c----------------------------------------- -c intrinsic function BITEST is not yet implemented by g77, -c and is a more restrictive implementation of btest(). -c----------------------------------------- - Logical*2 Function bitest (arg1, arg2) - Implicit None - integer arg1, arg2 - integer*4 a,b - - a = arg1 - b = arg2 -c print *, 'bitest(',a,',',b,') = ', btest (a,b) - - bitest = btest (a,b) - return - end - -c----------------------------------------- -c intrinsic function JNINT is not yet implemented by g77, -c this function is more specific than the generic NINT(). -c----------------------------------------- - Integer*4 Function jnint (arg) - Implicit None - real arg - real*4 a - - if (arg.ge.0) then - a=arg+0.5 - else - a=arg-0.5 - endif - -c print *, 'jnint(',arg,') = ', int( a) - - jnint = int(a) - return - end - -c----------------------------------------- -c intrinsic function JINT is not yet implemented by g77, -c this function is more specific than the generic INT(). -c----------------------------------------- - Integer*4 Function jint (arg) - Implicit None - real arg - real*4 a - - a = arg -c print *, 'jint(',a,') = ', int( a) - - jint = int (a) - return - end - -c----------------------------------------- -c intrinsic function JMAX0 is not yet implemented by g77, -c this function is more specific than the generic MAX(). -c----------------------------------------- - Integer*4 Function jmax0 (arg1, arg2) - Implicit None - integer arg1, arg2 - integer*4 a,b - - a = arg1 - b = arg2 -c print *, 'jmax0(',a,',',b,') = ', max( a,b) - - jmax0 = max (a,b) - return - end - -c----------------------------------------- -c intrinsic function JMIN0 is not yet implemented by g77, -c this function is more specific than the generic MIN(). -c----------------------------------------- - Integer*4 Function jmin0 (arg1, arg2) - Implicit None - integer arg1, arg2 - integer*4 a,b - - a = arg1 - b = arg2 -c print *, 'jmin0(',a,',',b,') = ', min( a,b) - - jmin0 = min (a,b) - return - end - -c----------------------------------------- -c intrinsic function JISIGN is not yet implemented by g77, -c this function is more specific than the generic ISIGN(). -c----------------------------------------- - Integer*4 Function jisign (arg1, arg2) - Implicit None - integer arg1, arg2 - integer*4 a, b - - a = arg1 - b = arg2 -c print *, 'jisign(',a,',',b,') = ', isign( a,b) - - jisign = isign (a,b) - return - end - -c----------------------------------------- -c intrinsic function JIABS is not yet implemented by g77, -c this function is more specific than the generic IABS(). -c----------------------------------------- - Integer*4 Function jiabs (arg) - Implicit None - integer arg - integer*4 a - - a = arg -c print *, 'jiabs(',a,') = ', iabs( a) - - jiabs = iabs (a) - end - -c----------------------------------------- -c intrinsic function IIAND is not yet implemented by g77 -c and is a more restrictive implementation of iand(). -c----------------------------------------- - Integer*2 Function iiand (arg1,arg2) - Implicit None - integer arg1, arg2 - Integer*2 a, b - - a = arg1 - b = arg2 -c print *, 'iiand(',a,',',b,') = ', iand( a,b) - - iiand = iand (a,b) - return - end - -c----------------------------------------- -c intrinsic function IISHFT is not yet implemented by g77 -c and is a more restrictive implementation of ishft(). -c----------------------------------------- - Integer*2 Function iishft (arg1,arg2) - Implicit None - integer arg1, arg2 - Integer*2 a, b - - a = arg1 - b = arg2 -c print *, 'iishft(',a,',',b,') = ', ishft( a,b) - - iishft = ishft (a,b) - return - end - -c----------------------------------------- -c intrinsic function IIOR is not yet implemented by g77 -c and is a more restrictive implementation of ior(). -c----------------------------------------- - integer*2 Function iior (arg1,arg2) - Implicit None - integer arg1, arg2 - integer*2 a,b - - a = arg1 - b = arg2 -c print *, 'iior(',a,',',b,') = ', ior( a,b) - - iior = ior (a,b) - return - end - -c----------------------------------------- -c intrinsic function IMOD is not yet implemented by g77 -c and is a more restrictive implementation of mod(). -c----------------------------------------- - integer*2 Function imod (arg1,arg2) - Implicit None - integer arg1, arg2 - integer*2 a,b - - a = arg1 - b = arg2 -c print *, 'imod(',a,',',b,') = ', mod( a,b) - - imod = mod(a,b) - return - end - -c This function is an intrinsic function in the gcc-2.95.1 release, SOD 1 Nov.99 -c----------------------------------------- -c intrinsic function DABS is not yet implemented by g77 -c and is a more restrictive implementation of abs(). -c----------------------------------------- -c Real*8 Function dabs (a) -c Implicit None -c real*8 a -c -c dabs = abs (a) -c end - diff --git a/nativeLib/rary.meteorological/src/IntrinsicFunctions.inc b/nativeLib/rary.meteorological/src/IntrinsicFunctions.inc deleted file mode 100755 index a14ac69b26..0000000000 --- a/nativeLib/rary.meteorological/src/IntrinsicFunctions.inc +++ /dev/null @@ -1,21 +0,0 @@ -c IntrinsicFunctions.inc -c -c logical tests between integer and/or logical variables - EXTERNAL b1_odd, i4_odd, bitest - Logical*2 b1_odd, i4_odd, bitest -c -c These are function declarations of g77 unimplemented intrinsic functions -c - EXTERNAL iiand, iishft, iior, imod - integer*2 iiand, iishft, iior, imod - - EXTERNAL jnint, jint, jmax0, jmin0, jisign, jiabs - integer*4 jnint, jint, jmax0, jmin0, jisign, jiabs -c -c This function is an intrinsic function in the gcc-2.95.1 release, SOD 1 Nov.99 -c EXTERNAL dabs -c real*8 dabs -c - - - diff --git a/nativeLib/rary.meteorological/src/addaray.f b/nativeLib/rary.meteorological/src/addaray.f deleted file mode 100755 index 7b5c29c223..0000000000 --- a/nativeLib/rary.meteorological/src/addaray.f +++ /dev/null @@ -1,47 +0,0 @@ -c -c - subroutine add_aray(a,b,result,mni,ni,nj,mode) -c -c..... Routine to find the sum of two fields. Each i,j in one array is -c..... added to the corresponding i,j in the other array. -c -c..... Original : 01-13-89 Peter A. Stamus -c 08-14-89 Add bad data check - Adler fix. -c 09-20-89 Add implicit none. -c 11-15-01 Non-zero mode means flag treated as zero. -c - implicit none - integer mni, ni, nj, i, j - real flag, bad - parameter(flag = 1.e37) - real a(mni,nj), b(mni,nj), result(mni,nj) - integer mode -c - bad = 1.e36 - - if (mode.eq.0) Then - do 1 j=1,nj - do 1 i=1,ni - if(a(i,j).gt.bad .or. b(i,j).gt.bad) then - result(i,j) = flag - else - result(i,j) = a(i,j) + b(i,j) - endif -1 continue - Else - do 2 j=1,nj - do 2 i=1,ni - if (a(i,j).gt.bad .and. b(i,j).gt.bad) then - result(i,j) = 0 - else if (a(i,j).gt.bad) then - result(i,j) = b(i,j) - else if (b(i,j).gt.bad) then - result(i,j) = a(i,j) - else - result(i,j) = a(i,j) + b(i,j) - endif -2 continue - Endif - - Return - end diff --git a/nativeLib/rary.meteorological/src/addbycnst.f b/nativeLib/rary.meteorological/src/addbycnst.f deleted file mode 100755 index 47aac97299..0000000000 --- a/nativeLib/rary.meteorological/src/addbycnst.f +++ /dev/null @@ -1,29 +0,0 @@ -c -c - subroutine add_by_cnst(a,const,result,mni,ni,nj) -c -c..... Routine to add an array by a real constant. Each i,j in the -c..... array is added to by the constant. -c -c..... Original : 01-13-89 Peter A. Stamus -c 08-21-89 Add bad data check. -c 09-20-89 Add implicit none. -c - implicit none - integer mni, ni, nj, i, j - real flag, bad, const - parameter(flag = 1.e37) - real a(mni,nj), result(mni,nj) -c - bad = 1e36 - do 1 j=1,nj - do 1 i=1,ni - if(a(i,j) .gt. bad) then - result(i,j) = flag - else - result(i,j) = a(i,j) + const - endif -1 continue -c - return - end diff --git a/nativeLib/rary.meteorological/src/adiabatic_te.c b/nativeLib/rary.meteorological/src/adiabatic_te.c deleted file mode 100755 index b1eb77c73b..0000000000 --- a/nativeLib/rary.meteorological/src/adiabatic_te.c +++ /dev/null @@ -1,14 +0,0 @@ -#include "meteoLib.h" -#include - -/* This routine calculates the equivalent tempurature of a temperature - and pressure using the adiabatic definition, assuming saturation - put a fudge factor into L/cp to get agreement of moist adiabats - with a published thermodynamic diagram */ - -float adiabatic_te (const float * temp, const float * press) - { - float e = exp(26.660820-0.0091379024*(*temp)-6106.396/(*temp)); - e = 0.622*e/(*press-e); - return *temp*exp(2740.0*e/(*temp)); - } diff --git a/nativeLib/rary.meteorological/src/alt2press.f b/nativeLib/rary.meteorological/src/alt2press.f deleted file mode 100755 index 70adbdeb40..0000000000 --- a/nativeLib/rary.meteorological/src/alt2press.f +++ /dev/null @@ -1,45 +0,0 @@ -c -c - subroutine alt2press(alt,z,mni,ni,nj,p) -c -c............................................................................... -c -c Routine to pressure from elevation and altimeter setting. -c -c -c Inputs/Outputs: -c -c Variable Var Type I/O Description -c ---------- ---------- ----- ------------- -c alt RA I Altimeter setting (X) -c z RA I Elevation in meters. -c mni I I First dimension of input array. -c ni,nj I I Grid dimensions in i,j. -c p RA O Pressure (X) -c -c -c User Notes: -c -c 1. No quality control is performed in this routine. -c -c............................................................................... -c - implicit none - integer mni, ni, nj, i, j - real alt(mni,nj), z(mni,nj) - real p(mni,nj) - real flg,flag,T0,gamma,g_Rgamma - Data flg, flag, T0, gamma, g_Rgamma - & /99998.0,1e37,288.0,0.0065,5.2532/ - - Do 10 j=1,nj - Do 10 i=1,ni - If (alt(i,j).gt.flg .or. z(i,j).gt.flg) then - p(i,j)=flag - Else - p(i,j)=alt(i,j)*((T0-gamma*z(i,j))/T0)**g_Rgamma - End If -10 Continue - - return - end diff --git a/nativeLib/rary.meteorological/src/avwind.f b/nativeLib/rary.meteorological/src/avwind.f deleted file mode 100755 index 41009ffed2..0000000000 --- a/nativeLib/rary.meteorological/src/avwind.f +++ /dev/null @@ -1,183 +0,0 @@ - 2 SUBROUTINE AVWIND(ELEV,TOP,BOT,HW,PW,TW,UW,VW,NW, - + UAVG,VAVG,AVDIR,AVSPD) - IMPLICIT NONE - -C Statement of purpose. -C --------------------- -C This subroutine calculate a layer mean wind (direction and speed) given -C given 'TOP' and 'BOT' of the layer defined in kilometers above -C ground level. -C -C History. -C -------- -C D. Baker 01 Jul 84 Original version. -C -C Description of input and output. -C -------------------------------- -C On input: -C --------- -C ELEV Real Station elevation (m agl). -C TOP Real Top of desired mean wind layer (km agl). -C BOT Real Bottom of desired mean wind layer (km agl). -C HW Real Array Wind level heights (m asl). -C TW Real Array Wind level temperatures (kelvin). -C UW Real Array Wind level u-components (m/s). -C VW Real Array Wind level v-components (m/s). -C NW Integer Number of wind levels passed. -C -C On output: -C ---------- -C UAVG Real Layer mean u-component wind -C VAVG Real Layer mean v-component wind -C AVDIR Real Layer mean wind direction (deg). -C AVSPD Real Layer mean wind speed (m/s). - -C---- Input arguments. - - INTEGER NW - REAL ELEV,TOP,BOT,HW(NW),TW(NW),PW(NW),UW(NW),VW(NW) - -C---- Output arguments. - - REAL AVDIR,AVSPD,UAVG,VAVG - -C---- Internal variables. - - REAL TOP1,BOT1,SU,SV,UTOP,VTOP,UBOT,VBOT,DENSITY,WGT - INTEGER I,ITOP,IBOT - -C---- External functions. - - REAL INTERP1 - -C---- Subroutine constants. - - REAL KM2M,FLAG,RCONST - PARAMETER (KM2M=1000.,FLAG=99999.,RCONST=287.) - -C---- Initialize output mean wind value to FLAG. - - AVDIR=FLAG - AVSPD=FLAG - -C---- Initialize sum parameters. - - SU=0. - SV=0. - WGT=0. - -C---- Calculate the top and bottom of the desired layer in meters -C---- above ground level. Exit with 'flag' values assigned to mean wind -C---- if unexpected conditions occur, or if sounding not deep enough to -C---- perform calculation. - - TOP1=(TOP*KM2M)+ELEV - BOT1=(BOT*KM2M)+ELEV - - IF (TOP1.LE.BOT1) GO TO 9999 - IF (UW(1).GT.99998. .OR. VW(1) .GT.99998.) GO TO 9999 - IF (HW(1).GT.BOT1 .OR. HW(NW).LT.TOP1) GO TO 9999 - -C---- Loop 100 interpolates u and v components to the level that is -C---- to be the bottom of the layer for which the mean wind is -C---- desired. The subscript in the height array that is at or just -C---- above the bottom is saved. - IBOT=1 - UBOT=UW(IBOT) - VBOT=VW(IBOT) - - DO I=2,NW - IF (HW(I).GE.BOT1) THEN - UBOT=INTERP1(UW(I),UW(I-1),HW(I),BOT1,HW(I-1)) - VBOT=INTERP1(VW(I),VW(I-1),HW(I),BOT1,HW(I-1)) - IBOT=I - GO TO 150 - ENDIF - END DO -150 CONTINUE - -C---- Loop 200 interpolates u and v components to the level that is -C---- to be the top of the layer for which the mean wind is -C---- desired. The subscript in the height array that is at or just below -C---- the top is saved. - ITOP=NW - UTOP=UW(NW) - VTOP=VW(NW) - - DO I=NW-1,1,-1 - IF (HW(I).LE.TOP1) THEN - UTOP=INTERP1(UW(I),UW(I+1),HW(I),TOP1,HW(I+1)) - VTOP=INTERP1(VW(I),VW(I+1),HW(I),TOP1,HW(I+1)) - ITOP=I - GO TO 250 - ENDIF - END DO -250 CONTINUE - -C---- Check to see if we are only dealing with wind-only data -C---- i.e., profiler, VWP. etc. If so skip the density-weighted -C---- process and just sum the u- and v-components - - IF (TW(IBOT).GT.350.0 .OR. TW(IBOT).LE.150.0) GO TO 300 - -C---- Begin the density-weighted sum process by first considering the -C---- component derived from the interpolated data at the 'bot' and -C---- the level immediately above. - - DENSITY=(PW(IBOT)*100.)/(TW(IBOT)*RCONST) - SU=DENSITY*UBOT - SV=DENSITY*VBOT - WGT=DENSITY -C---- Now, loop through all levels (until within one level of the -C---- interpolated top of the layer). - - DO I=IBOT+1,ITOP - DENSITY=(PW(I)*100.)/(TW(I)*RCONST) - SU=SU+(DENSITY*UW(I)) - SV=SV+(DENSITY*VW(I)) - WGT=WGT+DENSITY - END DO - -C---- Similarly to above, finish the process by incorporating the last -C---- sublayer, from one level below the interpolated top to the -C---- top. - - DENSITY=(PW(ITOP)*100.)/(TW(ITOP)*RCONST) - SU=SU+(DENSITY*UTOP) - SV=SV+(DENSITY*VTOP) - WGT=WGT+DENSITY - - GO TO 350 - -C---- Just sum up the u- and v-components if we have only wind -C---- data w/o temp profiles (no density-weighted process possible). - -300 SU=DENSITY*UBOT - SV=DENSITY*VBOT - WGT=1 - - DO I=IBOT+1,ITOP - SU=SU+UW(I) - SV=SV+DENSITY*VW(I) - WGT=WGT+1 - END DO - - SU=SU+UTOP - SV=SV+VTOP - WGT=WGT+1 - -C---- Finally, calculate the layer mean wind speed and direction. - -350 UAVG=SU/WGT - VAVG=SV/WGT - - CALL DDFF(UAVG,VAVG,AVDIR,AVSPD,1) - -C---- Exit. - -9999 CONTINUE - RETURN - END - - - diff --git a/nativeLib/rary.meteorological/src/calcHeatIndex.c b/nativeLib/rary.meteorological/src/calcHeatIndex.c deleted file mode 100755 index 870d9c0610..0000000000 --- a/nativeLib/rary.meteorological/src/calcHeatIndex.c +++ /dev/null @@ -1,37 +0,0 @@ -#include "meteoLib.h" -#include -#include -/* ------------------------------------------------------------------ -** calcHeatIndex() -** -** calculate the heatIndex by temperature and dew point -** temperatures in Celsius -** -----------------------------------------------------------------*/ -float calcHeatIndex(float temp, float dewPoint) - { - - float RH; - float heatIdx; - float t_sq, rh_sq; - int mni = 1, ni = 1, nj = 1; - - /* Bail out if T is < 80F or Td missing. Lans' formula really doesn't - ** work well below 80F, and there's not much point in calculating it, - ** anyway. */ - if (temp < 26.5 || dewPoint > temp) return 1e37; - - /* get relative humidity in integer percent and temp in Fahrenheit */ - calcrh(&temp, &dewPoint, &mni, &ni, &nj, &RH); - temp = temp*1.8+32; - - t_sq = temp * temp; - rh_sq = RH * RH; - - /* the Lans Rothfusz formula */ - heatIdx = -42.379 + 2.04901523 * temp + 10.14333127 * RH - - 0.22475541 * temp * RH - 0.00683783 * t_sq - 0.05481717 * rh_sq - + 0.00122874 * t_sq * RH + 0.00085282 * temp * rh_sq - - 0.00000199 * t_sq * rh_sq; - - return (heatIdx-32)/1.8; - } diff --git a/nativeLib/rary.meteorological/src/calcWindChill.c b/nativeLib/rary.meteorological/src/calcWindChill.c deleted file mode 100755 index ac6580a070..0000000000 --- a/nativeLib/rary.meteorological/src/calcWindChill.c +++ /dev/null @@ -1,31 +0,0 @@ -# include "meteoLib.h" -# include - -/* ----------------------------------------------------------------- -** calcWindChill() -** -** calculate the windChill from temperature and windSpeed -** this is the 7/01 "official" NWS formula -** input temp in Celsius and windSpeed in km/h -** -**-----------------------------------------------------------------*/ -float calcWindChill(float temp, float windSpd) - { - - float spd; - - /* arbitrarily do the calculation only for temps at or below 60F */ - if ( temp > 16. ) return 1e37; - - /* no chilling if speed < 4 mph = 6.44km/h */ - if ( windSpd < 6.4 ) return temp; - /* peg speed at 80 mph (= 128.75 km/h) */ - if ( windSpd > 128.75 ) - spd = 128.75; - else - spd = windSpd; - - spd = pow (spd, 0.16); - float windChillTemp = 13.12 + 0.6215*temp - 11.37*spd + 0.3965*temp*spd; - return windChillTemp; /* in Celsius */ - } diff --git a/nativeLib/rary.meteorological/src/calccondpr.f b/nativeLib/rary.meteorological/src/calccondpr.f deleted file mode 100755 index 0b60892ee4..0000000000 --- a/nativeLib/rary.meteorological/src/calccondpr.f +++ /dev/null @@ -1,49 +0,0 @@ -c - subroutine calccondpr(p,t,rh,mni,ni,nj,q) -c -c.............................................................................. -c -c Routine to calculate condensation pressure from the pressure, -c temperature, and relative humidity. -c -c Inputs/Outputs: -c -c Variable Var Type I/O Description -c ---------- ---------- ----- ------------- -c p RA I Pressure (mb) -c t RA I Temperature (K) -c rh RA I Relative humidity [range: 0. - 100.] -c mni I I First dimension of input array. -c ni,nj I I Grid dimensions in i,j. -c q RA O Condensation pressure (mb). -c -c -c User Notes: -c -c 1. No quality control is performed in this routine. -c -c.............................................................................. -c - implicit none - integer mni, ni, nj, i, j - real p(mni,nj), t(mni,nj), rh(mni,nj) - real q(mni,nj),tcp,b,tp,tdp,rhqc - real Flag,Flg - Data Flag,Flg/1e37,99998.0/ - - do 20 j=1,nj - do 20 i=1,ni - if (p(i,j).gt.flg .or. t(i,j).gt.flg .or. rh(i,j).gt.flg) then - q(i,j)=flag - else - tp=t(i,j) - rhqc=amin1(100.0,amax1(1.0,rh(i,j))) - b=0.0091379024*tp+6106.396/tp-alog(rhqc/100) - tdp=(b-sqrt(b*b-223.1986))/0.0182758048 - tcp=tdp-(tp-tdp)*(-0.37329638+41.178204/tp+0.0015945203*tdp) - q(i,j)=p(i,j)*(tcp/tp)**3.498257 - end if -20 continue - - return - end diff --git a/nativeLib/rary.meteorological/src/calccondprdef.f b/nativeLib/rary.meteorological/src/calccondprdef.f deleted file mode 100755 index 1d97b6eed8..0000000000 --- a/nativeLib/rary.meteorological/src/calccondprdef.f +++ /dev/null @@ -1,49 +0,0 @@ -c - subroutine calccondprdef(p,t,rh,mni,ni,nj,q) -c -c............................................................................... -c -c Routine to calculate condensation pressure deficit from the pressure, -c temperature, and relative humidity. -c -c Inputs/Outputs: -c -c Variable Var Type I/O Description -c ---------- ---------- ----- ------------- -c p RA I Pressure (mb) -c t RA I Temperature (K) -c rh RA I Relative humidity [range: 0. - 100.] -c mni I I First dimension of input array. -c ni,nj I I Grid dimensions in i,j. -c q RA O Condensation pressure deficit (mb). -c -c -c User Notes: -c -c 1. No quality control is performed in this routine. -c -c............................................................................... -c - implicit none - integer mni, ni, nj, i, j - real p(mni,nj), t(mni,nj), rh(mni,nj) - real q(mni,nj),tcp,b,tp,tdp,rhqc - real Flag,Flg - Data Flag,Flg/1e37,99998.0/ - - do 20 j=1,nj - do 20 i=1,ni - if (p(i,j).gt.flg .or. t(i,j).gt.flg .or. rh(i,j).gt.flg) then - q(i,j)=flag - else - tp=t(i,j) - rhqc=amin1(100.0,amax1(1.0,rh(i,j))) - b=0.0091379024*tp+6106.396/tp-alog(rhqc/100) - tdp=(b-sqrt(b*b-223.1986))/0.0182758048 - tcp=tdp-(tp-tdp)*(-0.37329638+41.178204/tp+0.0015945203*tdp) - q(i,j)=p(i,j)-p(i,j)*(tcp/tp)**3.498257 - end if -20 continue - - return - end diff --git a/nativeLib/rary.meteorological/src/calcdpd.f b/nativeLib/rary.meteorological/src/calcdpd.f deleted file mode 100755 index 9d9807800a..0000000000 --- a/nativeLib/rary.meteorological/src/calcdpd.f +++ /dev/null @@ -1,50 +0,0 @@ -c - subroutine calcdpd(t,rh,mni,ni,nj,dpd) -c -c............................................................................... -c -c Routine to calculate dewpoint depression from temperature -c and relative humidity. -c -c Changes: -c J. Ramer 10-25-90 Adapted from calctd. -c -c Inputs/Outputs: -c -c Variable Var Type I/O Description -c ---------- ---------- ----- ------------- -c t RA I Temperature (K) -c rh RA I Relative humidity [range: 0. - 100.] -c mni I I First dimension of input array. -c ni,nj I I Grid dimensions in i,j. -c dpd RA O array of dewpoint depression (C). -c -c -c User Notes: -c -c 1. No quality control is performed in this routine. -c -c............................................................................... -c - implicit none - integer mni, ni, nj, i, j - real t(mni,nj), rh(mni,nj) - real dpd(mni,nj) - real k,b,rhqc - real flg,flag - Data flg,flag/99998.0,1e37/ - - Do 10 j=1,nj - Do 10 i=1,ni - If (rh(i,j).gt.flg .or. t(i,j).gt.flg) then - dpd(i,j)=flag - Else - k=t(i,j) - rhqc=amin1(100.0,amax1(1.0,rh(i,j))) - b=0.0091379024*k+6106.396/k-alog(rhqc/100.0) - dpd(i,j)=k-(b-sqrt(b*b-223.1986))/0.0182758048 - End If -10 Continue - - return - end diff --git a/nativeLib/rary.meteorological/src/calckidx.c b/nativeLib/rary.meteorological/src/calckidx.c deleted file mode 100755 index fa9a23f280..0000000000 --- a/nativeLib/rary.meteorological/src/calckidx.c +++ /dev/null @@ -1,70 +0,0 @@ -#include -# include "meteoLib.h" -/*************************************************************************** -* Calculate the K index -* input : press, temp, td, numOfLevel -* output : K -* Harry Chen -***************************************************************************/ -void FTN_MANGLE (calckidx) ( float * press, float * temp, - float * td, int numOfLevel, float * K ) - { - float temp850 = 0; - float temp700 = 0; - float temp500 = 0; - float td850 = 0; - float td700 = 0; - float td500 = 0; - int i; - - *K = 999; - if ( press[0] < 820 || press[numOfLevel-1] > 500 ) - return; -/* -** Determine 850 mb, 700mb, 500mb temperature and dew point from sounding. -*/ - for ( i=0; i 500 ) - return; -/* -** Determine 850 mb, 500mb temperature and dew point from sounding. -*/ - for ( i=0; i= T or a ridiculously low T. - If (Kd.ge.K) Then - Kw=(K+Kd)/2 - Goto 30 - Else If (K.lt.100) Then - Kw=K - Goto 30 - End If - -C Special case of a ridiculously high saturation vapor pressure. - ew=c0-c1*K-c2/K - If (ew.gt.10.0) Then - Kw=(K+Kd)/2 - Goto 30 - End If - ew=exp(ew) - -C Kw is our current guess for wet-bulb, ed the vapor pressure corresponding -C to the depoint. Deal with case of a ridiculously small dewpoint vapor -C pressure. - Kdx=Kd - ed=c0-c1*Kdx-c2/Kdx -5 If (ed.lt.-50.0) Then - Kdx=Kdx+10 - ed=c0-c1*Kdx-c2/Kdx - Goto 5 - End If - ed=exp(ed) - fp=p*f - s=(ew-ed)/(K-Kdx) - Kw=(K*fp+Kdx*s)/(fp+s) - -C At each step of the iteration, esat(Tw)-esat(Td) is compared to -C (T-Tw)*p/(eps*L). When that difference is less than one part in -C 10000 of esat(Tw), or ten iterations have been done, the iteration stops. -C This is basically trying to find the value of Kw where de is 0. The -C value s is the derivative of de with respect to Kw, a fairly standard -C numerical technique for finding the zero value of a function. - Do 10 l=1,10 - ew=c0-c1*Kw-c2/Kw - If (ew.lt.-50.0 .or. ew.gt.10.0) Goto 30 - ew=exp(ew) - de=fp*(K-Kw)+ed-ew - If (abs(de/ew).lt.1e-5) Goto 20 - s=ew*(c1-c2/(Kw*Kw))-fp - Kw=Kw-de/s -10 Continue -20 Continue - -30 MyTw=Kw - Return - End diff --git a/nativeLib/rary.meteorological/src/capeFunc.c b/nativeLib/rary.meteorological/src/capeFunc.c deleted file mode 100644 index 57f800a85a..0000000000 --- a/nativeLib/rary.meteorological/src/capeFunc.c +++ /dev/null @@ -1,849 +0,0 @@ - -#include -#include -#include -#include - -#include "meteoLib.h" - -// We input theta and specific humidity for initial parcel because these are -// things that can be arithemitically averaged for a mixed layer. -// If usetv=1, buoyancy is done with virtual temp, if usetv=0 with temp. -// If usetv=0, must supply temps in tve_dat. -int capeFunc(float usetv, const float ** p_dat, const float ** tve_dat, - float * p0, float * th0, float * sh0, - int mnx, int nx, int ny, int nz, - float * cape_dat, float * cin_dat) - { - // These pointers point to our dynamic storarge. - // These pointers point to our dynamic storarge. - float *tvp_st, *tec_st, *tvc_st, *pc_st, *pp1_st, *pmd_st, *md_st; - tvp_st = tec_st = tvc_st = pc_st = pp1_st = pmd_st = md_st = 0; - - // Pointer to output data and end of loop pointer. - const float *eptr; - float *cap, *cin; - - // Working pointers inside our loops. - const float *pp, *tve; - float *tt,*tvp, *qq, *pc, *tec, *tvc, *pmd, *md; - float *pp1, *tvp1, *neg, *pos, *pp0; - - float t0, td, tdc, b, up, dn, dlnp; - int k,nn,n2,n3,dd,i,nxm; - float c0 = 26.66082; - float c1 = 0.0091379024; - float c2 = 6106.396; - float c_1 = 223.1986; - float c_2 = 0.0182758048; - float kapa = 0.286; - float kapa_1 = 3.498257; - - dd = mnx-nx; - nn = mnx*ny-dd; - n2 = nx*ny; - n3 = n2*nz; - nxm = nx-1; - - // Calculate the parcel equivalent temp, virtual temp, and press at LCL. - // Make working copy of sfc press, use as press below current 3d pressure. - pp0 = p0; - tt = th0; - qq = sh0; - tec = tec_st = (float*)malloc(n2*sizeof(float)); - if (tec == NULL || tec_st == NULL) - { - return 1; - } - tvc = tvc_st = (float*)malloc(n2*sizeof(float)); - if (tvc == NULL || tvc_st == NULL) - { - return 1; - } - pc = pc_st = (float*)malloc(n2*sizeof(float)); - if (pc == NULL || pc_st == NULL) - { - return 1; - } - pp1 = pp1_st = (float*)malloc(n2*sizeof(float)); - if (pp1 == NULL || pp1_st == NULL) - { - return 1; - } - eptr = pp0+nn; - if (dd==0) - { - i = 0x7FFFFFFF; - } - else - { - i = nx; - } - for (; pp01e36 || *tt>1e36 || *qq>1e36 || *qq<0.0005) - { - *tec = *tvc = *pc = 1e37; - continue; - } - t0 = (*tt)*pow((*pp0)/1000,kapa); - b = c0-log( (*pp0)/(622./(*qq) + 0.378) ); - td = (b-sqrt(b*b-c_1))/c_2; - tdc = td-(t0-td)*(-0.37329638+41.178204/t0+0.0015945203*td); - *pc = (*pp0)*pow(tdc/t0,kapa_1); - *tec = adiabatic_te(&tdc,pc); - *tvc = td*(1+usetv*0.000608*(*qq)); - } - - // Initialize md and pmd, which will be pressure of and max Te delta. - md_st = (float*)malloc(n2*sizeof(float)); - if (md_st == NULL) - { - return 1; - } - pmd_st = (float*)malloc(n2*sizeof(float)); - if (pmd_st == NULL) - { - return 1; - } - memset(md_st, 0, n2*sizeof(float)); - memset(pmd_st, 0, n2*sizeof(float)); - - // Now calculate the virtual temperature of the parcel at the pressures - // in the input data. Then difference it from the environmental temp, - // which has been tweaked to not be cooler than dry adiabatic from the - // parcel start. Record the level of max parcel difference. - tvp = tvp_st = (float*)malloc(n3*sizeof(float)); - if (tvp == NULL || tvp_st == NULL) - { - return 1; - } - for (k=0; k1e36 || *pp>1e36 || *tve>1e36) - { - *tvp = 1e37; - continue; - } - t0 = (*tvc)*pow((*pp)/(*pc),kapa); - if (*pp>=*pc) - { - *tvp = t0; - } - else - { - td = (*tec)*pow((*pp)/(*pc),kapa); - *tvp = td = temp_of_te(&td, pp); - if (usetv>0) - *tvp *= (*pp)/( *pp-exp(25.687958917-c1*td-c2/td) ); - } - if (*tve*pc || *tvp<*md) continue; - *md = *tvp; - *pmd = *pp; - } - } - - // This loop performs the actual cape and cin calculation. Here we will - // reuse storage for virt temp, equiv temp, and max delta for prev parcel - // temp, neg and pos. neg and pos are pending negative and positive - // contributions we have not yet added into the cape and cin yet. - tvp = tvp_st; - for (k=0; k1e36) - continue; - else if (*pp1>1e36 || *tvp1>1e36) - ; - else if (*pp>=*pp1 || *tvp>1e36) - continue; - else if (*pp>=*pp0) - ; - else - { - // Now we finally have the data we need for calculating - // the cape/cin contribution for this layer. - if (*cap>1e36) *cap = *cin = 0; - if (*pmd==0) continue; // No parcel delta>0, we're done. - - // First deal with possibility of bottom lvl being below the - // initial parcel. - if (*pp1>*pp0) - { - dlnp = log((*pp0)/(*pp)); - dn = 0; - } - else - { - dlnp = log((*pp1)/(*pp)); - dn = dlnp*287*(*tvp1); - } - - // Now deal with the fact that not allowing superadiabatic - // layers means no cape below condensation pressure. - if (*pp1>=*pc) - { - if (dn>0) dn = 0; - if (*tvp<=0) - up = dlnp*287*(*tvp); - else if (*pp>=*pc) - up = 0; - else - up = log((*pc)/(*pp))*287*(*tvp); - } - else - { - up = dlnp*287*(*tvp); - } - - // Deal with where the break point is. - b = up*dn>=0 ? 0.5 : up/(up-dn); - up *= b; - dn *= (1-b); - - // Now consider this layer's contribution, taking into account - // transitions between positive and negative acceleration. - if (up==0 && dn==0) - ; - - // Continuing deceleration. - else if (up<=0 && (dn<0 || dn==0 && (*pp<*pmd || *pos==0) ) ) - *neg -= up+dn; - - // Continuing upward acceleration. - else if (up>=0 && (dn>0 || dn==0 && (*pp<*pmd || *neg==0) ) ) - { - *pos += up+dn; - if (*pp>*pmd && (*cap)+(*pos)<=(*cin)+(*neg)) - ; // no net cape and below max delta - else if (*pp>*pmd || *cap==0) - { // below max delta or cape uninitialized - *cap += *pos; - *cin += *neg; - *neg = *pos = 0; - } - else if (*pos>=*neg) - { // cape initialized and net positive contribution - *cap += (*pos-*neg); - *neg = *pos = 0; - } - } - - // Transition to upward acceleration. - else if (up>0 && dn<=0) - { - *neg += -dn; - if (*pp1<=*pmd) - { // above max delta, only use net pos contribution - *pos += up; - if (*pos>=*neg) - { - *cap += (*pos-*neg); - *neg = *pos = 0; - } - } - else if (*pp<=*pmd) - { // straddle max delta, force cape initialization - if (*cap==0) - { - *cin += *neg; - *cap += *pos; - } - else if (*neg>*pos) - *cin += *neg-*pos; - else - *cap += *pos-*neg; - *cap += up; - *neg = *pos = 0; - } - else if ((*cap)+(*pos)+up<=(*cin)+(*neg)) - {// no net cape to this point - if ((*cap)+(*pos)>0) - { // reinitialize if there was cape before - *cin -= (*cap)+(*pos); - *pos = *cap = 0; - } - *cin += *neg; - *pos += up; - *neg = 0; - } - else if (*cap==0) - { // initialize cape - *cap += *pos+up; - *cin += *neg; - *neg = *pos = 0; - } - else - { // what remains, only use net pos contribution - *pos += up; - if (*pos>=*neg) - { - *cap += (*pos-*neg); - *neg = *pos = 0; - } - } - } - - // Transition to decceleration. - else - { - *pos += dn; - if (*pp1<=*pmd) - { // above max delta, only use net pos contribution - if (*pos>=*neg) - { - *cap += (*pos-*neg); - *neg = *pos = 0; - } - *neg += -up; - } - else if ((*cap)+(*pos)<=(*cin)+(*neg)-up) - {// no net cape to this point - if (*cap>0) - {// reinitialize if there was cape before - *cin -= (*cap)+(*pos); - *pos = *cap = 0; - } - *cin += *neg-up; - *pos = *neg = 0; - } - else if (*cap==0) // initialize cape - { - *cap += *pos; - *cin += *neg-up; - *neg = *pos = 0; - } - else - { // what remains, only use net pos contribution - if (*pos>=*neg) - { - *cap += (*pos-*neg); - *neg = *pos = 0; - } - *neg += -up; - } - } - } - - // Make current layer top next layer bottom. - *tvp1 = *tvp; - *pp1 = *pp; - } - } - - // unallocate our dynamic storage. - free(tec_st); - free(tvc_st); - free(pc_st); - free(md_st); - free(pmd_st); - free(tvp_st); - free(pp1_st); - - return 0; -} - -// In this version we stop the computation at some arbitrary upper level, ptop. -int capeFuncTop(float usetv, float ** p_dat, float ** tve_dat, - float * p0, float * th0, float * sh0, - int mnx, int nx, int ny, int nz, - float * cape_dat, float * cin_dat, float * ptop) -{ - // These pointers point to our dynamic storarge. - float *tvp_st, *tec_st, *tvc_st, *pc_st, *pp1_st, *pmd_st, *md_st; - tvp_st = tec_st = tvc_st = pc_st = pp1_st = pmd_st = md_st = 0; - - // Pointer to output data and end of loop pointer. - float *eptr, *cap, *cin; - - // Working pointers inside our loops. - float *pp, *tt, *tve, *tvp, *qq, *pc, *tec, *tvc, *pmd, *md; - float *pp1, *tvp1, *neg, *pos, *pp0, *pfin; - - float t0, td, tdc, b, up, dn, dlnp; - int k,nn,n2,n3,dd,i,nxm,nzm; - float c0 = 26.66082; - float c1 = 0.0091379024; - float c2 = 6106.396; - float c_1 = 223.1986; - float c_2 = 0.0182758048; - float kapa = 0.286; - float kapa_1 = 3.498257; - - dd = mnx-nx; - nn = mnx*ny-dd; - n2 = nx*ny; - n3 = n2*nz; - nxm = nx-1; - - // Calculate the parcel equivalent temp, virtual temp, and press at LCL. - // Make working copy of sfc press, use as press below current 3d pressure. - pp0 = p0; - tt = th0; - qq = sh0; - pfin = ptop; - tec = tec_st = (float*)malloc(n2*sizeof(float)); - if (tec == NULL || tec_st == NULL) - { - return 1; - } - tvc = tvc_st = (float*)malloc(n2*sizeof(float)); - if (tvc == NULL || tvc_st == NULL) - { - return 1; - } - pc = pc_st = (float*)malloc(n2*sizeof(float)); - if (pc == NULL || pc_st == NULL) - { - return 1; - } - pp1 = pp1_st = (float*)malloc(n2*sizeof(float)); - if (pp1 == NULL || pp1_st == NULL) - { - return 1; - } - eptr = pp0+nn; - if (dd==0) - { - i = 0x7FFFFFFF; - } - else - { - i = nx; - } - for (; pp01e36 || *tt>1e36 || *qq>1e36 || *qq<0.0005 || *pp0<*pfin) - { - *tec = *tvc = *pc = 1e37; - continue; - } - t0 = (*tt)*pow((*pp0)/1000,kapa); - b = c0-log( (*pp0)/(622./(*qq) + 0.378) ); - td = (b-sqrt(b*b-c_1))/c_2; - tdc = td-(t0-td)*(-0.37329638+41.178204/t0+0.0015945203*td); - *pc = (*pp0)*pow(tdc/t0,kapa_1); - *tec = adiabatic_te(&tdc,pc); - *tvc = td*(1+usetv*0.000608*(*qq)); - } - - // Initialize md and pmd, which will be pressure of and max Te delta. - md_st = (float*)malloc(n2*sizeof(float)); - if (md_st == NULL) - { - return 1; - } - pmd_st = (float*)malloc(n2*sizeof(float)); - if (pmd_st == NULL) - { - return 1; - } - memset(md_st, 0, n2*sizeof(float)); - memset(pmd_st, 0, n2*sizeof(float)); - - // Now calculate the virtual temperature of the parcel at the pressures - // in the input data. Then difference it from the environmental temp, - // which has been tweaked to not be cooler than dry adiabatic from the - // parcel start. Record the level of max parcel difference. - tvp = tvp_st = (float*)malloc(n3*sizeof(float)); - nzm = 0; - for (k=0; k1e36 || *pp>1e36 || *tve>1e36 || *pp1<=*pfin) - { - *tvp = 1e37; - continue; - } - *pp1 = *pp; - nzm = k; - t0 = (*tvc)*pow((*pp)/(*pc),kapa); - if (*pp>=*pc) - { - *tvp = t0; - } - else - { - td = (*tec)*pow((*pp)/(*pc),kapa); - *tvp = td = temp_of_te(&td, pp); - if (usetv>0) - *tvp *= (*pp)/( *pp-exp(25.687958917-c1*td-c2/td) ); - } - if (*tve*pc || *pp<*pfin || *tvp<*md) continue; - *md = *tvp; - *pmd = *pp; - } - } - nz = nzm+1; - - // This loop performs the actual cape and cin calculation. Here we will - // reuse storage for virt temp, equiv temp, and max delta for prev parcel - // temp, neg and pos. neg and pos are pending negative and positive - // contributions we have not yet added into the cape and cin yet. - dlnp = 0; - tvp = tvp_st; - for (k=0; k1e36) - continue; - else if (*pp1>1e36 || *tvp1>1e36) - ; - else if (*pp>=*pp1 || *tvp>1e36) - continue; - else if (*pp>=*pp0) - ; - else - { - // Now we finally have the data we need for calculating - // the cape/cin contribution for this layer. - if (*cap>1e36) *cap = *cin = 0; - if (*pmd==0) continue; // No parcel delta>0, we're done. - - // First deal with possibility of bottom lvl being below the - // initial parcel and/or hitting the top of the computation. - if (*pp<*pfin) - { - b = log((*pp1)/(*pp)); - dlnp = log((*pp1)/(*pfin)); - *tvp = *tvp1+(dlnp/b)*(*tvp-*tvp1); - } - if (*pp1>*pp0) - { - if (*pp<*pfin) - dlnp = log((*pp0)/(*pfin)); - else - dlnp = log((*pp0)/(*pp)); - dn = 0; - } - else - { - if (*pp>=*pfin) dlnp = log((*pp1)/(*pp)); - dn = dlnp*287*(*tvp1); - } - - // Now deal with the fact that not allowing superadiabatic - // layers means no cape below condensation pressure. - if (*pp1>=*pc) - { - if (dn>0) dn = 0; - if (*tvp<=0) - up = dlnp*287*(*tvp); - else if (*pp>=*pc) - up = 0; - else if (*pp<*pfin) - up = log((*pc)/(*pfin))*287*(*tvp); - else - up = log((*pc)/(*pp))*287*(*tvp); - } - else - { - up = dlnp*287*(*tvp); - } - - // Deal with where the break point is. - b = up*dn>=0 ? 0.5 : up/(up-dn); - up *= b; - dn *= (1-b); - - // Now consider this layer's contribution, taking into account - // transitions between positive and negative acceleration. - if (up==0 && dn==0) - ; - - // Continuing deceleration. - else if (up<=0 && (dn<0 || dn==0 && (*pp<*pmd || *pos==0) ) ) - *neg -= up+dn; - - // Continuing upward acceleration. - else if (up>=0 && (dn>0 || dn==0 && (*pp<*pmd || *neg==0) ) ) - { - *pos += up+dn; - if (*pp>*pmd && (*cap)+(*pos)<=(*cin)+(*neg)) - ; // no net cape and below max delta - else if (*pp>*pmd || *cap==0) - { // below max delta or cape uninitialized - *cap += *pos; - *cin += *neg; - *neg = *pos = 0; - } - else if (*pos>=*neg) - { // cape initialized and net positive contribution - *cap += (*pos-*neg); - *neg = *pos = 0; - } - } - - // Transition to upward acceleration. - else if (up>0 && dn<=0) - { - *neg += -dn; - if (*pp1<=*pmd) - { // above max delta, only use net pos contribution - *pos += up; - if (*pos>=*neg) - { - *cap += (*pos-*neg); - *neg = *pos = 0; - } - } - else if (*pp<=*pmd) - { // straddle max delta, force cape initialization - if (*cap==0) - { - *cin += *neg; - *cap += *pos; - } - else if (*neg>*pos) - { - *cin += *neg-*pos; - } - else - { - *cap += *pos-*neg; - } - *cap += up; - *neg = *pos = 0; - } - else if ((*cap)+(*pos)+up<=(*cin)+(*neg)) - {// no net cape to this point - if ((*cap)+(*pos)>0) - { // reinitialize if there was cape before - *cin -= (*cap)+(*pos); - *pos = *cap = 0; - } - *cin += *neg; - *pos += up; - *neg = 0; - } - else if (*cap==0) - { // initialize cape - *cap += *pos+up; - *cin += *neg; - *neg = *pos = 0; - } - else - { // what remains, only use net pos contribution - *pos += up; - if (*pos>=*neg) - { - *cap += (*pos-*neg); - *neg = *pos = 0; - } - } - } - - // Transition to decceleration. - else - { - *pos += dn; - if (*pp1<=*pmd) - { // above max delta, only use net pos contribution - if (*pos>=*neg) - { - *cap += (*pos-*neg); - *neg = *pos = 0; - } - *neg += -up; - } - else if ((*cap)+(*pos)<=(*cin)+(*neg)-up) - {// no net cape to this point - if (*cap>0) - {// reinitialize if there was cape before - *cin -= (*cap)+(*pos); - *pos = *cap = 0; - } - *cin += *neg-up; - *pos = *neg = 0; - } - else if (*cap==0) // initialize cape - { - *cap += *pos; - *cin += *neg-up; - *neg = *pos = 0; - } - else - { // what remains, only use net pos contribution - if (*pos>=*neg) - { - *cap += (*pos-*neg); - *neg = *pos = 0; - } - *neg += -up; - } - } - } - - // Make current layer top next layer bottom. - *tvp1 = *tvp; - *pp1 = *pp; - } - } - - // unallocate our dynamic storage. - free(tec_st); - free(tvc_st); - free(pc_st); - free(pp1_st); - free(md_st); - free(pmd_st); - free(tvp_st); - - return 0; -} - diff --git a/nativeLib/rary.meteorological/src/cclpar.f b/nativeLib/rary.meteorological/src/cclpar.f deleted file mode 100755 index 1fd63dc69c..0000000000 --- a/nativeLib/rary.meteorological/src/cclpar.f +++ /dev/null @@ -1,109 +0,0 @@ - SUBROUTINE CCLPAR(MIX,P,HT,T,NLVLS,PCCL,TCCL,HCCL) - IMPLICIT NONE -C -C Statement of purpose. -C --------------------- -C This routine computes the pressure, height, and temperature of the -C convective condensation level (CCL) from a sounding. -C -C History. -C -------- -C Don Baker 15 Jun 85 Original version. -C Dale Perry Sep 96 Adapted code for WFO -C -C Description of input and output. -C -------------------------------- -C On input: -C --------- -C MIX Real Mixing ratio used to intersect the sounding (g/kg). -C P Real Array Sounding pressures (mb). -C HT Real Array Sounding heights (m asl). -C T Real Array Sounding temperatures (K). -C NLVLS Integer Number of sounding levels passed. -C -C On output: -C ---------- -C PCCL Pressure of the convective condensation level (mb). -C TCCL Temperature of the convective condensation level (K). -C HCCL Height of the convective condensation level (m asl). -C -C User notes: -C ----------- -C 1) The low level mean mixing ratio is input to this routine... -C computed outside. -C 2) On days with a strong low level inversion, the convective -C temperature may seem low because the strict definition is -C used in the computation (i.e., where the low level mixing -C ratio line first intersects the sounding). -C -C -C Input arguments. -C - INTEGER NLVLS - REAL MIX,P(NLVLS),HT(NLVLS),T(NLVLS) -C -C Output arguments. -C - REAL PCCL,TCCL,HCCL -C -C Internal variables. -C - REAL PB,PM,PT,T1,T2,PLOG1,PLOG2,PLOG3 - INTEGER I,COUNT -C -C External functions. -C - REAL INTERP1 -C -C Subroutine constants. -C - REAL TOLER,FLAG - PARAMETER (TOLER=0.05,FLAG=99999.) -C -C Loop up through sounding until mixing ratio line crosses environmental -C sounding line. Initially set the CCL parameters to FLAG values in case -C no CCL is found. -C - PCCL=FLAG - HCCL=FLAG - TCCL=FLAG - DO 100 I=1,NLVLS - CALL TEMP_MIXRATIO(P(I),MIX,T1) - T2=T(I) - IF (T1.GE.T2) GO TO 102 - 100 CONTINUE - 102 CONTINUE - IF (I.EQ.1) THEN !CCL at the surface - PCCL=P(1) - HCCL=HT(1) - TCCL=T(1) - GO TO 999 - END IF - PT=P(I) - PB=P(I-1) - PLOG1=ALOG(P(I)) - PLOG3=ALOG(P(I-1)) -C -C Iterate to find the CCL. Keep cutting level in half until the -C point of intersection is found. -C - DO 105 COUNT=1,100 - PM=0.5*(PT+PB) - PLOG2=ALOG(PM) - CALL TEMP_MIXRATIO(PM,MIX,T1) - T2=INTERP1(T(I),T(I-1),PLOG1,PLOG2,PLOG3) - IF (ABS(T1-T2).LE.TOLER) THEN - PCCL=PM - TCCL=T1 - HCCL=INTERP1(HT(I),HT(I-1),PLOG1,ALOG(PCCL),PLOG3) - GO TO 999 - ENDIF - IF (T1-T2.GT.TOLER) PT=PM - IF (T2-T1.GT.TOLER) PB=PM - 105 CONTINUE -C -C Exit. -C - 999 CONTINUE - RETURN - END diff --git a/nativeLib/rary.meteorological/src/cgp.f b/nativeLib/rary.meteorological/src/cgp.f deleted file mode 100755 index 35a06f6be5..0000000000 --- a/nativeLib/rary.meteorological/src/cgp.f +++ /dev/null @@ -1,158 +0,0 @@ - integer function cgp(tempip,dwptip,presip,thetawip,sfcpres, - & toppres,iw,deltap) - implicit none -c######################################################################## -c -c Statement of purpose: Calculates the convective gust potential based -c on Western Region Technical Attachment 76-??. -c -c Date: 05 February 1998 -c -c Input: -c -c tempip(0:) - temperature (degrees Kelvin) on the uniform pressure -c grid -c dwptip(0:) - dew point temperature (degrees Kelvin) on the -c uniform pressure grid -c presip(0:) - pressure (mb) on the uniform pressure grid -c thetawip(0:) - wet bulb potential temperature (degrees Kelvin) on -c the uniform pressure grid -c sfcpres - presip(sfcpres) contains the surface pressure (mb) -c toppres - presip(toppres) contains the last pressure (mb) on -c the uniform pressure grid -c iw - >0 for mixing ratio with respect to water -c <0 for mixing ratio with respect to ice -c deltap - pressure increment (mb) of the uniform pressure -c grid -c -c Output: -c -c icgp - convective gust potential (1,2,3,4) -c -c######################################################################## - - real twmax, dd, delta, deltap, sfcpres, toppres - real top300, bot300, top400, bot400, top500, bot500 - real top700, bot700, tl, pl, zl, usi, t4 - integer iw, itwmax, it4, it3, i, ier - integer n - parameter (n=400) - real tempip(n), dwptip(n), presip(n), thetawip(n), soln(0:n) - -c -c Initialize some variables. -c - - cgp= -999 - itwmax= -999 - it4= -999 - it3= -999 - twmax= -999.0d0 - dd= -999.0d0 - delta= deltap/2.0d0 - -c -c The original algorithm lifted the 500 mb parcel and used the 700 mb dew -c point depression. Here we find the most unstable parcel "near" 500 mb -c and the driest parcel "near" 700 mb. We also need the environmental -c temperature "near" 300 mb and 400 mb. "Near" at 500 and 700 mb means a -c 60 mb interval (470-530 mb, 670-730 mb) or a deltap interval if the -c interpolated data is too coarse. "Near" at 300 and 400 mb means a 20 -c mb interval (290-310 mb, 390-410 mb) or a deltap interval if interpolated -c data is too coarse. This section determines the intervals. -c - - top300= min(300.0d0-delta,290.0d0) - bot300= max(300.0d0+delta,310.0d0) - top400= min(400.0d0-delta,390.0d0) - bot400= max(400.0d0+delta,410.0d0) - top500= min(500.0d0-delta,470.0d0) - bot500= max(500.0d0+delta,530.0d0) - top700= min(700.0d0-delta,670.0d0) - bot700= max(700.0d0+delta,730.0d0) - -c -c Now that the intervals to find things have been determined, find the most -c unstable parcel defined as that parcel with the highest wet bulb potential -c temperature. Also, find the parcel with the largest dew point depression -c and the pressure levels corresponding to the near 300 and near 400 mb -c temperatures. -c - - do 10 i= sfcpres,toppres -c print *,presip(i),thetawip(i) - if ((presip(i).ge.top500).and.(presip(i).le.bot500)) then - if (thetawip(i).gt.twmax) then - twmax= thetawip(i) - itwmax= i - endif - endif - if ((presip(i).ge.top700).and.(presip(i).le.bot700)) then - if ((tempip(i)-dwptip(i)).gt.dd) then - dd= tempip(i)-dwptip(i) - endif - endif - if ((presip(i).ge.top400).and.(presip(i).le.bot400)) then - it4= i - endif - if ((presip(i).ge.top300).and.(presip(i).le.bot300)) then - it3= i - endif - 10 continue - -c -c Lift the most unstable parcel found above to its LCL. Then lift it -c pseudo-moist adiabatically up to "near" 400 mb then from there up to -c "near" 300 mb. Compare these lifted parcel temperatures to the -c environmental temperatures at these levels to calculate the upper -c stability index. -c - - call tpzlcl(tempip(itwmax),dwptip(itwmax),presip(itwmax), - & iw,tl,pl,zl,ier) - soln(0)= tl -c print *,'lifting',presip(itwmax),tempip(itwmax),dwptip(itwmax) -c print *,'lcl',tl,pl -c print *,'going into pseudolift',pl,presip(it4),soln(0) - call pseudolift(100,pl,presip(it4),soln) - t4= soln(100) -c print *,'parcel temp at ',presip(it4),t4 - soln(0)= t4 - call pseudolift(100,presip(it4),presip(it3),soln) -c print *,'parcel temp at ',presip(it3),soln(100) -c print *,'4,3',tempip(it4),tempip(it3) - usi= (tempip(it4)-t4)+(tempip(it3)-soln(100)) -c print *,usi,dd - -c -c Check for area 1 on the nomogram. -c - - if ((dd.le.10.0d0).and.(dd+(2.0d0*usi).le.20.0d0)) then - cgp= 1 - -c -c Check for area 2 on the nomogram. -c - - elseif ((dd-(2.0d0*usi).le.15.0d0).and.(usi.ge.5.0d0).and. - & (dd+(2.0d0*usi).gt.20.0d0)) then - cgp= 2 - -c -c Check for area 4 on the nomogram. -c - - elseif (((dd.ge.15.0d0).and.(usi.le.4.0d0)).or.((dd.gt.25.0d0) - & .and.(dd-(2.5d0*usi).ge.15.0d0).and.(usi.gt.4.0d0))) then - cgp= 4 - -c -c Check for area 3 on the nomogram. -c - - else - cgp= 3 - endif - return - end diff --git a/nativeLib/rary.meteorological/src/comp_by.f b/nativeLib/rary.meteorological/src/comp_by.f deleted file mode 100755 index 0fc474d725..0000000000 --- a/nativeLib/rary.meteorological/src/comp_by.f +++ /dev/null @@ -1,134 +0,0 @@ -c -c - subroutine comp_by(u,v,uu,vv,mni,ni,nj,control,comp,comp2) -c -C############################################################################# -C Statement of purpose. -C --------------------- -C This routine computes the component of the first vector in the direction -C of the second. -C -C History. -C -------- -C J. Ramer original version 1 Jul 03 -C -C Description of input and output. -C -------------------------------- -C On input: -C --------- -c u Real Array X compontent of first vector -c v Real Array Y compontent of first vector -c uu Real Array X compontent of second vector -c vv Real Array Y compontent of second vector -c mni Integer First dimension of input array. -C ni, nj Integer Number of points in the x- and y-directions. -C control Real Value which controls how calculation is done. -C Number of degrees to rotate second vector before -C it is dotted with the first vector. If not -C an integer, then do not normalize by the -C magnitude of the second vector. If thousands -C place is one, output component unsigned. -C If thousands place is two output the component -C as a vector, with comp being the x component -C and comp2 being the y-component. -C If thousands place is three output a second -C component in comp2, in the direction of the -C k-cross of second vector. -C -C On output: -C ---------- -C comp Real Array Component of first vector in direction of second, -C or x component of component as a vector. -C comp2 Real Array Component of first vector in k-cross direction -C of second or y component of component as a vector. - -C -C############################################################################### -c - implicit none -c - integer mni, ni, nj, i, j, ss, vecout, magpwr - real flag, bad, a, b, conint, uuu, vvv, mag - logical norml, rotyes - real dgtord/0.01745329252/ -c -c---- Declare input arguments. -c - real control - real u(mni,nj), v(mni,nj) - real vv(mni,nj), uu(mni,nj) -c -c---- Declare output arguments. -c - real comp(mni,nj), comp2(mni,nj) -c -c---- Interpret the control value -c - parameter(flag = 1.e37) - bad = 1e6-2. - ss = 1 - conint = 0 - vecout = 0 - magpwr = 1 - rotyes = .false. - norml = .true. - if (control.gt.-3181 .and. control.lt.3181 .and. - & control.ne.0) Then - if (control.lt.0) ss = -1 - conint = int(ss*control) - if (conint.ne.ss*control) norml = .false. - vecout = conint/1000 - conint = (conint-1000*vecout)*ss - if (conint.lt.-180 .or. conint.gt.180 .or. - & conint.eq.0) Then - conint = 0; - else - a = cos(dgtord*conint) - b = sin(dgtord*conint) - rotyes = .true. - End If - if (vecout.eq.2) magpwr = 2 - if (.not.norml) magpwr = magpwr -1 - End If - - mag = 1 - Do 7091 j=1,nj - Do 7090 i=1,ni - If (u(i,j).gt.bad .or. uu(i,j).gt.bad .or. - - v(i,j).gt.bad .or. vv(i,j).gt.bad) Then - comp(i,j)=Flag - if (vecout.ge.2) comp2(i,j)=Flag - Else - if (rotyes) then - uuu = uu(i,j)*a+vv(i,j)*b - vvv = vv(i,j)*a-uu(i,j)*b - Else - uuu = uu(i,j) - vvv = vv(i,j) - End if - if (magpwr.eq.2) Then - mag=uuu*uuu+vvv*vvv - Else if (magpwr.eq.1) Then - mag=sqrt(uuu*uuu+vvv*vvv) - EndIf - If (mag.eq.0) Then - comp(i,j)=Flag - if (vecout.ge.2) comp2(i,j)=Flag - else If (vecout.eq.3) Then - comp(i,j)=(uuu*u(i,j)+vvv*v(i,j))/mag - comp2(i,j)=(vvv*u(i,j)-uuu*v(i,j))/mag - else If (vecout.eq.2) Then - mag=(uuu*u(i,j)+vvv*v(i,j))/mag - comp(i,j)=uuu*mag - comp2(i,j)=vvv*mag - else - comp(i,j)=(uuu*u(i,j)+vvv*v(i,j))/mag - if (vecout.eq.1 .and. comp(i,j).lt.0) - & comp(i,j)=-comp(i,j) - EndIf - End If -7090 Continue -7091 Continue - - return - end diff --git a/nativeLib/rary.meteorological/src/constant.f b/nativeLib/rary.meteorological/src/constant.f deleted file mode 100755 index 347fe59f23..0000000000 --- a/nativeLib/rary.meteorological/src/constant.f +++ /dev/null @@ -1,17 +0,0 @@ -c -c - subroutine constant(a,const,mni,ni,nj) -c -c..... routine to set an array to a constant. -c - implicit none - integer mni,ni,nj,i,j - real a(mni,nj), const -c - do 1 j=1,nj - do 1 i=1,ni - a(i,j) = const -1 continue -c - return - end diff --git a/nativeLib/rary.meteorological/src/crossvectors.f b/nativeLib/rary.meteorological/src/crossvectors.f deleted file mode 100755 index 9991e63eb8..0000000000 --- a/nativeLib/rary.meteorological/src/crossvectors.f +++ /dev/null @@ -1,29 +0,0 @@ -c -c - subroutine crossVectors(aX,aY,bX,bY,result,mni,ni,nj) -c -c..... Cross a field of vectors by another. Each i,j in one array of vectors -c..... is crossed with the corresponding i,j in the other array of vectors. -c -c..... J Ramer Jun 95 -c - implicit none - integer mni, ni, nj, i, j - real flag, bad - parameter(flag = 1.e37) - real aX(mni,nj), aY(mni,nj), bX(mni,nj), bY(mni,nj) - real result(mni,nj) -c - bad = 1e36 - do 1 j=1,nj - do 1 i=1,ni - if (aX(i,j).gt.bad .or. bX(i,j).gt.bad .or. - & aY(i,j).gt.bad .or. bY(i,j).gt.bad) then - result(i,j) = flag - else - result(i,j) = aX(i,j) * bY(i,j) - aY(i,j) * bX(i,j) - endif -1 continue -c - return - end diff --git a/nativeLib/rary.meteorological/src/ctop.f b/nativeLib/rary.meteorological/src/ctop.f deleted file mode 100755 index 0d18f677ff..0000000000 --- a/nativeLib/rary.meteorological/src/ctop.f +++ /dev/null @@ -1,75 +0,0 @@ - SUBROUTINE CTOP(P,HT,VV,PEQLEV,NPAR,CLDTOP) - IMPLICIT NONE - -C Statement of purpose. -C --------------------- -C This routine estimates the cloud top based on the undiluted parcel -C vertical velocity profile. -C -C History. -C -------- -C D. Baker 10 May 85 Original version. -C -C Description of input and output. -C -------------------------------- -C On input: -C --------- -C P Real Array Parcel level pressures (mb). -C HT Real Array Parcel level heights (m asl). -C VV Real Array Parcel vertical velocity profile (m/s). -C PEQLEV Real Equilibrium level pressure (mb). -C NPAR Integer Number of parcel levels passed. -C -C On output: -C ---------- -C CLDTOP Real Estimated cloud top (m asl). -C -C User notes: -C ----------- -C 1) The estimated cloud top is the level where the vertical velocity -C drops to zero above the equilibrium level. -C 2) If the parcel vertical velocity does not drop to zero, a value -C of 99999 is returned for the cloud top...meaning that the top is -C above the top of the sounding. - -C---- Input arguments. - - INTEGER NPAR - REAL HT(NPAR),P(NPAR),VV(NPAR),PEQLEV - -C---- Output arguments. - - REAL CLDTOP - -C---- Internal variables. - - INTEGER I,J - REAL FLAG,FLG - PARAMETER (FLAG=99999.,FLG=99998.) - -C---- Initialize cloud top flag to value for the case of no equilibrium level. -C---- Search for equilibrium level. If not found, exit. - - CLDTOP=FLAG - IF (PEQLEV.LT.-FLG) GO TO 999 - DO I=1,NPAR - IF (P(I).LE.PEQLEV) GO TO 101 - END DO -101 IF (I.EQ.NPAR) GO TO 999 - -C---- Iterate above the equilibrium level until vertical velocity drops to -C---- zero. If this does not happen by the time the top of the sounding is -C---- reached, return flag value corresponding to this case. - - DO J=I,NPAR - IF (VV(J).LT.0.01) THEN - CLDTOP=HT(J) - GO TO 999 - END IF - END DO - -C---- Exit. - -999 CONTINUE - RETURN - END diff --git a/nativeLib/rary.meteorological/src/cv_date2jul.f b/nativeLib/rary.meteorological/src/cv_date2jul.f deleted file mode 100755 index d7c5d99379..0000000000 --- a/nativeLib/rary.meteorological/src/cv_date2jul.f +++ /dev/null @@ -1,88 +0,0 @@ - SUBROUTINE CV_DATE2JUL (YR,MON,DAY,JD,ISTATUS) -C -C Subroutine CV_DATE2JUL converts input dates into Julian day. -C It is a "pirated" version of the ASCII2JUL. The major -C difference is that CV_DATE2JUL does not utilize an ASCII string for -C the data. -C -C -C INPUT: -C YR Year -C MON Month -C DAY Day -C -C OUTPUT: -C JD An integer form of the Julian day -C This form is currently [ddd]; it -C can, however, be easily changed to -C the form [yyddd] (see below) -C -C - implicit none - - INTEGER YR,MON,DAY - INTEGER*4 JD - INTEGER istatus -C -C **** Calculate number of days **** -C - JD = 0 - IF(MON.EQ.1)GO TO 20 -C - JD = JD+31 - IF (MON.EQ.2)GO TO 20 -C - JD=JD+28 - IF (YR/4*4 .EQ. YR) JD=JD+1 - IF (MON.EQ.3)GO TO 20 -C - JD=JD+31 - IF(MON.EQ.4)GO TO 20 -C - JD=JD+30 - IF(MON.EQ.5)GO TO 20 -C - JD=JD+31 - IF(MON.EQ.6)GO TO 20 -C - JD=JD+30 - IF(MON.EQ.7)GO TO 20 -C - JD=JD+31 - IF(MON.EQ.8)GO TO 20 -C - JD=JD+31 - IF(MON.EQ.9)GO TO 20 -C - JD=JD+30 - IF(MON.EQ.10)GO TO 20 -C - JD=JD+31 - IF(MON.EQ.11)GO TO 20 -C - JD=JD+30 - IF(MON.EQ.12)GO TO 20 -C -C -C **** Getting to this point indicates an error. **** -C -C - GO TO 200 -C -C -20 JD=JD+DAY !This gives JD in [ddd] form. -C JD=YR*1000+JD !If this line is included, JD is returned in - ![yyddd] form. -C -C **** Return JD as an integer value -- not as a character string **** -C - RETURN -C -C -c `g77' doesn't support the I/O statements `TYPE' and `ACCEPT'. -c200 TYPE *,'Error in retrieving Julian day from input;', - 200 print *,'Error in retrieving Julian day from input;', - 1 ' exiting subroutine CV_DATE2JUL' - Istatus = 0 - RETURN - END diff --git a/nativeLib/rary.meteorological/src/cvgust.f b/nativeLib/rary.meteorological/src/cvgust.f deleted file mode 100755 index 00fb036b8b..0000000000 --- a/nativeLib/rary.meteorological/src/cvgust.f +++ /dev/null @@ -1,85 +0,0 @@ - subroutine cvgust(dd7,ui,gstpot) - implicit none -C############################################################################### -C Statement of purpose. -C --------------------- -C Compute the convective gust potential by locating the 700 mb dew point -C depression and the upper level stability index on the nomogram presented in -C Western Region Technical Attachment 76-14 (June, 1976). -C -C History. -C -------- -C D. Baker 25 Mar 87 Original version. -C -C Description of input and output. -C -------------------------------- -C On input: -C --------- -C dd7 real 700 mb dew point depression (C). -C ui real Upper level stability index (C). -C -C On output: -C ---------- -C gstpot integer Microburst potential index as follows: -C 1 = gusts less than 30 kt (low level too moist) -C 2 = gusts less than 30 kt (upper level too stable) -C 3 = gusts 30 to 40 kt possible -C 4 = gusts greater than 40 kt possible -C############################################################################### -C Input arguments. - real dd7,ui -C Output arguments. - integer gstpot -C Local variables. - real eq1,eq2,eq3,x -C Statement functions - equations of the slanted lines on the nomogram. - eq1(x)=(-2.)*x+20. - eq2(x)=3.33*x+13.33 - eq3(x)=2.*x+15. -C Check for area 1 on nomogram. - gstpot=0 - if (dd7.le.10.) then - if (ui.le.5.) then - gstpot=1 - else if (ui.gt.5.) then - if (eq1(ui).ge.dd7) gstpot=1 - end if - end if - if (gstpot.ne.0) go to 9999 -C Check for area 2 on nomogram. - if (ui.ge.5.) then - if (dd7.ge.10. .and. dd7.le.25.) then - gstpot=2 - else if (dd7.lt.10.) then - if (eq1(ui).le.dd7) gstpot=2 - else if (dd7.gt.25.) then - if (eq3(ui).ge.dd7) gstpot=2 - end if - end if - if (gstpot.ne.0) go to 9999 -C Check for area 3 on nomogram. - if (dd7.ge.10. and. dd7.le.15.) then - if (ui.le.5.) gstpot=3 - else if (ui.le.5. and. ui.ge.3.5) then - if (dd7.ge.10. .and. dd7.le.25.) then - gstpot=3 - else if (dd7.ge.25.) then - if (eq2(ui).ge.dd7 .and. eq3(ui).le.dd7) gstpot=3 - end if - else if (ui.ge.5.) then - if (eq3(ui).le.dd7) gstpot=3 - end if - if (gstpot.ne.0) go to 9999 -C Check for area 4 on nomogram. - if (dd7.ge.15. .and. dd7.le.25.) then - if (ui.le.5.) then - gstpot=4 - end if - else if (dd7.ge.25.) then - if (eq2(ui).le.dd7) then - gstpot=4 - end if - end if -C Return to calling program. -9999 return - end diff --git a/nativeLib/rary.meteorological/src/dcapeFunc.c b/nativeLib/rary.meteorological/src/dcapeFunc.c deleted file mode 100755 index 4e540a95b4..0000000000 --- a/nativeLib/rary.meteorological/src/dcapeFunc.c +++ /dev/null @@ -1,390 +0,0 @@ - -#include -#include -#include -#include - -#include "meteoLib.h" - -// We input theta and specific humidity for surface conditions because these -// are things that can be arithemitically averaged for a mixed layer. -// In order for a dcape to be calculated, there must be positive bouyancy -// somewhere in the column based on the input surface conditions, neglecting -// any cap. Sinking parcel starts from the minimum thetaE level that is above -// the condensation pressure and below 400mb and the highest positive -// rising parcel bouyancy. max_evap is the limit to how much water can -// be evaporated into the parcel as it decends, in Kg/Kg. max_rh is -// the desired RH (%) as the parcel reaches the surface. Will initially -// evaporate up to one-third of max_evap into the sinking parcel at the -// start, afterward attempting to trend the RH toward max_rh at the ground. -// If usetv=1, buoyancy is done with virtual temp, if usetv=0 with temp. -void dcapeFunc(float usetv, const float ** p_dat, const float ** t_dat, const float ** td_dat, - float * p0, float * th0, float * sh0, - int mnx, int nx, int ny, int nz, - float max_evap, float max_rh, float * dcape_dat) - { - // These pointers point to our dynamic storarge. - float *tvp_st, *tv0_st, *tvc_st, *tec_st, *pc_st; - float *pm_st, *tm_st, *tdm_st, *wm_st, *rhm_st, *qm_st; - tvp_st = tv0_st = tec_st = tvc_st = pc_st = - pm_st = tm_st = tdm_st = wm_st = rhm_st = qm_st = 0; - - // Pointer to output data and end of loop pointer. - float *dcape; - - // Working pointers inside our loops. - const float *pp, *tt, *td3, *eptr; - float *tv, *tvp, *tve, *qq, *pc, *tec, *tvc; - float *pm, *tm, *tdm, *wm, *rhm, *pp1, *tvp1, *tve1, *pp0; - - float t0, td, b, up, dn, dlnp, qd, qw, qs, thve, eee, pb, pr, rhmx; - int k,nn,n2,n3,dd,i,nzm,nxm; - float c0 = 26.66082; - float c1 = 0.0091379024; - float c2 = 6106.396; - float c_1 = 223.1986; - float c_2 = 0.0182758048; - float kapa = 0.286; - float kapa_1 = 3.498257; - - dd = mnx-nx; - nn = mnx*ny-dd; - n2 = nx*ny; - n3 = n2*nz; - nzm = nz-1; - nxm = nx-1; - - // Calculate the ascending parcel start equivalent temp, virtual temp, - // and press at LCL, and the initial virtual temperature. Initialize - // pm and wm, which now will be pressure at and min environmetal - // virtual theta E. - pm = pm_st = (float*)malloc(n2*sizeof(float)); - wm = wm_st = (float*)malloc(n2*sizeof(float)); - pp0 = p0; - tt = th0; - qq = sh0; - tec = tec_st = (float*)malloc(n2*sizeof(float)); - tvc = tvc_st = (float*)malloc(n2*sizeof(float)); - pc = pc_st = (float*)malloc(n2*sizeof(float)); - tv = tv0_st = (float*)malloc(n2*sizeof(float)); - eptr = pp0+nn; - if (dd==0) - i = 0x7FFFFFFF; - else - i = nx; - for (; pp01e36 || *tt>1e36 || *qq>1e36) - { - *tec = *tvc = *pc = 1e37; - continue; - } - t0 = (*tt)*pow((*pp0)/1000,kapa); - *tv = t0*(1+usetv*0.000608*(*qq)); - b = c0-log( (*pp0)/(622./(*qq) + 0.378) ); - td = (b-sqrt(b*b-c_1))/c_2; - td -= (t0-td)*(-0.37329638+41.178204/t0+0.0015945203*td); - *pc = (*pp0)*pow(td/t0,kapa_1); - *tec = adiabatic_te(&td,pc); - *tvc = td*(1+usetv*0.000608*(*qq)); - } - - // Now calculate the virtual temperature of the accending parcel at the - // pressures in the input data. - tvp = tvp_st = (float*)malloc(n3*sizeof(float)); - for (k=0; k1e36 || *tec>1e36 || *tvc>1e36 || *pp>1e36) - { - *tvp = 1e37; - continue; - } - if (*pp>=*pc) - { - *tvp = (*tvc)*pow((*pp)/(*pc),kapa); - continue; - } - t0 = (*tec)*pow((*pp)/(*pc),kapa); - t0 = temp_of_te(&t0, pp); - *tvp = t0*(*pp)/( *pp-usetv*exp(25.687958917-c1*t0-c2/t0) ); - } - } - - // Calculate environment virtual temp, where we force the environment - // to be no cooler than dry adiabatic from the ascending parcel start. - // Find pressure of min environmetal virtual theta E above condensation - // pressure...record temperature and dewpoint there. Since we do not - // need the accending parcel temps to complete the dcape calc, we - // will put the environmental virtual temp into the that storage. - tm = tm_st = (float*)malloc(n2*sizeof(float)); - tdm = tdm_st = (float*)malloc(n2*sizeof(float)); - tvp = tvp_st+(n3+n2); - for (k=nzm; k>=0; k--) - { - tvp -= (2*n2); - pp = p_dat[k]; - tt = t_dat[k]; - td3 = td_dat[k]; - wm = wm_st; - tm = tm_st; - tdm = tdm_st; - pm = pm_st; - tvc = tvc_st; - pc = pc_st; - eptr = pp+nn; - if (dd==0) - i = 0x7FFFFFFF; - else - i = nx; - for (; pp1e36 || *pc>1e36 || *pp>1e36 || *tvp>1e36 || - *tt>1e36 || *td3>1e36) - { - *tvp = 1e37; - continue; - } - t0 = *tt; - eee = exp(26.186004814-c1*(*td3)-c2/(*td3)); - qd = eee/(*pp-0.60771703*eee); - eee = (1+usetv*0.608*qd); - thve = t0*eee; - pr = pow((*pp)/(*pc),kapa); - if (thve<(*tvc)*pr) - { - thve = (*tvc)*pr; - t0 = thve/eee; - } - if (*tvp<=thve && *wm>1e36 || *pp>*pc && *pm>=400) - { - if (*pm>1e36 && *pp<*pc) *pm = *pc; - *tvp = thve; - continue; - } - *tvp = thve; - thve = (thve+2529*qd)*pow(1000/(*pp),kapa); - if (thve>*wm && *pm>=400) continue; - *wm = thve; - *pm = *pp; - *tm = t0; - *tdm = *td3; - } - } - - // Here we will reuse our condensation level storage for - // the level above current. This loop performs the actual dcape - // calculation. - rhm = rhm_st = (float*)malloc(n2*sizeof(float)); - qq = qm_st = (float*)malloc(n2*sizeof(float)); - tve = tvp_st+(n3+n2); - for (k=nzm; k>=0; k--) - { - tve -= (2*n2); - pp = p_dat[k]; - tvp1 = tec_st; - tve1 = tvc_st; - pp1 = pc_st; - wm = wm_st; - tm = tm_st; - tdm = tdm_st; - rhm = rhm_st; - qq = qm_st; - pm = pm_st; - pp0 = p0; - tv = tv0_st; - dcape = dcape_dat; - eptr = pp+nn; - if (dd==0) - i = 0x7FFFFFFF; - else - i = nx; - for (; pp1e36 || *pp0>1e36 || *tv>1e36) - continue; - else if (*pp1>1e36) - ; - else if (*pp1>=*pp0) - continue; - else if (*tve1>1e36) - ; - else if (*pp>1e36 || *tve>1e36) - continue; - else if (*pp<=*pm) - ; - else if (*wm>1e36) - *dcape = 0; - else - { - - // Now we finally have the data we need for calculating - // the dcape contribution for this layer. If we have not - // made any dcape calculations to this point, initialize - // the decent parcel. - if (*dcape>1e36) - { - *dcape = 0; - eee = exp(26.186004814-c1*(*tdm)-c2/(*tdm)); - qd = eee/(*(pm)-0.60771703*eee); - qw = qd + max_evap/3; - t0 = *tm - 2529*max_evap/3; - eee = exp(26.186004814-c1*t0-c2/t0); - qs = eee/(*(pm)-0.60771703*eee); - if (qs>=qw) - { - *wm = max_evap-max_evap/3; - *tm = t0; - *rhm = qw/qs; - b = c0-log( qw*(*pm)/(0.622-0.378*qw) ); - *tdm = (b-sqrt(b*b-c_1))/c_2; - } - else - { - *tm = *tdm = mytw(tm, tdm, pm); - *rhm = 1.0; - eee = exp(26.186004814-c1*(*tm)-c2/(*tm)); - qw = eee/(*(pm)-0.60771703*eee); - *wm = max_evap-(qw-qd); - } - *qq = qw; - *tvp1 = *tm*(1+usetv*0.608*qw); - *pp1 = *pm; - } - - // Deal with reaching the surface, add in top of layer part. - if (*pp>*pp0) - { - pb = *pp0; - dlnp = log(pb/(*pp1)); - thve = *tv; - } - else - { - pb = *pp; - dlnp = log(pb/(*pp1)); - thve = *tve; - } - up = -dlnp*287*0.5*(*tvp1-*tve1); - if (up<-*dcape) - *dcape = 0; - else - *dcape += up; - - // Deal with letting parcel fall to pb - pr = pow(pb/(*pp1),kapa); - if (*wm<=0) - *tvp1 *= pr; - else - { - rhmx = *rhm+(pb-*pp1)*(max_rh-*rhm)/(*pp0-*pp1); - t0 = *tm*pr; - eee = exp(26.186004814-c1*t0-c2/t0); - qs = eee/(pb-0.60771703*eee); - if ((*qq)/qs>rhmx) - { - *tm = t0; - b = c0-log( (*qq)*pb/(0.622-0.378*(*qq)) ); - *tdm = (b-sqrt(b*b-c_1))/c_2; - *tvp1 *= pr; - *rhm = (*qq)/qs; - } - else - { - qd = (rhmx*qs-(*qq))/sqrt(1000* (rhmx*qs+(*qq)) ); - if (qd>*wm) qd = *wm; - qw = *qq + qd; - td = t0 - 2529*(*wm); - eee = exp(26.186004814-c1*td-c2/td); - qs = eee/(pb-0.60771703*eee); - if (qs>=qw) - { - *tm = td; - *rhm = qw/qs; - b = c0-log( qw*pb/(0.622-0.378*qw) ); - *tdm = (b-sqrt(b*b-c_1))/c_2; - } - else - { - b = c0-log( (*qq)*pb/(0.622-0.378*(*qq)) ); - *tdm = (b-sqrt(b*b-c_1))/c_2; - *tm = *tdm = mytw(&t0, tdm, &pb); - *rhm = 1.0; - eee = exp(26.186004814-c1*(*tm)-c2/(*tm)); - qw = eee/(pb-0.60771703*eee); - qd = qw-*qq; - } - *wm -= qd; - *qq = qw; - *tvp1 = *tm*(1+usetv*0.608*qw); - } - } - - // Add contribution of bottom of layer. - dn = -dlnp*287*0.5*(*tvp1-thve); - if (dn<-*dcape) - *dcape = 0; - else - *dcape += dn; - - } - - // Make current layer top next layer bottom. - *tve1 = *tve; - *pp1 = *pp; - } - } - - // unallocate our dynamic storage. - free(tvp_st); - free(tv0_st); - free(tec_st); - free(tvc_st); - free(pc_st); - free(pm_st); - free(tm_st); - free(tdm_st); - free(wm_st); - free(rhm_st); - free(qm_st); - - } diff --git a/nativeLib/rary.meteorological/src/ddff.f b/nativeLib/rary.meteorological/src/ddff.f deleted file mode 100755 index 47d9abb07c..0000000000 --- a/nativeLib/rary.meteorological/src/ddff.f +++ /dev/null @@ -1,68 +0,0 @@ - SUBROUTINE DDFF(U,V,DIR,SPD,NLVLS) - IMPLICIT NONE - -C Statement of purpose. -C --------------------- -C This routine computes wind direction (deg) and speed given rectangular -C wind components. -C -C History. -C -------- -C D. Baker 01 Jul 84 Original version. -C -C Description of input and output. -C -------------------------------- -C On input: -C --------- -C U Real Array U wind components. -C V Real Array V wind components. -C NLVLS Integer Number of wind levels passed. -C -C On output: -C ---------- -C DIR Real Array Wind directions (deg). -C SPD Real Array Wind speeds (same units as input components). -C -C User notes: -C ----------- -C 1) User may use this routine to convert only one set of components by -C passing a value of 1 for NLVLS. - -C---- Input arguments. - - REAL U(1),V(1) - INTEGER NLVLS - -C---- Output arguments. - - REAL DIR(1),SPD(1) - -C---- Internal variables. - - INTEGER I - -C---- Subroutine constants. - - REAL FLAG,DPR - PARAMETER (FLAG=99999.,DPR=57.29578) - -C---- Calculate direction and speed. Assign flags if components are bad. - - DO I=1,NLVLS - IF (U(I).GT.150. .OR. U(I).LT.-150. .OR. - $ V(I).GT.150. .OR. V(I).LT.-150.) THEN - DIR(I)=FLAG - SPD(I)=FLAG - ELSE if (abs(u(i)).lt.0.05 .and. abs(v(i)).lt.0.05) then - dir(i)=0.0 - spd(i)=0.0 - else - DIR(I)=DPR*(ATAN2(U(I),V(I)))+180. - SPD(I)=SQRT(U(I)*U(I)+V(I)*V(I)) - ENDIF - END DO - -C---- Exit. - - RETURN - END diff --git a/nativeLib/rary.meteorological/src/deftrk.f b/nativeLib/rary.meteorological/src/deftrk.f deleted file mode 100755 index 69e69f643f..0000000000 --- a/nativeLib/rary.meteorological/src/deftrk.f +++ /dev/null @@ -1,56 +0,0 @@ - subroutine deftrk(tcb,pcb,thdpar,eptpar) - implicit none - -C############################################################################## -C Statement of purpose. -C --------------------- -C This routine computes the values of the dry adiabat from the initial parcel -C pressure to the LCL and the moist adiabat above the LCL. These two curves -C define the path of a lifted parcel. -C -C History. -C -------- -C D. Baker 12 May 85 Original version. -C D. Perry 11 Feb 97 Updated function calls. -C -C Description of input and output. -C -------------------------------- -C On input: -C --------- -C tcb Real Temperature at the LCL (K). -C pcb Real Pressure at the LCL (mb). -C -C On output: -C ---------- -C thdpar Real Dry adiabat (potential temperature) -C intersecting the LCL (K). -C eptpar Real Moist adiabat (equivalent potential temperature) -C intersecting the LCL (K). -C############################################################################## - -C**** Input arguments. - - real tcb,pcb - -C**** Output arguments. - - real thdpar,eptpar - -C**** Internal variable - real etpar - -C**** External function. - - real adiabatic_te - -C**** Compute dry and moist adiabats - - thdpar=tcb*((1000.0/pcb)**0.286) - etpar=adiabatic_te(tcb,pcb) - eptpar=etpar*((1000.0/pcb)**0.286) -C eptpar=mytw(tcb,tcb,pcb) - -C**** Exit. - - return - end diff --git a/nativeLib/rary.meteorological/src/density.f b/nativeLib/rary.meteorological/src/density.f deleted file mode 100755 index 9aa6c81f85..0000000000 --- a/nativeLib/rary.meteorological/src/density.f +++ /dev/null @@ -1,39 +0,0 @@ - SUBROUTINE DENSITY(P,TVIR,NLVLS,RHO) - IMPLICIT NONE - -C Statement of purpose. -C --------------------- -C Compute the air density at each level of a sounding. -C -C History. -C -------- -C D. Baker 01 Jul 84 Original version. -C -C Description of input and output. -C -------------------------------- -C On input: -C --------- -C P Real Array Sounding pressures (mb). -C TVIR Real Array Sounding virtual temperatures (C). -C NLVLS Integer Number of sounding levels passed. -C -C On output: -C ---------- -C RHO Real Array Air density at each level (kg/cu m). - - -C---- Variable/array declarations. - - INTEGER I,NLVLS - REAL P(NLVLS),TVIR(NLVLS),RHO(NLVLS) - -C---- Calculate density at each level. - - DO I=1,NLVLS - RHO(I)=100.*P(I)/(287.04*TVIR(I)) - END DO - -C---- Exit. - - RETURN - END diff --git a/nativeLib/rary.meteorological/src/derivative.f b/nativeLib/rary.meteorological/src/derivative.f deleted file mode 100755 index 1a2cbdeb3e..0000000000 --- a/nativeLib/rary.meteorological/src/derivative.f +++ /dev/null @@ -1,29 +0,0 @@ -c -c - subroutine derivative(a1,a2,b1,b2,result,mni,ni,nj) -c -c..... calculate the derivative of a with respect to b. -c -c..... J Ramer Jun 95 -c - implicit none - integer mni, ni, nj, i, j - real flag, bad - parameter(flag = 1.e37) - real a1(mni,nj), a2(mni,nj), b1(mni,nj), b2(mni,nj) - real result(mni,nj) -c - bad = 1e36 - do 1 j=1,nj - do 1 i=1,ni - if(a1(i,j).gt.bad .or. b1(i,j).gt.bad .or. - & a2(i,j).gt.bad .or. b2(i,j).gt.bad .or. - & b1(i,j).eq.b2(i,j)) then - result(i,j) = flag - else - result(i,j) = (a2(i,j)-a1(i,j))/(b2(i,j)-b1(i,j)) - endif -1 continue -c - return - end diff --git a/nativeLib/rary.meteorological/src/derived_icing.f b/nativeLib/rary.meteorological/src/derived_icing.f deleted file mode 100755 index fc45da780c..0000000000 --- a/nativeLib/rary.meteorological/src/derived_icing.f +++ /dev/null @@ -1,48 +0,0 @@ -c -c - subroutine derived_icing(t,rh,icg,mni,ni,nj) -c -c.............................................................................. -c -c Routine to calculate the wind speed from the wind components. -c -c Inputs/Outputs: -c -c Variable Var Type I/O Description -c ---------- ---------- ----- ------------- -c t RA I Temperature (K). -c rh RA I Relative humidity (%). -c icg RA O Icing parameter. -c mni I I First dimension of input array. -c ni, nj I I Grid dimensions in x, y. -c flag R - Bad data flag. -c bad R - Bad data value. -c -c User Notes: -c -c 1. Units are not changed (output units = input units). -c -c.............................................................................. -c - implicit none - integer mni, ni, nj, i, j - real flag, bad - parameter(flag = 1.e37) - real t(mni,nj), rh(mni,nj), icg(mni,nj) -c -c..... Compute the derived icing value at each point. -c - bad = 1.e6 - 2. - do 1 j=1,nj - do 1 i=1,ni - if(t(i,j).gt.bad .or. rh(i,j).gt.bad) then - icg(i,j) = flag - else if (t(i,j).gt.267.43572) Then - icg(i,j) = amin1( (275.15-t(i,j))/2, (rh(i,j)-35.)/15) - else - icg(i,j) = amin1( (t(i,j)-248.15)/5, (rh(i,j)-35.)/15) - endif -1 continue - - return - end diff --git a/nativeLib/rary.meteorological/src/dgeocomps.f b/nativeLib/rary.meteorological/src/dgeocomps.f deleted file mode 100755 index ba4b5cabfe..0000000000 --- a/nativeLib/rary.meteorological/src/dgeocomps.f +++ /dev/null @@ -1,99 +0,0 @@ - - Subroutine DgeoComps(Z,F, - - SpaX,SpaY,mnx,mny,nx,ny, - - dugdx,dugdy,dvgdx,dvgdy) - -C Z(mnx,mny) Real Input height field. -C F(mnx,mny) Real Array of coriolis parameter. -C SpaX(mnx,mny) Real Grid spacing in the X direction. -C SpaY(mnx,mny) Real Grid spacing in the Y direction. -C mnx,mny Int Dimensions of input arrays. -C nx,ny Int Dimensions of input grids. -C dugdx(mnx,mny) Real d/dx of u component of geostrophic wind. -C dugdy(mnx,mny) Real d/dy of u component of geostrophic wind. -C dvgdx(mnx,mny) Real d/dx of v component of geostrophic wind. -C dvgdy(mnx,mny) Real d/dy of v component of geostrophic wind. - - - Implicit None - - Integer*4 mnx,mny,nx,ny,im,ip,jm,jp,i,j - - Real*4 dugdx(mnx,mny),dugdy(mnx,mny), - - dvgdx(mnx,mny),dvgdy(mnx,mny), - - F(mnx,mny),SpaX(mnx,mny),SpaY(mnx,mny), - - Z(mnx,mny), - - g,qqq,www - - Real*4 Flag,Flg -c Common/FlagFlg/Flag,Flg - Data Flag,Flg/1e37,99998.0/ - Data g/9.806/ - -c Check validity of input parameters. - If (nx.lt.3 .or. nx.gt.mnx .or. ny.lt.3 .or. ny.gt.mny) Return - -c Flag out boundaries. - Do 21 i=1,nx -21 dugdx(i,1)=Flag - Do 22 j=2,ny-1 - dugdx(1,j)=Flag -22 dugdx(nx,j)=Flag - Do 23 i=1,nx -23 dugdx(i,ny)=Flag - Do 31 i=1,nx -31 dugdy(i,1)=Flag - Do 32 j=2,ny-1 - dugdy(1,j)=Flag -32 dugdy(nx,j)=Flag - Do 33 i=1,nx -33 dugdy(i,ny)=Flag - Do 41 i=1,nx -41 dvgdx(i,1)=Flag - Do 42 j=2,ny-1 - dvgdx(1,j)=Flag -42 dvgdx(nx,j)=Flag - Do 43 i=1,nx -43 dvgdx(i,ny)=Flag - Do 51 i=1,nx -51 dvgdy(i,1)=Flag - Do 52 j=2,ny-1 - dvgdy(1,j)=Flag -52 dvgdy(nx,j)=Flag - Do 55 i=1,nx -55 dvgdy(i,ny)=Flag - -c Calculate components. -3000 jm=1 - j=2 - Do 3091 jp=3,ny - im=1 - i=2 - Do 3090 ip=3,nx - If (Z(im,jm).gt.Flg .or. Z(im,jp).gt.Flg .or. - - Z(ip,jm).gt.Flg .or. Z(ip,jp).gt.Flg .or. - - Z(i,jm).gt.Flg .or. Z(i,jp).gt.Flg .or. - - Z(im,j).gt.Flg .or. Z(ip,j).gt.Flg .or. - - Z(i,j).gt.Flg) Then - dugdx(i,j)=Flag - dugdy(i,j)=Flag - dvgdx(i,j)=Flag - dvgdy(i,j)=Flag - Else - qqq=g/F(i,j) - www=Z(i,j)+Z(i,j) - dvgdy(i,j)=qqq*(Z(ip,jp)-Z(ip,jm)-Z(im,jp)+Z(im,jm))/ - - (4*SpaX(i,j)*SpaY(i,j)) - dugdx(i,j)=-dvgdy(i,j) - dugdy(i,j)=qqq*(www-Z(i,jp)-Z(i,jm))/(SpaY(i,j)*SpaY(i,j)) - dvgdx(i,j)=qqq*(Z(ip,j)+Z(im,j)-www)/(SpaX(i,j)*SpaX(i,j)) - End If - im=i - i=ip -3090 Continue - jm=j - j=jp -3091 Continue - - Return - End diff --git a/nativeLib/rary.meteorological/src/dist_filter.c b/nativeLib/rary.meteorological/src/dist_filter.c deleted file mode 100755 index 0cfb89fe69..0000000000 --- a/nativeLib/rary.meteorological/src/dist_filter.c +++ /dev/null @@ -1,156 +0,0 @@ -#include "meteoLib.h" -#include -#include -#include - -#define MAX_WAVE_NUMBER 15 - -void FTN_MANGLE (dist_filter) (float * input, float * npts, float * output, - int * mnx, int * nx, int * ny) - { - - static float * weights = 0; - static float lastNpts = -99999.; - - int i,j,ii,jj; - int i1,i2,j1,j2; - int d,n,m,dd; - int offset; - int dwgtx,dnx,dskip; - float * fpiMid; - float * fpi; - float * fpo; - float * wp; - float waveno; - float tot; - - // copy the data if needed - if (*npts<=1.0) - { - dnx = *mnx-*nx; - fpiMid = input; - fpo = output; - for (jj=0; jj<*ny; jj++, fpiMid+=dnx, fpo+=dnx) - for (ii=0; ii<*nx; ii++, fpiMid++, fpo++) - *fpo = *fpiMid; - return; - } - else - { - dnx = *mnx-*nx; - fpo = output; - for (jj=0; jj<*ny; jj++, fpo+=dnx) - for (ii=0; ii<*nx; ii++, fpo++) - *fpo = 1e37; - } - - n = (int)(*npts + 0.99); - if (n<2) - n = 2; - else if (n>MAX_WAVE_NUMBER) - n = MAX_WAVE_NUMBER; - d = (n+1)/2; - dd = d+d; - m = dd+1; - - // calculate weight table if needed. - if (lastNpts!=*npts) - { - lastNpts = *npts; - waveno = 3.14159265/(*npts); - if (weights) free(weights); - weights = (float*)malloc(sizeof(float)*m*m); - tot = 0; - for (wp=weights,j=-d; j<=d; j++) - for (i=-d; i<=d; i++,wp++) - { - if (i) - *wp = sin(waveno*i)/(waveno*i); - else - *wp = 1; - if (j) - *wp *= sin(waveno*j)/(waveno*j); - else - *wp *= 1; - tot += *wp; - } - // divide by sum of the weights - for (wp=weights,j=-d; j<=d; j++) - for (i=-d; i<=d; i++,wp++) - *wp /= tot; - } - - // loop for doing those where weights fall totally within grid - dwgtx = *mnx-m; - dnx = (*mnx-*nx)+dd; - offset = (*mnx*d)+d; - fpiMid = input+offset; - fpo = output+offset; - for (jj=dd; jj<*ny; jj++, fpiMid+=dnx, fpo+=dnx) - for (ii=dd; ii<*nx; ii++, fpiMid++, fpo++) - { - if (*fpiMid>99998.0) - { - *fpo = 1e37; - continue; - } - *fpo = 0; - tot = 1; - wp = weights; - fpi = fpiMid-offset; - for (j=0; j99998.0) - tot -= *wp; - else - *fpo += *fpi * *wp; - if (tot<0.95) - *fpo = 1e37; - else - *fpo /= tot; - }//for ii - - // loop for doing those where weights fall partially outside grid - fpiMid = input; - fpo = output; - dnx = *mnx-*nx; - dskip = *nx-dd; - ii = *nx+d; - jj = *ny+d; - j1 = -d; - for (j2=d; j2=0 && j2<*ny) - { - i1 += dskip; - i2 += dskip; - fpiMid += dskip; - fpo += dskip; - } - if (*fpiMid>99998.0) - { - *fpo = 1e37; - continue; - } - *fpo = 0; - tot = 1; - wp = weights; - fpi = fpiMid-offset; - for (j=j1; j<=j2; j++, fpi+=dwgtx) - for (i=i1; i<=i2; i++,wp++,fpi++) - if (i>=0 && i<*nx && j>=0 && j<*ny && *fpi<99998.0) - *fpo += *fpi * *wp; - else - tot -= *wp; - if (tot<0.95) - *fpo = 1e37; - else - *fpo /= tot; - }//for i2 - }//for j2 - - } - diff --git a/nativeLib/rary.meteorological/src/divaray.f b/nativeLib/rary.meteorological/src/divaray.f deleted file mode 100755 index a121671a76..0000000000 --- a/nativeLib/rary.meteorological/src/divaray.f +++ /dev/null @@ -1,28 +0,0 @@ -c -c - subroutine div_aray(a,b,result,mni,ni,nj) -c -c..... Divide a field by another. Each i,j in one array is -c..... divided by the corresponding i,j in the other array. -c..... result = a/b -c -c..... Stole framework from add_aray...J Ramer Jun 95 -c - implicit none - integer mni, ni, nj, i, j - real flag, bad - parameter(flag = 1.e37) - real a(mni,nj), b(mni,nj), result(mni,nj) -c - bad = 1e36 - do 1 j=1,nj - do 1 i=1,ni - if(a(i,j).gt.bad .or. b(i,j).gt.bad .or. b(i,j).eq.0.0) then - result(i,j) = flag - else - result(i,j) = a(i,j) / b(i,j) - endif -1 continue -c - return - end diff --git a/nativeLib/rary.meteorological/src/dmixr.f b/nativeLib/rary.meteorological/src/dmixr.f deleted file mode 100755 index 7b0cc17955..0000000000 --- a/nativeLib/rary.meteorological/src/dmixr.f +++ /dev/null @@ -1,53 +0,0 @@ - - real function dmixr(temp,pres,iw) - implicit none - -c######################################################################## -c -c Statement of purpose: Calculates the water vapor mixing ratio with -c respect to either water or ice. Values of physical constants from -c Sonntag, D. 1990: Important new values of the physical constants of -c 1986, vapour pressure formulations based on the ITS-90, and psychrometer -c formulae. Z. Meteorol., 40, 340-344. -c -c Date: 5 June 1997 -c -c Input: -c -c temp - temperature in degrees Kelvin -c pres - pressure in millibars -c iw - >0 for mixing ratio with respect to water -c <0 for mixing ratio with respect to ice -c -c Output: -c -c dmixr - mixing ratio in grams per kilogram -c -c######################################################################## - - - real temp, pres, rd, rv, e - integer iw - -C -C Function declaration -C - real vp -c -c Input physical constants. -c -c rd = dry air gas constant -c rv = water vapor gas constant -c - - rd= 287.0586 - rv= 461.525 - -c -c Calculate actual vapor pressure and the mixing ratio. -c - - e= vp(temp,iw) - dmixr= (1.0d3*rd/rv*e)/((pres*100.0)-e) - return - end diff --git a/nativeLib/rary.meteorological/src/dotvectors.f b/nativeLib/rary.meteorological/src/dotvectors.f deleted file mode 100755 index 683851c5dd..0000000000 --- a/nativeLib/rary.meteorological/src/dotvectors.f +++ /dev/null @@ -1,29 +0,0 @@ -c -c - subroutine dotVectors(aX,aY,bX,bY,result,mni,ni,nj) -c -c..... Dot a field of vectors by another. Each i,j in one array of vectors -c..... is dotted with the corresponding i,j in the other array of vectors. -c -c..... J Ramer Jun 95 -c - implicit none - integer mni, ni, nj, i, j - real flag, bad - parameter(flag = 1.e37) - real aX(mni,nj), aY(mni,nj), bX(mni,nj), bY(mni,nj) - real result(mni,nj) -c - bad = 1e36 - do 1 j=1,nj - do 1 i=1,ni - if(aX(i,j).gt.bad .or. bX(i,j).gt.bad .or. - & aY(i,j).gt.bad .or. bY(i,j).gt.bad) then - result(i,j) = flag - else - result(i,j) = aX(i,j) * bX(i,j) + aY(i,j) * bY(i,j) - endif -1 continue -c - return - end diff --git a/nativeLib/rary.meteorological/src/dzdlnp.f b/nativeLib/rary.meteorological/src/dzdlnp.f deleted file mode 100755 index 94f318108c..0000000000 --- a/nativeLib/rary.meteorological/src/dzdlnp.f +++ /dev/null @@ -1,33 +0,0 @@ - - Real*4 Function dzdlnp(p,T,Td) - -C returns the rate of change of height versus the log of pressure. - -C p Real Pressure in mb. -C T Real Temperature in C or K. -C Td Real Dewpoint temp in same units as temperature. - - Real*4 p,T,Td - Real*4 q,K,Kd - -C Handle either C or K for units, missing Td - K = T - Kd = Td - if (Kd.gt.K) Kd = K - 50 - if (T.lt.100.0) then - K = K+273.15 - Kd = Kd+273.15 - endif - -C Calculate vapor pressure - q = exp(26.660820-0.0091379024*Kd-6106.396/Kd) - -C Calculate mixing ratio - q = 0.622*q/(p-0.378*q) - -C return the answer using variation of hypsometric eqn - dzdlnp = K*(1.0+0.608*q)*287.04/9.807 - Return - - End - diff --git a/nativeLib/rary.meteorological/src/eqlev.f b/nativeLib/rary.meteorological/src/eqlev.f deleted file mode 100755 index d91ab17649..0000000000 --- a/nativeLib/rary.meteorological/src/eqlev.f +++ /dev/null @@ -1,120 +0,0 @@ - SUBROUTINE EQLEV(P,HT,TP,TE,PLFC,EPTPAR,NPAR,PEQLEV,HEQLEV,TEQLEV) - IMPLICIT NONE - -C Statement of purpose. -C --------------------- -C This routine computes the pressure, height, and temperature of the -C equilibrium level, defined as the level where a parcel, rising -C from the level of free convection, intersects the sounding and becomes -C negatively buoyant. -C -C History. -C -------- -C D. Baker 01 Jul 84 Original version. -C D. Perry 08 Oct 96 Adapted code for WFO;added temp_of_te routine -C -C Description of input and output. -C -------------------------------- -C On input: -C --------- -C P Real Array Pressure levels of lifted parcel (mb). -C HT Real Array Heights of levels of lifted parcel (m asl). -C TP Real Array Lifted parcel temperatures at parcel levels (K). -C TE Real Array Environmental temperatures at parcel levels (K). -C PLFC Real Pressure of the LFC (mb). -C EPTPAR Real Equivalent potential temperature corresponding to -C the moist adiabat along which the saturated parcel -C rises (K). -C NPAR Integer Number of parcel levels passed. -C -C On output: -C ---------- -C PEQLEV Real Equilibrium level pressure (mb). -C HEQLEV Real Equilibrium level height (m asl). -C TEQLEV Real Equilibrium level temperature (K). -C -C User note -C --------- -C 1) Refer to SUBROUTINE PARCEL for information on how parcel level -C arrays are derived. -C - -C---- Input arguments. - - INTEGER NPAR - REAL P(NPAR),HT(NPAR),TP(NPAR),TE(NPAR),PLFC,EPTPAR - -C---- Output arguments. - - REAL PEQLEV,HEQLEV,TEQLEV - -C---- Internal variables. - - REAL TEM,TPM,ETPAR,PM,PB,PT,PLOG1,PLOG2,PLOG3 - INTEGER II,I,J,COUNT - -C---- External functions. - - REAL INTERP1,TEMP_OF_TE - -C---- Subroutine constants. - - REAL TOLER,FLG,FLAG - PARAMETER (TOLER=0.1,FLG=99998.,FLAG=99999.) - -C---- Check and see if the parcel is warmer than the sounding at the top -C---- of the sounding. If so, assign appropriate flag value and exit. - - IF (TE(NPAR).LE.TP(NPAR)) THEN - PEQLEV=FLAG - HEQLEV=FLAG - TEQLEV=FLAG - GO TO 9999 - END IF - -C---- Find the level of free convection to define end of search. II -C---- denotes the array index for this level. - ii=0 - DO I=1,NPAR - IF (P(I).LE.PLFC) THEN - II=I - IF (II.EQ.NPAR) GO TO 9999 - GO TO 101 - END IF - END DO -101 CONTINUE - -C---- Beginning at the top of the sounding, move downward until the parcel -C---- temperature first becomes warmer than the environment. Perform -C---- iteration to get the exact level. This represents the highest -C---- equilibrium level in the sounding. - - DO J=NPAR-1,II,-1 - IF (TE(J).LE.TP(J)) THEN - PT=P(J+1) - PB=P(J) - PLOG1=ALOG(PT) - PLOG3=ALOG(PB) - DO COUNT=1,100 - PM=0.5*(PT+PB) - PLOG2=ALOG(PM) - TEM=INTERP1(TE(J+1),TE(J),PLOG1,PLOG2,PLOG3) - ETPAR=EPTPAR*((PM/1000.0)**0.286) - TPM=TEMP_OF_TE(ETPAR,PM) - IF (ABS(TPM-TEM).LT.TOLER) THEN - PEQLEV=PM - HEQLEV=INTERP1(HT(J+1),HT(J),PLOG1,PLOG2,PLOG3) - TEQLEV=TEM - GO TO 9999 - END IF - IF ((TPM-TEM).GT.TOLER) PB=PM - IF ((TEM-TPM).GT.TOLER) PT=PM - END DO - END IF - END DO - -C---- Exit. - -9999 CONTINUE - RETURN - END diff --git a/nativeLib/rary.meteorological/src/eqp.f b/nativeLib/rary.meteorological/src/eqp.f deleted file mode 100755 index cb75d3a068..0000000000 --- a/nativeLib/rary.meteorological/src/eqp.f +++ /dev/null @@ -1,74 +0,0 @@ - SUBROUTINE EQP(DELTAP,P,HT,T,TD,N,PP,HTT,TT,TTD,NN) - IMPLICIT NONE -C--------------------------------------------------------------------------- -C Statement of purpose. -C --------------------- -C This routine derives sounding temperature and dew point data at pressure -C intervals given by DELTAP. -C -C History. -C -------- -C D. Baker 27 Dec 85 Original version. -C -C Description of input and output. -C -------------------------------- -C On input: -C --------- -C DELTAP Real Pressure interval at which to compute T/Td. -C P Real Array Sounding pressures levels (mb). -C T Real Array Sounding temperatures (C). -C TD Real Array Sounding dew points (C). -C N Integer Number of uninterpolated sounding levels input. -C -C On output: -C ---------- -C PP Real Array New array of sounding pressures at DELTAP mb. -C TT Real Array New array of sounding temperatures at DELTAP mb. -C TTD Real Array New array of sounding dewpoints at DELTAP mb. -C NN Integer Number of new sounding levels returned. -C--------------------------------------------------------------------------- - REAL PP(1),P(1),HT(1),T(1),TD(1),HTT(1),TT(1),TTD(1) - REAL P1,P2,P3,DELTAP - REAL INTERP1 - INTEGER N,NN,I,J,K,PBOT,PTOP,PRES,PINC - REAL FLAG - PARAMETER (FLAG=99999.0) -C -C Construct PP output array every 10 mb. -C - If (Mod(Nint(P(1)),Nint(deltap)).eq.0) Then - pbot=Nint(P(1)-deltap) - Else - PBOT=NINT(P(1)-(MOD(NINT(P(1)),NINT(DELTAP)))) - End If - PTOP=NINT(P(N)) - PINC=NINT(DELTAP) - PP(1)=P(1) !Initialize output pressure array to surface pressure. - NN=1 - DO 300 PRES=PBOT,PTOP,-PINC - NN=NN+1 - PP(NN)=FLOAT(PRES) -300 CONTINUE -C DO I=1,NN -C WRITE(6,*) I,PP(I) -C END DO -C -C Derive temperature and dew point at the DELTAP mb intervals. -C - J=2 - DO 200 K=1,NN - DO 100 I=J,N - IF (P(I).LE.PP(K) .AND. P(I-1).GE.PP(K)) THEN - P1=ALOG(P(I-1)) - P2=ALOG(PP(K)) - P3=ALOG(P(I)) - HTT(K)=INTERP1(HT(I-1),HT(I),P1,P2,P3) - TT(K)=INTERP1(T(I-1),T(I),P1,P2,P3) - TTD(K)=INTERP1(TD(I-1),TD(I),P1,P2,P3) - J=I - GO TO 200 - END IF -100 CONTINUE -200 CONTINUE - RETURN - END diff --git a/nativeLib/rary.meteorological/src/esat.f b/nativeLib/rary.meteorological/src/esat.f deleted file mode 100755 index 562c712794..0000000000 --- a/nativeLib/rary.meteorological/src/esat.f +++ /dev/null @@ -1,46 +0,0 @@ - - Real*4 Function esat(T) - -C* Calculates saturation vapor pressure in millibars as a function of -C* either Kelvin of Celcius temperature. - -C Author: J Ramer written in the late 1980's - -C Is based upon a variation of the integrated form of the Clausius-Clapeyron -C equation. Has an additional linear term in it and is fit to data in -C the Smithsonian Meterological Tables. Is accurate to one part in a -C thousand over the range from -25C to +35C. Its main advantage is that -C it is invertable. - - Implicit None - - Real*4 T,K - - Real*4 Flag - Data Flag /1e37/ -c unused varaible real*4 Flg -c Common /FlagFlg/ Flag, Flg -c Data Flg /1.0E10/ - -c Account for both Celsius and Kelvin. - K=T - If (K.lt.100.) K=K+273.15 - -c Flag ridiculous values. - If (K.lt.0.0 .or. K.gt.373.15) Then - esat=Flag - Return - End If - -c Avoid floating underflow. - If (K.lt.173.15) Then - esat=3.777647E-05 - Return - End If - -c Calculation for normal range of values. - esat=exp(26.660820-0.0091379024*K-6106.3960/K) - - Return - End - diff --git a/nativeLib/rary.meteorological/src/exparay.f b/nativeLib/rary.meteorological/src/exparay.f deleted file mode 100755 index 4e5a563df8..0000000000 --- a/nativeLib/rary.meteorological/src/exparay.f +++ /dev/null @@ -1,26 +0,0 @@ -c -c - subroutine exp_aray(a,b,mni,ni,nj) -c -c..... calculates the exponential of a field. b = exp(a) -c - implicit none - integer mni, ni, nj, i, j - real flag - parameter(flag = 1.e37) - real a(mni,nj), b(mni,nj) - -c - do 1 j=1,nj - do 1 i=1,ni - if(a(i,j) .gt. 85.0) then - b(i,j) = flag - else if(a(i,j) .lt. -85.0) then - b(i,j) = 0.0 - else - b(i,j) = exp(b(i,j)) - endif -1 continue -c - return - end diff --git a/nativeLib/rary.meteorological/src/fndiverg.f b/nativeLib/rary.meteorological/src/fndiverg.f deleted file mode 100755 index 7bc85509d0..0000000000 --- a/nativeLib/rary.meteorological/src/fndiverg.f +++ /dev/null @@ -1,103 +0,0 @@ -c -c - subroutine Fndiverg(zmid,ztop,zbot,ptop,pbot,mni,ni,nj,dx,dy,f, - & Fnx,Fny,w1,dtdx,dtdy,qx,qy,Fndiv) -c -C############################################################################# -C Statement of purpose. -C --------------------- -C This routine computes the divergence of the normal-to-isotherm component -C of the Q-vector for a specified layer in the atmosphere. -C -C History. -C -------- -C E. Thaler original version 3 Sep 91 -C -C Description of input and output. -C -------------------------------- -C On input: -C --------- -c mni Integer First dimension of input array. -C ni, nj Integer Number of points in the x- and y-directions. -C dx, dy Real Array Grid spacing in the x- and y-directions (m). -C f Real Array Coriolis parameter at each grid point (/s). -C ztop Real Array Heights at each grid point for the top of the -C layer (m asl) -C zbot Real Array Same as ztop except for the bottom of the layer -C (m asl). -C ptop Real Pressure level corresponding to ztop (mb). -C pbot Real Pressure level corresponding to zbot (mb). -C zmid Real Array work array for Q-vector calculations -C Fnx-dtdy Real Array Work arrays. -C qx, qy Real Array Work arrays holding the Q-vector components. -C -C On output: -C ---------- -C Fndiv Real Array Fn vector divergence at the grid points -C (K/m^2/sec) -C -C User notes: -C ----------- -C 1. No scaling of the output is done in this routine. -C -C############################################################################### -c - implicit none -c - integer mni, ni, nj, i, j - real flag, bad, ptop, pbot, tempgrad, piover2 -c -c---- Declare input arguments. -c - real dx(mni,nj), dy(mni,nj) - real f(mni,nj), ztop(mni,nj), zbot(mni,nj), zmid(mni,nj) -c -c---- Declare output arguments. -c - real Fndiv(mni,nj) -c -c---- Declare other parameters and work arrays. -c - parameter(flag = 1.e37) - real w1(mni,nj), dtdx(mni,nj), dtdy(mni,nj) - real Fnx(mni,nj), Fny(mni,nj) - real qx(mni,nj), qy(mni,nj) -c - bad = 1.e6 - 2. - piover2 = acos(-1.)/2 -c -c---- Compute the Q-vector components. -c - call qvector(zmid,ztop,zbot,ptop,pbot,mni,ni,nj,dx,dy,f, - & Fnx,Fny,w1,Fndiv,dtdx,dtdy,qx,qy) -c -c---- Compute Fn-vectors (component of Q parallel to the temperature -c---- gradient vector) then compute x- and y-components of Fn vectors. -c - do 200 j = 1,nj - do 100 i = 1,ni - If ( (qx(i,j).gt.bad) .or. (qy(i,j).gt.bad) .or. - & (dtdx(i,j).gt.bad) .or. (dtdy(i,j).gt.bad) ) Then - Fnx(i,j) = flag - Fny(i,j) = flag - Else - tempgrad = dtdx(i,j)**2+dtdy(i,j)**2 - If (tempgrad .lt. 1.e-15) Then - Fnx(i,j) = qx(i,j) - Fny(i,j) = qy(i,j) - Else - tempgrad = (qx(i,j)*dtdx(i,j) + qy(i,j)*dtdy(i,j))/ - & tempgrad - Fnx(i,j) = dtdx(i,j)*tempgrad - Fny(i,j) = dtdy(i,j)*tempgrad - Endif - Endif - 100 continue - 200 continue -c -c---- Compute the divergence. -c - call G2Gkinematics(Fnx,Fny,f,dx,dy,mni,nj,ni,nj,2,Fndiv) -c - return - end diff --git a/nativeLib/rary.meteorological/src/forecast.f b/nativeLib/rary.meteorological/src/forecast.f deleted file mode 100755 index 641a4f679d..0000000000 --- a/nativeLib/rary.meteorological/src/forecast.f +++ /dev/null @@ -1,484 +0,0 @@ - subroutine forecast(yr,mon,day,hr,min,stnid,snow,slat,slon, - & p,ht,t,td,nlvls,ftmax,status) - implicit none - -C############################################################################## -C Statement of purpose. -C --------------------- -C Forecast the maximum temperature for a sounding station given the 12Z -C sounding and the thermodynamic profile. -C -C History. -C -------- -C R. Hanas ???? University of Alaska original code. -C T. Schlatter Summer 1982 Updated original code. Added different -C radiation processes and considerable -C documentation. -C D. Baker Jan 1986 Updated code to operate for all domestic -C sounding sites. Modularized/streamlined -C code for better efficiency. -C D. Perry Sep 96 Adapted code for WFO; Revised data stmts -C to account for RAOBs not listed; changed -C method for determining date given WFO constructs -C -C Description of input and output. -C -------------------------------- -C On input: -C --------- -C yr,mon,day Integer date of the sounding data. -C hr,min Integer time of the sounding data. -C stnid Character ICAO station identifier. -C snow Integer Snow depth on ground at time of sounding (in). -C slat Real Station latitude (deg). -C slat Real Station longitude (deg neg west of Greenwich). -C p Real Pressure data of sounding (mb). -C ht Real Height data of sounding (m). -C t Real Temperature data of sounding (K). -C td Real Dewpoint data of sounding (K). -C nlvls Integer Number of sounding data levels. -C -C On output: -C ---------- -C ftmax Real Forecast maximum temperature (K). -C status Integer Return status. -C -C User notes: -C ----------- -C 1) The maximum temperature in this model is computed based only on -C radiative heating/cooling therefore the technique may be expected -C to perform poorly under the following conditions: -C a) over or near large bodies of water due to lack of heat -C storage -C b) over wet soil due to lack of evaportation -C c) when a different air mass is advected into the area during -C the time of radiative heating (i.e. between 12Z and mid -C afternoon) -C d) when an inversion is eroded away by mountain wave activity -C (dynamically) rather than by solar heating (thermodynamically). -C############################################################################## - -C Input arguments. - - integer yr,mon,day,hr,min,nlvls,snow - character stnid*4 - real p(nlvls),ht(nlvls),t(nlvls),td(nlvls) - real slat,slon - -C Output arguments. - - real ftmax - integer status - -C Local variables. - - integer nr - parameter (nr=67) - real pp(nlvls),htt(nlvls),tt(nlvls),tdd(nlvls),deltaz(nlvls) - real tmax(12,nr),tmin(12,nr),albmax(nr),albmin(nr) - real tc(nlvls),tdc(nlvls) -c unused variable character months(12)*3 - character ids(nr)*4 - real endlvl(3),cover(3),asol,max_alt,min_alt - real thi,tlo,drange,trng,hour,tstart,tstop,decl,haset - real tset,tsrad,albdo,albdhi,albdlo,sfct,sfcp,sfctd,tcld - real stemp,ulw,vpmm,dlwclr,a,b,cldcor,blw,flw,sw,heat - real esat,cnv,hilat - integer mrh(3),julday - integer lvl,sta,istatus,i - integer*2 t_julday, t_mon, t_tyminc, t_tstart, t_tstop - real*4 t_slat, t_tsrad - -C Constants. - - integer nhum,nclyr - real tyminc,emis,grav,cp - real cmbd,sbc,pi,sdecmx,veday - real yrlen,deltap,cl,cm,ch - parameter (nhum=15) !number humidity levels for transmissivity - parameter (nclyr=3) !# layers for computing RH/cloud info - parameter (tyminc=30.0) !time interval (min) for summing solar energy - parameter (emis=0.95) !surface emissivity - parameter (grav=980.0) !acceleration due to gravity - parameter (cp=0.24) !specific heat of air @ constant p (cal/gm/K) - parameter (cmbd=1000.0) !number dynes/sq cm in 1 millibar - parameter (sbc=8.12E-11) !Stefan-Boltzmann constant - parameter (pi=3.1415927) !value of constant PI - parameter (sdecmx=0.40927) !maximum solar declanation (radians) - parameter (veday=79.75) !average julian day of vernal equinox - parameter (yrlen=365.2563) !length of year in days - parameter (deltap=10.0) !pressure interval for interpolation (mb) - parameter (cl=0.80) !empirical coefficient for low clouds - parameter (cm=0.67) !empirical coefficient for middle clouds - parameter (ch=0.22) !empirical coefficient for high clouds - -C Average maximum temperature by month for each raob station. - -C Month 01 02 03 04 05 06 07 08 09 10 11 12 - data tmax/76,77,79,83,85,88,89,90,88,84,80,76, !EYW 72201 1 - & 75,76,79,83,86,88,90,90,88,84,80,76, !PBI 72203 2 - & 60,62,68,76,83,88,89,89,85,77,68,61, !CHS 72208 3 - & 70,72,76,82,88,90,90,90,89,84,77,72, !TBW 72210 4 - & 00,00,00,00,00,00,00,00,00,00,00,00, !AYS 72213 5 - & 61,63,68,75,82,86,88,88,85,78,69,63, !AQQ 72220 6 - & 58,61,68,77,84,89,91,91,87,78,67,59, !CKL 72229 7 - & 62,65,70,78,85,90,90,91,87,80,70,64, !BVE 72232 8 - & 60,62,69,78,85,91,93,93,88,80,69,61, !JAN 72235 9 - & 62,65,70,78,84,90,91,91,88,82,71,64, !LCH 72240 10 - & 00,00,00,00,00,00,00,00,00,00,00,00, !GGG 72247 11 - & 70,73,77,83,87,91,93,93,90,85,78,72, !BRO 72250 12 - & 63,67,72,80,85,91,93,94,89,83,73,67, !VCT 72255 13 - & 00,00,00,00,00,00,00,00,00,00,00,00, !SEP 72260 14 - & 63,69,76,85,90,96,99,99,92,83,72,65, !DRT 72261 15 - & 58,62,69,79,87,93,95,94,88,79,68,60, !MAF 72265 16 - & 57,63,69,79,87,95,95,93,87,79,66,58, !ELP 72270 17 - & 65,67,72,81,90,98,98,95,93,84,72,69, !TUS 72274 18 - & 65,66,66,68,69,72,75,77,77,74,70,66, !SAN 72290 19 - & 52,53,58,66,74,81,84,83,80,71,63,55, !HAT 72304 20 - & 51,55,61,71,79,85,87,86,81,73,62,53, !AHN 72311 21 - & 52,53,61,72,79,86,88,87,82,72,62,52, !GSO 72318 22 - & 50,51,59,71,80,88,90,89,84,73,59,50, !BNA 72327 23 - & 50,54,62,74,81,89,93,93,86,76,62,52, !LIT 72340 24 - & 43,48,55,68,76,84,89,89,81,71,56,46, !UMN 72349 25 - & 48,53,60,72,79,87,93,93,85,74,61,51, !OKC 72353 26 - & 49,53,60,71,79,88,91,90,83,73,60,52, !AMA 72363 27 - & 47,53,59,70,80,90,92,90,83,72,57,48, !ABQ 72365 28 - & 46,53,60,70,80,90,94,91,85,73,58,47, !INW 72374 29 - & 00,00,00,00,00,00,00,00,00,00,00,00, !VBG 72393 30 - & 44,46,55,67,77,85,88,87,80,70,57,45, !IAD 72403 31 - & 41,43,51,62,72,81,85,83,77,68,56,44, !ACY 72407 32 - & 43,45,55,68,76,83,86,85,79,69,55,45, !HTS 72425 33 - & 40,43,52,66,75,84,87,86,80,69,53,42, !DAY 72429 34 - & 42,45,55,68,77,86,89,88,81,71,55,44, !SLO 72433 35 - & 43,47,54,67,76,86,91,90,81,71,55,45, !DDC 72451 36 - & 38,44,53,66,76,84,89,89,80,70,54,42, !TOP 72456 37 - & 44,46,50,61,70,80,87,86,78,67,53,46, !DEN 72469 38 - & 37,44,53,65,76,86,93,89,81,68,51,39, !GJT 72476 39 - & 00,00,00,00,00,00,00,00,00,00,00,00, !OAK 72493 40 - & 30,33,43,58,70,79,84,81,74,63,48,34, !ALB 72518 41 - & 37,40,49,63,72,81,84,83,77,66,52,40, !PIT 72520 42 - & 30,31,39,53,64,75,80,78,71,60,46,34, !BUF 72528 43 - & 32,26,46,62,72,82,86,86,84,76,66,48, !PIA 72532 44 - & 33,39,48,64,74,83,89,87,79,69,51,38, !OMA 72553 45 - & 37,41,47,61,71,81,88,87,77,67,51,40, !LBF 72562 46 - & 37,43,51,62,72,81,93,90,80,66,50,39, !SLC 72572 47 - & 31,38,44,55,66,75,86,84,73,60,43,34, !LND 72576 48 - & 41,47,52,61,70,79,91,89,80,67,52,43, !WMC 72583 49 - & 44,52,57,64,72,79,90,88,82,67,53,44, !MFR 72597 50 - & 31,33,41,53,64,73,79,78,70,60,48,35, !PWM 72606 51 - & 30,32,41,57,67,77,81,80,72,62,46,34, !FNT 72637 52 - & 24,27,37,54,66,76,81,79,70,60,42,29, !GRB 72645 53 - & 23,29,39,58,70,79,87,86,74,63,43,29, !HON 72654 54 - & 19,24,36,54,67,76,82,80,69,59,39,25, !STC 72655 55 - & 34,38,43,57,67,76,86,86,75,64,48,38, !RAP 72662 56 - & 37,44,52,61,71,78,91,88,78,65,49,39, !BOI 72681 57 - & 45,51,55,61,68,74,82,81,77,64,53,47, !SLE 72694 58 - & 20,23,33,46,60,70,76,73,65,53,38,24, !CAR 72712 59 - & 22,24,33,47,59,70,75,73,65,55,39,27, !SSM 72734 60 - & 13,19,32,49,63,72,78,76,64,54,33,18, !INL 72747 61 - & 19,25,35,55,67,76,84,84,71,60,39,26, !BIS 72764 62 - & 19,25,36,55,67,74,84,83,70,59,39,27, !GGW 72768 63 - & 29,36,40,55,65,72,84,82,70,59,43,35, !GTF 72775 64 - & 31,39,46,57,67,74,84,82,73,58,42,34, !GEG 72785 65 - & 44,48,49,54,60,63,68,68,66,59,51,46, !UIL 72797 66 - & 00,00,00,00,00,00,00,00,00,00,00,00/ !Others 67 - -C Average minimum temperature by month for each raob station. - -C Month 01 02 03 04 05 06 07 08 09 10 11 12 - data tmin/66,67,70,74,76,79,80,80,79,75,71,67, !EYW 72201 1 - & 56,56,60,65,69,73,74,74,75,70,63,57, !PBI 72203 2 - & 37,39,45,53,61,68,71,71,66,55,44,38, !CHS 72208 3 - & 50,52,56,62,67,72,74,74,73,66,56,51, !TBW 72210 4 - & 00,00,00,00,00,00,00,00,00,00,00,00, !AYS 72213 5 - & 46,49,54,62,68,74,75,75,72,63,53,48, !AQQ 72220 6 - & 37,40,45,54,61,69,72,71,66,54,43,38, !CKL 72229 7 - & 44,46,51,59,65,71,73,73,70,60,50,45, !BVE 72232 8 - & 39,38,43,53,60,68,71,70,64,52,42,37, !JAN 72235 9 - & 43,46,51,60,66,72,74,73,69,58,49,44, !LCH 72240 10 - & 00,00,00,00,00,00,00,00,00,00,00,00, !GGG 72247 11 - & 51,54,59,67,71,75,76,76,73,67,59,53, !BRO 72250 12 - & 44,47,52,62,68,74,75,75,71,62,52,46, !VCT 72255 13 - & 00,00,00,00,00,00,00,00,00,00,00,00, !SEP 72260 14 - & 38,43,49,59,66,72,74,74,69,59,47,40, !DRT 72261 15 - & 29,34,39,49,58,67,70,69,63,52,39,32, !MAF 72265 16 - & 30,34,40,49,57,66,70,68,61,50,37,31, !ELP 72270 17 - & 38,40,44,50,58,66,74,72,67,56,45,35, !TUS 72274 18 - & 45,48,50,54,57,60,64,65,63,58,52,47, !SAN 72290 19 - & 38,39,43,52,60,68,72,72,68,59,49,41, !HAT 72304 20 - & 33,36,41,51,59,67,69,69,63,52,41,34, !AHN 72311 21 - & 32,31,37,47,55,63,67,66,60,48,38,31, !GSO 72318 22 - & 32,31,38,49,57,66,69,68,61,49,38,31, !BNA 72327 23 - & 29,32,39,50,58,67,70,69,61,48,38,31, !LIT 72340 24 - & 23,27,33,45,54,63,67,65,57,47,35,26, !UMN 72349 25 - & 26,30,37,49,58,67,70,70,61,51,37,29, !OKC 72353 26 - & 23,26,31,42,52,61,66,65,57,46,33,26, !AMA 72363 27 - & 24,27,32,41,51,60,65,63,57,45,32,25, !ABQ 72365 28 - & 20,25,29,37,46,54,63,62,54,41,28,21, !INW 72374 29 - & 00,00,00,00,00,00,00,00,00,00,00,00, !VBG 72393 30 - & 28,29,35,46,56,65,69,68,61,50,39,30, !IAD 72403 31 - & 24,25,32,41,51,60,65,64,57,46,36,26, !ACY 72407 32 - & 26,27,34,44,53,61,65,63,56,45,36,27, !HTS 72425 33 - & 24,26,34,45,54,63,66,64,57,47,36,27, !DAY 72429 34 - & 24,26,34,46,54,63,67,64,57,45,35,27, !SLO 72433 35 - & 19,23,28,41,52,61,67,66,56,45,30,22, !DDC 72451 36 - & 18,23,30,43,53,63,67,66,56,45,32,22, !TOP 72456 37 - & 16,19,24,34,44,52,59,57,48,37,25,19, !DEN 72469 38 - & 17,23,30,39,49,57,64,62,53,42,29,20, !GJT 72476 39 - & 00,00,00,00,00,00,00,00,00,00,00,00, !OAK 72493 40 - & 13,14,24,36,46,56,60,58,50,40,31,18, !ALB 72518 41 - & 24,24,32,42,52,62,65,63,56,45,37,27, !PIT 72520 42 - & 18,18,25,36,46,56,61,59,52,43,34,22, !BUF 72528 43 - & 16,19,28,41,51,61,65,63,55,44,31,20, !PIA 72532 44 - & 12,17,26,40,52,61,66,64,54,43,29,18, !OMA 72553 45 - & 10,15,21,34,45,55,61,59,48,35,22,14, !LBF 72562 46 - & 19,23,28,37,44,51,61,59,49,38,28,22, !SLC 72572 47 - & 08,13,19,30,40,47,55,54,44,33,20,12, !LND 72576 48 - & 16,21,23,29,37,45,51,47,39,29,22,18, !WMC 72583 49 - & 29,31,33,37,43,49,54,53,47,39,34,31, !MFR 72597 50 - & 12,13,23,33,42,51,57,55,47,38,30,16, !PWM 72606 51 - & 15,16,24,35,45,55,58,57,50,41,31,20, !FNT 72637 52 - & 07,09,20,34,43,53,58,56,48,39,26,13, !GRB 72645 53 - & 02,07,19,34,44,55,61,59,47,36,21,09, !HON 72654 54 - & -1,02,16,32,43,54,59,57,46,36,21,07, !STC 72655 55 - & 10,14,20,32,43,52,59,57,46,36,23,15, !RAP 72662 56 - & 21,27,31,37,44,51,59,57,49,39,31,25, !BOI 72681 57 - & 32,34,35,39,43,48,51,51,47,42,37,35, !SLE 72694 58 - & 02,03,14,28,39,49,54,52,43,35,25,08, !CAR 72712 59 - & 06,07,16,29,39,47,53,53,46,38,27,13, !SSM 72734 60 - & -9,-6,09,27,38,48,53,51,42,33,17,-1, !INL 72747 61 - & -3,02,15,31,42,52,57,55,44,33,18,05, !BIS 72764 62 - & -1,05,15,31,42,50,57,55,44,34,19,08, !GGW 72768 63 - & 12,17,21,32,42,50,55,53,45,37,26,18, !GTF 72775 64 - & 20,25,29,35,43,49,55,54,47,38,29,24, !GEG 72785 65 - & 33,35,35,38,42,47,50,50,47,43,38,35, !UIL 72797 66 - & 00,00,00,00,00,00,00,00,00,00,00,00/ !Others 67 - -C Array of station id's. - - data ids/'EYW','PBI','CHS','TBW','AYS','AQQ','CKL','BVE','JAN', - & 'LCH','GGG','BRO','VCT','SEP','DRT','MAF','ELP','TUS', - & 'SAN','HAT','AHN','GSO','BNA','LIT','UMN','OKC','AMA', - & 'ABQ','INW','VBG','IAD','ACY','HTS','DAY','SLO','DDC', - & 'TOP','DNR','GJT','OAK','ALB','PIT','BUF','PIA','OMA', - & 'LBF','SLC','LND','WMC','MFR','PWM','FNT','GRB','HON', - & 'STC','RAP','BOI','SLE','CAR','SSM','INL','BIS','GGW', - & 'GTF','GEG','UIL','MISC'/ - -C Average minimum albedo values (no snow cover). - - data albmin/10,15,13,16,13,12,16,13,15,14, - & 16,16,16,16,17,19,19,20,15,14, - & 15,15,14,15,16,17,18,16,14,14, - & 15,15,14,16,16,16,17,20,17,14, - & 14,14,16,16,15,17,20,20,14,16, - & 15,16,16,18,14,18,11,15,15,16, - & 16,14,15,17,15,15,14/ - -C Maximum albedo values derived using maximum January snow cover. - - data albmax/10,15,13,16,13,12,33,13,15,16, - & 30,16,16,17,17,20,19,20,15,33, - & 35,35,40,37,37,42,42,37,55,14, - & 43,43,40,52,37,52,52,50,53,14, - & 38,40,50,37,55,52,40,65,65,16, - & 48,45,60,55,50,52,44,31,40,70, - & 37,65,65,65,45,38,14/ - -C Array of months of the year. - -c unused variable data months/'JAN','FEB','MAR','APR','MAY','JUN', -c unused variable & 'JUL','AUG','SEP','OCT','NOV','DEC'/ - - real t1, t2, t3, t4 - -C Statement function for computing celsius diurnal temperature range given -C Fahrenheit max and min temperature. - drange(thi,tlo)=(0.55556*(thi-32.0))-(0.55556*(tlo-32.0)) - -C Exit if we dont have lat/lon. - if (slat.lt.-90.0 .or. slat.gt.90.0 .or. - & slon.lt.-180.0 .or. slon.gt.180.0) then - ftmax=t(1) !Kelvin - go to 9999 - end if - - hour=hr+(min/60.0) - -C Determine station index. - - do 100 i=1,nr - if (stnid.ne.ids(i)) go to 100 - sta=i - go to 101 -100 continue - sta=67 -101 continue - -C Compute julian day. - - call cv_date2jul(yr,mon,day,julday,istatus) - -C Determine dirunal range (degrees celsius). - - trng=drange(tmax(mon,sta),tmin(mon,sta)) -C if (trng.lt.1.) go to 9999 - -C Compute the solar time corresponding to the sounding time. The equation -C of time is neglected. - - tstart=hour+(slon/15) - -C Compute the solar time at sunset. The equation of time is neglected. - - decl=sdecmx*sin(2*pi*(julday-veday)/yrlen) - - hilat=0 - -C Check for high latitude conditions where the sun never rises -C nor sets. If so, tsrad is assumed to be undefined, and set to 0. -C Note: This algorithm was derived for mid-latitudes. This patch -C attempts to correct this problem, but this needs to be looked at -C in detail later. Perhaps a more rigorous way to determine the -C insolation at high latitudes during these two situations. DRP - -C Define the angle of the maximum sun height - - max_alt = (1.570796327-abs(slat)*pi/180)+decl - -C Define the angle of the minimum sun height - - min_alt = (abs(slat)*pi/180)-(1.570796327-decl) - - if ( (max_alt.lt.0.0).or.(min_alt.gt.0.0) ) then - tsrad = 0.0 - hilat = 1 - goto 150 - end if - haset=acos(tan(slat*pi/180)*tan(decl)) - tset=12+12*(haset/pi) - -C The solar input is allowed until 2 hours before sunset...subtract 2 hours. - - tstop=tset-2 - -C Compute the total undepleted solar radiation at the top of the atmosphere. -C Used temporary variables to match the types that solax() expected. - t_julday = julday - t_mon = mon - t_slat = slat - t_tyminc = int(tyminc) - t_tstart = int(tstart) - t_tstop = int(tstop) - call solax(t_julday,t_mon,t_slat,t_tyminc,t_tstart,t_tstop, - +t_tsrad) - tsrad = dble (t_tsrad) - -C Convert input temperatures & dewpoints from Kelvin to Celsius. - -150 do 200 i=1,nlvls - tc(i)=t(i)-273.15 - tdc(i)=td(i)-273.15 -200 continue - -C Interpolate the pressure, height, temperature, and dew point to 10 mb -C resolution. - - call eqp(deltap,p,ht,tc,tdc,nlvls,pp,htt,tt,tdd,lvl) - -C Initialize surface conditions. - - sfcp=pp(1) - sfct=tt(1) - sfctd=tdd(1) - -C Calculate surface albedo. Assume albedo varies linearly from maximum to -C minimum values as the snow depth increases from zero to five inches. - - albdhi=albmax(sta)/100 - albdlo=albmin(sta)/100 - albdo=albdlo+0.2*snow*(albdhi-albdlo) - if (albdo.gt.albdhi) albdo=albdhi - -C Compute the boundaries for the three levels used to compute mean values of -C relative humidity and clouds. - - endlvl(1)=sfcp-150 - endlvl(2)=sfcp-300 - endlvl(3)=sfcp-500 - -C Compute the mean relative humidity (percent) for the three layers bounded -C by the pressures SFCP, ENDLVL(1), ENDLVL(2), and, ENDLVL(3). - - call rhbar(endlvl,mrh,nclyr,sfcp,pp,tt,tdd) - -C Compute cloud cover. - - tcld=0.0 - do 300 i=1,nclyr - cover(i)=0.0001*mrh(i)*mrh(i) - tcld=amax1(tcld,cover(i)) -300 continue - -C - - stemp=sfct+(0.5*trng)+273.15 - -C - - ulw=emis*sbc*(stemp*stemp*stemp*stemp) - -C - - a=0.61 - b=0.05 - vpmm=0.75*esat(sfctd) - dlwclr=ulw*(a+b*sqrt(vpmm)) - -C - - cldcor=1-0.01*(cl*mrh(1)+cm*mrh(2)+ch*mrh(3)) - if (cldcor.lt.0.0) cldcor=0.0 - -C - - flw=(ulw-dlwclr)*cldcor - -C Check for high latitude sites - - if (hilat.eq.1) then - blw=flw - else - blw=flw*(tstop-tstart)*60 - end if - -C - - sw=(1-albdo)*(1-tcld)*tsrad -C - - heat=sw-blw - if (heat.le.0.0) then - ftmax=sfct+273.15 !Kelvin - go to 9999 - end if - -C - - cnv=cp*deltap*(cmbd/grav) - asol=heat/cnv - -C Compute thickness of each 10 mb layer. - - do 310 i=2,lvl - deltaz(i-1)=htt(i)-htt(i-1) -310 continue - -C Compute the maximum temperature. Convert result from C back to K. - - call mxtp(asol,deltap,sfcp,pp(2),tt,deltaz,lvl,ftmax) - ftmax=ftmax+273.15 !Kelvin - -C Exit to main program. - -9999 return - end diff --git a/nativeLib/rary.meteorological/src/fortconbuf.f b/nativeLib/rary.meteorological/src/fortconbuf.f deleted file mode 100755 index 38d55dbaf4..0000000000 --- a/nativeLib/rary.meteorological/src/fortconbuf.f +++ /dev/null @@ -1,1235 +0,0 @@ - -C Note: a patch to the Fortran Compiler performed during Apr 1995 -C requires -C this to be compiled with the +e option, or else Byte variable are -C treated -C as Logical*1 variables with logical operators instead of Integer*1. - - Subroutine FortConBuf(Array,Work,mnx,nx,ny, - & scale,offset,mode,seed, - & xpoints,ypoints,npoints, - & badlo,badhi, - & status) - -C Assumes user sets up world coordinates from 1.0 to float(nx) and -C 1.0 to float(ny). - -C Inputs: -C Array(mnx,ny) R*4 Array to contour. -C Work(nx,ny) I*4 Workspace. -C mnx I*4 First dimension of input arrays. -C nx I*4 First (horizontal) dimension of input grid. -C ny I*4 Second (vertical) dimension of input grid. -C scale R*4 Contour grid as if it were multiplied by this -C .... -C offset R*4 and then added to by this before contouring. -C mode I*4 If mode<0 then -mode is approximate number of -C contours and seed is minimum contour -C increment. -C If mode=0 then seed is contour increment. If -C mode>0 seed is array of contour values to use, -C mode is number of contours. -C seed(*) R*4 Value(s) that control contouring (see mode). -C xpoints(*) R*4 x-coords in grid space of contours. -C ypoints(*) R*4 y-coords in grid space of contours. -C npoints I*4 Number of points in the buffer. -C badlo,badhi R*4 Smallest and largest values which will be ignored -C upon contouring. If badlo>badhi, then no missing -C value handling is done. - -C Outputs: -C status I*4 Logically true if input was meaningful. - - Implicit None - include 'IntrinsicFunctions.inc' - -c declare arguments - Integer*4 mnx,nx,ny - Real*4 Array(mnx,*) - Byte Work(nx,ny,4) - Real*4 scale,offset - Integer*4 mode - Real*4 seed(*) - Real*4 xpoints(*),ypoints(*) - Real*4 badhi,badlo - Integer*4 status -c - Integer*4 mwi,mnc - Parameter (mwi=1500,mnc=200) - - Integer*4 ncon,nconp,mmm,npoints,numSteps - - Logical mirror,ascend,enulab - - Byte bbb - - Integer*4 i,j,iq,jq,kq,c1, - & xmode,sedsgn, - & nxm,nym, - & lstat, - & turn1,turn2,turn3,turn4,ii,jj - - Real*4 val,val1,val2,dval,minval,maxval,t10,t5,t2, - & D2,sedwrk, - & rawmin,rawmax - - Integer*4 celcnt,labsep,dlx,dld,dly,c,labsep2, - & Patern(mnc),ChrN(mnc) - Real*4 ConVal(mnc),ConVals(mnc),MxAvg(mnc),MnAvg(mnc) - Byte Cmask(mnc) -c unused variable Byte b52/'52'X/ -c unused variable Byte bD2/'D2'X/ -c unused variable Byte b12/'12'X/ -c unused variable Byte b02/'02'X/ - Byte b40/'40'X/ - Byte bC0/'C0'X/ - Character LabStr(mnc)*7 - Common /ConNewCmnBuf/celcnt,labsep,dlx,dld,dly,c, - & labsep2,Patern,LabStr,ChrN, - & ConVal,ConVals,MxAvg,MnAvg,CMask - - Data Cmask/1,2,4,8,16,32,64,-128,1,2,4,8,16,32,64,-128, - & 1,2,4,8,16,32,64,-128,1,2,4,8,16,32,64,-128, - & 1,2,4,8,16,32,64,-128,1,2,4,8,16,32,64,-128, - & 1,2,4,8,16,32,64,-128,1,2,4,8,16,32,64,-128, - & 1,2,4,8,16,32,64,-128,1,2,4,8,16,32,64,-128, - & 1,2,4,8,16,32,64,-128,1,2,4,8,16,32,64,-128, - & 1,2,4,8,16,32,64,-128,1,2,4,8,16,32,64,-128, - & 1,2,4,8,16,32,64,-128,1,2,4,8,16,32,64,-128, - & 1,2,4,8,16,32,64,-128,1,2,4,8,16,32,64,-128, - & 1,2,4,8,16,32,64,-128,1,2,4,8,16,32,64,-128, - & 1,2,4,8,16,32,64,-128,1,2,4,8,16,32,64,-128, - & 1,2,4,8,16,32,64,-128,1,2,4,8,16,32,64,-128, - & 1,2,4,8,16,32,64,-128/ - -c Initialize data range calculation. - rawmax=-1e37 - rawmin=+1e37 - npoints = 0 - -c Diagnostic output of unlabelable side masking. -c Call ZeroItOutBuf(Work,nx*ny) -c Do 1515 labsep2=0,5 -c Call MarkHrz(Work(1,1,3),Work(1,1,4),nx,ny,6,6) -c Print *,'Hrz labsep2 = ',labsep2 -c1515 Call ShowMark(Work,nx,ny) -c Call ZeroItOutBuf(Work,nx*ny) -c Do 1516 labsep2=0,5 -c Call MarkVrt(Work(1,1,3),Work(1,1,4),nx,ny,6,6) -c Print *,'Vrt labsep2 = ',labsep2 -c1516 Call ShowMark(Work,nx,ny) -c If (i.eq.i) Stop - -c Zero out workspace. - Call ZeroItOutBuf(Work,nx*ny) - -c Case of we have to consider missing values. - If (badlo.lt.badhi) Then - -c Figure out which vertical sides can accept contours. - Do 982 i=1,nx - val2=Array(i,ny) - Do 981 j=ny-1,1,-1 - val1=Array(i,j) - If (val1.lt.val2) Then - If (val1.gt.badhi .or. val2.lt.badlo) Then - If (val1.lt.rawmin) rawmin=val1 - Work(i,j,4)=b40 - Else - Work(i,j,4)=1 - End If - Else - If (val2.gt.badhi .or. val1.lt.badlo) Then - If (val2.lt.rawmin) rawmin=val2 - If (val2.lt.val1) Work(i,j,4)=bC0 - Else - Work(i,j,4)=1 - End If - End If -981 val2=val1 -982 Continue - -c Figure out which horizontal sides can accept contours. - Do 984 j=1,ny - val2=Array(nx,j) - Do 983 i=nx-1,1,-1 - val1=Array(i,j) - If (val1.lt.val2) Then - If (val1.gt.badhi .or. val2.lt.badlo) Then - If (val2.gt.rawmax) rawmax=val2 - Work(i,j,3)=b40 - Else - Work(i,j,3)=1 - End If - Else - If (val2.gt.badhi .or. val1.lt.badlo) Then - If (val1.gt.rawmax) rawmax=val1 - If (val2.lt.val1) Work(i,j,3)=bC0 - Else - Work(i,j,3)=1 - End If - End If -983 val2=val1 -984 Continue - - Else ! No missing values. - -c Determine "sense" of vertical sides. - Do 992 i=1,nx - val2=Array(i,ny) - Do 991 j=ny-1,1,-1 - val1=Array(i,j) - If (val1.lt.val2) Then - If (val1.lt.rawmin) rawmin=val1 - Work(i,j,4)=b40 - Else - If (val2.lt.rawmin) rawmin=val2 - If (val2.lt.val1) Work(i,j,4)=bC0 - End If -991 val2=val1 -992 Continue - -c Determine "sense" of horizontal sides. - Do 994 j=1,ny - val2=Array(nx,j) - Do 993 i=nx-1,1,-1 - val1=Array(i,j) - If (val1.lt.val2) Then - If (val2.gt.rawmax) rawmax=val2 - Work(i,j,3)=b40 - Else - If (val1.gt.rawmax) rawmax=val1 - If (val2.lt.val1) Work(i,j,3)=bC0 - End If -993 val2=val1 -994 Continue - - End If ! done finding data range, average gradient and missing values. - -c Handle case of no good points. - status=0 - If (rawmin.gt.rawmax .or. - & nx.gt.mnx .or. nx.gt.mwi .or. ny.gt.mwi) Return - status=1 - If (rawmin.eq.rawmax) Return - -c Scale absolute extrema from grid as specified. - If (scale.lt.0.0) Then - minval=rawmax*scale+offset - maxval=rawmin*scale+offset - Else If (scale.gt.0.0) Then - minval=rawmin*scale+offset - maxval=rawmax*scale+offset - Else - minval=rawmin - maxval=rawmax - End If - -c Limit number of contours by size of work arrays, check for alternate modes. - If (mode.gt.0) Then - xmode=mode/1000 - mmm=jmin0(mnc,mode-xmode*1000) - Else - xmode=(-mode)/1000 - mmm=jmax0(-mnc,mode+xmode*1000) - End If - If (xmode.eq.1) Then - If (mmm.le.0) Then - minval=amax1(minval,seed(2)) - maxval=amin1(maxval,seed(3)) - End If - xmode=0 - Else If (xmode.eq.2) Then - If (mmm.le.0) Then - xmode=0 - Else If (seed(1).lt.0.0 .or. seed(mmm).lt.seed(1)) Then - xmode=0 - Else - mmm=jmin0(mnc/2,mmm) - End If - Else - xmode=0 - End If - -c Decode line label format control string, see if we have enumerated labels. - enulab=(mmm.gt.0 .and. .not.i4_odd(lstat) .and. xmode.ne.3) - -c Not enumerated contours. - If (mmm.le.0) Then - -c Make sure contouring increment has some finite positive value and that no -c more contours are drawn than we have room for in work arrays. - val=(maxval-minval)/mnc - dval=seed(1) - If (dval.lt.val) Then - dval=val - If (mmm.eq.0) mmm=-25 - End If - -c Handle case of routine picks contouring interval. - If (mmm.lt.0) Then - - dval=10.0**(jint(alog10(dval)+100.01)-100) - t10=(-5.0)*mmm - t5 =(-2.0)*mmm - t2 =(-1.0)*mmm -1005 val=(maxval-minval)/dval - If (val.gt.t10) Then - dval=dval*10.0 - Goto 1005 - End If - If (val.gt.t5) dval=dval*5.0 - If (val.gt.t2) dval=dval*2.0 - End If - -c See to it that contour values are multiples of dval. - val1=dval*anint(minval/dval) - If (val1.lt.minval) val1=val1+dval - val2=dval*anint(maxval/dval) - maxval=amax1(val1+dval,maxval) - If (val2.gt.maxval) val2=val2-dval - If (val1.gt.val2) Return - -c Load up array with contour values. -c If (scale.ge.0.0) Then -c ncon=0 -c Do 1010 val=val1,val2,dval -c ncon=ncon+1 -c1010 ConVal(ncon)=val -c Else -c ncon=0 -c Do 1012 val=val2,val1,-dval -c ncon=ncon+1 -c1012 ConVal(ncon)=val -c End If - -c These next 11 lines of code replace the above commented out code in order to -c avoid a warning with g77 ("val" is type REAL or DOUBLE PRECISION -c -- unexpected behavior likely) which is likely for very large loops -c with -c very small increments. A very bad way to fix this warning is to make -c the index variable an integer. Mixed variables in a do loop will cause -c an infinite loop with f77 and a floating point exception with g77 when -c the increment is less than 1. See p.1063 in the HP9000 F77 Fortran -c Programmer's Reference. - numSteps = (val2-val1)/dval+1 - if (scale .lt. 0.0) then - val = val2 - dval= -(dval) - else - val = val1 - endif - do 1010 ncon=1,numSteps - ConVal(ncon) = val - 1010 val = val + dval - ncon = ncon - 1 - - Else ! User enumerated contours. - - ncon=0 - dval=1e37 - val1=1e37 - val2=-1e37 - mirror=(xmode.eq.2) - ascend=((seed(1).gt.seed(mmm)).neqv.mirror) - If (scale.lt.0.0 .and. .not.mirror) ascend=.not.ascend - If (mirror .and. scale.ge.0.0) Then - sedsgn=-1 - Else - sedsgn=1 - End If - -c Handle a negative scale and/or descending order in seed values. -1049 If (ascend) Then - iq=mmm - jq=1 - kq=-1 - Else - iq=1 - jq=mmm - kq=1 - End If - -c Load values for enumerated contours into internal work array, record max, -c min and approximation of delta value. - Do 1050 c=iq,jq,kq - sedwrk=sedsgn*seed(c) - If (mirror .and. sedwrk.eq.0.0) Goto 1050 - If (sedwrk.lt.minval .or. sedwrk.gt.maxval) Goto 1050 - If (ncon.gt.0) Then - val=abs(sedwrk-ConVal(ncon)) - If (val.ne.0.0) dval=amin1(dval,val) - End If - If (sedwrk.ne.0.0) dval=amin1(dval,abs(sedwrk)) - val1=amin1(val1,sedwrk) - val2=amax1(val2,sedwrk) - ncon=ncon+1 - ConVal(ncon)=sedwrk - If (ncon.ge.mnc) Goto 1055 -1050 Continue -1055 Continue ! loop escape - -c See if we loop back for xmode.eq.2, negative version of input list. - If (mirror) Then - mirror=.false. - ascend=.not.ascend - sedsgn=-sedsgn - If (ncon.lt.mnc) Goto 1049 - End If - - End If ! End loading contour value array. - -c Get plotting coordinates ranges. -1939 Continue - nxm=nx-1 - nym=ny-1 - -C Escape point for bypassing locating maxes and mins...Skip drawing -C contours if there are none. -77776 If (ncon.eq.0) Return - -c Fill line pattern array, scale contour value array, and set use count mask. - Do 4001 c=1,ncon - ConVals(c)=ConVal(c) - If (scale.ne.0.0) ConVal(c)=(ConVal(c)-offset)/scale -4001 Continue - -C Set bracketing values which define whether cell side is best suited for -C labeling a particular contour. - c1=0 - Do 4012 c=1,ncon - If (c1.eq.0) Then - MnAvg(c)=-1e37 - Else - MxAvg(c1)=ConVal(c)+ConVal(c1) - MnAvg(c)=MxAvg(c1) - End If - c1=c -4012 Continue - MxAvg(c1)=+1e37 - nconp=ncon+1 - -C Initialize spiral search for places to start contours. - turn1=nx - turn2=ny - turn3=1 - turn4=2 - c=(ncon+1)/2 - i=0 - ii=1 - j=1 - jj=1 - -C Move along side 1 after missing values. -10011 i=ii - If (i.ge.turn1) Then - If (j.ge.turn2) Return - turn1=turn1-1 - Goto 20011 - End If - ii=i+1 - bbb=Work(i,j,3) - If (iand (int(bbb),1).eq.1) Goto 10011 - If (bbb.eq.0) Goto 10011 - -c Cell side does not have missing values, reinitialize search. - D2=Array(i,j) - If (bbb.gt.0) Then - Do 10014 c=1,ncon -10014 If (ConVal(c).gt.D2) Goto 10022 - Goto 10021 - Else - Do 10015 c=ncon,1,-1 -10015 If (ConVal(c).lt.D2) Goto 10032 - Goto 10031 - End If - -c Move along side 1, values increasing as we go. -10021 i=ii - If (i.ge.turn1) Then - If (j.ge.turn2) Return - turn1=turn1-1 - Goto 20021 - End If - ii=i+1 - bbb=Work(i,j,3) - If (iand (int(bbb),1).eq.1) Goto 10011 - If (bbb.lt.0) Then - c=c-1 - If (c.eq.0) Goto 10031 - Goto 10032 - End If - If (c.eq.nconp) Goto 10021 - If (bbb.eq.0) Goto 10021 - -c Step through possible contours we can start. -10022 D2=Array(ii,jj) -10023 If (ConVal(c).lt.D2) Then - If (iand(Work(i,j,1),CMask(c)).eq.0) - & Call Contr1_B(i,j, 1,Array,Work,mnx,nx,ny, - & xpoints,ypoints,npoints) - c=c+1 - If (c.eq.nconp) Goto 10021 - Goto 10023 - End If - Goto 10021 - -c Move along side 1, values decreasing as we go. -10031 i=ii - If (i.ge.turn1) Then - If (j.ge.turn2) Return - turn1=turn1-1 - Goto 20031 - End If - ii=i+1 - bbb=Work(i,j,3) - If (iand (int(bbb),1).eq.1) Goto 10011 - If (bbb.gt.0) Then - c=c+1 - If (c.eq.nconp) Goto 10021 - Goto 10022 - End If - If (c.eq.0) Goto 10031 - If (bbb.eq.0) Goto 10031 - -c Step through possible contours we can start. -10032 D2=Array(ii,jj) -10033 If (ConVal(c).gt.D2) Then - If (iand(Work(i,j,1),CMask(c)).eq.0) - & Call Contr1_B(i,j, 1,Array,Work,mnx,nx,ny, - & xpoints,ypoints,npoints) - c=c-1 - If (c.eq.0) Goto 10031 - Goto 10033 - End If - Goto 10031 - -C Move up side 2 after missing values. -20011 j=jj - If (j.ge.turn2) Then - If (i.le.turn3) Return - turn2=turn2-1 - Goto 30011 - End If - jj=j+1 - bbb=Work(i,j,4) - If (iand (int(bbb),1).eq.1) Goto 20011 - If (bbb.eq.0) Goto 20011 - -c Cell side does not have missing values, reinitialize search. - D2=Array(i,j) - If (bbb.gt.0) Then - Do 20014 c=1,ncon -20014 If (ConVal(c).gt.D2) Goto 20022 - Goto 20021 - Else - Do 20015 c=ncon,1,-1 -20015 If (ConVal(c).lt.D2) Goto 20032 - Goto 20031 - End If - -c Move up side 2, values increasing as we go. -20021 j=jj - If (j.ge.turn2) Then - If (i.le.turn3) Return - turn2=turn2-1 - Goto 30021 - End If - jj=j+1 - bbb=Work(i,j,4) - If (iand (int(bbb),1).eq.1) Goto 20011 - If (bbb.lt.0) Then - c=c-1 - If (c.eq.0) Goto 20031 - Goto 20032 - End If - If (c.eq.nconp) Goto 20021 - If (bbb.eq.0) Goto 20021 - -c Step through possible contours we can start. -20022 D2=Array(ii,jj) -20023 If (ConVal(c).lt.D2) Then - If (iand(Work(i,j,2),CMask(c)).eq.0) - & Call Contr1_B(i,j, 2,Array,Work,mnx,nx,ny, - & xpoints,ypoints,npoints) - c=c+1 - If (c.eq.nconp) Goto 20021 - Goto 20023 - End If - Goto 20021 - -c Move up side 2, values decreasing as we go. -20031 j=jj - If (j.ge.turn2) Then - If (i.le.turn3) Return - turn2=turn2-1 - Goto 30031 - End If - jj=j+1 - bbb=Work(i,j,4) - If (iand (int(bbb),1).eq.1) Goto 20011 - If (bbb.gt.0) Then - c=c+1 - If (c.eq.nconp) Goto 20021 - Goto 20022 - End If - If (c.eq.0) Goto 20031 - If (bbb.eq.0) Goto 20031 - -c Find group of contours which are bracketed. -20032 D2=Array(ii,jj) -20033 If (ConVal(c).gt.D2) Then - If (iand(Work(i,j,2),CMask(c)).eq.0) - & Call Contr1_B(i,j, 2,Array,Work,mnx,nx,ny, - & xpoints,ypoints,npoints) - c=c-1 - If (c.eq.0) Goto 20031 - Goto 20033 - End If - Goto 20031 - -C Move back along side 3 after missing values. -30011 i=ii - If (i.le.turn3) Then - If (j.le.turn4) Return - turn3=turn3+1 - Goto 40011 - End If - ii=i-1 - bbb=Work(ii,jj,3) - If (iand (int(bbb),1).eq.1) Goto 30011 - If (bbb.eq.0) Goto 30011 - -c Cell side does not have missing values, reinitialize search. - D2=Array(i,j) - If (bbb.lt.0) Then - Do 30014 c=1,ncon -30014 If (ConVal(c).gt.D2) Goto 30022 - Goto 30021 - Else - Do 30015 c=ncon,1,-1 -30015 If (ConVal(c).lt.D2) Goto 30032 - Goto 30031 - End If - -c Move back along side 3, values increasing as we go. -30021 i=ii - If (i.le.turn3) Then - If (j.le.turn4) Return - turn3=turn3+1 - Goto 40021 - End If - ii=i-1 - bbb=Work(ii,jj,3) - If (iand (int(bbb),1).eq.1) Goto 30011 - If (bbb.gt.0) Then - c=c-1 - If (c.eq.0) Goto 30031 - Goto 30032 - End If - If (c.eq.nconp) Goto 30021 - If (bbb.eq.0) Goto 30021 - -c Step through possible contours we can start. -30022 D2=Array(ii,jj) -30023 If (ConVal(c).lt.D2) Then - If (iand(Work(ii,jj,1),CMask(c)).eq.0) - & Call Contr1_B(ii,jj, 3,Array,Work,mnx,nx,ny, - & xpoints,ypoints,npoints) - c=c+1 - If (c.eq.nconp) Goto 30021 - Goto 30023 - End If - Goto 30021 - -c Move back along side 3, values decreasing as we go. -30031 i=ii - If (i.le.turn3) Then - If (j.le.turn4) Return - turn3=turn3+1 - Goto 40031 - End If - ii=i-1 - bbb=Work(ii,jj,3) - If (iand (int(bbb),1).eq.1) Goto 30011 - If (bbb.lt.0) Then - c=c+1 - If (c.eq.nconp) Goto 30021 - Goto 30022 - End If - If (c.eq.0) Goto 30031 - If (bbb.eq.0) Goto 30031 - -c Step through possible contours we can start. -30032 D2=Array(ii,jj) -30033 If (ConVal(c).gt.D2) Then - If (iand(Work(ii,jj,1),CMask(c)).eq.0) - & Call Contr1_B(ii,jj, 3,Array,Work,mnx,nx,ny, - & xpoints,ypoints,npoints) - c=c-1 - If (c.eq.0) Goto 30031 - Goto 30033 - End If - Goto 30031 - -C Move down side 4 after missing values. -40011 j=jj - If (j.le.turn4) Then - If (i.ge.turn1) Return - turn4=turn4+1 - Goto 10011 - End If - jj=j-1 - bbb=Work(ii,jj,4) - If (iand (int(bbb),1).eq.1) Goto 40011 - If (bbb.eq.0) Goto 40011 - -c Cell side does not have missing values, reinitialize search. - D2=Array(i,j) - If (bbb.lt.0) Then - Do 40014 c=1,ncon -40014 If (ConVal(c).gt.D2) Goto 40022 - Goto 40021 - Else - D2=Array(i,j) - Do 40015 c=ncon,1,-1 -40015 If (ConVal(c).lt.D2) Goto 40032 - Goto 40031 - End If - -c Move down side 4, values increasing as we go. -40021 j=jj - If (j.le.turn4) Then - If (i.ge.turn1) Return - turn4=turn4+1 - Goto 10021 - End If - jj=j-1 - bbb=Work(ii,jj,4) - If (iand (int(bbb),1).eq.1) Goto 40011 - If (bbb.gt.0) Then - c=c-1 - If (c.eq.0) Goto 40031 - Goto 40032 - End If - If (c.eq.nconp) Goto 40021 - If (bbb.eq.0) Goto 40021 - -c Step through possible contours we can start. -40022 D2=Array(ii,jj) -40023 If (ConVal(c).lt.D2) Then - If (iand(Work(ii,jj,2),CMask(c)).eq.0) - & Call Contr1_B(ii,jj, 4,Array,Work,mnx,nx,ny, - & xpoints,ypoints,npoints) - c=c+1 - If (c.eq.nconp) Goto 40021 - Goto 40023 - End If - Goto 40021 - -c Move down side 4, values decreasing as we go. -40031 j=jj - If (j.le.turn4) Then - If (i.ge.turn1) Return - turn4=turn4+1 - Goto 10031 - End If - jj=j-1 - bbb=Work(ii,jj,4) - If (iand (int(bbb),1).eq.1) Goto 40011 - If (bbb.lt.0) Then - c=c+1 - If (c.eq.nconp) Goto 40021 - Goto 40022 - End If - If (c.eq.0) Goto 40031 - If (bbb.eq.0) Goto 40031 - -c Step through possible contours we can start. -40032 D2=Array(ii,jj) -40033 If (ConVal(c).gt.D2) Then - If (iand(Work(ii,jj,2),CMask(c)).eq.0) - & Call Contr1_B(ii,jj, 4,Array,Work,mnx,nx,ny, - & xpoints,ypoints,npoints) - c=c-1 - If (c.eq.0) Goto 40031 - Goto 40033 - End If - Goto 40031 - - End - - Subroutine Contr1_B(istart,jstart,sstart, - - Dat,Work,mnx,nx,ny, - & xpoints,ypoints,npoints) - - Implicit None -c declare arguments - Integer*4 istart,jstart,sstart,mnx,nx,ny - Real*4 Dat(mnx,*) - Byte Work(nx,ny,4) - Real*4 xpoints(*),ypoints(*) - Integer*4 npoints -c - Integer*4 mwi,mnc,mp - Parameter (mwi=1500,mnc=200,mp=2000) - - Logical*4 GGG1,GGG2,GGG3,GGG4,GGGD, - - backok,clos1,clos2,clos3,clos4,loop - - Integer*4 icell,jcell,iplus,jplus - - Byte cmw - - Real*4 D1,D2,D3,D4,val4, - - val,minavg,maxavg - -c unused variable Byte b02/'02'X/ - - Real*4 Ipnt(-mp:2*mp),Jpnt(-mp:2*mp) - Integer*4 kpnt,kpnt1,kpnt2,dkpnt,k - - Integer*4 celcnt,labsep,dlx,dld,dly,c,labsep2, - & Patern(mnc),ChrN(mnc) - Real*4 ConVal(mnc),ConVals(mnc),MxAvg(mnc),MnAvg(mnc) - Byte Cmask(mnc) - Byte LabStr(7,mnc) - Common /ConNewCmnBuf/celcnt,labsep,dlx,dld,dly,c, - & labsep2,Patern,LabStr,ChrN, - & ConVal,ConVals,MxAvg,MnAvg,CMask - - Integer*4 npasses - Real*4 wgt1 - Common /SmoothCmnBuf/npasses,wgt1 -c unused variable Byte LCpnt(-mp:2*mp) -c unused variable Data LCPnt/mp*-1,-1,mp*-1,mp*-1/ - Data npasses/0/ - -C Nomenclature for cell (i,j) - -c point 4 (i,j+1)-----side 3------(i+1,j+1) point 3 -c | | -c | | -c | | -c side 4 side 2 -c | | -c | | -c | | -c point 1 (i,j)-------side 1------(i+1,j) point 2 - -C Initialize. - val=ConVal(c) - minavg=MnAvg(c) - maxavg=MxAvg(c) - cmw=Cmask(c) - loop=.false. - kpnt=0 - kpnt1=0 - kpnt2=0 - dkpnt=1 - val4=4*val - clos1=.false. - clos2=.false. - clos3=.false. - clos4=.false. - backok=.false. - Goto (51,52,53,54) sstart - -C Start contour on side one. -51 If (jstart.gt.1) Then - backok=.true. - End If -61 jcell=jstart - jplus=jstart+1 - icell=istart - iplus=istart+1 - clos1=.true. !@@@@ - D3=Dat(iplus,jcell) - D4=Dat(icell,jcell) - GGG3=val.ge.D3 - GGG4=val.ge.D4 - If (GGG3.eqv.GGG4) Goto 9000 - Work(icell,jcell,1)=ior(Work(icell,jcell,1),cmw) - Ipnt(0)=icell+(val-D4)/(D3-D4) - Jpnt(0)=jcell - Goto 0101 - -C Start contour on side two. -52 If (istart.lt.nx) Then - backok=.true. - End If -62 icell=istart-1 - iplus=istart - jcell=jstart - jplus=jstart+1 - clos2=.true. !@@@@ - D1=Dat(iplus,jcell) - D4=Dat(iplus,jplus) - GGG1=val.ge.D1 - GGG4=val.ge.D4 - If (GGG1.eqv.GGG4) Goto 9000 - Work(iplus,jcell,2)=ior(Work(iplus,jcell,2),cmw) - Ipnt(0)=iplus - Jpnt(0)=jcell+(val-D1)/(D4-D1) - Goto 0102 - -C Start contour on side three. -53 If (jstart.lt.ny) Then - backok=.true. - End If -63 jcell=jstart-1 - jplus=jstart - icell=istart - iplus=istart+1 - clos3=.true. !@@@@ - D1=Dat(icell,jplus) - D2=Dat(iplus,jplus) - GGG1=val.ge.D1 - GGG2=val.ge.D2 - If (GGG1.eqv.GGG2) Goto 9000 - Work(icell,jplus,1)=ior(Work(icell,jplus,1),cmw) - Ipnt(0)=icell+(val-D1)/(D2-D1) - Jpnt(0)=jplus - Goto 0103 - -C Start contour on side four. -54 If (istart.gt.1) Then - backok=.true. - End If -64 icell=istart - iplus=istart+1 - jcell=jstart - jplus=jstart+1 - clos4=.true. !@@@@ - D3=Dat(icell,jplus) - D2=Dat(icell,jcell) - GGG3=val.ge.D3 - GGG2=val.ge.D2 - If (GGG3.eqv.GGG2) Goto 9000 - Work(icell,jcell,2)=ior(Work(icell,jcell,2),cmw) - Ipnt(0)=icell - Jpnt(0)=jcell+(val-D2)/(D3-D2) - Goto 0104 - -C Entering side one, establish cell boundary information. -0101 GGG1=GGG4 - D1=D4 - GGG2=GGG3 - D2=D3 - D3=Dat(iplus,jplus) - D4=Dat(icell,jplus) - GGG3=val.ge.D3 - GGG4=val.ge.D4 - -c Write (*,*) icell,jcell,1 -c Write (*,*) GGG4,D4,D3,GGG3 -c Write (*,*) GGG1,D1,D2,GGG2 - -C handle case of missing data. - If (iand(int(Work(icell,jplus,3)),1).eq.1) Then - If (iand(int(Work(icell,jcell,4)),1).eq.0) Then - If (GGG4.neqv.GGG2) Goto 9000 - celcnt=celcnt+dld - Goto 4422 - Else If (iand(int(Work(iplus,jcell,4)),1).eq.0) Then - If (GGG3.neqv.GGG1) Goto 9000 - celcnt=celcnt+dld - Goto 2244 - End If - Goto 9000 - End If -c Write (*,*) 'Passes missing value test' - -C Determine proper path through cell from side one. - If (GGG3.eqv.GGG4) Then - celcnt=celcnt+dld - If (GGG2.eqv.GGG3) Goto 4422 - Goto 2244 - Else - If (GGG1.eqv.GGG4) Then - celcnt=celcnt+dly - Goto 3311 - End If - celcnt=celcnt+dld - GGGD=val4.ge.(D1+D2+D3+D4) - If (GGG1.neqv.GGGD) Goto 4422 - Goto 2244 - End If - -C Entering side two, establish cell boundary information. -0102 GGG2=GGG1 - D2=D1 - GGG3=GGG4 - D3=D4 - D1=Dat(icell,jcell) - D4=Dat(icell,jplus) - GGG1=val.ge.D1 - GGG4=val.ge.D4 - -c Write (*,*) icell,jcell,2 -c Write (*,*) GGG4,D4,D3,GGG3 -c Write (*,*) GGG1,D1,D2,GGG2 - -C handle case of missing data. - If (iand(int(Work(icell,jcell,4)),1).eq.1) Then - If (iand(int(Work(icell,jplus,3)),1).eq.0) Then - If (GGG4.neqv.GGG2) Goto 9000 - celcnt=celcnt+dld - Goto 3311 - Else If (iand(int(Work(icell,jcell,3)),1).eq.0) Then - If (GGG3.neqv.GGG1) Goto 9000 - celcnt=celcnt+dld - Goto 1133 - End If - Goto 9000 - End If -c Write (*,*) 'Passes missing value test' - -C Determine proper path through cell from side two. - If (GGG1.eqv.GGG4) Then - celcnt=celcnt+dld - If (GGG3.eqv.GGG4) Goto 1133 - Goto 3311 - Else - If (GGG1.eqv.GGG2) Then - celcnt=celcnt+dlx - Goto 4422 - End If - celcnt=celcnt+dld - GGGD=val4.ge.(D1+D2+D3+D4) - If (GGG2.neqv.GGGD) Goto 1133 - Goto 3311 - End If - -C Entering side three, establish cell boundary information. -0103 GGG3=GGG2 - D3=D2 - GGG4=GGG1 - D4=D1 - D1=Dat(icell,jcell) - D2=Dat(iplus,jcell) - GGG1=val.ge.D1 - GGG2=val.ge.D2 - -c Write (*,*) icell,jcell,3 -c Write (*,*) GGG4,D4,D3,GGG3 -c Write (*,*) GGG1,D1,D2,GGG2 - -C handle case of missing data. - If (iand(int(Work(icell,jcell,3)),1).eq.1) Then - If (iand(int(Work(iplus,jcell,4)),1).eq.0) Then - If (GGG4.neqv.GGG2) Goto 9000 - celcnt=celcnt+dld - Goto 2244 - Else If (iand(int(Work(icell,jcell,4)),1).eq.0) Then - If (GGG3.neqv.GGG1) Goto 9000 - celcnt=celcnt+dld - Goto 4422 - End If - Goto 9000 - End If -c Write (*,*) 'Passes missing value test' - -C Determine proper path through cell from side three. - If (GGG1.eqv.GGG2) Then - celcnt=celcnt+dld - If (GGG1.eqv.GGG4) Goto 2244 - Goto 4422 - Else - If (GGG2.eqv.GGG3) Then - celcnt=celcnt+dly - Goto 1133 - End If - celcnt=celcnt+dld - GGGD=val4.ge.(D1+D2+D3+D4) - If (GGG3.neqv.GGGD) Goto 2244 - Goto 4422 - End If - -C Entering side four, establish cell boundary information. -0104 GGG4=GGG3 - D4=D3 - GGG1=GGG2 - D1=D2 - D3=Dat(iplus,jplus) - D2=Dat(iplus,jcell) - GGG3=val.ge.D3 - GGG2=val.ge.D2 - -c Write (*,*) icell,jcell,4 -c Write (*,*) GGG4,D4,D3,GGG3 -c Write (*,*) GGG1,D1,D2,GGG2 - -C handle case of missing data. - If (iand(int(Work(iplus,jcell,4)),1).eq.1) Then - If (iand(int(Work(icell,jcell,3)),1).eq.0) Then - If (GGG4.neqv.GGG2) Goto 9000 - celcnt=celcnt+dld - Goto 1133 - Else If (iand(int(Work(icell,jplus,3)),1).eq.0) Then - If (GGG3.neqv.GGG1) Goto 9000 - celcnt=celcnt+dld - Goto 3311 - End If - Goto 9000 - End If -c Write (*,*) 'Passes missing value test' - -C Determine proper path through cell from side four. - If (GGG2.eqv.GGG3) Then - celcnt=celcnt+dld - If (GGG1.eqv.GGG2) Goto 3311 - Goto 1133 - Else - If (GGG3.eqv.GGG4) Then - celcnt=celcnt+dlx - Goto 2244 - End If - celcnt=celcnt+dld - GGGD=val4.ge.(D1+D2+D3+D4) - If (GGG4.neqv.GGGD) Goto 3311 - Goto 1133 - End If - -C Cross to side 1 and enter new cell from side 3. -1133 kpnt=kpnt+dkpnt - Ipnt(kpnt)=icell+(val-D1)/(D2-D1) - Jpnt(kpnt)=jcell - Work(icell,jcell,1)=ior(Work(icell,jcell,1),cmw) - If (jcell.eq.1) Goto 9000 - -c Check if contour has closed off, advance values for cell bounds indices. -1199 If (clos3) Then - If (icell.eq.istart .and. jcell.eq.jstart) Goto 8999 - End If -c Write (*,*) 'Passes loop test' - jplus=jcell - jcell=jcell-1 - Goto 0103 - -C Cross to side 2 and enter new cell from side 4. -2244 kpnt=kpnt+dkpnt - Ipnt(kpnt)=iplus - Jpnt(kpnt)=jcell+(val-D2)/(D3-D2) - Work(iplus,jcell,2)=ior(Work(iplus,jcell,2),cmw) - If (iplus.eq.nx) Goto 9000 - -c Check if contour has closed off, advance values for cell bounds indices. -2299 If (clos4) Then - If (iplus.eq.istart .and. jcell.eq.jstart) Goto 8999 - End If -c Write (*,*) 'Passes loop test' - icell=iplus - iplus=iplus+1 - Goto 0104 - -C Cross to side 3 and enter new cell from side 1. -3311 kpnt=kpnt+dkpnt - Ipnt(kpnt)=icell+(val-D4)/(D3-D4) - Jpnt(kpnt)=jplus - Work(icell,jplus,1)=ior(Work(icell,jplus,1),cmw) - If (jplus.eq.ny) Goto 9000 - -c Check if contour has closed off, advance values for cell bounds indices. -3399 If (clos1) Then - If (icell.eq.istart .and. jplus.eq.jstart) Goto 8999 - End If -c Write (*,*) 'Passes loop test' - jcell=jplus - jplus=jplus+1 - Goto 0101 - -C Cross to side 4 and enter new cell from side 2. -4422 kpnt=kpnt+dkpnt - Ipnt(kpnt)=icell - Jpnt(kpnt)=jcell+(val-D1)/(D4-D1) - Work(icell,jcell,2)=ior(Work(icell,jcell,2),cmw) - If (icell.eq.1) Goto 9000 - -c Check if contour has closed off, advance values for cell bounds -c indices. -4499 If (clos2) Then - If (icell.eq.istart .and. jcell.eq.jstart) Goto 8999 - End If -c Write (*,*) 'Passes loop test' - iplus=icell - icell=icell-1 - Goto 0102 - -C Finished. -8999 backok=.false. - loop=.false. -9000 If (dkpnt.eq.1) Then - kpnt2=kpnt - Else - kpnt1=kpnt - End If - If (backok) Then - backok=.false. - clos1=.false. - clos2=.false. - clos3=.false. - clos4=.false. - kpnt=0 - dkpnt=-1 - Goto (63,64,61,62) sstart - End If - -c Check if we have anything to draw. - If (kpnt1.eq.kpnt2) Return - -c Sentinel for the contour value. - npoints=npoints+1 - xpoints(npoints) = -99999 - ypoints(npoints) = ConVals(c) - -c Put points into global buffer - Do 9019 k=kpnt1,kpnt2 - npoints=npoints+1 - xpoints(npoints) = IPnt(k) - ypoints(npoints) = JPnt(k) -9019 Continue - - Return - End - - Subroutine Smoothing_B(smoothness,npass) -C Inputs: -C smoothness R*4 Must be >=0. 1.0 is nominal. -C npass I*4 Number of smoothing passes. 0 to 10. - - Implicit None -c declare arguments - Real*4 smoothness - Integer*4 npass -c - Integer*4 npasses - Real*4 wgt1 - Common /SmoothCmnBuf/npasses,wgt1 -Common block `smoothcmn' already initialized by Subroutine Contr1_B() -c Data npasses/0/ - - If (smoothness.lt.0.0) Return - If (npass.lt.0 .or. npass.gt.10) Return - If (smoothness.eq.0.0 .or. npass.eq.0) Then - npasses=0 - Else - npasses=npass - wgt1=smoothness - End If - - Return - End - - Subroutine ZeroItOutBuf(Work,nn) - Implicit None -c declare arguments - Byte Work(*) - Integer*4 nn -c - Integer*4 i - - Do 1 i=1,nn -1 Work(i)=0 - Return - End diff --git a/nativeLib/rary.meteorological/src/frontogen.f b/nativeLib/rary.meteorological/src/frontogen.f deleted file mode 100755 index be82f8c7e6..0000000000 --- a/nativeLib/rary.meteorological/src/frontogen.f +++ /dev/null @@ -1,98 +0,0 @@ -c -c - subroutine frontogen(zmid,ztop,zbot,ptop,pbot,mni,ni,nj,dx,dy,f, - & w1,w2,w3,dtdx,dtdy,qx,qy,fgen) -c -C############################################################################### -C Statement of purpose. -C --------------------- -C This routine computes the QG frontogenesis function through a specified -C pressure layer. -C -C History. -C -------- -C D. Baker 01 Oct 86 Original version based on equations given -C in Barnes (????). -C P. Stamus 30 Aug 89 Second part from Baker's original. -c 20 Sep 89 Add implicit none. -C -C E. Thaler 22 Aug 91 Added 2 coefficient to fgen calculation -C -C Description of input and output. -C -------------------------------- -C On input: -C --------- -c mni Integer First dimension of input array. -C ni, nj Integer Number of points in the x- and y-directions. -C dx, dy Real Array Grid spacing in the x- and y-directions (m). -C f Real Array Coriolis parameter at each grid point (/s). -C zmid Real Array Heights at each grid point for level at which -C q-vector is being computed (m asl). -C ztop Real Array Heights at each grid point for the top of the -C layer, the center of whose heights are given -C in zmid (m asl). -C zbot Real Array Same as ztop except for the bottom of the layer -C (m asl). -C ptop Real Pressure level corresponding to ztop (mb). -C pbot Real Pressure level corresponding to zbot (mb). -C w1-dtdy Real Array Work arrays. -C qx, qy Real Array Work arrays holding the Q-vector components. -C -C On output: -C ---------- -C fgen Real Array Geostrophic frontogenesis function at grid points. -C -C User notes: -C ----------- -C 1. No scaling of the output is done in this routine. -C 2. Units of geostrophic frontogensis function are (K/m)**2 / s -C -C############################################################################### -c - implicit none -c - integer mni, ni, nj - real flag, bad, ptop, pbot -c -c---- Declare input arguments. -c - real dx(mni,nj), dy(mni,nj) - real f(mni,nj), ztop(mni,nj), zbot(mni,nj), zmid(mni,nj) -c -c---- Declare output arguments. -c - real fgen(mni,nj) -c -c---- Declare other parameters and work arrays. -c - parameter(flag = 1.e37) - real w1(mni,nj), w2(mni,nj), w3(mni,nj) - real dtdx(mni,nj), dtdy(mni,nj) - real qx(mni,nj), qy(mni,nj) - integer i,j -c - bad = 1.e6 - 2. -c -c---- Step 1: -c---- Compute the Q-vector components. -c - call qvector(zmid,ztop,zbot,ptop,pbot,mni,ni,nj,dx,dy,f, - & w1,w2,w3,fgen,dtdx,dtdy,qx,qy) - - -c..... Now calculate the QG frontogensis function for this layer. -c..... Fgen = 2(Qx * d(t)/dx + Qy * d(t)/dy) -c - do 1 j=1,nj - do 1 i=1,ni - if(qx(i,j).gt.bad .or. qy(i,j).gt.bad .or. - & dtdx(i,j).gt.bad .or. dtdy(i,j).gt.bad) then - fgen(i,j) = flag - else - fgen(i,j) = 2. * (qx(i,j)*dtdx(i,j) + qy(i,j)*dtdy(i,j)) - endif -1 continue -c - return - end - diff --git a/nativeLib/rary.meteorological/src/frzlev.f b/nativeLib/rary.meteorological/src/frzlev.f deleted file mode 100755 index 6603e5f40b..0000000000 --- a/nativeLib/rary.meteorological/src/frzlev.f +++ /dev/null @@ -1,74 +0,0 @@ - SUBROUTINE FRZLEV(ELEV,P,HT,T,NLVLS,PFRZ,HFRZ) - IMPLICIT NONE - -C Statement of purpose. -C --------------------- -C This routine computes the pressure and height of the freezing level in -C a sounding. -C -C History. -C -------- -C D. Baker 01 Jul 84 Original version. -C -C Description of input and output. -C -------------------------------- -C On input: -C --------- -C ELEV Real Station elevation (m asl). -C P Real Array Sounding pressures (mb). -C HT Real Array Sounding heights (ft asl). -C T Real Array Sounding temperatures (K). -C NLVLS Integer Number of sounding levels passed. -C -C On output: -C ---------- -C PFRZ Real Pressure at the freezing level (mb). -C HFRZ Real Height of the freezing level (m asl). - -C---- Input arguments. - - INTEGER NLVLS - REAL ELEV,P(NLVLS),HT(NLVLS),T(NLVLS) - -C---- Output variables. - - REAL HFRZ,PFRZ - -C---- Internal variables. - - INTEGER I - -C---- External functions. - - REAL INTERP1 - -C---- Subroutine constants. - - REAL TFRZ - PARAMETER (TFRZ=273.15) - - PFRZ=P(1) !scenario 3: no freezing level - HFRZ=0 - -C---- Calculate the freezing level using linear height interpolation. -C---- If the surface temperature is less than or equal to freezing, -C---- assign the surface to the freezing level. - - IF (T(1).NE.TFRZ) THEN - DO I=2,NLVLS - IF ((T(I).LE.TFRZ) .and. (T(I-1).GT.TFRZ) .or. !scenario 1 - 1 (T(I).GE.TFRZ) .and. (T(I-1).LT.TFRZ)) THEN !scenario 2 - HFRZ=INTERP1(HT(I),HT(I-1),T(I),TFRZ,T(I-1)) - PFRZ=INTERP1(P(I),P(I-1),HT(I),HFRZ,HT(I-1)) - GO TO 999 - ENDIF - END DO - ELSE - PFRZ=P(1) - HFRZ=HT(1) - END IF - -C---- Exit. -999 CONTINUE - RETURN - END diff --git a/nativeLib/rary.meteorological/src/fsdiverg.f b/nativeLib/rary.meteorological/src/fsdiverg.f deleted file mode 100755 index 45bafbe964..0000000000 --- a/nativeLib/rary.meteorological/src/fsdiverg.f +++ /dev/null @@ -1,103 +0,0 @@ -c -c - subroutine Fsdiverg(zmid,ztop,zbot,ptop,pbot,mni,ni,nj,dx,dy,f, - & Fsx,Fsy,w1,dtdx,dtdy,qx,qy,Fsdiv) -c -C############################################################################### -C Statement of purpose. -C --------------------- -C This routine computes the divergence of the along-isotherm component -C of the Q-vector for a specified layer in the atmosphere. -C -C History. -C -------- -C E. Thaler original version 3 Sep 91 -C -C Description of input and output. -C -------------------------------- -C On input: -C --------- -c mni Integer First dimension of input array. -C ni, nj Integer Number of points in the x- and y-directions. -C dx, dy Real Array Grid spacing in the x- and y-directions (m). -C f Real Array Coriolis parameter at each grid point (/s). -C ztop Real Array Heights at each grid point for the top of the -C layer (m asl) -C zbot Real Array Same as ztop except for the bottom of the layer -C (m asl). -C ptop Real Pressure level corresponding to ztop (mb). -C pbot Real Pressure level corresponding to zbot (mb). -C zmid Real Array work array for Q-vector calculations -C Fsx-dtdy Real Array Work arrays. -C qx, qy Real Array Work arrays holding the Q-vector components. -C -C On output: -C ---------- -C Fsdiv Real Array Fs vector divergence at the grid points -C (K/m^2/sec) -C -C User notes: -C ----------- -C 1. No scaling of the output is done in this routine. -C -C############################################################################### -c - implicit none -c - integer mni, ni, nj, i, j - real flag, bad, ptop, pbot, tempgrad, piover2 -c -c---- Declare input arguments. -c - real dx(mni,nj), dy(mni,nj) - real f(mni,nj), ztop(mni,nj), zbot(mni,nj), zmid(mni,nj) -c -c---- Declare output arguments. -c - real Fsdiv(mni,nj) -c -c---- Declare other parameters and work arrays. -c - parameter(flag = 1.e37) - real w1(mni,nj), dtdx(mni,nj), dtdy(mni,nj) - real Fsx(mni,nj), Fsy(mni,nj) - real qx(mni,nj), qy(mni,nj) -c - bad = 1.e6 - 2. - piover2 = acos(-1.)/2 -c -c---- Compute the Q-vector components. -c - call qvector(zmid,ztop,zbot,ptop,pbot,mni,ni,nj,dx,dy,f, - & Fsx,Fsy,w1,Fsdiv,dtdx,dtdy,qx,qy) -c -c---- Compute Fs-vectors (component of Q parallel to the temperature -c---- gradient vector) then compute x- and y-components of Fs vectors. -c - do 200 j = 1,nj - do 100 i = 1,ni - If ( (qx(i,j).gt.bad) .or. (qy(i,j).gt.bad) .or. - & (dtdx(i,j).gt.bad) .or. (dtdy(i,j).gt.bad) ) Then - Fsx(i,j) = flag - Fsy(i,j) = flag - Else - tempgrad = dtdx(i,j)**2+dtdy(i,j)**2 - If (tempgrad .lt. 1.e-15) Then - Fsx(i,j) = qx(i,j) - Fsy(i,j) = qy(i,j) - Else - tempgrad = (qx(i,j)*dtdy(i,j) - qy(i,j)*dtdx(i,j))/ - & tempgrad - Fsx(i,j) = dtdy(i,j) *tempgrad - Fsy(i,j) = (-dtdx(i,j))*tempgrad - Endif - Endif - 100 continue - 200 continue -c -c---- Compute the divergence. -c - call G2Gkinematics(Fsx,Fsy,f,dx,dy,mni,nj,ni,nj,2,Fsdiv) -c - return - end diff --git a/nativeLib/rary.meteorological/src/g2gkinematics.f b/nativeLib/rary.meteorological/src/g2gkinematics.f deleted file mode 100755 index bff05cf2a9..0000000000 --- a/nativeLib/rary.meteorological/src/g2gkinematics.f +++ /dev/null @@ -1,548 +0,0 @@ - - Subroutine G2GKinematics(Udx,Vdy, - - Q,SpaX,SpaY,mnx,mny,nx,ny, - - choice,Scalar) - -C Udx(mnx,mny) Real U component or d/dx. -C Vdy(mnx,mny) Real V component or d/dy. -C Q(mnx,mny) Real Array of parameter to advect, etc. (see notes) -C SpaX(mnx,mny) Real Grid spacing in the X direction. -C SpaY(mnx,mny) Real Grid spacing in the Y direction. -C mnx,mny Int Dimensions of input arrays. -C nx,ny Int Dimensions of input grids. -C choice Int Controls type of kinematics parameter to calculate. -C Scalar(mnx,mny) Real Scalar field output (or input to get components). - -C choice=1, vorticity; -C choice=2, divergence, ignore Q; -C choice=3, vorticity advection; -C choice=4, divergence of Q; -C choice=5, advection of Q. -c choice=6, laplacian of Q, ignore U and V. -c choice=7, Scalar is input, ignore Q, work back to d/dx in U and d/dy in V. -c choice=8, Scalar is height, Q is coriolis, work back to Ug and Vg. -c choice=9, Total deformation into scalar. -c choice=10, Deformation components, Scalar is x comp and Q is y comp. -c choice=11, Scalar is height, Q is coriolis, geo def in Udx. -c choice=12, Scalar is height, Q is coriolis, work back to geo def vectors. -c choice=13, Scalar is height, Q is coriolis, input wind components -c changed to Uag and Vag. -c choice=14, Scalar is input, U and V is ridge/trough vector. -c choice=15, Scalar is input, U and V is ridge vector. -c choice=16, Scalar is input, U and V is trough vector. -c choice=17, U and V is input, Scalar is vector continuity. - -C Note for options one and three: -C To work with relative vorticity, fill first level of array Q with zeroes. -C For absolute vorticity, fill first level of Q with coriolis parameter -C values. - - Implicit None - - Integer*4 mnx,mny,nx,ny,choice,im,ip,jm,jp,i,j,ii,jj - - Real*4 Udx(mnx,mny),Vdy(mnx,mny), - - Q(mnx,mny),SpaX(mnx,mny),SpaY(mnx,mny), - - Scalar(mnx,mny), - - g,qqq,www,dsh,dst,r1,r2,r3,r4,ttt,sss - - Real*4 Flag,Flg -c Common/FlagFlg/Flag,Flg - Data Flag,Flg/1e37,1e36/ - Data g/9.806/ - -c Check validity of input parameters. - If (choice.lt.1 .or. choice.gt.17) Then - Write (*,*) 'Invalid choice ',choice,' in g2gkinematics.' - Return - EndIf - If (nx.lt.3 .or. nx.gt.mnx .or. ny.lt.3 .or. ny.gt.mny) Then - Write (*,*) 'Invalid dimensions ',choice,' in g2gkinematics.' - Return - EndIf - -c Flag out boundaries. - If (choice.le.6 .or. choice.eq.9 .or. - & choice.eq.10 .or. choice.eq.17) Then - Do 11 i=1,nx -11 Scalar(i,1)=Flag - Do 12 j=2,ny-1 - Scalar(1,j)=Flag -12 Scalar(nx,j)=Flag - Do 13 i=1,nx -13 Scalar(i,ny)=Flag - Else - Do 21 i=1,nx -21 Udx(i,1)=Flag - Do 22 j=2,ny-1 - Udx(1,j)=Flag -22 Udx(nx,j)=Flag - Do 23 i=1,nx -23 Udx(i,ny)=Flag - Do 31 i=1,nx -31 Vdy(i,1)=Flag - Do 32 j=2,ny-1 - Vdy(1,j)=Flag -32 Vdy(nx,j)=Flag - Do 33 i=1,nx -33 Vdy(i,ny)=Flag - End If - -c Branch to loop for choice of operation. - Goto (1000,2000,3000,4000,5000,6000,7000,8000,9000,10000, - & 11000,12000,13000,14000,14000,14000,17000) choice - -c Vorticity. -1000 jm=1 - j=2 - Do 1091 jp=3,ny - im=1 - i=2 - Do 1090 ip=3,nx - If (Udx(i,jm).gt.Flg .or. Udx(i,jp).gt.Flg .or. - - Vdy(im,j).gt.Flg .or. Vdy(ip,j).gt.Flg) Then - Scalar(i,j)=Flag - Else - Scalar(i,j)=( (Vdy(ip,j)-Vdy(im,j))/SpaX(i,j)+ - - (Udx(i,jm)-Udx(i,jp))/SpaY(i,j) )/2 - - + Q(i,j) - End If - im=i - i=ip -1090 Continue - jm=j - j=jp -1091 Continue - Return - -c Divergence. -2000 jm=1 - j=2 - Do 2091 jp=3,ny - im=1 - i=2 - Do 2090 ip=3,nx - If (Vdy(i,jm).gt.Flg .or. Vdy(i,jp).gt.Flg .or. - - Udx(im,j).gt.Flg .or. Udx(ip,j).gt.Flg) Then - Scalar(i,j)=Flag - Else - Scalar(i,j)=((Udx(ip,j)-Udx(im,j))/SpaX(i,j)+ - - (Vdy(i,jp)-Vdy(i,jm))/SpaY(i,j))/2 - End If - im=i - i=ip -2090 Continue - jm=j - j=jp -2091 Continue - Return - -c Vorticity advection. -3000 jm=1 - j=2 - Do 3091 jp=3,ny - im=1 - i=2 - Do 3090 ip=3,nx - If (Udx(im,jm).gt.Flg .or. Udx(im,jp).gt.Flg .or. - - Udx(ip,jm).gt.Flg .or. Udx(ip,jp).gt.Flg .or. - - Vdy(im,jm).gt.Flg .or. Vdy(im,jp).gt.Flg .or. - - Vdy(ip,jm).gt.Flg .or. Vdy(ip,jp).gt.Flg .or. - - Vdy(im,j).gt.Flg .or. Vdy(ip,j).gt.Flg .or. - - Udx(i,jm).gt.Flg .or. Udx(i,jp).gt.Flg .or. - - Udx(i,j).gt.Flg .or. Vdy(i,j).gt.Flg) Then - Scalar(i,j)=Flag - Else - Scalar(i,j)=( Udx(i,j)* - - ( (Udx(ip,jp)+Udx(im,jm)-Udx(im,jp)-Udx(ip,jm))/4 - - -Vdy(ip,j)-Vdy(im,j)+Vdy(i,j)+Vdy(i,j) ) - - - Vdy(i,j)* - - ( (Vdy(ip,jp)+Vdy(im,jm)-Vdy(im,jp)-Vdy(ip,jm))/4 - - -Udx(i,jp)-Udx(i,jm)+Udx(i,j)+Udx(i,j) ) - - ) /(SpaX(i,j)*SpaY(i,j)) - - + (Udx(i,j)*(Q(im,j)-Q(ip,j))/SpaX(i,j)+ - - Vdy(i,j)*(Q(i,jm)-Q(i,jp))/SpaY(i,j))/2 - End If - im=i - i=ip -3090 Continue - jm=j - j=jp -3091 Continue - Return - -c Divergence of Q. -4000 jm=1 - j=2 - Do 4091 jp=3,ny - im=1 - i=2 - Do 4090 ip=3,nx - If (Vdy(i,jm).gt.Flg .or. Vdy(i,jp).gt.Flg .or. - - Udx(im,j).gt.Flg .or. Udx(ip,j).gt.Flg .or. - - Q(i,jm).gt.Flg .or. Q(i,jp).gt.Flg .or. - - Q(im,j).gt.Flg .or. Q(ip,j).gt.Flg) Then - Scalar(i,j)=Flag - Else - Scalar(i,j)=((Q(ip,j)*Udx(ip,j)-Q(im,j)*Udx(im,j)) - - /SpaX(i,j)+ - - (Q(i,jp)*Vdy(i,jp)-Q(i,jm)*Vdy(i,jm)) - - /SpaY(i,j))/2 - End If - im=i - i=ip -4090 Continue - jm=j - j=jp -4091 Continue - Return - -c Advection of Q. -5000 jm=1 - j=2 - Do 5091 jp=3,ny - im=1 - i=2 - Do 5090 ip=3,nx - If (Q(im,j).gt.Flg .or. Q(ip,j).gt.Flg .or. - - Q(i,jm).gt.Flg .or. Q(i,jp).gt.Flg .or. - - Udx(i,j).gt.Flg .or. Vdy(i,j).gt.Flg) Then - Scalar(i,j)=Flag - Else - Scalar(i,j)=(Udx(i,j)*(Q(im,j)-Q(ip,j))/SpaX(i,j)+ - - Vdy(i,j)*(Q(i,jm)-Q(i,jp))/SpaY(i,j))/2 - End If - - im=i - i=ip -5090 Continue - jm=j - j=jp -5091 Continue - Return - -c Laplacian of Q. -6000 jm=1 - j=2 - Do 6091 jp=3,ny - im=1 - i=2 - Do 6090 ip=3,nx - If (Q(im,j).gt.Flg .or. Q(ip,j).gt.Flg .or. Q(i,j).gt.Flg .or. - - Q(i,jm).gt.Flg .or. Q(i,jp).gt.Flg) Then - Scalar(i,j)=Flag - Else - qqq=Q(i,j)+Q(i,j) - Scalar(i,j)=(Q(im,j)+Q(ip,j)-qqq)/(SpaX(i,j)*SpaX(i,j)) + - - (Q(i,jm)+Q(i,jp)-qqq)/(SpaY(i,j)*SpaY(i,j)) - End If - im=i - i=ip -6090 Continue - jm=j - j=jp -6091 Continue - Return - -c d/dy and d/dx of scalar. -7000 jm=1 - j=2 - Do 7091 jp=3,ny - im=1 - i=2 - Do 7090 ip=3,nx - If (Scalar(im,j).gt.Flg .or. Scalar(ip,j).gt.Flg .or. - - Scalar(i,jm).gt.Flg .or. Scalar(i,jp).gt.Flg) Then - Udx(i,j)=Flag - Vdy(i,j)=Flag - Else - Udx(i,j)=(Scalar(ip,j)-Scalar(im,j))/(2*SpaX(i,j)) - Vdy(i,j)=(Scalar(i,jp)-Scalar(i,jm))/(2*SpaY(i,j)) - End If - im=i - i=ip -7090 Continue - jm=j - j=jp -7091 Continue - Return - -c Ug and Vg where scalar contains height. -8000 jm=1 - j=2 - Do 8091 jp=3,ny - im=1 - i=2 - Do 8090 ip=3,nx - If (Scalar(im,j).gt.Flg .or. Scalar(ip,j).gt.Flg .or. - - Scalar(i,jm).gt.Flg .or. Scalar(i,jp).gt.Flg) Then - Udx(i,j)=Flag - Vdy(i,j)=Flag - Else - Udx(i,j)=g*(Scalar(i,jm)-Scalar(i,jp))/(2*SpaY(i,j)*Q(i,j)) - Vdy(i,j)=g*(Scalar(ip,j)-Scalar(im,j))/(2*SpaX(i,j)*Q(i,j)) - End If - im=i - i=ip -8090 Continue - jm=j - j=jp -8091 Continue - Return - -c Deformation. -9000 jm=1 - j=2 - Do 9091 jp=3,ny - im=1 - i=2 - Do 9090 ip=3,nx - If (Vdy(i,jm).gt.Flg .or. Vdy(i,jp).gt.Flg .or. - - Udx(i,jm).gt.Flg .or. Udx(i,jp).gt.Flg .or. - - Vdy(im,j).gt.Flg .or. Vdy(ip,j).gt.Flg .or. - - Udx(im,j).gt.Flg .or. Udx(ip,j).gt.Flg) Then - Scalar(i,j)=Flag - Q(i,j)=Flag - Else - qqq=0.5/SpaX(i,j) - www=0.5/SpaY(i,j) - dst=(Udx(ip,j)-Udx(im,j))*qqq+(Vdy(i,jm)-Vdy(i,jp))*www - dsh=(Udx(i,jp)-Udx(i,jm))*qqq+(Vdy(ip,j)-Vdy(im,j))*www - Scalar(i,j)=sqrt(dst*dst+dsh*dsh) - End If - im=i - i=ip -9090 Continue - jm=j - j=jp -9091 Continue - Return - -c Deformation components. -10000 jm=1 - j=2 - Do 10091 jp=3,ny - im=1 - i=2 - Do 10090 ip=3,nx - If (Vdy(i,jm).gt.Flg .or. Vdy(i,jp).gt.Flg .or. - - Udx(i,jm).gt.Flg .or. Udx(i,jp).gt.Flg .or. - - Vdy(im,j).gt.Flg .or. Vdy(ip,j).gt.Flg .or. - - Udx(im,j).gt.Flg .or. Udx(ip,j).gt.Flg) Then - Scalar(i,j)=Flag - Q(i,j)=Flag - Else - qqq=0.5/SpaX(i,j) - www=0.5/SpaY(i,j) - dst=(Udx(ip,j)-Udx(im,j))*qqq+(Vdy(i,jm)-Vdy(i,jp))*www - dsh=(Udx(i,jp)-Udx(i,jm))*qqq+(Vdy(ip,j)-Vdy(im,j))*www - qqq=dst*dst+dsh*dsh - www=sqrt(qqq) - Scalar(i,j)=sqrt((qqq+www*dst)/2) - If (Scalar(i,j).ne.0.0) Then - Q(i,j)=www*dsh/(2*Scalar(i,j)) - Else - Q(i,j)=www - End If - End If - im=i - i=ip -10090 Continue - jm=j - j=jp -10091 Continue - Return - -c Geostrophic deformation. -11000 jm=1 - j=2 - Do 11091 jp=3,ny - im=1 - i=2 - Do 11090 ip=3,nx - If (Scalar(im,jm).gt.Flg .or. Scalar(im,j).gt.Flg .or. - - Scalar(im,jp).gt.Flg .or. Scalar(i,jm).gt.Flg .or. - - Scalar(i,j).gt.Flg .or. Scalar(i,jp).gt.Flg .or. - - Scalar(ip,jm).gt.Flg .or. Scalar(ip,j).gt.Flg .or. - - Scalar(ip,jp).gt.Flg) Then - Udx(i,j)=Flag - Vdy(i,j)=Flag - Else - dst=(Scalar(ip,jm)+Scalar(ip,jm)- - - Scalar(ip,jp)-Scalar(im,jm))/(2*SpaX(i,j)*SpaY(i,j)) - www=Scalar(i,j)+Scalar(i,j) - dsh=( (Scalar(i,jp)+Scalar(i,jm)-www)/(SpaY(i,j)*SpaY(i,j)) - - - (Scalar(ip,j)+Scalar(im,j)-www)/(SpaX(i,j)*SpaX(i,j)) ) - Udx(i,j)=g*sqrt(dst*dst+dsh*dsh)/Q(i,j) - End If - im=i - i=ip -11090 Continue - jm=j - j=jp -11091 Continue - Return - -c Geostrophic deformation components. -12000 jm=1 - j=2 - Do 12091 jp=3,ny - im=1 - i=2 - Do 12090 ip=3,nx - If (Scalar(im,jm).gt.Flg .or. Scalar(im,j).gt.Flg .or. - - Scalar(im,jp).gt.Flg .or. Scalar(i,jm).gt.Flg .or. - - Scalar(i,j).gt.Flg .or. Scalar(i,jp).gt.Flg .or. - - Scalar(ip,jm).gt.Flg .or. Scalar(ip,j).gt.Flg .or. - - Scalar(ip,jp).gt.Flg) Then - Udx(i,j)=Flag - Vdy(i,j)=Flag - Else - dst=g*(Scalar(ip,jm)+Scalar(ip,jm)- - - Scalar(ip,jp)-Scalar(im,jm))/ - - (2*Q(i,j)*SpaX(i,j)*SpaY(i,j)) - www=Scalar(i,j)+Scalar(i,j) - dsh=(g/Q(i,j))* - - ( (Scalar(i,jp)+Scalar(i,jm)-www)/(SpaY(i,j)*SpaY(i,j)) - - - (Scalar(ip,j)+Scalar(im,j)-www)/(SpaX(i,j)*SpaX(i,j)) ) - qqq=dst*dst+dsh*dsh - www=sqrt(qqq) - Udx(i,j)=sqrt((qqq+www*dst)/2) - If (Udx(i,j).ne.0.0) Then - Vdy(i,j)=www*dsh/(2*Scalar(i,j)) - Else - Vdy(i,j)=www - End If - End If - im=i - i=ip -12090 Continue - jm=j - j=jp -12091 Continue - Return - -c Uag and Vag where scalar contains height. -13000 jm=1 - j=2 - Do 13091 jp=3,ny - im=1 - i=2 - Do 13090 ip=3,nx - If (Scalar(im,j).gt.Flg .or. Scalar(ip,j).gt.Flg .or. - - Scalar(i,jm).gt.Flg .or. Scalar(i,jp).gt.Flg) Then - Udx(i,j)=Flag - Vdy(i,j)=Flag - Else - If (Udx(i,j).lt.Flg) Udx(i,j)=Udx(i,j)- - - g*(Scalar(i,jm)-Scalar(i,jp))/(2*SpaY(i,j)*Q(i,j)) - If (Vdy(i,j).lt.Flg) Vdy(i,j)=Vdy(i,j)- - - g*(Scalar(ip,j)-Scalar(im,j))/(2*SpaX(i,j)*Q(i,j)) - End If - im=i - i=ip -13090 Continue - jm=j - j=jp -13091 Continue - Return - -c Ridge/trough vector. -14000 Continue - jm=1 - j=2 - Do 14091 jp=3,ny - im=1 - i=2 - Do 14090 ip=3,nx - If (Scalar(i,jm).gt.Flg .or. Scalar(i,jp).gt.Flg .or. - - Scalar(im,jm).gt.Flg .or. Scalar(ip,jp).gt.Flg .or. - - Scalar(im,jp).gt.Flg .or. Scalar(im,jp).gt.Flg .or. - - Scalar(im,j).gt.Flg .or. Scalar(ip,j).gt.Flg .or. - - Scalar(i,j).gt.Flg) Then - Udx(i,j)=Flag - Vdy(i,j)=Flag - Else - ttt=Scalar(im,jp)+Scalar(i,jp)+Scalar(ip,jp)+ - & Scalar(im,j)-2*Scalar(i,j)+Scalar(ip,j)+ - & Scalar(im,jm)+Scalar(i,jm)+Scalar(ip,jm) - www=ttt+ Scalar(i,jp)+ - & Scalar(im,j)-4*Scalar(i,j)+Scalar(ip,j)+ - & Scalar(i,jm) - r1 = ttt-3*(Scalar(im,j)+Scalar(ip,j)) - r2 = www-3*(Scalar(im,jm)+Scalar(ip,jp)) - r3 = ttt-3*(Scalar(i,jm)+Scalar(i,jp)) - r4 = www-3*(Scalar(im,jp)+Scalar(ip,jm)) - dst = r1*r1-r3*r3 - dsh = (r2*r2-r4*r4)*0.707 - sss = 1 - If (abs(dst).gt.abs(dsh)) Then - If (dst.gt.0 .and. r1.gt.0 .or. - & dst.lt.0 .and. r3.gt.0) sss = -1 - Else - If (dsh.gt.0 .and. r2.gt.0 .or. - & dsh.lt.0 .and. r4.gt.0) sss = -1 - End If - If (choice.eq.16) sss=-sss - If (choice.gt.14 .and. sss.lt.0) Then - Vdy(i,j)=0 - Udx(i,j)=0 - Goto 14089 - End If - ttt=1/(SpaX(i,j)*SpaY(i,j)) - If (dst.lt.0) Then - dst = -(sqrt(-dst)*ttt) - Else - dst = sqrt( dst)*ttt - End If - If (dsh.lt.0) Then - dsh = -(sqrt(-dsh)*ttt) - Else - dsh = sqrt( dsh)*ttt - End If - qqq=dst*dst+dsh*dsh - www=sqrt(qqq) - ttt=sqrt((qqq+www*dst)/2) - Udx(i,j)=sss*ttt - If (ttt.ne.0.0) Then - Vdy(i,j)=sss*www*dsh/(2*ttt) - Else - Vdy(i,j)=sss*www - End If - End If -14089 Continue - im=i - i=ip -14090 Continue - jm=j - j=jp -14091 Continue - Return - -c Vector continuity. -17000 Continue - jm=1 - j=2 - Do 17091 jp=3,ny - im=1 - i=2 - Do 17090 ip=3,nx - Scalar(i,j)=Flag - If (Udx(i,j).gt.Flg .or. Vdy(i,j).gt.Flg) Goto 17089 - Do 17085 jj=jm,jp - Do 17085 ii=im,ip - If (ii.eq.i .and. jj.eq.j) Goto 17085 - If (Udx(ii,jj).gt.Flg .or. Vdy(ii,jj).gt.Flg) Goto 17085 - www = abs(Udx(i,j)*Udx(ii,jj)+Vdy(i,j)*Vdy(ii,jj)) - If (Scalar(i,j).gt.Flg .or. www.gt.Scalar(i,j)) Scalar(i,j)=www -17085 Continue - If (Scalar(i,j).lt.Flg) Scalar(i,j)=sqrt(Scalar(i,j)) -17089 Continue - im=i - i=ip -17090 Continue - jm=j - j=jp -17091 Continue - - End diff --git a/nativeLib/rary.meteorological/src/gusts.f b/nativeLib/rary.meteorological/src/gusts.f deleted file mode 100755 index 8a5921d4d1..0000000000 --- a/nativeLib/rary.meteorological/src/gusts.f +++ /dev/null @@ -1,89 +0,0 @@ - subroutine gusts(p,t,td,np,gstpot) - implicit none -C############################################################################### -C Statement of purpose. -C --------------------- -C Determine the convective gust potential, after Western region technical -C attachment 76-14 (June, 1976). -C -C History. -C -------- -C D. Baker 25 Mar 87 Original version. -C -C Description of input and output. -C -------------------------------- -C On input: -C --------- . . -C -C On output: -C ---------- . . -C -C############################################################################### -C Input arguments. - integer np - real p(np),t(np),td(np) -C Output argument. - integer gstpot -C Local variables. - real t700,td700,dd700,dd500,t500,td500,t400,t300,tp400,tp300, - & tcb,pcb,plift,ui,thdpar,eptpar,etpar,plev1,plev2 - integer i,ier,flag,g,gstsave -C Local constants. - parameter (flag=99999) -C External functions. -C real tlcl,pcon - real temp_of_te -C Make sure calculation is possible. - gstpot=flag - gstsave=0 - if (p(1).lt.700. .or. p(np).gt.300.) go to 9999 -C Compute the 700 mb dew point depression. - call pvalue(700.,p,np,t,t700) - call pvalue(700.,p,np,td,td700) - dd700=t700-td700 -C Loop from 470 to 530 mb every 5 mb and choose the largest convective -C gust potential. - do 150 i=470,530,5 - plift=float(i) - call pvalue(plift,p,np,t,t500) - call pvalue(plift,p,np,td,td500) - dd500=t500-td500 - plev1=plift-100. - plev2=plift-200. -C Compute the LCL of the 500 mb parcel. -C tcb=tlcl(t500,td500) -C pcb=pcon(plift,t500,tcb) - call tplcl(t500,td500,plift,tcb,pcb,ier) -C Compute the dry and moist adiabats through the LCL of the 500 mb parcel. - call deftrk(tcb,pcb,thdpar,eptpar) -C Compute the parcel temperature at 400 mb. - if (pcb.lt.plev1) then - tp400=thdpar*((plev1/1000.0)**0.286) - else - etpar=eptpar*((plev1/1000.0)**0.286) - tp400=temp_of_te(etpar,plev1) - end if -C Compute the environmental temperature at 400 mb. - call pvalue(plev1,p,np,t,t400) -C Compute the parcel temperature at 300 mb. - if (pcb.lt.plev2) then - tp300=thdpar*((plev2/1000.0)**0.286) - else - etpar=eptpar*((plev2/1000.0)**0.286) - tp300=temp_of_te(etpar,plev2) - end if -C Compute the environmental temperature at 300 mb. - call pvalue(plev2,p,np,t,t300) -C Compute the ui index. - ui=(t400-tp400)+(t300-tp300) -C Type *,'plift,dd700,tcb,pcb,tpar,epar,t400,tp400,t300,tp300,ui:' -C *,plift,dd700,tcb,pcb,thdpar,eptpar,t400,tp400,t300,tp300,ui -C Compute the gust potential. - call cvgust(dd700,ui,g) -C Save the largest value. - if (g.gt.gstsave) gstpot=g - gstsave=g -150 continue -C Return to calling program. - return -9999 end diff --git a/nativeLib/rary.meteorological/src/hailsiz.f b/nativeLib/rary.meteorological/src/hailsiz.f deleted file mode 100755 index ef29fc0f12..0000000000 --- a/nativeLib/rary.meteorological/src/hailsiz.f +++ /dev/null @@ -1,59 +0,0 @@ - SUBROUTINE HAILSIZ(VVMAX,HSIZE) - IMPLICIT NONE -C -C Statement of purpose. -C --------------------- -C This subroutine computes the largest hailstone that can be supported -C by the undiluted parcel updraft. -C -C History. -C -------- -C Don Baker 28 Jun 85 Original version based on the equation given -C in the article in the BAMS, Vol. 62, No. 11, -C November 1981 concerning the Ft. Collins, CO -C hailstorm of 30 Jul 79. -C -C Dale Perry Sep 96 Adapted code to work on WFO -C -C Description of input and output. -C -------------------------------- -C On input: -C --------- -C VVMAX Real Maximum undiluted parcel vertical velocity. -C -C On output: -C ---------- -C HSIZE Real The diameter of the maximum size hailstone that -C could be supported by the parcel updraft (cm). -C User notes: -C ----------- -C 1) Hail is assumed to be a spherical object of density 90% that of water. -C 2) The hail size is the size of an object of above density that has a -C terminal velocity equal to the maximum vertical velocity. This is -C the size of hail aloft and is usually an exaggeration of the actual -C hail size expected at the ground. -C 3) The air density below was computed for a temperature of 22 deg celsius -C at a pressure of 850 mb (parameter RHOAIR). -C -C -C Input arguments. -C - REAL VVMAX -C -C Output arguments. -C - REAL HSIZE -C -C Subroutine constants. -C - REAL DRAG,RHOICE,RHOAIR,GE - PARAMETER (DRAG=0.55,RHOICE=900.,RHOAIR=1.0033,GE=9.8) -C -C Compute hail size by solving the terminal velocity equation (diameter). -C - HSIZE=2*((3*DRAG*RHOAIR*(VVMAX*VVMAX))/(8*GE*RHOICE))*100 -C -C Exit. -C - RETURN - END diff --git a/nativeLib/rary.meteorological/src/heliComp.c b/nativeLib/rary.meteorological/src/heliComp.c deleted file mode 100755 index 0dcec16b20..0000000000 --- a/nativeLib/rary.meteorological/src/heliComp.c +++ /dev/null @@ -1,81 +0,0 @@ - -#include -#include -#include -#include "meteoLib.h" - -void heliComp(const float ** u, const float ** v, float * umot, float * vmot, - int mnx, int nx, int ny, int nz, - float * heli) - { - - const float *u1, *v1, *u2, *v2; - float *eptr, *hptr; - int k,nn,n2,dd,i,nxm; - - dd = mnx-nx; - nn = mnx*ny-dd; - n2 = nx*ny; - nxm = nx-1; - - // Zero our destination array. - hptr = heli; - eptr = heli+nn; - while (hptr1e36 || *vmot>1e36 || - *u1>1e36 || *v1>1e36 || *u2>1e36 || *v2>1e36) continue; - *hptr = (*v2-*v1)*(*umot)+(*u1-*u2)*(*vmot); - } - - // Now add in the contribution from the shear with the low level winds. - for (k=1; k1e36 || - *u1>1e36 || *v1>1e36 || *u2>1e36 || *v2>1e36) continue; - *hptr += (*u2)*(*v1)-(*u1)*(*v2); - } - } - - } diff --git a/nativeLib/rary.meteorological/src/helicity.f b/nativeLib/rary.meteorological/src/helicity.f deleted file mode 100755 index b92549e98a..0000000000 --- a/nativeLib/rary.meteorological/src/helicity.f +++ /dev/null @@ -1,89 +0,0 @@ - Subroutine calchelicity(HW,PW,UW,VW,NW,elev,ztop,ghx,ghy, - * diravg,spdavg,stmdir,stmspdkts,helicity,SRHel) - IMPLICIT NONE - -C Statement of purpose. -C --------------------- -C This subroutine calculates the storm relative helicity from -C the surfce to 3000 meters above ground level. Code lifted -C from the original FORTRAN code routine 'generate.for'. -C -C History. -C -------- -C D. Perry 27 Feb 97 'Original' version. -C -C Description of input and output. -C -------------------------------- -C On input: -C --------- -C HW Real Array Wind level heights (m asl). -C PW Real Array Wind level pressures (mb). -C UW Real Array Wind level u-components (m/s). -C VW Real Array Wind level v-components (m/s). -C NW Integer Number of wind levels passed. -C ELEV Real Station elevation (m agl). -C ztop Real Top of desired helicity layer (m agl). -C diravg Real 0-6km avg wind direction (deg). -C spdavg Real 0-6km avg wind speed (m/s). -C -C On output: -C stmdir Real 0-6km Storm Motion Dir (30 deg to right of diravg) -C stmspdkts Real 0-6km Storm Motion Spd (75% of spdavg) -C SRHel Real Storm Relative Helicity (m2/s2). -C ---------- - -C---- Input arguments. - - Integer NW - Real*4 elev,ztop,HW(NW),PW(NW),UW(NW),VW(NW),diravg,spdavg - -C---- Output arguments. - - Real*4 SRHel,helicity,ghx,ghy,stmdir,stmspdkts,stmspdms - -C---- Internal variables. - - Real*4 Utop,Vtop - Real*4 Ustorm,Vstorm - Real*4 wgt1,wgt2 - Integer topidx,i - -C---- Subroutine constants. - - Real*4 FLAG,M2KTS - PARAMETER (FLAG=99999.,M2KTS=1.94254) - -C---- Initialize output mean wind value to FLAG. - - helicity=FLAG - SRHel=FLAG - -C---- Calculate helicity. - Do 1004 topidx=2,NW-1 -1004 If (HW(topidx)-elev.ge.ztop) Goto 1005 -1005 If (HW(topidx)-elev.lt.ztop) Goto 9999 - topidx=topidx-1 - wgt2=(ztop+elev-HW(topidx))/(HW(topidx+1)-HW(topidx)) - wgt1=1.0-wgt2 - Utop=UW(topidx)*wgt1+UW(topidx+1)*wgt2 - Vtop=VW(topidx)*wgt1+VW(topidx+1)*wgt2 - helicity=0.0 - Do 1010 i=1,topidx-1 -1010 helicity=helicity-UW(i)*VW(i+1)+UW(i+1)*VW(i) - helicity=helicity-UW(topidx)*Vtop+Utop*VW(topidx) - ghx=Vtop-VW(1) - ghy=-Utop+UW(1) - -C---- Calculate default storm wind using previously calculated -C 0-6 km density-weighted average wind. - stmdir= diravg + 30.0 - if (stmdir.gt.360.) stmdir = stmdir-360.0 -C use storm spd (kts) for display output -C use storm spd (m/s) for helicity calculation - stmspdkts = (spdavg*M2KTS)*0.75 - stmspdms = spdavg*0.75 - call uvcomp(stmdir,stmspdms,Ustorm,Vstorm,1) - - SRHel=helicity+ghx*Ustorm+ghy*Vstorm -9999 return - End diff --git a/nativeLib/rary.meteorological/src/hgt2pres.f b/nativeLib/rary.meteorological/src/hgt2pres.f deleted file mode 100755 index 75cc2e3c1b..0000000000 --- a/nativeLib/rary.meteorological/src/hgt2pres.f +++ /dev/null @@ -1,35 +0,0 @@ -c -c - subroutine hgt2pres(z,p,mni,ni,nj) -c -c..... Routine to calculate pressure from height based on a standard -c..... atmosphere -c -c - implicit none - integer mni, ni, nj, i, j - real flag, bad - parameter(flag = 1.e37) - real z(mni,nj), p(mni,nj) - - Real*4 T0,gamma,p0,p11,z11,c1,c2 - - Data T0,gamma,p0/288.,.0065,1013.2/ - Data c1,c2/5.256,14600./ - Data z11,p11/11000.,226.0971/ - -c - bad = 1.e6 - 2. - do 1 j=1,nj - do 1 i=1,ni - if(z(i,j) .gt. bad) then - p(i,j) = flag - else if (z(i,j).lt.z11) then - p(i,j)=p0*((T0-gamma*z(i,j))/T0)**c1 - else - p(i,j) = p11*10.**((z11-z(i,j))/c2) - endif -1 continue -c - return - end diff --git a/nativeLib/rary.meteorological/src/interp.c b/nativeLib/rary.meteorological/src/interp.c deleted file mode 100755 index ac530c6d8b..0000000000 --- a/nativeLib/rary.meteorological/src/interp.c +++ /dev/null @@ -1,15 +0,0 @@ -#include "meteoLib.h" -/*************************************************************************** -* interp the data -* input : p1, p2, temp1, temp2, td1, td2, levelP -* output : interT, interTd -* Harry Chen -***************************************************************************/ -void FTN_MANGLE (interp) ( float p1, float p2, float temp1, - float temp2, float td1, float td2, - float levelP, float * interT, float * interTd ) - { - *interT = temp1 + ( ( temp2 - temp1 ) * ( levelP - p1 ) / ( p2 - p1 ) ); - *interTd = td1 + ( ( td2 - td1 ) * ( levelP - p1 ) / ( p2 - p1 ) ); - return; - } diff --git a/nativeLib/rary.meteorological/src/interp1.f b/nativeLib/rary.meteorological/src/interp1.f deleted file mode 100755 index c52a5abd25..0000000000 --- a/nativeLib/rary.meteorological/src/interp1.f +++ /dev/null @@ -1,10 +0,0 @@ -C---- Given Y1 AT X1, Y3 AT X3, and X2, calculate Y2 (INTERP) AT X2. - - REAL FUNCTION INTERP1(Y1,Y3,X1,X2,X3) - IMPLICIT NONE - REAL Y1,Y3,X1,X2,X3,D - D=X3-X1 - IF (D.EQ.0) D=0.01 - INTERP1=Y1+((Y3-Y1)*((X2-X1)/(D))) - RETURN - END diff --git a/nativeLib/rary.meteorological/src/intpos.f b/nativeLib/rary.meteorological/src/intpos.f deleted file mode 100755 index 3127facc1a..0000000000 --- a/nativeLib/rary.meteorological/src/intpos.f +++ /dev/null @@ -1,99 +0,0 @@ - SUBROUTINE INTPOS(VDIF,HT,P,T,NLVLS) - IMPLICIT NONE -C -C Statement of purpose. -C --------------------- -C This subroutine interpolates data between the level of free convection -C and the equilibrium level to a finer resolution for the computation -C of positive energy. -C -C History. -C -------- -C Don Baker 15 Jun 85 Original version. -C -C Description of input and output. -C -------------------------------- -C On input -C -------- -C VDIF Real Minimum thickness between output levels. -C -C On input/output -C --------------- -C HT Real Array Parcel level heights between LFC and EL (m asl). -C P Real Array Parcel level pressures between LFC and EL (mb). -C T Real Array Parcel level sounding temperatures between -C LFC and EL (C). -C NLVLS Integer Number of parcel levels between the LFC and EL. -C -C User notes: -C ----------- -C 1) This routine is called internally by SUBROUTINE POSAREA. It's -C intent is to give more data to work with when computing the positive -C area. The resolution (VDIF) is set to be 1/25th of the thickness -C between the LFC and EL. -C -C -C Input arguments. -C - REAL VDIF -C -C Input/output arguments. -C - REAL HT(1),P(1),T(1) - INTEGER NLVLS -C -C Internal variables. -C - INTEGER I,J,K - REAL ZDIF -C -C External functions. -C - REAL INTERP1 -C -C Perform interpolation in height to specified minumum height resolution. -C - J=2 - 50 DO 100 I=J,NLVLS - ZDIF=HT(I)-HT(I-1) - IF (ZDIF.GT.VDIF) THEN - NLVLS=NLVLS+1 - DO 200 K=NLVLS,I+1,-1 - HT(K)=HT(K-1) - T(K)=T(K-1) - P(K)=P(K-1) - 200 CONTINUE - HT(I)=0.5*(HT(I+1)+HT(I-1)) - P(I)=INTERP1(P(I+1),P(I-1),HT(I+1),HT(I),HT(I-1)) - T(I)=INTERP1(T(I+1),T(I-1),HT(I+1),HT(I),HT(I-1)) - J=I - GO TO 50 - ENDIF - 100 CONTINUE -C -C Exit to calling program. -C - RETURN - END - -C IF (MAXZ.GT.CHECK) THEN -C J=2 -C 50 DO 100 I=J,NLVLS -C ZDIF=HT(I)-HT(I-1) -C IF (ZDIF.GT.MAXZ) THEN -C NLVLS=NLVLS+1 -C DO 200 K=NLVLS,I+1,-1 -C HT(K)=HT(K-1) -C T(K)=T(K-1) -C TD(K)=TD(K-1) -C P(K)=P(K-1) -C 200 CONTINUE -C HT(I)=0.5*(HT(I+1)+HT(I-1)) -C P(I)=INTERP1(P(I+1),P(I-1),HT(I+1),HT(I),HT(I-1)) -C T(I)=INTERP1(T(I+1),T(I-1),HT(I+1),HT(I),HT(I-1)) -C TD(I)=INTERP1(TD(I+1),TD(I-1),HT(I+1),HT(I),HT(I-1)) -C J=I -C GO TO 50 -C ENDIF -C 100 CONTINUE -C ENDIF diff --git a/nativeLib/rary.meteorological/src/isenstable.f b/nativeLib/rary.meteorological/src/isenstable.f deleted file mode 100755 index 6cd8d0f088..0000000000 --- a/nativeLib/rary.meteorological/src/isenstable.f +++ /dev/null @@ -1,60 +0,0 @@ -c -c - subroutine isen_stability(p_up,p_low,o_up,o_low,stab,mni,ni,nj) -c -c............................................................................... -c -c Routine to calculate the isentropic stability through a layer. -c -c Changes: -c P.A. Stamus 01-30-90 Original -c -c Inputs/Outputs: -c -c Variable Var Type I/O Description -c ---------- ---------- ----- ------------- -c p_up RA I Pressure on upper isentrope (mb) -c p_low RA I Pressure on this isentrope (mb) -c th_up R I Upper isentrope (K) -c th_low R I Lower isentrope (K) -c stab RA O Stability through the layer (mb/K) -c mni I I First dimension of input array. -c ni, nj I I Grid dimensions in i,j. -c bad R - Bad data value. -c flag R - Bad data flag. -c -c -c User Notes: -c -c 1. Stability is defined as -dP/d(theta). We calculate this through -c the layer from the isentropic surface 'n' to the surface above it, -c 'n+1'. -c -c............................................................................... -c - implicit none - real o_up, o_low, dth, bad, flag - integer i, j, mni, ni, nj - real*4 p_up(mni,nj), p_low(mni,nj) - real*4 stab(mni,nj) -c - parameter(flag = 1.e37) - bad = 1.e6 - 2. -c -c..... Start. Find the d(theta). -c - dth = 1. / (o_up - o_low) ! divide here so don't later. -c -c..... Now calculate the isentropic stability. -c - do 2 j=1,nj - do 2 i=1,ni - if(p_low(i,j).gt.bad .or. p_up(i,j).gt.bad) then - stab(i,j) = flag - else - stab(i,j) = amax1(p_low(i,j)-p_up(i,j),10.0)*dth - endif -2 continue -c - return - end diff --git a/nativeLib/rary.meteorological/src/koffset.f b/nativeLib/rary.meteorological/src/koffset.f deleted file mode 100755 index 085f8cfa73..0000000000 --- a/nativeLib/rary.meteorological/src/koffset.f +++ /dev/null @@ -1,23 +0,0 @@ - - Subroutine Koffset(Temp,mni,ni,nj,k0) - - Implicit None - - Integer*4 mni,ni,nj,i,j - Real*4 Flag,Flg,Temp(mni,nj),k0 - Data Flag,Flg/1e37,99998./ - - Do 1 j=1,nj - Do 1 i=1,ni -1 If (Temp(i,j).lt.Flg) Goto 2 - k0=Flag - Return - -2 If (Temp(i,j).lt.100.0) Then - k0=273.15 - Else - k0=0.0 - End If - - Return - End diff --git a/nativeLib/rary.meteorological/src/lapserate.f b/nativeLib/rary.meteorological/src/lapserate.f deleted file mode 100755 index 7a0dc3250b..0000000000 --- a/nativeLib/rary.meteorological/src/lapserate.f +++ /dev/null @@ -1,77 +0,0 @@ - - Subroutine LapseRate(Tlo,PZlo,Thi,PZhi,vc,mnx,nx,ny,Lapse) - - Implicit None - - Integer*4 height,theta,scalarz,pressure,scalarp - Parameter (height=1,theta=2,scalarz=3,pressure=4,scalarp=5) - - Integer*4 vc,mnx,nx,ny,i,j - - Real*4 Tlo(mnx,ny),PZlo(mnx,ny),Thi(mnx,ny),PZhi(mnx,ny), - & Flag,Flg,Lapse(mnx,ny),c1,c2 - - Data Flag,Flg/1e37,99998.0/ - - If (vc.eq.height) Then ! height - c2=-1 - Do 10 j=1,ny - Do 10 i=1,nx - If (Tlo(i,j).lt.Flg .and. PZlo(i,j).lt.Flg .and. - & Thi(i,j).lt.Flg .and. PZhi(i,j).lt.Flg .and. - & PZlo(i,j).lt.PZhi(i,j)) Then - Lapse(i,j)=c2*(Thi(i,j)-Tlo(i,j))/(PZhi(i,j)-PZlo(i,j)) - Else - Lapse(i,j)=Flag - End If -10 Continue - Else If (vc.eq.theta) Then ! T=scalar theta, PZ=pressure - c1=0.009766 - c2=0.034167*alog(Thi(1,1)/Tlo(1,1)) - Do 20 j=1,ny - Do 20 i=1,nx - If (PZlo(i,j).lt.Flg .and. PZhi(i,j).lt.Flg .and. - & PZlo(i,j).gt.PZhi(i,j)) Then - Lapse(i,j)=c1+c2/alog(PZhi(i,j)/PZlo(i,j)) - Else - Lapse(i,j)=Flag - End If -20 Continue - Else If (vc.eq.scalarz) Then ! scalar Z - c2=-1 - Do 30 j=1,ny - Do 30 i=1,nx - If (Tlo(i,j).lt.Flg .and. Thi(i,j).lt.Flg) Then - Lapse(i,j)=c2*(Thi(i,j)-Tlo(i,j))/(PZhi(1,1)-PZlo(1,1)) - Else - Lapse(i,j)=Flag - End If -30 Continue - Else If (vc.eq.pressure) Then ! PZ=pressure - c2=0.034167 - Do 40 j=1,ny - Do 40 i=1,nx - If (Tlo(i,j).lt.Flg .and. PZlo(i,j).lt.Flg .and. - & Thi(i,j).lt.Flg .and. PZhi(i,j).lt.Flg .and. - & PZlo(i,j).gt.PZhi(i,j)) Then - Lapse(i,j)=c2*alog(Thi(i,j)/Tlo(i,j))/ - & alog(PZhi(i,j)/PZlo(i,j)) - Else - Lapse(i,j)=Flag - End If -40 Continue - Else If (vc.eq.scalarp) Then ! PZ(1,1)=scalar pressure - c2=0.034167 - Do 50 j=1,ny - Do 50 i=1,nx - If (Tlo(i,j).lt.Flg .and. Thi(i,j).lt.Flg) Then - Lapse(i,j)=c2*alog(Thi(i,j)/Tlo(i,j))/ - & alog(PZhi(1,1)/PZlo(1,1)) - Else - Lapse(i,j)=Flag - End If -50 Continue - End If - - Return - End diff --git a/nativeLib/rary.meteorological/src/lclpar.f b/nativeLib/rary.meteorological/src/lclpar.f deleted file mode 100755 index 512e5e9481..0000000000 --- a/nativeLib/rary.meteorological/src/lclpar.f +++ /dev/null @@ -1,111 +0,0 @@ - SUBROUTINE LCLPAR(MEANMIX,TS,P,HT,T,TD,NLVLS,PLCL,TLCL,HLCL) - IMPLICIT NONE -C -C Statement of purpose. -C --------------------- -C This routine computes the pressure, height, and temperature of the -C lifting condensation level (LCL) from a sounding. -C -C History. -C -------- -C Dale Perry 20 Sep 96 Bootlegged version of cclpar.f modified for -C determining the LCL. -C -C Description of input and output. -C -------------------------------- -C On input: -C --------- -C MEANMIX Real Mixing ratio used to intersect the sounding (g/kg). -C TS Real Surface temp (12Z-forecast max temp;00Z-sfc temp) (K). -C P Real Array Sounding pressures (mb). -C HT Real Array Sounding heights (m asl). -C T Real Array Sounding temperatures (K). -C TD Real Array Sounding dewpoint temperatures (K). -C NLVLS Integer Number of sounding levels passed. -C -C On output: -C ---------- -C PLCL Pressure of the lifting condensation level (mb). -C TLCL Temperature of the lifting condensation level (K). -C HTLCL Height of the lifting condensation level (m asl). -C -C User notes: -C ----------- -C The low level mean mixing ratio is input to this routine... -C computed outside. -C -C -C Input arguments. -C - INTEGER NLVLS - REAL MEANMIX,TS,P(NLVLS),HT(NLVLS),T(NLVLS),TD(NLVLS) -C -C Output arguments. -C - REAL PLCL,TLCL,HLCL -C -C Internal variables. -C - REAL PB,PM,PT,T1,T2,PLOG1,PLOG2,PLOG3 - INTEGER I,COUNT -C -C External functions. -C - REAL INTERP1 -C -C Subroutine constants. -C - REAL TOLER,FLAG - PARAMETER (TOLER=0.05,FLAG=99999.) -C -C Loop up through sounding until mixing ratio line crosses the -C dry adiabat through the surface temperature. Initially set -C the LCL parameters to FLAG values in case no LCL is found. -C - PLCL=FLAG - HLCL=FLAG - TLCL=FLAG - T2=TS*((1000.0/P(1))**0.286) - DO 100 I=1,NLVLS - CALL TEMP_MIXRATIO(P(I),MEANMIX,T1) - T1=T1*((1000.0/P(I))**0.286) - IF (T1.GE.T2) GO TO 102 - 100 CONTINUE - 102 CONTINUE - IF (I.EQ.1) THEN !LCL at the surface - PLCL=P(1) - HLCL=HT(1) - TLCL=T(1) - GO TO 999 - END IF -C We were at the top of the sounding, but 'I' got incremented one -C more beyond. Reset it to the top of sounding index 'NLVLS'. - IF (I.GT.NLVLS) I=NLVLS-1 - PT=P(I) - PB=P(I-1) - PLOG1=ALOG(P(I)) - PLOG3=ALOG(P(I-1)) -C -C Iterate to find the LCL. Keep cutting level in half until the -C point of intersection is found. -C - DO 105 COUNT=1,100 - PM=0.5*(PT+PB) - PLOG2=ALOG(PM) - CALL TEMP_MIXRATIO(PM,MEANMIX,T1) - T1=T1*((1000.0/PM)**0.286) - IF (ABS(T1-T2).LE.TOLER) THEN - PLCL=PM - TLCL=T1*((PLCL/1000.0)**0.286) - HLCL=INTERP1(HT(I),HT(I-1),PLOG1,ALOG(PLCL),PLOG3) - GO TO 999 - ENDIF - IF (T1-T2.GT.TOLER) PT=PM - IF (T2-T1.GT.TOLER) PB=PM - 105 CONTINUE -C -C Exit. -C - 999 CONTINUE - RETURN - END diff --git a/nativeLib/rary.meteorological/src/lfcpar.f b/nativeLib/rary.meteorological/src/lfcpar.f deleted file mode 100755 index 3c8d24115d..0000000000 --- a/nativeLib/rary.meteorological/src/lfcpar.f +++ /dev/null @@ -1,159 +0,0 @@ - SUBROUTINE LFCPAR(EPTPAR,PCB,TCB,HCB,T1,T2,P1,HT1,NPAR, - + PLFC1,HLFC1,TLFC1,PLFC2,HLFC2,TLFC2) - IMPLICIT NONE -C -C Statement of purpose. -C --------------------- -C This routine computes the level of free convection of a rising parcel. -C -C History. -C -------- -C Don Baker 01 Jun 85 Original version. -C Dale Perry Oct 96 Adapted code to work with WFO -C -C Description of input and output. -C -------------------------------- -C On input: -C --------- -C EPTPAR Real Moist adiabat along which parcel rises above -C the LCL (K). -C PCB Real LCL pressure (mb). -C TCB Real LCL temperature (K). -C HCB Real LCL height (m asl). -C T1 Real Array Parcel temperatures at lifted parcel levels (K). -C T2 Real Array Sounding temperatures at parcel levels (K). -C P1 Real Array Lifted parcel pressure levels (mb). -C HT1 Real Array Lifted parcel level heights (m asl). -C NPAR Integer Number of lifted parcel levels passed. -C -C On output: -C ---------- -C PLFC Real Level of free convection pressure (mb). -C HLFC Real Level of free convection height (m asl). -C TLFC Real Level of free convection temperature (K). -C -C -C Input arguments. -C - INTEGER NPAR - REAL EPTPAR,PCB,HCB,TCB,T1(NPAR),T2(NPAR),P1(NPAR),HT1(NPAR) -C -C Output arguments. -C -C REAL PLFC,HLFC,TLFC - REAL PLFC1,HLFC1,TLFC1 - REAL PLFC2,HLFC2,TLFC2 -C -C Internal variables. -C - REAL PM,PT,PB,ETPAR,T1M,T2M,PLOG1,PLOG2,PLOG3 - INTEGER I,J,K, COUNT,II -C -C External functions. -C - REAL TEMP_OF_TE,INTERP1 -C -C Subroutine constants. -C - REAL TOLER,FLAG - PARAMETER (TOLER=0.05,FLAG=99999.) -C -C Find the location in the parcel arrays that corresponds to the LCL. -C - i=0 - DO 100 II=1,NPAR - I=II - IF (ABS(P1(I)-PCB).LT.0.1) GO TO 101 - 100 CONTINUE - 101 IF (I.EQ.NPAR) GO TO 999 -C -C Initially assign flag values to the LFC in case no buoyancy exists. -C - PLFC1=FLAG - HLFC1=FLAG - TLFC1=FLAG - PLFC2=FLAG - HLFC2=FLAG - TLFC2=FLAG -C -C Check and see if parcel is positively buoyant at the LCL already. If -C this is true, then the LFC is coincident with the LCL. This may be -C the case in 00Z soundings when a super-adiabatic layer exists near -C the surface. -C - IF (T1(I).GE.T2(I)) THEN - PLFC1=PCB - HLFC1=HCB - TLFC1=TCB - GO TO 999 - ENDIF -C -C Loop upward from the LCL until the parcel temperature becomes warmer -C than the environment. If this does not occur, no positive buoyancy -C exists and the routine exits with whatever flag value was assigned to -C the level of free convection. -C -C To prevent a stack out of bounds error when I=1, set it equal to the -C next level if I=1. -C - IF (I.EQ.1) I=2 - DO 200 J=I,NPAR - IF (T1(J).GE.T2(J)) THEN - PT=P1(J) - PB=P1(J-1) - PLOG1=ALOG(P1(J)) - PLOG3=ALOG(P1(J-1)) - DO 102 COUNT=1,100 - PM=0.5*(PB+PT) - PLOG2=ALOG(PM) - ETPAR=EPTPAR*((PM/1000.0)**0.286) - T1M=TEMP_OF_TE(ETPAR,PM) - T2M=INTERP1(T2(J),T2(J-1),PLOG1,PLOG2,PLOG3) - IF (ABS(T1M-T2M).LE.TOLER) THEN - PLFC1=PM - HLFC1=INTERP1(HT1(J),HT1(J-1),PLOG1,ALOG(PLFC1),PLOG3) - TLFC1=T1M -C GO TO 999 - GO TO 300 - ENDIF - IF ((T1M-T2M).GT.TOLER) PT=PM - IF ((T2M-T1M).GT.TOLER) PB=PM - 102 CONTINUE - ENDIF - 200 CONTINUE - -C -C Continue looping to find a possible second LFC per conditions -C above rules. -C - 300 J=J+1 - DO 400 K=J,NPAR - IF (T1(K).GE.T2(K)) THEN - PT=P1(K) - PB=P1(K-1) - PLOG1=ALOG(P1(K)) - PLOG3=ALOG(P1(K-1)) - DO 302 COUNT=1,100 - PM=0.5*(PB+PT) - PLOG2=ALOG(PM) - ETPAR=EPTPAR*((PM/1000.0)**0.286) - T1M=TEMP_OF_TE(ETPAR,PM) - T2M=INTERP1(T2(K),T2(K-1),PLOG1,PLOG2,PLOG3) - IF (ABS(T1M-T2M).LE.TOLER) THEN - PLFC2=PM - HLFC2=INTERP1(HT1(K),HT1(K-1),PLOG1,ALOG(PLFC2),PLOG3) - TLFC2=T1M - GO TO 999 - ENDIF - IF ((T1M-T2M).GT.TOLER) PT=PM - IF ((T2M-T1M).GT.TOLER) PB=PM - 302 CONTINUE - ENDIF - 400 CONTINUE - -C -C Exit. -C - 999 CONTINUE - RETURN - END diff --git a/nativeLib/rary.meteorological/src/liftedp.f b/nativeLib/rary.meteorological/src/liftedp.f deleted file mode 100755 index 97ff5d0e66..0000000000 --- a/nativeLib/rary.meteorological/src/liftedp.f +++ /dev/null @@ -1,159 +0,0 @@ - SUBROUTINE LIFTEDP(P,T,HT,TVIR,NLVLS,NPAR,PCB,HCB,TCB,WCB, - + THDPAR,EPTPAR,PL,TL,PP,HTP,TP,TVIRP,TE, - + TVIRE,NPARCEL) - IMPLICIT NONE -C -C Statement of purpose. -C --------------------- -C Fill up lifted parcel arrays and corresponding environmental arrays -C such that an exact one-to-one correspondence exists between lifted -C parcel parameters and environmental parameters. -C -C History. -C -------- -C Don Baker 10 May 85 Original version (parcel.f). -C Dale Perry Sep 96 Adapted code to work with WFO, taking out -C extra output vars in parcel.f not needed -C -C Description of input and output. -C -------------------------------- -C On input: -C --------- -C P Real Array Sounding pressure levels (mb). -C T Real Array Sounding temperatures (K). -C HT Real Array Sounding heights (m asl). -C TVIR Real Array Sounding virtual temperatures (K). -C NLVLS Integer Number of sounding levels passed. -C NPAR Integer Number of parcel levels to calculate -C PCB Real LCL pressure (mb). -C HCB Real LCL height (m asl). -C TCB Real LCL temperature (K). -C WCB Real LCL mixing ration (g/kg). -C THDPAR Real LCL potential temperature (K). -C EPTPAR Real LCL equivalent potential temperature (K). -C PL Real Initial parcel pressure (mb). -C TL Real Initial parcel temperature (mb). -C -C On output: -C ---------- -C PP Real Array Lifted parcel pressures (mb). -C HTP Real Array Lifted parcel heights (m asl). -C TP Real Array Lifted parcel temperatures (K). -C TVIRP Real Array Lifted parcel virtual temperatures (K). -C TE Real Array Sounding temperatures corresponding to lifted -C parcel temperatures (K). -C TVIRE Real Array Sounding virtual temperatures corresponding -C to lifted parcel virtual temperatures (K). -C NPARCEL Integer Actual number of lifted parcel lvls returned. -C -C -C Input arguments. -C - INTEGER NLVLS, NPAR - REAL P(NLVLS),T(NLVLS),HT(NLVLS),TVIR(NLVLS),PCB,HCB,TCB,WCB - REAL THDPAR,EPTPAR - REAL PL,TL -C -C Output arguments. -C - REAL PP(NPAR),TP(NPAR),HTP(NPAR),TVIRP(NPAR) - REAL TE(NPAR),TVIRE(NPAR) - INTEGER NPARCEL -C -C Internal variables. -C - REAL PLOG1,PLOG2,PLOG3,TDP,ETPAR - INTEGER J,K,IK -C -C External functions. -C - EXTERNAL INTERP1, VIRTTEMP, TEMP_MIXRATIO, TEMP_OF_TE - REAL INTERP1, VIRTTEMP, TEMP_OF_TE - -C -C Step 1. Assign first element of arrays to initial parcel values. -C this may involve interpolating environmental sounding data slightly -C to get data at mean parcel pressure. -C -C Note: Subscript J refers to lifted parcel comparison arrays. -C Subscript K refers to environmental sounding arrays. -C - J=0 -C -C Step 1. Compute corresponding arrays along the dry adiabat up to the LCL. -C - IF (PCB .GT. 99998.0) GO TO 300 - - k=1 - DO 3 IK=1,NLVLS - K=IK - IF (P(K).GT.PL) GO TO 3 - IF (P(K).LE.PCB) GO TO 4 - J=J+1 - PP(J)=P(K) - HTP(J)=HT(K) - TP(J)=THDPAR*((PP(J)/1000.0)**0.286) - CALL TEMP_MIXRATIO(PP(J),WCB,TDP) - TVIRP(J) =VIRTTEMP(TP(J), TDP, PP(J)) - TE(J)=T(K) - TVIRE(J)=TVIR(K) - 3 CONTINUE - 4 CONTINUE - IF (ABS(P(1)-PCB).LT.0.1) GO TO 211 -C -C Step 2. Compute array values at the LCL. -C - J=J+1 - PP(J)=PCB - HTP(J)=HCB - TP(J)=TCB - TVIRP(J)=VIRTTEMP(TP(J),TP(J),PP(J)) - -C -C Case where the LCL is at the surface -C - IF (J.EQ.1) THEN - TE(J)= T(K) - TVIRE(J)= TVIR(K) -C -C LCL is above the surface -C - else - PLOG1=ALOG(P(K-1)) - PLOG2=ALOG(PCB) - PLOG3=ALOG(P(K)) - TE(J)=INTERP1(T(K-1),T(K),PLOG1,PLOG2,PLOG3) - TVIRE(J)=INTERP1(TVIR(K-1),TVIR(K),PLOG1,PLOG2,PLOG3) - END IF - - IF (P(K).EQ.PCB) K=K+1 -C -C Step 3. Compute corresponding array values from the LCL up to the -C top of the sounding. -C - - 211 CONTINUE - DO 5 K=K,NLVLS - J=J+1 - PP(J)=P(K) - HTP(J)=HT(K) - ETPAR=EPTPAR*((PP(J)/1000.0)**0.286) - TP(J)=TEMP_OF_TE(ETPAR,PP(J)) - TVIRP(J)=VIRTTEMP(TP(J),TP(J),PP(J)) - TE(J)=T(K) - TVIRE(J)=TVIR(K) - 5 CONTINUE -C -C Set number of parcel levels. -C - 300 NPARCEL=J -C -C Exit. -C - RETURN - END - - - - - diff --git a/nativeLib/rary.meteorological/src/lintrans.f b/nativeLib/rary.meteorological/src/lintrans.f deleted file mode 100755 index ac87bd1d3d..0000000000 --- a/nativeLib/rary.meteorological/src/lintrans.f +++ /dev/null @@ -1,30 +0,0 @@ -c -c - subroutine LinTrans(a,mult,add,result,mni,ni,nj) -c -c..... Routine to do a linear translation on an array. Each i,j in the -c..... array is multiplied by 'mult' and then added to by 'add'. -c -c..... Original : 01-13-89 Peter A. Stamus -c 08-21-89 Add bad data check. -c 09-20-89 Add implicit none. -c - implicit none - integer mni, ni, nj, i, j - real flag, bad, mult, add - parameter(flag = 1.e37) - real a(mni,nj), result(mni,nj) -c - bad = 1e36 - - do 1 j=1,nj - do 1 i=1,ni - if(a(i,j) .gt. bad) then - result(i,j) = flag - else - result(i,j) = a(i,j) * mult + add - endif -1 continue -c - return - end diff --git a/nativeLib/rary.meteorological/src/matsln.f b/nativeLib/rary.meteorological/src/matsln.f deleted file mode 100755 index e7716d2232..0000000000 --- a/nativeLib/rary.meteorological/src/matsln.f +++ /dev/null @@ -1,107 +0,0 @@ - - Subroutine MatSln(A,V,P,S,mn,n,status) - -C* This program solves a system of linear equations using a matrix -C* technique, specifically Gaussian elimination with partial pivoting. - -C* Inputs: -C* A(0:mn,0:mn) Real*4 Coefficient matrix (column,row). -C* V(0:mn) Real*4 y-value vector. -C* P(0:mn) Int*4 Workspace for partial pivoting. -C* mn Int*4 Size of arrays (from zero). -C* n Int*4 Size of system (from zero). - -C* Outputs: -C* S(0:mn) Real*4 Solution vector. -C* status Int*4 If logically false, matrix was ill conditioned -C* and system was not solved. - - Implicit None - - Integer*4 mn,n,r,c,re,ce,status,rp,rmax,P(0:mn),dummy - Logical*1 ifill -c Integer*4 i,j - - Real*4 A(0:mn,0:mn),V(0:mn),S(0:mn), - - abmax,f,vx,xx,xxx,xxxx - - status=0 - -c Seed pivoting array, zero solution vector. - Do 3 r=0,n - S(r)=0.0 -3 P(r)=r - rmax=0 - ifill=.false. - -c Do 527 i=0,mn -c Do 527 j=0,mn -c527 If ((i.gt.n .or. j.gt.n) .and. A(i,j).ne.0.0) -c - Print *,'Outlier has non-zero',i,j,A(i,j) - -c Begin gaussian elimination, loop for row to use for eliminating a column in -c those below. - Do 20 r=0,n-1 - -c Perform partial pivioting. - abmax=-1. - Do 5 rp=r,n - If (abs(A(r,P(rp))).gt.abmax) Then - abmax=abs(A(r,P(rp))) - rmax=rp - End If -5 Continue - If (abmax.eq.0.0) Return - dummy=P(rmax) - P(rmax)=P(r) - P(r)=dummy - -c Print *,'after pivot',r+1 -c Do 222 i=0,n -c222 Print 234,(A(j,P(i)),j=0,n),V(P(i)) -c234 Format (' ',(G10.3,' '),'~~',G10.3) -c Print *,' ' - -c Eliminate rth element in remaining rows. - abmax=-1. - Do 10 re=r+1,n - f=A(r,P(re))/A(r,P(r)) - V(P(re))=V(P(re))-f*V(P(r)) - A(r,P(re))=0. - Do 10 ce=r+1,n - If (ce.eq.r+1) Then - xx=A(ce,P(re)) - xxx=-(f*A(ce,P(r))) - xxxx=xxx+xx - If (abs(xxxx).gt.abmax) Then - abmax=abs(xxxx) - xx=amax1(abs(xx),abs(xxx))/10000. - ifill=.false. - If (abmax.lt.xx) ifill=.true. - End If - A(ce,P(re))=xxxx - Else - A(ce,P(re))=A(ce,P(re))-f*A(ce,P(r)) - End If -10 Continue - -c Print *,'after elimination',r+1 -c Do 333 i=0,n -c333 Print 234,(A(j,P(i)),j=0,n),V(P(i)) -c Print *,' ' - - If (ifill) Return - -20 Continue - -c Backwards solution. - Do 40 r=n,0,-1 - vx=V(P(r)) - Do 30 c=r+1,n -30 vx=vx-S(c)*A(c,P(r)) - If (A(r,P(r)).eq.0.0) Return -40 S(r)=vx/A(r,P(r)) - - status=1 - Return - End diff --git a/nativeLib/rary.meteorological/src/maxmin.f b/nativeLib/rary.meteorological/src/maxmin.f deleted file mode 100755 index c49337bfa7..0000000000 --- a/nativeLib/rary.meteorological/src/maxmin.f +++ /dev/null @@ -1,43 +0,0 @@ -c -c - subroutine max_min(a,b,result,mni,ni,nj,mode) -c -c..... Routine to find the max or min of two fields. mode>0 means max, -c..... mode<0 means min. -c -c..... Original : 06-25-02 Borrowed from addaray -c - implicit none - integer mni, ni, nj, i, j - real flag, bad - parameter(flag = 1.e37) - real a(mni,nj), b(mni,nj), result(mni,nj) - integer mode -c - bad = 1.e36 - if (mode.gt.0) Then - do 1 j=1,nj - do 1 i=1,ni - if (a(i,j).gt.bad) then - result(i,j) = b(i,j) - else if (b(i,j).gt.bad) then - result(i,j) = a(i,j) - else if (a(i,j).gt.b(i,j)) then - result(i,j) = a(i,j) - else - result(i,j) = b(i,j) - endif -1 continue - Else - do 2 j=1,nj - do 2 i=1,ni - if (a(i,j).lt.b(i,j)) then - result(i,j) = a(i,j) - else - result(i,j) = b(i,j) - endif -2 continue - Endif - - Return - end diff --git a/nativeLib/rary.meteorological/src/meanomega.f b/nativeLib/rary.meteorological/src/meanomega.f deleted file mode 100755 index 3de9828a27..0000000000 --- a/nativeLib/rary.meteorological/src/meanomega.f +++ /dev/null @@ -1,35 +0,0 @@ - - Subroutine MeanOmega(P1,U1,V1,P2,U2,V2,Dx,Dy,dt,work, - & Omega,mnx,nx,ny) - -C calculates the mean adiabatic omega on a theta surface over a period -C dt seconds. P im mb, U and V in m/s, Dx and Dy in m. -C Omega output in mb/s. - - Implicit None - - Integer*4 i,j,mnx,nx,ny - - Real*4 P1(mnx,ny),U1(mnx,ny),V1(mnx,ny), - & P2(mnx,ny),U2(mnx,ny),V2(mnx,ny), - & Dx(mnx,ny),Dy(mnx,ny),work(mnx,ny),Omega(mnx,ny),dt, - & Flg,Flag - - Data Flg,Flag/99998.,1e37/ - - Call G2Gkinematics(U1,V1,P1,Dx,Dy, mnx,ny, nx,ny, - & 5,work) - Call G2Gkinematics(U2,V2,P2,Dx,Dy, mnx,ny, nx,ny, - & 5,Omega) - Do 10 j=1,ny - Do 10 i=1,nx - If (Omega(i,j).gt.Flg) Goto 10 - If (work(i,j).gt.Flg .or. P1(i,j).gt.Flg .or. P2(i,j).gt.Flg) Then - Omega(i,j)=Flag - Else - Omega(i,j)=(P2(i,j)-P1(i,j))/dt-(Omega(i,j)+work(i,j))/2 - End If -10 Continue - - Return - End diff --git a/nativeLib/rary.meteorological/src/mixrat.f b/nativeLib/rary.meteorological/src/mixrat.f deleted file mode 100755 index 5b53ecd6a0..0000000000 --- a/nativeLib/rary.meteorological/src/mixrat.f +++ /dev/null @@ -1,50 +0,0 @@ -c -c - subroutine mixrat(p,t,rh,mni,ni,nj,q) -c -c.............................................................................. -c -c Routine to calculate mixing ratio from the pressure, -c temperature, and relative humidity. -c -c Changes: -c J. Ramer 06-12-03 Copied from spechum. -c -c Inputs/Outputs: -c -c Variable Var Type I/O Description -c ---------- ---------- ----- ------------- -c p RA I Pressure (mb) -c t RA I Temperature (K) -c rh RA I Relative humidity [range: 0. - 100.] -c mni I I First dimension of input array. -c ni,nj I I Grid dimensions in i,j. -c q RA O Mixing ratio (g/kg). -c -c -c User Notes: -c -c 1. No quality control is performed in this routine. -c -c.............................................................................. -c - implicit none - integer mni, ni, nj, i, j - real p(mni,nj), t(mni,nj), rh(mni,nj) - real q(mni,nj) - real k,eee - real flg,flag - Data flg,flag/99998.0,1e37/ - - Do 10 j=1,nj - Do 10 i=1,ni - If (p(i,j).gt.flg .or. t(i,j).gt.flg .or. rh(i,j).gt.flg) then - q(i,j)=flag - Else - k=t(i,j) - eee=rh(i,j)*exp(28.48859-0.0091379024*k-6106.396/k) - q(i,j)=eee/(p(i,j)-0.001607717*eee) - End If -10 Continue - return - end diff --git a/nativeLib/rary.meteorological/src/mslp2thkns.f b/nativeLib/rary.meteorological/src/mslp2thkns.f deleted file mode 100755 index 15f85ef515..0000000000 --- a/nativeLib/rary.meteorological/src/mslp2thkns.f +++ /dev/null @@ -1,27 +0,0 @@ - - Subroutine Mslp2Thkns(Mslp,Hgt,Thkns,mni,ni,nj) - -C This routine estimates 1000 to 500 mb thickness from 500 height -C and mean sea level pressure. - - Implicit None - - Integer*4 mni,ni,nj,i,j - - Real*4 Mslp(mni,nj),Hgt(mni,nj),Thkns(mni,nj), - & a,b,c,Flag,Flg - - Data a,b,c,Flag,Flg/ - & 0.4599042,3.262312,0.1902672,1e37,99998./ - - Do 10 j=1,nj - Do 10 i=1,ni - If (Mslp(i,j).gt.Flg .or. Hgt(i,j).gt.Flg) Then - Thkns(i,j)=Flag - Else - Thkns(i,j)=Hgt(i,j)*a/(Mslp(i,j)**c-b) - End If -10 Continue - - Return - End diff --git a/nativeLib/rary.meteorological/src/multaray.f b/nativeLib/rary.meteorological/src/multaray.f deleted file mode 100755 index 96eae17d42..0000000000 --- a/nativeLib/rary.meteorological/src/multaray.f +++ /dev/null @@ -1,28 +0,0 @@ -c -c - subroutine mult_aray(a,b,result,mni,ni,nj) -c -c..... Multiply a field by another. Each i,j in one array is -c..... multiplied by the corresponding i,j in the other array. -c..... result = a*b -c -c..... Stole framework from add_aray...J Ramer Jun 95 -c - implicit none - integer mni, ni, nj, i, j - real flag, bad - parameter(flag = 1.e37) - real a(mni,nj), b(mni,nj), result(mni,nj) -c - bad = 1e36 - do 1 j=1,nj - do 1 i=1,ni - if(a(i,j).gt.bad .or. b(i,j).gt.bad) then - result(i,j) = flag - else - result(i,j) = a(i,j) * b(i,j) - endif -1 continue -c - return - end diff --git a/nativeLib/rary.meteorological/src/multbycnst.f b/nativeLib/rary.meteorological/src/multbycnst.f deleted file mode 100755 index d688908411..0000000000 --- a/nativeLib/rary.meteorological/src/multbycnst.f +++ /dev/null @@ -1,29 +0,0 @@ -c -c - subroutine mult_by_cnst(a,const,result,mni,ni,nj) -c -c..... Routine to multiply an array by a real constant. Each i,j in the -c..... array is multiplied by the constant. -c -c..... Original : 01-13-89 Peter A. Stamus -c 08-21-89 Add bad data check. -c 09-20-89 Add implicit none. -c - implicit none - integer mni, ni, nj, i, j - real flag, bad, const - parameter(flag = 1.e37) - real a(mni,nj), result(mni,nj) -c - bad = 1e36 - do 1 j=1,nj - do 1 i=1,ni - if(a(i,j) .gt. bad) then - result(i,j) = flag - else - result(i,j) = a(i,j) * const - endif -1 continue -c - return - end diff --git a/nativeLib/rary.meteorological/src/mxtp.f b/nativeLib/rary.meteorological/src/mxtp.f deleted file mode 100755 index f045acf870..0000000000 --- a/nativeLib/rary.meteorological/src/mxtp.f +++ /dev/null @@ -1,109 +0,0 @@ - SUBROUTINE MXTP ( ANSOL, !Energy units derived from total heat (*) - . DELTAP, !Pressure increment - . SFCP, !Surface pressure (mb) - . P2, !Second pressure in array (mb) - . TL, !Interpolated temperature array (C) - . DELTAZ, !Thickness array - . LVL, !Dimension of interpolated arrays - . CTMAX) !Forecast maximum temperature (C) - -C (*) Note: refer to comments in main program concerning these energy -C units - -C============================================================================ -C This routine forecasts the maximum temperature based on the total amount -C of energy available for heating and the sounding temperature profile. -C============================================================================ - implicit none -c declare formal arguments - real ANSOL, DELTAP, SFCP, P2, TL(*), DELTAZ(*) - integer LVL - real CTMAX - -C========================== -C Variable declarations: -C========================== -c REAL TL(1), DELTAZ(1) -C LOGICAL BUGS -c ------------------------ - real adtemp, delz, deldt, dsum, dpress, dt, ftmax, - + press, r, rbot, SFCT, tdiff - integer*2 mlyr -c ------------------------ - real*4 dlaps - DATA DLAPS /0.009767/ !Dry adiabatic lapse rate (deg C/m) - -C=========================== -C Set surface temperature -C=========================== - - SFCT= TL(1) - -C=========================================================================== -C As a first guess, 70% of the available heat is added in the lowest -C 10 mb. This usually leads to an overestimate of the maximum temperature -C on the first iteration. -C=========================================================================== - - DT= 0.70*ANSOL - - 20 CONTINUE - PRESS= SFCP - DPRESS= P2 - RBOT= (SFCP-P2)/DELTAP - -C========================================================================= -C DSUM contains the sum of the differences between the air temperature -C at successive pressure levels and ADTEMP (temperature along a dry -C adiabat). CTMAX is initialized to the first guess temperature along -C the dry adiabat (i.e., 70% of ANSOL added to surface temperature). -C========================================================================= - - DSUM= 0. - ADTEMP= SFCT+DT - CTMAX= ADTEMP - -C=========================================================================== -C This loop tests and sums the temperature differences between ADTEMP and -C the environment (in DSUM) -C=========================================================================== - - DO 100 MLYR= 1,LVL - R= 1. !R ranges from 0 to 1 in the first - IF (MLYR.EQ.1) R= RBOT !layer since it takes less than 1 unit - TDIFF= ADTEMP-TL(MLYR) !of ASOL to heat a layer <10 mb thick. - IF (TDIFF.LE.0.) GO TO 105 - DSUM= DSUM+(TDIFF*R) - DELZ= DELTAZ(MLYR) - ADTEMP= ADTEMP-(DLAPS*DELZ) - PRESS= DPRESS - DPRESS= PRESS-DELTAP - IF (DPRESS.LT.400.) GO TO 105 - 100 CONTINUE - -C========================================================================== -C When 400 mb is reached in the iteration, or, ADTEMP is less than the -C environmental temperature, control is transferred to this section -C where it is determined whether a new value of ADTEMP is needed. ADTEMP -C is recalculated if the difference between DSUM and ANSOL is larger than -C 2 units. -C========================================================================== - - 105 CONTINUE - DELDT= DSUM-ANSOL - IF (ABS(DELDT).LE.2.) THEN - FTMAX= ctmax - ELSE IF (DELDT.GT.2. .AND. DSUM.GT.0) THEN - DT= DT-0.5*DELDT/DSUM - IF (DT.GT.0.) GO TO 20 - ELSE - CTMAX= SFCT - FTMAX= ctmax - ENDIF - -C================= -C Normal return -C================= - - RETURN - END diff --git a/nativeLib/rary.meteorological/src/nadgdt.f b/nativeLib/rary.meteorological/src/nadgdt.f deleted file mode 100755 index cf0cf06086..0000000000 --- a/nativeLib/rary.meteorological/src/nadgdt.f +++ /dev/null @@ -1,99 +0,0 @@ -c -c - subroutine nadgdt(u,v,a,mni,ni,nj,dx,dy,dadxdt,dadydt) -c -C############################################################################# -C Statement of purpose. -C --------------------- -C This routine computes the non-advective local change of an arbitrary -C conservative parameter `a'. -C -C History. -C -------- -C J. Ramer original version 1 Jul 03 -C -C Description of input and output. -C -------------------------------- -C On input: -C --------- -c u Real Array U component of wind. -c v Real Array V component of wind. -c a Real Array Arbitrary conservative parameter. -c mni Integer First dimension of input array. -C ni, nj Integer Number of points in the x- and y-directions. -C dx, dy Real Array Grid spacing in the x- and y-directions (m). -C -C On output: -C ---------- -C dadxdt Real Array Local change of the x direction gradient. -C dadydt Real Array Local change of the y direction gradient. - -C -C############################################################################### -c - implicit none -c - integer mni, ni, nj, i, j, im, jm, ip, jp - real flag, bad, dudx, dvdx, dudy, dvdy, dadx, dady -c -c---- Declare input arguments. -c - real dx(mni,nj), dy(mni,nj) - real u(mni,nj), v(mni,nj), a(mni,nj) -c -c---- Declare output arguments. -c - real dadxdt(mni,nj), dadydt(mni,nj) -c -c---- Declare other parameters and work arrays. -c - parameter(flag = 1.e37) - bad = 1e6-2. - -c Flag out boundaries. - Do 21 i=1,ni - dadxdt(i,1)=Flag -21 dadydt(i,1)=Flag - Do 22 j=2,nj-1 - dadxdt(1,j)=Flag - dadxdt(ni,j)=Flag - dadydt(1,j)=Flag -22 dadydt(ni,j)=Flag - Do 23 i=1,ni - dadxdt(i,nj)=Flag -23 dadydt(i,nj)=Flag - - - jm=1 - j=2 - Do 7091 jp=3,nj - im=1 - i=2 - Do 7090 ip=3,ni - If (u(im,j).gt.bad .or. u(ip,j).gt.bad .or. - - u(i,jm).gt.bad .or. u(i,jp).gt.bad .or. - - v(im,j).gt.bad .or. v(ip,j).gt.bad .or. - - v(i,jm).gt.bad .or. v(i,jp).gt.bad .or. - - a(im,j).gt.bad .or. a(ip,j).gt.bad .or. - - a(i,jm).gt.bad .or. a(i,jp).gt.bad) Then - dadxdt(i,j)=Flag - dadydt(i,j)=Flag - Else - dudx = (u(ip,j)-u(im,j))/Dx(i,j) - dudy = (u(i,jp)-u(i,jm))/Dy(i,j) - dvdx = (v(ip,j)-v(im,j))/Dx(i,j) - dvdy = (v(i,jp)-v(i,jm))/Dy(i,j) - dadx = (a(ip,j)-a(im,j))/Dx(i,j) - dady = (a(i,jp)-a(i,jm))/Dy(i,j) - dadxdt(i,j)=-0.5*(dudx*dadx+dvdx*dady); - dadydt(i,j)=-0.5*(dudy*dadx+dvdy*dady); - End If - im=i - i=ip -7090 Continue - jm=j - j=jp -7091 Continue - - return - end diff --git a/nativeLib/rary.meteorological/src/natlog.f b/nativeLib/rary.meteorological/src/natlog.f deleted file mode 100755 index 945a20d9e0..0000000000 --- a/nativeLib/rary.meteorological/src/natlog.f +++ /dev/null @@ -1,25 +0,0 @@ -c -c - subroutine natlog(a,b,mni,ni,nj) -c -c..... calculates the natural log of a field. b = ln(a) -c - implicit none - integer mni, ni, nj, i, j - real flag, bad - parameter(flag = 1.e37) - real a(mni,nj), b(mni,nj) - -c - bad = 1e36 - do 1 j=1,nj - do 1 i=1,ni - if(a(i,j) .gt. bad .or. a(i,j).le.0.0) then - b(i,j) = flag - else - b(i,j) = alog(a(i,j)) - endif -1 continue -c - return - end diff --git a/nativeLib/rary.meteorological/src/negarea.f b/nativeLib/rary.meteorological/src/negarea.f deleted file mode 100755 index bfc9b5ec91..0000000000 --- a/nativeLib/rary.meteorological/src/negarea.f +++ /dev/null @@ -1,158 +0,0 @@ - SUBROUTINE NEGAREA(PCB,TCB,HCB,PLFC,HLFC,TLFC,THDPAR,EPTPAR, - + P,HT,TE,TP,NPAR,CINFRMCAPE,NEGBUOY) - IMPLICIT NONE - -C Statement of purpose: -C --------------------- -C This routine computes the negative buoyant energy between the surface -C and level of free convection in a sounding. -C -C History: -C -------- -C D. Baker 12 Dec 85 Original version. -C D. Perry Oct 96 Adapted code for WFO applications -C -C Description of input and output. -C -------------------------------- -C On input: -C --------- -C PLFC Real Pressure of the level of free convection (mb). -C TLFC Real Temperature of the LFC (C). -C HLFC Real Height of the LFC (m asl). -C EPTPAR Real Equivalent potential temperature of the moist -C adiabat above the lifted condensation level, along -C which the saturated parcel rises (C). -C P Real Array Lifted parcel pressure levels (mb). -C HT Real Array Lifted parcel heights (m asl). -C TE Real Array Sounding temperatures at parcel pressures (C). -C TP Real Array Parcel temperatures at parcel pressures (C). -C NPAR Integer Number of levels of lifted parcel data. -C -C On output: -C ---------- -C NEGBUOY Real Negative energy between the level of the initial -C parcel and the level of free convection. -C -C User notes: -C ----------- -C 1) This subroutine is called only if there exists a level of free convection. -C This is determined in the calling module. -C 2) Lifted parcel arrays contain parcel and environmental parameters at -C the same levels. - -C---- Input arguments. - - INTEGER NPAR - REAL P(NPAR),HT(NPAR),TE(NPAR),TP(NPAR) - REAL PCB,PLFC,TCB,TLFC,HCB,HLFC,EPTPAR,THDPAR - REAL CINFRMCAPE - -C---- Output arguments. - - REAL NEGBUOY - -C---- Internal parameters. - - INTEGER NL - PARAMETER (NL=500) - REAL PARCEL,ENVMNT,SUM,DB,VDIF,NEG1,NEG2,ETPAR - REAL PL(NL),HTL(NL),TEL(NL),TPL,THEL(NL),THPL(NL) - INTEGER NPARL,I,IDXLCL - -C---- External functions. - - REAL TEMP_OF_TE - -C---- Subroutine constants. - - REAL GE - PARAMETER (GE=9.80) - -C---- Fill local arrays from first parcel level up to the LFC. - - NPARL=0 - DO I=1,NPAR - IF (P(I).GT.PLFC) THEN - PL(I)=P(I) - HTL(I)=HT(I) - TEL(I)=TE(I) - ELSE - PL(I)=PLFC - HTL(I)=HLFC - TEL(I)=TLFC - NPARL=I - GO TO 101 - ENDIF - END DO -101 CONTINUE - -C---- Compute resolution to which to interpolate local sounding pressures -C---- and temperatures. This is 1/25th of the thickness between the -C---- level of the parcel and its LFC. - - VDIF=(HLFC-HT(1))/25 - if (VDIF.lt.35) VDIF=35 - -C---- Interpolate data between the LFC and EL such that the thickness between -C---- any two levels is no greater than the resolution computed above. - - IF (NPARL.GT.1 .AND. HLFC-HT(1).GT.0) - & CALL INTPOS(VDIF,HTL,PL,TEL,NPARL) - -C---- Find the index corresponding to the LCL. - - IDXLCL=0 - DO I=1,NPARL - IF (ABS(PL(I)-PCB).LT.0.1) THEN - IDXLCL=I - GO TO 209 - END IF - END DO -209 CONTINUE - -C---- Compute potential temperatures of lifted parcel and environment at each -C---- level up to and including the LCL. Compute this portion of the negative -C---- energy. - - SUM=0.0 - THEL(1)=TEL(1)*((1000.0/PL(1))**0.286) - DO I=2,IDXLCL - THEL(I)=TEL(I)*((1000.0/PL(I))**0.286) - ENVMNT=0.5*(THEL(I-1)+THEL(I)) - IF (THDPAR.LT.ENVMNT) THEN - DB=((THDPAR-ENVMNT)/ENVMNT)*(HTL(I)-HTL(I-1)) - SUM=SUM+DB - END IF - END DO - NEG1=GE*SUM - -C---- Compute potential temperatures of lifted parcel and environment at each -C---- level between the LCL and the LFC. Compute this portion of the negative -C---- energy. - - SUM=0.0 - TPL=THDPAR*((PL(IDXLCL)/1000.0)**0.286) - THEL(IDXLCL)=TEL(IDXLCL)*((1000.0/PL(IDXLCL))**0.286) - THPL(IDXLCL)=TPL*((1000.0/PL(IDXLCL))**0.286) - DO I=IDXLCL+1,NPARL - ETPAR=EPTPAR*((PL(I)/1000.0)**0.286) - TPL=TEMP_OF_TE(ETPAR,PL(I)) - THEL(I)=TEL(I)*((1000.0/PL(I))**0.286) - THPL(I)=TPL*((1000.0/PL(I))**0.286) - PARCEL=0.5*(THPL(I-1)+THPL(I)) - ENVMNT=0.5*(THEL(I-1)+THEL(I)) - IF (PARCEL.LT.ENVMNT) THEN - DB=((PARCEL-ENVMNT)/ENVMNT)*(HTL(I)-HTL(I-1)) - SUM=SUM+DB - END IF - END DO - NEG2=GE*SUM - -C---- Compute total negative buoyancy below the LFC. - - NEGBUOY=NEG1+NEG2+(CINFRMCAPE) - -C---- Exit. - - RETURN - END diff --git a/nativeLib/rary.meteorological/src/parcel.f b/nativeLib/rary.meteorological/src/parcel.f deleted file mode 100755 index bf41b8228a..0000000000 --- a/nativeLib/rary.meteorological/src/parcel.f +++ /dev/null @@ -1,157 +0,0 @@ - SUBROUTINE PARCEL(P,T,HT,TVIR,THETA,NLVLS,PCB,HCB,TCB,WCB, - + THDPAR,EPTPAR,PL,TL, - + PP,HTP,TP,THETAP,TVIRP,TE,THETAE,TVIRE, - + NPAR) - IMPLICIT NONE -C -C Statement of purpose. -C --------------------- -C Fill up lifted parcel arrays and corresponding environmental arrays -C such that an exact one-to-one correspondence exists between lifted -C parcel parameters and environmental parameters. -C -C History. -C -------- -C Don Baker 10 May 85 Original version. -C -C Description of input and output. -C -------------------------------- -C On input: -C --------- -C P Real Array Sounding pressure levels (mb). -C HT Real Array Sounding heights (m asl). -C T Real Array Sounding temperatures (C). -C TVIR Real Array Sounding virtual temperatures (C). -C THETA Real Array Sounding potential temperatures (C). -C NLVLS Integer Number of sounding levels passed. -C PCB Real LCL pressure (mb). -C HCB Real LCL height (m asl). -C TCB Real LCL temperature (C). -C WCB Real LCL mixing ration (g/kg). -C THDPAR Real LCL potential temperature (C). -C EPTPAR Real LCL equivalent potential temperature (C). -C PL Real Initial parcel pressure (mb). -C TL Real Initial parcel temperature (mb). -C -C On output: -C ---------- -C PP Real Array Lifted parcel pressures (mb). -C HTP Real Array Lifted parcel heights (m asl). -C TP Real Array Lifted parcel temperatures (C). -C THETAP Real Array Lifted parcel potential temperatures (C). -C TVIRP Real Array Lifted parcel virtual temperatures (C). -C TE Real Array Sounding temperatures corresponding to lifted -C parcel temperatures (C). -C THETAE Real Array Sounding potential temperatures corresponding -C to lifted parcel potential temperatures (C). -C TVIRE Real Array Sounding virtual temperatures corresponding -C to parcel virtual temperatures (C). -C NPAR Integer Number of lifted parcel levels returned. -C -C -C Input arguments. -C - REAL P(1),T(1),HT(1),TVIR(1),THETA(1),PCB,HCB,TCB,WCB - REAL THDPAR,EPTPAR - REAL PL,TL - INTEGER NLVLS -C -C Output arguments. -C - REAL PP(1),TP(1),THETAP(1),TVIRP(1),HTP(1) - REAL TE(1),THETAE(1),TVIRE(1) - INTEGER NPAR -C -C Internal variables. -C - REAL PLOG1,PLOG2,PLOG3,TD - INTEGER J,K -C -C External functions. -C - REAL INTERP,TV,TMR,O,TSA,TDA -C -C Step 1. Assign first element of arrays to initial parcel values. -C this may involve interpolating environmental sounding data slightly -C to get data at mean parcel pressure. -C -C Note: Subscript J refers to lifted parcel comparison arrays. -C Subscript K refers to environmental sounding arrays. -C - J=1 - PP(J)=PL - TP(J)=TL - THETAP(J)=THDPAR - TD=TMR(WCB,PP(J)) - TVIRP(J)=TV(TP(J),TD,PP(J)) - DO 1 K=2,NLVLS - IF (P(K).LE.PL) THEN - PLOG1=ALOG(P(K-1)) - PLOG2=ALOG(PL) - PLOG3=ALOG(P(K)) - TE(J)=INTERP(T(K-1),T(K),PLOG1,PLOG2,PLOG3) - HTP(J)=INTERP(HT(K-1),HT(K),PLOG1,PLOG2,PLOG3) - THETAE(J)=O(TE(J),PP(J)) - TVIRE(J)=INTERP(TVIR(K-1),TVIR(K),PLOG1,PLOG2,PLOG3) - GO TO 2 - ENDIF - 1 CONTINUE - 2 IF (P(K).EQ.PL) K=K+1 -C -C Step 2. Compute coresponding arrays along the dry adiabat up to the LCL. -C - DO 3 K=K,NLVLS - IF (P(K).LE.PCB) GO TO 4 - J=J+1 - PP(J)=P(K) - HTP(J)=HT(K) - TP(J)=TDA(THDPAR,PP(J)) - THETAP(J)=THDPAR - TD=TMR(WCB,PP(J)) - TVIRP(J)=TV(TP(J),TD,PP(J)) - TE(J)=T(K) - THETAE(J)=THETA(K) - TVIRE(J)=TVIR(K) - 3 CONTINUE - 4 CONTINUE - IF (ABS(P(1)-PCB).LT.0.1) GO TO 211 -C -C Step 3. Compute corresponding array values at the LCL. -C - J=J+1 - PP(J)=PCB - HTP(J)=HCB - TP(J)=TCB - THETAP(J)=THDPAR - TVIRP(J)=TV(TP(J),TP(J),PP(J)) - PLOG1=ALOG(P(K-1)) - PLOG2=ALOG(PCB) - PLOG3=ALOG(P(K)) - TE(J)=INTERP(T(K-1),T(K),PLOG1,PLOG2,PLOG3) - THETAE(J)=O(TE(J),PP(J)) - TVIRE(J)=INTERP(TVIR(K-1),TVIR(K),PLOG1,PLOG2,PLOG3) - IF (P(K).EQ.PCB) K=K+1 -C -C Step 4. Compute corresponding array values from the LCL up to the -C top of the sounding. -C -211 DO 5 K=K,NLVLS - J=J+1 - PP(J)=P(K) - HTP(J)=HT(K) - TP(J)=TSA(EPTPAR,PP(J)) - THETAP(J)=O(TP(J),PP(J)) - TVIRP(J)=TV(TP(J),TP(J),PP(J)) - TE(J)=T(K) - THETAE(J)=THETA(K) - TVIRE(J)=TVIR(K) - 5 CONTINUE -C -C Set number of parcel levels. -C - NPAR=J -C -C Exit. -C - RETURN - END diff --git a/nativeLib/rary.meteorological/src/posarea.f b/nativeLib/rary.meteorological/src/posarea.f deleted file mode 100755 index 02eb30aed0..0000000000 --- a/nativeLib/rary.meteorological/src/posarea.f +++ /dev/null @@ -1,180 +0,0 @@ - SUBROUTINE POSAREA(PLFC,PEQLEV,TLFC,TEQLEV,HLFC,HEQLEV,EPTPAR, - + P,HT,TE,TP,NPAR, - + BUOY,CIN) - IMPLICIT NONE -C -C This routine computes the positive buoyant energy between the level of -C free convection and equilibrium level in a sounding. -C -C Don Baker 10 Jun 85 Original version. -C Dale Perry Sep 96 Adapted code to work with WFO. Removed the -C interpolation routine, since not needed with -C WFO interpolated data sets. -C -C Description of input and output. -C -------------------------------- -C On input: -C --------- -C PLFC Real Pressure of the level of free convection (mb). -C PEQLEV Real Pressure of the equilibrium level (mb). -C TLFC Real Temperature of the LFC (C). -C TEQLEV Real Temperature of the EL (C). -C HLFC Real Height of the LFC (m asl). -C HEQLEV Real Height of the EL (m asl). -C EPTPAR Real Equivalent potential temperature of the moist -C adiabat above the lifted condensation level, along -C which the saturated parcel rises (C). -C P Real Array Lifted parcel pressure levels (mb). -C HT Real Array Lifted parcel heights (m asl). -C TE Real Array Sounding temperatures at parcel pressures (C). -C TP Real Array Parcel temperatures at parcel pressures (C). -C NPAR Integer Number of levels of lifted parcel data. -C -C On output: -C ---------- -C BUOY Real Positive buoyant energy between the LFC and EL in -C joules per kilogram. -C NEGBUOY Real Negative energy between the level of the initial -C parcel and the equilibrium level. -C -C User notes: -C ----------- -C 1) This subroutine is called only if there exists a level of free convection. -C This is determined in the calling module. -C 2) Lifted parcel arrays contain parcel and environmental parameters at -C the same levels. The arrays begin at the lifted condensation level of -C the sounding and end at the top of the sounding. The parcel arrays -C are filled in a separate module. -C -C -C Input arguments. -C - INTEGER NPAR - REAL P(NPAR),HT(NPAR),TE(NPAR),TP(NPAR) - REAL PLFC,PEQLEV,TLFC,TEQLEV,HLFC,HEQLEV,EPTPAR,PEQ,HEQ,TEQ -C -C Output arguments. -C - REAL BUOY, CIN -C -C Internal parameters. -C - INTEGER NL - REAL FLG - PARAMETER (NL=500,FLG=-99998.) - REAL ETPAR,PARCEL,ENVMNT,SUM,DB,CINSUM,DB2 - REAL PL(NL),HTL(NL),TEL(NL),TPL,THEL(NL),THPL(NL) - INTEGER NPARL,J,IDX1,IDX2,I -C -C External functions. -C - REAL TEMP_OF_TE -C -C Subroutine constants. -C - REAL GE - PARAMETER (GE=9.80) -C -C Find the sounding level just below the LFC. -C -c initialization of return value and idx - CIN=0.0 - BUOY=FLG - idx1=0 - - DO 100 I=1,NPAR - IF (P(I).LT.PLFC) THEN - IDX1=I-1 - GO TO 10 - ENDIF - 100 CONTINUE -C -C Find the sounding level just above the EL. -C -10 PEQ=PEQLEV - HEQ=HEQLEV - TEQ=TEQLEV - IF (PEQLEV.GT.-FLG) THEN - PEQ=P(NPAR) - HEQ=HT(NPAR) - TEQ=TE(NPAR) - END IF - - DO 101 J=I,NPAR - IF (P(J).LT.PEQ) THEN - IDX2=J - GO TO 20 - ENDIF - 101 CONTINUE - IDX2=NPAR - 20 CONTINUE -C -C Initialize local parcel arrays to the LFC. -C - PL(1) =PLFC - HTL(1)=HLFC - TEL(1)=TLFC -C -C Assign remaining local sounding arrays to sounding levels between the -C LFC and EL. -C - NPARL=1 - DO 105 I=IDX1+1,IDX2-1 - NPARL=NPARL+1 - PL(NPARL)=P(I) - HTL(NPARL)=HT(I) - TEL(NPARL)=TE(I) - 105 CONTINUE -C -C Assign the last element of the local sounding arrays to the EL. -C - NPARL=NPARL+1 - PL(NPARL)=PEQ - HTL(NPARL)=HEQ - TEL(NPARL)=TEQ -C -C Compute resolution to which to interpolate local sounding pressures -C and temperatures. This is 1/25th of the thickness between the -C LFC and EL. -C -C VDIF=(HEQ-HLFC)/25 -C -C Interpolate data between the LFC and EL such that the thickness between -C any two levels is no greater than the resolution computed above. -C -C CALL INTPOS(VDIF,HTL,PL,TEL,NPARL) -C -C Compute lifted parcel potential temperature and sounding potential -C temperature at each level between the LFC and EL. -C - DO 110 I=1,NPARL - ETPAR=EPTPAR*((PL(I)/1000.0)**0.286) - TPL=TEMP_OF_TE(ETPAR,PL(I)) - THEL(I)=TEL(I)*((1000.0/PL(I))**0.286) - THPL(I)=TPL*((1000.0/PL(I))**0.286) - 110 CONTINUE -C -C Sum over all levels between the LFC and EL and compute positive buoyant -C energy. -C - - SUM=0. - CINSUM=0. - DO 120 I=2,NPARL - PARCEL=0.5*(THPL(I-1)+THPL(I)) - ENVMNT=0.5*(THEL(I-1)+THEL(I)) - IF (PARCEL.GT.ENVMNT) THEN - DB=((PARCEL-ENVMNT)/ENVMNT)*(HTL(I)-HTL(I-1)) - SUM=SUM+DB - ELSE - DB2=((PARCEL-ENVMNT)/ENVMNT)*(HTL(I)-HTL(I-1)) - CINSUM=CINSUM+DB2 - ENDIF - 120 CONTINUE - BUOY=GE*SUM - CIN=GE*CINSUM -C -C Exit. -C - RETURN - END diff --git a/nativeLib/rary.meteorological/src/pottemp.f b/nativeLib/rary.meteorological/src/pottemp.f deleted file mode 100755 index 8d04597238..0000000000 --- a/nativeLib/rary.meteorological/src/pottemp.f +++ /dev/null @@ -1,45 +0,0 @@ - - real function pottemp(temp,dwpt,pres,iw) - -c######################################################################## -c -c Statement of purpose: Calculates the potential temperature using Eq. 7 -c in Bolton, D., 1980: The computation of equivalent potential temperature. -c Monthly Weather Review, 108, 1046-1053. -c -c Date: 5 June 1997 -c -c Input: -c -c temp - temperature in degrees Kelvin -c dwpt - dew point temperature in degrees Kelvin -c pres - pressure in millibars -c iw - >0 for mixing ratio with respect to water -c <0 for mixing ratio with respect to ice -c -c Output: -c -c tpot - potential temperature in degrees Kelvin -c -c######################################################################## - - real temp, dwpt, pres, dkappa - integer iw - -C -C Function declaration -C - real dmixr -c -c Compute the potential temperature. -c - - dkappa= .2854d0*(1.0d0-(.28d-3*dmixr(dwpt,pres,iw))) - pottemp= temp*((1000.0d0/pres)**dkappa) - return - end - - - - - diff --git a/nativeLib/rary.meteorological/src/powercalc.f b/nativeLib/rary.meteorological/src/powercalc.f deleted file mode 100755 index f9f4d6caa7..0000000000 --- a/nativeLib/rary.meteorological/src/powercalc.f +++ /dev/null @@ -1,46 +0,0 @@ -c -c - subroutine powercalc(a,b,result,mni,ni,nj) -c -c..... Raise each item in the field a to the power in field b. -c..... result = a**b -c -c..... J Ramer Jun 95 -c - implicit none - include 'IntrinsicFunctions.inc' -c declare formal arguments - integer mni, ni, nj - real a(mni,nj), b(mni,nj), result(mni,nj) -c - integer i, j, bb - real flag, bad - parameter(flag = 1.e37) -c - bad = 1e10 - do 1 j=1,nj - do 1 i=1,ni - if(a(i,j).gt.bad .or. b(i,j).gt.bad) then - result(i,j) = flag - else if (a(i,j).eq.0.0) then - if (b(i,j).lt.0.0) then - result(i,j) = flag - else - result(i,j) = 0.0 - endif - else if (b(i,j).eq.0.0) then - result(i,j) = 1.0 - else if(a(i,j).gt.0.0) then - result(i,j) = a(i,j) ** b(i,j) - else - bb = jint(b(i,j)) - if (bb.ne.b(i,j)) then - result(i,j) = flag - else - result(i,j) = a(i,j) ** bb - endif - endif -1 continue -c - return - end diff --git a/nativeLib/rary.meteorological/src/press2alt.f b/nativeLib/rary.meteorological/src/press2alt.f deleted file mode 100755 index d5c7fbcfef..0000000000 --- a/nativeLib/rary.meteorological/src/press2alt.f +++ /dev/null @@ -1,45 +0,0 @@ -c -c - subroutine press2alt(p,z,mni,ni,nj,alt) -c -c.............................................................................. -c -c Routine to get altimeter setting from pressure and elevation. -c -c -c Inputs/Outputs: -c -c Variable Var Type I/O Description -c ---------- ---------- ----- ------------- -c p RA O Pressure (X) -c z RA I Elevation in meters. -c mni I I First dimension of input array. -c ni,nj I I Grid dimensions in i,j. -c alt RA I Altimeter setting (X) -c -c -c User Notes: -c -c 1. No quality control is performed in this routine. -c -c.............................................................................. -c - implicit none - integer mni, ni, nj, i, j - real p(mni,nj), z(mni,nj) - real alt(mni,nj) - real flg,flag,T0,gamma,g_Rgamma - Data flg, flag, T0, gamma, g_Rgamma - & /99998.0,1e37,288.0,0.0065,5.2532/ - - Do 10 j=1,nj - Do 10 i=1,ni - If (p(i,j).gt.flg .or. z(i,j).gt.flg) then - alt(i,j)=flag - Else - alt(i,j)=p(i,j)/((T0-gamma*z(i,j))/T0)**g_Rgamma - End If -10 Continue - - return - end diff --git a/nativeLib/rary.meteorological/src/presstable.f b/nativeLib/rary.meteorological/src/presstable.f deleted file mode 100755 index a59041d808..0000000000 --- a/nativeLib/rary.meteorological/src/presstable.f +++ /dev/null @@ -1,58 +0,0 @@ -c -c - subroutine pres_stability(t_up,t_low,p_up,p_low,stab,mni,ni,nj) -c -c............................................................................... -c -c Routine to calculate the isobaric stability in an isobaric layer. -c -c Changes: -c J. Ramer 10-25-94 Stole from isenstable.for -c -c Inputs/Outputs: -c -c Variable Var Type I/O Description -c ---------- ---------- ----- ------------- -c t_up RA I Theta on upper isobaric sfc (K) -c t_low RA I Theta on this isobaric sfc (K) -c p_up R I Upper pressure (mb) -c p_low R I This (lower) pressure (mb) -c stab RA O Stability through the layer (mb/K) -c mni I I First dimension of input array. -c ni, nj I I Grid dimensions in i,j. -c bad R - Bad data value. -c flag R - Bad data flag. -c -c -c User Notes: -c -c 1. Stability is defined as -dP/d(theta). We calculate this through -c the layer from the isobaric surface 'n' to the surface above it, -c 'n+1'. -c -c............................................................................... -c - implicit none - real p_up, p_low, bad, flag, dp - integer i, j, mni, ni, nj - real*4 t_up(mni,nj), t_low(mni,nj) - real*4 stab(mni,nj) -c - parameter(flag = 1.e37) - bad = 1.e6 - 2. -c -c -c..... Now calculate the isobaric stability. -c - dp = p_up - p_low - do 2 j=1,nj - do 2 i=1,ni - if(t_low(i,j).gt.bad .or. t_up(i,j).gt.bad) then - stab(i,j) = flag - else - stab(i,j) = dp/(t_low(i,j)-t_up(i,j)) - endif -2 continue -c - return - end diff --git a/nativeLib/rary.meteorological/src/pseudolift.f b/nativeLib/rary.meteorological/src/pseudolift.f deleted file mode 100755 index a36f31eb5e..0000000000 --- a/nativeLib/rary.meteorological/src/pseudolift.f +++ /dev/null @@ -1,194 +0,0 @@ - - subroutine pseudolift(n,pstart,pfinish,soln) - implicit none - -c####################################################################### -c -c Statement of purpose: Calculates the temperature along a pseudo-moist -c adiabat by solving, as an initial value problem, the differential -c equation describing the pseudo-moist adiabat. Uses a fourth order -c Adams predictor-corrector scheme started with a Runge-Kutta fourth -c order scheme. The methods are based on those in Burden, R.L. and J.D. -c Faires, 1985: Numerical Analysis 3rd Edition, PWS Publishers, 676 pp. -c -c Date: 14 October 1997 -c -c Input: -c -c n - number of mesh points on the pressure axis between -c start and finish -c pstart - initial pressure [mb] (start integration here) -c pfinish - final pressure [mb] (end integration here) -c soln - array containing the initial value of the temperature -c (degrees K) in soln(0) at the starting pressure -c -c Output: -c -c soln - array containing the temperatures (degrees K) at each grid -c point along the pseudo-moist adiabat that runs through -c starting pressure and initial temperature in soln(0) -c -c###################################################################### - - real pstart, pfinish, start, finish, h - real*8 dk1, dk2, dk3, dk4, tt, wt - integer i, j, k, n - real w(0:3),t(0:3),soln(0:n) - -C -C Function declaration -C - real*8 pmalrrhs - - w(0) = soln(0) -c -c Check to see that beginning and ending points of integration -c interval differ from one another. If not, set solution array -c to initial value and return. -c - - if (abs(pstart-pfinish).lt.1.0d-6) then - do 25 k= 1,n - soln(k)= soln(0) - 25 continue - return - endif - -c -c Set up initial value for the pressure and compute the step size. -c - - t(0) = pstart*1.0d2 - start= t(0) - finish= pfinish*1.0d2 - h= (finish-start)/dble(n) - -c -c Use the 4th order Runge-Kutta one-step scheme to get the solution -c at the first three pressure increments beyond the initial pressure. -c - - do 50 i= 1,3 - dk1= h*pmalrrhs(real(t(i-1)),real(w(i-1))) - dk2= h*pmalrrhs(real(t(i-1)+(h/2.0d0)), - + real(w(i-1)+(dk1/2.0d0))) - dk3= h*pmalrrhs(real(t(i-1)+(h/2.0d0)), - + real(w(i-1)+(dk2/2.0d0))) - dk4= h*pmalrrhs(real(t(i-1)+h),real(w(i-1)+dk3)) - w(i)= w(i-1)+real((dk1+dk2+dk2+dk3+dk3+dk4)/6.0) - t(i)= start+(i*h) - soln(i)= w(i) - 50 continue - -c -c Use the Adams four step, 4th order predictor-corrector scheme to -c find the rest of the solution. -c - - 60 tt= start+(real(i)*h) - if ((start.lt.finish).and.(tt.gt.finish)) return - if ((start.gt.finish).and.(tt.lt.finish)) return - if (start.eq.finish) return - -c -c Prediction step. -c - - wt= w(3)+((h/24.d0)*((55.0d0*pmalrrhs(real(t(3)),real(w(3)))) - & -(59.0d0*pmalrrhs(real(t(2)),real(w(2)))) - + +(37.0d0*pmalrrhs(real(t(1)),real(w(1)))) - & -( 9.0d0*pmalrrhs(real(t(0)),real(w(0)))))) - -c -c Correction step. -c - - wt= w(3)+((h/24.0d0)*(( 9.0d0*pmalrrhs(real(tt), real(wt))) - & +(19.0d0*pmalrrhs(real(t(3)),real(w(3)))) - + -( 5.0d0*pmalrrhs(real(t(2)),real(w(2)))) - & +( 1.0d0*pmalrrhs(real(t(1)),real(w(1)))))) - soln(i)= wt - -c -c Advance to the next value of the independent variable. -c - - do 70 j= 0,2 - t(j)= t(j+1) - w(j)= w(j+1) - 70 continue - t(3)= tt - w(3)= wt - i=i+1 - goto 60 - end - -c---------------------------------------------------------------------- - - real*8 function pmalrrhs(p,tk) - implicit none - -c###################################################################### -c -c Statement of purpose: Calculates the right hand side of the ODE which -c defines the pseudo-moist adiabatic lapse rate. This is Eq. A.1.24 in -c Young, K.C., 1993: Microphysical Processes in Clouds. Oxford University -c Press, 427 pp. The latent heat of vaporization relationship is Eq. 2 -c in Bolton, D., 1980: The computation of equivalent potential temperature. -c Monthly Weather Review, 108, 1046-1053. Physical constants from -c Sonntag, D. 1990: Important new values of the physical constants of 1986, -c vapour pressure formulations based on the ITS-90, and psychrometer -c formulae. Z. Meteorol., 40, 340-344. -c -c Input: -c -c p - pressure in millibars -c t - temperature in degrees Kelvin -c -c Output: -c -c pmalrrhs - value of pseudo-moist adiabatic lapse rate in degrees -c Kelvin per Pascal (C Pa^-1) -c -c###################################################################### - - real p, tk - real*8 dmv, dmd, rv, rd, dlv, cp, es, ftop, fbot - -C -C Function declaration -C - real vp -c -c Input physical constants. -c -c dmv - molar mass of water vapour (kg mol^-1) -c dmd - molar mass of dry air (kg mol^-1) -c rv - gas constant of water vapour (J kg^-1 K^-1) -c rd - gas constant of dry air (J kg^-1 K^-1) -c dlv - latent heat of vaporization (J kg^-1) -c cp - specific heat of air at constant pressure (J kg^-1 K^-1) -c - - dmv = .01801528d0 - dmd = .0289645d0 - rv = 461.525d0 - rd = 287.0586d0 - dlv= (2.501d0-(.00237d0*tk))*1.0d6 - cp = 1005.7d0 - -c -c Convert temperature to Kelvin. Calculate vapor pressure. -c - - es = vp(tk,1) - -c -c Calculate right hand side. -c - - ftop = (rd*tk/p)+(dmv*es*dlv/p/p/dmd) - fbot = cp+(dlv*dlv*dmv*es/dmd/rv/p/tk/tk) - pmalrrhs = ftop/fbot - return - end diff --git a/nativeLib/rary.meteorological/src/ptozsa.f b/nativeLib/rary.meteorological/src/ptozsa.f deleted file mode 100755 index 5f0e0ceaa0..0000000000 --- a/nativeLib/rary.meteorological/src/ptozsa.f +++ /dev/null @@ -1,30 +0,0 @@ - Real*4 Function PtoZsa(p) - -C* This routine converts a pressure in milibars into a height in a -C* standard atmosphere in meters. - -C Author: J Ramer written in the late 1980's - - Implicit None - - Real*4 T0,gamma,p0,p11,z11,c1,c2,p - - Data T0,gamma,p0/288.,.0065,1013.2/ - Data c1,c2/5.256,14600./ - Data z11,p11/11000.,226.0971/ - - Real*4 Flag,Flg - Common/FlagFlg/Flag,Flg - Data Flag,Flg/1e37,1.0E10/ - - If (p.gt.Flg .or. p.lt.1.0) Then - PtoZsa=Flag - Else If (p.gt.p11) Then - PtoZsa=((T0-T0*(p/p0)**(1/c1))/gamma) - Else - PtoZsa=(c2*alog10(p11/p)+z11) - End If - - Return - End - diff --git a/nativeLib/rary.meteorological/src/pvadv.f b/nativeLib/rary.meteorological/src/pvadv.f deleted file mode 100755 index b949fa2751..0000000000 --- a/nativeLib/rary.meteorological/src/pvadv.f +++ /dev/null @@ -1,87 +0,0 @@ -c -c - subroutine pvadv(p_up,p_low,o_up,o_low,pva,pvort, - & mni,ni,nj,u_up,v_up,u_low,v_low, - & dx,dy,coriolis,u,v) -c -c............................................................................... -c -c Routine to calculate the isentropic potential vorticity advection -c through a layer. -c -c Changes: -c P.A. Stamus 01-30-90 Original -c -c Inputs/Outputs: -c -c Variable Var Type I/O Description -c ---------- ---------- ----- ------------- -c p_up RA I Pressure on upper isentrope (mb) -c p_low RA I Pressure on this isentrope (mb) -c th_up R I Upper isentrope (K) -c th_low R I This (lower) isentrope (K) -c u_up, v_up RA I U, V winds on upper isentrope (m/s) -c u_low, v_low RA I U, V winds on lower isentrope (m/s) -c dx, dy RA I Grid interval (meters) in x,y dir. -c pva RA O Potential vorticity advect.(K/mb/s2) -c pvort RA I Work array for PV (K/mb/s) -c mni I I First dimension of input array. -c ni, nj I I Grid dimensions in i,j. -c coriolis RA I Coriolis parameters (/s) -c u, v RA I Work arrays for mean winds (m/s) -c -c -c User Notes: -c -c 1. Stability is defined as -dP/d(theta). We calculate this through -c the layer from the isentropic surface 'n' to the surface above it, -c 'n+1'. -c -c 2. Since we are dealing with a layer, we calculate a mean absolute -c vorticity using the winds at the upper and lower layers. The PV -c is then [mean abs. vort.]/[stability]. -c -c 3. The advection is calculated using a mean wind through the layer. -c -c............................................................................... -c - implicit none - real o_up, o_low, bad, flag - integer i, j, mni, ni, nj - real*4 p_up(mni,nj), p_low(mni,nj) - real*4 pvort(mni,nj), pva(mni,nj) - real u_up(mni,nj), v_up(mni,nj) - real u_low(mni,nj), v_low(mni,nj) - real dx(mni,nj), dy(mni,nj), coriolis(mni,nj) - real u(mni,nj), v(mni,nj) -c - parameter(flag = 1.e37) - bad = 1.e6 - 2. -c -c..... Start. First calculate the potential vorticity through the layer, -c.... use u and v as work arrays. - call calcpv(p_up,p_low,o_up,o_low,pvort,mni,ni,nj, - & u_up,v_up,u_low,v_low,u,v,dx,dy,coriolis) -c -c..... Now calculate a mean wind through the layer. -c - do 1 j=1,nj - do 1 i=1,ni - if(u_up(i,j).gt.bad .or. u_low(i,j).gt.bad) then - u(i,j) = flag - else - u(i,j) = (u_up(i,j) + u_low(i,j)) * 0.5 ! mean u wind - endif - if(v_up(i,j).gt.bad .or. v_low(i,j).gt.bad) then - v(i,j) = flag - else - v(i,j) = (v_up(i,j) + v_low(i,j)) * 0.5 ! mean v wind - endif -1 continue -c -c..... Now calculate the potential vorticity advection. -c - call g2gkinematics(u,v,pvort,dx,dy,mni,nj,ni,nj,5,pva) -c - return - end diff --git a/nativeLib/rary.meteorological/src/pvalue.f b/nativeLib/rary.meteorological/src/pvalue.f deleted file mode 100755 index 63c3183369..0000000000 --- a/nativeLib/rary.meteorological/src/pvalue.f +++ /dev/null @@ -1,60 +0,0 @@ - subroutine pvalue(pres,p,np,param,value) - implicit none -C############################################################################### -C Statement of purpose. -C --------------------- -C Compute the value of some parameter in a sounding at a given pressure level -C using log pressure interpolation. -C -C History. -C -------- -C D. Baker 25 Mar 87 Original version. -C -C Description of input and output. -C -------------------------------- -C On input: -C --------- -C pres Real Pressure level where parameter value desired. -C p Real Array Sounding pressures (mb). -C np Integer Number of pressure levels input. -C param Real Array Values of parameter at each pressure level. -C -C On output: -C ---------- -C value Real Value of parameter at desired pressure level. -C############################################################################### -C Input arguments. - real p(1),param(1) - real pres - integer np -C Output argument. - real value -C Local variables. - integer i - real p1,p2,p3 -C Local constants. - real flag - parameter (flag=99999.) -C External functions. - real interp1 -C Make sure that the computation is possible. - value=flag - if (pres.lt.p(np) .or. pres.gt.p(1)) go to 9999 -C Check and see if the lowest pressure is equal to the desired pressure. - if (abs(p(1)-pres).lt.0.1) then - value=param(1) - go to 9999 - end if -C Determine value of parameter at level "pres" in the sounding. - do 100 i=2,np - if (p(i).le.pres) then - p1=alog(p(i-1)) - p2=alog(pres) - p3=alog(p(i)) - value=interp1(param(i-1),param(i),p1,p2,p3) - go to 9999 - end if -100 continue -C Return to calling program. -9999 return - end diff --git a/nativeLib/rary.meteorological/src/pvpres.f b/nativeLib/rary.meteorological/src/pvpres.f deleted file mode 100755 index dc646fa90b..0000000000 --- a/nativeLib/rary.meteorological/src/pvpres.f +++ /dev/null @@ -1,102 +0,0 @@ - -c -c - subroutine pvpres(t_up,t_low,p_up,p_low,pvort,mni,ni,nj, - & u_up,v_up,u_low,v_low,avort1,avort2, - & dtdx1,dtdy1,dtdx2,dtdy2, - & dx,dy,coriolis) -c -c.............................................................................. -c -c Routine to calculate the isobaric potential vorticity through a layer. -c -c Changes: -c J. Ramer 10-25-94 Stole from pv.for -c J. Ramer 02-25-02 Generalized for grids of p -c -c Inputs/Outputs: -c -c Variable Var Type I/O Description -c ---------- ---------- ----- ------------- -c t_up RA I Theta on upper isobaric sfc (K) -c t_low RA I Theta on this isobaric sfc (K) -c p_up RA I Upper pressure (mb) -c p_low RA I This (lower) pressure (mb) -c u_up, v_up RA I U, V winds on upper surface (m/s) -c u_low, v_low RA I U, V winds on lower surface (m/s) -c pvort RA O Potential vorticity (K/mb/s) -c mni I I First dimension of input array. -c ni, nj I I Grid dimensions in i,j. -c avort1, avort2 RA I Work arrays for abs. vorticity -c dtdx1,dtdy1 RA I Work arrays for theta gradients -c dtdx2,dtdy2 RA I Work arrays for theta gradients -c dx, dy RA I Grid interval (meters) in x,y dir. -c coriolis RA I Coriolis parameters (/s) -c -c -c User Notes: -c -c 1. Stability is defined as -dP/d(theta). We calculate this through -c the layer from the isobaric surface 'n' to the surface above it, -c 'n+1'. -c -c 2. Since we are dealing with a layer, we calculate a mean absolute -c vorticity using the winds at the upper and lower layers. -c -c 3. The PV is then [mean abs. vort.]/[stability] + theta->pres term -c -c.............................................................................. -c - implicit none - real p_up(mni,nj), p_low(mni,nj), bad, flag, dp, dt - real du, dv, dtdx, dtdy, av - integer i, j, mni, ni, nj - real*4 t_up(mni,nj), t_low(mni,nj) - real*4 pvort(mni,nj) - real u_up(mni,nj), v_up(mni,nj), avort1(mni,nj) - real u_low(mni,nj), v_low(mni,nj), avort2(mni,nj) - real dtdx1(mni,nj), dtdy1(mni,nj) - real dtdx2(mni,nj), dtdy2(mni,nj) - real dx(mni,nj), dy(mni,nj), coriolis(mni,nj) -c - parameter(flag = 1.e37) - bad = 1.e6 - 2. -c -c..... Calculate the absolute vorticity at each isobaric surface. -c - call G2Gkinematics(u_up,v_up,coriolis,dx,dy, - & mni,nj,ni,nj,1,avort1) - call G2Gkinematics(u_low,v_low,coriolis,dx,dy, - & mni,nj,ni,nj,1,avort2) -c -c..... Calculate the temperature gradient on each surface -c - call G2Gkinematics(dtdx2,dtdy2,coriolis,dx,dy, - & mni,nj,ni,nj,7,t_up) - call G2Gkinematics(dtdx1,dtdy1,coriolis,dx,dy, - & mni,nj,ni,nj,7,t_low) -c -c..... Now calculate the isobaric potential vorticity. -c - do 1 j=1,nj - do 1 i=1,ni - if (p_up(i,j).gt.bad .or. p_low(i,j).gt.bad .or. - & t_up(i,j).gt.bad .or. t_low(i,j).gt.bad .or. - & avort1(i,j).gt.bad .or. avort2(i,j).gt.bad .or. - & dtdx1(i,j).gt.bad .or. dtdy1(i,j).gt.bad .or. - & dtdx2(i,j).gt.bad .or. dtdy2(i,j).gt.bad) then - pvort(i,j) = flag - else - dp = p_up(i,j)-p_low(i,j) - dt = t_up(i,j)-t_low(i,j) - du = u_up(i,j)-u_low(i,j) - dv = v_up(i,j)-v_low(i,j) - dtdx = dtdx1(i,j)+dtdx2(i,j) - dtdy = dtdy1(i,j)+dtdy2(i,j) - av = avort1(i,j)+avort2(i,j) - pvort(i,j) = -0.5 * ( av*dt + (du*dtdy - dv*dtdx) ) / dp - endif -1 continue -c - return - end diff --git a/nativeLib/rary.meteorological/src/qdiverg.f b/nativeLib/rary.meteorological/src/qdiverg.f deleted file mode 100755 index 1c1ebae252..0000000000 --- a/nativeLib/rary.meteorological/src/qdiverg.f +++ /dev/null @@ -1,84 +0,0 @@ -c -c - subroutine qdiverg(zmid,ztop,zbot,ptop,pbot,mni,ni,nj,dx,dy,f, - & w1,w2,w3,w4,w5,qx,qy,qdiv) -c -C############################################################################### -C Statement of purpose. -C --------------------- -C This routine computes the q-vector divergence at a specified -C pressure level. -C -C History. -C -------- -C D. Baker 01 Oct 86 Original version based on equations given -C in Barnes (????). -C P. Stamus 30 Aug 89 Second part from Baker's original. -c 20 Sep 89 Add implicit none. -C -C Description of input and output. -C -------------------------------- -C On input: -C --------- -c mni Integer First dimension of input array. -C ni, nj Integer Number of points in the x- and y-directions. -C dx, dy Real Array Grid spacing in the x- and y-directions (m). -C f Real Array Coriolis parameter at each grid point (/s). -C zmid Real Array Heights at each grid point for level at which -C q-vector is being computed (m asl). -C ztop Real Array Heights at each grid point for the top of the -C layer, the center of whose heights are given -C in zmid (m asl). -C zbot Real Array Same as ztop except for the bottom of the layer -C (m asl). -C ptop Real Pressure level corresponding to ztop (mb). -C pbot Real Pressure level corresponding to zbot (mb). -C w1-w5 Real Array Work arrays. -C qx, qy Real Array Work arrays holding the Q-vector components. -C -C On output: -C ---------- -C qdiv Real Array Q-divergence at the grid points. -C -C User notes: -C ----------- -C 1. No scaling of the output is done in this routine. -C -C############################################################################### -c - implicit none -c - integer mni, ni, nj - real flag, bad, ptop, pbot -c -c---- Declare input arguments. -c - real dx(mni,nj), dy(mni,nj) - real f(mni,nj), ztop(mni,nj), zbot(mni,nj), zmid(mni,nj) -c -c---- Declare output arguments. -c - real qdiv(mni,nj) -c -c---- Declare other parameters and work arrays. -c - parameter(flag = 1.e37) - real w1(mni,nj), w2(mni,nj), w3(mni,nj) - real w4(mni,nj), w5(mni,nj) - real qx(mni,nj), qy(mni,nj) -c - bad = 1.e6 - 2. -c -c---- Step 1: -c---- Compute the Q-vector components. -c - call qvector(zmid,ztop,zbot,ptop,pbot,mni,ni,nj,dx,dy,f, - & w1,w2,w3,w4,w5,qdiv,qx,qy) -c -c---- Step 2: -c---- Compute the divergence. -c - call G2Gkinematics(qx,qy,f,dx,dy,mni,nj,ni,nj,2,qdiv) -c - return - end diff --git a/nativeLib/rary.meteorological/src/qvector.f b/nativeLib/rary.meteorological/src/qvector.f deleted file mode 100755 index 618cb851ec..0000000000 --- a/nativeLib/rary.meteorological/src/qvector.f +++ /dev/null @@ -1,159 +0,0 @@ -c - subroutine qvector(zmid,ztop,zbot,ptop,pbot,mni,ni,nj,dx,dy,f, - & dugdx,dvgdx,dugdy,dvgdy,dtdx,dtdy,qx,qy) -c -C############################################################################### -C Statement of purpose. -C --------------------- -C This routine computes the q-vector components at a specified -C pressure level. -C -C History. -C -------- -C D. Baker 01 Oct 86 Original version based on equations given -C in Barnes (????). -C P. Stamus 30 Aug 89 Made divergence a separate routine, cleaned up -C Baker's version, pass in work arrays, etc. -c 20 Sep 89 Add implicit none. -C E. Thaler 22 Aug 91 Changed to use only two pressure levels. -C J. Ramer 24 Feb 92 New algorithm for derivatives of geostrophic -C wind components. -C -C Description of input and output. -C -------------------------------- -C On input: -C --------- -c mni Integer First dimension of input array. -C ni, nj Integer Number of points in the x- and y-directions. -C dx, dy Real Array Grid spacing in the x- and y-directions (m). -C f Real Array Coriolis parameter at each grid point (/s). -C zmid Real Array Heights at each grid point for level at which -C q-vector is being computed (m asl). -C ztop Real Array Heights at each grid point for the top of the -C layer, the center of whose heights are given -C in zmid (m asl). -C zbot Real Array Same as ztop except for the bottom of the layer -C (m asl). -C ptop Real Pressure level corresponding to ztop (mb). -C pbot Real Pressure level corresponding to zbot (mb). -C dugdx-dtdy Real Array Work arrays. -C -C On output: -C ---------- -C qx, qy Real Array Q-vector components at grid points. -C -C User notes: -C ----------- -C 1. No scaling of the output is done in this routine. -C 2. Units of Q-vector on output are K/m/s -C -C############################################################################### -c - implicit none -c declare formal arguments - integer mni, ni, nj - real zmid(mni,nj), ztop(mni,nj), zbot(mni,nj), ptop, pbot -c---- Declare input arguments. - real dx(mni,nj), dy(mni,nj), f(mni,nj) -c---- Declare local parameters and work arrays. - real*4 dugdx(mni,nj), dvgdx(mni,nj), dugdy(mni,nj), dvgdy(mni,nj) - real*4 dtdx(mni,nj), dtdy(mni,nj) -c---- Declare output arguments. - real qx(mni,nj), qy(mni,nj) -c - integer i, j - real flag, bad, g, const, pavg -c - Integer*4 passes - Real*4 smoothness - Common /qsmthcmn/passes,smoothness - parameter(flag = 1.e37) - - data g/9.806/ - data bad/99998./ -c -c---- Step 1: -c---- Compute the "mean layer" geostrophic wind components at each grid point, -c---- using the mean height between the two levels. -c---- (store components in qx and qy) -c - do 102 j=1,nj - do 102 i=1,ni - If (ztop(i,j).gt.bad .or. zbot(i,j).gt.bad) Then - zmid(i,j) = flag - Else - zmid(i,j) = (ztop(i,j) + zbot(i,j))/2. - Endif - 102 continue - -c smooth heights and calculate components of the geostrophic wind. - Do i=1,passes/2 - call smooth(zmid,qx,mni,ni,nj,smoothness) - call smooth(qx,zmid,mni,ni,nj,smoothness) - EndDo - if (iand(passes,1).eq.1) then - call smooth(zmid,qx,mni,ni,nj,smoothness) - call DgeoComps(qx,f,dx,dy,mni,nj,ni,nj, - & dugdx,dugdy,dvgdx,dvgdy) - else - call DgeoComps(zmid,f,dx,dy,mni,nj,ni,nj, - & dugdx,dugdy,dvgdx,dvgdy) - end if -c -c---- Step 3: -c---- Compute the partial with respect to pressure of the geopotential -c---- between the top and bottom layers. The sign is reversed per the -c---- definition of q-vector equation. 'const' is used to convert from -c---- potential temperature gradient to thickness gradient. (store in qx) -c - pavg = exp ( (alog(pbot) + alog(ptop))/2. ) - const = (g*pavg) / (287. * (ptop-pbot) * ((pavg/1000.)**.286)) - do 104 j=1,nj - do 104 i=1,ni - if(ztop(i,j).gt.bad .or. zbot(i,j).gt.bad) then - qx(i,j) = flag - else - qx(i,j) = (-const) * (ztop(i,j) - zbot(i,j)) - endif -104 continue -c -c---- Step 4: -c---- Smooth and compute the gradient of the quantity computed in step 3 above. -c---- (f is just a place holder) -c - Do i=1,passes/2 - call smooth(qx,qy,mni,ni,nj,smoothness) - call smooth(qy,qx,mni,ni,nj,smoothness) - EndDo - if (iand(passes,1).eq.1) then - call smooth(qx,qy,mni,ni,nj,smoothness) - call G2Gkinematics(dtdx,dtdy,f,dx,dy,mni,nj,ni,nj,7,qy) - else - call G2Gkinematics(dtdx,dtdy,f,dx,dy,mni,nj,ni,nj,7,qx) - endif -c -c---- Step 5: -c---- Compute the x-component of the q-vector. This is the partial with -c---- respect to x of the geostrophic wind dotted with the quantity -c---- computed in step 4. Similiarly the y-component of the q-vector -c---- is the partial with respect to y of the geostrophic wind dotted -c---- with the quantity computed in step 4. The equations are: -c -c Qx = -d(ug)/dx * d(dz/dp)/dx - d(vg)/dx * d(dz/dp)/dy -c Qy = -d(ug)/dy * d(dz/dp)/dx - d(vg)/dy * d(dz/dp)/dy -c - do 108 j=1,nj - do 108 i=1,ni - if (dugdx(i,j).gt.bad .or. dugdy(i,j).gt.bad .or. - & dvgdx(i,j).gt.bad .or. dvgdy(i,j).gt.bad .or. - & dtdx(i,j).gt.bad .or. dtdy(i,j).gt.bad) Then - qx(i,j) = flag - qy(i,j) = flag - else - qx(i,j) = (-dugdx(i,j)) * dtdx(i,j) - dvgdx(i,j) * dtdy(i,j) - qy(i,j) = (-dugdy(i,j)) * dtdx(i,j) - dvgdy(i,j) * dtdy(i,j) - endif -108 continue -c - return - end diff --git a/nativeLib/rary.meteorological/src/radiation.f b/nativeLib/rary.meteorological/src/radiation.f deleted file mode 100755 index 8b88381785..0000000000 --- a/nativeLib/rary.meteorological/src/radiation.f +++ /dev/null @@ -1,67 +0,0 @@ - SUBROUTINE RADIATION(LAT,LNG,LSM,JD,HR,BEXT,OD,SOLRAD) -C***Calculate mean solar radiation at ground - -C G. Williams Oct 81 From code at SERI -C J. Wakefield Jan 82 Put everything in radians -C 29 Jan 82 Only calculate if sun above horizon -C 12 Feb 82 Made HR decimal hours (was integer) -C 25 Mar 82 Corrected sign error in TIMCORR -C G. Williams 24 May 82 Changed extinction coefficient -C and optical depth from fixed -C values to subroutine I/O -C K. Brundage 18 Oct 84 Changed bug in optical depth - -C***Arguments -C LAT Input R*4 Latitude (degrees) -C LNG Input R*4 Longitude (degrees) -C LSM Input R*4 Longitude of standard meridian (degrees) -C JD Input I*4 Julian day -C HR Input R*4 Local standard time (decimal hours) -C BEXT Input R*4 Rayleigh extinction coefficient -C OD Input R*4 Optical depth -C SOLRAD Output R*4 Mean solar radiation at ground (W/m**2) -c - Implicit None -c declare formal arguments - real*4 LAT, LNG, LSM - integer*4 JD, HR - real*4 BEXT, OD, SOLRAD -c - REAL*4 AVGTIM, HOUR -c ---------------- - real*4 coszen, do, dec, eqt, erv, hetrdn, hetrhz, hrangle, - + PI, pl, rpd, rph, rlat, sc, timcorr - external radnorm, soldec, timeq - real radnorm, soldec, timeq -c ---------------- - parameter(PI=3.14159265) - - RPD=PI/180. - RPH=PI/12. - RLAT=LAT*RPD - SC = 1353. !Solar constant in W/m**2 - - AVGTIM=5./60. !Average for 5 min period - - DEC=SOLDEC(JD) !Solar declination - HRANGLE = (HR-12.)*RPH - COSZEN=SIN(RLAT)*SIN(DEC)+COS(RLAT)*COS(DEC)*COS(HRANGLE) - - IF(COSZEN.LE..0)THEN - SOLRAD=.0 !Sun at or below horizon - ELSE - ERV=RADNORM(JD) !Distance from sun factor - DO = SC*ERV !Horiz rad at top of atmosphere - - EQT=TIMEQ(JD) !Equation of time - TIMCORR=(LNG-LSM)/15.+EQT/RPH !In hours - -C***Compute ETR for the hour - HOUR = HR-TIMCORR - CALL ETRAVG(DO,RLAT,DEC,HOUR,AVGTIM,HETRHZ,HETRDN) - PL = OD/COSZEN !Path length - SOLRAD = HETRHZ*EXP((-BEXT)*PL) - ENDIF - - RETURN - END diff --git a/nativeLib/rary.meteorological/src/radrtns.f b/nativeLib/rary.meteorological/src/radrtns.f deleted file mode 100755 index a9ea866174..0000000000 --- a/nativeLib/rary.meteorological/src/radrtns.f +++ /dev/null @@ -1,160 +0,0 @@ - SUBROUTINE RADRTNS -C***Some solar radiation routines from SERI - -C G. Williams Oct 81 From SERI -C J. Wakefield Jan 82 Removed entry points RADVEC (replaced -C by RADNORM) and SOLDEC (replaced by -C TIMEQ and SOLDEC in SUNFUNCS.FOR). -C Also changed argument lists in ETRxxx. -C Feb 82 Made SUNSET a function, and in radians -C 19 Feb 82 Added ERTAVG. - Implicit None - - REAL*4 LAT,DEC,SSHA,DO,DETRHZ - REAL*4 PI,RPH,RPD - REAL*4 MIDHR,HETRHZ,HETRDN -c ---------------- - real hpr -c ---------------- - -C***Constants and conversions - parameter (PI = 3.1415927) - parameter (RPD = PI/180.) - parameter (RPH = PI/12.) - parameter (HPR = 12./PI) - -C------------------------------------------------------------------------------ - ENTRY ETRAVG(DO,LAT,DEC,HOUR,DELTIM,HETRHZ,HETRDN) -C***Compute extraterrestrial radiation (ETR) averaged over given time period -C***for a horizontal sfc and direct normal - -C***Arguments -C DO Input Solar flux at top of atm. (W/m**2) -C LAT Input Latitude of location (radians) -C DEC Input Solar declination (radians) -C HOUR Input Time (decimal hours) -C DELTIM Input Averaging time (decimal hours) -C HETRHZ Output Average ETR on horiz sfc (J/m**2) -C HETRDN Output Average direct normal ETR (J/m**2) - - -c ---------------- - real delta, deltim, hour, t, timss, tmabove, xlha - external sunset - real sunset -c ---------------- -C***Constants and conversions - DELTA = DELTIM*RPH - XLHA =(HOUR - 12.)*RPH - -C***Check for sunrise/sunset during interval - SSHA=SUNSET(LAT,DEC) - TIMSS = SSHA - ABS(XLHA) - - IF(TIMSS.LT.-DELTA)THEN !Dark - HETRDN = 0 - HETRHZ = 0 - - ELSE IF(ABS(TIMSS).LT.DELTA)THEN !Partial sun - TMABOVE = TIMSS + DELTA - HETRDN = DO*TMABOVE*HPR - T = COS(LAT)*COS(DEC) * (SIN(SSHA)-SIN(SSHA-TMABOVE)) - HETRHZ = HETRDN*(SIN(LAT)*SIN(DEC) + T/TMABOVE) - - ELSE !Light - HETRDN = DO - T = SIN(LAT)*SIN(DEC) + - + (SIN(DELTA)/DELTA)*COS(LAT)*COS(DEC)*COS(XLHA) - HETRHZ = HETRDN*T - ENDIF - - RETURN -C------------------------------------------------------------------------------ - ENTRY ETRHRLY(DO,LAT,DEC,MIDHR,HETRHZ,HETRDN) -C***Compute hourly extraterrestrial radiation (ETR) -C***for a horizontal sfc and direct normal - -C***Arguments -C DO Input SOLAR FLUX AT top of atm. (W/m**2) -C LAT Input LATITUDE OF LOCATION (Radians) -C DEC Input SOLAR DECLINATION (Radians) -C MIDHR Input MID-POINT IN HOUR (DECIMAL HOURS) -C HETRHZ Output HOURLY ETR ON HORIZ (J/m**2) -C HETRDN Output HOURLY DIRECT normal ETR (J/m**2) - -C***Constants and conversions - DELTA = .5*RPH - XLHA =(MIDHR - 12.)*RPH - -C***Check for sunrise/sunset during interval - SSHA=SUNSET(LAT,DEC) - TIMSS = SSHA - ABS(XLHA) - - IF(TIMSS.LT.-DELTA)THEN !Dark - HETRDN = 0 - HETRHZ = 0 - - ELSE IF(ABS(TIMSS).LT.DELTA)THEN !Partial sun - TMABOVE = TIMSS + DELTA - HETRDN = DO*TMABOVE*HPR - T = COS(LAT)*COS(DEC) * (SIN(SSHA)-SIN(SSHA-TMABOVE)) - HETRHZ = HETRDN*(SIN(LAT)*SIN(DEC) + T/TMABOVE) - - ELSE !Light - HETRDN = DO - T = SIN(LAT)*SIN(DEC) + - + (SIN(DELTA)/DELTA)*COS(LAT)*COS(DEC)*COS(XLHA) - HETRHZ = HETRDN*T - ENDIF - - RETURN -C------------------------------------------------------------------------------ - ENTRY ETRDAY(LAT,DEC,DO,DETRHZ) -C***Compute the daily total ETR on a horizontal sfc. - -C***Argument definition - ! ARGUMENT I/O DESCRIPTION UNITS - ! - ! LAT I LATITUDE OF LOCATION Radians - ! DEC I SOLAR DECLINATION Radians - ! DO I SOLAR FLUX AT ENERGY/AREA/HR - ! TOP OF ATM. - ! DETRHZ O DAILY TOTAL ETR ENERGY/AREA - ! ON HORIZONTAL -C***Constants and conversions -c PI = 3.1415927 - SSHA=SUNSET(LAT,DEC) - -C***Compute daily total ETR on a horizontal sfc. - DETRHZ = COS(LAT)*COS(DEC)*SIN(SSHA) + SSHA*SIN(LAT)*SIN(DEC) - DETRHZ = (24/PI)*DO*DETRHZ - - RETURN - END -C------------------------------------------------------------------------------ - real FUNCTION SUNSET(LAT,DEC) -C***Compute sunset hour angle in hours. -C***Input LAT and DEC are latitude and solar declination in radians. - Implicit None -c declare formal arguments - REAL*4 LAT - real dec -c - REAL*4 drad, PI, sqr, temp, tmpsq - parameter (PI = 3.1415927) -c - TEMP = (-TAN(LAT))*TAN(DEC) - TMPSQ=TEMP*TEMP - - IF(TMPSQ.LT.1)THEN - SQR = SQRT(1.-TMPSQ) - DRAD = PI*.5 - ATAN(TEMP/SQR) - ELSE - DRAD = 0 - IF(TEMP.LT.0)DRAD = PI - ENDIF - - SUNSET = DRAD - - RETURN - END diff --git a/nativeLib/rary.meteorological/src/rang2d.f b/nativeLib/rary.meteorological/src/rang2d.f deleted file mode 100755 index 1866febb45..0000000000 --- a/nativeLib/rary.meteorological/src/rang2d.f +++ /dev/null @@ -1,36 +0,0 @@ - Real Function Rang2D(A,mnx,nx,ny,lo,hi) - -C* This function reports the range of values in a 2D data grid, missing data -C* flags not being included. - -C* Inputs: -C* A(mnx,*) Real*4 Input array. -C* mnx Int*4 First dimension of input array. -C* nx,ny Int*4 Size of input data grid. - -C* Outputs: -C* lo Real*4 Arithmetically smallest non-flagged value. -C* hi Real*4 Arithmetically largest non-flagged value. -C* Rang2D Real*4 Range of values (hi minus lo). - - Implicit None - - Integer*4 mnx,nx,ny,i,j - - Real*4 A(mnx,*),Flg,Flag,lo,hi - - Data Flg,Flag/1e36,1e37/ - - hi=-Flag - lo=Flag - - Do 10 j=1,ny - Do 10 i=1,nx - If (A(i,j).gt.Flg) Goto 10 - hi=amax1(hi,A(i,j)) - lo=amin1(lo,A(i,j)) -10 Continue - Rang2d=hi-lo - - Return - End diff --git a/nativeLib/rary.meteorological/src/replinrange.f b/nativeLib/rary.meteorological/src/replinrange.f deleted file mode 100755 index af07d9e5c9..0000000000 --- a/nativeLib/rary.meteorological/src/replinrange.f +++ /dev/null @@ -1,238 +0,0 @@ -c -c - subroutine ReplInRange(a,testop,lo,hi,repl,result,mni,ni,nj) - -c..... The basic function of this routine is to copy values in the array -c..... `a' to the array `result', unless a test is passed, in which case -c..... values in `result' are replaced with values in the array `repl'. -c..... The variable `tsttyp' controls how this routine functions. -c..... If `tsttyp' is positive, then the test is passed when a>lo and -c..... ahi. -c..... If the absolute value of `tsttyp' is two, then the entire -c..... grid is tested point by point and if ANY test is passed then the -c..... entire grid is replaced. If the absolute value of `tsttyp' is -c..... three or more, then the entire grid is tested point by point -c..... and if EVERY test is passed then the entire grid is replaced. -c..... Otherwise each individual corresponding grid point is tested -c..... individually and replaced individually. - - implicit none - integer testop, mni, ni, nj, i, j - real a(mni,nj), lo(mni,nj), hi(mni,nj), repl(mni,nj) - real result(mni,nj) - integer tsttyp, optyp - real Flag,Flg - Data Flag,Flg/1e37,1e36/ - - optyp = testop/1000 - tsttyp = testop-1000*optyp - if (optyp.lt.0) optyp=-optyp - -c write (6,*) 'testop,optyp,tsttyp ',testop,optyp,tsttyp - - if (tsttyp.le.-3) Then - do 993 j=1,nj - do 993 i=1,ni - if (lo(i,j).gt.Flg) Goto 993 - if (a(i,j).lt.lo(i,j)) Goto 993 - if (hi(i,j).gt.Flg) Goto 993 - if (a(i,j).gt.hi(i,j)) Goto 993 - Goto 44 -993 continue - Goto 55 - else if (tsttyp.ge.3) Then - do 3 j=1,nj - do 3 i=1,ni - if (a(i,j).gt.Flg .or. lo(i,j).gt.Flg) Goto 3 - if (a(i,j).gt.lo(i,j) .and. a(i,j).lt.hi(i,j)) Goto 3 - Goto 44 -3 continue - Goto 55 - else if (tsttyp.le.-2) Then - do 992 j=1,nj - do 992 i=1,ni - if (a(i,j).gt.Flg .or. lo(i,j).gt.Flg) Goto 992 - if (a(i,j).lt.lo(i,j) .or. a(i,j).gt.hi(i,j)) Goto 55 -992 continue - else if (tsttyp.ge.2) Then - do 2 j=1,nj - do 2 i=1,ni - if (a(i,j).gt.Flg .or. lo(i,j).gt.Flg .or. - & hi(i,j).gt.Flg) Goto 2 - if (a(i,j).gt.lo(i,j) .and. a(i,j).lt.hi(i,j)) Goto 55 -2 continue - else if (tsttyp.eq.-1) Then - if (optyp.eq.0) Then - do 90 j=1,nj - do 90 i=1,ni - if (a(i,j).lt.lo(i,j) .or. a(i,j).gt.hi(i,j)) then - result(i,j) = repl(i,j) - else - result(i,j) = a(i,j) - endif -90 continue - return - else if (optyp.eq.1) Then - do 91 j=1,nj - do 91 i=1,ni - if (a(i,j).ge.lo(i,j) .and. a(i,j).le.hi(i,j)) then - result(i,j) = a(i,j) - else if (a(i,j).gt.Flg .or. repl(i,j).gt.Flg) then - result(i,j) = Flag - else - result(i,j) = a(i,j)+repl(i,j) - endif -91 continue - return - else if (optyp.eq.2) Then - do 92 j=1,nj - do 92 i=1,ni - if (a(i,j).ge.lo(i,j) .and. a(i,j).le.hi(i,j)) then - result(i,j) = a(i,j) - else if (a(i,j).gt.Flg .or. repl(i,j).gt.Flg) then - result(i,j) = Flag - else - result(i,j) = a(i,j)-repl(i,j) - endif -92 continue - return - else if (optyp.eq.3) Then - do 93 j=1,nj - do 93 i=1,ni - if (a(i,j).ge.lo(i,j) .and. a(i,j).le.hi(i,j)) then - result(i,j) = a(i,j) - else if (a(i,j).gt.Flg .or. repl(i,j).gt.Flg) then - result(i,j) = Flag - else - result(i,j) = a(i,j)*repl(i,j) - endif -93 continue - return - else if (optyp.eq.4) Then - do 94 j=1,nj - do 94 i=1,ni - if (a(i,j).ge.lo(i,j) .and. a(i,j).le.hi(i,j)) then - result(i,j) = a(i,j) - else if (a(i,j).gt.Flg .or. repl(i,j).gt.Flg .or. - & repl(i,j).eq.0) then - result(i,j) = Flag - else - result(i,j) = a(i,j)/repl(i,j) - endif -94 continue - return - endif - else if (optyp.eq.0) Then - do 10 j=1,nj - do 10 i=1,ni - if(a(i,j).gt.lo(i,j) .and. a(i,j).lt.hi(i,j)) then - result(i,j) = repl(i,j) - else - result(i,j) = a(i,j) - endif -10 continue - return - else if (optyp.eq.1) Then - do 11 j=1,nj - do 11 i=1,ni - if(a(i,j).le.lo(i,j) .or. a(i,j).ge.hi(i,j)) then - result(i,j) = a(i,j) - else if (a(i,j).gt.Flg .or. repl(i,j).gt.Flg) then - result(i,j) = Flag - else - result(i,j) = a(i,j)+repl(i,j) - endif -11 continue - return - else if (optyp.eq.2) Then - do 12 j=1,nj - do 12 i=1,ni - if(a(i,j).le.lo(i,j) .or. a(i,j).ge.hi(i,j)) then - result(i,j) = a(i,j) - else if (a(i,j).gt.Flg .or. repl(i,j).gt.Flg) then - result(i,j) = Flag - else - result(i,j) = a(i,j)-repl(i,j) - endif -12 continue - return - else if (optyp.eq.3) Then - do 13 j=1,nj - do 13 i=1,ni - if(a(i,j).le.lo(i,j) .or. a(i,j).ge.hi(i,j)) then - result(i,j) = a(i,j) - else if (a(i,j).gt.Flg .or. repl(i,j).gt.Flg) then - result(i,j) = Flag - else - result(i,j) = a(i,j)*repl(i,j) - endif -13 continue - return - else if (optyp.eq.4) Then - do 14 j=1,nj - do 14 i=1,ni - if(a(i,j).le.lo(i,j) .or. a(i,j).ge.hi(i,j)) then - result(i,j) = a(i,j) - else if (a(i,j).gt.Flg .or. repl(i,j).gt.Flg .or. - & repl(i,j).eq.0) then - result(i,j) = Flag - else - result(i,j) = a(i,j)/repl(i,j) - endif -14 continue - return - endif - -44 do 444 j=1,nj - do 444 i=1,ni -444 result(i,j) = a(i,j) - write (*,*) 'pass thru' - return - -55 If (optyp.eq.0) Then - do 555 j=1,nj - do 555 i=1,ni -555 result(i,j) = repl(i,j) - Else If (optyp.eq.1) Then - do 5551 j=1,nj - do 5551 i=1,ni - if (a(i,j).gt.Flg .or. repl(i,j).gt.Flg) Then - result(i,j) = Flag - else - result(i,j) = a(i,j)+repl(i,j) - endif -5551 continue - Else If (optyp.eq.2) Then - do 5552 j=1,nj - do 5552 i=1,ni - if (a(i,j).gt.Flg .or. repl(i,j).gt.Flg) Then - result(i,j) = Flag - else - result(i,j) = a(i,j)-repl(i,j) - endif -5552 continue - Else If (optyp.eq.3) Then - do 5553 j=1,nj - do 5553 i=1,ni - if (a(i,j).gt.Flg .or. repl(i,j).gt.Flg) Then - result(i,j) = Flag - else - result(i,j) = a(i,j)*repl(i,j) - endif -5553 continue - Else If (optyp.eq.4) Then - do 5554 j=1,nj - do 5554 i=1,ni - if (repl(i,j).eq.0 .or. a(i,j).gt.Flg .or. - & repl(i,j).gt.Flg) Then - result(i,j) = Flag - else - result(i,j) = a(i,j)/repl(i,j) - endif -5554 continue - EndIf - -C write (6,*) 'replace' - - return - end diff --git a/nativeLib/rary.meteorological/src/rhbar.f b/nativeLib/rary.meteorological/src/rhbar.f deleted file mode 100755 index d7307788e7..0000000000 --- a/nativeLib/rary.meteorological/src/rhbar.f +++ /dev/null @@ -1,78 +0,0 @@ - SUBROUTINE RHBAR ( ENDLVL, !Array of pressure bounds - . MRH, !Array of mean relative humidities - . NCLYR, !Number of layers to be computed for - . SFCP, !Surface pressure (mb) - . P, !Interpolated pressure array (mb) - . TL, !Interpolated temperature array (mb) - . TDL) !Interpolated dew point array (mb) - - -C======================================================================== -C This routine computes the mean relative humidity in the 150 mb layer -C just above the surface, the 150 mb layer above that, and the 200 mb -C layer above the second layer. -C======================================================================== - Implicit None -c declare the formal arguments - real ENDLVL(*) - integer MRH(*), NCLYR - real SFCP, P(*), TL(*), TDL(*) - -C========================= -C Variable declarations -C========================= - - REAL E,ES,W,WS -c ---------------- - real rh, sumrh - integer*2 i, idiv, istart, lyr - external esat - real esat -c ---------------- - -C================================================ -C Initialize running humidity sum and counters -C================================================ - - SUMRH= 0. - I= 1 - ISTART= I - LYR= 1 - -C========================================================= -C Compute mean relative humidity for each of the layers -C========================================================= - - 50 CONTINUE -C RH= HUM(TL(I),TDL(I)) !Calculate relative humidity at each level - E= ESAT(TL(I)) - W= (0.622*E)/(P(I)-E) - ES= ESAT(TDL(I)) - WS= (0.622*ES)/(P(I)-ES) - RH= 100*(WS/W) - SUMRH= SUMRH+RH !Compute running sum - - IF (P(I).GT.ENDLVL(LYR)) THEN !Keep summing as long as still in - I= I+1 !given layer - GO TO 50 - ENDIF - - IDIV= (I-ISTART)+1 !Calcultae mean RH for layer by dividing by - MRH(LYR)= (SUMRH/IDIV) !total times RH was computed within layer. - - IF (MRH(LYR).LT.0) MRH(LYR)= 0 !Make sure mean RH value is - IF (MRH(LYR).GT.100) MRH(LYR)= 100 !physically reasonable. - - IF (LYR.LT.NCLYR) THEN !If number of layers is still less than the - LYR= LYR+1 !total number of layers desired (NCLYR), - SUMRH= 0. !reset counters and start over with new layer. - ISTART= I - GO TO 50 - ENDIF - -C================= -C Normal return -C================= - - RETURN - END diff --git a/nativeLib/rary.meteorological/src/rotvectors.f b/nativeLib/rary.meteorological/src/rotvectors.f deleted file mode 100755 index 0ad6963905..0000000000 --- a/nativeLib/rary.meteorological/src/rotvectors.f +++ /dev/null @@ -1,47 +0,0 @@ -c -c - subroutine rotVectors(aX,aY,angle,bX,bY,mni,ni,nj) -c -c..... Rotate a field of vectors "a", outputing the field of vectors "b". -c..... An angle of +90 is the same as doing a "k cross" operation. - -c..... J Ramer Jun 95 -c - implicit none - integer mni, ni, nj, i, j - real flag, bad - parameter(flag = 1.e37) - real aX(mni,nj), aY(mni,nj), angle, bX(mni,nj), bY(mni,nj) - real cosrot,sinrot - real dgtord/0.01745329252/ - - if (angle.eq.90.0) then - do 2 j=1,nj - do 2 i=1,ni - bX(i,j) = -aY(i,j) -2 bY(i,j) = aX(i,j) - return - else if (angle.eq.-90.0) then - do 3 j=1,nj - do 3 i=1,ni - bX(i,j) = aY(i,j) -3 bY(i,j) = -aX(i,j) - return - endif -c - bad = 1e10 - cosrot = cos(dgtord*angle) - sinrot = sin(dgtord*angle) - do 1 j=1,nj - do 1 i=1,ni - if(aX(i,j).gt.bad .or. bX(i,j).gt.bad) then - bX(i,j) = flag - bY(i,j) = flag - else - bX(i,j) = cosrot*aX(i,j)-sinrot*aY(i,j) - bY(i,j) = sinrot*aX(i,j)+cosrot*aY(i,j) - endif -1 continue -c - return - end diff --git a/nativeLib/rary.meteorological/src/scaleless_analysis.c b/nativeLib/rary.meteorological/src/scaleless_analysis.c deleted file mode 100755 index 5bf71c7264..0000000000 --- a/nativeLib/rary.meteorological/src/scaleless_analysis.c +++ /dev/null @@ -1,1521 +0,0 @@ - -#define INTEGRATED_BUILD 1 - -#if INTEGRATED_BUILD -#include "meteoLib.h" -#endif - -#include -#include -#include -#include - -static int sxy = 0; -static int n_swath = 0; -static int p_swath = 0; -static int m_swath = 0; -static int n_pts = 0; -static int n_oct = 0; - -/* points within each octant run counterclockwise, i.e. right to left */ -static short * ioct[8]; /* i coord list for octants */ -static short * joct[8]; /* j coord list for octants */ -static float * doct[8]; /* distance for each coord in octant */ -static int * oct0[8]; /* start point of each octant */ -static int * roct[8]; /* last right side point of each octant */ -static int * moct[8]; /* mid point of each octant */ -static int * loct[8]; /* first left point of each octant */ -static char * eoct[8]; /* flag for whether edge points exist */ - -/* pointers to memory we actually allocate, we hand this out to the rest */ -/* of the octant pointers. */ -static int * octint = 0; -static short * octshort = 0; -static char * octchar = 0; -static float * octfloat = 0; - -struct node -{ - struct node * prev; - struct node * next; - int base; - int loc; -}; - -static struct node ** bases = 0; -static struct node * nodes = 0; -static int mbase = 0; -static int nbase = 0; - -static int octwrapdat[] = {0, 1, 2, 3, 4, 5, 6, 7, - 0, 1, 2, 3, 4, 5, 6, 7, - 0, 1, 2, 3, 4, 5, 6, 7}; -static int * octwrap = octwrapdat+8; -static int octmagddat[] = {0, 1, 2, 3, 4, 3, 2, 1, - 0, 1, 2, 3, 4, 3, 2, 1, - 0, 1, 2, 3, 4, 3, 2, 1}; -static int * octmagd = octmagddat+8; - -#if 0 -static int octdiffdat[] = {0, 1, 2, 3, 4, -3, -2, -1, - 0, 1, 2, 3, 4, -3, -2, -1, - 0, 1, 2, 3, 4, -3, -2, -1}; -static int * octdiff = octdiffdat+8; -#endif - -static int right = 1; -static int left = 2; -static int edgeno = 8; -static int edgeyes = 16; -static int full = 32; -static int allcon = -1; - -#if 0 -static int stoppt = -0x7FFFFFFF; -static int verify_nodes(int nver) -{ - struct node * node1 = 0; - struct node * node2 = 0; - int hi,c,n; - - n = 0; - for (hi=0; hi<=nbase; hi++) - { - node1 = bases[hi]; - if (!node1) continue; - c = 0; - n++; - if (node1->prev) - fprintf(stderr,"*>non-null prev at %d %d %d\n",hi,c,node1-nodes); - if (node1->loc!=node1-nodes) - fprintf(stderr,"*>loc mismatch at %d %d %d >%d\n", - hi,c,node1-nodes,node1->loc); - if (node1->base!=hi) - fprintf(stderr,"*>base mismatch at %d %d %d >%d\n", - hi,c,node1-nodes,node1->base); - while ((node2=node1->next)) - { - n++; - c++; - if (node2->prev==0) - fprintf(stderr,"*>missing prev at %d %d %d\n", - hi,c,node2-nodes); - else if (node2->prev!=node1) - fprintf(stderr,"*>chain error at %d %d %d >%d %d\n", - hi,c,node2-nodes,node2->prev-nodes,node1-nodes); - if (node2->loc!=node2-nodes) - fprintf(stderr,"*>loc mismatch at %d %d %d >%d\n", - hi,c,node2-nodes,node2->loc); - if (node2->base!=hi) - fprintf(stderr,"*>base mismatch at %d %d %d >%d\n", - hi,c,node2-nodes,node2->base); - node1 = node2; - } - } - if (nver>0 && n!=nver) - fprintf(stderr,"*>total nodes mismatch %d >%d\n",nver,n); - else if (nver==0) - fprintf(stderr,"total nodes %d\n",n); - - return n; -} -#endif - -static void init_distance_tables(int nx, int ny) -{ - int * kswath0; - int * eswath0; - int mswath0; - int * kswath1; - int * eswath1; - int mswath1; - int sxym,nb; - int ii,jj,kk,bb,oo,oo0,ss; - float sqrt2,dist; - - float * dlookup = 0; - short * binidx = 0; - char * pttype = 0; - short *isp, *jsp, *sp0; - int *ip0; - float *rp; - char *cp0; - - float rat, rat1, rat2; - - if (ny>nx) nx = ny; - nx = (nx*3+1)/2; - if (nx<10) nx = 10; - if (nx<=sxy) return; - if (sxy>0) - { - free(octint); - free(octshort); - free(octchar); - free(octfloat); - } - rat1 = atan(1.0)/2; - rat2 = rat1*3; - rat1 = tan(rat1); - rat2 = tan(rat2); - /*fprintf(stderr,"rat1,rat2 %f %f\n",rat1,rat2);*/ - - sxy = nx*3/2; - /*fprintf(stderr,"sxy %d\n",sxy);*/ - sxym = sxy-1; - n_swath = sxy*2; - n_pts = sxy*sxy; - sqrt2 = sqrt(2.0); - - dlookup = (float*)malloc(sizeof(float)*n_pts); - binidx = (short*)malloc(sizeof(short)*n_pts); - pttype = (char*)malloc(n_pts); - - /* Handle the special case of the nearest two rows. */ - pttype[0] = 0; - pttype[sxy] = pttype[1] = -edgeyes; - pttype[1+sxy] = edgeyes; - if (0.5>rat1) - { - pttype[2*sxy] = -edgeyes; - pttype[1+2*sxy] = edgeyes; - pttype[2+2*sxy] = edgeno; - pttype[2+sxy] = edgeyes; - pttype[2] = -edgeyes; - } - else - { - pttype[2*sxy] = -edgeno; - pttype[1+2*sxy] = -edgeyes; - pttype[2+2*sxy] = edgeyes; - pttype[2+sxy] = -edgeyes; - pttype[2] = -edgeno; - } - - /* Calculate the distances and bin indices. */ - for (jj=kk=0; jjrat1 && rat0) - { - if (ii==sxym || jj==sxym) continue; - if (binidx[kk]>=binidx[kk+sxy+1]) binidx[kk]--; - if (pttype[kk+sxym]<0 || pttype[kk-sxym]<0) pttype[kk] = edgeyes; - } - else if (jj>ii) - { - if (jj=binidx[kk+sxy]) binidx[kk]--; - if (pttype[kk+1]>0) pttype[kk] = -edgeyes; - } - else - { - if (ii=binidx[kk+1]) binidx[kk]--; - if (pttype[kk+sxy]>0) pttype[kk] = -edgeyes; - } - } - -#if 0 - fprintf(stderr,"dlookup\n"); - for (jj=sxy-1; jj>=0; jj--) { - for (ii=0,kk=jj*sxy; ii=0; jj--) { - for (ii=0,kk=jj*sxy; ii=0; jj--) { - for (ii=0,kk=jj*sxy; ii0) - { - if (jjmswath1) mswath1 = bb; - if (oo>eswath1[bb]) eswath1[bb] = oo; - } - else if (ii>jj) - { - oo = bb*sxy+jj; - kswath0[oo] = kk; - if (bb>mswath0) mswath0 = bb; - if (oo>eswath0[bb]) eswath0[bb] = oo; - } - } - -#if 0 - fprintf(stderr,"mswath0 %d\n",mswath0); - for (bb=0; bb<=mswath0; bb++) fprintf(stderr,"%d ",eswath0[bb]); - fprintf(stderr,"\n"); - for (oo=bb=0; bb=oo0; oo--) - { - kk = kswath0[oo]; - if (kk<0) continue; - jj = -kk/sxy; - ii = kk+jj*sxy; - /*fprintf(stderr,"oo,kk, ii,jj, ss %d %d %d %d %d\n",oo,kk,ii,jj,ss);*/ - doct[0][ss] = dlookup[kk]; - ioct[0][ss] = ii; - joct[0][ss] = jj; - ioct[2][ss] = -jj; - joct[2][ss] = ii; - ioct[4][ss] = -ii; - joct[4][ss] = -jj; - ioct[6][ss] = jj; - joct[6][ss] = -ii; - if (jj==0) moct[0][bb] = loct[0][bb] = ss; - roct[0][bb] = ss; - if (pttype[kk]==-edgeyes) eoct[0][bb] = edgeyes; - ss++; - } - for (oo=oo0+1; oo<=eswath0[bb]; oo++) - { - kk = kswath0[oo]; - if (kk<0) continue; - jj = kk/sxy; - ii = kk-jj*sxy; - /*fprintf(stderr,"oo,kk, ii,jj, ss %d %d %d %d %d\n",oo,kk,ii,jj,ss);*/ - if (loct[0][bb]<0) loct[0][bb] = ss; - doct[0][ss] = dlookup[kk]; - ioct[0][ss] = ii; - joct[0][ss] = jj; - ioct[2][ss] = -jj; - joct[2][ss] = ii; - ioct[4][ss] = -ii; - joct[4][ss] = -jj; - ioct[6][ss] = jj; - joct[6][ss] = -ii; - ss++; - } - eoct[0][bb] |= 1; - if ((bb%2)) - { - if (moct[0][bb]<0 || (eoct[0][bb]&edgeyes)==0) continue; - if ((ss-oct0[0][bb])*3>jj*2) - eoct[0][bb] |= full; - } - else - eoct[0][bb] |= full; - } - oct0[0][bb] = ss; - - /* Set up all the info for octant 1 and like octants. */ - for (ii=ss=bb=0; bb<=mswath1; bb++) - { - oct0[1][bb] = ss; - if (eswath1[bb]<0) continue; - oo0 = bb*sxy; - for (oo=eswath1[bb]; oo>=oo0; oo--) - { - kk = kswath1[oo]; - if (kk<0) continue; - ii = kk/sxy; - jj = kk-ii*sxy; - doct[1][ss] = dlookup[kk]; - ioct[1][ss] = ii; - joct[1][ss] = jj; - ioct[3][ss] = -jj; - joct[3][ss] = ii; - ioct[5][ss] = -ii; - joct[5][ss] = -jj; - ioct[7][ss] = jj; - joct[7][ss] = -ii; - if (ii==jj) moct[1][bb] = loct[1][bb] = ss; - roct[1][bb] = ss; - if (pttype[kk]==edgeyes) eoct[1][bb] = edgeyes; - ss++; - } - for (oo=oo0+1; oo<=eswath1[bb]; oo++) - { - kk = kswath1[oo]; - if (kk<0) continue; - jj = kk/sxy; - ii = kk-jj*sxy; - if (loct[1][bb]<0) loct[1][bb] = ss; - doct[1][ss] = dlookup[kk]; - ioct[1][ss] = ii; - joct[1][ss] = jj; - ioct[3][ss] = -jj; - joct[3][ss] = ii; - ioct[5][ss] = -ii; - joct[5][ss] = -jj; - ioct[7][ss] = jj; - joct[7][ss] = -ii; - ss++; - } - eoct[1][bb] |= 1; - if ((bb%2)) - { - if (moct[1][bb]<0 || (eoct[1][bb]&edgeyes)==0) continue; - if ((ss-oct0[1][bb])*3>(jj-ii)*2) - eoct[1][bb] |= full; - } - else - eoct[1][bb] |= full; - } - oct0[1][bb] = ss; - -#if 0 - kswath0 = (int*)malloc(sizeof(int)*n_pts); - for (kk=0; kk> ", - kk,eoct[oo][kk],oct0[oo][kk],roct[oo][kk],moct[oo][kk],loct[oo][kk]); - kk++; - for (; bb=0 && jj>=0) kswath0[ii+sxy*jj] = 1; - } - } - fprintf(stderr,"\n"); - } - for (jj=sxy-1; jj>=0; jj--) - { - for (kk=jj*sxy,ii=0; ii=1000 || nyy>=1000) return 0; - /*fprintf(stderr,"nvv %d nxx %d nyy %d\n",nvv,nxx,nyy);*/ - - nx1 = nxx-1; - ny1 = nyy-1; - nnn = nxx*nyy; - imin = -nxx/2; - imax = nx1-imin; - jmin = -nyy/2; - jmax = ny1-jmin; - /*fprintf(stderr,"imin,imax,jmin,jmax %d %d %d %d\n",imin,imax,jmin,jmax);*/ - - /* Compute range of grid indicies over which we will scan for data. */ - xmin = ymin = 999999; - xmax = ymax = -999999; - for (rp0=xind,rend=xind+nvv; rp0xmax) - xmax = *rp0; - if (xmax<0 || xmin>nx1) return 0; - for (rp0=yind,rend=yind+nvv; rp0ymax) - ymax = *rp0; - if (ymax<0 || ymin>ny1) return 0; - /*fprintf(stderr,"xmin,xmax,ymin,ymax %f %f %f %f\n",xmin,xmax,ymin,ymax);*/ - - if (xmin>-1) - imin = -1; - else if (xmin>imin) - imin = -(int)(0.5-xmin); - if (xmax-1) - jmin = -1; - else if (ymin>jmin) - jmin = -(int)(0.5-ymin); - if (ymax1e36) continue; - if (*rpx<0) - ii = -(int)(0.5-*rpx); - else - ii = (int)(0.5+*rpx); - if (*rpy<0) - jj = -(int)(0.5-*rpy); - else - jj = (int)(0.5+*rpy); - bb = 0; - if (iiimax) - { - bb -= (ii-imax); - ii = imax; - } - else - ii = (int)(*rpx+0.5); - if (jjjmax) - { - bb -= (jj-jmax); - jj = jmax; - } - else - jj = (int)(*rpy+0.5); - k0 = ii+nxd*jj; - if (counts0[k0]==0) nvs++; - if (bb<0) - { - if (counts0[k0]!=0 && bb1) *rp0 /= *ip; - srchlist[nsrch] = nsrch; - kk = rp0-raw; - dists[kk] = 0; - nearest[kk] = nsrch; - obsi[nsrch] = ii; - obsj[nsrch] = jj; - /*fprintf(stderr,"%d %d %d %d %d %f\n",nsrch,ii,jj,kk,*ip,*rp0);*/ - if (ii<0) - kk = obsrch[3][nsrch] = - obsrch[4][nsrch] = obsrch[5][nsrch] = -2; - else if (ii>=nxx) - kk = obsrch[0][nsrch] = obsrch[1][nsrch] = - obsrch[7][nsrch] = -2; - if (jj<0) - kk = obsrch[5][nsrch] = - obsrch[6][nsrch] = obsrch[7][nsrch] = -2; - else if (jj>=nyy) - kk = obsrch[1][nsrch] = - obsrch[2][nsrch] = obsrch[3][nsrch] = -2; - if (kk<0) - { - for (oo=0; oo<8; oo++) - conflict[oo][nsrch] = allcon; - nsrch++; - continue; - } - if (ii<=0) - conflict[3][nsrch] = - conflict[4][nsrch] = conflict[5][nsrch] = allcon; - else if (ii>=nx1) - conflict[0][nsrch] = conflict[1][nsrch] = - conflict[7][nsrch] = allcon; - if (jj<=0) - conflict[5][nsrch] = - conflict[6][nsrch] = conflict[7][nsrch] = allcon; - else if (jj>=ny1) - conflict[1][nsrch] = - conflict[2][nsrch] = conflict[3][nsrch] = allcon; - kkg = ii+jj*nxx; - grid[kkg] = *rp0; - nund--; - nsrch++; - } - -#if 0 - fprintf(stderr,"nsrch,nvs %d %d\n",nsrch,nvs); - for (ss=0; ss=0 && i=imin && i<=imax) - iout0[i] = -1; - else - iout0[i] = 1; - jj = jmin-nyd; - jout = (int*)malloc(sizeof(int)*3*nyd); - jout0 = jout-jj; - for (j=jj; j<3*nyd+jj; j++) - if (j>=0 && j=jmin && j<=jmax) - jout0[j] = -2; - else - jout0[j] = 2; - -#if 0 - fprintf(stderr,"raw\n"); - for (jj=nyd-1; jj>=0; jj--) - { - kk = jj*nxd; - for (i=0; i1e36) - fprintf(stderr,"*** "); - else - fprintf(stderr,"%.1f ",raw[kk]); - fprintf(stderr,"\n"); - } - fprintf(stderr,"\n"); - - fprintf(stderr,"dists\n"); - for (jj=nyd-1; jj>=0; jj--) - { - kk = jj*nxd; - for (i=0; i1e36) - fprintf(stderr,"*** "); - else - fprintf(stderr,"%.1f ",dists[kk]); - fprintf(stderr,"\n"); - } - fprintf(stderr,"\n"); -#endif - - /*main loop that establishes initiallly how far from the nearest ob */ - /*each grid point is*/ - bb = 0; - while (nsrch>0) - { - nsw = 0; - /*fprintf(stderr,"nsrch %d\n",nsrch);*/ - for (ss=0; ss0 || jout0[j]>0) continue; - islft = b>=loct[oo][bb] ? 1 : 0; - isrgt = b<=roct[oo][bb] ? 1 : 0; - k0 = j*nxd+i; - cc = nearest0[k0]; - cco = octant0[k0]; - if (dists0[k0]==0) - { - conflict[oo][sss] = allcon; - conflict[octwrap[oo+3]][cc] = allcon; - conflict[octwrap[oo+4]][cc] = allcon; - conflict[octwrap[oo+5]][cc] = allcon; - } - else if (cc<0) - { - nearest0[k0] = sss; - octant0[k0] = oo; - } - else if (conflict[oo][sss]==allcon && - conflict[cco][cc]==allcon) - ; - else if (octmagd[oo-cco]>=2) - { - conflict[oo][sss] = allcon; - conflict[cco][cc] = allcon; - } - else if (leftcon[oo][sss]!=cc && - rightcon[oo][sss]!=cc) - { - ivec = obsi[cc]-ii; - jvec = obsj[cc]-jj; - cross = *iip*jvec - *jjp*ivec; - if (dists0[k0]<*ddp) - { - conflict[oo][sss] = allcon; - if (cross>0) - { - conflict[cco][cc] |= right; - rightcon[cco][cc] = sss; - } - else - { - conflict[cco][cc] |= left; - leftcon[cco][cc] = sss; - } - } - else if (dists0[k0]>*ddp) - { - conflict[cco][cc] = allcon; - if (cross>0) - { - conflict[oo][sss] |= left; - leftcon[oo][sss] = cc; - } - else - { - conflict[oo][sss] |= right; - rightcon[oo][sss] = cc; - } - } - else if (cross>0) - { - conflict[cco][cc] |= right; - rightcon[cco][cc] = sss; - conflict[oo][sss] |= left; - leftcon[oo][sss] = cc; - } - else - { - conflict[cco][cc] |= left; - leftcon[cco][cc] = sss; - conflict[oo][sss] |= right; - rightcon[oo][sss] = cc; - } - } - if (iout0[i]==jout0[j]) nin++; - if (dists0[k0]<*ddp) continue; - nset++; - lset += islft; - rset += isrgt; - dists0[k0] = *ddp; - } - if (nset==0) - { - if (eoct[oo][bb]>=full) - obsrch[oo][sss] = -1; - continue; - } - if (eoct[oo][bb]=full) - obsrch[oo][sss] = -1; - } - else - { - any = 1; - if (obsrch[ooo][sss]==-2) - obsrch[ooo][sss] = -1; - } - } - - if (any) srchlist[nsw++] = sss; - } - nsrch = nsw; - bb++; - } - -#if 0 - fprintf(stderr,"nsrch,nvs %d %d\n",nsrch,nvs); - for (ss=0; ss=0; jj--) - { - kk = jj*nxd; - for (i=0; i1e36) - fprintf(stderr,"*** "); - else - fprintf(stderr,"%.1f ",dists[kk]); - fprintf(stderr,"\n"); - } - fprintf(stderr,"\n"); -#endif - - /* Here is where we copy the original observation out to the boundary */ - /* where that makes sense. */ - for (ss=0; ss=0; oo--) - if (conflict[oo][ss]!=allcon) break; - if (oo<0) continue; - while (oo>0 && conflict[oo-1][ss]!=allcon) oo--; - - /* Find the last octant that we will fill some of */ - ooo = oo; - do - { - nxto = octwrap[ooo+1]; - if (conflict[nxto][ss]==allcon) break; - ooo = nxto; - } - while (ooo!=oo); - - /* get some info about the obs point. */ - ii = obsi[ss]; - jj = obsj[ss]; - kk0 = ii+jj*nxd; - val = raw0[kk0]; - /*fprintf(stderr,"fill %d %d %d %d %d %f\n",ss,oo,ooo,ii,jj,val);*/ - - /* The first one, we fill and worry about adjacent distances */ - /* on the right and left, as appropriate. */ - any = 1; - iip = ioct[oo]; - jjp = joct[oo]; - nxto = octwrap[oo+2]; - di = ioct[nxto][0]; - dj = joct[nxto][0]; - ddis = (oo%2) ? sqrt(2.0) : 1; - /*fprintf(stderr,"filling first %d %d\n",oo,(int)(conflict[oo][ss]));*/ - b1 = b2 = -1; /*swath points range, which should be defined immed*/ - eb1 = eb2 = -1; /*edge points, which can be undefined for part swath*/ - for (kk=b=bb=0; any; b++,iip++,jjp++) - { - if (b==oct0[oo][bb]) - { - while ((kk=eoct[oo][bb])==0) bb++; - if ((conflict[oo][ss]|right)) - b1 = loct[oo][bb]; - else - b1 = b; - if ((conflict[oo][ss]|left)) - b2 = roct[oo][bb++]; - else - b2 = oct0[oo][++bb]-1; - if (kk&edgeyes) - { - eb1 = b1; - if (oo!=ooo) eb2 = b2; - } - if (kk&full) any = 0; - } - if (bb2) continue; - i = ii+*iip; - j = jj+*jjp; - /*fprintf(stderr,"%d %d %d %d %d %d\n",ii,jj,(int)*iip,(int)*jjp,i,j);*/ - if (iout0[i]!=jout0[j]) continue; - any = 1; - kk0 = i+j*nxd; - kkg = i+j*nxx; - raw0[kk0] = grid[kkg] = val; - dists0[kk0] = 0; - - /* check for right distance adjust. */ - if (b==eb1) - for (iii=i,jjj=j,curdis=0; ; ) - { - iii -= di; - jjj -= dj; - if (iout0[iii]!=jout0[jjj]) break; - curdis += ddis; - kk0 = iii+jjj*nxd; - if (curdis>=dists0[kk0]) break; - dists0[kk0] = curdis; - } - - /* check for left distance adjust. */ - else if (b==eb2) - for (iii=i,jjj=j,curdis=0; ; ) - { - iii += di; - jjj += dj; - if (iout0[iii]!=jout0[jjj]) break; - curdis += ddis; - kk0 = iii+jjj*nxd; - if (curdis>=dists0[kk0]) break; - dists0[kk0] = curdis; - } - - } - if (oo==ooo) continue; - - /* The intermediate ones, we just fill the whole octant. */ - oo = octwrap[oo+1]; - while (oo!=ooo) - { - any = 1; - iip = ioct[oo]; - jjp = joct[oo]; - /*fprintf(stderr,"filling mid %d\n",oo);*/ - for (b=bb=0; any; b++,iip++,jjp++) - { - if (b==oct0[oo][bb]) - { - bb++; - while (eoct[oo][bb]==0) bb++; - if (kk&full) any = 0; - } - i = ii+*iip; - j = jj+*jjp; - /*fprintf(stderr,"%d %d %d %d %d %d\n",ii,jj,(int)*iip,(int)*jjp,i,j);*/ - if (iout0[i]!=jout0[j]) continue; - any = 1; - kk0 = i+j*nxd; - kkg = i+j*nxx; - raw0[kk0] = grid[kkg] = val; - dists0[kk0] = 0; - } - oo = octwrap[oo+1]; - } - - /* The last one, we fill and worry about adjacent distances */ - /* on the left only. */ - any = 1; - iip = ioct[oo]; - jjp = joct[oo]; - nxto = octwrap[oo+2]; - di = ioct[nxto][0]; - dj = joct[nxto][0]; - ddis = (oo%2) ? sqrt(2.0) : 1; - /*fprintf(stderr,"filling last %d %d\n",oo,(int)(conflict[oo][ss]));*/ - eb2 = -1; /*left edge point, which can be undefined for part swath*/ - for (b=bb=0; any; b++,iip++,jjp++) - { - if (b==oct0[oo][bb]) - { - while ((kk=eoct[oo][bb])==0) bb++; - if ((conflict[oo][ss]|right)) - b1 = loct[oo][bb]; - else - b1 = b; - if ((conflict[oo][ss]|left)) - b2 = roct[oo][bb++]; - else - b2 = oct0[oo][++bb]-1; - if (kk&edgeyes) eb2 = b2; - if (kk&full) any = 0; - } - if (bb2) continue; - i = ii+*iip; - j = jj+*jjp; - /*fprintf(stderr,"%d %d %d %d %d %d\n",ii,jj,(int)*iip,(int)*jjp,i,j);*/ - if (iout0[i]!=jout0[j]) continue; - any = 1; - kk0 = i+j*nxd; - kkg = i+j*nxx; - raw0[kk0] = grid[kkg] = val; - dists0[kk0] = 0; - - /* check for left distance adjust. */ - if (b!=eb2) continue; - for (iii=i,jjj=j,curdis=0; ; ) - { - iii += di; - jjj += dj; - if (iout0[iii]!=jout0[jjj]) break; - curdis += ddis; - kk0 = iii+jjj*nxd; - if (curdis>=dists0[kk0]) break; - dists0[kk0] = curdis; - } - - } - - } - -#if 0 - fprintf(stderr,"raw\n"); - for (jj=nyd-1; jj>=0; jj--) - { - k = jj*nxd; - for (i=0; i1e36) - fprintf(stderr,"*** "); - else - fprintf(stderr,"%.1f ",raw[k]); - fprintf(stderr,"\n"); - } - fprintf(stderr,"\n"); - - fprintf(stderr,"dists\n"); - for (jj=nyd-1; jj>=0; jj--) - { - k = jj*nxd; - for (i=0; i1e36) - fprintf(stderr,"*** "); - else - fprintf(stderr,"%.1f ",dists[k]); - fprintf(stderr,"\n"); - } - fprintf(stderr,"\n"); -#endif - - nbase = nsrch = 0; - mbase = nxd; - if (nyd>mbase) mbase = nyd; - mbase *= 15; - nodes = (struct node*)malloc(nnn*sizeof(struct node)); - bases = (struct node**)malloc(mbase*sizeof(struct node*)); - memset(nodes, 0, nnn*sizeof(struct node)); - memset(bases, 0, mbase*sizeof(struct node*)); - for (j=kg=k0=0; jnbase) nbase = hi; - onenode->loc = kg; - onenode->base = hi; - onenode->next = bases[hi]; - if (onenode->next) onenode->next->prev = onenode; - bases[hi] = onenode; - } - /*fprintf(stderr,"nbase nsrch %d %d\n",nbase,nsrch);*/ - /*verify_nodes(0);*/ - - /*main loop that sets the value for the furthest grid point*/ - while (--nsrch>=0) - { - - while (bases[nbase]==0 && nbase>0) nbase--; - /*fprintf(stderr,"nbase nsrch %d %d\n",nbase,nsrch);*/ - if (nbase==0) - { - fprintf(stderr,"prematurely exhausted nodes\n"); - break; - } - onenode = bases[nbase]; - if (onenode->next) onenode->next->prev = 0; - bases[nbase] = onenode->next; - kg = onenode->loc; - onenode->prev = onenode->next = 0; - jj = kg/nxx; - ii = kg-jj*nxx; - k0 = ii+jj*nxd; - /*fprintf(stderr,"<%d %d> %f\n",ii,jj,dists0[k0]);*/ - dists0[k0] = 0; - - for (oo=0; oo<8; oo++) - { - /*fprintf(stderr,"octant %d\n",oo);*/ - qdis[oo] = qval[oo] = 0; - wtot = b = nb = 0; - ok = 1; - iip = ioct[oo]; - jjp = joct[oo]; - oop = oct0[oo]; - ddp = doct[oo]; - for (bb=0; bb0 || jout0[j]>0) continue; - /*if (ok==0) fprintf(stderr,"** ");*/ - /*fprintf(stderr,"|%d %d %d %d %d %d %d %d ",*/ - /*ii,jj,iip-ioct[oo],jjp-joct[oo],*iip,*jjp,i,j);*/ - ok = 1; - kk0 = j*nxd+i; - if (raw0[kk0]>1e36) - { - if (iout0[i]!=jout0[j]) continue; - if (ddp[b]>=dists0[kk0]) continue; - kkg = j*nxx+i; - onenode = nodes+kkg; - if (onenode->loc!=kkg) - { - fprintf(stderr,"node location mismatch %d %d\n", - onenode->loc,kkg); - continue; - } - hi = (int)(ddp[b]*10); - if (hi>=onenode->base) continue; - /*fprintf(stderr," >>> %f %d %f %d\n",dists0[kk0],onenode->base,ddp[b],hi);*/ - /*nc = verify_nodes(-1);*/ - if (onenode->next) - onenode->next->prev = onenode->prev; - if (onenode->prev) - onenode->prev->next = onenode->next; - else - bases[onenode->base] = onenode->next; - onenode->base = hi; - onenode->next = bases[hi]; - if (onenode->next) onenode->next->prev = onenode; - onenode->prev = 0; - bases[hi] = onenode; - dists0[kk0] = ddp[b]; - /*verify_nodes(nc);*/ - continue; - } - /*fprintf(stderr,"%d %d %d %d %d %d %d %d %d %f %f\n",*/ - /*oo,ii,jj,iip-ioct[oo],jjp-joct[oo],*iip,*jjp,i,j,ddp[b],raw0[kk0]);*/ - if (nb==0) - { - qdis[oo] = ddp[b]; - qval[oo] = raw0[kk0]; - wtot = 1/(ddp[b]*ddp[b]); - } - else - { - wgt = 1/ddp[b]*ddp[b]; - qval[oo] = (raw0[kk0]*wgt+qval[oo]*wtot)/(wgt+wtot); - wtot = wgt+wtot; - if (ddp[b]0 || qdis[octwrap[oo+5]]>0 || - qdis[octwrap[oo+4]]>0) break; - } - ss = (oo<8); - wtot = val = 0; - for (oo=0; oo<8; oo++) - { - if (qdis[oo]==0) continue; - /*fprintf(stderr," %f %f\n",qdis[oo],qval[oo]);*/ - wgt = qdis[oo]; - wgt = 1/(wgt*wgt); - if (ss) wgt *= wgt; - wtot += wgt; - val += wgt*qval[oo]; - } - raw0[k0] = grid[kg] = val/wtot; - /*fprintf(stderr,"== %f %f %f\n",wtot,val,grid[kg]);*/ - - } - - /*fprintf(stderr,"nbase,bases[nbase] %d %d\n\n",nbase,(int)(bases[nbase]));*/ - -#if 0 - fprintf(stderr,"analyzed\n"); - for (jj=nyy-1; jj>=0; jj--) - { - kg = jj*nxx; - for (i=0; i1e36) - fprintf(stderr,"*** "); - else - fprintf(stderr,"%.1f ",grid[kg]); - fprintf(stderr,"\n"); - } - fprintf(stderr,"\n"); -#endif - - free(counts); - free(raw); - free(octant); - free(nearest); - free(iout); - free(jout); - free(dists); - free(obsrchdat); - free(conflictdat); - free(leftcondat); - free(rightcondat); - free(srchlist); - free(bases); - free(nodes); - - return 1; -} - -#if !INTEGRATED_BUILD -int main(int argc, char * argv[]) -{ - int nx,ny,nv; - int i,j,k,nn,s; - - float xind[5000], yind[5000], values[5000], grid[50000]; - char line[200]; - - FILE * infile = stdin; - FILE * fp; - - if (argc>1 && (fp=fopen(argv[1],"r"))) infile = fp; - - fgets(line, 200, infile); - sscanf(line,"%d %d",&nx,&ny); - nv = 0; - while (fgets(line, 200, infile)!=NULL) - if (sscanf(line,"%f %f %f",xind+nv,yind+nv,values+nv)==3) - nv++; - fprintf(stderr,"nv %d ny %d ny %d\n",nv,nx,ny); - scaleless_analysis - (xind, yind, values, &nv, &nx, &ny, grid); - - for (j=ny-1; j>=0; j--) - { - k = j*nx; - for (i=0; i1e36) - fprintf(stderr,"*** ",grid[k]); - else - fprintf(stderr,"%.1f ",grid[k]); - fprintf(stderr,"\n"); - } - fprintf(stderr,"\n"); - -#if 0 - /* printf("Enter dimension: "); */ - /* scanf("%d",&nn); */ - /* init_distance_tables(nn, nn); */ - fprintf(stderr,"\nsxy %d n_pts %d n_swath %d\n",sxy,n_pts,n_swath); - for (j=sxy-1; j>=0; j--) - { - k = j*sxy; - for (i=0; i -#include -#include -#include "meteoLib.h" - -/* vc3d and param3d are lists of pointers to horizontal slabs containing */ -/* 3D data for a vertical coordinate and a parameter with which we want to */ -/* define a quasi-horizontal surface. mnx is the inner dimension of the */ -/* slab arrays, nx and ny are the dimensions of the slab grids, and nz is */ -/* the number of slabs. param is a specific value of the same parameter */ -/* in param3d which defines the vertical location of the quasi horizontal */ -/* surface. If sense<0, then the vertical coordinate is considered to be */ -/* increasing downward (like pressure). If abs(sense)<=1, then the lowest */ -/* occurence of the specific value is identified, otherwise the highest is */ -/* identified. The output variable vc2d is the value of the vertical */ -/* coordinate on the quasi-horizontal surface. A param value of 1e35 */ -/* means define the quasi-horizontal surface with the max value of the */ -/* parameter, -1e35 means define it with the min value. */ - -void defineSlice(const float ** vc3d, const float ** param3d, - int mnx, int nx, int ny, int nz, float param, int sense, - float * vc2d) - { - float *vc0, *par0; - const float *vcptr, *parptr; - float *eptr, *work; - int k,nn,n2,nw,dd,i,found,nxm, dvc, dpar; - int lowest, mxmn, earlyout, any; - - dd = mnx-nx; - nn = mnx*ny-dd; - n2 = nx*ny; - nw = n2*2; - nxm = nx-1; - - work = (float*)malloc(nw*sizeof(float)); - eptr = work+nw; - while (--eptr>=work) *eptr = 1e37; - eptr = vc2d+nn; - while (--eptr>=vc2d) *eptr = 1e37; - - vc0 = work; - par0 = vc0+n2; - eptr = vc2d+nn; - - /* Determine whether we identify max, min, or the highest or */ - /* the lowest occurence. */ - if (param>9e34) - mxmn = 1; - else if (param<-9e34) - mxmn = -1; - else - mxmn = 0; - if (sense<=-2 || sense>=2) - lowest = 0; - else - lowest = 1; - if (lowest==1 && mxmn==0) - earlyout = 1; - else - earlyout = 0; - - /* Loop through each vertical slab we have. */ - dvc = dpar = 0; - for (k=0; k0) - { - dvc = vc3d[k-1]-vcptr; - dpar = param3d[k-1]-parptr; - } - if (dd==0) - i = 0x7FFFFFFF; - else - i = nx; - - /* Loop through current vertical slab */ - for (any=0; vc2d1e36) continue; - - /* If data undefined, only record first defined vert coord.*/ - if (*parptr>1e36) - { - if (*vc0<1e36) continue; - *vc0 = *vcptr; - if (mxmn==1) *par0 = -1e37; - continue; - } - - /* Special case of first usable vert coord value.*/ - if (*vc0>1e36) - { - *vc0 = *vcptr; - *par0 = *parptr; - if (mxmn || *parptr==param) *vc2d = *vcptr; - continue; - } - - /* Verify that the sense of the current layer is correct.*/ - if (sense<0) - { - if (*vcptr>*vc0) continue; - } - else if (*vcptr<*vc0) - continue; - - /* Case of looking for max or min or our parameter. */ - if (mxmn) - { - *vc0 = *vcptr; - if (*parptr==*par0) - { - if (lowest) continue; - } - else if (mxmn==1) - { - if (*parptr<*par0) continue; - } - else if (*parptr>*par0) - continue; - *par0 = *parptr; - *vc2d = *vcptr; - continue; - } - - /* Special case of top exactly matching parameter. */ - if (*parptr==param) - { - *vc2d = *vcptr; - if (earlyout) continue; - *vc0 = *vcptr; - *par0 = *parptr; - continue; - } - - /* Try to use 3d level just below ground for bottom */ - if (*par0>1e36) - { - if (parptr[dpar]>1e36 || vcptr[dvc]>1e36 || - (sense>0)==(*vcptr=*par0 && param<=*parptr) - *vc2d = *vc0+(param-*par0)*(*vcptr-*vc0)/(*parptr-*par0); - } - else if (*par0>*parptr) - { - if (param>=*parptr && param<=*par0) - *vc2d = *vc0+(param-*par0)*(*vcptr-*vc0)/(*parptr-*par0); - } - *vc0 = *vcptr; - *par0 = *parptr; - } - - if (earlyout && !any) break; - vc2d -= nn; - vc0 -= n2; - par0 -= n2; - } - - free(work); - } - - -/* In this version, dimvc is the dimensionality of the vc3d slabs, and */ -/* dimpar is the dimensionality of the param3d slabs. We assume that the */ -/* slab in vc2d0 has maximum dimensionality of all dimvc and dimpar. */ -/* Dimensionality is 0=const, 1=linear (nx X 1) and 2 = 2 dimensional. */ -void defineSliceD(const float ** vc3d, int * dimvc, const float ** param3d, int * dimpar, - int mnx, int nx, int ny, int nz, float param, int sense, - float * vc2d0) - { - float *vc0, *par0, *vc2d; - float *eptr, *work, lastvc, *vcptrM, lastpar; - const float *parptr, *vcptr, *parptrM; - int k,nn,n2,nw,dd,i,j,nxm,d3a,d3b,dim2,d2,prevvc,prevpar; - int lowest, mxmn, earlyout, any; - - dim2 = 0; - for (k=0; kdim2) dim2 = dimvc[k]; - if (dimpar[k]>dim2) dim2 = dimpar[k]; - } - - dd = mnx-nx; - d2 = dim2==2 ? dd : -nx; - nn = mnx*ny-dd; - n2 = nx*ny; - nw = n2*2; - nxm = nx-1; - - work = (float*)malloc(nw*sizeof(float)); - eptr = work+nw; - while (--eptr>=work) *eptr = 1e37; - eptr = vc2d0+nn; - while (--eptr>=vc2d0) *eptr = 1e37; - - /* Determine whether we identify max, min, or the highest or */ - /* the lowest occurence. */ - if (param>9e34) - mxmn = 1; - else if (param<-9e34) - mxmn = -1; - else - mxmn = 0; - if (sense<=-2 || sense>=2) - lowest = 0; - else - lowest = 1; - if (lowest==1 && mxmn==0) - earlyout = 1; - else - earlyout = 0; - - /* Loop through each vertical slab we have. */ - prevvc = dimvc[0]; - vcptrM = vc3d[0]; - prevpar = dimpar[0]; - parptrM = param3d[0]; - for (k=0; k0) - { - prevvc = dimvc[k-1]; - vcptrM = vc3d[k-1]; - prevpar = dimpar[k-1]; - parptrM = param3d[k-1]; - } - lastvc = *vcptrM; - lastpar = *parptrM; - d3a = dimvc[k]==2 ? dd : -nx; - d3b = dimpar[k]==2 ? dd : -nx; - vc2d = vc2d0; - vc0 = work; - par0 = work+n2; - - /* Loop through current vertical slab */ - if (dimvc[k] && dimpar[k]) - for (any=j=0; j1e36) continue; - - /* If data undefined, only record first defined vert coord.*/ - if (*parptr>1e36) - { - if (*vc0<1e36) continue; - *vc0 = *vcptr; - if (mxmn==1) *par0 = -1e37; - continue; - } - - /* Special case of first usable vert coord value.*/ - if (*vc0>1e36) - { - *vc0 = *vcptr; - *par0 = *parptr; - if (mxmn || *parptr==param) *vc2d = *vcptr; - continue; - } - - /* Verify that the sense of the current layer is correct.*/ - if (sense<0) - { - if (*vcptr>*vc0) continue; - } - else if (*vcptr<*vc0) - continue; - - /* Case of looking for max or min or our parameter. */ - if (mxmn) - { - *vc0 = *vcptr; - if (*parptr==*par0) - { - if (lowest) continue; - } - else if (mxmn==1) - { - if (*parptr<*par0) continue; - } - else if (*parptr>*par0) - continue; - *par0 = *parptr; - *vc2d = *vcptr; - continue; - } - - /* Special case of top exactly matching parameter. */ - if (*parptr==param) - { - *vc2d = *vcptr; - if (earlyout) continue; - *vc0 = *vcptr; - *par0 = *parptr; - continue; - } - - /* Try to use 3d level just below ground for bottom */ - if (*par0>1e36) - { - if (prevpar==1) - lastpar = parptrM[i]; - else if (prevpar==2) - lastpar = parptrM[i+j*mnx]; - if (lastpar>1e36) - { - *vc0 = *vcptr; - *par0 = *parptr; - continue; - } - if (prevvc==1) - lastvc = vcptrM[i]; - else if (prevvc==2) - lastvc = vcptrM[i+j*mnx]; - if (lastvc>1e36 || (sense>0)==(*vcptr=*par0 && param<=*parptr) - *vc2d = *vc0+(param-*par0)*(*vcptr-*vc0)/(*parptr-*par0); - } - else if (*par0>*parptr) - { - if (param>=*parptr && param<=*par0) - *vc2d = *vc0+(param-*par0)*(*vcptr-*vc0)/(*parptr-*par0); - } - *vc0 = *vcptr; - *par0 = *parptr; - } - - else if (!dimvc[k] && !dimpar[k]) - for (any=j=0; j1e36) continue; - - /* If data undefined, only record first defined vert coord.*/ - if (*parptr>1e36) - { - if (*vc0<1e36) continue; - *vc0 = *vcptr; - if (mxmn==1) *par0 = -1e37; - continue; - } - - /* Special case of first usable vert coord value.*/ - if (*vc0>1e36) - { - *vc0 = *vcptr; - *par0 = *parptr; - if (mxmn || *parptr==param) *vc2d = *vcptr; - continue; - } - - /* Verify that the sense of the current layer is correct.*/ - if (sense<0) - { - if (*vcptr>*vc0) continue; - } - else if (*vcptr<*vc0) - continue; - - /* Case of looking for max or min or our parameter. */ - if (mxmn) - { - *vc0 = *vcptr; - if (*parptr==*par0) - { - if (lowest) continue; - } - else if (mxmn==1) - { - if (*parptr<*par0) continue; - } - else if (*parptr>*par0) - continue; - *par0 = *parptr; - *vc2d = *vcptr; - continue; - } - - /* Special case of top exactly matching parameter. */ - if (*parptr==param) - { - *vc2d = *vcptr; - if (earlyout) continue; - *vc0 = *vcptr; - *par0 = *parptr; - continue; - } - - /* Try to use 3d level just below ground for bottom */ - if (*par0>1e36) - { - if (prevpar==1) - lastpar = parptrM[i]; - else if (prevpar==2) - lastpar = parptrM[i+j*mnx]; - if (lastpar>1e36) - { - *vc0 = *vcptr; - *par0 = *parptr; - continue; - } - if (prevvc==1) - lastvc = vcptrM[i]; - else if (prevvc==2) - lastvc = vcptrM[i+j*mnx]; - if (lastvc>1e36 || (sense>0)==(*vcptr=*par0 && param<=*parptr) - *vc2d = *vc0+(param-*par0)*(*vcptr-*vc0)/(*parptr-*par0); - } - else if (*par0>*parptr) - { - if (param>=*parptr && param<=*par0) - *vc2d = *vc0+(param-*par0)*(*vcptr-*vc0)/(*parptr-*par0); - } - *vc0 = *vcptr; - *par0 = *parptr; - } - - else if (dimvc[k]) - for (any=j=0; j1e36) continue; - - /* If data undefined, only record first defined vert coord.*/ - if (*parptr>1e36) - { - if (*vc0<1e36) continue; - *vc0 = *vcptr; - if (mxmn==1) *par0 = -1e37; - continue; - } - - /* Special case of first usable vert coord value.*/ - if (*vc0>1e36) - { - *vc0 = *vcptr; - *par0 = *parptr; - if (mxmn || *parptr==param) *vc2d = *vcptr; - continue; - } - - /* Verify that the sense of the current layer is correct.*/ - if (sense<0) - { - if (*vcptr>*vc0) continue; - } - else if (*vcptr<*vc0) - continue; - - /* Case of looking for max or min or our parameter. */ - if (mxmn) - { - *vc0 = *vcptr; - if (*parptr==*par0) - { - if (lowest) continue; - } - else if (mxmn==1) - { - if (*parptr<*par0) continue; - } - else if (*parptr>*par0) - continue; - *par0 = *parptr; - *vc2d = *vcptr; - continue; - } - - /* Special case of top exactly matching parameter. */ - if (*parptr==param) - { - *vc2d = *vcptr; - if (earlyout) continue; - *vc0 = *vcptr; - *par0 = *parptr; - continue; - } - - /* Try to use 3d level just below ground for bottom */ - if (*par0>1e36) - { - if (prevpar==1) - lastpar = parptrM[i]; - else if (prevpar==2) - lastpar = parptrM[i+j*mnx]; - if (lastpar>1e36) - { - *vc0 = *vcptr; - *par0 = *parptr; - continue; - } - if (prevvc==1) - lastvc = vcptrM[i]; - else if (prevvc==2) - lastvc = vcptrM[i+j*mnx]; - if (lastvc>1e36 || (sense>0)==(*vcptr=*par0 && param<=*parptr) - *vc2d = *vc0+(param-*par0)*(*vcptr-*vc0)/(*parptr-*par0); - } - else if (*par0>*parptr) - { - if (param>=*parptr && param<=*par0) - *vc2d = *vc0+(param-*par0)*(*vcptr-*vc0)/(*parptr-*par0); - } - *vc0 = *vcptr; - *par0 = *parptr; - } - - else - for (any=j=0; j1e36) continue; - - /* If data undefined, only record first defined vert coord.*/ - if (*parptr>1e36) - { - if (*vc0<1e36) continue; - *vc0 = *vcptr; - if (mxmn==1) *par0 = -1e37; - continue; - } - - /* Special case of first usable vert coord value.*/ - if (*vc0>1e36) - { - *vc0 = *vcptr; - *par0 = *parptr; - if (mxmn || *parptr==param) *vc2d = *vcptr; - continue; - } - - /* Verify that the sense of the current layer is correct.*/ - if (sense<0) - { - if (*vcptr>*vc0) continue; - } - else if (*vcptr<*vc0) - continue; - - /* Case of looking for max or min or our parameter. */ - if (mxmn) - { - *vc0 = *vcptr; - if (*parptr==*par0) - { - if (lowest) continue; - } - else if (mxmn==1) - { - if (*parptr<*par0) continue; - } - else if (*parptr>*par0) - continue; - *par0 = *parptr; - *vc2d = *vcptr; - continue; - } - - /* Special case of top exactly matching parameter. */ - if (*parptr==param) - { - *vc2d = *vcptr; - if (earlyout) continue; - *vc0 = *vcptr; - *par0 = *parptr; - continue; - } - - /* Try to use 3d level just below ground for bottom */ - if (*par0>1e36) - { - if (prevpar==1) - lastpar = parptrM[i]; - else if (prevpar==2) - lastpar = parptrM[i+j*mnx]; - if (lastpar>1e36) - { - *vc0 = *vcptr; - *par0 = *parptr; - continue; - } - if (prevvc==1) - lastvc = vcptrM[i]; - else if (prevvc==2) - lastvc = vcptrM[i+j*mnx]; - if (lastvc>1e36 || (sense>0)==(*vcptr=*par0 && param<=*parptr) - *vc2d = *vc0+(param-*par0)*(*vcptr-*vc0)/(*parptr-*par0); - } - else if (*par0>*parptr) - { - if (param>=*parptr && param<=*par0) - *vc2d = *vc0+(param-*par0)*(*vcptr-*vc0)/(*parptr-*par0); - } - *vc0 = *vcptr; - *par0 = *parptr; - } - - - if (earlyout && !any) break; - vc0 -= n2; - par0 -= n2; - } - - free(work); - } - -/* vc3d and slice3d are lists of pointers to horizontal slabs containing */ -/* 3D data for a vertical coordinate and a parameter which we want to */ -/* interpolate to a quasi-horizontal surface. vc2d is a slab of vertical */ -/* coordinate values that define the vertical location of that surface. */ -/* mnx is the inner dimension of the slab arrays, nx and ny are the */ -/* dimensions of the slab grids, and nz is the number of slabs. */ -/* If sense<0, then the vertical coordinate is considered to be increasing */ -/* downward (like pressure). If abs(sense)<=1, then the lowest occurence */ -/* of the specific value is identified, otherwise the highest is */ -/* identified. The output variable slice is the value of the parameter in */ -/* slice3d interpolated to the quasi-horizontal surface. */ - -void createSlice(const float ** vc3d, float * vc2d, const float ** slice3d, - int mnx, int nx, int ny, int nz, int sense, - float * slice) - { - float *vc0, *slc0; - const float *vcptr, *slcptr; - float *eptr, *work; - int k,nn,n2,nw,dd,i,nxm,any,dvc,dslc; - - dd = mnx-nx; - nn = mnx*ny-dd; - n2 = nx*ny; - nw = n2*2; - nxm = nx-1; - - work = (float*)malloc(nw*sizeof(float)); - eptr = work+nw; - while (--eptr>=work) *eptr = 1e37; - eptr = slice+nn; - while (--eptr>=slice) *eptr = 1e37; - - vc0 = work; - slc0 = vc0+n2; - eptr = slice+nn; - - /* Loop through each vertical slab we have. */ - dvc = dslc = 0; - for (k=0; k0) - { - dvc = vc3d[k-1]-vcptr; - dslc = slice3d[k-1]-slcptr; - } - if (dd==0) - i = 0x7FFFFFFF; - else - i = nx; - - /* Loop through current vertical slab */ - for (any=0; slice1e36 || *slice<1e36 || *vc0<-1e36) continue; - any = 1; - if (*vcptr>1e36) continue; - - /* Special case of first vertical coord value */ - if (*vc0>1e36) - { - if (sense>0) - { - if (*vc2d<*vcptr) - { - *vc0 = -1e37; - continue; - } - } - else if (*vc2d>*vcptr) - { - *vc0 = -1e37; - continue; - } - if (*vc2d!=*vcptr) - { - *vc0 = *vcptr; - *slc0 = *slcptr; - } - else if (*slcptr<1e36) - *slice = *slcptr; - else - *vc0 = *vcptr; - continue; - } - - /* Verify that the sense of the current layer is correct.*/ - if (sense<0) - { - if (*vcptr>*vc0) continue; - } - else if (*vcptr<*vc0) - continue; - - /* Case of this parameter value missing. */ - if (*slcptr>1e36) - { - if (*slc0<1e36) continue; - if (sense<0 && *vcptr<*vc2d || sense>0 && *vcptr>*vc2d) - *vc0 = -1e37; - continue; - } - - /* Case of top exactly matching vert coord. */ - if (*vc2d==*vcptr) - { - *slice = *slcptr; - continue; - } - - /* Try to use 3d level just below ground for bottom */ - if (*slc0>1e36) - { - if (slcptr[dslc]>1e36 || vcptr[dvc]>1e36 || - (sense>0)==(*vcptr*vc0) - { - if (*vcptr>*vc2d) - *slice = *slc0+(*vc2d-*vc0)*(*slcptr-*slc0)/(*vcptr-*vc0); - } - else if (*vcptr<*vc0) - { - if (*vcptr<*vc2d) - *slice = *slc0+(*vc2d-*vc0)*(*slcptr-*slc0)/(*vcptr-*vc0); - } - - *vc0 = *vcptr; - *slc0 = *slcptr; - } - if (!any) break; - slice -= nn; - vc2d -= nn; - vc0 -= n2; - slc0 -= n2; - } - - free(work); - } - -/* In this version, dim3 is the dimensionality of the vc3d slabs, and */ -/* dim2 is the dimensionality of the vc2d slab. We assume that the slabs */ -/* in slice3d and slice are uniformly fully 2 dimensional. Dimensionality */ -/* is 0=const, 1=linear (nx X 1) and 2 = 2 dimensional. */ -void createSliceD(float ** vc3d, int * dim3, - float * vc2d0, int dim2, float ** slice3d, - int mnx, int nx, int ny, int nz, int sense, - float * slice0) - { - float *vc0, *slc0, *slice; - float *vcptr, *vc2d, *slcptr, *eptr, *work, lastvc, *vcptrM; - int k,nn,n2,nw,dd,d3,d2,i,j,nxm,any,dslc,prev3; - - dd = mnx-nx; - d2 = dim2==2 ? dd : -nx; - nn = mnx*ny-dd; - n2 = nx*ny; - nw = n2*2; - nxm = nx-1; - - work = (float*)malloc(nw*sizeof(float)); - eptr = work+nw; - while (--eptr>=work) *eptr = 1e37; - eptr = slice0+nn; - while (--eptr>=slice0) *eptr = 1e37; - - /* Loop through each vertical slab we have. */ - dslc = 0; - prev3 = dim3[0]; - vcptrM = vc3d[0]; - for (k=0; k0) - { - prev3 = dim3[k-1]; - vcptrM = vc3d[k-1]; - dslc = slice3d[k-1]-slcptr; - } - lastvc = *vcptrM; - d3 = dim3[k]==2 ? dd : -nx; - vc0 = work; - slc0 = work+n2; - slice = slice0; - - /* Loop through current vertical slab, 4 cases to account for */ - /* combinations of constant dimensionality. */ - if (dim2 && dim3[k]) - for (any=j=0; j1e36 || *slice<1e36 || *vc0<-1e36) continue; - any = 1; - if (*vcptr>1e36) continue; - - /* Special case of first vertical coord value */ - if (*vc0>1e36) - { - if (sense>0) - { - if (*vc2d<*vcptr) - { - *vc0 = -1e37; - continue; - } - } - else if (*vc2d>*vcptr) - { - *vc0 = -1e37; - continue; - } - if (*vc2d!=*vcptr) - { - *vc0 = *vcptr; - *slc0 = *slcptr; - } - else if (*slcptr<1e36) - *slice = *slcptr; - else - *vc0 = *vcptr; - continue; - } - - /* Verify that the sense of the current layer is correct.*/ - if (sense<0) - { - if (*vcptr>*vc0) continue; - } - else if (*vcptr<*vc0) - continue; - - /* Case of this parameter value missing. */ - if (*slcptr>1e36) - { - if (*slc0<1e36) continue; - if (sense<0 && *vcptr<*vc2d || sense>0 && *vcptr>*vc2d) - *vc0 = -1e37; - continue; - } - - /* Case of top exactly matching vert coord. */ - if (*vc2d==*vcptr) - { - *slice = *slcptr; - continue; - } - - /* Try to use 3d level just below ground for bottom */ - if (*slc0>1e36) - { - if (k==0 || slcptr[dslc]>1e36) - { - *vc0 = *vcptr; - *slc0 = *slcptr; - continue; - } - if (prev3==1) - lastvc = vcptrM[i]; - else if (prev3==2) - lastvc = vcptrM[i+j*mnx]; - if (lastvc>1e36 || (sense>0)==(*vcptr*vc0) - { - if (*vcptr>*vc2d) - *slice = *slc0+(*vc2d-*vc0)*(*slcptr-*slc0)/(*vcptr-*vc0); - } - else if (*vcptr<*vc0) - { - if (*vcptr<*vc2d) - *slice = *slc0+(*vc2d-*vc0)*(*slcptr-*slc0)/(*vcptr-*vc0); - } - - *vc0 = *vcptr; - *slc0 = *slcptr; - } - - else if (!dim2 && !dim3[k]) - for (any=j=0; j1e36 || *slice<1e36 || *vc0<-1e36) continue; - any = 1; - if (*vcptr>1e36) continue; - - /* Special case of first vertical coord value */ - if (*vc0>1e36) - { - if (sense>0) - { - if (*vc2d<*vcptr) - { - *vc0 = -1e37; - continue; - } - } - else if (*vc2d>*vcptr) - { - *vc0 = -1e37; - continue; - } - if (*vc2d!=*vcptr) - { - *vc0 = *vcptr; - *slc0 = *slcptr; - } - else if (*slcptr<1e36) - *slice = *slcptr; - else - *vc0 = *vcptr; - continue; - } - - /* Verify that the sense of the current layer is correct.*/ - if (sense<0) - { - if (*vcptr>*vc0) continue; - } - else if (*vcptr<*vc0) - continue; - - /* Case of this parameter value missing. */ - if (*slcptr>1e36) - { - if (*slc0<1e36) continue; - if (sense<0 && *vcptr<*vc2d || sense>0 && *vcptr>*vc2d) - *vc0 = -1e37; - continue; - } - - /* Case of top exactly matching vert coord. */ - if (*vc2d==*vcptr) - { - *slice = *slcptr; - continue; - } - - /* Try to use 3d level just below ground for bottom */ - if (*slc0>1e36) - { - if (k==0 || slcptr[dslc]>1e36) - { - *vc0 = *vcptr; - *slc0 = *slcptr; - continue; - } - if (prev3==1) - lastvc = vcptrM[i]; - else if (prev3==2) - lastvc = vcptrM[i+j*mnx]; - if (lastvc>1e36 || (sense>0)==(*vcptr*vc0) - { - if (*vcptr>*vc2d) - *slice = *slc0+(*vc2d-*vc0)*(*slcptr-*slc0)/(*vcptr-*vc0); - } - else if (*vcptr<*vc0) - { - if (*vcptr<*vc2d) - *slice = *slc0+(*vc2d-*vc0)*(*slcptr-*slc0)/(*vcptr-*vc0); - } - - *vc0 = *vcptr; - *slc0 = *slcptr; - } - - else if (dim2) - for (any=j=0; j1e36 || *slice<1e36 || *vc0<-1e36) continue; - any = 1; - if (*vcptr>1e36) continue; - - /* Special case of first vertical coord value */ - if (*vc0>1e36) - { - if (sense>0) - { - if (*vc2d<*vcptr) - { - *vc0 = -1e37; - continue; - } - } - else if (*vc2d>*vcptr) - { - *vc0 = -1e37; - continue; - } - if (*vc2d!=*vcptr) - { - *vc0 = *vcptr; - *slc0 = *slcptr; - } - else if (*slcptr<1e36) - *slice = *slcptr; - else - *vc0 = *vcptr; - continue; - } - - /* Verify that the sense of the current layer is correct.*/ - if (sense<0) - { - if (*vcptr>*vc0) continue; - } - else if (*vcptr<*vc0) - continue; - - /* Case of this parameter value missing. */ - if (*slcptr>1e36) - { - if (*slc0<1e36) continue; - if (sense<0 && *vcptr<*vc2d || sense>0 && *vcptr>*vc2d) - *vc0 = -1e37; - continue; - } - - /* Case of top exactly matching vert coord. */ - if (*vc2d==*vcptr) - { - *slice = *slcptr; - continue; - } - - /* Try to use 3d level just below ground for bottom */ - if (*slc0>1e36) - { - if (k==0 || slcptr[dslc]>1e36) - { - *vc0 = *vcptr; - *slc0 = *slcptr; - continue; - } - if (prev3==1) - lastvc = vcptrM[i]; - else if (prev3==2) - lastvc = vcptrM[i+j*mnx]; - if (lastvc>1e36 || (sense>0)==(*vcptr*vc0) - { - if (*vcptr>*vc2d) - *slice = *slc0+(*vc2d-*vc0)*(*slcptr-*slc0)/(*vcptr-*vc0); - } - else if (*vcptr<*vc0) - { - if (*vcptr<*vc2d) - *slice = *slc0+(*vc2d-*vc0)*(*slcptr-*slc0)/(*vcptr-*vc0); - } - - *vc0 = *vcptr; - *slc0 = *slcptr; - } - - else - for (any=j=0; j1e36 || *slice<1e36 || *vc0<-1e36) continue; - any = 1; - if (*vcptr>1e36) continue; - - /* Special case of first vertical coord value */ - if (*vc0>1e36) - { - if (sense>0) - { - if (*vc2d<*vcptr) - { - *vc0 = -1e37; - continue; - } - } - else if (*vc2d>*vcptr) - { - *vc0 = -1e37; - continue; - } - if (*vc2d!=*vcptr) - { - *vc0 = *vcptr; - *slc0 = *slcptr; - } - else if (*slcptr<1e36) - *slice = *slcptr; - else - *vc0 = *vcptr; - continue; - } - - /* Verify that the sense of the current layer is correct.*/ - if (sense<0) - { - if (*vcptr>*vc0) continue; - } - else if (*vcptr<*vc0) - continue; - - /* Case of this parameter value missing. */ - if (*slcptr>1e36) - { - if (*slc0<1e36) continue; - if (sense<0 && *vcptr<*vc2d || sense>0 && *vcptr>*vc2d) - *vc0 = -1e37; - continue; - } - - /* Case of top exactly matching vert coord. */ - if (*vc2d==*vcptr) - { - *slice = *slcptr; - continue; - } - - /* Try to use 3d level just below ground for bottom */ - if (*slc0>1e36) - { - if (k==0 || slcptr[dslc]>1e36) - { - *vc0 = *vcptr; - *slc0 = *slcptr; - continue; - } - if (prev3==1) - lastvc = vcptrM[i]; - else if (prev3==2) - lastvc = vcptrM[i+j*mnx]; - if (lastvc>1e36 || (sense>0)==(*vcptr*vc0) - { - if (*vcptr>*vc2d) - *slice = *slc0+(*vc2d-*vc0)*(*slcptr-*slc0)/(*vcptr-*vc0); - } - else if (*vcptr<*vc0) - { - if (*vcptr<*vc2d) - *slice = *slc0+(*vc2d-*vc0)*(*slcptr-*slc0)/(*vcptr-*vc0); - } - - *vc0 = *vcptr; - *slc0 = *slcptr; - } - - if (!any) break; - } - - free(work); - } - -/* sampleSlice is analogous to the createSlice above, except that instead */ -/* of interpolating the data in slice3d to the nearest slice, the data */ -/* from the nearest point in the vertical is copied to the quasi-horizontal */ -/* surface. The extra argument hyb, if hyb!=0, means interpolate if that */ -/* is possible, otherwise copy. */ - -void sampleSlice(const float ** vc3d, float * vc2d, const float ** slice3d, - int mnx, int nx, int ny, int nz, int sense, int hyb, - float * slice) - { - - float *vc0, *slc0; - const float *vcptr, *slcptr; - float *eptr, *work, wgt; - int k,nn,n2,nw,dd,i,nxm,any,dvc,dslc; - - dd = mnx-nx; - nn = mnx*ny-dd; - n2 = nx*ny; - nw = n2*2; - nxm = nx-1; - - work = (float*)malloc(nw*sizeof(float)); - eptr = work+nw; - while (--eptr>=work) *eptr = 1e37; - eptr = slice+nn; - while (--eptr>=slice) *eptr = 1e37; - - vc0 = work; - slc0 = vc0+n2; - eptr = slice+nn; - - /* Loop through each vertical slab we have. */ - dvc = dslc = 0; - for (k=0; k0) - { - dvc = vc3d[k-1]-vcptr; - dslc = slice3d[k-1]-slcptr; - } - if (dd==0) - i = 0x7FFFFFFF; - else - i = nx; - - /* Loop through current vertical slab */ - for (any=0; slice1e36 || *vc0<-1e36) continue; - any = 1; - if (*vcptr>1e36) continue; - - /* Special case of first vertical coord value */ - if (*vc0>1e36) - { - if (*vc2d!=*vcptr) - { - *vc0 = *vcptr; - *slc0 = *slcptr; - } - else if (*slcptr<1e36) - { - *slice = *slcptr; - *vc0 = -1e37; - } - else - *vc0 = *vcptr; - continue; - } - - /* Verify that the sense of the current layer is correct. Sense */ - /* violation above slice means ground is abv slice and we're done.*/ - if (sense<0) - { - if (*vcptr>*vc0) - { - if (*vc2d<*vc0) continue; - *slice = 1e37; - *vc0 = -1e37; - continue; - } - } - else if (*vcptr<*vc0) - { - if (*vc2d>*vc0) continue; - *slice = 1e37; - *vc0 = -1e37; - continue; - } - - /* Case of top exactly matching vert coord. */ - if (*vc2d==*vcptr) - { - if (*slcptr<1e37) - { - *slice = *slcptr; - *vc0 = -1e37; - } - else - { - *vc0 = *vcptr; - *slc0 = *slcptr; - } - continue; - } - - /* If consecutive missing params are both above slice, we're done.*/ - if (*slcptr>1e36 && *slc0>1e36) - { - if (sense>0) - { - if (*vc2d<*vc0) - { - *vc0 = -1e37; - continue; - } - } - else if (*vc2d>*vc0) - { - *vc0 = -1e37; - continue; - } - *vc0 = *vcptr; - continue; - } - - /* Try to use 3d level just below ground for bottom */ - if (*slc0>1e36 && *slcptr<1e36 && - slcptr[dslc]<1e36 && vcptr[dvc]<1e36 && - (sense>0)==(*vcptr>vcptr[dvc])) - { - *vc0 = vcptr[dvc]; - *slc0 = slcptr[dslc]; - } - - /* Rare case of equal vert coord values. */ - if (*vcptr==*vc0) - { - *slc0 = *slcptr; - continue; - } - - /* If vc values for layer bracket vc2d & hyb is true, interp */ - /* slice. Otherwise copy value within half of interval to slice. */ - wgt = (*vc2d-*vc0)/(*vcptr-*vc0); - if (wgt<0) - { - if (wgt>-0.5) *slice = *slc0; - *vc0 = -1e37; - continue; - } - if (wgt<1) - { - if (hyb && *slcptr<1e36 && *slc0<1e36) - *slice = *slc0+(*slcptr-*slc0)*wgt; - else if (wgt<0.5) - *slice = *slc0; - else - *slice = *slcptr; - *vc0 = -1e37; - continue; - } - if (wgt<1.5) *slice = *slcptr; - *vc0 = *vcptr; - *slc0 = *slcptr; - } - - if (!any) break; - slice -= nn; - vc2d -= nn; - vc0 -= n2; - slc0 -= n2; - } - - free(work); - } - -/* In this version, dim3 is the dimensionality of the vc3d slabs, and */ -/* dim2 is the dimensionality of the vc2d slab. We assume that the slabs */ -/* in slice3d and slice are uniformly fully 2 dimensional. Dimensionality */ -/* is 0=const, 1=linear (nx X 1) and 2 = 2 dimensional. */ -void sampleSliceD(const float ** vc3d, int * dim3, - float * vc2d0, int dim2, const float ** slice3d, - int mnx, int nx, int ny, int nz, int sense, int hyb, - float * slice0) - { - - float *vc0, *slc0, *slice; - const float *vcptr, *slcptr; - float *eptr, *work,*vc2d, wgt, lastvc, *vcptrM; - int k,nn,n2,nw,dd,d3,d2,i,j,nxm,any,dslc,prev3; - - dd = mnx-nx; - d2 = dim2==2 ? dd : -nx; - nn = mnx*ny-dd; - n2 = nx*ny; - nw = n2*2; - nxm = nx-1; - - work = (float*)malloc(nw*sizeof(float)); - eptr = work+nw; - while (--eptr>=work) *eptr = 1e37; - eptr = slice0+nn; - while (--eptr>=slice0) *eptr = 1e37; - - /* Loop through each vertical slab we have. */ - dslc = 0; - prev3 = dim3[0]; - vcptrM = vc3d[0]; - for (k=0; k0) - { - prev3 = dim3[k-1]; - vcptrM = vc3d[k-1]; - dslc = slice3d[k-1]-slcptr; - } - lastvc = *vcptrM; - d3 = dim3[k]==2 ? dd : -nx; - vc0 = work; - slc0 = work+n2; - slice = slice0; - - /* Loop through current vertical slab , 4 cases to account for */ - /* combinations of constant dimensionality. */ - if (dim2 && dim3[k]) - for (any=j=0; j1e36 || *vc0<-1e36) continue; - any = 1; - if (*vcptr>1e36) continue; - - /* Special case of first vertical coord value */ - if (*vc0>1e36) - { - if (*vc2d!=*vcptr) - { - *vc0 = *vcptr; - *slc0 = *slcptr; - } - else if (*slcptr<1e36) - { - *slice = *slcptr; - *vc0 = -1e37; - } - else - *vc0 = *vcptr; - continue; - } - - /* Verify that the sense of the current layer is correct. Sense */ - /* violation above slice means ground is abv slice and we're done.*/ - if (sense<0) - { - if (*vcptr>*vc0) - { - if (*vc2d<*vc0) continue; - *slice = 1e37; - *vc0 = -1e37; - continue; - } - } - else if (*vcptr<*vc0) - { - if (*vc2d>*vc0) continue; - *slice = 1e37; - *vc0 = -1e37; - continue; - } - - /* Case of top exactly matching vert coord. */ - if (*vc2d==*vcptr) - { - if (*slcptr<1e37) - { - *slice = *slcptr; - *vc0 = -1e37; - } - else - { - *vc0 = *vcptr; - *slc0 = *slcptr; - } - continue; - } - - /* If consecutive missing params are both above slice, we're done.*/ - if (*slcptr>1e36 && *slc0>1e36) - { - if (sense>0) - { - if (*vc2d<*vc0) - { - *vc0 = -1e37; - continue; - } - } - else if (*vc2d>*vc0) - { - *vc0 = -1e37; - continue; - } - *vc0 = *vcptr; - continue; - } - - /* Try to use 3d level just below ground for bottom */ - if (*slc0>1e36 && *slcptr<1e36 && - slcptr[dslc]<1e36) - { - if (prev3==1) - lastvc = vcptrM[i]; - else if (prev3==2) - lastvc = vcptrM[i+j*mnx]; - if (lastvc<1e36 && (sense>0)==(*vcptr>lastvc)) - { - *vc0 = lastvc; - *slc0 = slcptr[dslc]; - } - } - - /* Rare case of equal vert coord values. */ - if (*vcptr==*vc0) - { - *slc0 = *slcptr; - continue; - } - - /* If vc values for layer bracket vc2d & hyb is true, interp */ - /* slice. Otherwise copy value within half of interval to slice. */ - wgt = (*vc2d-*vc0)/(*vcptr-*vc0); - if (wgt<0) - { - if (wgt>-0.5) *slice = *slc0; - *vc0 = -1e37; - continue; - } - if (wgt<1) - { - if (hyb && *slcptr<1e36 && *slc0<1e36) - *slice = *slc0+(*slcptr-*slc0)*wgt; - else if (wgt<0.5) - *slice = *slc0; - else - *slice = *slcptr; - *vc0 = -1e37; - continue; - } - if (wgt<1.5) *slice = *slcptr; - *vc0 = *vcptr; - *slc0 = *slcptr; - } - - else if (!dim2 && !dim3[k]) - for (any=j=0; j1e36 || *vc0<-1e36) continue; - any = 1; - if (*vcptr>1e36) continue; - - /* Special case of first vertical coord value */ - if (*vc0>1e36) - { - if (*vc2d!=*vcptr) - { - *vc0 = *vcptr; - *slc0 = *slcptr; - } - else if (*slcptr<1e36) - { - *slice = *slcptr; - *vc0 = -1e37; - } - else - *vc0 = *vcptr; - continue; - } - - /* Verify that the sense of the current layer is correct. Sense */ - /* violation above slice means ground is abv slice and we're done*/ - if (sense<0) - { - if (*vcptr>*vc0) - { - if (*vc2d<*vc0) continue; - *slice = 1e37; - *vc0 = -1e37; - continue; - } - } - else if (*vcptr<*vc0) - { - if (*vc2d>*vc0) continue; - *slice = 1e37; - *vc0 = -1e37; - continue; - } - - /* Case of top exactly matching vert coord. */ - if (*vc2d==*vcptr) - { - if (*slcptr<1e37) - { - *slice = *slcptr; - *vc0 = -1e37; - } - else - { - *vc0 = *vcptr; - *slc0 = *slcptr; - } - continue; - } - - /* If consecutive missing params are both above slice, we're done.*/ - if (*slcptr>1e36 && *slc0>1e36) - { - if (sense>0) - { - if (*vc2d<*vc0) - { - *vc0 = -1e37; - continue; - } - } - else if (*vc2d>*vc0) - { - *vc0 = -1e37; - continue; - } - *vc0 = *vcptr; - continue; - } - - /* Try to use 3d level just below ground for bottom */ - if (*slc0>1e36 && *slcptr<1e36 && - slcptr[dslc]<1e36) - { - if (prev3==1) - lastvc = vcptrM[i]; - else if (prev3==2) - lastvc = vcptrM[i+j*mnx]; - if (lastvc<1e36 && (sense>0)==(*vcptr>lastvc)) - { - *vc0 = lastvc; - *slc0 = slcptr[dslc]; - } - } - - /* Rare case of equal vert coord values. */ - if (*vcptr==*vc0) - { - *slc0 = *slcptr; - continue; - } - - /* If vc values for layer bracket vc2d & hyb is true, interp */ - /* slice. Otherwise copy value within half of interval to slice. */ - wgt = (*vc2d-*vc0)/(*vcptr-*vc0); - if (wgt<0) - { - if (wgt>-0.5) *slice = *slc0; - *vc0 = -1e37; - continue; - } - if (wgt<1) - { - if (hyb && *slcptr<1e36 && *slc0<1e36) - *slice = *slc0+(*slcptr-*slc0)*wgt; - else if (wgt<0.5) - *slice = *slc0; - else - *slice = *slcptr; - *vc0 = -1e37; - continue; - } - if (wgt<1.5) *slice = *slcptr; - *vc0 = *vcptr; - *slc0 = *slcptr; - } - - else if (dim2) - for (any=j=0; j1e36 || *vc0<-1e36) continue; - any = 1; - if (*vcptr>1e36) continue; - - /* Special case of first vertical coord value */ - if (*vc0>1e36) - { - if (*vc2d!=*vcptr) - { - *vc0 = *vcptr; - *slc0 = *slcptr; - } - else if (*slcptr<1e36) - { - *slice = *slcptr; - *vc0 = -1e37; - } - else - *vc0 = *vcptr; - continue; - } - - /* Verify that the sense of the current layer is correct. Sense */ - /* violation above slice means ground is abv slice and we're done.*/ - if (sense<0) - { - if (*vcptr>*vc0) - { - if (*vc2d<*vc0) continue; - *slice = 1e37; - *vc0 = -1e37; - continue; - } - } - else if (*vcptr<*vc0) - { - if (*vc2d>*vc0) continue; - *slice = 1e37; - *vc0 = -1e37; - continue; - } - - /* Case of top exactly matching vert coord. */ - if (*vc2d==*vcptr) - { - if (*slcptr<1e37) - { - *slice = *slcptr; - *vc0 = -1e37; - } - else - { - *vc0 = *vcptr; - *slc0 = *slcptr; - } - continue; - } - - /* If consecutive missing params are both above slice, we're done.*/ - if (*slcptr>1e36 && *slc0>1e36) - { - if (sense>0) - { - if (*vc2d<*vc0) - { - *vc0 = -1e37; - continue; - } - } - else if (*vc2d>*vc0) - { - *vc0 = -1e37; - continue; - } - *vc0 = *vcptr; - continue; - } - - /* Try to use 3d level just below ground for bottom */ - if (*slc0>1e36 && *slcptr<1e36 && - slcptr[dslc]<1e36) - { - if (prev3==1) - lastvc = vcptrM[i]; - else if (prev3==2) - lastvc = vcptrM[i+j*mnx]; - if (lastvc<1e36 && (sense>0)==(*vcptr>lastvc)) - { - *vc0 = lastvc; - *slc0 = slcptr[dslc]; - } - } - - /* Rare case of equal vert coord values. */ - if (*vcptr==*vc0) - { - *slc0 = *slcptr; - continue; - } - - /* If vc values for layer bracket vc2d & hyb is true, interp */ - /* slice. Otherwise copy value within half of interval to slice. */ - wgt = (*vc2d-*vc0)/(*vcptr-*vc0); - if (wgt<0) - { - if (wgt>-0.5) *slice = *slc0; - *vc0 = -1e37; - continue; - } - if (wgt<1) - { - if (hyb && *slcptr<1e36 && *slc0<1e36) - *slice = *slc0+(*slcptr-*slc0)*wgt; - else if (wgt<0.5) - *slice = *slc0; - else - *slice = *slcptr; - *vc0 = -1e37; - continue; - } - if (wgt<1.5) *slice = *slcptr; - *vc0 = *vcptr; - *slc0 = *slcptr; - } - - else - for (any=j=0; j1e36 || *vc0<-1e36) continue; - any = 1; - if (*vcptr>1e36) continue; - - /* Special case of first vertical coord value */ - if (*vc0>1e36) - { - if (*vc2d!=*vcptr) - { - *vc0 = *vcptr; - *slc0 = *slcptr; - } - else if (*slcptr<1e36) - { - *slice = *slcptr; - *vc0 = -1e37; - } - else - *vc0 = *vcptr; - continue; - } - - /* Verify that the sense of the current layer is correct. Sense */ - /* violation above slice means ground is abv slice and we're done.*/ - if (sense<0) - { - if (*vcptr>*vc0) - { - if (*vc2d<*vc0) continue; - *slice = 1e37; - *vc0 = -1e37; - continue; - } - } - else if (*vcptr<*vc0) - { - if (*vc2d>*vc0) continue; - *slice = 1e37; - *vc0 = -1e37; - continue; - } - - /* Case of top exactly matching vert coord. */ - if (*vc2d==*vcptr) - { - if (*slcptr<1e37) - { - *slice = *slcptr; - *vc0 = -1e37; - } - else - { - *vc0 = *vcptr; - *slc0 = *slcptr; - } - continue; - } - - /* If consecutive missing params are both above slice, we're done.*/ - if (*slcptr>1e36 && *slc0>1e36) - { - if (sense>0) - { - if (*vc2d<*vc0) - { - *vc0 = -1e37; - continue; - } - } - else if (*vc2d>*vc0) - { - *vc0 = -1e37; - continue; - } - *vc0 = *vcptr; - continue; - } - - /* Try to use 3d level just below ground for bottom */ - if (*slc0>1e36 && *slcptr<1e36 && - slcptr[dslc]<1e36) - { - if (prev3==1) - lastvc = vcptrM[i]; - else if (prev3==2) - lastvc = vcptrM[i+j*mnx]; - if (lastvc<1e36 && (sense>0)==(*vcptr>lastvc)) - { - *vc0 = lastvc; - *slc0 = slcptr[dslc]; - } - } - - /* Rare case of equal vert coord values. */ - if (*vcptr==*vc0) - { - *slc0 = *slcptr; - continue; - } - - /* If vc values for layer bracket vc2d & hyb is true, interp */ - /* slice. Otherwise copy value within half of interval to slice.*/ - wgt = (*vc2d-*vc0)/(*vcptr-*vc0); - if (wgt<0) - { - if (wgt>-0.5) *slice = *slc0; - *vc0 = -1e37; - continue; - } - if (wgt<1) - { - if (hyb && *slcptr<1e36 && *slc0<1e36) - *slice = *slc0+(*slcptr-*slc0)*wgt; - else if (wgt<0.5) - *slice = *slc0; - else - *slice = *slcptr; - *vc0 = -1e37; - continue; - } - if (wgt<1.5) *slice = *slcptr; - *vc0 = *vcptr; - *slc0 = *slcptr; - } - - } - - free(work); - } - - -void defineSlices(float * vc3d, int senseA, - float * param3d, int senseB, - int nx, int ny, int nz, - float * paramC, int nc, float * vcC) - { - float *vc0, *par0; - float *eptr, *work, *vci; - float a1,a0; - int *next, *np; - int k,nn,nw,nt,found; - - nn = nx*ny; - nw = nn*2; - nt = nn*nc; - - work = (float*)malloc(nw*sizeof(float)); - eptr = work+nw; - while (--eptr>=work) *eptr = 1e37; - eptr = vcC+nt; - while (--eptr>=vcC) *eptr = 1e37; - k = nn*sizeof(int); - np = (int*)malloc(k); - memset(np, 0, k); - - vc0 = work; - par0 = vc0+nn; - eptr = vcC+nn; - next = np; - found = 0; - - for (k=0; k=nc) continue; - if (*vc3d>1e36 || *param3d>1e36) continue; - if (*vc0>1e36) - { - *vc0 = *vc3d; - *par0 = *param3d; - continue; - } - if (senseA>0) - { - if (*vc3d<*vc0) continue; - } - else - { - if (*vc3d>*vc0) continue; - } - if (senseB>0) - { - if (*param3d<*par0) - { - *vc0 = *vc3d; - continue; - } - while (*next=nc) - { - found++; - continue; - } - if (paramC[*next]<=*param3d) - { - vci = vcC+(*next * nn); - a1 = (*vc3d-*vc0)/(*param3d-*par0); - a0 = *vc0-(*par0 * a1); - while (*next*par0) - { - *vc0 = *vc3d; - continue; - } - while (*next*par0) ++*next; - if (*next>=nc) - { - found++; - continue; - } - if (paramC[*next]>=*param3d) - { - vci = vcC+(*next * nn); - a1 = (*vc3d-*vc0)/(*param3d-*par0); - a0 = *vc0-(*par0 * a1); - while (*next=*param3d) - { - *vci = paramC[*next]*a1+a0; - vci += nn; - ++*next; - } - } - } - if (*next>=nc) found++; - *vc0 = *vc3d; - *par0 = *param3d; - } - if (found>=nn) break; - vcC -= nn; - vc0 -= nn; - par0 -= nn; - next -= nn; - } - - free(work); - free(np); - } - - -void createSlices(float * vc3d, float * param3d, int sense, - int nx, int ny, int nz, - float * vcC, int nc, float * paramC) - { - float *vc0, *par0; - float *eptr, *work; - float a1,a0; - int *next, *np; - int k,nn,nw,nt,found; - - nn = nx*ny; - nw = nn*2; - nt = nn*nc; - - work = (float*)malloc(nw*sizeof(float)); - eptr = work+nw; - while (--eptr>=work) *eptr = 1e37; - eptr = paramC+nt; - while (--eptr>=paramC) *eptr = 1e37; - k = nn*sizeof(int); - np = (int*)malloc(k); - memset(np, 0, k); - - vc0 = work; - par0 = vc0+nn; - eptr = vcC+nn; - next = np; - found = 0; - - for (k=0; k=nt) continue; - if (*vc3d>1e36 || *param3d>1e36) continue; - if (*vc0>1e36) - { - *vc0 = *vc3d; - *par0 = *param3d; - continue; - } - if (sense>0) - { - if (*vc3d<*vc0) continue; - while (*next1e36 || vcC[*next]<*vc0)) - *next += nn; - if (*next>=nt) - { - found++; - continue; - } - if (vcC[*next]<=*vc3d) - { - a1 = (*param3d-*par0)/(*vc3d-*vc0); - a0 = *par0-(*vc0 * a1); - do - { - paramC[*next] = vcC[*next]*a1+a0; - *next += nn; - } - while (*next*vc0) continue; - while (*next*vc0) *next += nn; - if (*next>=nt) - { - found++; - continue; - } - if (vcC[*next]>=*vc3d) - { - a1 = (*param3d-*par0)/(*vc3d-*vc0); - a0 = *par0-(*vc0 * a1); - do - { - paramC[*next] = vcC[*next]*a1+a0; - *next += nn; - } - while (*next=*vc3d); - } - } - if (*next>=nt) found++; - *vc0 = *vc3d; - *par0 = *param3d; - } - if (found>=nn) break; - vcC -= nn; - paramC -= nn; - vc0 -= nn; - par0 -= nn; - next -= nn; - } - - free(work); - free(np); - } diff --git a/nativeLib/rary.meteorological/src/slqdiv.f b/nativeLib/rary.meteorological/src/slqdiv.f deleted file mode 100755 index bb70e218a3..0000000000 --- a/nativeLib/rary.meteorological/src/slqdiv.f +++ /dev/null @@ -1,57 +0,0 @@ -c -c - subroutine slqdiv(z,t,p,dx,dy,coriolis,mni,ni,nj,slqd, - & slqx,slqy,w1,w2,w3,w4,w5) -c -c............................................................................... -c -c Routine to calculate the divergence of the Q vector on a single level -c using just that level's data. -c -c Changes: -c P.A. Stamus 01-17-90 Original -c 08-24-90 Add array -c for smoothing in slqvect. -c J. Ramer 08-27-90 Streamlined. -c -c Inputs/Outputs: -c -c Variable Var Type I/O Description -c ---------- ---------- ----- ------------- -c z RA I Height field for the level (meters). -c t RA I Temperature field for the level (K). -c p R I Pressure of level (mb). -c dx, dy RA I Grid interval in x, y (meters). -c coriolis RA I Coriolis parameter (/sec). -c mni I I First dimension of input array. -c ni, nj I I Grid dimension in x, y. -c slqd RA O Divergence of Q at this level. -c slqx...w5 RA I Other work arrays. -c -c User Notes: -c -c............................................................................... -c - implicit none - integer mni, ni, nj - real p - real*4 z(mni,nj), t(mni,nj), coriolis(mni,nj) - real*4 dx(mni,nj), dy(mni,nj) - real*4 w1(mni,nj), w2(mni,nj) - real*4 w3(mni,nj), w4(mni,nj), w5(mni,nj) - real*4 slqx(mni,nj), slqy(mni,nj) - real*4 slqd(mni,nj) -c -c..... Compute the single level Q-vector components for this level. -c - call slqvect(z,t,p,dx,dy,coriolis,mni,ni,nj,slqx,slqy, - & w1,w2,w3,w4,w5,slqd) - -c -c..... Compute the divergence of the Q-vector. (coriolis just place holder) -c - call G2Gkinematics(slqx,slqy,coriolis,dx,dy, - & mni,nj,ni,nj,2,slqd) - - return - end diff --git a/nativeLib/rary.meteorological/src/slqvect.f b/nativeLib/rary.meteorological/src/slqvect.f deleted file mode 100755 index d89bf7bc14..0000000000 --- a/nativeLib/rary.meteorological/src/slqvect.f +++ /dev/null @@ -1,111 +0,0 @@ -c -c - subroutine slqvect(z,t,p,dx,dy,coriolis,mni,ni,nj,slqx,slqy, - & dugdx,dugdy,dvgdx,dvgdy,dtdx,dtdy) -c -c.............................................................................. -c -c Routine to calculate the Q vector on a single level using just that -c level's data. -c -c Changes: -c P.A. Stamus 01-17-90 Original -c 08-24-90 Add smoothing to geo wind comps. -c J. Ramer 08-27-90 Streamlined. -c -c Inputs/Outputs: -c -c Variable Var Type I/O Description -c ---------- ---------- ----- ------------- -c z RA I Height field for the level (meters). -c t RA I Temperature field for the level (K). -c p R I Pressure of level (mb). -c dx, dy RA I Grid interval in x, y (meters). -c coriolis RA I Coriolis parameter (/sec). -c ni, nj I I Grid dimension in x, y. -c slqx, slqy RA O Q-vector components for this level. -c dugdx...dtdy RA I Work arrays. -c -c User Notes: -c -c.............................................................................. -c - implicit none -c declare formal parameters - integer mni, ni, nj - real*4 z(mni,nj), t(mni,nj) - real p - real*4 dx(mni,nj), dy(mni,nj), coriolis(mni,nj) - real*4 slqx(mni,nj), slqy(mni,nj) - real*4 dugdx(mni,nj), dugdy(mni,nj) - real*4 dvgdx(mni,nj), dvgdy(mni,nj) - real*4 dtdx(mni,nj), dtdy(mni,nj) -c - integer i, j - real flag, bad - parameter(flag = 1.e37) - real*4 t2th -c - Integer*4 passes - Real*4 smoothness - Common /qsmthcmn/passes,smoothness - - Data bad/99998./ -c -c..... Compute the temperature to potential temperature ratio for this level. - t2th=(1000.0/p)**0.286 -c -c..... Smooth heights, compute the geostrophic wind components for this level. -c.... (store components in slqx and slqy) - Do i=1,passes/2 - call smooth(z,slqx,mni,ni,nj,smoothness) - call smooth(slqx,z,mni,ni,nj,smoothness) - EndDo - if (iand(passes,1).eq.1) then - call smooth(z,slqx,mni,ni,nj,smoothness) - call DgeoComps(slqx,coriolis,dx,dy,mni,nj,ni,nj, - & dugdx,dugdy,dvgdx,dvgdy) - else - call DgeoComps(z,coriolis,dx,dy,mni,nj,ni,nj, - & dugdx,dugdy,dvgdx,dvgdy) - end if - -c... Compute gradients of geostrophic wind. (coriolis just place holder) -c call G2Gkinematics(dugdx,dugdy,coriolis,dx,dy,mni,nj,ni,nj,7,slqx) -c call G2Gkinematics(dvgdx,dvgdy,coriolis,dx,dy,mni,nj,ni,nj,7,slqy) - -c... Smooth temps, then compute dT/dx and dT/dy. (coriolis just place holder) - Do i=1,passes/2 - call smooth(t,slqy,mni,ni,nj,smoothness) - call smooth(slqy,t,mni,ni,nj,smoothness) - EndDo - if (iand(passes,1).eq.1) then - call smooth(t,slqy,mni,ni,nj,smoothness) - call G2Gkinematics(dtdx,dtdy,coriolis,dx,dy, - & mni,nj,ni,nj,7,slqy) - else - call G2Gkinematics(dtdx,dtdy,coriolis,dx,dy, - & mni,nj,ni,nj,7,t) - endif -c -c..... Now calculate the x-component of Q. -c..... Qx = -d(ug)/dx * d(theta)/dx - d(vg)/dx * d(theta)/dy -c..... Qy = -d(ug)/dy * d(theta)/dx - d(vg)/dy * d(theta)/dy -c - do 1 j=1,nj - do 1 i=1,ni - if (dugdx(i,j).gt.bad .or. dugdy(i,j).gt.bad .or. - & dvgdx(i,j).gt.bad .or. dvgdy(i,j).gt.bad .or. - & dtdx(i,j).gt.bad .or. dtdy(i,j).gt.bad) Then - slqx(i,j) = flag - slqy(i,j) = flag - else - slqx(i,j) = (-t2th)* - & (dugdx(i,j)*dtdx(i,j)+dvgdx(i,j)*dtdy(i,j)) - slqy(i,j) = (-t2th)* - & (dugdy(i,j)*dtdx(i,j)+dvgdy(i,j)*dtdy(i,j)) - endif -1 continue - - return - end diff --git a/nativeLib/rary.meteorological/src/smooth.f b/nativeLib/rary.meteorological/src/smooth.f deleted file mode 100755 index c3ac738b73..0000000000 --- a/nativeLib/rary.meteorological/src/smooth.f +++ /dev/null @@ -1,103 +0,0 @@ - - SUBROUTINE SMOOTH (INPUT,OUTPUT,MNX,IX,IY,SMTH) - -C Reference: Shapiro, 1970: "Smoothing, Filtering, and -C Boundary Effects", Rev. Geophys. Sp. Phys., 359-387. - -C This filter is of the type -C z(i) = (1-s)z(i) + s(z(i+1)+z(i-1))/2 -C For a filter which is supposed to damp 2dx waves completely -C but leave 4dx and longer with little damping, -C it should be run with 2 passes using SMTH (or s) of 0.5 -C and -0.5. - -C HISTORY -C S. Benjamin 1985 Original version -C J. Ramer 1990 Missing value handling. -c - Implicit None -c declare formal arguments - integer mnx, ix, iy - REAL INPUT(MNX,IY), OUTPUT (MNX,IY) - real smth -c - REAL FLG - INTEGER IP,I,IM,JP,J,JM - DATA FLG/99998./ -c ---------------- - real SMTH1, SMTH2, SMTH3, SMTH4, SMTH5, sum1, sum2 -c ---------------- - - SMTH1 = 0.25 * SMTH * SMTH - SMTH2 = 0.5 * SMTH * (1.-SMTH) - SMTH3 = (1.-SMTH) * (1.-SMTH) - SMTH4 = (1.-SMTH) - SMTH5 = 0.5 * SMTH - - JM=1 - J=2 - DO JP=3,IY - IM=1 - I=2 - DO IP = 3,IX - IF (INPUT(I,J).GT.FLG .OR. - & INPUT(IP,JP).GT.FLG .OR. INPUT(IM,JM).GT.FLG .OR. - & INPUT(IP,JM).GT.FLG .OR. INPUT(IM,JP).GT.FLG .OR. - & INPUT(I,JP).GT.FLG .OR. INPUT(I,JM).GT.FLG .OR. - & INPUT(IP,J).GT.FLG .OR. INPUT(IM,J).GT.FLG) THEN - OUTPUT(I,J)=INPUT(I,J) - ELSE - SUM1 = INPUT (IM,JP) + INPUT (IM,JM) - & + INPUT (IP,JP) + INPUT (IP,JM) - SUM2 = INPUT (I ,JP) + INPUT (IP,J ) - & + INPUT (I ,JM) + INPUT (IM,J ) - OUTPUT(I,J) = SMTH1*SUM1 + SMTH2*SUM2 + - & SMTH3*INPUT(I,J) - END IF - IM=I - I=IP - END DO - JM=J - J=JP - END DO - - - DO J=1,IY,IY-1 - IM=1 - I=2 - DO IP = 3,IX - IF (INPUT(I,J).GT.FLG .OR. - & INPUT(IP,J).GT.FLG .OR. INPUT(IM,J).GT.FLG) THEN - OUTPUT(I,J)=INPUT(I,J) - ELSE - OUTPUT(I,J) = SMTH4* INPUT(I,J) - & + SMTH5 * (INPUT(IM,J) + INPUT(IP,J)) - END IF - IM=I - I=IP - END DO - END DO - - DO I=1,IX,IX-1 - JM=1 - J=2 - DO JP = 3,IY - IF (INPUT(I,J).GT.FLG .OR. - & INPUT(I,JM).GT.FLG .OR. INPUT(I,JP).GT.FLG) THEN - OUTPUT(I,J)=INPUT(I,J) - ELSE - OUTPUT(I,J) = SMTH4* INPUT(I,J) - & + SMTH5 * (INPUT(I,JM) + INPUT(I,JP)) - END IF - JM=J - J=JP - END DO - END DO - - OUTPUT(1,1)=INPUT(1,1) - OUTPUT(IX,1)=INPUT(IX,1) - OUTPUT(1,IY)=INPUT(1,IY) - OUTPUT(IX,IY)=INPUT(IX,IY) - - RETURN - END diff --git a/nativeLib/rary.meteorological/src/solax.f b/nativeLib/rary.meteorological/src/solax.f deleted file mode 100755 index e41240ad41..0000000000 --- a/nativeLib/rary.meteorological/src/solax.f +++ /dev/null @@ -1,171 +0,0 @@ - SUBROUTINE SOLAX ( JULDAY, !Julian day (ddd) - . MONTH, !Month number of year - . SLAT, !Station latitude (deg) - . TYMINC, !Summation time increment (min) - . TSTART, !Local time to start summation (hr) - . TSTOP, !Local time (24 hr clock) to stop - . TSRAD) !Output: solar rad. @ top of atm (ly) - -C========================================================================== -C This routine computes the total solar radiation incident at the top of -C the atmosphere (undepleted). -C========================================================================== - Implicit None -c declare formal arguments - integer*2 julday, month - real*4 slat - integer*2 tyminc, tstart, tstop - real*4 tsrad -c - REAL OPTDPH(12), - . SDF(12) -c ---------------- - real*4 anginc, cn, cosx, cosz, cos89, - + darc, declnatn, deg2rad, delta, dt, ecc, - + hlfangl, hrang, kstatus, - + phi, PI, radx, ratio, s, sdecmx, sdiff, - + sdrct, secz, sinx, strtang, tau, time, twopi, - + veday, yrlen -c ---------------- - DATA PI /3.1415927/, !Value of PI (rad) - . YRLEN /365.2563/, !Average length of one year (days) - . ECC /0.0167330/, !Eccentricity of earth's orbit - . COS89 /0.01745241/, !Cosine of 89 degrees - . S /1.94/, !Solar constant (ly/min) - . SDECMX /0.40927/, !Angle between the earth's equatorial - . !plane and orbital plane (rad) - . VEDAY /79.25/, !Mean julian day of vernal equinox - . CN /1.0/, !Clearness number - . - . OPTDPH /.142,.144,.156,.180, - . .196,.205,.207,.201, - . .177,.160,.149,.142/, - - . SDF /.058,.060,.071,.097, - . .121,.134,.136,.122, - . .092,.073,.063,.057/ - - -C--------------------------------------------------------------------------- - -C=========================================================================== -C Initialize value of twice PI and the conversion from degrees to radians -C=========================================================================== - - TWOPI= 2.*PI - DEG2RAD= PI/180. - -C============================================================================== -C TAU approximates the eccentric anomaly (radians) of the earth in its orbit -C about the sun. The approximation works because the earth's orbit is -C very nearly circular and because perihelion occurs during the first few -C days of the year. -C============================================================================== - - TAU= (TWOPI*JULDAY)/YRLEN - -C=========================================================================== -C Compute the ratio of the mean to instantaneous sun-earth distance. The -C mean distance from the earth to the sun is defined as one astronomical -C unit (AU). It is the mean value of the greatest and least distances (at -C aphelion and perihelion). The sum of these two distances is 2a, where -C a is the semi-major axis of the earth's orbit. Thus, 1 AU is equivalent -C to a. The equation for the ratio of the distances comes from: -C Cogley, J.G., 1979: "The Albedo of Water as a Function of Latitude", -C Monthly Weather Review, Vol. 107, No. 6 (June), p.775. The denominator -C comes from an equation for the instantaneous sun-earth distance in: -C Smith, E.A., 1980: "Orbital Mechanics and Analytic Modeling of Meteor- -C ological Satellite Orbits", Paper No. 321, Dept. of Atmospheric Science, -C Colorado State University, Fort Collins, Colorado 80523, Eq. 5.75, p.65. -C============================================================================ - - RATIO= 1./(1.-ECC*COS(TAU)) - -C========================================================================= -C Compute the solar declination (formula also from Cogley, cited above) -C========================================================================= - - DECLNATN= SDECMX*SIN(TWOPI*(JULDAY-VEDAY)/YRLEN) - -C=============================== -C Convert latitude to radians -C=============================== - - PHI= SLAT*DEG2RAD - -C========================================================================== -C Compute the angle increment (ANGINC) in degrees. This comes from DARC, -C the number of degrees through which the earth turns per unit time. -C========================================================================== - - DARC= 0.25*TYMINC !0.25 because earth rotates 360 deg per 1440 mins - HLFANGL= 0.5*DARC - ANGINC= DARC - -C======================================================================== -C Compute starting angle (STRTANG) and the hour angle (HRANG) which is -C zero at solar noon. -C======================================================================== - - STRTANG= 180.+TSTART*15. - HRANG= STRTANG+HLFANGL - -C============================================================================ -C Convert time increment to fraction of an hour. Initialize time and solar -C radiation (TSRAD). -C============================================================================ - - DT= TYMINC/60. - TIME= TSTART - TSRAD= 0. - -C=========================================================================== -C Loop 140 computes the summed incident solar radiation at the top of the -C atmosphere. -C=========================================================================== - - 140 CONTINUE - -C======================================================= -C Compute the cosine of the solar zenith angle (COSZ) -C======================================================= - - DELTA= DECLNATN - SINX= SIN(PHI)*SIN(DELTA) - COSX= COS(PHI)*COS(DELTA) - COSZ= SINX+(COSX*(COS(HRANG*DEG2RAD))) - IF (ABS(COSZ).LT.COS89) THEN - IF (COSZ.LT.0.) COSZ= -COS89 - IF (COSZ.GT.0.) COSZ= COS89 - ENDIF - SECZ= 1./COSZ - -C=========================================================== -C Compute the shortwave flux at the top of the atmosphere. -C=========================================================== - - SDRCT= CN*S*(RATIO**2)*COSZ*EXP((-OPTDPH(MONTH))*SECZ) - SDIFF= SDF(MONTH)*(SDRCT/(CN*CN)) - RADX= (SDRCT+SDIFF)*TYMINC - -C================== -C Sum the fluxes -C================== - - IF (RADX.GT.0.) TSRAD= TSRAD+RADX - -C=========================================================================== -C Increment hour angle and time step and continue iteration (if necessary) -C=========================================================================== - - HRANG= HRANG+ANGINC - TIME= TIME+DT - IF (TIME.LE.TSTOP) GO TO 140 - -C================= -C Normal return -C================= - - KSTATUS= 1 - RETURN - END diff --git a/nativeLib/rary.meteorological/src/spechum.f b/nativeLib/rary.meteorological/src/spechum.f deleted file mode 100755 index 8e5478980e..0000000000 --- a/nativeLib/rary.meteorological/src/spechum.f +++ /dev/null @@ -1,53 +0,0 @@ -c -c - subroutine spechum(p,t,rh,mni,ni,nj,q) -c -c.............................................................................. -c -c Routine to calculate specific humidity from the pressure, -c temperature, and relative humidity. -c -c Changes: -c P.A. Stamus 09-05-89 Original (based on Baker's) -c 09-20-89 Add implicit none. -c J. Ramer 05-02-90 Increased algorithm speed. -c -c Inputs/Outputs: -c -c Variable Var Type I/O Description -c ---------- ---------- ----- ------------- -c p RA I Pressure (mb) -c t RA I Temperature (K) -c rh RA I Relative humidity [range: 0. - 100.] -c mni I I First dimension of input array. -c ni,nj I I Grid dimensions in i,j. -c q RA O Specific Humidity (g/kg). -c -c -c User Notes: -c -c 1. No quality control is performed in this routine. -c -c.............................................................................. -c - implicit none - integer mni, ni, nj, i, j - real p(mni,nj), t(mni,nj), rh(mni,nj) - real q(mni,nj) - real k,eee - real flg,flag - Data flg,flag/99998.0,1e37/ - - Do 10 j=1,nj - Do 10 i=1,ni - If (p(i,j).gt.flg .or. t(i,j).gt.flg .or. rh(i,j).gt.flg) then - q(i,j)=flag - Else - k=t(i,j) - eee=rh(i,j)*exp(28.48859-0.0091379024*k-6106.396/k) - q(i,j)=eee/(p(i,j)-0.00060771703*eee) - End If -10 Continue - - return - end diff --git a/nativeLib/rary.meteorological/src/spechum2.f b/nativeLib/rary.meteorological/src/spechum2.f deleted file mode 100755 index f6c88903cc..0000000000 --- a/nativeLib/rary.meteorological/src/spechum2.f +++ /dev/null @@ -1,51 +0,0 @@ -c -c - subroutine spechum2(p,td,mni,ni,nj,q) -c -c............................................................................... -c -c Routine to calculate saturation specific humidity from the dewpoint -c and pressure. -c -c Changes: -c J. Ramer 10-31-90 Stole from spechum. -c -c Inputs/Outputs: -c -c Variable Var Type I/O Description -c ---------- ---------- ----- ------------- -c p RA I Pressure (mb) -c td RA I Dewpoint (C or K) -c mni I I First dimension of input array. -c ni,nj I I Grid dimensions in i,j. -c q RA O Specific Humidity (g/kg). -c -c -c User Notes: -c -c 1. No quality control is performed in this routine. -c -c............................................................................... -c - implicit none - integer mni, ni, nj, i, j - real p(mni,nj), td(mni,nj) - real q(mni,nj) - real k,eee - real flg,flag - Data flg,flag/99998.0,1e37/ - - Do 10 j=1,nj - Do 10 i=1,ni - If (p(i,j).gt.flg .or. td(i,j).gt.flg) then - q(i,j)=flag - Else - k=td(i,j) - If (k.lt.80.0) k=k+273.15 - eee=exp(33.09376-0.0091379024*k-6106.396/k) - q(i,j)=eee/(p(i,j)-0.00060771703*eee) - End If -10 Continue - - return - end diff --git a/nativeLib/rary.meteorological/src/strmpak.f b/nativeLib/rary.meteorological/src/strmpak.f deleted file mode 100755 index 5064c52186..0000000000 --- a/nativeLib/rary.meteorological/src/strmpak.f +++ /dev/null @@ -1,806 +0,0 @@ - - Subroutine StrmPak(U,V,Work,mnx,nx,ny,asize,xpoints,ypoints, - & npoints,minspc,maxspc,badlo,badhi) - -C This routine draws a set of streamlines. Works in area defined by -C current - -C PROGRAM HISTORY: -c Unknown original author -c 99-03-25 S.O'Donnell; modifications for Linux/g77 port. -c added Implicit None; define undeclared variables; -c include interface to -c g77 unimplemented implicit functions. -C Inputs: -C U(mnx,*) Real*4 Array of U components -C V(mnx,*) Real*4 Array of V components -C Work(mnx,*) Int*4 Workspace. -C mnx Int*4 First dimension of data arrays. -C nx Int*4 Inner dimension of grid. -C nx Int*4 Outer dimension of grid. -C asize Int*4 Size of arrows in MVI. -C minspc Real*4 If greater than one, no two streamlines will -C approach any closer than this number of cells. -C If less than one, a streamline will terminate if -C it runs through 1/minspc consecutive already -C occupied cells. -C maxspc Real*4 No streamline will be started any closer than this -C number of cells to an existing streamline. - - - Implicit None - INCLUDE 'IntrinsicFunctions.inc' -c declare formal arguments - Integer*4 mnx, nx, ny, Work(nx,ny) - Real*4 U(mnx,*), V(mnx,*) - Real*4 xpoints(*), ypoints(*) - Real*4 asize - Integer*4 npoints - Real*4 minspc, maxspc, badhi, badlo -C - - Integer*4 ill,iur,jll,jur,ium,jum - Real*4 asiz - Common /StrmPakCmn/ ill,iur,jll,jur,ium,jum,asiz - - Integer*4 i,j,ii,jj, - - i1,i2,j1,j2,k - Real*4 ri0,rj0,mymax - Logical again - - REAL*4 minmag,maxmag,checkval - Common /vecLimCmn/minmag,maxmag,checkval - - REAL*4 minmag2,maxmag2,mag2 - -c Initialize environment of streamline output. - npoints = 0 - minmag2 = minmag*minmag - maxmag2 = maxmag*maxmag - ill=1 - jll=1 - iur=nx - jur=ny - ium=nx-1 - jum=ny-1 - asiz = asize - -c Initialize work arrays. - Do 5 j=jll,jur - Do 5 i=ill,iur -5 Work(i,j)=0 - Do 6 j=jll,jum - jj=j+1 - Do 6 i=ill,ium - ii=i+1 - If (.not.(U(i,j).lt.badlo .or. U(i,j).gt.badhi) .or. - - .not.(U(i,jj).lt.badlo .or. U(i,jj).gt.badhi) .or. - - .not.(U(ii,j).lt.badlo .or. U(ii,j).gt.badhi) .or. - - .not.(U(ii,jj).lt.badlo .or. U(ii,jj).gt.badhi) .or. - - .not.(V(i,j).lt.badlo .or. V(i,j).gt.badhi) .or. - - .not.(V(i,jj).lt.badlo .or. V(i,jj).gt.badhi) .or. - - .not.(V(ii,j).lt.badlo .or. V(ii,j).gt.badhi) .or. - - .not.(V(ii,jj).lt.badlo .or. V(ii,jj).gt.badhi)) Then - Work(i,j)=-1 - Goto 6 - EndIf - if (minmag.le.0.0 .and. maxmag.ge.badlo) Goto 6 - mag2 = U(i,j)*U(i,j)+V(i,j)*V(i,j) - if (mag2.ge.minmag2 .and. mag2.le.maxmag2) Goto 6 - mag2 = U(ii,j)*U(ii,j)+V(ii,j)*V(ii,j) - if (mag2.ge.minmag2 .and. mag2.le.maxmag2) Goto 6 - mag2 = U(i,jj)*U(i,jj)+V(i,jj)*V(i,jj) - if (mag2.ge.minmag2 .and. mag2.le.maxmag2) Goto 6 - mag2 = U(ii,jj)*U(ii,jj)+V(ii,jj)*V(ii,jj) - if (mag2.ge.minmag2 .and. mag2.le.maxmag2) Goto 6 - Work(i,j)=-1 - 6 Continue - - k=jnint(maxspc*4) - if (k.lt.1) k = 1 - -776 i1=(ill+iur)/2 - i2=i1+1 - j1=(jll+jur)/2 - j2=j1+1 - -777 again=.false. - mymax=maxspc - if (k.gt.mymax) mymax = k - - If (j1.ge.jll) Then - rj0=float(j1) - Do 45 i=i1,i2-1,k - ri0=float(i)+.5 - Call StrmLin(U,V,xpoints,ypoints,npoints,Work,mnx,ri0,rj0, - & minspc,mymax) -45 Continue - j1=j1-k - again=.true. - End If - - If (i1.ge.ill) Then - ri0=float(i1) - Do 65 j=j1,j2-1,k - rj0=float(j)+.5 - Call StrmLin(U,V,xpoints,ypoints,npoints,Work,mnx,ri0,rj0, - & minspc,mymax) -65 Continue - i1=i1-k - again=.true. - End If - - If (j2.lt.jur) Then - rj0=float(j2) - Do 55 i=i1,i2-1,k - ri0=float(i)+.5 - Call StrmLin(U,V,xpoints,ypoints,npoints,Work,mnx,ri0,rj0, - & minspc,mymax) -55 Continue - j2=j2+k - again=.true. - End If - - If (i2.le.iur) Then - ri0=float(i2) - Do 75 j=j1,j2-1,k - rj0=float(j)+.5 - Call StrmLin(U,V,xpoints,ypoints,npoints,Work,mnx,ri0,rj0, - & minspc,mymax) -75 Continue - i2=i2+k - again=.true. - End If - - If (again) Goto 777 - - k = k/2 - if (k.ge.1) Goto 776 - - Return - End - - Subroutine StrmLin(U,V,xpoints,ypoints,npoints,Work,mnx,ri0,rj0, - & minspc,maxspc) - -C This routine draws a single streamline through the point ri0,rj0. -C ri0 are rj0 real numbers in array index space. - -C Inputs: -C U(mnx,*) Real*4 Array of U components -C V(mnx,*) Real*4 Array of V components -C Work(2,mnx,*) Int*2 Workspace which keeps track of how many streamlines -C have been drawn in each cell. A value of -1 -C designates a cell as having bad or missing data. -C 1 is for previously drawn streamlines, 2 includes -C the streamline currently being drawn. -C mnx Int*4 First dimension of array to be countoured. -C ri0,rj0 Real*4 Location to draw the streamline through. -C Coordinates are in array index space. -C minspc Real*4 If greater than one, no two streamlines will -C approach any closer than this number of cells. -C If less than zero, a streamline will terminate if -C it runs through 1/minspc consecutive already -C occupied cells. -C maxspc Real*4 No streamline will be started any closer than this -C number of cells to an existing streamline. - - Implicit None - INCLUDE 'IntrinsicFunctions.inc' - - Integer*4 ill,iur,jll,jur,ium,jum - Real*4 asiz - Common /StrmPakCmn/ ill,iur,jll,jur,ium,jum,asiz - -c declare formal arguments - Integer*4 mnx - Real*4 U(mnx,*),V(mnx,*), ri0,rj0,minspc,maxspc - Real*4 xpoints(*), ypoints(*) - Integer*2 Work(2,iur,jur) - Integer*4 mp - Integer*4 npoints - Parameter (mp=4000) - - Real*4 px(3),py(3),Ipnt(-mp:mp),Jpnt(-mp:mp),im,ip,jm,jp - Integer*4 kpnt,kpnt1,kpnt2,dkpnt,km,kp - Byte LCpnt(-mp:mp) - - Integer*4 i,j,ii,jj,iii,jjj,icheck,btrack, - - l,narrow,ntot, - - dii,djj,track,ntrack, - - itrack(2000),jtrack(2000),ovrlap,ntb,i0,j0,i1,j1, - - kstrm,k,kk,kkk,kkkk,side0, - - SgSide(8),nsg,nin,nout,loopct - Real*4 qi0,qj0,rpxi,rpyj, - - curloc,outloc,curSF, - - x,y,dx,dy, - - x1,y1,x2,y2, - - xx,yy,xy,mult, - - dirflg,mag,influx,outflux, - - SgLoc(0:8),SgSF(0:8),Flux(8),SgCont(8) - Logical flxflg,forward,done - - Data LCPnt/mp*1,1,mp*1/ - - Integer*4 wgt1,wgt2,npass -c Common /StrmSmthCmn/npass,wgt1,wgt2 -Common block `strmsmthcmn' initialized by another program unit -c only one program unit may specify initial values for a -c particular common block -c Data npass/0/ - Data ovrlap / 0 / ! initialized to remove warnings - - -c Determine if a streamline can be started here. - If (ri0.lt.float(ill) .or. ri0.gt.float(iur) .or. - - rj0.lt.float(jll) .or. rj0.gt.float(jur)) Return - -c Write (*,*) ' ' -c Write (*,*) '**************************************************' -c Write (*,*) '**************************************************' -c Write (*,*) 'Starting one at ',ri0,rj0 - -c Initialize some variables. - ntb=1+min0(iur-ill,jur-jll)/4 - track=0 - track=0 - ntrack=jnint(maxspc) - if (ntrack.lt.ntb) ntrack = ntb - qi0=jnint(ri0) - qj0=jnint(rj0) - kpnt1=0 - kpnt2=0 - -c Write (*,*) '**************************************************' -c Write (*,*) 'ntb,qi0,qj0 ',ntb,qi0,qj0 - -c Loop for trying streamlines in both directions from this point. - Do 7779 kstrm=1,2 - kpnt=0 - dkpnt=0 - btrack=track+1 - -c Determine which side and which cell we are starting with - If (abs(ri0-qi0).lt.abs(rj0-qj0)) Then - If (kstrm.eq.1) Then - side0=4 - i=jnint(ri0) - j=jint(rj0) - k=max0(jnint(maxspc)-1,0) - Do 4 jjj=max0(jll,j-k),min0(jum,j+k) - Do 4 iii=max0(ill,i-k-1),min0(ium,i+k) -4 If (Work(1,iii,jjj).gt.0) Return - If (i.gt.ium) Goto 7775 - Else - side0=2 - i=jnint(ri0)-1 - j=jint(rj0) - If (i.lt.1) Goto 7775 - End If - x=qi0-float(i) - y=rj0-float(j) - Else - If (kstrm.eq.1) Then - side0=1 - i=jint(ri0) - j=jnint(rj0) - k=max0(jnint(maxspc)-1,0) - Do 5 jjj=max0(jll,j-k),min0(jum,j+k) - Do 5 iii=max0(ill,i-k-1),min0(ium,i+k) -5 If (Work(1,iii,jjj).gt.0) Return - If (j.gt.jum) Goto 7775 - Else - side0=3 - i=jint(ri0) - j=jnint(rj0)-1 - If (j.lt.1) Goto 7775 - End If - x=ri0-float(i) - y=qj0-float(j) - End If - ii=i+1 - jj=j+1 - -c Write (*,*) 'Starting one at ',ri0,rj0 - -c Check if cell has missing values. - If (Work(1,i,j).eq.-1) Goto 7777 - -c Write (*,*) 'i,j,ii,jj ',i,j,ii,jj -c Write (*,*) 'x,y ',x,y -c Write (*,*) 'side0 ',side0 - -c Determine whether we are working with or against the flow. - If (side0.eq.1) Then - influx=V(i,j)*(1.0-x)+V(ii,j)*x - Else If (side0.eq.2) Then - influx=-(U(ii,j)*(1.0-y)+U(ii,jj)*y) - Else If (side0.eq.3) Then - influx=-(V(i,jj)*(1.0-x)+V(ii,jj)*x) - Else!If (side0.eq.4) Then - influx=U(i,j)*(1.0-y)+U(i,jj)*y - End If - If (influx.lt.0.0) Then - dirflg=-1.0 - dkpnt=-1 - Else If (influx.gt.0.0) Then - dkpnt=+1 - dirflg=+1.0 - Else - Goto 7777 - End If - -c Set some initialize values at streamline start point. - rpxi=i - rpyj=j - narrow=(ntb+3)*3/4 - done=.false. - ntot=(narrow+1)/2 - loopct=0 - IPnt(kpnt)=rpxi+x - JPnt(kpnt)=rpyj+y - -c Write (*,*) 'dirflg ',dirflg - - i1=0 - j1=0 - i0=0 - j0=0 - icheck = 1 - -c Start process of crossing this cell, check if we have missing data. -15 If (Work(1,i,j).eq.-1) Goto 7777 - -c Write (*,*) ' ' -c Write (*,*) 'i,j,ii,jj ',i,j,ii,jj -c Write (*,*) 'x,y,side0 ',x,y,side0 -c Write (*,*) 'rpxi,rpyj ',rpxi,rpyj -c Write (*,*) U(i,jj)*dirflg,V(i,jj)*dirflg,' || ', -c & U(ii,jj)*dirflg,V(ii,jj)*dirflg -c Write (*,*) U(i,j)*dirflg,V(i,j)*dirflg,' || ', -c & U(ii,j)*dirflg,V(ii,j)*dirflg - -C Determine if there are already too many streamlines around. - If (track.gt.btrack) Then - If (minspc.lt.1.5) Then - If (Work(icheck,i,j).eq.0) Then - ovrlap=0 - Else - ovrlap=ovrlap+Work(icheck,i,j) - If (ovrlap.ge.jnint(1./minspc)) Goto 7777 - End If - icheck = 2 - Else - If (Work(icheck,i,j).gt.0) Goto 7777 - Do 20 djj=-1,0,1 - Do 20 dii=-1,0,1 - If (dii.eq.0 .and. djj.eq.0) Goto 20 - If (dii.ne.0 .and. djj.ne.0) Then - k=jnint(minspc*.707)-1 - Else - k=jnint(minspc)-1 - End If - if (k.gt.track-btrack) k=track-btrack - If (k.lt.1) Goto 20 - iii=i - jjj=j - Do 18 l=1,k - iii=iii+dii - If (iii.lt.ill .or. iii.gt.ium) Goto 20 - jjj=jjj+djj - If (jjj.lt.jll .or. jjj.gt.jum) Goto 20 - If (Work(1,iii,jjj).gt.0) Goto 7777 - If (Work(2,iii,jjj).le.0) Goto 18 - Do 17 kkkk=1+track-k,track -17 If (itrack(kkkk).eq.iii .and. - & jtrack(kkkk).eq.jjj) Goto 18 - Goto 7777 -18 Continue -20 Continue - End If - icheck = 2 - End If - -C Determine flux contributions from each component. - Flux(1)=(-dirflg)*V( i, j) - Flux(2)=(-dirflg)*V(ii, j) - Flux(3)= +dirflg *U(ii, j) - Flux(4)= +dirflg *U(ii,jj) - Flux(5)= +dirflg *V(ii,jj) - Flux(6)= +dirflg *V( i,jj) - Flux(7)=(-dirflg)*U( i,jj) - Flux(8)=(-dirflg)*U( i, j) - -c Write (*,*) 'Flux' -c Write (*,*) Flux - -c Count total number of in, out, and zero contributions to net flux. - nin=0 - nout=0 - Do 25 k=1,8 - If (Flux(k).lt.0.0) Then - nin=nin+1 - Else If (Flux(k).gt.0.0) Then - nout=nout+1 - End If -25 Continue - If (nin.eq.0) Goto 7777 - -c Check if there are no exit points in this cell. - If (nout.eq.0) Then - -c Determine termination point within this cell. - x1=-Flux(8)-Flux(7) - x2=-Flux(4)-Flux(3) - If (x1+x2.le.0.0) Then - xx=0.5 - Else - xx=x1/(x1+x2) - End If - y1=-Flux(5)-Flux(6) - y2=-Flux(1)-Flux(2) - If (y1+y2.le.0.0) Then - yy=0.5 - Else - yy=y1/(y1+y2) - End If - done=.true. -c Write (*,*) 'terminated at ',xx,yy - Goto 77 ! go to drawing portion - End If - -c Make a list of segments on cell border with like contribution to flux. -c Record location, side, and flux contribution. - influx=0.0 - outflux=0.0 - nsg=0 - SgLoc(0)=0.0 - Do 35 k=1,4 - kkk=k+k - kk=kkk-1 - If (Flux(kk).lt.0.0) Then - flxflg=(Flux(kkk).gt.0.0) - Else If (Flux(kk).gt.0.0) Then - flxflg=(Flux(kkk).lt.0.0) - Else - flxflg=.false. - End If - If (flxflg) Then - xy=Flux(kk)/(Flux(kk)-Flux(kkk)) - If (xy.gt.0.0) Then - nsg=nsg+1 - SgSide(nsg)=k - SgLoc(nsg)=float(k-1)+xy - SgCont(nsg)=xy*Flux(kk)/2 - If (SgCont(nsg).lt.0.0) Then - influx=influx+SgCont(nsg) - Else - outflux=outflux+SgCont(nsg) - End If - End If - If (xy.lt.1.0) Then - nsg=nsg+1 - SgSide(nsg)=k - SgCont(nsg)=(1.0-xy)*Flux(kkk)/2 - End If - SgLoc(nsg)=float(k) - Else - nsg=nsg+1 - SgLoc(nsg)=float(k) - SgSide(nsg)=k - SgCont(nsg)=Flux(kk)+Flux(kkk) - End If - If (SgCont(nsg).lt.0.0) Then - influx=influx+SgCont(nsg) - Else - outflux=outflux+SgCont(nsg) - End If -35 Continue - -c Adjust the magnitude of the flux segments to make total flux integrated -c around the cell zero. Integrate to get stream function values. - mult=sqrt((-outflux)/influx) - SgSF(0)=0.0 - Do 40 k=1,nsg - If (SgCont(k).gt.0.0) Then - SgSF(k)=SgSF(k-1)+SgCont(k)/mult - Else - SgSF(k)=SgSF(k-1)+SgCont(k)*mult - End If -c Write (*,*) SgLoc(k),SgSide(k),SgCont(k),SgSF(k) -40 Continue - SgSF(nsg)=0.0 - -c Based on side of entry, determine circular location of endpoint -c and direction to search for exit point. - If (side0.eq.1) Then - curloc=x - forward=dirflg*(U(i,j)*(1.0-x)+U(ii,j)*x).gt.0.0 - Else If (side0.eq.2) Then - curloc=1.0+y - forward=dirflg*(V(ii,j)*(1.0-y)+V(ii,jj)*y).gt.0.0 - Else If (side0.eq.3) Then - curloc=3.0-x - forward=dirflg*(U(i,jj)*x+U(ii,jj)*(1.0-x)).lt.0.0 - Else!If (side0.eq.4) Then - curloc=4.0-y - forward=dirflg*(V(i,j)*y+V(i,jj)*(1.0-y)).lt.0.0 - End If - -c Write (*,*) 'curloc,forward ',curloc,forward - -c Determine stream function value of entry location. - Do 45 kk=1,nsg-1 -45 If (SgLoc(kk).gt.curloc) Goto 50 -50 k=kk-1 -c Write (*,*) 'k,kk ',k,kk - If (SgCont(kk).ge.0.0) Goto 7777 -c If (SgLoc(kk).eq.SgLoc(k)) Goto 7777 - curSF=SgSF(k)+ - & (SgSF(kk)-SgSf(k))*(curloc-SgLoc(k))/(SgLoc(kk)-SgLoc(k)) - If (k.lt.1) k=nsg -c Write (*,*) 'k,kk,curSF ',k,kk,curSF - -c Search for next occurence of this value of the stream function. - kkk=k - If (forward) Then -55 k=kk - kk=kk+1 - If (kk.gt.nsg) kk=1 - If (k.eq.kkk) Goto 7777 - If (SgCont(kk).le.0.0) Goto 55 - If ((SgSf(k).le.curSF) .neqv. (curSF.lt.SgSf(kk))) Goto 55 - Else -60 kk=k - k=k-1 - If (k.lt.1) k=nsg - If (k.eq.kkk) Goto 7777 - If (SgCont(kk).le.0.0) Goto 60 - If ((SgSf(k).le.curSF) .neqv. (curSF.lt.SgSf(kk))) Goto 60 - End If - If (k.eq.nsg) k=0 -c If (SgSf(kk).eq.SgSf(k)) Goto 7777 - outloc=SgLoc(k)+ - & (SgLoc(kk)-SgLoc(k))*(curSF-SgSF(k))/(SgSF(kk)-SgSf(k)) - side0=SgSide(kk) - -c Write (*,*) 'k,kk,outloc ',k,kk,outloc,side0 - -C Based upon exit side, figure out location in x/y space. - If (side0.eq.1) Then - xx=outloc - yy=0.0 - Else If (side0.eq.2) Then - xx=1.0 - yy=outloc-1.0 - Else If (side0.eq.3) Then - xx=3.0-outloc - yy=1.0 - Else!If (side0.eq.4) Then - xx=0.0 - yy=4.0-outloc - End If - -c Write (*,*) 'xx,yy ',xx,yy - -C Record plotting location for this cell. -77 ntot=ntot+1 - kpnt=kpnt+dkpnt - If (ntot.le.narrow) Goto 79 - If (Work(2,i,j).ne.0) Goto 79 - dx=xx-x - dy=yy-y - mag=sqrt(dx*dx+dy*dy) - If (mag.lt.0.2) Goto 79 - LCPnt(kpnt)=0 - ntot=0 -79 IPnt(kpnt)=rpxi+xx - JPnt(kpnt)=rpyj+yy - -c Patch to prevent infinite loop. - i1=i0 - j1=j0 - i0=i - j0=j - -c Keep track of cells used so far. - Work(2,i,j)=Work(2,i,j)+1 - track=track+1 - itrack(track)=i - jtrack(track)=j - -C Based on exit side, figure out stuff for next cell. - If (done) Goto 7775 - If (side0.eq.1) Then - side0=3 - jj=j - j=j-1 - If (j.lt.1) Goto 7775 - rpyj=rpyj-1.0 - x=xx - y=1.0 - Else If (side0.eq.2) Then - side0=4 - i=ii - ii=ii+1 - If (i.gt.ium) Goto 7775 - rpxi=rpxi+1.0 - x=0.0 - y=yy - Else If (side0.eq.3) Then - side0=1 - j=jj - jj=jj+1 - If (j.gt.jum) Goto 7775 - rpyj=rpyj+1.0 - x=xx - y=0.0 - Else If (side0.eq.4) Then - side0=2 - ii=i - i=i-1 - If (i.lt.1) Goto 7775 - rpxi=rpxi-1.0 - x=1.0 - y=yy - End If - -c Patch to prevent infinite loop. - If (i.eq.i1 .and. j.eq.j1) Then -c Write (*,*) 'WARNING, WARNING, WARNING!!!!!!!!' -c Write (*,*) 'Infinite loop detected.' - loopct=loopct+1 - If (loopct.ge.3) Goto 7777 - Else - loopct=0 - End If - - Goto 15 ! loop back to continue streamline - -c Escape point for streamline hitting grid border, source, or sink. -7775 ntrack=(ntrack+1)/2 ! allow shorter streamlines in this case. - -c Escape point for all others...record kpnt value. -7777 If (dkpnt.eq.-1) Then - kpnt1=kpnt - Else If (dkpnt.eq.1) Then - kpnt2=kpnt - End If - -7779 Continue ! Loop for streamline directions - -C Don't draw this streamline if it is too short. - If (track.lt.ntrack) Then - Do 995 k=1,track -995 Work(2,itrack(k),jtrack(k))=Work(2,itrack(k),jtrack(k))-1 - Do 996 k=kpnt1,kpnt2 -996 LCPnt(k)=1 - Return - Else - Do 997 k=1,track -997 Work(1,itrack(k),jtrack(k))=Work(1,itrack(k),jtrack(k))+1 - End If - npass = 5 - wgt1 = 6 - wgt2 = 88 -c Do smoothing. - If (npass.gt.0) Then ! we are going to smooth the streamlines. - Do 9011 kkkk=1,npass - k=kpnt1+1 - im=IPnt(kpnt1) - xx=IPnt(k) - jm=JPnt(kpnt1) - yy=JPnt(k) - Do 9009 kp=kpnt1+2,kpnt2 - ip=IPnt(kp) - jp=JPnt(kp) - IPnt(k)=(wgt1*(ip+im)+wgt2*xx)/100 - JPnt(k)=(wgt1*(jp+jm)+wgt2*yy)/100 - im=xx - jm=yy - xx=ip - yy=jp -9009 k=kp -9011 Continue - End If -c Draw streamline. -c Call FGVectors(Ipnt(kpnt1),Jpnt(kpnt1),0,kpnt2+1-kpnt1) - npoints = npoints + 1 - xpoints(npoints) = -99999.0 - ypoints(npoints) = -99999.0 - - do 1324 i = kpnt1, kpnt2 - npoints = npoints + 1 - xpoints(npoints) = Ipnt(i) - ypoints(npoints) = Jpnt(i) -1324 continue - -c Draw arrows. - If (kpnt1.lt.0) Then - kkk=kpnt1+2 - LCPnt(kkk)=iand(LCPnt(kpnt1),LCPnt(kpnt1+1)) - Else - kkk=kpnt1 - End If -c Call fgrotate(1) - Do 9019 k=kkk,kpnt2 - If (LCpnt(k).ne.0) Goto 9019 - LCPnt(k)=1 - - If (k.lt.0) Then - km=k - kp=k+1 - Else - km=k-1 - kp=k - End If - - dx=real(IPnt(kp)-IPnt(km)) - dy=real(JPnt(kp)-JPnt(km)) - mag=sqrt(dx*dx+dy*dy) - If (mag.eq.0.0) Goto 9019 - mag = mag/asiz - dx=dx/mag - dy=dy/mag - x = (IPnt(km)+IPnt(kp))/2 - y = (JPnt(km)+JPnt(kp))/2 -c Call FGrelOrigin(x, y) - px(1)=+dy-dx - py(1)=-dy-dx - px(2)=0 - py(2)=0 - px(3)=py(1) - py(3)=-px(1) - npoints = npoints + 1 - xpoints(npoints) = -99999.0 - ypoints(npoints) = -99999.0 - npoints = npoints + 1 - xpoints(npoints) = x - (+dy-dx) - ypoints(npoints) = y - (-dy-dx) - npoints = npoints + 1 - xpoints(npoints) = x - ypoints(npoints) = y - npoints = npoints + 1 - xpoints(npoints) = x - (-dy-dx) - ypoints(npoints) = y + (+dy-dx) - -c Call FGVectors(px,py,1,3) -9019 Continue -c Call fgrotate(0) - - Return - End - - Subroutine StrmSmth(smoothness,npasses) - -C Inputs: -C smoothness R*4 Must be from 0.0 to 2.0. 1.0 is nominal. -C npasses I*4 Number of smoothing passes. 0 to 10. - - Implicit None - INCLUDE 'IntrinsicFunctions.inc' - -c declare formal arguments - Real*4 smoothness - Integer*4 npasses -c - - Integer*4 wgt1,wgt2,npass - Common /StrmSmthCmn/npass,wgt1,wgt2 -Common block `strmsmthcmn' initialized by another program unit -c only one program unit may specify initial values for a -c particular common block -c Data npass/0/ - - If (smoothness.lt.0.0 .or. smoothness.gt.2.0) Return - If (npasses.lt.0 .or. npasses.gt.10) Return - If (smoothness.eq.0.0 .or. npasses.eq.0) Then - npass=0 - Else - npass=npasses - wgt1=jnint(25.0*smoothness) - wgt2=100-2*wgt1 - End If - - Return - End diff --git a/nativeLib/rary.meteorological/src/strmpak.h b/nativeLib/rary.meteorological/src/strmpak.h deleted file mode 100755 index ce7cccb919..0000000000 --- a/nativeLib/rary.meteorological/src/strmpak.h +++ /dev/null @@ -1,40 +0,0 @@ - -// --------------------------------------------------------------------------- -// This software is in the public domain, furnished "as is", without technical -// support, and with no warranty, express or implied, as to its usefulness for -// any purpose. -// -// strmpak.h -// -// Interface to a fortran streamline drawing routine, strmpak.f -// -// Author: J. Ramer -// --------------------------------------------------------------------------- - -#ifndef _strmpak_H -#define _strmpak_H - -#ifdef IDENT_H -static const char* const strmpak_h_Id = - "$Id: strmpak.h,v 1.2 2000/08/16 23:12:36 murray Exp $"; -#endif - -#include "ExtFtn.h" - -EXT_FTN (void, strmpak, (const float * U, - const float * V, - int * work, - const int * mnx, - const int * nx, - const int * ny, - const int * asize, - const float * minspc, - const float * maxspc, - const float * badlo, - const float * badhi)) - -EXT_FTN (void, strmsmth, (float * smoothness, int * npass)) - -#endif - - diff --git a/nativeLib/rary.meteorological/src/subaray.f b/nativeLib/rary.meteorological/src/subaray.f deleted file mode 100755 index ba946c95a6..0000000000 --- a/nativeLib/rary.meteorological/src/subaray.f +++ /dev/null @@ -1,29 +0,0 @@ -c -c - subroutine sub_aray(a,b,result,mni,ni,nj) -c -c..... Routine to take the difference of two fields. Each i,j of array 'b' -c..... is subtracted from the coresponding i,j of array 'a'. -c -c..... Original : 01-13-89 Peter A. Stamus -c 08-11-89 Added bad data check - Adler fix. -c 09-20-89 Add implicit none. -c - implicit none - integer mni, ni, nj, i, j - real bad, flag - parameter(flag = 1.e37) - real a(mni,nj), b(mni,nj), result(mni,nj) -c - bad = 1e36 - do 1 j=1,nj - do 1 i=1,ni - if(a(i,j).gt.bad .or. b(i,j).gt.bad) then - result(i,j)=flag - else - result(i,j) = a(i,j) - b(i,j) - endif -1 continue -c - return - end diff --git a/nativeLib/rary.meteorological/src/sunfuncs.f b/nativeLib/rary.meteorological/src/sunfuncs.f deleted file mode 100755 index 6f0df97d27..0000000000 --- a/nativeLib/rary.meteorological/src/sunfuncs.f +++ /dev/null @@ -1,66 +0,0 @@ -C J. Wakefield 28 Jan 82 Original version - -C***These formulas are from Paltridge and Platt, 1976. They reference Spencer, -C***1971 for the solar declination and equation of time. -C------------------------------------------------------------------------------ - real FUNCTION RADNORM(JD) -C***Normalized earth-sun distance factor (R0/R)**2 -C***JD is input Julian day number - Implicit None -c declare formal arguments - integer jd -c ---------------- - real DAYANG1, DAYANG2 -c ---------------- -c - DAYANG1=2.*3.14159265*(JD-1)/365. - DAYANG2=2.*DAYANG1 - - RADNORM= 1.000110 - 1 +0.034221*COS(DAYANG1)+0.001280*SIN(DAYANG1) - 2 +0.000719*COS(DAYANG2)+0.000077*SIN(DAYANG2) - - RETURN - END -C------------------------------------------------------------------------------ - real FUNCTION SOLDEC(JD) -C***Solar declination angle (radians) -C***JD is input Julian day number - Implicit None -c declare formal arguments - integer jd -c ---------------- - real DAYANG1, DAYANG2, DAYANG3 -c ---------------- -c - DAYANG1=2.*3.14159265*(JD-1)/365. - DAYANG2=2.*DAYANG1 - DAYANG3=3.*DAYANG1 - - SOLDEC= 0.006918 - 1 -0.399912*COS(DAYANG1)+0.070257*SIN(DAYANG1) - 2 -0.006758*COS(DAYANG2)+0.000907*SIN(DAYANG2) - 3 -0.002697*COS(DAYANG3)+0.001480*SIN(DAYANG3) - - RETURN - END -C------------------------------------------------------------------------------ - real FUNCTION TIMEQ(JD) -C***Equation of time (radians) -C***JD is input Julian day number - Implicit None -c declare formal arguments - integer jd -c ---------------- - real DAYANG1, DAYANG2 -c ---------------- -c - DAYANG1=2.*3.14159265*(JD-1)/365. - DAYANG2=2.*DAYANG1 - - TIMEQ= 0.000075 - 1 +0.001868*COS(DAYANG1)-0.032077*SIN(DAYANG1) - 2 -0.014615*COS(DAYANG2)-0.040849*SIN(DAYANG2) - - RETURN - END diff --git a/nativeLib/rary.meteorological/src/sweat.f b/nativeLib/rary.meteorological/src/sweat.f deleted file mode 100755 index b77fdc833e..0000000000 --- a/nativeLib/rary.meteorological/src/sweat.f +++ /dev/null @@ -1,187 +0,0 @@ - SUBROUTINE SWEAT(P,T,TD,NLVLS,PW,UW,VW,NW,SWIDX) - IMPLICIT NONE -C -C Statement of purpose. -C --------------------- -C This routine computes the severe weather threat (SWEAT) index from -C sounding data. -C -C History. -C -------- -C Don Baker 01 Jul 84 Original version. -C Don Baker 15 May 85 Updated for CWP. -C Dale Perry Dec 96 Updated for WFO. -C -C Description of input and output. -C -------------------------------- -C On input: -C --------- -C P Real Array Sounding pressures (mb). -C T Real Array Sounding temperatures (K). -C TD Real Array Sounding dew points (K). -C NLVLS Integer Number of sounding levels passed. -C PW Real Array Wind level pressures (mb). -C UW Real Array Wind level u-components (m/s). -C VW Real Array Wind level v-components (m/s). -C NW Integer Number of wind levels passed. -C -C On output: -C ---------- -C SWIDX Real Severe weather threat index. -C -C -C Input arguments. -C - INTEGER NLVLS,NW - REAL P(NLVLS),T(NLVLS),TD(NLVLS),UW(NW),VW(NW),PW(NW) -C -C Output arguments. -C - REAL SWIDX -C -C Internal variables. -C - REAL P1,P2,P3,TD850,T500,DD500,FF500,DD850,FF850 - REAL U500,V500,U850,V850,SINDIR,TOTAL,DP,PRES,X1,X2 - INTEGER I,K -C -C External functions. -C - REAL INTERP1 -C -C Subroutine constants. -C - REAL RPD,MS2KT,FLAG - PARAMETER (RPD=0.017,MS2KT=1.94,FLAG=99999.) -C -C Initialize value of SWEAT index. If the surface pressure is too low, -C exit the routine. Also, if the top of the data is not high enough, -C exit the routine. -C - SWIDX=FLAG - IF (P(1).LT.820. .OR. PW(1).LT.820. .OR. P(NLVLS).GT.500. .OR. - + PW(NW).GT.500.) GO TO 999 -C -C Determine 850 mb temperature and dew point from sounding. -C - IF (P(1).LT.900.) THEN - PRES=800. - ELSE - PRES=850. - ENDIF - - DO 1 I=1,NLVLS - IF (P(I).LE.PRES) THEN - IF (I.EQ.1) THEN - TD850=TD(I) - GO TO 2 - END IF - P1=ALOG(P(I-1)) - P2=ALOG(PRES) - P3=ALOG(P(I)) - TD850=INTERP1(TD(I-1),TD(I),P1,P2,P3) - GO TO 2 - ENDIF - 1 CONTINUE -c if we got here then the data doesn't support the computation - GO TO 999 - - 2 CONTINUE -C -C Determine 850 mb wind direction and speed. -C - DO 3 I=1,NW - IF (PW(I).LE.PRES) THEN - IF (I.EQ.1) THEN - U850=UW(I) - V850=VW(I) - GO TO 4 - END IF - P1=ALOG(PW(I-1)) - P2=ALOG(PRES) - P3=ALOG(PW(I)) - U850=INTERP1(UW(I-1),UW(I),P1,P2,P3) - V850=INTERP1(VW(I-1),VW(I),P1,P2,P3) - CALL DDFF(U850,V850,DD850,FF850,1) - GO TO 4 - ENDIF - 3 CONTINUE -c if we got here then the data doesn't support the computation - GO TO 999 - - 4 CONTINUE -C -C Determine 500 mb temperature from the sounding. -C - PRES=500. - DO 8 I=1,NLVLS - IF (P(I).LE.PRES) THEN - IF (I.EQ.1) THEN - T500=T(I) - GO TO 9 - END IF - P1=ALOG(P(I-1)) - P2=ALOG(PRES) - P3=ALOG(P(I)) - T500=INTERP1(T(I-1),T(I),P1,P2,P3) - GO TO 9 - ENDIF - 8 CONTINUE -c if we got here then the data doesn't support the computation - GO TO 999 - - 9 CONTINUE -C -C Determine 500 mb wind direction and speed. -C - DO 13 I=1,NW - IF (PW(I).LE.PRES) THEN - IF (I.EQ.1) THEN - U500=UW(I) - V500=VW(I) - GO TO 14 - END IF - P1=ALOG(PW(I-1)) - P2=ALOG(PRES) - P3=ALOG(PW(I)) - U500=INTERP1(UW(I-1),UW(I),P1,P2,P3) - V500=INTERP1(VW(I-1),VW(I),P1,P2,P3) - CALL DDFF(U500,V500,DD500,FF500,1) - K=I - GO TO 14 - ENDIF - 13 CONTINUE -c if we got here then the data doesn't support the computation - GO TO 999 - - 14 CONTINUE -C -C Compute the totals index. -C - CALL TOTALS(P,T,TD,NLVLS,TOTAL,X1,X2) -C -C Compute the SWEAT index. Wind speeds must be in knots. -C - FF850=FF850*MS2KT - FF500=FF500*MS2KT - IF (DD850.LT.130. .OR. DD850.GT.250. .OR. - + DD500.LT.210. .OR. DD500.GT.310. .OR. - + (DD500-DD850).LT.0. .OR. - + FF500.LT.15. .OR. FF850.LT.15.) THEN - SINDIR=-0.2 - ELSE - SINDIR=SIN((DD500-DD850)*RPD) - ENDIF - IF (TOTAL.LT.49.) TOTAL=49. - IF (TD850.LT.273.15) THEN - DP=0. - ELSE - DP=TD850-273.15 - ENDIF - SWIDX=12*DP+20*(TOTAL-49.)+2*FF850+FF500+125*(SINDIR+0.2) -C -C EXIT. -C - 999 CONTINUE - RETURN - END diff --git a/nativeLib/rary.meteorological/src/sweatidx.f b/nativeLib/rary.meteorological/src/sweatidx.f deleted file mode 100755 index 79642807c6..0000000000 --- a/nativeLib/rary.meteorological/src/sweatidx.f +++ /dev/null @@ -1,64 +0,0 @@ -c -c - subroutine sweatidx(tt,td8,u8,v8,u5,v5,mni,ni,nj,q) -c -c.............................................................................. -c -c Routine to calculate sweat index from the total totals, -c 850 dewpoint, and wind components at 850 and 500.. -c -c Changes: -c J. Ramer 06-12-03 Copied from spechum. -c -c Inputs/Outputs: -c -c Variable Var Type I/O Description -c ---------- ---------- ----- ------------- -c tt RA I Total Totals -c td8 RA I 850mb dewpoint (K) -c u8 RA I 850mb u-component (K) -c v8 RA I 850mb v-component (K) -c u5 RA I 500mb u-component (K) -c v5 RA I 500mb v-component (K) -c mni I I First dimension of input array. -c ni,nj I I Grid dimensions in i,j. -c q RA O Sweat Index. -c -c -c User Notes: -c -c 1. No quality control is performed in this routine. -c -c.............................................................................. -c - implicit none - integer mni, ni, nj, i, j - real tt(mni,nj), td8(mni,nj) - real u8(mni,nj), v8(mni,nj), u5(mni,nj), v5(mni,nj) - real q(mni,nj) - real s8, s5, tt49, sdir - real flg,flag - Data flg,flag/99998.0,1e37/ - - Do 10 j=1,nj - Do 10 i=1,ni - If (tt(i,j).gt.flg .or. td8(i,j).gt.flg .or. - & u8(i,j).gt.flg .or. v8(i,j).gt.flg .or. - & u5(i,j).gt.flg .or. v5(i,j).gt.flg) Then - q(i,j)=flag - Else - s8 = sqrt(u8(i,j)*u8(i,j)+v8(i,j)*v8(i,j)) - s5 = sqrt(u5(i,j)*u5(i,j)+v5(i,j)*v5(i,j)) - if (s8.eq.0 .or. s5.eq.0) then - sdir = 0 - else - sdir = (u5(i,j)*v8(i,j)-v5(i,j)*u8(i,j))/(s8*s5) - End If - tt49 = amax1(tt(i,j)-49.0,0.0) - q(i,j) = 12*(td8(i,j)-273.15) + 20*tt49 + - & 2*1.944*s8 + s5*1.944 + 125*(sdir+0.2) - End If -10 Continue - - return - end diff --git a/nativeLib/rary.meteorological/src/tdofesat.f b/nativeLib/rary.meteorological/src/tdofesat.f deleted file mode 100755 index 8e685a4b3a..0000000000 --- a/nativeLib/rary.meteorological/src/tdofesat.f +++ /dev/null @@ -1,40 +0,0 @@ - Real*4 function TdofEsat(Es) - -C* As a function of saturation vapor pressure in millibars, returns -C* dewpoint in degrees K. - -C Author: J Ramer written in the late 1980's - -C Is based upon a variation of the integrated form of the Clausius-Clapeyron -C equation. Has an additional linear term in it and is fit to data in -C the Smithsonian Meterological Tables. Is accurate to one part in a -C thousand over the range from -25C to +35C. Its main advantage is that -C it is invertable. - - Implicit None - - Real*4 Es,lim1,lim2,b - - Data lim1,lim2/3.777647E-05,980.5386/ - - Real*4 Flag,Flg - Common/FlagFlg/Flag,Flg - -c Flag ridiculous values. - If (Es.lt.0.0 .or. Es.gt.lim2) Then - TdofEsat=Flag - Return - End If - -c Avoid floating underflow. - If (Es.lt.lim1) Then - TdofEsat=173.15 - Return - End If - -c Calculations for normal range of values. - b=26.66082-alog(Es) - TdofEsat=(b-sqrt(b*b-223.1986))/0.0182758048 - - Return - End diff --git a/nativeLib/rary.meteorological/src/temp2theta.f b/nativeLib/rary.meteorological/src/temp2theta.f deleted file mode 100755 index 85fcd8a533..0000000000 --- a/nativeLib/rary.meteorological/src/temp2theta.f +++ /dev/null @@ -1,54 +0,0 @@ - - Subroutine Temp2Theta(P,aflgp,T,aflgt,Theta,mnx,nx,ny) - - Implicit None - - Integer*4 aflgp,aflgt,mnx,nx,ny,i,j - - Real*4 P(mnx,ny),Theta(mnx,ny),T(mnx,ny), - & p0,R_cp,Flag,Flg,q - - Data p0,R_cp,Flag,Flg/1000.0,0.286,1e37,99998.0/ - - If (aflgp.ne.0) Then - If (aflgt.ne.0) Then - Do 10 j=1,ny - Do 10 i=1,nx - If (P(i,j).lt.Flg .and. T(i,j).lt.Flg) Then - Theta(i,j)=T(i,j)*(p0/P(i,j))**R_cp - Else - Theta(i,j)=Flag - End If -10 Continue - Else - q=T(1,1) - Do 20 j=1,ny - Do 20 i=1,nx - If (P(i,j).lt.Flg) Then - Theta(i,j)=q*(p0/P(i,j))**R_cp - Else - Theta(i,j)=Flag - End If -20 Continue - End If - Else - If (aflgt.ne.0) Then - q=(p0/P(1,1))**R_cp - Do 30 j=1,ny - Do 30 i=1,nx - If (P(1,1).lt.Flg .and. T(i,j).lt.Flg) Then - Theta(i,j)=T(i,j)*q - Else - Theta(i,j)=Flag - End If -30 Continue - Else - q=T(1,1)*(p0/P(1,1))**R_cp - Do 40 j=1,ny - Do 40 i=1,nx -40 Theta(i,j)=q - End If - End If - - Return - End diff --git a/nativeLib/rary.meteorological/src/temp_mixratio.c b/nativeLib/rary.meteorological/src/temp_mixratio.c deleted file mode 100755 index 4528635843..0000000000 --- a/nativeLib/rary.meteorological/src/temp_mixratio.c +++ /dev/null @@ -1,18 +0,0 @@ -#include "meteoLib.h" -#include -/*************************************************************************** -* Calculate the temperature at a given pressure and mixing ratio -* Borrowed the derived equation from tdofesat.f routine written by -* J. Ramer. -* input : pressure and mixing ratio -* output : tempmr -* Author: Dale Perry -***************************************************************************/ -void FTN_MANGLE (temp_mixratio) ( float * press, - float * mixratio, float * tempmr ) - { - float e = (*press * *mixratio)/(0.622 + *mixratio); - float b = 26.66082 - log(e); - *tempmr = (b - sqrt(b*b - 223.1986))/0.0182758048; - return; - } diff --git a/nativeLib/rary.meteorological/src/temp_of_te.c b/nativeLib/rary.meteorological/src/temp_of_te.c deleted file mode 100755 index c634ddb053..0000000000 --- a/nativeLib/rary.meteorological/src/temp_of_te.c +++ /dev/null @@ -1,154 +0,0 @@ -#include "meteoLib.h" -#include -#include - -/* This routine calculates the saturation tempurature of an equivalent - temperature at given pressure using the adiabatic definition */ - -float FTN_MANGLE (temp_of_te) (const float * te, const float * press) - { - static const int tmin = 193; - static const int tmax = 333; - static const int nval = 141; // 1 + tmax - tmin - static float TeData[987]; // 7 * nval - gfortran doesn't allow non-hardcoded values in const - static float * Te1000 = 0; - static float * Te850 = 0; - static float * Te700 = 0; - static float * Te600 = 0; - static float * Te500 = 0; - static float * Te350 = 0; - static float * Te200 = 0; - float * TeLookup; - float base; - float t,p,t1,t2,d,d1,d2,w; - int i; - -/* int diag = (*te>243 && *te<243.05 && *press>394.9 && *press<395); */ - - /* very first time, construct lookup table Te's of T from 193 to 343 K */ - if (Te1000==0) - { - Te1000 = TeData-tmin; - Te850 = Te1000+nval; - Te700 = Te850+nval; - Te600 = Te700+nval; - Te500 = Te600+nval; - Te350 = Te500+nval; - Te200 = Te350+nval; - p = 1000; - for (t=tmin; t<=tmax; t+=1) - Te1000[(int)t] = adiabatic_te(&t,&p); - p = 850; - for (t=tmin; t<=tmax; t+=1) - Te850[(int)t] = adiabatic_te(&t,&p); - p = 700; - for (t=tmin; t<=tmax; t+=1) - Te700[(int)t] = adiabatic_te(&t,&p); - p = 600; - for (t=tmin; t<=tmax; t+=1) - Te600[(int)t] = adiabatic_te(&t,&p); - p = 500; - for (t=tmin; t<=tmax; t+=1) - Te500[(int)t] = adiabatic_te(&t,&p); - p = 350; - for (t=tmin; t<=tmax; t+=1) - Te350[(int)t] = adiabatic_te(&t,&p); - p = 200; - for (t=tmin; t<=tmax; t+=1) - Te200[(int)t] = adiabatic_te(&t,&p); - } - - /* find correct table, check for beyond bounds of table */ - if (*press<=250) - { - TeLookup = Te200; - base = 200; - } - else if (*press<=400) - { - TeLookup = Te350; - base = 350; - } - else if (*press<=550) - { - TeLookup = Te500; - base = 500; - } - else if (*press<=650) - { - TeLookup = Te600; - base = 600; - } - else if (*press<=750) - { - TeLookup = Te700; - base = 700; - } - else if (*press<=900) - { - TeLookup = Te850; - base = 850; - } - else - { - TeLookup = Te1000; - base = 1000; - } - if (*te=TeLookup[tmax]) return 1e37; - - /* use table to get first guesses for value of temp */ -/* if (diag) printf("te,base %.2f %.0f\n",*te,base); */ - t1 = tmin; - t2 = (int)(*te); - if (t2>tmax) t2 = tmax; - while (t2-t1>=3) - { - t = (int)((t1+t2)/2); - if (TeLookup[(int)t]>*te) - t2 = t; - else if (TeLookup[(int)t]<*te) - t1 = t; - else - { - if (t1t+1) t2 = t+1; - break; - } - } -/* if (diag) printf("t1,t2,te1,te2 %.2f %.2f %.2f %.2f\n",t1,t2, - TeLookup[(int)t1],TeLookup[(int)t2]); */ - w = sqrt(base/(*press)); - t1 = (1-w)*TeLookup[(int)t1]+w*t1; - t2 = (1-w)*TeLookup[(int)t2]+w*t2; -/* if (diag) printf("t1,t2 %.2f %.2f\n",t1,t2); */ - - /* Iterate to find the exact solution */ - d1 = *te - adiabatic_te(&t1,press); - d2 = adiabatic_te(&t2,press) - *te; - w = d2/(d1+d2); - t = w*t1+(1-w)*t2; - d = adiabatic_te(&t,press) - *te; - i = 0; - while (i++<10) - { - if (d>0.01) - { - d2 = d; - t2 = t; - } - else if (d<-0.01) - { - d1 = -d; - t1 = t; - } - else - break; - w = d2/(d1+d2); - t = w*t1+(1-w)*t2; - d = adiabatic_te(&t,press) - *te; - } -/* if (diag) printf("t,i %.2f %d\n",t,i); */ - return t; - - } diff --git a/nativeLib/rary.meteorological/src/thermoRtns.c b/nativeLib/rary.meteorological/src/thermoRtns.c deleted file mode 100755 index 6292c8d08a..0000000000 --- a/nativeLib/rary.meteorological/src/thermoRtns.c +++ /dev/null @@ -1,212 +0,0 @@ -/****************************************************************/ -/* Library routines to compute the equivalent potential temp */ -/* (ept) and the temp of saturation adiabat (tsa). These */ -/* routines were lifted from the sharp code used in the */ -/* interactive Skew-T application. Original codes used on */ -/* DARE were unavailable. This was resurrected for the */ -/* FORTRAN routine 'wbzero.f'. */ -/* Dale Perry, 5/97 */ -/****************************************************************/ - -#include "meteoLib.h" -#include - -#if 0 -/* Use this un-called function stub to fool the compiler to */ -/* accept these routines as extern "C" routines in the header */ -/* file 'meteoLib.h'. If this is not included, the function */ -/* call names get name mangled and are not recognizable to the */ -/* linking process in igc. */ -void thermoRtns() { } -#endif - -float FTN_MANGLE (ept) (float *t, float *td, float *p) -{ - /* System generated locals */ - float ret_val; - double d1, d2; - - /* Local variables */ - static float tlcl; - extern double tcon(float *, float *); - static float eptk, w, tk, tc, tl, tdc, pt; - extern double wmr(float *, float *); - - -/* THIS FUNCTION RETURNS THE EQUIVALENT POTENTIAL TEMP EPT */ -/* (KELVIN) FOR A PARCEL OF AIR INITIALLY AT TEMP T (KELVIN), */ -/* DEW POINT TD (KELVIN) AND PRESSURE P (MILLIBARS). */ - -/* BAKER,SCHLATTER 17-MAY-1982 Original version */ - -/* THE FORMULA USED */ -/* IS EQ.(43) IN BOLTON, DAVID, 1980: "THE COMPUTATION OF EQUIVALENT */ -/* POTENTIAL TEMPERATURE," MONTHLY WEATHER REVIEW, VOL. 108, NO. 7 */ -/* (JULY), PP. 1046-1053. THE MAXIMUM ERROR IN EPT IN 0.3C. IN MOST */ -/* CASES THE ERROR IS LESS THAN 0.1C. */ - -/* COMPUTE THE MIXING RATIO (GRAMS OF WATER VAPOR PER KILOGRAM OF */ -/* DRY AIR). */ - - tdc = *td - 273.16; - w = wmr(p, &tdc); - -/* COMPUTE THE TEMP (CELSIUS) AT THE LIFTING CONDENSATION LEVEL. */ - tc = *t - 273.16; - tlcl = tcon(&tc, &tdc); - tk = *t; /* + 273.16; */ - tl = tlcl + 273.16; - d1 = (double) (1e3 / *p); - d2 = (double) ((1.0 - w * 2.8e-4) * 0.2854); - pt = tk * pow(d1, d2); - eptk = pt * exp((3.376 / tl - 0.00254) * w * (w * 8.1e-4 + 1.0)); - ret_val = eptk; /* - 273.16; */ - return ret_val; -} /* ept */ - -double wmr(float *p, float *t) -{ - /* Initialized data */ - - static float eps = 0.62197; - - /* System generated locals */ - float ret_val; - - /* Local variables */ - static float r, x, fwesw; - extern double esw(float *); - static float wfw; - - -/* THIS FUNCTION APPROXIMATES THE MIXING RATIO WMR (GRAMS OF WATER */ -/* VAPOR PER KILOGRAM OF DRY AIR) GIVEN THE PRESSURE P (MB) AND THE */ -/* TEMPERATURE T (CELSIUS). */ - -/* BAKER,SCHLATTER 17-MAY-1982 Original version */ - -/* THE FORMULA USED IS GIVEN ON P. 302 OF THE */ -/* SMITHSONIAN METEOROLOGICAL TABLES BY ROLAND LIST (6TH EDITION). */ - -/* EPS = RATIO OF THE MEAN MOLECULAR WEIGHT OF WATER (18.016 G/MOLE) */ -/* TO THAT OF DRY AIR (28.966 G/MOLE) */ -/* THE NEXT TWO LINES CONTAIN A FORMULA BY HERMAN WOBUS FOR THE */ -/* CORRECTION FACTOR WFW FOR THE DEPARTURE OF THE MIXTURE OF AIR */ -/* AND WATER VAPOR FROM THE IDEAL GAS LAW. THE FORMULA FITS VALUES */ -/* IN TABLE 89, P. 340 OF THE SMITHSONIAN METEOROLOGICAL TABLES, */ -/* BUT ONLY FOR TEMPERATURES AND PRESSURES NORMALLY ENCOUNTERED IN */ -/* IN THE ATMOSPHERE. */ - - x = (*t - 12.5 + 7500.0 / *p) * 0.02; - wfw = *p * 4.5e-6 + 1.0 + x * 0.0014 * x; - fwesw = wfw * esw(t); - r = eps * fwesw / (*p - fwesw); - -/* CONVERT R FROM A DIMENSIONLESS RATIO TO GRAMS/KILOGRAM. */ - - ret_val = r * 1e3; - return ret_val; -} /* wmr */ - -double esw(float *t) -{ - /* Initialized data */ - - static float es0 = 6.1078; - - /* System generated locals */ - float ret_val, r1; - - /* Local variables */ - static float pol; - - -/* THIS FUNCTION RETURNS THE SATURATION VAPOR PRESSURE ESW (MILLIBARS) */ -/* OVER LIQUID WATER GIVEN THE TEMPERATURE T (CELSIUS). */ - -/* BAKER,SCHLATTER 17-MAY-1982 Original version */ - -/* THE POLYNOMIAL APPROXIMATION BELOW IS DUE TO HERMAN WOBUS, A */ -/* MATHEMATICIAN WHO WORKED AT THE NAVY WEATHER RESEARCH FACILITY, */ -/* NORFOLK, VIRGINIA, BUT WHO IS NOW RETIRED. THE COEFFICIENTS OF THE */ -/* POLYNOMIAL WERE CHOSEN TO FIT THE VALUES IN TABLE 94 ON PP. 351-353 */ -/* OF THE SMITHSONIAN METEOROLOGICAL TABLES BY ROLAND LIST (6TH ED). */ -/* THE APPROXIMATION IS VALID FOR -50 < T < 100C. */ - -/* ES0 = SATURATION VAPOR RESSURE OVER LIQUID WATER AT 0C */ - pol = *t * (*t * (*t * (*t * (*t * (*t * (*t * (*t * (*t * - -3.0994571e-20 + 1.1112018e-17) - 1.7892321e-15) + - 2.1874425e-13) - 2.9883885e-11) + 4.3884187e-9) - - 6.1117958e-7) + 7.8736169e-5) - 0.0090826951) + 0.99999683; - -/* Computing 8th power */ - r1 = pol, r1 *= r1, r1 *= r1; - ret_val = es0 / (r1 * r1); - return ret_val; -} /* esw */ - -double tcon(float *t, float *d) -{ - /* System generated locals */ - float ret_val; - - /* Local variables */ - static float s, dlt; - - -/* THIS FUNCTION RETURNS THE TEMPERATURE TCON (CELSIUS) AT THE LIFTING */ -/* CONDENSATION LEVEL, GIVEN THE TEMPERATURE T (CELSIUS) AND THE */ -/* DEW POINT D (CELSIUS). */ - -/* BAKER,SCHLATTER 17-MAY-1982 Original version */ - -/* COMPUTE THE DEW POINT DEPRESSION S. */ - - s = *t - *d; - -/* THE APPROXIMATION BELOW, A THIRD ORDER POLYNOMIAL IN S AND T, */ -/* IS DUE TO HERMAN WOBUS. THE SOURCE OF DATA FOR FITTING THE */ -/* POLYNOMIAL IS UNKNOWN. */ - - dlt = s * (*t * 0.001278 + 1.2185 + s * (s * 1.173e-5 - - 0.00219 - *t * 5.2e-6)); - ret_val = *t - dlt; - return ret_val; -} /* tcon */ - -/* Very little documentation on these following routines, so unsure */ -/* of the origin and derivation of these algorithms. */ - -float FTN_MANGLE (tsa) (float * os, float * pres) -{ - extern double w(float, float); - const float rocp = 0.28571482; - float tq, tqk, x, a, d; - unsigned short int i; - float sign; - - a= *os; /*+273.16; */ - tq=253.16; - d=120.0; - - for (i=0; i<12; i++) - { - tqk=tq-273.16; - d /=2; - x=a*exp(-2.6518986*w(tqk, *pres)/tq)-tq*pow((1000.0/ *pres),rocp); - if (fabs(x) <= 0.0) - break; - sign = (x < 0.0) ? -1:1; - tq += (d*sign); - } - - return tq; /*-273.16); */ -} - -double w(float temp, float pres) -{ - float x; - - x=esat(&temp); - return(622.0*x/(pres-x)); -} diff --git a/nativeLib/rary.meteorological/src/theta2temp.f b/nativeLib/rary.meteorological/src/theta2temp.f deleted file mode 100755 index 3aa6e7ace1..0000000000 --- a/nativeLib/rary.meteorological/src/theta2temp.f +++ /dev/null @@ -1,56 +0,0 @@ - - Subroutine Theta2Temp(P,aflgp,Theta,aflgth,T,mnx,nx,ny) - - Implicit None - - Integer*4 aflgp,aflgth,mnx,nx,ny,i,j - - Real*4 P(mnx,ny),Theta(mnx,ny),T(mnx,ny), - & p0,R_cp,Flag,Flg - - Data p0,R_cp,Flag,Flg/1000.0,0.286,1e37,99998.0/ - - If (aflgp.ne.0) Then - If (aflgth.ne.0) Then - Do 10 j=1,ny - Do 10 i=1,nx - If (P(i,j).lt.Flg .and. Theta(i,j).lt.Flg) Then - T(i,j)=Theta(i,j)*(P(i,j)/p0)**R_cp - Else - T(i,j)=Flag - End If -10 Continue - Else - Do 20 j=1,ny - Do 20 i=1,nx - If (P(i,j).lt.Flg .and. Theta(1,1).lt.Flg) Then - T(i,j)=Theta(1,1)*(P(i,j)/p0)**R_cp - Else - T(i,j)=Flag - End If -20 Continue - End If - Else - If (aflgth.ne.0) Then - Do 30 j=1,ny - Do 30 i=1,nx - If (P(1,1).lt.Flg .and. Theta(i,j).lt.Flg) Then - T(i,j)=Theta(i,j)*(P(1,1)/p0)**R_cp - Else - T(i,j)=Flag - End If -30 Continue - Else - Do 40 j=1,ny - Do 40 i=1,nx - If (P(1,1).lt.Flg .and. Theta(1,1).lt.Flg) Then - T(i,j)=Theta(1,1)*(P(1,1)/p0)**R_cp - Else - T(i,j)=Flag - End If -40 Continue - End If - End If - - Return - End diff --git a/nativeLib/rary.meteorological/src/thetawa.f b/nativeLib/rary.meteorological/src/thetawa.f deleted file mode 100755 index 1aeaed6fae..0000000000 --- a/nativeLib/rary.meteorological/src/thetawa.f +++ /dev/null @@ -1,55 +0,0 @@ - - real function thetawa(temp,dwpt,pres,iw,ier) - implicit none - -c####################################################################### -c -c Statement of purpose: Calculates the wet bulb potential temperature -c via the adiabatic method. -c -c Date: 13 June 1997 -c -c Input: -c -c temp - temperature (degrees Celsius) -c dwpt - dew point temperature (degrees Celsius) -c pres - pressure (mb) -c iw - > 0 for mixing ratio with respect to water -c < 0 for mixing ratio with respect to ice -c -c Output: -c -c thetawa - adiabatic wet bulb potential temperature (degrees Celsius) -c ier - > 0 routine successful -c < 0 routine failed -c -c###################################################################### -c declare formal arguments - real temp, dwpt, pres - integer iw, ier -c - real tl, pl, zl - integer n - parameter (n=100) - real soln(0:n) - -c -c Calculate the temperature, pressure and height at the lifting -c condensation level. -c - call tpzlcl(temp,dwpt,pres,iw,tl,pl,zl,ier) - if (ier.lt.0) then - thetawa= -999.0 - return - endif - soln(0)= tl - -c -c Calculate the adiabatic wet bulb potential temperature by bringing -c the parcel down pseudo-moist adiabatically from the LCL to 1000 mb. -c - call pseudolift(n,pl,1000.0,soln) - thetawa = soln(n) - - return - end diff --git a/nativeLib/rary.meteorological/src/totals.f b/nativeLib/rary.meteorological/src/totals.f deleted file mode 100755 index 93e2f8edaf..0000000000 --- a/nativeLib/rary.meteorological/src/totals.f +++ /dev/null @@ -1,124 +0,0 @@ - SUBROUTINE TOTALS(P,T,TD,NLVLS,TOTIDX,CRSTOT,VERTOT) - IMPLICIT NONE -C -C Statement of purpose. -C --------------------- -C This routine computes the totals index, cross totals index, and the -C vertical totals index from a sounding. -C -C History. -C -------- -C Don Baker 01 Jul 84 Original version. -C Don Baker 12 May 85 Added cross and vertical totals. -C Don Baker 15 Jun 85 Adapted code for CWP. -C -C Description of input and output. -C -------------------------------- -C On input: -C --------- -C P Real Array Sounding pressures (mb). -C T Real Array Sounding temperatures (C). -C TD Real Array Sounding dew points (C). -C NLVLS Integer Number of sounding levels passed. -C -C On output: -C ---------- -C TOTIDX Real Total totals index (C). -C CRSTOT Real Cross totals index (C). -C VERTOT Real Vertical totals index (C). -C -C -C Input arguments. -C - REAL P(1),T(1),TD(1) - INTEGER NLVLS -C -C Output arguments. -C - REAL TOTIDX,CRSTOT,VERTOT -C -C Internal variables. -C - REAL P1,P2,P3,T850,TD850,T500,PRES - INTEGER I, j -C -C External functions. -C - REAL INTERP1 -C -C Subroutine constants. -C - REAL FLAG - PARAMETER (FLAG=99999.) -C -C Initialize totals index to flag. If the surface pressure is too low, -C exit from routine. -C - TOTIDX=FLAG - CRSTOT=FLAG - VERTOT=FLAG - IF (P(1).LT.820.) GO TO 999 -C -C Determine 850 mb temperature and dew point from sounding. -C - T850 =T(1) - TD850=TD(1) - IF (P(1).LT.900.) THEN - PRES=800. - ELSE - PRES=850. - ENDIF - DO 1 I=1,NLVLS -C -C Case where the 850 level is at the surface. -C - IF ((I.EQ.1).AND.(P(I).EQ.PRES)) THEN - T850=T(1) - TD850=TD(1) - GOTO 2 - ELSE IF (P(I).LE.PRES) THEN - P1=ALOG(P(I-1)) - P2=ALOG(PRES) - P3=ALOG(P(I)) - T850=INTERP1(T(I-1),T(I),P1,P2,P3) - TD850=INTERP1(TD(I-1),TD(I),P1,P2,P3) - GO TO 2 - ENDIF - 1 CONTINUE -c if we have gotten to here, the data doesn't support the algoithm - goto 999 - - 2 CONTINUE -C -C Determine 500 mb temperature from the sounding. -C - PRES=500. - T500=T(i) -C -C Start above the level we left off for the 850 data -C - DO 3 j=i+1,NLVLS - IF (P(j).LE.PRES) THEN - P1=ALOG(P(j-1)) - P2=ALOG(PRES) - P3=ALOG(P(j)) - T500=INTERP1(T(j-1),T(j),P1,P2,P3) - GO TO 4 - ENDIF - 3 CONTINUE -c if we have gotten to here, the data doesn't support the algoithm - goto 999 - - 4 CONTINUE -C -C Compute the total totals, cross totals, and, vertical totals index. -C - CRSTOT=TD850-T500 - VERTOT=T850-T500 - TOTIDX=CRSTOT+VERTOT -C -C Exit. -C - 999 CONTINUE - RETURN - END diff --git a/nativeLib/rary.meteorological/src/tplcl.f b/nativeLib/rary.meteorological/src/tplcl.f deleted file mode 100755 index 52d9f6333d..0000000000 --- a/nativeLib/rary.meteorological/src/tplcl.f +++ /dev/null @@ -1,79 +0,0 @@ - subroutine tplcl(tk,td,pinit,tl,pl,ier) - implicit none -c -c################################################################## -c Statement of purpose: -c --------------------- -c Calculate the temperature and pressure at the LCL given the -c parcel's initial temperature, dew point and pressure. -c -c History: -c E. Thaler 13 Mar 1997 - original version -c -c On input: -c -c tk = parcel temperature in Celsius -c td = parcel dew point temperature in Celsius -c pinit = initial pressure level of the parcel -c -c On output: -c -c tl = temperature (K) at the LCL -c pl = pressure (mb) at the LCL -c ier = >0 if successful completion, <0 if failure -c -c################################################################## -c -c Input arguments. -c - real tk,td,pinit -c -c Output arguments. -c - real tl,pl - integer ier -c -c Local variables. -c - integer i - real*8 p0,tkk,tdk,theta,tlold,fprime,dtl -c -c Set up some parameters. -c - i = 0 - ier = -1 - p0 = 1000.d0 - tl = 0. - pl = 0. -c -c Convert temperature/dewpoint to K and compute -c initial potential temperature. -c - tkk = dble(tk) + 273.15d0 - tdk = dble(td) + 273.15d0 - theta = tkk * ((p0/dble(pinit))**.2854d0) -c -c Use Newton's method to compute the temperature -c at the LCL using Eq. (14) in Bolton (MWR 1980) -c - tlold = tdk - 10 fprime = (.001266d0/tlold) - (1.d0/(tlold**2)) - dtl = (1.d0/tlold) - (1.d0/tdk) + (.001266d0*dlog(tlold/tdk)) - & - (.000514d0*dlog(tkk/tdk)) - dtl = tlold - (dtl/fprime) -c -c If we have converged to a solution, compute the pressure at -c the LCL and return, otherwise iterate again. -c - if (dabs(dtl-tlold).le.1.d-7) then - pl = p0 * (((dtl/theta)**(1.d0/.2854d0))) - tl = dtl - ier = 1 - return - else - tlold = dtl - i= i+1 - if (i.lt.20) goto 10 - endif - return - end diff --git a/nativeLib/rary.meteorological/src/tpzlcl.f b/nativeLib/rary.meteorological/src/tpzlcl.f deleted file mode 100755 index 2f4430808b..0000000000 --- a/nativeLib/rary.meteorological/src/tpzlcl.f +++ /dev/null @@ -1,89 +0,0 @@ - - subroutine tpzlcl(tk,tdk,pinit,iw,tl,pl,zl,ier) - implicit none - -c######################################################################### -c -c Statement of purpose: Calculates the temperature at the lifted -c condensation level using Eq. 14 in Bolton, D., 1980: The computation of -c equivalent potential temperature. Monthly Weather Review, 108, 1046-1053. -c This equation is solved iteratively using Newton's method. -c Also calculates the pressure at the LCL and the vertical distance to the -c LCL from the initial lifting level. -c -c Date: 5 June 1997 -c -c Input: -c -c tk - parcel temperature in Kelvin -c td - parcel dew point temperature in Kelvin -c pinit - initial pressure level of the parcel in millibars -c iw - >0 for mixing ratio with respect to water -c <0 for mixing ratio with respect to ice -c -c Output: -c -c tl - temperature (Kelvin) at the LCL -c pl - pressure (mb) at the LCL -c zl - distance (m) between the initial level and the LCL -c ier - >0 if successful completion -c <0 if failure -c -c######################################################################## - - real tk, tdk, pinit, pl, tl, zl - real p0, theta, tlold, fprime, dtl - integer iw, ier, i -C -C Function declarations -C - - real pottemp, dmixr - -c -c Set up some parameters. -c - - i = 0 - ier = -1 - p0 = 1000.0 - tl = 0.0 - pl = 0.0 - -c -c Convert temperature/dewpoint to Kelvin and compute -c initial potential temperature. -c - - theta = pottemp(tk,tdk,pinit,iw) - -c -c Use Newton's method to iteratively solve for the temperature -c at the LCL. -c - - tlold = tdk - 10 fprime = (.001266/tlold) - (1.d0/(tlold**2)) - dtl = (1.0/tlold) - (1.0/tdk) + (.001266*log(tlold/tdk)) - & - (.000514*log(tk/tdk)) - dtl = tlold - (dtl/fprime) - -c -c If we have converged to a solution, compute the pressure at and -c the lifting distance to the LCL and return, otherwise iterate again. -c - - if (abs(dtl-tlold).le.1.0d-8) then - tlold = 1.0d0/(.2854*(1.0-(.28d-3*dmixr(tdk,pinit,iw)))) - pl = p0 / ((theta/dtl)**tlold) - tl = dtl - zl = (tk-tl)*1005.7/9.80665 - ier = 1 - return - else - tlold = dtl - i= i+1 - if (i.lt.20) goto 10 - endif - return - end diff --git a/nativeLib/rary.meteorological/src/tsoar.f b/nativeLib/rary.meteorological/src/tsoar.f deleted file mode 100755 index a770d93c13..0000000000 --- a/nativeLib/rary.meteorological/src/tsoar.f +++ /dev/null @@ -1,140 +0,0 @@ - subroutine tsoar(elev,p,z,t,theta,nl,Tpmax,PTLXEC,zlnec,tlnec, - 1 zlxec,tlxec,soarindx,Trigtemp) -C***DARE-II TSOAR Program for Denver Aviation and soaring community. -C History. -C -------- -C L. Rasmussen 8 Feb 89 Original version. -C J. Wakefield 20 Oct 89 Some tinkering. Added PTLXEC parameter. - -C Description of input and output. -C -------------------------------- -C On input: -C --------- -C Elev Station elevation -C p Raob pressures (mb) -C z Raob heights (m) -C t Raob temperatures (degrees Celsius) -C theta The potential temperatures of the sounding data -C nl number of levels in sounding -C Tpmax Forecast max temperature - -C On output: -C ---------- -C PTLXEC Potential temperature (C) of forecast TMax. -C zlnec The height (m) of the level of minimum effective convection. -C tlnec The temperature (C) of the level of min effective convection. -C zlxec The height (m) of the maximum thermal altitude -C tlxec The temperature (C) of the LXEC (max thermal alt) -C Soarindx The soaring index in ft/min. -C trigtemp The trigger temperature (C) -C############################################################################### - - implicit none - -C***Parameter list variables - Integer*4 NL - real*4 Elev,p(nl),z(nl),t(nl),theta(nl),TPMax,Zlnec - real*4 Tlnec,Zlxec,Tlxec,Soarindx,TrigTemp - -C***Local variables - real flag - parameter (flag=99999.) - real*4 Plnec,Plxec,Ptlxec,ThetaTrig,T500,Z500,P500 - integer*4 i - -C Initialize the soaring parameters to flag - Trigtemp=flag - Zlnec=flag - Tlnec=flag - Zlxec=flag - Tlxec=flag - Soarindx=flag - T500=flag - -C Determine if the station elevation is above or below 2000 ft msl (609.57 m), -C then add either 4000 ft (1219.14 m) or 3000 ft (914.36 m) to compute the LNEC. -C From the LNEC compute the interpolated pressure and temperature at the LNEC, -C and finally compute the trigger temperature by following the potential -C temperature line going thru the LNEC temperature down to the surface. - If(elev.gt.609.57) Then - Zlnec = elev + 1219.14 - Else - Zlnec = elev + 914.36 - Endif -C Type *,'elev',elev,' m;',elev*3.28084,' ft' -C Type *,'Zlnec',Zlnec,' m;',Zlnec*3.28084,' ft' - -C Compute the potential temp. of the forecast max temperature, then run up the -C sounding and locate or interpolate the height and pressure of the Lxec. -C TYPE *,'P sfc (mb) and fcst tmax (K)',P(1),Tpmax - Ptlxec=Tpmax*((1000.0/P(1))**0.286) -C TYPE *,'Ptlxec (K)',Ptlxec - -c initialize Plnec, Plxec, &Z500 - i=1 - Plnec=P(i)+(P(i+1)-P(i))*((Zlnec-z(i))/(z(i+1)-z(i))) - Plxec=P(i)+(P(i+1)-P(i))*((Ptlxec-theta(i))/ - + (theta(i+1)-theta(i))) - Z500=Z(i) - - Do i=1,nl-1 - If((Zlnec.ge.z(i)).and.(Zlnec.le.z(i+1))) Then - Tlnec=T(i)+(T(i+1)-T(i))*((Zlnec-z(i))/(z(i+1)-z(i))) - Plnec=P(i)+(P(i+1)-P(i))*((Zlnec-z(i))/(z(i+1)-z(i))) - Endif - -C Save info at 500 mb, in case the max thermal alt. is above 500 mb and must be -C truncated at 500 mb/18000 ft. - If(P(i).le.500.0 .and. T500.eq.flag) Then - T500=T(i) - Z500=Z(i) - P500=P(i) - Endif - If((Ptlxec.ge.theta(i)).and.(Ptlxec.le.theta(i+1))) Then - If(Theta(I).eq.Theta(I+1))Then - ZLXEC=Z(I) - PLXEC=P(I) - TLXEC=T(I) - Else - Zlxec=Z(i)+(Z(i+1)-Z(i))*((Ptlxec-theta(i))/(theta(i+1)- - -theta(i))) - Plxec=P(i)+(P(i+1)-P(i))*((Ptlxec-theta(i))/(theta(i+1)- - -theta(i))) - Tlxec=T(i)+(T(i+1)-T(i))*((Ptlxec-theta(i))/(theta(i+1)- - -theta(i))) - EndIf - Endif - EndDo - -C Type *,'Plxec,Zlxec and Tlxec are',Plxec,'mb',Zlxec,'m',Tlxec,'K' -C Type *,'P(1),Plnec,Zlnec,Tlnec are',P(1),Plnec,Zlnec,Tlnec - -C compute the potential temperature of the trigger temperature. - ThetaTrig=Tlnec*((1000.0/Plnec)**0.286) -C Type *,'thetatrig & p(1) is',Thetatrig,P(1) - TrigTemp=((ThetaTrig)*((p(1)/1000.)**.286))-273.15 -C TYPE *,'trigtemp is(C),Tpmaxis(K)',TrigTemp,Tpmax - -C Truncate the height of the LXEC to 18000 ft, due to FAA positive controlled -C airspace or possible soaring flight in IFR conditions by penetrating into -C clouds. - If(Plxec.lt.500.) Then -C Type *,'Truncated at 500mb.' - Zlxec=Z500 - Tlxec=T500 - Plxec=P500 - Endif -C Type *,'LXEC Hgt (m), P (mb), T (K):',Zlxec,Plxec,Tlxec -C Type *,'LNEC P (mb), T (K):',Plnec,Tlnec - -C Compute the Soaring Index if the fcst max temperature is equal to or exceeds -C the trigger temperature. - If(TPMax.ge.TrigTemp+273.15)Then - Soarindx=(3*(((Zlxec*3.281)/100.) + 10.*(Tlnec-Tlxec))) - Else - Soarindx=flag - Endif -C TYPE *,'Soaring index (ft/min) is',Soarindx - - Return - End diff --git a/nativeLib/rary.meteorological/src/tv2temp.f b/nativeLib/rary.meteorological/src/tv2temp.f deleted file mode 100755 index c166012bed..0000000000 --- a/nativeLib/rary.meteorological/src/tv2temp.f +++ /dev/null @@ -1,47 +0,0 @@ -c -c - subroutine tv2temp(tv,q,mni,ni,nj,t) -c -c.............................................................................. -c -c Routine to calculate temperature from the virtual temperature and -c specific humidity. -c -c Changes: -c J. Ramer 11-26-95 stole framework from spechum -c -c Inputs/Outputs: -c -c Variable Var Type I/O Description -c ---------- ---------- ----- ------------- -c tv RA I Virtual temperature (K) -c q RA I Specific Humidity (g/kg). -c mni I I First dimension of input array. -c ni,nj I I Grid dimensions in i,j. -c t RA O Temperature (K) -c -c -c User Notes: -c -c 1. No quality control is performed in this routine. -c -c.............................................................................. -c - implicit none - integer mni, ni, nj, i, j - real q(mni,nj), tv(mni,nj) - real t(mni,nj) - real flg,flag - Data flg,flag/99998.0,1e37/ - - Do 10 j=1,nj - Do 10 i=1,ni - If (q(i,j).gt.flg .or. tv(i,j).gt.flg) then - t(i,j)=flag - Else - t(i,j)=tv(i,j)/(1+0.000608*q(i,j)) - End If -10 Continue - - return - end diff --git a/nativeLib/rary.meteorological/src/uvcomp.f b/nativeLib/rary.meteorological/src/uvcomp.f deleted file mode 100755 index c3807a0b4e..0000000000 --- a/nativeLib/rary.meteorological/src/uvcomp.f +++ /dev/null @@ -1,69 +0,0 @@ - SUBROUTINE UVCOMP(DIR,SPD,U,V,NLVLS) - IMPLICIT NONE -C -C Statement of purpose. -C --------------------- -C This subroutine computes rectangular wind components given wind direction -C and speed. -C -C History. -C -------- -C Don Baker 01 Jul 84 Original version. -C Don Baker 15 May 85 Modified for CWP. -C -C Description of input and output. -C -------------------------------- -C On input: -C --------- -C DIR Real Array Wind directions (deg clockwise from north). -C SPD Real Array Wind speeds (m/s). -C NLVLS Integer Number of winds passed. -C -C On output: -C ---------- -C U Real Array U (east-west) wind component (m/s). -C V Real Array V (north-south) wind component (m/s). -C -C User notes: -C ----------- -C 1) This routine can be used to return components for just one wind -C report if NLVLS is passed as 1. -C -C -C Input arguments. -C - REAL DIR(1),SPD(1) - INTEGER NLVLS -C -C Output arguments. -C - REAL U(1),V(1) -C -C Internal variables. -C - REAL ANGLE - INTEGER I -C -C Subroutine constants. -C - REAL FLAG,RPD - PARAMETER (FLAG=99999.,RPD=0.0174533) -C -C Calculate components. Assign flag if direction or speed is bad. -C - DO 100 I=1,NLVLS - IF (DIR(I).LT.0. .OR. DIR(I).GT.360. .OR. - + SPD(I).LT.0. .OR. SPD(I).GT.250.) THEN - U(I)=FLAG - V(I)=FLAG - ELSE - ANGLE=RPD*DIR(I) - U(I)=(-SPD(I))*SIN(ANGLE) - V(I)=(-SPD(I))*COS(ANGLE) - ENDIF - 100 CONTINUE -C -C EXIT. -C - RETURN - END diff --git a/nativeLib/rary.meteorological/src/va_advanced.c b/nativeLib/rary.meteorological/src/va_advanced.c deleted file mode 100755 index 187146ebd0..0000000000 --- a/nativeLib/rary.meteorological/src/va_advanced.c +++ /dev/null @@ -1,502 +0,0 @@ -#include -#include -#include -#include "va_advanced.h" - -#define BREAKAXIS 5 -#define BREAKALL 25 -#define BREAKAXIST 8 -#define BREAKALLT 64 - -static float aspect = 0; - -static int min_literal = 1; -static int max_literal = 0; - -static int dist_pass = 0; -static int recomp = 0; - -static float * xx, * yy, * zz; -static unsigned char * assigned; -static float * lats, * lons; -static float * dist; -static float * gooddist; -static int * goodness; -static double * goodcomp; - -static float weighting = 0.0; -static int just_goodness = 0; - -static float dtr; - -/* This routine allows the client to place more importance on either user */ -/* preferences or spatial uniformity in determining the visibility */ -/* thresholds. 0 means only consider user preferences, 1 means only */ -/* consider spatial uniformity. 0 is the default, values between 0 and 1 */ -/* are meaningful. */ -void va_weighting(float wgt) -{ - weighting = wgt; -} - -/* Normally, when selecting which station to include next, two things are */ -/* considered. First, spatial uniformity, which means use the station */ -/* furthest from any station currently included. Second, user preferences */ -/* which are usually expressed in terms of the distance to the nearest */ -/* other station with at least as great a goodness value. Expressing both */ -/* in terms of a distance means that these two considerations can easily be */ -/* blended. This routine allows one to just consider the goodness value as */ -/* is for determining the next station to include. */ -void va_just_goodness(int yes) -{ - just_goodness = yes; -} - - -/* When this value is set to greater than one, it is assumed that the items */ -/* being plotted using this progressive strategy are this factor wider than */ -/* they are tall. */ -void va_aspect(float a) -{ - aspect = a; -} - -/* Goodness values between these two numbers are taken literally as */ -/* progressive disclosure distances. By default no goodness values will */ -/* be treated this way. */ -void va_literal(int mn, int mx) -{ - min_literal = mn; - max_literal = mx; -} - -/* If this is set to true, then valid progressive disclosure distances in */ -/* the array input_dist will be preserved. */ -void va_dist_pass(int dp) -{ - dist_pass = dp; -} - -/* If this is set to true, then valid progressive disclosure distances in */ -/* the array input_dist will be converted to goodness values. */ -void va_recomp(int rc) -{ - recomp = rc; -} - -/* The job of this routine is to convert goodness values into a precursor */ -/* to progressive disclosure distances, namely the distance to the nearest */ -/* other station which has at least as great a goodness value. */ -static int goodness_to_dist(float minlat, float maxlat, - float minlon, float maxlon, - int * active, int na) -{ - float dis1; - int best1; - int * subactive[BREAKALL]; - int ns[BREAKALL]; - float mnlts[BREAKALL], mxlts[BREAKALL]; - float mnlns[BREAKALL], mxlns[BREAKALL]; - int **subim, **subjm, **submm; - int *nsim, *nsjm, *nsmm; - int * topactive; - int nt; - int i,j,k,kk,a,g,gg; - float dlt,dln; - float mnlt,mxlt,mnln,mxln; - float dx,dy,dz,d,dd; - - if (na<=0) return -1; - - if (na>BREAKALL*2) { - - /* We still have too many stations in this sub area for this - algorithm to work efficiently, divide this working area - further into subareas. */ - nt = 0; - topactive = (int *)malloc(4*BREAKALL); - dlt = (maxlat-minlat)/(1+BREAKAXIS); - dln = (maxlon-minlon)/(1+BREAKAXIS); - mnlt = minlat; - mxlt = mnlt+2*dlt; - for (k=0,j=0; jBREAKAXIS) i = BREAKAXIS; - j = (int)((lats[g]-minlat)/dlt); - if (j<0) j = 0; - if (j>BREAKAXIS) j = BREAKAXIS; - k = j*BREAKAXIS+i; - if (i<=0) { - if (j>0) - subjm[k][nsjm[k]++] = g; - if (j=BREAKAXIS) { - if (j>0) - submm[k][nsmm[k]++] = g; - if (j0) { - subjm[k][nsjm[k]++] = g; - submm[k][nsmm[k]++] = g; - }/*endif*/ - if (j=0) topactive[nt++] = kk; - free(subactive[k]); - }/*end for gg*/ - - } else { - - nt = na; - topactive = active; - - }/*endif*/ - - best1 = -1; - dis1 = -1; - - /* We are finding the distance to the nearest - station that is at least as desirable. */ - for (k=0; kgooddist[gg]) - dd = gooddist[g]; - else - dd = gooddist[gg]; - dx = xx[g]-xx[gg]; - if (dx>dd || -dx>dd) continue; - dy = yy[g]-yy[gg]; - if (dy>dd || -dy>dd) continue; - dz = zz[g]-zz[gg]; - if (dz>dd || -dz>dd) continue; - d = sqrt(dx*dx+dy*dy+dz*dz); - if (d>dd) continue; - if (goodcomp[g]<=goodcomp[gg] && d=0) { - assigned[i] = 1; - dist[i] = 2*sin(dist[i]/12740.0); - goodcomp[i] = (1+dist[i])*big; - } else if (goodness[i]>=min_literal && goodness[i]<=max_literal) { - assigned[i] = 1; - dist[i] = 2*sin(goodness[i]/12740.0); - goodcomp[i] = (1+dist[i])*big; - } else { - assigned[i] = 0; - dist[i] = 2.0; - goodcomp[i] = goodness[i]; - }/*endif*/ - if (recomp) - { - assigned[i] = 0; - dist[i] = 2.0; - } - gooddist[i] = 2.0; - if (lats[i]maxlat) - maxlat = lats[i]; - if (lons[i]maxlon) - maxlon = lons[i]; - }/*end for*/ - - /* try to account for the aspect ratio of what is being plotted if the - area of coverage is small. */ - myaspect = 1.0; - while (aspect>1) { - - /* unit vector of mean point */ - xxa /= ns; - yya /= ns; - zza /= ns; - d = sqrt(xxa*xxa+yya*yya+zza*zza); - xxa /= d; - yya /= d; - zza /= d; - - /* east unit vector at mean point */ - xxe = -yya; - yye = xxa; - d = sqrt(xxe*xxe+yye*yye); - xxe /= d; - yye /= d; - - /* get the greatest east-west separation from center */ - dx = 0; - dd = 1.0; - for (i=0; idx) dx = d; - d = xxa*xx[i]+yya*yy[i]+zza*zz[i]; - if (ddx) dx = dd; - dd = 1.0-2*dx; - if (dd<=0.0) break; - myaspect = pow(aspect,dd); - - /* north unit vector at mean point (AxE) */ - xxn = -zza*yye; - yyn = zza*xxe; - zzn = xxa*yye-yya*xxe; - - /* artificially sqeeze points in the east-west dimension */ - for (i=0; i=na) { - - /* Determine next non-preassigned station for final resolution. */ - dd2 = -big; - g = -1; - for (kk=na; kk=dd || -dx>=dd) continue; - dy = yy[g]-yy[gg]; - if (dy>=dd || -dy>=dd) continue; - dz = zz[g]-zz[gg]; - if (dz>=dd || -dz>=dd) continue; - d = sqrt(dx*dx+dy*dy+dz*dz); - if (d>=dd) continue; - dist[gg] = d; - }/*end for*/ - - }/*end for*/ - - /* convert point to point distances in unit vector space to real distances - in kilometers. */ - for (i=0; i -#include -#include -#include "vis_assign.h" - -int use_goodness = 0; - -void use_goodness_values(int ug) -{ - use_goodness = ug; -} - -void vis_assign(float lats[], float lons[], int goodness[], - float dist[], int ns) -{ - - float * xx, * yy, * zz; - float * gfac; - unsigned char * assigned; - int i; - float dtr,lt,ln; - float dx,dy,dz; - float d,dd; - int na; - int mingood,maxgood; - int minspec,maxspec; - float xmin,xmax,ymin,ymax,zmin,zmax; - float floor; - float w1,w2; - int npass; - int best; - float disfac,bestdf,bestdis; - - if (ns<=0) return; - -/* printf("ns %d\n",ns); */ - - xx = (float *) malloc(17*ns); - yy = xx+ns; - zz = yy+ns; - gfac = zz+ns; - assigned = (unsigned char *)(gfac+ns); - -/* printf("memory allocated %d\n",xx); */ - - dtr = atan(1.0)/45.0; - mingood = 0x6FFFFFFF; - maxgood = -0x6FFFFFFF; - minspec = 0x7FFFFFFF; - maxspec = 0x6FFFFFFF; - xmin = ymin = zmin = 1.0; - xmax = ymax = zmax = -1.0; - na = 0; - for (i=0; i0 && goodness[i]<=22222) { - assigned[i] = 1; - dist[i] = 2*sin(goodness[i]/12740.0); - goodness[i] += 0x6FFFFFFF; - na++; - } else { - assigned[i] = 0; - dist[i] = 2.0; - }/*endif*/ - if (xx[i]>xmax) xmax = xx[i]; - if (xx[i]ymax) ymax = yy[i]; - if (yy[i]zmax) zmax = zz[i]; - if (zz[i]=0x6FFFFFFF) { - if (goodness[i]>maxspec) maxspec = goodness[i]; - if (goodness[i]maxgood) maxgood = goodness[i]; - if (goodness[i]floor) floor = dy; - if (dz>floor) floor = dz; - floor /= 4; - npass = 0; - - for (i=0; i=0x6FFFFFFF) { - if (maxspec==minspec) - w1 = 0.5; - else - w1 = (goodness[i]-minspec)/(maxspec-minspec); - w2 = 1.0-w1; - gfac[i] = exp(log(4.0)*w1+log(2.0)*w2); - } else { - if (maxgood==mingood) - w1 = 0.5; - else - w1 = (goodness[i]-mingood)/(maxgood-mingood); - w2 = 1.0-w1; - gfac[i] = exp(log(1.0)*w1+log(0.1)*w2); - }/*endif*/ - - for (npass=0; nadd || -dx>dd) continue; - dy = yy[i]-yy[best]; - if (dy>dd || -dy>dd) continue; - dz = zz[i]-zz[best]; - if (dz>dd || -dz>dd) continue; - d = sqrt(dx*dx+dy*dy+dz*dz); - if (ddd || -dx>dd) continue; - dy = yy[i]-yy[best]; - if (dy>dd || -dy>dd) continue; - dz = zz[i]-zz[best]; - if (dz>dd || -dz>dd) continue; - d = sqrt(dx*dx+dy*dy+dz*dz); - if (d0 for vapor pressure with respect to water -c <0 for vapor pressure with respect to ice -c -c Output: -c -c vp - vapor pressure in Pascals -c -c###################################################################### - - implicit none -c declare formal arguments - real tk - integer iw - -c -c Compute vapor pressure. -c - -c -c with respect to ice: -c - if (iw.lt.0) then - vp= exp(((-6024.5282)/tk)+29.32707 - & +(1.0613868d-2*tk)-(1.3198825d-5*(tk**2)) - & -(.49382577*log(tk))) - -c -c with respect to water: -c - - else - vp= exp(((-6096.9385)/tk)+21.2409642-(2.711193d-2*tk) - & +(1.673952d-5*(tk**2))+(2.433502*log(tk))) - endif - return - end - diff --git a/nativeLib/rary.meteorological/src/vvel.f b/nativeLib/rary.meteorological/src/vvel.f deleted file mode 100755 index 60fd20b784..0000000000 --- a/nativeLib/rary.meteorological/src/vvel.f +++ /dev/null @@ -1,103 +0,0 @@ - SUBROUTINE VVEL(pcb,PEQLEV,P,HT,TP,TVE,TVP,WLCL,NPAR,VV,VVMAX) - IMPLICIT NONE -C -C Statement of purpose. -C --------------------- -C This routine uses a 1-dimensional cloud model to compute the vertical -C velocity profile of the lifted parcel. -C -C History. -C -------- -C John Weaver ???? 1979 Original version at NSSL. -C Tom Schlatter ???? 1981 Adapted code to the PROFS VAX system. -C Don Baker 01 Jul 84 Converted code to a singular module. -C Don Baker 01 Jul 85 Adapted code for CWP. -C Dale Perry Sep 96 Adapted code for WFO. -C -C Description of input and output. -C -------------------------------- -C On input: -C --------- -C PEQLEV Real Equilibrium level pressure (mb). -C P Real Array Lifted parcel pressure levels (mb). -C HT Real Array Lifted parcel heights (m asl). -C TP Real Array Lifted parcel temperatures (K). -C TVE Real Array Sounding virtual temperatures at parcel pressure -C levels (K). -C TVP Real Array Parcel virtual temperatures at parcel pressure -C levels (K). -C WLCL Real Array Mixing ratio at the LCL (g/kg). -C NPAR Integer Number of lifted parcel levels passed. -C -C On output: -C ---------- -C VV Real Array Parcel positive vertical velocity at each -C parcel level (m/s). -C VVMAX Real Maximum parcel vertical velocity (m/s) -C up to the equilibrium level. -C -C User notes: -C ----------- -C 1) Precipitation drag and entrainment have been crudely accounted for -C by empirically derived coefficients which workers at NSSL developed -C to get better agreement between computed and observed cloud tops. -C -C -C Input arguments. -C - INTEGER NPAR - REAL HT(NPAR),TP(NPAR),TVE(NPAR),TVP(NPAR),P(NPAR) - REAL WLCL,PEQLEV,pcb -C -C Output arguments. -C - REAL VV(1),VVMAX -C -C Internal variables. -C - REAL WATER(NPAR) - REAL E,DH,DTMP,TEM,TPM,WM,VV2 - INTEGER I -C -C External functions. -C - REAL ESAT -C -C Subroutine constants. -C - REAL DRAG,ENTRN,GE - PARAMETER (DRAG=0.33,ENTRN=0.67,GE=9.8) -C -C Compute theoretical condensed liquid water of the parcel at each level -C of the lifted parcel. -C - DO 100 I=1,NPAR - E=ESAT(TP(I)) - WATER(I)=WLCL-((0.622*E)/(P(I)-E)) - 100 CONTINUE -C -C Compute the vertical velocity at each level. If no buoyancy exists, -C then the vertical velocity is set to zero. A derivation of this formula -C can be found in math notes by Tom Schlatter. -C - VV(1)=0.0 - VVMAX=VV(1) - DO 150 I=2,NPAR - VV(I)=0.0 - If (P(i).gt.pcb) Go To 150 - DH=HT(I)-HT(I-1) - WM=0.0005*(WATER(I)+WATER(I-1)) - TEM=0.5*(TVE(I)+TVE(I-1)) - TPM=0.5*(TVP(I)+TVP(I-1)) - DTMP=TPM-TEM - VV2=VV(I-1)*VV(I-1)+2*GE*DH*(ENTRN*DTMP/TEM-DRAG*WM) - IF (VV2.GT.0.) VV(I)=SQRT(VV2) - IF (P(I).GE.PEQLEV) THEN - IF (VVMAX.LT.VV(I)) VVMAX=VV(I) - ENDIF - 150 CONTINUE -C -C Exit. -C - RETURN - END diff --git a/nativeLib/rary.meteorological/src/wbzero.f b/nativeLib/rary.meteorological/src/wbzero.f deleted file mode 100755 index a94cc36d92..0000000000 --- a/nativeLib/rary.meteorological/src/wbzero.f +++ /dev/null @@ -1,94 +0,0 @@ - SUBROUTINE WBZERO(ELEV,P,HT,T,TD,NLVLS,PWBZ,HWBZ,TWBZ) - IMPLICIT NONE -C -C Statement of purpose. -C --------------------- -C This routine determines the pressure, temperature, and height of the -C wet-bulb zero. -C -C History. -C -------- -C Don Baker 01 Jul 84 Original version. -C Don Baker 12 May 85 Updated for CWP Spec Appendix V method. -C -C Description of input and output. -C -------------------------------- -C On input: -C --------- -C ELEV Real Station elevation (m asl). -C P Real Array Sounding pressures (mb). -C HT Real Array Sounding heights (m asl). -C T Real Array Sounding temperatures (C). -C TD Real Array Sounding dew points (C). -C NLVLS Integer Number of sounding levels passed. -C -C On output: -C ---------- -C PWBZ Real Pressure level of the wet-bulb zero (mb). -C HWBZ Real Height of the wet-bulb zero (m agl). -C TWBZ Real Temperature at the wet-bulb zero. -C -C -C Input arguments. -C - INTEGER NLVLS - REAL HT(NLVLS),P(NLVLS),T(NLVLS),TD(NLVLS),ELEV -C -C Output arguments. -C - REAL PWBZ,HWBZ,TWBZ -C -C Internal variables. -C - REAL TWET1,TWET2,THETAE - INTEGER I -C -C External functions. -C - REAL INTERP1,TSA,EPT -C -C Subroutine constants. -C - REAL ZERO - PARAMETER (ZERO=273.15) -C -C Initilize the wet-bulb zero assuming wet-bulb zero below surface. -C -C HWBZ=0. - HWBZ=ELEV - PWBZ=P(1) - TWBZ=T(1) -C -C Test for surface wet-bulb temperature less than zero. If so, exit -C with surface values assigned to wet-bulb zero level. -C -C THETAE=MYTW(T(1),TD(1),P(1)) -C TWET1=TEMP_OF_TE(THETAE,P(1)) - THETAE=EPT(T(1),TD(1),P(1)) - TWET1=TSA(THETAE,P(1)) - IF (TWET1.LE.ZERO) GO TO 999 -C -C Iterate upward through sounding until wet-bulb less than zero. When -C this occurs, interpolate to get desired parameters at level where -C the wet-bulb temperature is zero. -C - DO 100 I=2,NLVLS - THETAE=EPT(T(I),TD(I),P(I)) - TWET2=TSA(THETAE,P(I)) -C THETAE=MYTW(T(I),TD(I),P(I)) -C TWET2=TEMP_OF_TE(THETAE,P(I)) - IF (TWET2.LE.ZERO) THEN - HWBZ=INTERP1(HT(I),HT(I-1),TWET1,ZERO,TWET2) - PWBZ=INTERP1(P(I),P(I-1),HT(I),HWBZ,HT(I-1)) - TWBZ=INTERP1(T(I),T(I-1),HT(I),HWBZ,HT(I-1)) -C HWBZ=HWBZ-ELEV - GO TO 999 - ENDIF - TWET1=TWET2 - 100 CONTINUE -C -C Exit. -C - 999 CONTINUE - RETURN - END diff --git a/nativeLib/rary.meteorological/src/winddir.f b/nativeLib/rary.meteorological/src/winddir.f deleted file mode 100755 index 854366d163..0000000000 --- a/nativeLib/rary.meteorological/src/winddir.f +++ /dev/null @@ -1,51 +0,0 @@ -c -c - subroutine winddir(u,v,ff,mni,ni,nj) -c -c............................................................................... -c -c Routine to calculate the wind direction from the wind components. -c -c Changes: -c stole framework from windspeed, J Ramer, May 2003. -c -c Inputs/Outputs: -c -c Variable Var Type I/O Description -c ---------- ---------- ----- ------------- -c u, v RA I Wind components. -c mni I I First dimension of input array. -c ni, nj I I Grid dimensions in x, y. -c ff RA O Wind direction (deg). -c flag R - Bad data flag. -c bad R - Bad data value. -c -c User Notes: -c -c 1. Units are not changed (output units = input units). -c -c............................................................................... -c - implicit none - integer mni, ni, nj, i, j - real flag, bad, DPR - parameter(flag = 1.e37, DPR=57.29578) - real u(mni,nj), v(mni,nj), ff(mni,nj) -c -c..... Compute the wind speed at each point. -c - bad = 1e10 - do 1 j=1,nj - do 1 i=1,ni - if(u(i,j).gt.bad .or. v(i,j).gt.bad) then - ff(i,j) = flag - else if (u(i,j).eq.0 .and. v(i,j).eq.0) then - ff(i,j) = 0.0 - else - ff(i,j) = DPR*atan2(-u(i,j),-v(i,j)) - if (ff(i,j).lt.0) ff(i,j)=ff(i,j)+360 - endif -1 continue -c - return - end diff --git a/nativeLib/rary.meteorological/src/windspeed.f b/nativeLib/rary.meteorological/src/windspeed.f deleted file mode 100755 index 1a44b5998e..0000000000 --- a/nativeLib/rary.meteorological/src/windspeed.f +++ /dev/null @@ -1,51 +0,0 @@ -c -c - subroutine windspeed(u,v,ff,mni,ni,nj) -c -c............................................................................... -c -c Routine to calculate the wind speed from the wind components. -c -c Changes: -c P.A. Stamus 01-11-89 Original (based on Baker's) -c 07-20-89 Removed conversion to kts. -c 08-21-89 Bad data check. -c 09-20-89 Add implicit none. -c -c Inputs/Outputs: -c -c Variable Var Type I/O Description -c ---------- ---------- ----- ------------- -c u, v RA I Wind components (m/sec). -c mni I I First dimension of input array. -c ni, nj I I Grid dimensions in x, y. -c ff RA O Wind speed (m/sec). -c flag R - Bad data flag. -c bad R - Bad data value. -c -c User Notes: -c -c 1. Units are not changed (output units = input units). -c -c............................................................................... -c - implicit none - integer mni, ni, nj, i, j - real flag, bad - parameter(flag = 1.e37) - real u(mni,nj), v(mni,nj), ff(mni,nj) -c -c..... Compute the wind speed at each point. -c - bad = 1e10 - do 1 j=1,nj - do 1 i=1,ni - if(u(i,j).gt.bad .or. v(i,j).gt.bad) then - ff(i,j) = flag - else - ff(i,j) = sqrt(u(i,j)*u(i,j) + v(i,j)*v(i,j)) - endif -1 continue -c - return - end diff --git a/nativeLib/rary.meteorological/src/wndrho.f b/nativeLib/rary.meteorological/src/wndrho.f deleted file mode 100755 index 699061b81c..0000000000 --- a/nativeLib/rary.meteorological/src/wndrho.f +++ /dev/null @@ -1,60 +0,0 @@ - SUBROUTINE WNDRHO(RHO,HT,NLVLS,HW,NW,RHOW) - IMPLICIT NONE -C PURPOSE: -C -------- -C INTERPOLATE TO DETERMINE DENSITY AT WIND LEVELS GIVEN DENSITY AT -C PRESSURE LEVELS IN A SOUNDING. INTERPOLATION IS LINEAR BY HEIGHT. - -C T. Schlatter late 82 Probable original author. -C D. Baker 17 Dec 85 Added doc and indentation (?) -C D. Baker (?) after Dec 85 Replaced 100 loop with 300 loop. It -C appears that the interpolation is out. -C J. Wakefield 17 Nov 92 Added parameter list documentation. -C D. Perry Sep 96 Adapted code to work with WFO. - -C Argument I/O Type Description -C -------- --- ---- ----------------------------------------------- -C Rho I R*4 A Density (kg m-3) at sounding levels. -C Ht I R*4 A Heights (m) at sounding levels. -C NLvls I I*4 Number of sounding levels. -C HW I R*4 A Heights (m) of wind obs. -C NW I I*4 Number of wind obs. -C RhoW O R*4 A Density interpolated to wind obs heights. - -C VARIABLE/ARRAY DECLARATIONS. - REAL RHO(1),HT(1),HW(1),RHOW(1) - REAL INTERP1 - INTEGER NW,NLVLS,I,J,K1,K2 - -C INTERPOLATE TO DERIVE DENSITY AT WIND HEIGHTS. -c J=1 -c DO 100 I=1,NW -c K=J -c DO 200 J=K,NLVLS-1 -c IF (HW(I).GE.HT(J) .AND. HW(I).LE.HT(J+1)) THEN -c RHOW(I)=INTERP1(RHO(J),RHO(J+1),HT(J),HW(I),HT(J+1)) -c GO TO 100 -c ENDIF -c 200 CONTINUE -c 100 CONTINUE - - RHOW(1)=RHO(1) - K1=1 - K2=2 - Do 300 I=2,NW -299 IF (HT(K2).LT.HW(I)) THEN - K1=K2 - K2=K2+1 - IF (K2.GT.NLVLS) THEN - DO 298 J=I,NW -298 RHOW(J)=RHO(K1) - RETURN - END IF - GOTO 299 - END IF - RHOW(I)=INTERP1(RHO(K1),RHO(K2),HT(K1),HW(I),HT(K2)) -300 CONTINUE - -C EXIT. - RETURN - END diff --git a/nativeLib/rary.meteorological/src/ztopsa.f b/nativeLib/rary.meteorological/src/ztopsa.f deleted file mode 100755 index 6223cc4c6b..0000000000 --- a/nativeLib/rary.meteorological/src/ztopsa.f +++ /dev/null @@ -1,30 +0,0 @@ - Real*4 Function ZtoPsa(Z) - -C* This routine converts a height in meters into a pressure in a standard -C* atmosphere in milibars. - -C Author: J Ramer written in the late 1980's - - Implicit None - - Real*4 T0,gamma,p0,p11,z11,c1,c2,z - - Data T0,gamma,p0/288.,.0065,1013.2/ - Data c1,c2/5.256,14600./ - Data z11,p11/11000.,226.0971/ - - Real*4 Flag, Flg -c Common /FlagFlg/ Flag, Flg - Data Flag, Flg /1e37, 1.0E10/ - - If (Z.gt.Flg) Then - ZtoPsa=Flag - Else If (Z.lt.z11) Then - ZtoPsa=p0*((T0-gamma*Z)/T0)**c1 - Else - ZtoPsa=p11*10.**((z11-Z)/c2) - End If - - Return - End - diff --git a/nativeLib/rary.meteorological/windows/build.bat b/nativeLib/rary.meteorological/windows/build.bat deleted file mode 100644 index f79fcabc9a..0000000000 --- a/nativeLib/rary.meteorological/windows/build.bat +++ /dev/null @@ -1,61 +0,0 @@ -@echo OFF -REM This script will compile a Windows version of the meteolib library. -REM In order to compile the meteolib library, you will need to have -REM MSBuild 4.0 installed and the AWIPS II Runtime Environment. -REM -REM This script should work on both a 32-bit and a 64-bit Windows 7 -REM installation. - - -SET CONTAINING_DIR=%~dp0 - -SET REG_EXE= -REM Determine what our architecture is. -IF "%PROCESSOR_ARCHITECTURE%" == "AMD64" ( - GOTO OS_64_BIT -) ELSE ( - IF "%PROCESSOR_ARCHITECTURE%" == "x86" ( - GOTO OS_32_BIT - ) ELSE ( - echo "ERROR: Unrecognized Architecture." - PAUSE && EXIT 1 - ) -) - -:OS_32_BIT - SET REG_EXE=C:\Windows\System32\reg.exe -:OS_64_BIT - SET REG_EXE=C:\Windows\SysWOW64\reg.exe -:ARCH_KNOWN - -REM Lookup the location of MSBuild. -SET MSBUILD_VERSION=4.0 -SET MSBUILD_REG="HKLM\Software\Microsoft\MSBuild\ToolsVersions\%MSBUILD_VERSION%" - -REM Verify that MSBuild is installed. -%REG_EXE% QUERY %MSBUILD_REG% /v MSBuildToolsPath > NUL 2>&1 -IF ERRORLEVEL 1 ( - echo ENVIRONMENT ERROR - Unable to find MSBuild %MSBUILD_VERSION%. - PAUSE && EXIT 1 -) - -FOR /F "tokens=2* delims= " %%A IN ( -'%REG_EXE% QUERY %MSBUILD_REG% /v MSBuildToolsPath') DO ( -SET MSBuildToolsPath=%%B) - -pushd . > NUL 2>&1 -cd %CONTAINING_DIR% -%MSBuildToolsPath%MSBuild.exe ^ - /p:Platform=win32 ^ - project\meteolib.sln -if ERRORLEVEL 1 ( - echo ERROR: The meteolib compile has failed. - PAUSE && EXIT 1 -) - -popd > NUL 2>&1 - -echo. -echo. -echo The meteolib compile was successful. -PAUSE diff --git a/nativeLib/rary.meteorological/windows/project/Debug/BuildLog.htm b/nativeLib/rary.meteorological/windows/project/Debug/BuildLog.htm deleted file mode 100644 index e05274e9fb..0000000000 Binary files a/nativeLib/rary.meteorological/windows/project/Debug/BuildLog.htm and /dev/null differ diff --git a/nativeLib/rary.meteorological/windows/project/Makefile b/nativeLib/rary.meteorological/windows/project/Makefile deleted file mode 100644 index e0068bb604..0000000000 --- a/nativeLib/rary.meteorological/windows/project/Makefile +++ /dev/null @@ -1,335 +0,0 @@ -#------------------------------------------------------------------- -# This software is in the public domain, furnished "as is", without -# technical support, and with no warranty, express or implied, as -# to its usefulness for any purpose. -#------------------------------------------------------------------- -# $Id: .Makefile__temp7312,v 1.14 2005/07/29 20:57:49 fluke Exp $ -#------------------------------------------------------------------- -# Supported Targets: -# all - performs a prebuild, buildlib, and buildexe -# prebuild - creates the h templates and publishes all h files -# buildlib - builds the library and publishes it -# buildexe - builds the mainsteam executable and publishes it -# test - builds the test executables and publishes them -# data - publishes all data files -# doc - extracts the documentation from source and publishes it -# clean - cleans up the directory -# depend - update Makefile dependencies -#------------------------------------------------------------------- - -#include ${PROJECT_TREE}/src/Makefile.config - -#------------------------------------------------------------------- -# Executables -# -# Possibly make an environment variable? If not set, use the default. -METEOLIBDIR = ..\..\\ -SRCDIR = $(METEOLIBDIR)src -GLUEGENDIR = $(METEOLIBDIR)gluegen -INCDIR = $(METEOLIBDIR)inc -JavaJdkDirectory = C:\Program Files (x86)\Raytheon\AWIPS II\Java\jdk1.6.0_27 - -BINS = -SCRIPTS = -TEST_BINS = -CC = mingw32-gcc -I$(INCDIR) -I"$(JavaJdkDirectory)\include" -I"$(JavaJdkDirectory)\include\win32" -g -FC = mingw32-gfortran -I$(INCDIR) -fno-underscoring -fno-range-check - -#------------------------------------------------------------------- -# Libraries -# - -WINDOWSLIB = meteoLib.dll -LIBS = $(WINDOWSLIB) - - - -#------------------------------------------------------------------- -# Installed header files -# -INSTALL_H_FILES = cmeteoLib.h - - -#------------------------------------------------------------------- -# Noninstalled, private, implementation header files -# -IMPL_H_FILES = - - -#------------------------------------------------------------------- -# Installed *.C files, are installed with the *.H files in "inc" -# -INSTALL_C_FILES = - - -#------------------------------------------------------------------- -# Library ANSI C files whose objects go in an installed library -# -LIB_ANSI_C_FILES = \ - $(SRCDIR)\dist_filter.c \ - $(SRCDIR)\interp.c \ - $(SRCDIR)\temp_mixratio.c \ - $(SRCDIR)\calcWindChill.c \ - $(SRCDIR)\scaleless_analysis.c \ - $(SRCDIR)\adiabatic_te.c \ - $(SRCDIR)\calcHeatIndex.c \ - $(SRCDIR)\calckidx.c \ - $(SRCDIR)\thermoRtns.c \ - $(SRCDIR)\calctotidx.c \ - $(SRCDIR)\temp_of_te.c \ - $(SRCDIR)\heliComp.c \ - $(SRCDIR)\dcapeFunc.c \ - $(SRCDIR)\sliceConvert.c \ - $(SRCDIR)\capeFunc.c -#------------------------------------------------------------------- -# Library C files whose objects go in an installed library -# -LIB_C_FILES = -LIB_F_FILES = \ - $(SRCDIR)\addaray.f \ - $(SRCDIR)\addbycnst.f \ - $(SRCDIR)\alt2press.f \ - $(SRCDIR)\avwind.f \ - $(SRCDIR)\calccondpr.f \ - $(SRCDIR)\calccondprdef.f \ - $(SRCDIR)\calcdpd.f \ - $(SRCDIR)\calcli.f \ - $(SRCDIR)\calcpv.f \ - $(SRCDIR)\calcrh.f \ - $(SRCDIR)\calcrh2.f \ - $(SRCDIR)\calctd.f \ - $(SRCDIR)\calctd2.f \ - $(SRCDIR)\calcthetae.f \ - $(SRCDIR)\calcthetae2.f \ - $(SRCDIR)\calctv.f \ - $(SRCDIR)\calctv2.f \ - $(SRCDIR)\calctw.f \ - $(SRCDIR)\cclpar.f \ - $(SRCDIR)\constant.f \ - $(SRCDIR)\comp_by.f \ - $(SRCDIR)\crossvectors.f \ - $(SRCDIR)\ctop.f \ - $(SRCDIR)\cv_date2jul.f \ - $(SRCDIR)\cvgust.f \ - $(SRCDIR)\ddff.f \ - $(SRCDIR)\deftrk.f \ - $(SRCDIR)\density.f \ - $(SRCDIR)\derivative.f \ - $(SRCDIR)\derived_icing.f \ - $(SRCDIR)\dgeocomps.f \ - $(SRCDIR)\divaray.f \ - $(SRCDIR)\dotvectors.f \ - $(SRCDIR)\dzdlnp.f \ - $(SRCDIR)\eqlev.f \ - $(SRCDIR)\eqp.f \ - $(SRCDIR)\esat.f \ - $(SRCDIR)\exparay.f \ - $(SRCDIR)\fndiverg.f \ - $(SRCDIR)\forecast.f \ - $(SRCDIR)\fortconbuf.f \ - $(SRCDIR)\frontogen.f \ - $(SRCDIR)\frzlev.f \ - $(SRCDIR)\fsdiverg.f \ - $(SRCDIR)\g2gkinematics.f \ - $(SRCDIR)\gusts.f \ - $(SRCDIR)\hailsiz.f \ - $(SRCDIR)\helicity.f \ - $(SRCDIR)\hgt2pres.f \ - $(SRCDIR)\interp1.f \ - $(SRCDIR)\intpos.f \ - $(SRCDIR)\isenstable.f \ - $(SRCDIR)\koffset.f \ - $(SRCDIR)\lapserate.f \ - $(SRCDIR)\lfcpar.f \ - $(SRCDIR)\lclpar.f \ - $(SRCDIR)\liftedp.f \ - $(SRCDIR)\lintrans.f \ - $(SRCDIR)\matsln.f \ - $(SRCDIR)\maxmin.f \ - $(SRCDIR)\meanomega.f \ - $(SRCDIR)\mixrat.f \ - $(SRCDIR)\mslp2thkns.f \ - $(SRCDIR)\multaray.f \ - $(SRCDIR)\multbycnst.f \ - $(SRCDIR)\mxtp.f \ - $(SRCDIR)\nadgdt.f \ - $(SRCDIR)\natlog.f \ - $(SRCDIR)\negarea.f \ - $(SRCDIR)\posarea.f \ - $(SRCDIR)\powercalc.f \ - $(SRCDIR)\press2alt.f \ - $(SRCDIR)\presstable.f \ - $(SRCDIR)\ptozsa.f \ - $(SRCDIR)\pvadv.f \ - $(SRCDIR)\pvalue.f \ - $(SRCDIR)\pvpres.f \ - $(SRCDIR)\qdiverg.f \ - $(SRCDIR)\qvector.f \ - $(SRCDIR)\radiation.f \ - $(SRCDIR)\radrtns.f \ - $(SRCDIR)\rang2d.f \ - $(SRCDIR)\replinrange.f \ - $(SRCDIR)\rhbar.f \ - $(SRCDIR)\rotvectors.f \ - $(SRCDIR)\setqsmooth.f \ - $(SRCDIR)\slfront.f \ - $(SRCDIR)\slqdiv.f \ - $(SRCDIR)\slqvect.f \ - $(SRCDIR)\smooth.f \ - $(SRCDIR)\solax.f \ - $(SRCDIR)\spechum.f \ - $(SRCDIR)\spechum2.f \ - $(SRCDIR)\strmpak.f \ - $(SRCDIR)\subaray.f \ - $(SRCDIR)\sunfuncs.f \ - $(SRCDIR)\sweat.f \ - $(SRCDIR)\sweatidx.f \ - $(SRCDIR)\tdofesat.f \ - $(SRCDIR)\temp2theta.f \ - $(SRCDIR)\theta2temp.f \ - $(SRCDIR)\totals.f \ - $(SRCDIR)\tplcl.f \ - $(SRCDIR)\tsoar.f \ - $(SRCDIR)\tv2temp.f \ - $(SRCDIR)\uvcomp.f \ - $(SRCDIR)\verpts.f \ - $(SRCDIR)\virttemp.f \ - $(SRCDIR)\virtualt.f \ - $(SRCDIR)\vvel.f \ - $(SRCDIR)\wbzero.f \ - $(SRCDIR)\windspeed.f \ - $(SRCDIR)\winddir.f \ - $(SRCDIR)\wndrho.f \ - $(SRCDIR)\ztopsa.f \ - $(SRCDIR)\BulkRichNo.f \ - $(SRCDIR)\thetawa.f \ - $(SRCDIR)\cgp.f \ - $(SRCDIR)\tpzlcl.f \ - $(SRCDIR)\pottemp.f \ - $(SRCDIR)\dmixr.f \ - $(SRCDIR)\pseudolift.f \ - $(SRCDIR)\vp.f \ - $(SRCDIR)\IntrinsicFunctions.f -LIB_O_FILES = ${LIB_C_FILES:.C=.o} ${LIB_ANSI_C_FILES:.c=.o} \ - ${LIB_F_FILES:.f=.o} Meteolibrary_JNI.o - - -# Note: a patch to the HP-UX Fortran77 Compiler performed during Apr 1995 -# requires fortcon to be compiled with the +e option, or else Byte -# variable are treated as Logical*1 variables with logical operators -# instead of Integer*1. Add it to FFLAGS by setting USER_FFLAGS. -# Note that the only Fortran compiler this switch applies to is the HP -# Fortran77 compiler. -ifdef HP_FORTRAN77 - USER_FFLAGS = +e -endif - -#------------------------------------------------------------------- -# Nonlibrary ANSI C files, whose objects are installed as .o files -# -NONLIB_ANSI_C_FILES = - - -#------------------------------------------------------------------- -# Nonlibrary C files, whose objects are installed as .o files -# -NONLIB_C_FILES = -NONLIB_O_FILES = ${NONLIB_C_FILES:.C=.o} ${NONLIB_ANSI_C_FILES:.c=.o} - - -#------------------------------------------------------------------- -# Nonlibrary ANSI C files, whose objects are installed as .o files -# -IMPL_ANSI_C_FILES = - - -#------------------------------------------------------------------- -# Noninstalled C files, no .o files installed, not put in a library -# -IMPL_C_FILES = -IMPL_O_FILES = ${IMPL_C_FILES:.C=.o} ${IMPL_ANSI_C_FILES:.c=.o} - - -#------------------------------------------------------------------- -# Test C files, different test executables could have different -# lists, but list ALL of them here so that their object dependencies -# will be generated. -# -TEST_C_FILES = - -TEST_F_FILES = -#------------------------------------------------------------------- -# data files -# -DATA = - - -#------------------------------------------------------------------- -# Library dependencies -# -${LIBS}: ${LIB_O_FILES} - -@rm -f ${WINDOWSLIB} - -@echo Creating Libraries ${WINDOWSLIB} - mingw32-gfortran -v -Wl,--export-all,--kill-at -shared -lm -o ${WINDOWSLIB} ${LIB_O_FILES} - -@echo File Created : ${WINDOWSLIB} - -#------------------------------------------------------------------- -# Executable dependencies -# -SYS_LIBS = - -OBJECTS = - -gluegen_jar=$(METEOLIBDIR)../tool.gluegen/lib/gluegen.jar - -meteoLib.h: - gcc -E -I$(INCDIR) -x c-header $(GLUEGENDIR)/meteolib.ggen -o meteoLib.h - -Meteolibrary_JNI.c: meteoLib.cfg meteoLib.h - java -jar ${gluegen_jar} -CmeteoLib.cfg meteoLib.h - -Meteolibrary_JNI.o: Meteolibrary_JNI.c - - -#------------------------------------------------------------------- -# Test executable dependencies -# - -#------------------------------------------------------------------- -# Standard targets and their rules. If not using default, add to -# or replace the standard action. -# -prebuild: ${INSTALL_H_FILES} ${INSTALL_C_FILES} - ${STD_PREBUILD_ACTION} - -buildlib: ${LIBS} ${NONLIB_O_FILES} - ${STD_BUILDLIB_ACTION} - -buildlibgcc: buildlib - -buildexe: ${BINS} ${SCRIPTS} - ${STD_BUILDEXE_ACTION} - -buildexegcc: buildexe - -test: ${TEST_BINS} - ${STD_TEST_ACTION} - -data: ${DATA} - ${STD_DATA_ACTION} - -doc: ${SOURCE_FILES} - ${STD_DOC_ACTION} - -clean: - rm *.o meteoLib.h Meteolibrary_JNI.c *.dll *.so - -depend: - ${STD_DEPEND_ACTION} - -dependgcc: depend - -#------------------------------------------------------------------- -# Object dependencies -# --include Makefile.dependencies diff --git a/nativeLib/rary.meteorological/windows/project/meteoLib.cfg b/nativeLib/rary.meteorological/windows/project/meteoLib.cfg deleted file mode 100644 index 6dfd83d69f..0000000000 --- a/nativeLib/rary.meteorological/windows/project/meteoLib.cfg +++ /dev/null @@ -1,8 +0,0 @@ -NativeOutputDir ./ -JavaOutputDir ./meteoLib_Java - - Package com.raytheon.edex.meteolibrary - Style AllStatic - JavaClass Meteolibrary - CustomCCode #include "meteoLib.h" - diff --git a/nativeLib/rary.meteorological/windows/project/meteolib.bat b/nativeLib/rary.meteorological/windows/project/meteolib.bat deleted file mode 100644 index 7a46506574..0000000000 --- a/nativeLib/rary.meteorological/windows/project/meteolib.bat +++ /dev/null @@ -1,46 +0,0 @@ -@echo OFF -REM This script will compile a Windows version of the meteolib library. -REM In order to compile the meteolib library, you will need to have -REM MinGW installed and the AWIPS II Runtime Environment. -REM -REM This script should work on both a 32-bit and a 64-bit Windows 7 -REM installation. - -SET CONTAINING_DIR=%~dp0 - -pushd . > NUL 2>&1 -cd %CONTAINING_DIR% -mingw32-make -f Makefile - -IF ERRORLEVEL 1 ( - echo ERROR: the meteolib compile has failed. - PAUSE && EXIT 1 -) -popd > NUL 2>&1 - -IF NOT EXIST "%CONTAINING_DIR%..\build" ( - MKDIR "%CONTAINING_DIR%..\build" -) - -REM Move the build artifacts to the build directory. -MOVE /Y "%CONTAINING_DIR%meteoLib.dll" ^ - "%CONTAINING_DIR%..\build" - -REM Cleanup the remaining non-essential build artifacts. -IF EXIST "%CONTAINING_DIR%\Meteolibrary_JNI.o" ( - echo Y | DEL "%CONTAINING_DIR%\Meteolibrary_JNI.o" -) -IF EXIST "%CONTAINING_DIR%\Meteolibrary_JNI.c" ( - echo Y | DEL "%CONTAINING_DIR%\Meteolibrary_JNI.c" -) -IF EXIST "%CONTAINING_DIR%\meteoLib.h" ( - echo Y | DEL "%CONTAINING_DIR%\meteoLib.h" -) -IF EXIST "%CONTAINING_DIR%\meteoLib_Java" ( - RMDIR /S /Q "%CONTAINING_DIR%\meteoLib_Java" -) - -echo. -echo. -echo The meteolib compile was successful. -PAUSE diff --git a/nativeLib/rary.meteorological/windows/project/meteolib.ncb b/nativeLib/rary.meteorological/windows/project/meteolib.ncb deleted file mode 100644 index fc2489de19..0000000000 Binary files a/nativeLib/rary.meteorological/windows/project/meteolib.ncb and /dev/null differ diff --git a/nativeLib/rary.meteorological/windows/project/meteolib.sln b/nativeLib/rary.meteorological/windows/project/meteolib.sln deleted file mode 100644 index 1c1bbb8d33..0000000000 --- a/nativeLib/rary.meteorological/windows/project/meteolib.sln +++ /dev/null @@ -1,20 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual C++ Express 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "meteolib", "meteolib.vcproj", "{E8CA21BD-80BA-4B52-9342-F3DCCD9A5CFF}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E8CA21BD-80BA-4B52-9342-F3DCCD9A5CFF}.Debug|Win32.ActiveCfg = Debug|Win32 - {E8CA21BD-80BA-4B52-9342-F3DCCD9A5CFF}.Debug|Win32.Build.0 = Debug|Win32 - {E8CA21BD-80BA-4B52-9342-F3DCCD9A5CFF}.Release|Win32.ActiveCfg = Release|Win32 - {E8CA21BD-80BA-4B52-9342-F3DCCD9A5CFF}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/nativeLib/rary.meteorological/windows/project/meteolib.sln.cache b/nativeLib/rary.meteorological/windows/project/meteolib.sln.cache deleted file mode 100644 index 200bfbd697..0000000000 --- a/nativeLib/rary.meteorological/windows/project/meteolib.sln.cache +++ /dev/null @@ -1,101 +0,0 @@ - - - <_SolutionProjectConfiguration>Debug|Win32 - <_SolutionProjectToolsVersion>3.5 - <_SolutionProjectCacheVersion>4.0 - - - <_SolutionProjectProjects Include="meteolib.vcproj" /> - - - - - Debug - - - Win32 - - - $(Configuration) - - - C:\Users\Bryan Kowal\Documents\nativeLib\rary.meteorological\windows\project\ - .sln - meteolib.sln - meteolib - C:\Users\Bryan Kowal\Documents\nativeLib\rary.meteorological\windows\project\meteolib.sln - - - v2.0 - v3.5 - v4.0 - - - - - Debug|Win32 - - - - - - - Release|Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/nativeLib/rary.meteorological/windows/project/meteolib.suo b/nativeLib/rary.meteorological/windows/project/meteolib.suo deleted file mode 100644 index 4cd8d7494d..0000000000 Binary files a/nativeLib/rary.meteorological/windows/project/meteolib.suo and /dev/null differ diff --git a/nativeLib/rary.meteorological/windows/project/meteolib.vcproj b/nativeLib/rary.meteorological/windows/project/meteolib.vcproj deleted file mode 100644 index 59f1369862..0000000000 --- a/nativeLib/rary.meteorological/windows/project/meteolib.vcproj +++ /dev/null @@ -1,642 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/nativeLib/rary.meteorological/windows/project/meteolib.vcproj.ISFL017138.Bryan Kowal.user b/nativeLib/rary.meteorological/windows/project/meteolib.vcproj.ISFL017138.Bryan Kowal.user deleted file mode 100644 index 7c8cc8eb8b..0000000000 --- a/nativeLib/rary.meteorological/windows/project/meteolib.vcproj.ISFL017138.Bryan Kowal.user +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - diff --git a/tests/.classpath b/tests/.classpath index c95ea8418f..e6153edb71 100644 --- a/tests/.classpath +++ b/tests/.classpath @@ -102,7 +102,6 @@ - @@ -155,11 +154,6 @@ - - - - - diff --git a/tests/data/WxMath/CalcRH.tab b/tests/data/WxMath/CalcRH.tab new file mode 100644 index 0000000000..deb343b6df --- /dev/null +++ b/tests/data/WxMath/CalcRH.tab @@ -0,0 +1,976 @@ +Temp Dewpnt RelHum +0.00 0.00 100.000000 +0.00 1.25 109.462906 +0.00 2.50 119.710670 +0.00 3.75 130.798584 +0.00 5.00 142.785080 +0.00 6.25 155.731888 +0.00 7.50 169.704086 +0.00 8.75 184.770279 +0.00 10.00 201.002747 +0.00 11.25 218.477539 +0.00 12.50 237.274628 +0.00 13.75 257.478088 +0.00 15.00 279.176147 +0.00 16.25 302.461334 +0.00 17.50 327.430847 +0.00 18.75 354.186310 +0.00 20.00 382.834137 +0.00 21.25 413.485870 +0.00 22.50 446.257782 +0.00 23.75 481.271698 +0.00 25.00 518.654419 +0.00 26.25 558.538635 +0.00 27.50 601.062378 +0.00 28.75 646.369629 +0.00 30.00 694.610046 +0.00 31.25 745.939819 +0.00 32.50 800.520874 +0.00 33.75 858.521729 +0.00 35.00 920.117371 +0.00 36.25 985.489197 +0.00 37.50 1054.825928 +0.00 38.75 1128.322266 +0.00 40.00 1206.181152 +0.00 41.25 1288.611328 +0.00 42.50 1375.829834 +0.00 43.75 1468.060181 +0.00 45.00 1565.534668 +0.00 46.25 1668.492554 +0.00 47.50 1777.179321 +0.00 48.75 1891.851807 +0.00 50.00 2012.770874 +0.00 51.25 2140.208252 +0.00 52.50 2274.442383 +0.00 53.75 2415.760254 +0.00 55.00 2564.458252 +0.00 56.25 2720.838623 +0.00 57.50 2885.214355 +0.00 58.75 3057.906250 +0.00 60.00 3239.242676 +0.00 61.25 3429.562500 +0.00 62.50 3629.212158 +0.00 63.75 3838.546387 +0.00 65.00 4057.928955 +0.00 66.25 4287.733887 +0.00 67.50 4528.342285 +0.00 68.75 4780.143555 +0.00 70.00 5043.538086 +0.00 71.25 5318.934570 +0.00 72.50 5606.748047 +0.00 73.75 5907.404297 +0.00 75.00 6221.340332 +0.00 76.25 6548.995117 +0.00 77.50 6890.826172 +0.00 78.75 7247.290039 +0.00 80.00 7618.853027 +5.50 0.00 67.638405 +5.50 1.25 74.038963 +5.50 2.50 80.970383 +5.50 3.75 88.470070 +5.50 5.00 96.577553 +5.50 6.25 105.334564 +5.50 7.50 114.785133 +5.50 8.75 124.975670 +5.50 10.00 135.955048 +5.50 11.25 147.774719 +5.50 12.50 160.488770 +5.50 13.75 174.154053 +5.50 15.00 188.830276 +5.50 16.25 204.580017 +5.50 17.50 221.468979 +5.50 18.75 239.565948 +5.50 20.00 258.942902 +5.50 21.25 279.675232 +5.50 22.50 301.841675 +5.50 23.75 325.524475 +5.50 25.00 350.809601 +5.50 26.25 377.786621 +5.50 27.50 406.548981 +5.50 28.75 437.194061 +5.50 30.00 469.823120 +5.50 31.25 504.541779 +5.50 32.50 541.459534 +5.50 33.75 580.690369 +5.50 35.00 622.352661 +5.50 36.25 666.569214 +5.50 37.50 713.467346 +5.50 38.75 763.179138 +5.50 40.00 815.841553 +5.50 41.25 871.596069 +5.50 42.50 930.589294 +5.50 43.75 992.972656 +5.50 45.00 1058.902588 +5.50 46.25 1128.541504 +5.50 47.50 1202.056030 +5.50 48.75 1279.618286 +5.50 50.00 1361.406006 +5.50 51.25 1447.602661 +5.50 52.50 1538.396484 +5.50 53.75 1633.982056 +5.50 55.00 1734.558472 +5.50 56.25 1840.331665 +5.50 57.50 1951.512939 +5.50 58.75 2068.318848 +5.50 60.00 2190.971680 +5.50 61.25 2319.700928 +5.50 62.50 2454.740967 +5.50 63.75 2596.331299 +5.50 65.00 2744.718262 +5.50 66.25 2900.154785 +5.50 67.50 3062.898438 +5.50 68.75 3233.212646 +5.50 70.00 3411.369385 +5.50 71.25 3597.642090 +5.50 72.50 3792.314941 +5.50 73.75 3995.674805 +5.50 75.00 4208.014648 +5.50 76.25 4429.636230 +5.50 77.50 4660.844238 +5.50 78.75 4901.949707 +5.50 80.00 5153.270508 +11.00 0.00 46.537731 +11.00 1.25 50.941551 +11.00 2.50 55.710625 +11.00 3.75 60.870689 +11.00 5.00 66.448936 +11.00 6.25 72.474083 +11.00 7.50 78.976425 +11.00 8.75 85.987892 +11.00 10.00 93.542114 +11.00 11.25 101.674484 +11.00 12.50 110.422226 +11.00 13.75 119.824455 +11.00 15.00 129.922241 +11.00 16.25 140.758652 +11.00 17.50 152.378876 +11.00 18.75 164.830261 +11.00 20.00 178.162323 +11.00 21.25 192.426926 +11.00 22.50 207.678253 +11.00 23.75 223.972900 +11.00 25.00 241.370010 +11.00 26.25 259.931213 +11.00 27.50 279.720764 +11.00 28.75 300.805725 +11.00 30.00 323.255768 +11.00 31.25 347.143433 +11.00 32.50 372.544220 +11.00 33.75 399.536499 +11.00 35.00 428.201660 +11.00 36.25 458.624359 +11.00 37.50 490.891968 +11.00 38.75 525.095581 +11.00 40.00 561.329285 +11.00 41.25 599.690430 +11.00 42.50 640.279907 +11.00 43.75 683.201965 +11.00 45.00 728.564331 +11.00 46.25 776.478455 +11.00 47.50 827.059082 +11.00 48.75 880.424805 +11.00 50.00 936.697754 +11.00 51.25 996.004272 +11.00 52.50 1058.473755 +11.00 53.75 1124.240234 +11.00 55.00 1193.440552 +11.00 56.25 1266.216431 +11.00 57.50 1342.713135 +11.00 58.75 1423.079956 +11.00 60.00 1507.469727 +11.00 61.25 1596.040283 +11.00 62.50 1688.952881 +11.00 63.75 1786.372192 +11.00 65.00 1888.468384 +11.00 66.25 1995.413818 +11.00 67.50 2107.387695 +11.00 68.75 2224.570557 +11.00 70.00 2347.148438 +11.00 71.25 2475.311279 +11.00 72.50 2609.253174 +11.00 73.75 2749.172119 +11.00 75.00 2895.270264 +11.00 76.25 3047.754150 +11.00 77.50 3206.833252 +11.00 78.75 3372.722900 +11.00 80.00 3545.641602 +16.50 0.00 32.539654 +16.50 1.25 35.618855 +16.50 2.50 38.953442 +16.50 3.75 42.561409 +16.50 5.00 46.461777 +16.50 6.25 50.674622 +16.50 7.50 55.221130 +16.50 8.75 60.123615 +16.50 10.00 65.405602 +16.50 11.25 71.091835 +16.50 12.50 77.208351 +16.50 13.75 83.782486 +16.50 15.00 90.842949 +16.50 16.25 98.419884 +16.50 17.50 106.544861 +16.50 18.75 115.250992 +16.50 20.00 124.572922 +16.50 21.25 134.546875 +16.50 22.50 145.210754 +16.50 23.75 156.604141 +16.50 25.00 168.768387 +16.50 26.25 181.746552 +16.50 27.50 195.583633 +16.50 28.75 210.326431 +16.50 30.00 226.023727 +16.50 31.25 242.726257 +16.50 32.50 260.486725 +16.50 33.75 279.360016 +16.50 35.00 299.403015 +16.50 36.25 320.674805 +16.50 37.50 343.236694 +16.50 38.75 367.152252 +16.50 40.00 392.487183 +16.50 41.25 419.309662 +16.50 42.50 447.690247 +16.50 43.75 477.701752 +16.50 45.00 509.419617 +16.50 46.25 542.921570 +16.50 47.50 578.288147 +16.50 48.75 615.601990 +16.50 50.00 654.948730 +16.50 51.25 696.416382 +16.50 52.50 740.095703 +16.50 53.75 786.080261 +16.50 55.00 834.465820 +16.50 56.25 885.351440 +16.50 57.50 938.838745 +16.50 58.75 995.032104 +16.50 60.00 1054.038330 +16.50 61.25 1115.967773 +16.50 62.50 1180.933105 +16.50 63.75 1249.049805 +16.50 65.00 1320.436035 +16.50 66.25 1395.213745 +16.50 67.50 1473.507080 +16.50 68.75 1555.442505 +16.50 70.00 1641.150269 +16.50 71.25 1730.762817 +16.50 72.50 1824.416504 +16.50 73.75 1922.249390 +16.50 75.00 2024.402588 +16.50 76.25 2131.020752 +16.50 77.50 2242.250732 +16.50 78.75 2358.242432 +16.50 80.00 2479.148438 +22.00 0.00 23.100719 +22.00 1.25 25.286718 +22.00 2.50 27.654028 +22.00 3.75 30.215416 +22.00 5.00 32.984386 +22.00 6.25 35.975189 +22.00 7.50 39.202869 +22.00 8.75 42.683266 +22.00 10.00 46.433083 +22.00 11.25 50.469887 +22.00 12.50 54.812153 +22.00 13.75 59.479298 +22.00 15.00 64.491699 +22.00 16.25 69.870750 +22.00 17.50 75.638885 +22.00 18.75 81.819588 +22.00 20.00 88.437447 +22.00 21.25 95.518211 +22.00 22.50 103.088776 +22.00 23.75 111.177231 +22.00 25.00 119.812920 +22.00 26.25 129.026443 +22.00 27.50 138.849747 +22.00 28.75 149.316040 +22.00 30.00 160.459930 +22.00 31.25 172.317474 +22.00 32.50 184.926086 +22.00 33.75 198.324707 +22.00 35.00 212.553741 +22.00 36.25 227.655121 +22.00 37.50 243.672394 +22.00 38.75 260.650604 +22.00 40.00 278.636536 +22.00 41.25 297.678467 +22.00 42.50 317.826569 +22.00 43.75 339.132507 +22.00 45.00 361.649811 +22.00 46.25 385.433716 +22.00 47.50 410.541290 +22.00 48.75 437.031372 +22.00 50.00 464.964569 +22.00 51.25 494.403503 +22.00 52.50 525.412537 +22.00 53.75 558.058044 +22.00 55.00 592.408325 +22.00 56.25 628.533264 +22.00 57.50 666.505310 +22.00 58.75 706.398315 +22.00 60.00 748.288452 +22.00 61.25 792.253662 +22.00 62.50 838.374023 +22.00 63.75 886.731689 +22.00 65.00 937.410950 +22.00 66.25 990.497498 +22.00 67.50 1046.079590 +22.00 68.75 1104.247681 +22.00 70.00 1165.093750 +22.00 71.25 1228.712402 +22.00 72.50 1295.199097 +22.00 73.75 1364.653076 +22.00 75.00 1437.174561 +22.00 76.25 1512.865601 +22.00 77.50 1591.830444 +22.00 78.75 1674.175781 +22.00 80.00 1760.010132 +27.50 0.00 16.637207 +27.50 1.25 18.211573 +27.50 2.50 19.916513 +27.50 3.75 21.761232 +27.50 5.00 23.755451 +27.50 6.25 25.909439 +27.50 7.50 28.234022 +27.50 8.75 30.740620 +27.50 10.00 33.441246 +27.50 11.25 36.348568 +27.50 12.50 39.475876 +27.50 13.75 42.837162 +27.50 15.00 46.447117 +27.50 16.25 50.321125 +27.50 17.50 54.475349 +27.50 18.75 58.926712 +27.50 20.00 63.692917 +27.50 21.25 68.792503 +27.50 22.50 74.244843 +27.50 23.75 80.070168 +27.50 25.00 86.289619 +27.50 26.25 92.925240 +27.50 27.50 100.000000 +27.50 28.75 107.537857 +27.50 30.00 115.563728 +27.50 31.25 124.103561 +27.50 32.50 133.184311 +27.50 33.75 142.834045 +27.50 35.00 153.081833 +27.50 36.25 163.957901 +27.50 37.50 175.493591 +27.50 38.75 187.721359 +27.50 40.00 200.674866 +27.50 41.25 214.388947 +27.50 42.50 228.899643 +27.50 43.75 244.244247 +27.50 45.00 260.461273 +27.50 46.25 277.590515 +27.50 47.50 295.673065 +27.50 48.75 314.751282 +27.50 50.00 334.868866 +27.50 51.25 356.070892 +27.50 52.50 378.403717 +27.50 53.75 401.915131 +27.50 55.00 426.654236 +27.50 56.25 452.671570 +27.50 57.50 480.019104 +27.50 58.75 508.750153 +27.50 60.00 538.919495 +27.50 61.25 570.583374 +27.50 62.50 603.799500 +27.50 63.75 638.626831 +27.50 65.00 675.126099 +27.50 66.25 713.359192 +27.50 67.50 753.389771 +27.50 68.75 795.282410 +27.50 70.00 839.104065 +27.50 71.25 884.922241 +27.50 72.50 932.806396 +27.50 73.75 982.827393 +27.50 75.00 1035.057251 +27.50 76.25 1089.570190 +27.50 77.50 1146.440918 +27.50 78.75 1205.746338 +27.50 80.00 1267.564453 +33.00 0.00 12.146223 +33.00 1.25 13.295611 +33.00 2.50 14.540325 +33.00 3.75 15.887088 +33.00 5.00 17.342997 +33.00 6.25 18.915545 +33.00 7.50 20.612638 +33.00 8.75 22.442612 +33.00 10.00 24.414244 +33.00 11.25 26.536772 +33.00 12.50 28.819906 +33.00 13.75 31.273863 +33.00 15.00 33.909355 +33.00 16.25 36.737633 +33.00 17.50 39.770485 +33.00 18.75 43.020256 +33.00 20.00 46.499893 +33.00 21.25 50.222916 +33.00 22.50 54.203468 +33.00 23.75 58.456333 +33.00 25.00 62.996929 +33.00 26.25 67.841354 +33.00 27.50 73.006378 +33.00 28.75 78.509499 +33.00 30.00 84.368896 +33.00 31.25 90.603516 +33.00 32.50 97.233047 +33.00 33.75 104.277969 +33.00 35.00 111.759506 +33.00 36.25 119.699730 +33.00 37.50 128.121506 +33.00 38.75 137.048569 +33.00 40.00 146.505447 +33.00 41.25 156.517609 +33.00 42.50 167.111343 +33.00 43.75 178.313904 +33.00 45.00 190.153366 +33.00 46.25 202.658798 +33.00 47.50 215.860199 +33.00 48.75 229.788513 +33.00 50.00 244.475647 +33.00 51.25 259.954468 +33.00 52.50 276.258850 +33.00 53.75 293.423676 +33.00 55.00 311.484802 +33.00 56.25 330.479126 +33.00 57.50 350.444580 +33.00 58.75 371.420044 +33.00 60.00 393.445648 +33.00 61.25 416.562317 +33.00 62.50 440.812195 +33.00 63.75 466.238342 +33.00 65.00 492.885162 +33.00 66.25 520.797729 +33.00 67.50 550.022583 +33.00 68.75 580.606995 +33.00 70.00 612.599487 +33.00 71.25 646.049683 +33.00 72.50 681.008179 +33.00 73.75 717.526550 +33.00 75.00 755.657837 +33.00 76.25 795.455750 +33.00 77.50 836.974976 +33.00 78.75 880.271790 +33.00 80.00 925.402954 +38.50 0.00 8.982460 +38.50 1.25 9.832463 +38.50 2.50 10.752963 +38.50 3.75 11.748931 +38.50 5.00 12.825614 +38.50 6.25 13.988556 +38.50 7.50 15.243602 +38.50 8.75 16.596918 +38.50 10.00 18.054993 +38.50 11.25 19.624659 +38.50 12.50 21.313101 +38.50 13.75 23.127867 +38.50 15.00 25.076887 +38.50 16.25 27.168474 +38.50 17.50 29.411346 +38.50 18.75 31.814644 +38.50 20.00 34.387928 +38.50 21.25 37.141205 +38.50 22.50 40.084930 +38.50 23.75 43.230038 +38.50 25.00 46.587933 +38.50 26.25 50.170509 +38.50 27.50 53.990192 +38.50 28.75 58.059891 +38.50 30.00 62.393074 +38.50 31.25 67.003754 +38.50 32.50 71.906471 +38.50 33.75 77.116371 +38.50 35.00 82.649170 +38.50 36.25 88.521179 +38.50 37.50 94.749321 +38.50 38.75 101.351120 +38.50 40.00 108.344734 +38.50 41.25 115.749001 +38.50 42.50 123.583366 +38.50 43.75 131.867950 +38.50 45.00 140.623550 +38.50 46.25 149.871658 +38.50 47.50 159.634460 +38.50 48.75 169.934814 +38.50 50.00 180.796356 +38.50 51.25 192.243362 +38.50 52.50 204.300873 +38.50 53.75 216.994736 +38.50 55.00 230.351425 +38.50 56.25 244.398239 +38.50 57.50 259.163239 +38.50 58.75 274.675171 +38.50 60.00 290.963684 +38.50 61.25 308.059082 +38.50 62.50 325.992523 +38.50 63.75 344.795868 +38.50 65.00 364.501892 +38.50 66.25 385.143982 +38.50 67.50 406.756531 +38.50 68.75 429.374542 +38.50 70.00 453.033813 +38.50 71.25 477.771179 +38.50 72.50 503.623901 +38.50 73.75 530.630310 +38.50 75.00 558.829407 +38.50 76.25 588.260986 +38.50 77.50 618.965698 +38.50 78.75 650.984741 +38.50 80.00 684.360535 +44.00 0.00 6.724370 +44.00 1.25 7.360691 +44.00 2.50 8.049789 +44.00 3.75 8.795382 +44.00 5.00 9.601398 +44.00 6.25 10.471990 +44.00 7.50 11.411531 +44.00 8.75 12.424638 +44.00 10.00 13.516167 +44.00 11.25 14.691238 +44.00 12.50 15.955225 +44.00 13.75 17.313778 +44.00 15.00 18.772835 +44.00 16.25 20.338621 +44.00 17.50 22.017660 +44.00 18.75 23.816795 +44.00 20.00 25.743187 +44.00 21.25 27.804317 +44.00 22.50 30.008026 +44.00 23.75 32.362488 +44.00 25.00 34.876244 +44.00 26.25 37.558205 +44.00 27.50 40.417656 +44.00 28.75 43.464279 +44.00 30.00 46.708153 +44.00 31.25 50.159752 +44.00 32.50 53.829979 +44.00 33.75 57.730175 +44.00 35.00 61.872089 +44.00 36.25 66.267944 +44.00 37.50 70.930389 +44.00 38.75 75.872574 +44.00 40.00 81.108078 +44.00 41.25 86.650993 +44.00 42.50 92.515877 +44.00 43.75 98.717812 +44.00 45.00 105.272354 +44.00 46.25 112.195587 +44.00 47.50 119.504128 +44.00 48.75 127.215103 +44.00 50.00 135.346161 +44.00 51.25 143.915512 +44.00 52.50 152.941925 +44.00 53.75 162.444672 +44.00 55.00 172.443634 +44.00 56.25 182.959244 +44.00 57.50 194.012482 +44.00 58.75 205.624893 +44.00 60.00 217.818634 +44.00 61.25 230.616455 +44.00 62.50 244.041611 +44.00 63.75 258.118042 +44.00 65.00 272.870148 +44.00 66.25 288.323120 +44.00 67.50 304.502502 +44.00 68.75 321.434540 +44.00 70.00 339.146179 +44.00 71.25 357.664825 +44.00 72.50 377.018463 +44.00 73.75 397.235748 +44.00 75.00 418.345886 +44.00 76.25 440.378723 +44.00 77.50 463.364594 +44.00 78.75 487.334503 +44.00 80.00 512.319885 +49.50 0.00 5.092593 +49.50 1.25 5.574501 +49.50 2.50 6.096377 +49.50 3.75 6.661039 +49.50 5.00 7.271462 +49.50 6.25 7.930791 +49.50 7.50 8.642338 +49.50 8.75 9.409597 +49.50 10.00 10.236252 +49.50 11.25 11.126170 +49.50 12.50 12.083430 +49.50 13.75 13.112311 +49.50 15.00 14.217303 +49.50 16.25 15.403126 +49.50 17.50 16.674719 +49.50 18.75 18.037266 +49.50 20.00 19.496185 +49.50 21.25 21.057150 +49.50 22.50 22.726093 +49.50 23.75 24.509207 +49.50 25.00 26.412960 +49.50 26.25 28.444099 +49.50 27.50 30.609659 +49.50 28.75 32.916969 +49.50 30.00 35.373661 +49.50 31.25 37.987675 +49.50 32.50 40.767269 +49.50 33.75 43.721016 +49.50 35.00 46.857826 +49.50 36.25 50.186951 +49.50 37.50 53.717987 +49.50 38.75 57.460869 +49.50 40.00 61.425888 +49.50 41.25 65.623726 +49.50 42.50 70.065399 +49.50 43.75 74.762329 +49.50 45.00 79.726318 +49.50 46.25 84.969513 +49.50 47.50 90.504524 +49.50 48.75 96.344292 +49.50 50.00 102.502228 +49.50 51.25 108.992088 +49.50 52.50 115.828087 +49.50 53.75 123.024841 +49.50 55.00 130.597397 +49.50 56.25 138.561218 +49.50 57.50 146.932205 +49.50 58.75 155.726685 +49.50 60.00 164.961426 +49.50 61.25 174.653656 +49.50 62.50 184.820969 +49.50 63.75 195.481522 +49.50 65.00 206.653809 +49.50 66.25 218.356827 +49.50 67.50 230.610016 +49.50 68.75 243.433258 +49.50 70.00 256.846893 +49.50 71.25 270.871674 +49.50 72.50 285.528839 +49.50 73.75 300.840057 +49.50 75.00 316.827484 +49.50 76.25 333.513702 +49.50 77.50 350.921692 +49.50 78.75 369.074860 +49.50 80.00 387.997192 +55.00 0.00 3.899459 +55.00 1.25 4.268462 +55.00 2.50 4.668069 +55.00 3.75 5.100437 +55.00 5.00 5.567846 +55.00 6.25 6.072702 +55.00 7.50 6.617542 +55.00 8.75 7.205041 +55.00 10.00 7.838021 +55.00 11.25 8.519443 +55.00 12.50 9.252429 +55.00 13.75 10.040255 +55.00 15.00 10.886361 +55.00 16.25 11.794357 +55.00 17.50 12.768032 +55.00 18.75 13.811350 +55.00 20.00 14.928463 +55.00 21.25 16.123713 +55.00 22.50 17.401642 +55.00 23.75 18.766993 +55.00 25.00 20.224720 +55.00 26.25 21.779987 +55.00 27.50 23.438183 +55.00 28.75 25.204918 +55.00 30.00 27.086040 +55.00 31.25 29.087618 +55.00 32.50 31.215984 +55.00 33.75 33.477707 +55.00 35.00 35.879601 +55.00 36.25 38.428753 +55.00 37.50 41.132507 +55.00 38.75 43.998474 +55.00 40.00 47.034542 +55.00 41.25 50.248875 +55.00 42.50 53.649921 +55.00 43.75 57.246418 +55.00 45.00 61.047394 +55.00 46.25 65.062180 +55.00 47.50 69.300392 +55.00 48.75 73.771980 +55.00 50.00 78.487183 +55.00 51.25 83.456551 +55.00 52.50 88.690964 +55.00 53.75 94.201599 +55.00 55.00 100.000000 +55.00 56.25 106.098000 +55.00 57.50 112.507759 +55.00 58.75 119.241798 +55.00 60.00 126.312950 +55.00 61.25 133.734390 +55.00 62.50 141.519638 +55.00 63.75 149.682541 +55.00 65.00 158.237305 +55.00 66.25 167.198441 +55.00 67.50 176.580872 +55.00 68.75 186.399780 +55.00 70.00 196.670746 +55.00 71.25 207.409698 +55.00 72.50 218.632858 +55.00 73.75 230.356857 +55.00 75.00 242.598633 +55.00 76.25 255.375458 +55.00 77.50 268.704926 +55.00 78.75 282.605072 +55.00 80.00 297.094116 +60.50 0.00 3.017253 +60.50 1.25 3.302773 +60.50 2.50 3.611973 +60.50 3.75 3.946524 +60.50 5.00 4.308187 +60.50 6.25 4.698825 +60.50 7.50 5.120401 +60.50 8.75 5.574986 +60.50 10.00 6.064762 +60.50 11.25 6.592019 +60.50 12.50 7.159174 +60.50 13.75 7.768765 +60.50 15.00 8.423449 +60.50 16.25 9.126024 +60.50 17.50 9.879416 +60.50 18.75 10.686694 +60.50 20.00 11.551075 +60.50 21.25 12.475913 +60.50 22.50 13.464725 +60.50 23.75 14.521183 +60.50 25.00 15.649117 +60.50 26.25 16.852524 +60.50 27.50 18.135571 +60.50 28.75 19.502604 +60.50 30.00 20.958141 +60.50 31.25 22.506889 +60.50 32.50 24.153738 +60.50 33.75 25.903770 +60.50 35.00 27.762264 +60.50 36.25 29.734701 +60.50 37.50 31.826761 +60.50 38.75 34.044342 +60.50 40.00 36.393532 +60.50 41.25 38.880661 +60.50 42.50 41.512257 +60.50 43.75 44.295090 +60.50 45.00 47.236137 +60.50 46.25 50.342632 +60.50 47.50 53.621994 +60.50 48.75 57.081944 +60.50 50.00 60.730385 +60.50 51.25 64.575485 +60.50 52.50 68.625679 +60.50 53.75 72.889603 +60.50 55.00 77.376183 +60.50 56.25 82.094574 +60.50 57.50 87.054207 +60.50 58.75 92.264748 +60.50 60.00 97.736130 +60.50 61.25 103.478561 +60.50 62.50 109.502495 +60.50 63.75 115.818634 +60.50 65.00 122.437981 +60.50 66.25 129.371765 +60.50 67.50 136.631531 +60.50 68.75 144.229019 +60.50 70.00 152.176315 +60.50 71.25 160.485687 +60.50 72.50 169.169754 +60.50 73.75 178.241333 +60.50 75.00 187.713547 +60.50 76.25 197.599762 +60.50 77.50 207.913620 +60.50 78.75 218.669006 +60.50 80.00 229.880066 +66.00 0.00 2.357979 +66.00 1.25 2.581112 +66.00 2.50 2.822752 +66.00 3.75 3.084203 +66.00 5.00 3.366842 +66.00 6.25 3.672124 +66.00 7.50 4.001586 +66.00 8.75 4.356843 +66.00 10.00 4.739601 +66.00 11.25 5.151653 +66.00 12.50 5.594884 +66.00 13.75 6.071277 +66.00 15.00 6.582913 +66.00 16.25 7.131973 +66.00 17.50 7.720749 +66.00 18.75 8.351636 +66.00 20.00 9.027145 +66.00 21.25 9.749906 +66.00 22.50 10.522663 +66.00 23.75 11.348282 +66.00 25.00 12.229760 +66.00 26.25 13.170221 +66.00 27.50 14.172920 +66.00 28.75 15.241255 +66.00 30.00 16.378754 +66.00 31.25 17.589100 +66.00 32.50 18.876108 +66.00 33.75 20.243757 +66.00 35.00 21.696167 +66.00 36.25 23.237623 +66.00 37.50 24.872566 +66.00 38.75 26.605597 +66.00 40.00 28.441488 +66.00 41.25 30.385176 +66.00 42.50 32.441769 +66.00 43.75 34.616547 +66.00 45.00 36.914970 +66.00 46.25 39.342682 +66.00 47.50 41.905510 +66.00 48.75 44.609451 +66.00 50.00 47.460701 +66.00 51.25 50.465649 +66.00 52.50 53.630859 +66.00 53.75 56.963112 +66.00 55.00 60.469364 +66.00 56.25 64.156784 +66.00 57.50 68.032722 +66.00 58.75 72.104759 +66.00 60.00 76.380638 +66.00 61.25 80.868340 +66.00 62.50 85.576027 +66.00 63.75 90.512085 +66.00 65.00 95.685089 +66.00 66.25 101.103844 +66.00 67.50 106.777321 +66.00 68.75 112.714752 +66.00 70.00 118.925545 +66.00 71.25 125.419319 +66.00 72.50 132.205902 +66.00 73.75 139.295334 +66.00 75.00 146.697861 +66.00 76.25 154.423920 +66.00 77.50 162.484161 +66.00 78.75 170.889481 +66.00 80.00 179.650909 +71.50 0.00 1.860295 +71.50 1.25 2.036334 +71.50 2.50 2.226972 +71.50 3.75 2.433240 +71.50 5.00 2.656224 +71.50 6.25 2.897074 +71.50 7.50 3.156998 +71.50 8.75 3.437273 +71.50 10.00 3.739245 +71.50 11.25 4.064327 +71.50 12.50 4.414009 +71.50 13.75 4.789853 +71.50 15.00 5.193501 +71.50 16.25 5.626675 +71.50 17.50 6.091181 +71.50 18.75 6.588911 +71.50 20.00 7.121847 +71.50 21.25 7.692059 +71.50 22.50 8.301713 +71.50 23.75 8.953074 +71.50 25.00 9.648505 +71.50 26.25 10.390469 +71.50 27.50 11.181537 +71.50 28.75 12.024384 +71.50 30.00 12.921800 +71.50 31.25 13.876684 +71.50 32.50 14.892052 +71.50 33.75 15.971039 +71.50 35.00 17.116901 +71.50 36.25 18.333012 +71.50 37.50 19.622879 +71.50 38.75 20.990129 +71.50 40.00 22.438534 +71.50 41.25 23.971977 +71.50 42.50 25.594498 +71.50 43.75 27.310261 +71.50 45.00 29.123571 +71.50 46.25 31.038887 +71.50 47.50 33.060791 +71.50 48.75 35.194027 +71.50 50.00 37.443481 +71.50 51.25 39.814194 +71.50 52.50 42.311348 +71.50 53.75 44.940285 +71.50 55.00 47.706497 +71.50 56.25 50.615639 +71.50 57.50 53.673512 +71.50 58.75 56.886082 +71.50 60.00 60.259480 +71.50 61.25 63.799995 +71.50 62.50 67.514061 +71.50 63.75 71.408295 +71.50 65.00 75.489471 +71.50 66.25 79.764519 +71.50 67.50 84.240547 +71.50 68.75 88.924805 +71.50 70.00 93.824722 +71.50 71.25 98.947891 +71.50 72.50 104.302071 +71.50 73.75 109.895195 +71.50 75.00 115.735306 +71.50 76.25 121.830681 +71.50 77.50 128.189713 +71.50 78.75 134.820969 +71.50 80.00 141.733200 +77.00 0.00 1.480963 +77.00 1.25 1.621105 +77.00 2.50 1.772870 +77.00 3.75 1.937078 +77.00 5.00 2.114594 +77.00 6.25 2.306332 +77.00 7.50 2.513255 +77.00 8.75 2.736379 +77.00 10.00 2.976776 +77.00 11.25 3.235571 +77.00 12.50 3.513949 +77.00 13.75 3.813155 +77.00 15.00 4.134495 +77.00 16.25 4.479341 +77.00 17.50 4.849130 +77.00 18.75 5.245367 +77.00 20.00 5.669632 +77.00 21.25 6.123572 +77.00 22.50 6.608912 +77.00 23.75 7.127454 +77.00 25.00 7.681080 +77.00 26.25 8.271750 +77.00 27.50 8.901511 +77.00 28.75 9.572494 +77.00 30.00 10.286918 +77.00 31.25 11.047092 +77.00 32.50 11.855417 +77.00 33.75 12.714389 +77.00 35.00 13.626595 +77.00 36.25 14.594730 +77.00 37.50 15.621578 +77.00 38.75 16.710035 +77.00 40.00 17.863094 +77.00 41.25 19.083855 +77.00 42.50 20.375526 +77.00 43.75 21.741428 +77.00 45.00 23.184990 +77.00 46.25 24.709751 +77.00 47.50 26.319370 +77.00 48.75 28.017620 +77.00 50.00 29.808390 +77.00 51.25 31.695688 +77.00 52.50 33.683647 +77.00 53.75 35.776520 +77.00 55.00 37.978672 +77.00 56.25 40.294609 +77.00 57.50 42.728951 +77.00 58.75 45.286449 +77.00 60.00 47.971977 +77.00 61.25 50.790550 +77.00 62.50 53.747280 +77.00 63.75 56.847443 +77.00 65.00 60.096424 +77.00 66.25 63.499748 +77.00 67.50 67.063065 +77.00 68.75 70.792160 +77.00 70.00 74.692932 +77.00 71.25 78.771439 +77.00 72.50 83.033852 +77.00 73.75 87.486473 +77.00 75.00 92.135742 +77.00 76.25 96.988205 +77.00 77.50 102.050568 +77.00 78.75 107.329643 +77.00 80.00 112.832390 diff --git a/tests/data/WxMath/Hgt2Pres.tab b/tests/data/WxMath/Hgt2Pres.tab new file mode 100644 index 0000000000..74ae663d46 --- /dev/null +++ b/tests/data/WxMath/Hgt2Pres.tab @@ -0,0 +1,1163 @@ +Height Pressure +-1000.0 1139.30639648 +-987.79 1137.69409180 +-975.59 1136.08349609 +-963.38 1134.47485352 +-951.17 1132.86804199 +-938.96 1131.26306152 +-926.76 1129.65991211 +-914.55 1128.05786133 +-902.34 1126.45849609 +-890.14 1124.86083984 +-877.93 1123.26513672 +-865.72 1121.67114258 +-853.52 1120.07897949 +-841.31 1118.48864746 +-829.10 1116.90014648 +-816.89 1115.31359863 +-804.69 1113.72802734 +-792.48 1112.14514160 +-780.27 1110.56396484 +-768.07 1108.98461914 +-755.86 1107.40698242 +-743.65 1105.83129883 +-731.45 1104.25732422 +-719.24 1102.68542480 +-707.03 1101.11511230 +-694.82 1099.54602051 +-682.62 1097.97924805 +-670.41 1096.41442871 +-658.20 1094.85144043 +-646.00 1093.29016113 +-633.79 1091.73071289 +-621.58 1090.17309570 +-609.38 1088.61730957 +-597.17 1087.06335449 +-584.96 1085.51037598 +-572.75 1083.95996094 +-560.55 1082.41137695 +-548.34 1080.86450195 +-536.13 1079.31945801 +-523.93 1077.77624512 +-511.86 1076.25207520 +-505.76 1075.48229980 +-499.65 1074.71228027 +-493.55 1073.94348145 +-487.45 1073.17431641 +-481.34 1072.40649414 +-475.24 1071.63830566 +-469.13 1070.87121582 +-463.03 1070.10388184 +-456.93 1069.33715820 +-450.82 1068.57128906 +-444.72 1067.80529785 +-438.62 1067.04052734 +-432.51 1066.27539062 +-426.41 1065.51147461 +-420.31 1064.74719238 +-414.20 1063.98425293 +-408.10 1063.22094727 +-402.00 1062.45800781 +-395.89 1061.69641113 +-389.79 1060.93432617 +-383.69 1060.17358398 +-377.58 1059.41235352 +-371.48 1058.65246582 +-365.38 1057.89221191 +-359.27 1057.13317871 +-353.17 1056.37390137 +-347.06 1055.61499023 +-340.96 1054.85717773 +-334.86 1054.09924316 +-328.75 1053.34228516 +-322.65 1052.58520508 +-316.55 1051.82922363 +-310.44 1051.07299805 +-304.34 1050.31787109 +-298.24 1049.56250000 +-292.13 1048.80761719 +-286.03 1048.05383301 +-279.93 1047.29980469 +-273.82 1046.54687500 +-267.72 1045.79370117 +-261.62 1045.04162598 +-255.76 1044.31933594 +-252.70 1043.94396973 +-249.65 1043.56811523 +-246.60 1043.19238281 +-243.55 1042.81665039 +-240.50 1042.44116211 +-237.45 1042.06640625 +-234.39 1041.69104004 +-231.34 1041.31579590 +-228.29 1040.94067383 +-225.24 1040.56640625 +-222.19 1040.19152832 +-219.13 1039.81665039 +-216.08 1039.44201660 +-213.03 1039.06750488 +-209.98 1038.69360352 +-206.93 1038.31933594 +-203.88 1037.94519043 +-200.82 1037.57092285 +-197.77 1037.19763184 +-194.72 1036.82373047 +-191.67 1036.44995117 +-188.62 1036.07629395 +-185.57 1035.70275879 +-182.51 1035.32983398 +-179.46 1034.95654297 +-176.41 1034.58325195 +-173.36 1034.21020508 +-170.31 1033.83764648 +-167.25 1033.46484375 +-164.20 1033.09204102 +-161.15 1032.71936035 +-158.10 1032.34680176 +-155.05 1031.97485352 +-152.00 1031.60253906 +-148.94 1031.23022461 +-145.89 1030.85815430 +-142.84 1030.48669434 +-139.79 1030.11462402 +-136.74 1029.74291992 +-133.69 1029.37109375 +-130.63 1028.99963379 +-127.79 1028.65380859 +-126.27 1028.46801758 +-124.74 1028.28234863 +-123.21 1028.09741211 +-121.69 1027.91174316 +-120.16 1027.72607422 +-118.64 1027.54052734 +-117.11 1027.35485840 +-115.58 1027.16943359 +-114.06 1026.98400879 +-112.53 1026.79846191 +-111.01 1026.61303711 +-109.48 1026.42822266 +-107.95 1026.24291992 +-106.43 1026.05749512 +-104.90 1025.87219238 +-103.38 1025.68676758 +-101.85 1025.50146484 +-100.33 1025.31628418 +-98.80 1025.13110352 +-97.27 1024.94592285 +-95.75 1024.76135254 +-94.22 1024.57617188 +-92.70 1024.39099121 +-91.17 1024.20593262 +-89.64 1024.02099609 +-88.12 1023.83593750 +-86.59 1023.65087891 +-85.07 1023.46582031 +-83.54 1023.28088379 +-82.01 1023.09661865 +-80.49 1022.91168213 +-78.96 1022.72686768 +-77.44 1022.54199219 +-75.91 1022.35717773 +-74.39 1022.17236328 +-72.86 1021.98754883 +-71.33 1021.80291748 +-69.81 1021.61822510 +-68.28 1021.43414307 +-66.76 1021.24945068 +-65.23 1021.06475830 +-63.85 1020.89813232 +-63.09 1020.80548096 +-62.33 1020.71356201 +-61.56 1020.62152100 +-60.80 1020.52899170 +-60.04 1020.43695068 +-59.27 1020.34442139 +-58.51 1020.25250244 +-57.75 1020.15991211 +-56.99 1020.06799316 +-56.22 1019.97546387 +-55.46 1019.88354492 +-54.70 1019.79162598 +-53.93 1019.69909668 +-53.17 1019.60717773 +-52.41 1019.51464844 +-51.65 1019.42285156 +-50.88 1019.33032227 +-50.12 1019.23840332 +-49.36 1019.14605713 +-48.59 1019.05413818 +-47.83 1018.96234131 +-47.07 1018.86981201 +-46.30 1018.77801514 +-45.54 1018.68548584 +-44.78 1018.59368896 +-44.02 1018.50128174 +-43.25 1018.40948486 +-42.49 1018.31707764 +-41.73 1018.22528076 +-40.96 1018.13348389 +-40.20 1018.04113770 +-39.44 1017.94934082 +-38.68 1017.85693359 +-37.91 1017.76513672 +-37.15 1017.67272949 +-36.39 1017.58105469 +-35.62 1017.48864746 +-34.86 1017.39697266 +-34.10 1017.30517578 +-33.33 1017.21289062 +-32.57 1017.12121582 +-31.90 1017.04028320 +-31.52 1016.99438477 +-31.14 1016.94860840 +-30.76 1016.90270996 +-30.38 1016.85620117 +-30.00 1016.81042480 +-29.62 1016.76452637 +-29.23 1016.71875000 +-28.85 1016.67285156 +-28.47 1016.62652588 +-28.09 1016.58062744 +-27.71 1016.53485107 +-27.33 1016.48895264 +-26.95 1016.44256592 +-26.56 1016.39666748 +-26.18 1016.35089111 +-25.80 1016.30499268 +-25.42 1016.25921631 +-25.04 1016.21270752 +-24.66 1016.16693115 +-24.27 1016.12115479 +-23.89 1016.07525635 +-23.51 1016.02886963 +-23.13 1015.98309326 +-22.75 1015.93719482 +-22.37 1015.89141846 +-21.99 1015.84564209 +-21.60 1015.79913330 +-21.22 1015.75335693 +-20.84 1015.70758057 +-20.46 1015.66180420 +-20.08 1015.61529541 +-19.70 1015.56951904 +-19.32 1015.52374268 +-18.93 1015.47796631 +-18.55 1015.43218994 +-18.17 1015.38568115 +-17.79 1015.33990479 +-17.41 1015.29412842 +-17.03 1015.24835205 +-16.65 1015.20196533 +-16.26 1015.15618896 +-15.94 1015.11743164 +-15.75 1015.09448242 +-15.56 1015.07165527 +-15.37 1015.04870605 +-15.18 1015.02587891 +-14.99 1015.00292969 +-14.80 1014.97949219 +-14.61 1014.95654297 +-14.42 1014.93371582 +-14.22 1014.91076660 +-14.03 1014.88793945 +-13.84 1014.86499023 +-13.65 1014.84216309 +-13.46 1014.81921387 +-13.27 1014.79638672 +-13.08 1014.77282715 +-12.89 1014.75000000 +-12.70 1014.72705078 +-12.51 1014.70422363 +-12.32 1014.68127441 +-12.13 1014.65844727 +-11.94 1014.63549805 +-11.75 1014.61267090 +-11.55 1014.58984375 +-11.36 1014.56628418 +-11.17 1014.54333496 +-10.98 1014.52050781 +-10.79 1014.49768066 +-10.60 1014.47473145 +-10.41 1014.45190430 +-10.22 1014.42895508 +-10.03 1014.40612793 +-9.84 1014.38330078 +-9.65 1014.35974121 +-9.46 1014.33691406 +-9.27 1014.31396484 +-9.07 1014.29113770 +-8.88 1014.26818848 +-8.69 1014.24536133 +-8.50 1014.22253418 +-8.31 1014.19958496 +-8.12 1014.17675781 +-7.97 1014.15771484 +-7.87 1014.14624023 +-7.77 1014.13488770 +-7.68 1014.12341309 +-7.58 1014.11193848 +-7.49 1014.10058594 +-7.39 1014.08911133 +-7.30 1014.07763672 +-7.20 1014.06628418 +-7.11 1014.05480957 +-7.01 1014.04272461 +-6.92 1014.03125000 +-6.82 1014.01989746 +-6.73 1014.00842285 +-6.63 1013.99694824 +-6.53 1013.98559570 +-6.44 1013.97412109 +-6.34 1013.96264648 +-6.25 1013.95129395 +-6.06 1013.92834473 +-5.96 1013.91699219 +-5.87 1013.90551758 +-5.77 1013.89404297 +-5.68 1013.88269043 +-5.58 1013.87121582 +-5.49 1013.85974121 +-5.39 1013.84838867 +-5.29 1013.83630371 +-5.20 1013.82482910 +-5.10 1013.81347656 +-5.01 1013.80200195 +-4.91 1013.79052734 +-4.82 1013.77917480 +-4.72 1013.76770020 +-4.63 1013.75622559 +-4.53 1013.74487305 +-4.44 1013.73339844 +-4.34 1013.72192383 +-4.25 1013.71057129 +-4.06 1013.68762207 +-3.98 1013.67816162 +-3.93 1013.67242432 +-3.84 1013.66101074 +-3.74 1013.64953613 +-3.65 1013.63806152 +-3.50 1013.62091064 +-3.41 1013.60955811 +-3.31 1013.59808350 +-3.22 1013.58660889 +-3.12 1013.57525635 +-3.03 1013.56378174 +-2.93 1013.55230713 +-2.84 1013.54095459 +-2.74 1013.52947998 +-2.64 1013.51812744 +-2.55 1013.50665283 +-2.41 1013.48950195 +-2.31 1013.47802734 +-2.22 1013.46600342 +-2.12 1013.45465088 +-2.02 1013.44317627 +-1.94 1013.43298340 +-1.85 1013.42163086 +-1.73 1013.40765381 +-1.63 1013.39617920 +-1.54 1013.38482666 +-1.44 1013.37335205 +-1.34 1013.36187744 +-1.25 1013.35052490 +-1.13 1013.33587646 +-1.03 1013.32440186 +-0.95 1013.31365967 +-0.84 1013.30096436 +-0.74 1013.28948975 +-0.65 1013.27813721 +-0.54 1013.26477051 +-0.45 1013.25402832 +-0.35 1013.24194336 +-0.25 1013.22985840 +-0.15 1013.21777344 +-0.05 1013.20568848 +0.00 1013.20001221 +0.05 1013.19396973 +0.15 1013.18188477 +0.26 1013.16918945 +0.35 1013.15777588 +0.45 1013.14569092 +0.56 1013.13275146 +0.65 1013.12133789 +0.76 1013.10858154 +0.86 1013.09686279 +0.95 1013.08544922 +1.07 1013.07116699 +1.17 1013.05975342 +1.26 1013.04827881 +1.36 1013.03686523 +1.45 1013.02539062 +1.57 1013.01116943 +1.67 1012.99975586 +1.76 1012.98797607 +1.86 1012.97656250 +1.95 1012.96514893 +2.05 1012.95373535 +2.19 1012.93627930 +2.29 1012.92486572 +2.38 1012.91339111 +2.48 1012.90197754 +2.58 1012.89056396 +2.67 1012.87915039 +2.77 1012.86773682 +2.86 1012.85632324 +2.96 1012.84454346 +3.05 1012.83312988 +3.19 1012.81597900 +3.29 1012.80456543 +3.39 1012.79315186 +3.48 1012.78173828 +3.58 1012.77032471 +3.67 1012.75885010 +3.77 1012.74743652 +3.86 1012.73571777 +3.96 1012.72430420 +4.11 1012.70654297 +4.20 1012.69506836 +4.30 1012.68365479 +4.39 1012.67224121 +4.49 1012.66082764 +4.58 1012.64910889 +4.68 1012.63763428 +4.77 1012.62622070 +4.87 1012.61480713 +4.96 1012.60339355 +5.06 1012.59197998 +5.16 1012.58056641 +5.25 1012.56915283 +5.44 1012.54595947 +5.54 1012.53454590 +5.63 1012.52313232 +5.73 1012.51171875 +5.82 1012.50030518 +5.92 1012.48889160 +6.01 1012.47747803 +6.11 1012.46600342 +6.20 1012.45458984 +6.30 1012.44287109 +6.40 1012.43145752 +6.49 1012.42004395 +6.59 1012.40863037 +6.68 1012.39721680 +6.78 1012.38574219 +6.87 1012.37432861 +6.97 1012.36291504 +7.06 1012.35150146 +7.16 1012.33978271 +7.25 1012.32836914 +7.44 1012.30554199 +7.54 1012.29412842 +7.64 1012.28265381 +7.73 1012.27124023 +7.83 1012.25982666 +7.92 1012.24841309 +8.03 1012.23480225 +8.22 1012.21197510 +8.41 1012.18914795 +8.61 1012.16632080 +8.80 1012.14318848 +8.99 1012.12036133 +9.18 1012.09747314 +9.37 1012.07464600 +9.56 1012.05151367 +9.75 1012.02868652 +9.94 1012.00585938 +10.13 1011.98303223 +10.32 1011.96020508 +10.51 1011.93701172 +10.70 1011.91418457 +10.89 1011.89135742 +11.09 1011.86853027 +11.28 1011.84539795 +11.47 1011.82257080 +11.66 1011.79974365 +11.85 1011.77691650 +12.04 1011.75408936 +12.23 1011.73095703 +12.42 1011.70812988 +12.61 1011.68530273 +12.80 1011.66247559 +12.99 1011.63934326 +13.18 1011.61651611 +13.37 1011.59368896 +13.56 1011.57086182 +13.76 1011.54803467 +13.95 1011.52490234 +14.14 1011.50207520 +14.33 1011.47924805 +14.52 1011.45642090 +14.71 1011.43328857 +14.90 1011.41046143 +15.09 1011.38763428 +15.28 1011.36480713 +15.47 1011.34191895 +15.66 1011.31884766 +15.85 1011.29602051 +16.09 1011.26776123 +16.47 1011.22210693 +16.85 1011.17620850 +17.23 1011.13055420 +17.61 1011.08459473 +18.00 1011.03900146 +18.38 1010.99304199 +18.76 1010.94738770 +19.14 1010.90179443 +19.52 1010.85583496 +19.90 1010.81024170 +20.28 1010.76428223 +20.67 1010.71868896 +21.05 1010.67272949 +21.43 1010.62713623 +21.81 1010.58117676 +22.19 1010.53558350 +22.57 1010.48999023 +22.95 1010.44403076 +23.34 1010.39843750 +23.72 1010.35253906 +24.10 1010.30688477 +24.48 1010.26098633 +24.86 1010.21539307 +25.24 1010.16949463 +25.62 1010.12390137 +26.01 1010.07830811 +26.39 1010.03240967 +26.77 1009.98681641 +27.15 1009.94085693 +27.53 1009.89532471 +27.91 1009.84942627 +28.30 1009.80383301 +28.68 1009.75793457 +29.06 1009.71234131 +29.44 1009.66674805 +29.82 1009.62084961 +30.20 1009.57531738 +30.58 1009.52941895 +30.97 1009.48382568 +31.35 1009.43792725 +31.73 1009.39239502 +32.22 1009.33349609 +32.98 1009.24206543 +33.75 1009.15063477 +34.51 1009.05920410 +35.27 1008.96777344 +36.03 1008.87634277 +36.80 1008.78491211 +37.56 1008.69384766 +38.32 1008.60241699 +39.09 1008.51104736 +39.85 1008.41967773 +40.61 1008.32830811 +41.38 1008.23693848 +42.14 1008.14556885 +42.90 1008.05419922 +43.66 1007.96282959 +44.43 1007.87182617 +45.19 1007.78045654 +45.95 1007.68908691 +46.72 1007.59777832 +47.48 1007.50646973 +48.24 1007.41516113 +49.00 1007.32385254 +49.77 1007.23254395 +50.53 1007.14123535 +51.29 1007.05029297 +52.06 1006.95904541 +52.82 1006.86773682 +53.58 1006.77648926 +54.35 1006.68524170 +55.11 1006.59399414 +55.87 1006.50274658 +56.63 1006.41149902 +57.40 1006.32025146 +58.16 1006.22930908 +58.92 1006.13812256 +59.69 1006.04687500 +60.45 1005.95568848 +61.21 1005.86450195 +61.97 1005.77331543 +62.74 1005.68212891 +63.50 1005.59094238 +64.53 1005.46856689 +66.05 1005.28625488 +67.58 1005.10394287 +69.10 1004.92169189 +70.63 1004.73980713 +72.16 1004.55749512 +73.68 1004.37536621 +75.21 1004.19317627 +76.73 1004.01141357 +78.26 1003.82928467 +79.79 1003.64715576 +81.31 1003.46514893 +82.84 1003.28314209 +84.36 1003.10144043 +85.89 1002.91943359 +87.42 1002.73748779 +88.94 1002.55560303 +90.47 1002.37402344 +91.99 1002.19213867 +93.52 1002.01031494 +95.04 1001.82849121 +96.57 1001.64672852 +98.10 1001.46527100 +99.62 1001.28350830 +101.15 1001.10186768 +102.67 1000.92016602 +104.20 1000.73883057 +105.73 1000.55718994 +107.25 1000.37561035 +108.78 1000.19403076 +110.30 1000.01245117 +111.83 999.83129883 +113.35 999.64978027 +114.88 999.46832275 +116.41 999.28692627 +117.93 999.10577393 +119.46 998.92437744 +120.98 998.74304199 +122.51 998.56170654 +124.04 998.38043213 +125.56 998.19946289 +127.09 998.01818848 +129.23 997.76428223 +132.28 997.40191650 +135.33 997.03997803 +138.38 996.67779541 +141.43 996.31579590 +144.49 995.95422363 +147.54 995.59234619 +150.59 995.23095703 +153.64 994.86938477 +156.69 994.50817871 +159.75 994.14678955 +162.80 993.78588867 +165.85 993.42468262 +168.90 993.06359863 +171.95 992.70294189 +175.00 992.34210205 +178.06 991.98162842 +181.11 991.62103271 +184.16 991.26080322 +187.21 990.90026855 +190.26 990.54028320 +193.31 990.18005371 +196.37 989.81994629 +199.42 989.46026611 +202.47 989.10040283 +205.52 988.74090576 +208.57 988.38116455 +211.62 988.02191162 +214.68 987.66241455 +217.73 987.30340576 +220.78 986.94409180 +223.83 986.58489990 +226.88 986.22619629 +229.94 985.86718750 +232.99 985.50872803 +236.04 985.14996338 +239.09 984.79162598 +242.14 984.43310547 +245.19 984.07495117 +248.25 983.71667480 +251.30 983.35852051 +254.35 983.00067139 +258.80 982.47857666 +264.91 981.76330566 +271.01 981.04809570 +277.11 980.33367920 +283.22 979.61968994 +289.32 978.90606689 +295.42 978.19293213 +301.53 977.48016357 +307.63 976.76788330 +313.73 976.05590820 +319.84 975.34442139 +325.94 974.63305664 +332.04 973.92242432 +338.15 973.21221924 +344.25 972.50238037 +350.36 971.79296875 +356.46 971.08398438 +362.56 970.37548828 +368.67 969.66735840 +374.77 968.95959473 +380.87 968.25201416 +386.98 967.54510498 +393.08 966.83868408 +399.18 966.13262939 +405.29 965.42700195 +411.39 964.72180176 +417.49 964.01696777 +423.60 963.31262207 +429.70 962.60864258 +435.80 961.90484619 +441.91 961.20172119 +448.01 960.49902344 +454.12 959.79669189 +460.22 959.09484863 +466.32 958.39343262 +472.43 957.69232178 +478.53 956.99169922 +484.63 956.29150391 +490.74 955.59136963 +496.84 954.89202881 +502.94 954.19305420 +509.05 953.49444580 +518.30 952.43609619 +530.51 951.04144287 +542.71 949.64855957 +554.92 948.25695801 +567.13 946.86724854 +579.34 945.47924805 +591.54 944.09289551 +603.75 942.70819092 +615.96 941.32476807 +628.16 939.94342041 +640.37 938.56365967 +652.58 937.18548584 +664.79 935.80871582 +676.99 934.43383789 +689.20 933.06060791 +701.41 931.68896484 +713.61 930.31903076 +725.82 928.95037842 +738.03 927.58367920 +750.23 926.21868896 +762.44 924.85522461 +774.65 923.49310303 +786.86 922.13287354 +799.06 920.77429199 +811.27 919.41735840 +823.48 918.06207275 +835.68 916.70806885 +847.89 915.35595703 +860.10 914.00549316 +872.30 912.65661621 +884.51 911.30908203 +896.72 909.96343994 +908.93 908.61938477 +921.13 907.27703857 +933.34 905.93621826 +945.55 904.59667969 +957.75 903.25903320 +969.96 901.92309570 +982.17 900.58868408 +994.38 899.25555420 +1006.58 897.92437744 +1018.79 896.59472656 +1037.99 894.50634766 +1062.41 891.85662842 +1086.82 889.21350098 +1111.23 886.57653809 +1135.65 883.94610596 +1160.06 881.32177734 +1184.48 878.70404053 +1208.89 876.09259033 +1233.30 873.48712158 +1257.72 870.88824463 +1282.13 868.29528809 +1306.55 865.70892334 +1330.96 863.12854004 +1355.38 860.55462646 +1379.79 857.98669434 +1404.20 855.42517090 +1428.62 852.86987305 +1453.03 850.32055664 +1477.45 847.77764893 +1501.86 845.24060059 +1526.27 842.71002197 +1550.69 840.18530273 +1575.10 837.66687012 +1599.52 835.15441895 +1623.93 832.64831543 +1648.34 830.14825439 +1672.76 827.65405273 +1697.17 825.16619873 +1721.59 822.68408203 +1746.00 820.20831299 +1770.41 817.73834229 +1794.83 815.27459717 +1819.24 812.81665039 +1843.66 810.36492920 +1868.07 807.91931152 +1892.48 805.47930908 +1916.90 803.04559326 +1941.31 800.61749268 +1965.73 798.19567871 +1990.14 795.77947998 +2014.55 793.36950684 +2038.97 790.96514893 +2078.77 787.05889893 +2127.59 782.28735352 +2176.42 777.53955078 +2225.25 772.81481934 +2274.08 768.11340332 +2322.91 763.43511963 +2371.73 758.77996826 +2420.56 754.14782715 +2469.39 749.53863525 +2518.22 744.95227051 +2567.05 740.38867188 +2615.88 735.84790039 +2664.70 731.32952881 +2713.53 726.83367920 +2762.36 722.36022949 +2811.19 717.90899658 +2860.02 713.48010254 +2908.84 709.07330322 +2957.67 704.68859863 +3006.50 700.32586670 +3055.33 695.98529053 +3104.16 691.66625977 +3152.98 687.36901855 +3201.81 683.09332275 +3250.64 678.83923340 +3299.47 674.60662842 +3348.30 670.39544678 +3397.12 666.20550537 +3445.95 662.03686523 +3494.78 657.88952637 +3543.61 653.76312256 +3592.44 649.65759277 +3641.27 645.57299805 +3690.09 641.50927734 +3738.92 637.46624756 +3787.75 633.44384766 +3836.58 629.44207764 +3885.41 625.46081543 +3934.23 621.50012207 +3983.06 617.55957031 +4031.89 613.63934326 +4080.72 609.73919678 +4163.09 603.20501709 +4260.75 595.53253174 +4358.41 587.93902588 +4456.06 580.42419434 +4553.72 572.98730469 +4651.38 565.62768555 +4749.03 558.34509277 +4846.69 551.13830566 +4944.34 544.00714111 +5042.00 536.95080566 +5139.66 529.96899414 +5237.31 523.06066895 +5334.97 516.22540283 +5432.62 509.46273804 +5530.28 502.77194214 +5627.94 496.15264893 +5725.59 489.60391235 +5823.25 483.12536621 +5920.91 476.71640015 +6018.56 470.37661743 +6116.22 464.10513306 +6213.88 457.90155029 +6311.53 451.76522827 +6409.19 445.69567871 +6506.84 439.69250488 +6604.50 433.75482178 +6702.16 427.88220215 +6799.81 422.07412720 +6897.47 416.33026123 +6995.12 410.64965820 +7092.78 405.03201294 +7190.44 399.47671509 +7288.09 393.98330688 +7385.75 388.55136108 +7483.41 383.18011475 +7581.06 377.86911011 +7678.72 372.61788940 +7776.38 367.42602539 +7874.03 362.29278564 +7971.69 357.21777344 +8069.34 352.20046997 +8167.00 347.24038696 +8337.31 338.72549438 +8532.62 329.16964722 +8727.94 319.83322144 +8923.25 310.71246338 +9118.56 301.80337524 +9313.88 293.10226440 +9509.19 284.60552979 +9704.50 276.30923462 +9899.81 268.20996094 +10095.12 260.30389404 +10290.44 252.58773804 +10485.75 245.05772400 +10681.06 237.71052551 +10876.38 230.54281616 +11071.69 223.55526733 +11267.00 216.77406311 +11462.31 210.19857788 +11657.62 203.82254028 +11852.94 197.63989258 +12048.25 191.64480591 +12243.56 185.83157349 +12438.88 180.19465637 +12634.19 174.72874451 +12829.50 169.42863464 +13024.81 164.28927612 +13220.12 159.30581665 +13415.44 154.47352600 +13610.75 149.78782654 +13806.06 145.24424744 +14001.38 140.83848572 +14196.69 136.56637573 +14392.00 132.42385864 +14587.31 128.40698242 +14782.62 124.51197815 +14977.94 120.73509216 +15173.25 117.07277679 +15368.56 113.52157593 +15563.88 110.07807922 +15759.19 106.73903656 +15954.50 103.50127411 +16149.81 100.36172485 +16345.12 97.31741333 +16696.88 92.06575012 +17087.50 86.56512451 +17478.12 81.39314270 +17868.75 76.53016663 +18259.38 71.95774078 +18650.00 67.65850067 +19040.62 63.61613846 +19431.25 59.81527710 +19821.88 56.24151230 +20212.50 52.88126755 +20603.12 49.72178650 +20993.75 46.75107193 +21384.38 43.95784378 +21775.00 41.33151245 +22165.62 38.86209106 +22556.25 36.54020691 +22946.88 34.35705185 +23337.50 32.30433273 +23728.12 30.37425423 +24118.75 28.55948830 +24509.38 26.85315895 +24900.00 25.24876785 +25290.62 23.74023819 +25681.25 22.32183838 +26071.88 20.98817825 +26462.50 19.73420715 +26853.12 18.55515289 +27243.75 17.44654083 +27634.38 16.40417099 +28025.00 15.42407608 +28415.62 14.50253582 +28806.25 13.63605785 +29196.88 12.82135010 +29587.50 12.05531406 +29978.12 11.33505058 +30368.75 10.65781879 +30759.38 10.02104759 +31150.00 9.42232418 +31540.62 8.85936928 +31931.25 8.33005238 +32321.88 7.83235979 +32712.50 7.36440086 +33438.25 6.56793118 +34219.50 5.80655146 +35000.75 5.13343382 +35782.00 4.53834772 +36563.25 4.01224518 +37344.50 3.54713035 +38125.75 3.13593435 +38907.00 2.77240491 +39688.25 2.45101714 +40469.50 2.16688657 +41250.75 1.91569221 +42032.00 1.69361842 +42813.25 1.49728799 +43594.50 1.32371640 +44375.75 1.17026639 +45157.00 1.03460503 +45938.25 0.91466933 +46719.50 0.80863762 +47500.75 0.71489745 +48282.00 0.63202363 +49063.25 0.55875725 +49844.50 0.49398378 +50625.75 0.43671942 +51407.00 0.38609335 +52188.25 0.34133583 +52969.50 0.30176696 +53750.75 0.26678506 +54532.00 0.23585828 +55313.25 0.20851672 +56094.50 0.18434472 +56875.75 0.16297473 +57657.00 0.14408213 +58438.25 0.12737961 +59219.50 0.11261325 +60000.75 0.09955872 +60782.00 0.08801746 +61563.25 0.07781417 +62344.50 0.06879367 +63125.75 0.06081883 +63907.00 0.05376849 +64688.25 0.04753546 +65469.50 0.04202496 +66965.50 0.03319263 +68528.00 0.02594305 +70090.50 0.02027684 +71653.00 0.01584820 +73215.50 0.01238680 +74778.00 0.00968141 +76340.50 0.00756691 +77903.00 0.00591422 +79465.50 0.00462250 +81028.00 0.00361291 +82590.50 0.00282381 +84153.00 0.00220707 +85715.50 0.00172502 +87278.00 0.00134826 +88840.50 0.00105379 +90403.00 0.00082363 +91965.50 0.00064374 +93528.00 0.00050314 +95090.50 0.00039325 +96653.00 0.00030736 +98215.50 0.00024023 +99778.00 0.00018776 +101340.5 0.0014675 +102903.0 0.0011470 +104465.5 0.0008965 +106028.0 0.0007007 +107590.5 0.0005477 +109153.0 0.0004280 +110715.5 0.0003346 +112278.0 0.0002615 +113840.5 0.0002044 +115403.0 0.0001597 +116965.5 0.0001248 +118528.0 0.0000976 +120090.5 0.0000763 +121653.0 0.0000596 +123215.5 0.0000466 +124778.0 0.0000364 +126340.5 0.0000285 +127903.0 0.0000222 +129465.5 0.0000174 +131028.0 0.0000136 +134109.0 0.0000084 +137234.0 0.0000051 +140359.0 0.0000031 +143484.0 0.0000019 +146609.0 0.0000012 +149734.0 0.0000007 +152859.0 0.0000004 +155984.0 0.0000003 +159109.0 0.0000002 +162234.0 0.0000001 +165359.0 0.0000001 +168484.0 0.0 +171609.0 0.0 +174734.0 0.0 +177859.0 0.0 +180984.0 0.0 +184109.0 0.0 +187234.0 0.0 +190359.0 0.0 +193484.0 0.0 +196609.0 0.0 +199734.0 0.0 +202859.0 0.0 +205984.0 0.0 +209109.0 0.0 +212234.0 0.0 +215359.0 0.0 +218484.0 0.0 +221609.0 0.0 +224734.0 0.0 +227859.0 0.0 +230984.0 0.0 +234109.0 0.0 +237234.0 0.0 +240359.0 0.0 +243484.0 0.0 +246609.0 0.0 +249734.0 0.0 +252859.0 0.0 +255984.0 0.0 +259109.0 0.0 +262324.0 0.0 +268574.0 0.0 +274824.0 0.0 +281074.0 0.0 +287324.0 0.0 +293574.0 0.0 +299824.0 0.0 +306074.0 0.0 +312324.0 0.0 +318574.0 0.0 +324824.0 0.0 +331074.0 0.0 +337324.0 0.0 +343574.0 0.0 +349824.0 0.0 +356074.0 0.0 +362324.0 0.0 +368574.0 0.0 +374824.0 0.0 +381074.0 0.0 +387324.0 0.0 +393574.0 0.0 +399824.0 0.0 +406074.0 0.0 +412324.0 0.0 +418574.0 0.0 +424824.0 0.0 +431074.0 0.0 +437324.0 0.0 +443574.0 0.0 +449824.0 0.0 +456074.0 0.0 +462324.0 0.0 +468574.0 0.0 +474824.0 0.0 +481074.0 0.0 +487324.0 0.0 +493574.0 0.0 +499824.0 0.0 +506074.0 0.0 +512324.0 0.0 +518574.0 0.0 +525360.0 0.0 +537860.0 0.0 +550360.0 0.0 +562860.0 0.0 +575360.0 0.0 +587860.0 0.0 +600360.0 0.0 +612860.0 0.0 +625360.0 0.0 +637860.0 0.0 +650360.0 0.0 +662860.0 0.0 +675360.0 0.0 +687860.0 0.0 +700360.0 0.0 +712860.0 0.0 +725360.0 0.0 +737860.0 0.0 +750360.0 0.0 +762860.0 0.0 +775360.0 0.0 +787860.0 0.0 +800360.0 0.0 +812860.0 0.0 +825360.0 0.0 +837860.0 0.0 +850360.0 0.0 +862860.0 0.0 +875360.0 0.0 +887860.0 0.0 +900360.0 0.0 +912860.0 0.0 +925360.0 0.0 +937860.0 0.0 +950360.0 0.0 +962860.0 0.0 +975360.0 0.0 +987860.0 0.0 diff --git a/tests/data/WxMath/PToZsa.tab b/tests/data/WxMath/PToZsa.tab new file mode 100644 index 0000000000..cf6266b87e --- /dev/null +++ b/tests/data/WxMath/PToZsa.tab @@ -0,0 +1,1337 @@ +Pressure Height +1.000000 45372.70703125 +1.071526 44934.66406250 +1.166893 44394.05078125 +1.262260 43895.93359375 +1.357628 43434.10937500 +1.452995 43003.65234375 +1.572205 42503.67578125 +1.667572 42130.27343750 +1.762939 41777.64453125 +1.858307 41443.58984375 +1.953674 41126.26562500 +2.050400 40819.86328125 +2.193451 40392.24218750 +2.288818 40122.38281250 +2.384186 39863.54296875 +2.479553 39614.85546875 +2.574921 39375.55468750 +2.670288 39144.95703125 +2.765656 38922.45312500 +2.861023 38707.49609375 +2.956390 38499.58593750 +3.051758 38298.27734375 +3.194809 38007.81250000 +3.290176 37821.30859375 +3.385544 37640.13281250 +3.480911 37463.98828125 +3.576279 37292.60937500 +3.671646 37125.73828125 +3.767014 36963.14843750 +3.862381 36804.62500000 +3.957748 36649.96484375 +4.106232 36416.43359375 +4.201599 36270.85546875 +4.296967 36128.54296875 +4.392334 35989.35546875 +4.487701 35853.15625000 +4.583069 35719.82421875 +4.678436 35589.23828125 +4.773804 35461.28515625 +4.869171 35335.86328125 +4.964539 35212.87500000 +5.059906 35092.22656250 +5.155273 34973.83203125 +5.250641 34857.60546875 +5.441376 34631.35937500 +5.536743 34521.19140625 +5.632111 34412.90625000 +5.727478 34306.44140625 +5.822845 34201.73046875 +5.918213 34098.72656250 +6.013580 33997.36328125 +6.108948 33897.59765625 +6.204315 33799.37890625 +6.299683 33702.65625000 +6.395050 33607.38671875 +6.490417 33513.52734375 +6.585785 33421.03515625 +6.681152 33329.87500000 +6.776520 33240.00781250 +6.871887 33151.39843750 +6.967255 33064.00781250 +7.062622 32977.80468750 +7.157990 32892.75781250 +7.253357 32808.83593750 +7.444092 32644.25585938 +7.539459 32563.54101562 +7.634827 32483.83789062 +7.730194 32405.12695312 +7.825562 32327.37890625 +7.920929 32250.57421875 +8.032593 32161.81445312 +8.223328 32013.01171875 +8.414062 31867.62500000 +8.604797 31725.49414062 +8.795532 31586.48046875 +8.986267 31450.44921875 +9.177002 31317.27539062 +9.367737 31186.83984375 +9.558472 31059.03515625 +9.749207 30933.75585938 +9.939941 30810.90234375 +10.130676 30690.38476562 +10.321411 30572.11718750 +10.512146 30456.01367188 +10.702881 30341.99609375 +10.893616 30229.99414062 +11.084351 30119.93750000 +11.275085 30011.75781250 +11.465820 29905.39257812 +11.656555 29800.78125000 +11.847290 29697.86914062 +12.038025 29596.59960938 +12.228760 29496.92382812 +12.419495 29398.78906250 +12.610229 29302.15039062 +12.800964 29206.96289062 +12.991699 29113.18359375 +13.182434 29020.77148438 +13.373169 28929.68554688 +13.563904 28839.89062500 +13.754639 28751.34960938 +13.945374 28664.02734375 +14.136108 28577.89257812 +14.326843 28492.91015625 +14.517578 28409.05273438 +14.708313 28326.28906250 +14.899048 28244.59179688 +15.089783 28163.93554688 +15.280518 28084.29101562 +15.471252 28005.63476562 +15.661987 27927.94335938 +15.852722 27851.19140625 +16.086914 27758.20507812 +16.468384 27609.60351562 +16.849854 27464.40429688 +17.231323 27322.45507812 +17.612793 27183.61523438 +17.994263 27047.75000000 +18.375732 26914.73437500 +18.757202 26784.45312500 +19.138672 26656.79492188 +19.520142 26531.65625000 +19.901611 26408.93945312 +20.283081 26288.55273438 +20.664551 26170.40820312 +21.046021 26054.42382812 +21.427490 25940.52734375 +21.808960 25828.63671875 +22.190430 25718.68750000 +22.571899 25610.61328125 +22.953369 25504.34960938 +23.334839 25399.83789062 +23.716309 25297.01953125 +24.097778 25195.84179688 +24.479248 25096.25585938 +24.860718 24998.20703125 +25.242188 24901.65429688 +25.623657 24806.54687500 +26.005127 24712.84570312 +26.386597 24620.50976562 +26.768066 24529.49804688 +27.149536 24439.77539062 +27.531006 24351.30468750 +27.912476 24264.05078125 +28.293945 24177.98242188 +28.675415 24093.06640625 +29.056885 24009.27148438 +29.438354 23926.56835938 +29.819824 23844.93164062 +30.201294 23764.33398438 +30.582764 23684.74609375 +30.964233 23606.14648438 +31.345703 23528.50781250 +31.727173 23451.80859375 +32.217285 23354.60937500 +32.980225 23206.20507812 +33.743164 23061.19335938 +34.506104 22919.42773438 +35.269043 22780.75976562 +36.031982 22645.06054688 +36.794922 22512.20312500 +37.557861 22382.07421875 +38.320801 22254.56250000 +39.083740 22129.56445312 +39.846680 22006.98242188 +40.609619 21886.72460938 +41.372559 21768.70703125 +42.135498 21652.84375000 +42.898438 21539.06054688 +43.661377 21427.28515625 +44.424316 21317.44531250 +45.187256 21209.47265625 +45.950195 21103.31250000 +46.713135 20998.89843750 +47.476074 20896.17578125 +48.239014 20795.08984375 +49.001953 20695.59179688 +49.764893 20597.63085938 +50.527832 20501.16015625 +51.290771 20406.13476562 +52.053711 20312.51171875 +52.816650 20220.25195312 +53.579590 20129.31640625 +54.342529 20039.66406250 +55.105469 19951.26562500 +55.868408 19864.07812500 +56.631348 19778.07617188 +57.394287 19693.22460938 +58.157227 19609.49414062 +58.920166 19526.85351562 +59.683105 19445.27734375 +60.446045 19364.73632812 +61.208984 19285.20507812 +61.971924 19206.66015625 +62.734863 19129.07617188 +63.497803 19052.42968750 +64.521484 18951.02343750 +66.047363 18802.81640625 +67.573242 18657.99609375 +69.099121 18516.40820312 +70.625000 18377.91406250 +72.150879 18242.37890625 +73.676758 18109.68164062 +75.202637 17979.70507812 +76.728516 17852.33789062 +78.254395 17727.48046875 +79.780273 17605.03320312 +81.306152 17484.90625000 +82.832031 17367.01171875 +84.357910 17251.26953125 +85.883789 17137.60351562 +87.409668 17025.93945312 +88.935547 16916.20703125 +90.461426 16808.33984375 +91.987305 16702.27929688 +93.513184 16597.96289062 +95.039062 16495.33593750 +96.564941 16394.34179688 +98.090820 16294.93261719 +99.616699 16197.05761719 +101.142578 16100.66992188 +102.668457 16005.72656250 +104.194336 15912.18261719 +105.720215 15820.00000000 +107.246094 15729.13769531 +108.771973 15639.55859375 +110.297852 15551.22753906 +111.823730 15464.11132812 +113.349609 15378.17480469 +114.875488 15293.38769531 +116.401367 15209.71875000 +117.927246 15127.14062500 +119.453125 15045.62304688 +120.979004 14965.14062500 +122.504883 14885.66699219 +124.030762 14807.17773438 +125.556641 14729.64746094 +127.082520 14653.05371094 +129.216797 14547.45019531 +132.268555 14399.44042969 +135.320312 14254.80761719 +138.372070 14113.39941406 +141.423828 13975.07714844 +144.475586 13839.70800781 +147.527344 13707.16796875 +150.579102 13577.34277344 +153.630859 13450.12109375 +156.682617 13325.40332031 +159.734375 13203.09082031 +162.786133 13083.09277344 +165.837891 12965.32421875 +168.889648 12849.70312500 +171.941406 12736.15234375 +174.993164 12624.59960938 +178.044922 12514.97558594 +181.096680 12407.21386719 +184.148438 12301.25390625 +187.200195 12197.03515625 +190.251953 12094.50195312 +193.303711 11993.60058594 +196.355469 11894.27929688 +199.407227 11796.48925781 +202.458984 11700.18652344 +205.510742 11605.32226562 +208.562500 11511.85839844 +211.614258 11419.75097656 +214.666016 11328.96289062 +217.717773 11239.45605469 +220.769531 11151.19628906 +223.821289 11064.14648438 +226.873047 10978.28125000 +229.924805 10893.44335938 +232.976562 10809.51367188 +236.028320 10726.46972656 +239.080078 10644.28906250 +242.131836 10562.95507812 +245.183594 10482.44628906 +248.235352 10402.74511719 +251.287109 10323.83105469 +254.338867 10245.69335938 +258.781250 10133.29199219 +264.884766 9981.38281250 +270.988281 9832.28320312 +277.091797 9685.87695312 +283.195312 9542.05859375 +289.298828 9400.72851562 +295.402344 9261.79394531 +301.505859 9125.16503906 +307.609375 8990.75683594 +313.712891 8858.49023438 +319.816406 8728.29394531 +325.919922 8600.09179688 +332.023438 8473.82031250 +338.126953 8349.41406250 +344.230469 8226.81347656 +350.333984 8105.96093750 +356.437500 7986.80175781 +362.541016 7869.28222656 +368.644531 7753.35546875 +374.748047 7638.97070312 +380.851562 7526.08642578 +386.955078 7414.65673828 +393.058594 7304.64306641 +399.162109 7196.00244141 +405.265625 7088.69824219 +411.369141 6982.69628906 +417.472656 6877.95898438 +423.576172 6774.45507812 +429.679688 6672.14990234 +435.783203 6571.01757812 +441.886719 6471.02392578 +447.990234 6372.14404297 +454.093750 6274.35009766 +460.197266 6177.61230469 +466.300781 6081.90722656 +472.404297 5987.21337891 +478.507812 5893.50488281 +484.611328 5800.75732422 +490.714844 5708.95263672 +496.818359 5618.06738281 +502.921875 5528.08251953 +509.025391 5438.97705078 +518.257812 5305.82324219 +530.464844 5132.68554688 +542.671875 4962.74365234 +554.878906 4795.87304688 +567.085938 4631.94433594 +579.292969 4470.85156250 +591.500000 4312.48242188 +603.707031 4156.74072266 +615.914062 4003.52612305 +628.121094 3852.75195312 +640.328125 3704.33349609 +652.535156 3558.18627930 +664.742188 3414.23632812 +676.949219 3272.41235352 +689.156250 3132.64575195 +701.363281 2994.86767578 +713.570312 2859.02026367 +725.777344 2725.03979492 +737.984375 2592.87109375 +750.191406 2462.46118164 +762.398438 2333.76025391 +774.605469 2206.71484375 +786.812500 2081.28051758 +799.019531 1957.41503906 +811.226562 1835.07067871 +823.433594 1714.20788574 +835.640625 1594.78698730 +847.847656 1476.77111816 +860.054688 1360.12329102 +872.261719 1244.80908203 +884.468750 1130.79418945 +896.675781 1018.04437256 +908.882812 906.53314209 +921.089844 796.22619629 +933.296875 687.09710693 +945.503906 579.11944580 +957.710938 472.26422119 +969.917969 366.50494385 +982.125000 261.81793213 +994.332031 158.17935181 +1006.539062 55.56810760 +1018.746094 -46.04222107 +1037.906250 -203.55870056 +1062.320312 -400.89004517 +1086.734375 -594.58746338 +1111.148438 -784.78826904 +1135.562500 -971.63507080 +1159.976562 -1155.25463867 +1184.390625 -1335.77368164 +1208.804688 -1513.30859375 +1233.218750 -1687.95947266 +1257.632812 -1859.83215332 +1282.046875 -2029.02160645 +1306.460938 -2195.62280273 +1330.875000 -2359.72583008 +1355.289062 -2521.40454102 +1379.703125 -2680.74853516 +1404.117188 -2837.82128906 +1428.531250 -2992.69677734 +1452.945312 -3145.44384766 +1477.359375 -3296.12548828 +1501.773438 -3444.80541992 +1526.187500 -3591.54150391 +1550.601562 -3736.39208984 +1575.015625 -3879.40454102 +1599.429688 -4020.63159180 +1623.843750 -4160.12646484 +1648.257812 -4297.93066406 +1672.671875 -4434.09228516 +1697.085938 -4568.65380859 +1721.500000 -4701.65722656 +1745.914062 -4833.14453125 +1770.328125 -4963.14746094 +1794.742188 -5091.70849609 +1819.156250 -5218.85986328 +1843.570312 -5344.64257812 +1867.984375 -5469.07861328 +1892.398438 -5592.20458984 +1916.812500 -5714.05273438 +1941.226562 -5834.64843750 +1965.640625 -5954.02441406 +1990.054688 -6072.20166016 +2014.468750 -6189.21630859 +2038.882812 -6305.08544922 +2078.593750 -6491.17138672 +2127.421875 -6716.08496094 +2176.250000 -6936.85205078 +2225.078125 -7153.64160156 +2273.906250 -7366.61816406 +2322.734375 -7575.91796875 +2371.562500 -7781.68457031 +2420.390625 -7984.05517578 +2469.218750 -8183.14013672 +2518.046875 -8379.06640625 +2566.875000 -8571.93945312 +2615.703125 -8761.86035156 +2664.531250 -8948.93457031 +2713.359375 -9133.25097656 +2762.187500 -9314.90625000 +2811.015625 -9493.97265625 +2859.843750 -9670.54589844 +2908.671875 -9844.69042969 +2957.500000 -10016.48339844 +3006.328125 -10185.99511719 +3055.156250 -10353.28808594 +3103.984375 -10518.43164062 +3152.812500 -10681.48925781 +3201.640625 -10842.51269531 +3250.468750 -11001.56054688 +3299.296875 -11158.68164062 +3348.125000 -11313.93164062 +3396.953125 -11467.36035156 +3445.781250 -11619.01367188 +3494.609375 -11768.94042969 +3543.437500 -11917.17578125 +3592.265625 -12063.76953125 +3641.093750 -12208.75195312 +3689.921875 -12352.17675781 +3738.750000 -12494.06933594 +3787.578125 -12634.46679688 +3836.406250 -12773.40722656 +3885.234375 -12910.92675781 +3934.062500 -13047.05175781 +3982.890625 -13181.81347656 +4031.718750 -13315.24414062 +4080.546875 -13447.37597656 +4162.75000 -13666.95507812 +4260.40625 -13923.29589844 +4358.06250 -14174.91894531 +4455.71875 -14422.01660156 +4553.37500 -14664.77246094 +4651.03125 -14903.34472656 +4748.68750 -15137.89257812 +4846.34375 -15368.57324219 +4944.00000 -15595.51464844 +5041.65625 -15818.85449219 +5139.31250 -16038.72363281 +5236.96875 -16255.23339844 +5334.62500 -16468.49414062 +5432.28125 -16678.61914062 +5529.93750 -16885.71093750 +5627.59375 -17089.85546875 +5725.25000 -17291.15429688 +5822.90625 -17489.69531250 +5920.56250 -17685.55273438 +6018.21875 -17878.81640625 +6115.87500 -18069.55664062 +6213.53125 -18257.84570312 +6311.18750 -18443.75195312 +6408.84375 -18627.33984375 +6506.50000 -18808.68359375 +6604.15625 -18987.82812500 +6701.81250 -19164.84570312 +6799.46875 -19339.78710938 +6897.12500 -19512.70703125 +6994.78125 -19683.65429688 +7092.43750 -19852.67968750 +7190.09375 -20019.83007812 +7287.75000 -20185.15429688 +7385.40625 -20348.69140625 +7483.06250 -20510.48632812 +7580.71875 -20670.58007812 +7678.37500 -20829.01562500 +7776.03125 -20985.82421875 +7873.68750 -21141.04882812 +7971.34375 -21294.72460938 +8069.00000 -21446.88085938 +8166.65625 -21597.55273438 +8336.62500 -21856.34765625 +8531.93750 -22148.51171875 +8727.25000 -22435.31250000 +8922.56250 -22716.95312500 +9117.87500 -22993.65039062 +9313.18750 -23265.58789062 +9508.50000 -23532.94726562 +9703.81250 -23795.89453125 +9899.12500 -24054.59570312 +10094.4375 -24309.18945312 +10289.7500 -24559.83007812 +10485.0625 -24806.64257812 +10680.3750 -25049.76171875 +10875.6875 -25289.31250000 +11071.0000 -25525.39648438 +11266.3125 -25758.13671875 +11461.6250 -25987.63085938 +11656.9375 -26213.98046875 +11852.2500 -26437.27734375 +12047.5625 -26657.61718750 +12242.8750 -26875.08203125 +12438.1875 -27089.75390625 +12633.5000 -27301.71679688 +12828.8125 -27511.04296875 +13024.1250 -27717.80273438 +13219.4375 -27922.06445312 +13414.7500 -28123.90039062 +13610.0625 -28323.36523438 +13805.3750 -28520.53320312 +14000.6875 -28715.45117188 +14196.0000 -28908.18164062 +14391.3125 -29098.77343750 +14586.6250 -29287.28515625 +14781.9375 -29473.76171875 +14977.2500 -29658.25195312 +15172.5625 -29840.81054688 +15367.8750 -30021.47265625 +15563.1875 -30200.27929688 +15758.5000 -30377.28710938 +15953.8125 -30552.52343750 +16149.1250 -30726.02929688 +16344.4375 -30897.84765625 +16695.500 -31202.54492188 +17086.125 -31535.53515625 +17476.750 -31862.41601562 +17867.375 -32183.43945312 +18258.000 -32498.82617188 +18648.625 -32808.79687500 +19039.250 -33113.55468750 +19429.875 -33413.28906250 +19820.500 -33708.18359375 +20211.125 -33998.40625000 +20601.750 -34284.12500000 +20992.375 -34565.49218750 +21383.000 -34842.64843750 +21773.625 -35115.73046875 +22164.250 -35384.88281250 +22554.875 -35650.21093750 +22945.500 -35911.85156250 +23336.125 -36169.90625000 +23726.750 -36424.48828125 +24117.375 -36675.69921875 +24508.000 -36923.63671875 +24898.625 -37168.39453125 +25289.250 -37410.06250000 +25679.875 -37648.72656250 +26070.500 -37884.46484375 +26461.125 -38117.36718750 +26851.750 -38347.49609375 +27242.375 -38574.92968750 +27633.000 -38799.74218750 +28023.625 -39021.99609375 +28414.250 -39241.74609375 +28804.875 -39459.07812500 +29195.500 -39674.02343750 +29586.125 -39886.66015625 +29976.750 -40097.03515625 +30367.375 -40305.19921875 +30758.000 -40511.20703125 +31148.625 -40715.10546875 +31539.250 -40916.94531250 +31929.875 -41116.76953125 +32320.500 -41314.62500000 +32711.125 -41510.55468750 +33435.50 -41868.92578125 +34216.75 -42248.45703125 +34998.00 -42621.03125000 +35779.25 -42986.93359375 +36560.50 -43346.42578125 +37341.75 -43699.74218750 +38123.00 -44047.12890625 +38904.25 -44388.80078125 +39685.50 -44724.94921875 +40466.75 -45055.79687500 +41248.00 -45381.50000000 +42029.25 -45702.24609375 +42810.50 -46018.21093750 +43591.75 -46329.53515625 +44373.00 -46636.37109375 +45154.25 -46938.86328125 +45935.50 -47237.14453125 +46716.75 -47531.35546875 +47498.00 -47821.59375000 +48279.25 -48108.01171875 +49060.50 -48390.68750000 +49841.75 -48669.73828125 +50623.00 -48945.27343750 +51404.25 -49217.39843750 +52185.50 -49486.17968750 +52966.75 -49751.72265625 +53748.00 -50014.11718750 +54529.25 -50273.44531250 +55310.50 -50529.77734375 +56091.75 -50783.20312500 +56873.00 -51033.77343750 +57654.25 -51281.57812500 +58435.50 -51526.67968750 +59216.75 -51769.14062500 +59998.00 -52009.02343750 +60779.25 -52246.39062500 +61560.50 -52481.29687500 +62341.75 -52713.80468750 +63123.00 -52943.96875000 +63904.25 -53171.83203125 +64685.50 -53397.45312500 +65466.75 -53620.87500000 +66960.00 -54041.98828125 +68522.50 -54474.55468750 +70085.00 -54899.20703125 +71647.50 -55316.26562500 +73210.00 -55726.02343750 +74772.50 -56128.75781250 +76335.00 -56524.74218750 +77897.50 -56914.20703125 +79460.00 -57297.39843750 +81022.50 -57674.53515625 +82585.00 -58045.83203125 +84147.50 -58411.48437500 +85710.00 -58771.67968750 +87272.50 -59126.58984375 +88835.00 -59476.38671875 +90397.50 -59821.25390625 +91960.00 -60161.31250000 +93522.50 -60496.73046875 +95085.00 -60827.64062500 +96647.50 -61154.17968750 +98210.00 -61476.46875000 +99772.50 -61794.62890625 +101335.0 -62108.78515625 +102897.5 -62419.03515625 +104460.0 -62725.50000000 +106022.5 -63028.27734375 +107585.0 -63327.45312500 +109147.5 -63623.14453125 +110710.0 -63915.41406250 +112272.5 -64204.37500000 +113835.0 -64490.09375000 +115397.5 -64772.65234375 +116960.0 -65052.12890625 +118522.5 -65328.59375000 +120085.0 -65602.13281250 +121647.5 -65872.79687500 +123210.0 -66140.66406250 +124772.5 -66405.78906250 +126335.0 -66668.25000000 +127897.5 -66928.09375000 +129460.0 -67185.37500000 +131022.5 -67440.15625000 +134098.0 -67934.53906250 +137223.0 -68427.56250000 +140348.0 -68911.58593750 +143473.0 -69386.94531250 +146598.0 -69854.00000000 +149723.0 -70313.05468750 +152848.0 -70764.42968750 +155973.0 -71208.38281250 +159098.0 -71645.19531250 +162223.0 -72075.10937500 +165348.0 -72498.36718750 +168473.0 -72915.20312500 +171598.0 -73325.82812500 +174723.0 -73730.42968750 +177848.0 -74129.22656250 +180973.0 -74522.37500000 +184098.0 -74910.07812500 +187223.0 -75292.47656250 +190348.0 -75669.75000000 +193473.0 -76042.03906250 +196598.0 -76409.48437500 +199723.0 -76772.23437500 +202848.0 -77130.42187500 +205973.0 -77484.16406250 +209098.0 -77833.57812500 +212223.0 -78178.80468750 +215348.0 -78519.92968750 +218473.0 -78857.07031250 +221598.0 -79190.32812500 +224723.0 -79519.80468750 +227848.0 -79845.58593750 +230973.0 -80167.78125000 +234098.0 -80486.46093750 +237223.0 -80801.70312500 +240348.0 -81113.60937500 +243473.0 -81422.25000000 +246598.0 -81727.70312500 +249723.0 -82030.03125000 +252848.0 -82329.31250000 +255973.0 -82625.61718750 +259098.0 -82919.00000000 +262302.0 -83216.83593750 +268552.0 -83789.46093750 +274802.0 -84351.39062500 +281052.0 -84903.07031250 +287302.0 -85444.89843750 +293552.0 -85977.25781250 +299802.0 -86500.52343750 +306052.0 -87015.02343750 +312302.0 -87521.09375000 +318552.0 -88019.02343750 +324802.0 -88509.10937500 +331052.0 -88991.60937500 +337302.0 -89466.80468750 +343552.0 -89934.90625000 +349802.0 -90396.16406250 +356052.0 -90850.79687500 +362302.0 -91299.01562500 +368552.0 -91741.01562500 +374802.0 -92176.99218750 +381052.0 -92607.11718750 +387302.0 -93031.57031250 +393552.0 -93450.50000000 +399802.0 -93864.09375000 +406052.0 -94272.46875000 +412302.0 -94675.78906250 +418552.0 -95074.20312500 +424802.0 -95467.81250000 +431052.0 -95856.76562500 +437302.0 -96241.17968750 +443552.0 -96621.17187500 +449802.0 -96996.84375000 +456052.0 -97368.32812500 +462302.0 -97735.69531250 +468552.0 -98099.07812500 +474802.0 -98458.53906250 +481052.0 -98814.20312500 +487302.0 -99166.14843750 +493552.0 -99514.44531250 +499802.0 -99859.19531250 +506052.0 -100200.4687500 +512302.0 -100538.3515625 +518552.0 -100872.9062500 +525316.0 -101231.3203125 +537816.0 -101883.9531250 +550316.0 -102524.4140625 +562816.0 -103153.2031250 +575316.0 -103770.7812500 +587816.0 -104377.5937500 +600316.0 -104974.0468750 +612816.0 -105560.5156250 +625316.0 -106137.3906250 +637816.0 -106704.9921875 +650316.0 -107263.6640625 +662816.0 -107813.6953125 +675316.0 -108355.3984375 +687816.0 -108889.0468750 +700316.0 -109414.8906250 +712816.0 -109933.1875000 +725316.0 -110444.1796875 +737816.0 -110948.0937500 +750316.0 -111445.1406250 +762816.0 -111935.5234375 +775316.0 -112419.4453125 +787816.0 -112897.0937500 +800316.0 -113368.6328125 +812816.0 -113834.2578125 +825316.0 -114294.1093750 +837816.0 -114748.3593750 +850316.0 -115197.1484375 +862816.0 -115640.6406250 +875316.0 -116078.9531250 +887816.0 -116512.2265625 +900316.0 -116940.5859375 +912816.0 -117364.1484375 +925316.0 -117783.0625000 +937816.0 -118197.3984375 +950316.0 -118607.2968750 +962816.0 -119012.8515625 +975316.0 -119414.1562500 +987816.0 -119811.3281250 +1000316.0 -120204.4453125 +1012816.0 -120593.6015625 +1025316.0 -120978.8984375 +1037816.0 -121360.3984375 +1052056.0 -121790.5000000 +1077056.0 -122534.3281250 +1102056.0 -123264.3046875 +1127056.0 -123980.9921875 +1152056.0 -124684.9218750 +1177056.0 -125376.5859375 +1202056.0 -126056.4531250 +1227056.0 -126724.9687500 +1252056.0 -127382.5390625 +1277056.0 -128029.5703125 +1302056.0 -128666.4296875 +1327056.0 -129293.4531250 +1352056.0 -129910.9921875 +1377056.0 -130519.3359375 +1402056.0 -131118.828125 +1427056.0 -131709.703125 +1452056.0 -132292.265625 +1477056.0 -132866.765625 +1502056.0 -133433.437500 +1527056.0 -133992.515625 +1552056.0 -134544.234375 +1577056.0 -135088.812500 +1602056.0 -135626.453125 +1627056.0 -136157.328125 +1652056.0 -136681.625000 +1677056.0 -137199.562500 +1702056.0 -137711.281250 +1727056.0 -138216.921875 +1752056.0 -138716.687500 +1777056.0 -139210.718750 +1802056.0 -139699.171875 +1827056.0 -140182.140625 +1852056.0 -140659.796875 +1877056.0 -141132.250000 +1902056.0 -141599.625000 +1927056.0 -142062.078125 +1952056.0 -142519.687500 +1977056.0 -142972.578125 +2002056.0 -143420.843750 +2027056.0 -143864.625000 +2052056.0 -144303.984375 +2077056.0 -144739.015625 +2106960.0 -145253.875000 +2156960.0 -146101.640625 +2206960.0 -146933.625000 +2256960.0 -147750.500000 +2306960.0 -148552.859375 +2356960.0 -149341.234375 +2406960.0 -150116.187500 +2456960.0 -150878.218750 +2506960.0 -151627.796875 +2556960.0 -152365.375000 +2606960.0 -153091.359375 +2656960.0 -153806.140625 +2706960.0 -154510.109375 +2756960.0 -155203.640625 +2806960.0 -155887.062500 +2856960.0 -156560.687500 +2906960.0 -157224.859375 +2956960.0 -157879.812500 +3006960.0 -158525.859375 +3056960.0 -159163.281250 +3106960.0 -159792.312500 +3156960.0 -160413.187500 +3206960.0 -161026.171875 +3256960.0 -161631.453125 +3306960.0 -162229.250000 +3356960.0 -162819.765625 +3406960.0 -163403.218750 +3456960.0 -163979.781250 +3506960.0 -164549.625000 +3556960.0 -165112.937500 +3606960.0 -165669.859375 +3656960.0 -166220.562500 +3706960.0 -166765.203125 +3756960.0 -167303.937500 +3806960.0 -167836.890625 +3856960.0 -168364.203125 +3906960.0 -168886.015625 +3956960.0 -169402.437500 +4006960.0 -169913.625000 +4056960.0 -170419.640625 +4106960.0 -170920.656250 +4156960.0 -171416.765625 +4219616.0 -172031.640625 +4319616.0 -172997.859375 +4419616.0 -173946.156250 +4519616.0 -174877.218750 +4619616.0 -175791.750000 +4719616.0 -176690.359375 +4819616.0 -177573.734375 +4919616.0 -178442.343750 +5019616.0 -179296.812500 +5119616.0 -180137.578125 +5219616.0 -180965.171875 +5319616.0 -181780.000000 +5419616.0 -182582.515625 +5519616.0 -183373.156250 +5619616.0 -184152.250000 +5719616.0 -184920.218750 +5819616.0 -185677.390625 +5919616.0 -186424.109375 +6019616.0 -187160.656250 +6119616.0 -187887.375000 +6219616.0 -188604.546875 +6319616.0 -189312.437500 +6419616.0 -190011.312500 +6519616.0 -190701.421875 +6619616.0 -191383.015625 +6719616.0 -192056.328125 +6819616.0 -192721.578125 +6919616.0 -193378.953125 +7019616.0 -194028.687500 +7119616.0 -194670.984375 +7219616.0 -195306.015625 +7319616.0 -195933.953125 +7419616.0 -196555.000000 +7519616.0 -197169.281250 +7619616.0 -197777.000000 +7719616.0 -198378.281250 +7819616.0 -198973.296875 +7919616.0 -199562.187500 +8019616.0 -200145.078125 +8119616.0 -200722.109375 +8219616.0 -201293.421875 +8319616.0 -201859.140625 +8450624.0 -202592.000000 +8650624.0 -203693.234375 +8850624.0 -204774.062500 +9050624.0 -205835.281250 +9250624.0 -206877.671875 +9450624.0 -207901.968750 +9650624.0 -208908.875000 +9850624.0 -209899.015625 +10050624.0 -210873.015625 +10250624.0 -211831.437500 +10450624.0 -212774.828125 +10650624.0 -213703.718750 +10850624.0 -214618.609375 +11050624.0 -215519.937500 +11250624.0 -216408.140625 +11450624.0 -217283.640625 +11650624.0 -218146.843750 +11850624.0 -218998.140625 +12050624.0 -219837.906250 +12250624.0 -220666.437500 +12450624.0 -221484.078125 +12650624.0 -222291.171875 +12850624.0 -223087.968750 +13050624.0 -223874.828125 +13250624.0 -224651.968750 +13450624.0 -225419.656250 +13650624.0 -226178.156250 +13850624.0 -226927.718750 +14050624.0 -227668.546875 +14250624.0 -228400.890625 +14450624.0 -229124.984375 +14650624.0 -229841.000000 +14850624.0 -230549.125000 +15050624.0 -231249.593750 +15250624.0 -231942.546875 +15450624.0 -232628.187500 +15650624.0 -233306.671875 +15850624.0 -233978.171875 +16050624.0 -234642.859375 +16250624.0 -235300.859375 +16450624.0 -235952.343750 +16650624.0 -236597.437500 +16924032.0 -237469.250000 +17324032.0 -238724.375000 +17724032.0 -239956.250000 +18124032.0 -241165.828125 +18524032.0 -242353.984375 +18924032.0 -243521.500000 +19324032.0 -244669.234375 +19724032.0 -245797.890625 +20124032.0 -246908.171875 +20524032.0 -248000.718750 +20924032.0 -249076.156250 +21324032.0 -250135.046875 +21724032.0 -251178.000000 +22124032.0 -252205.500000 +22524032.0 -253218.078125 +22924032.0 -254216.218750 +23324032.0 -255200.328125 +23724032.0 -256170.875000 +24124032.0 -257128.250000 +24524032.0 -258072.859375 +24924032.0 -259005.062500 +25324032.0 -259925.250000 +25724032.0 -260833.734375 +26124032.0 -261730.859375 +26524032.0 -262616.93750 +26924032.0 -263492.21875 +27324032.0 -264357.09375 +27724032.0 -265211.71875 +28124032.0 -266056.43750 +28524032.0 -266891.50000 +28924032.0 -267717.12500 +29324032.0 -268533.53125 +29724032.0 -269340.96875 +30124032.0 -270139.71875 +30524032.0 -270929.87500 +30924032.0 -271711.68750 +31324032.0 -272485.37500 +31724032.0 -273251.09375 +32124032.0 -274009.03125 +32524032.0 -274759.34375 +32924032.0 -275502.25000 +33324032.0 -276237.87500 +33893632.0 -277273.18750 +34693632.0 -278703.68750 +35493632.0 -280107.75000 +36293632.0 -281486.40625 +37093632.0 -282840.68750 +37893632.0 -284171.50000 +38693632.0 -285479.78125 +39493632.0 -286766.31250 +40293632.0 -288031.90625 +41093632.0 -289277.34375 +41893632.0 -290503.28125 +42693632.0 -291710.40625 +43493632.0 -292899.37500 +44293632.0 -294070.75000 +45093632.0 -295225.12500 +45893632.0 -296363.00000 +46693632.0 -297484.96875 +47493632.0 -298591.43750 +48293632.0 -299682.93750 +49093632.0 -300759.90625 +49893632.0 -301822.75000 +50693632.0 -302871.87500 +51493632.0 -303907.65625 +52293632.0 -304930.53125 +53093632.0 -305940.78125 +53893632.0 -306938.78125 +54693632.0 -307924.87500 +55493632.0 -308899.37500 +56293632.0 -309862.50000 +57093632.0 -310814.65625 +57893632.0 -311756.06250 +58693632.0 -312687.00000 +59493632.0 -313607.68750 +60293632.0 -314518.46875 +61093632.0 -315419.46875 +61893632.0 -316310.96875 +62693632.0 -317193.15625 +63493632.0 -318066.31250 +64293632.0 -318930.59375 +65093632.0 -319786.21875 +65893632.0 -320633.37500 +66693632.0 -321472.21875 +67878400.0 -322699.68750 +69478400.0 -324330.12500 +71078400.0 -325930.40625 +72678400.0 -327501.81250 +74278400.0 -329045.46875 +75878400.0 -330562.37500 +77478400.0 -332053.65625 +79078400.0 -333520.15625 +80678400.0 -334962.81250 +82278400.0 -336382.56250 +83878400.0 -337780.06250 +85478400.0 -339156.12500 +87078400.0 -340511.56250 +88678400.0 -341846.93750 +90278400.0 -343162.93750 +91878400.0 -344460.15625 +93478400.0 -345739.28125 +95078400.0 -347000.75000 +96678400.0 -348245.15625 +98278400.0 -349473.03125 +99878400.0 -350684.78125 +101478400.0 -351880.93750 +103078400.0 -353061.87500 +104678400.0 -354228.12500 +106278400.0 -355379.93750 +107878400.0 -356517.87500 +109478400.0 -357642.18750 +111078400.0 -358753.31250 +112678400.0 -359851.50000 +114278400.0 -360937.15625 +115878400.0 -362010.62500 +117478400.0 -363072.09375 +119078400.0 -364121.93750 +120678400.0 -365160.40625 +122278400.0 -366187.78125 +123878400.0 -367204.37500 +125478400.0 -368210.37500 +127078400.0 -369206.03125 +128678400.0 -370191.53125 +130278400.0 -371167.25000 +131878400.0 -372133.25000 +133478400.0 -373089.87500 +135939072.0 -374543.03125 +139139072.0 -376401.31250 +142339072.0 -378225.28125 +145539072.0 -380016.37500 +148739072.0 -381775.81250 +151939072.0 -383504.90625 +155139072.0 -385204.68750 +158339072.0 -386876.40625 +161539072.0 -388520.93750 +164739072.0 -390139.28125 +167939072.0 -391732.40625 +171139072.0 -393301.12500 +174339072.0 -394846.25000 +177539072.0 -396368.62500 +180739072.0 -397868.90625 +183939072.0 -399347.81250 +187139072.0 -400806.03125 +190339072.0 -402244.25000 +193539072.0 -403663.00000 +196739072.0 -405062.87500 +199939072.0 -406444.40625 +203139072.0 -407808.18750 +206339072.0 -409154.62500 +209539072.0 -410484.31250 +212739072.0 -411797.65625 +215939072.0 -413095.09375 +219139072.0 -414377.03125 +222339072.0 -415643.93750 +225539072.0 -416896.12500 +228739072.0 -418134.03125 +231939072.0 -419357.96875 +235139072.0 -420568.34375 +238339072.0 -421765.43750 +241539072.0 -422949.59375 +244739072.0 -424121.06250 +247939072.0 -425280.25000 +251139072.0 -426427.34375 +254339072.0 -427562.68750 +257539072.0 -428686.56250 +260739072.0 -429799.12500 +263939072.0 -430900.71875 +267139072.0 -431991.53125 +272242688.0 -433709.56250 +278642688.0 -435827.53125 +285042688.0 -437906.43750 +291442688.0 -439947.93750 +297842688.0 -441953.40625 +304242688.0 -443924.25000 +310642688.0 -445861.87500 +317042688.0 -447767.40625 +323442688.0 -449642.06250 +329842688.0 -451486.87500 +336242688.0 -453302.93750 +342642688.0 -455091.28125 +349042688.0 -456852.71875 +355442688.0 -458588.18750 +361842688.0 -460298.56250 +368242688.0 -461984.59375 +374642688.0 -463647.09375 +381042688.0 -465286.75000 +387442688.0 -466904.21875 +393842688.0 -468500.21875 +400242688.0 -470075.34375 +406642688.0 -471630.21875 +413042688.0 -473165.43750 +419442688.0 -474681.43750 +425842688.0 -476178.84375 +432242688.0 -477658.15625 +438642688.0 -479119.84375 +445042688.0 -480564.34375 +451442688.0 -481992.12500 +457842688.0 -483403.62500 +464242688.0 -484799.21875 +470642688.0 -486179.31250 +477042688.0 -487544.34375 +483442688.0 -488894.56250 +489842688.0 -490230.40625 +496242688.0 -491552.18750 +502642688.0 -492860.21875 +509042688.0 -494154.87500 +515442688.0 -495436.40625 +521842688.0 -496705.12500 +528242688.0 -497961.28125 +534642688.0 -499205.18750 +545214464.0 -501233.71875 +558014464.0 -503647.65625 +570814464.0 -506017.15625 +583614464.0 -508344.03125 +596414464.0 -510629.93750 +609214464.0 -512876.43750 +622014464.0 -515085.06250 +634814464.0 -517257.18750 +647614464.0 -519394.12500 +660414464.0 -521497.12500 +673214464.0 -523567.34375 +686014464.0 -525606.0000 +698814464.0 -527614.0000 +711614464.0 -529592.5000 +724414464.0 -531542.3750 +737214464.0 -533464.5625 +750014464.0 -535359.8750 +762814464.0 -537229.1875 +775614464.0 -539073.3125 +788414464.0 -540892.8750 +801214464.0 -542688.7500 +814014464.0 -544461.5000 +826814464.0 -546211.8125 +839614464.0 -547940.3750 +852414464.0 -549647.6875 +865214464.0 -551334.3750 +878014464.0 -553000.9375 +890814464.0 -554648.0000 +903614464.0 -556276.0000 +916414464.0 -557885.3750 +929214464.0 -559476.7500 +942014464.0 -561050.3750 +954814464.0 -562606.8125 +967614464.0 -564146.4375 +980414464.0 -565669.6875 +993214464.0 -567176.9375 +1006014464.0 -568668.5000 +1018814464.0 -570144.7500 +1031614464.0 -571606.0625 +1044414464.0 -573052.7500 +1057214464.0 -574485.2500 +1070014464.0 -575903.6875 +1091887104.0 -578296.0625 +1117487104.0 -581047.3750 +1143087104.0 -583748.0625 +1168687104.0 -586400.2500 +1194287104.0 -589005.7500 +1219887104.0 -591566.5000 +1245487104.0 -594084.0000 +1271087104.0 -596560.0000 +1296687104.0 -598995.8750 +1322287104.0 -601393.1875 +1347887104.0 -603753.1875 +1373487104.0 -606077.1875 +1399087104.0 -608366.3750 +1424687104.0 -610621.8125 +1450287104.0 -612844.7500 +1475887104.0 -615036.1250 +1501487104.0 -617196.9375 +1527087104.0 -619328.0625 +1552687104.0 -621430.5000 +1578287104.0 -623505.0625 +1603887104.0 -625552.5625 +1629487104.0 -627573.7500 +1655087104.0 -629569.3750 +1680687104.0 -631540.1875 +1706287104.0 -633486.8125 +1731887104.0 -635409.9375 +1757487104.0 -637310.1875 +1783087104.0 -639188.1250 +1808687104.0 -641044.4375 +1834287104.0 -642879.5000 +1859887104.0 -644694.0000 +1885487104.0 -646488.3750 +1911087104.0 -648263.1250 +1936687104.0 -650018.7500 +1962287104.0 -651755.6250 +1987887104.0 -653474.2500 +2013487104.0 -655175.0625 +2039087104.0 -656858.5000 +2064687104.0 -658524.8750 +2090287104.0 -660174.6250 +2115887104.0 -661808.0625 +2141487104.0 -663425.6250 +2186690560.0 -666243.8750 +2237890560.0 -669379.6250 +2289090560.0 -672457.8125 +2340290560.0 -675480.8750 +2391490560.0 -678450.6875 +2442690560.0 -681369.5000 +2493890560.0 -684239.1250 +2545090560.0 -687061.5625 +2596290560.0 -689838.3125 +2647490560.0 -692571.1250 +2698690560.0 -695261.3750 +2749890560.0 -697910.6875 +2801090560.0 -700520.3125 +2852290560.0 -703091.6250 +2903490560.0 -705625.8125 +2954690560.0 -708124.1250 +3005890560.0 -710587.5625 +3057090560.0 -713017.2500 +3108290560.0 -715414.1875 +3159490560.0 -717779.3750 +3210690560.0 -720113.8125 +3261890560.0 -722418.2500 +3313090560.0 -724693.5000 +3364290560.0 -726940.5625 +3415490560.0 -729160.0625 +3466690560.0 -731352.8125 +3517890560.0 -733519.4375 +3569090560.0 -735660.7500 +3620290560.0 -737777.3125 +3671490560.0 -739869.6875 +3722690560.0 -741938.6875 +3773890560.0 -743984.6875 +3825090560.0 -746008.3125 +3876290560.0 -748010.2500 +3927490560.0 -749990.6875 +3978690560.0 -751950.5000 +4029890560.0 -753889.9375 +4081090560.0 -755809.5625 +4132290560.0 -757709.6875 +4183490560.0 -759591.0000 +4234690560.0 -761453.6250 +4285890560.0 -763298.1250 +4379213824.0 -766614.8125 +4481613824.0 -770188.7500 +4584013824.0 -773697.2500 +4686413824.0 -777142.8125 +4788813824.0 -780528.0000 +4891213824.0 -783855.0000 +4993613824.0 -787126.1250 +5096013824.0 -790343.3125 +5198413824.0 -793508.5625 +5300813824.0 -796623.8125 +5403213824.0 -799690.6875 +5505613824.0 -802710.8125 +5608013824.0 -805685.7500 +5710413824.0 -808617.0625 +5812813824.0 -811506.1250 +5915213824.0 -814354.3125 +6017613824.0 -817162.8125 +6120013824.0 -819932.8125 +6222413824.0 -822665.6250 +6324813824.0 -825362.2500 +6427213824.0 -828023.7500 +6529613824.0 -830651.0625 +6632013824.0 -833245.2500 +6734413824.0 -835807.1875 +6836813824.0 -838337.8750 +6939213824.0 -840838.0000 +7041613824.0 -843308.4375 +7144013824.0 -845749.9375 +7246413824.0 -848163.1875 +7348813824.0 -850549.0625 +7451213824.0 -852908.1250 +7553613824.0 -855241.0625 +7656013824.0 -857548.6250 +7758413824.0 -859831.2500 +7860813824.0 -862089.6875 +7963213824.0 -864324.3125 +8065613824.0 -866535.8750 +8168013824.0 -868724.8750 +8270413824.0 -870891.6250 +8372813824.0 -873036.8125 +8475213824.0 -875160.9375 +8577613824.0 -877264.3125 +8770093056.0 -881163.5000 +8974893056.0 -885237.0000 +9179693056.0 -889235.9375 +9384493056.0 -893163.1875 +9589293056.0 -897021.6875 +9794093056.0 -900814.0000 +9998893056.0 -904542.6875 diff --git a/tests/data/WxMath/ZToPsa.tab b/tests/data/WxMath/ZToPsa.tab new file mode 100644 index 0000000000..a09658a8c7 --- /dev/null +++ b/tests/data/WxMath/ZToPsa.tab @@ -0,0 +1,1178 @@ +Height Pressure +-1000.0 1139.30639648 +-981.69 1136.88891602 +-963.38 1134.47485352 +-945.07 1132.06494141 +-926.76 1129.65991211 +-908.45 1127.25830078 +-890.14 1124.86083984 +-871.83 1122.46813965 +-853.52 1120.07897949 +-835.21 1117.69384766 +-816.89 1115.31359863 +-798.58 1112.93664551 +-780.27 1110.56396484 +-761.96 1108.19580078 +-743.65 1105.83129883 +-725.34 1103.47082520 +-707.03 1101.11511230 +-688.72 1098.76269531 +-670.41 1096.41442871 +-652.10 1094.07092285 +-633.79 1091.73071289 +-615.48 1089.39465332 +-597.17 1087.06335449 +-578.86 1084.73535156 +-560.55 1082.41137695 +-542.24 1080.09204102 +-523.93 1077.77624512 +-508.81 1075.86743164 +-499.65 1074.71228027 +-490.50 1073.55883789 +-481.34 1072.40649414 +-472.19 1071.25427246 +-463.03 1070.10388184 +-453.88 1068.95446777 +-444.72 1067.80529785 +-435.57 1066.65795898 +-426.41 1065.51147461 +-417.25 1064.36535645 +-408.10 1063.22094727 +-398.94 1062.07739258 +-389.79 1060.93432617 +-380.63 1059.79296875 +-371.48 1058.65246582 +-362.32 1057.51232910 +-353.17 1056.37390137 +-344.01 1055.23632812 +-334.86 1054.09924316 +-325.70 1052.96374512 +-316.55 1051.82922363 +-307.39 1050.69494629 +-298.24 1049.56250000 +-289.08 1048.43090820 +-279.93 1047.29980469 +-270.77 1046.17028809 +-261.62 1045.04162598 +-254.23 1044.13134766 +-249.65 1043.56811523 +-245.07 1043.00451660 +-240.50 1042.44116211 +-235.92 1041.87866211 +-231.34 1041.31579590 +-226.76 1040.75329590 +-222.19 1040.19152832 +-217.61 1039.62939453 +-213.03 1039.06750488 +-208.45 1038.50659180 +-203.88 1037.94519043 +-199.30 1037.38403320 +-194.72 1036.82373047 +-190.14 1036.26318359 +-185.57 1035.70275879 +-180.99 1035.14318848 +-176.41 1034.58325195 +-171.83 1034.02355957 +-167.25 1033.46484375 +-162.68 1032.90563965 +-158.10 1032.34680176 +-153.52 1031.78869629 +-148.94 1031.23022461 +-144.37 1030.67211914 +-139.79 1030.11462402 +-135.21 1029.55700684 +-130.63 1028.99963379 +-127.03 1028.56115723 +-124.74 1028.28234863 +-122.45 1028.00427246 +-120.16 1027.72607422 +-117.87 1027.44738770 +-115.58 1027.16943359 +-113.30 1026.89147949 +-111.01 1026.61303711 +-108.72 1026.33532715 +-106.43 1026.05749512 +-104.14 1025.77917480 +-101.85 1025.50146484 +-99.56 1025.22412109 +-97.27 1024.94592285 +-94.98 1024.66845703 +-92.70 1024.39099121 +-90.41 1024.11315918 +-88.12 1023.83593750 +-85.83 1023.55871582 +-83.54 1023.28088379 +-81.25 1023.00384521 +-78.96 1022.72686768 +-76.67 1022.44934082 +-74.39 1022.17236328 +-72.10 1021.89550781 +-69.81 1021.61822510 +-67.52 1021.34149170 +-65.23 1021.06475830 +-63.47 1020.85211182 +-62.33 1020.71356201 +-61.18 1020.57489014 +-60.04 1020.43695068 +-58.89 1020.29840088 +-57.75 1020.15991211 +-56.60 1020.02209473 +-55.46 1019.88354492 +-54.32 1019.74511719 +-53.17 1019.60717773 +-52.03 1019.46875000 +-50.88 1019.33032227 +-49.74 1019.19250488 +-48.59 1019.05413818 +-47.45 1018.91571045 +-46.30 1018.77801514 +-45.16 1018.63958740 +-44.02 1018.50128174 +-42.87 1018.36358643 +-41.73 1018.22528076 +-40.58 1018.08703613 +-39.44 1017.94934082 +-38.29 1017.81103516 +-37.15 1017.67272949 +-36.00 1017.53515625 +-34.86 1017.39697266 +-33.72 1017.25866699 +-32.57 1017.12121582 +-31.71 1017.01733398 +-31.14 1016.94860840 +-30.57 1016.87976074 +-30.00 1016.81042480 +-29.42 1016.74169922 +-28.85 1016.67285156 +-28.28 1016.60357666 +-27.71 1016.53485107 +-27.14 1016.46612549 +-26.56 1016.39666748 +-25.99 1016.32794189 +-25.42 1016.25921631 +-24.85 1016.18988037 +-24.27 1016.12115479 +-23.70 1016.05242920 +-23.13 1015.98309326 +-22.56 1015.91436768 +-21.99 1015.84564209 +-21.41 1015.77630615 +-20.84 1015.70758057 +-20.27 1015.63885498 +-19.70 1015.56951904 +-19.13 1015.50079346 +-18.55 1015.43218994 +-17.98 1015.36285400 +-17.41 1015.29412842 +-16.84 1015.22552490 +-16.26 1015.15618896 +-15.85 1015.10595703 +-15.56 1015.07165527 +-15.27 1015.03735352 +-14.99 1015.00292969 +-14.70 1014.96801758 +-14.42 1014.93371582 +-14.13 1014.89929199 +-13.84 1014.86499023 +-13.56 1014.83068848 +-13.27 1014.79638672 +-12.98 1014.76135254 +-12.70 1014.72705078 +-12.41 1014.69274902 +-12.13 1014.65844727 +-11.84 1014.62414551 +-11.55 1014.58984375 +-11.27 1014.55480957 +-10.98 1014.52050781 +-10.70 1014.48620605 +-10.41 1014.45190430 +-10.12 1014.41760254 +-9.84 1014.38330078 +-9.55 1014.34826660 +-9.27 1014.31396484 +-8.98 1014.27966309 +-8.69 1014.24536133 +-8.41 1014.21105957 +-8.12 1014.17675781 +-7.92 1014.15203857 +-7.77 1014.13488770 +-7.63 1014.11773682 +-7.49 1014.10058594 +-7.35 1014.08343506 +-7.20 1014.06628418 +-7.06 1014.04840088 +-6.92 1014.03125000 +-6.77 1014.01409912 +-6.63 1013.99694824 +-6.49 1013.97979736 +-6.34 1013.96264648 +-6.20 1013.94549561 +-6.06 1013.92834473 +-5.91 1013.91119385 +-5.77 1013.89404297 +-5.63 1013.87689209 +-5.49 1013.85974121 +-5.34 1013.84197998 +-5.20 1013.82482910 +-5.06 1013.80767822 +-4.91 1013.79052734 +-4.77 1013.77337646 +-4.63 1013.75622559 +-4.48 1013.73907471 +-4.34 1013.72192383 +-4.20 1013.70477295 +-4.06 1013.68762207 +-3.96 1013.67553711 +-3.88 1013.66668701 +-3.81 1013.65850830 +-3.74 1013.64953613 +-3.60 1013.63238525 +-3.53 1013.62420654 +-3.38 1013.60705566 +-3.31 1013.59808350 +-3.24 1013.58990479 +-3.10 1013.57202148 +-3.03 1013.56378174 +-2.88 1013.54663086 +-2.81 1013.53784180 +-2.74 1013.52947998 +-2.60 1013.51232910 +-2.53 1013.50354004 +-2.38 1013.48638916 +-2.31 1013.47802734 +-2.24 1013.46923828 +-2.10 1013.45208740 +-2.02 1013.44317627 +-1.94 1013.43298340 +-1.83 1013.42034912 +-1.73 1013.40765381 +-1.62 1013.39495850 +-1.55 1013.38604736 +-1.44 1013.37335205 +-1.33 1013.36004639 +-1.23 1013.34722900 +-1.12 1013.33459473 +-1.05 1013.32574463 +-0.93 1013.31231689 +-0.84 1013.30157471 +-0.74 1013.28887939 +-0.65 1013.27813721 +-0.54 1013.26477051 +-0.45 1013.25402832 +-0.34 1013.24133301 +-0.25 1013.22985840 +-0.15 1013.21777344 +-0.05 1013.20568848 +0.00 1013.20001221 +0.05 1013.19396973 +0.15 1013.18157959 +0.25 1013.16949463 +0.35 1013.15777588 +0.46 1013.14514160 +0.56 1013.13275146 +0.67 1013.12005615 +0.76 1013.10925293 +0.86 1013.09619141 +0.95 1013.08544922 +1.08 1013.06988525 +1.16 1013.06127930 +1.26 1013.04827881 +1.37 1013.03527832 +1.48 1013.02258301 +1.58 1013.00958252 +1.66 1013.00103760 +1.76 1012.98797607 +1.87 1012.97528076 +1.98 1012.96234131 +2.10 1012.94769287 +2.17 1012.93914795 +2.31 1012.92199707 +2.38 1012.91339111 +2.46 1012.90484619 +2.60 1012.88775635 +2.67 1012.87915039 +2.81 1012.86199951 +2.89 1012.85345459 +2.96 1012.84454346 +3.10 1012.82739258 +3.17 1012.81890869 +3.31 1012.80175781 +3.39 1012.79315186 +3.46 1012.78460693 +3.60 1012.76745605 +3.67 1012.75885010 +3.81 1012.74139404 +3.89 1012.73291016 +3.96 1012.72430420 +4.06 1012.71221924 +4.20 1012.69506836 +4.34 1012.67797852 +4.49 1012.66082764 +4.63 1012.64337158 +4.77 1012.62622070 +4.92 1012.60913086 +5.06 1012.59197998 +5.20 1012.57482910 +5.35 1012.55773926 +5.49 1012.54028320 +5.63 1012.52313232 +5.78 1012.50598145 +5.92 1012.48889160 +6.06 1012.47174072 +6.20 1012.45458984 +6.35 1012.43713379 +6.49 1012.42004395 +6.63 1012.40289307 +6.78 1012.38574219 +6.92 1012.36865234 +7.06 1012.35150146 +7.21 1012.33404541 +7.35 1012.31695557 +7.49 1012.29980469 +7.64 1012.28265381 +7.78 1012.26556396 +7.92 1012.24841309 +8.13 1012.22338867 +8.41 1012.18914795 +8.70 1012.15460205 +8.99 1012.12036133 +9.27 1012.08605957 +9.56 1012.05151367 +9.85 1012.01727295 +10.13 1011.98303223 +10.42 1011.94842529 +10.70 1011.91418457 +10.99 1011.87994385 +11.28 1011.84539795 +11.56 1011.81115723 +11.85 1011.77691650 +12.13 1011.74237061 +12.42 1011.70812988 +12.71 1011.67388916 +12.99 1011.63934326 +13.28 1011.60510254 +13.56 1011.57086182 +13.85 1011.53631592 +14.14 1011.50207520 +14.42 1011.46783447 +14.71 1011.43328857 +15.00 1011.39904785 +15.28 1011.36480713 +15.57 1011.33026123 +15.85 1011.29602051 +16.28 1011.24493408 +16.85 1011.17620850 +17.42 1011.10772705 +18.00 1011.03900146 +18.57 1010.97021484 +19.14 1010.90179443 +19.71 1010.83300781 +20.28 1010.76428223 +20.86 1010.69586182 +21.43 1010.62713623 +22.00 1010.55841064 +22.57 1010.48999023 +23.15 1010.42126465 +23.72 1010.35253906 +24.29 1010.28411865 +24.86 1010.21539307 +25.43 1010.14666748 +26.01 1010.07830811 +26.58 1010.00958252 +27.15 1009.94085693 +27.72 1009.87249756 +28.30 1009.80383301 +28.87 1009.73510742 +29.44 1009.66674805 +30.01 1009.59808350 +30.58 1009.52941895 +31.16 1009.46105957 +31.73 1009.39239502 +32.60 1009.28759766 +33.75 1009.15063477 +34.89 1009.01361084 +36.03 1008.87634277 +37.18 1008.73937988 +38.32 1008.60241699 +39.47 1008.46520996 +40.61 1008.32830811 +41.76 1008.19140625 +42.90 1008.05419922 +44.05 1007.91735840 +45.19 1007.78045654 +46.33 1007.64324951 +47.48 1007.50646973 +48.62 1007.36962891 +49.77 1007.23254395 +50.91 1007.09576416 +52.06 1006.95904541 +53.20 1006.82196045 +54.35 1006.68524170 +55.49 1006.54852295 +56.63 1006.41149902 +57.78 1006.27478027 +58.92 1006.13812256 +60.07 1006.00115967 +61.21 1005.86450195 +62.36 1005.72790527 +63.50 1005.59094238 +65.29 1005.37738037 +67.58 1005.10394287 +69.87 1004.83087158 +72.16 1004.55749512 +74.45 1004.28424072 +76.73 1004.01141357 +79.02 1003.73822021 +81.31 1003.46514893 +83.60 1003.19244385 +85.89 1002.91943359 +88.18 1002.64654541 +90.47 1002.37402344 +92.76 1002.10119629 +95.04 1001.82849121 +97.33 1001.55615234 +99.62 1001.28350830 +101.91 1001.01098633 +104.20 1000.73883057 +106.49 1000.46643066 +108.78 1000.19403076 +111.07 999.92205811 +113.35 999.64978027 +115.64 999.37762451 +117.93 999.10577393 +120.22 998.83374023 +122.51 998.56170654 +124.80 998.29010010 +127.09 998.01818848 +130.75 997.58300781 +135.33 997.03997803 +139.91 996.49682617 +144.49 995.95422363 +149.06 995.41186523 +153.64 994.86938477 +158.22 994.32751465 +162.80 993.78588867 +167.37 993.24407959 +171.95 992.70294189 +176.53 992.16198730 +181.11 991.62103271 +185.69 991.08050537 +190.26 990.54028320 +194.84 990.0 +199.42 989.46026611 +204.00 988.92077637 +208.57 988.38116455 +213.15 987.84216309 +217.73 987.30340576 +222.31 986.76452637 +226.88 986.22619629 +231.46 985.68811035 +236.04 985.14996338 +240.62 984.61236572 +245.19 984.07495117 +249.77 983.53753662 +254.35 983.00067139 +261.85 982.12072754 +271.01 981.04809570 +280.17 979.97680664 +289.32 978.90606689 +298.48 977.83636475 +307.63 976.76788330 +316.79 975.69995117 +325.94 974.63305664 +335.10 973.56744385 +344.25 972.50238037 +353.41 971.43829346 +362.56 970.37548828 +371.72 969.31323242 +380.87 968.25201416 +390.03 967.19201660 +399.18 966.13262939 +408.34 965.07421875 +417.49 964.01696777 +426.65 962.96044922 +435.80 961.90484619 +444.96 960.85040283 +454.12 959.79669189 +463.27 958.74389648 +472.43 957.69232178 +481.58 956.64135742 +490.74 955.59136963 +499.89 954.54260254 +509.05 953.49444580 +524.40 951.73858643 +542.71 949.64855957 +561.03 947.56188965 +579.34 945.47924805 +597.65 943.40032959 +615.96 941.32476807 +634.27 939.25329590 +652.58 937.18548584 +670.89 935.12103271 +689.20 933.06060791 +707.51 931.00384521 +725.82 928.95037842 +744.13 926.90093994 +762.44 924.85522461 +780.75 922.81274414 +799.06 920.77429199 +817.37 918.73956299 +835.68 916.70806885 +853.99 914.68054199 +872.30 912.65661621 +890.62 910.63604736 +908.93 908.61938477 +927.24 906.60638428 +945.55 904.59667969 +963.86 902.59088135 +982.17 900.58868408 +1000.48 898.58978271 +1018.79 896.59472656 +1050.20 893.18048096 +1086.82 889.21350098 +1123.44 885.26055908 +1160.06 881.32177734 +1196.68 877.39752197 +1233.30 873.48712158 +1269.93 869.59082031 +1306.55 865.70892334 +1343.17 861.84082031 +1379.79 857.98669434 +1416.41 854.14678955 +1453.03 850.32055664 +1489.65 846.50817871 +1526.27 842.71002197 +1562.89 838.92535400 +1599.52 835.15441895 +1636.14 831.39752197 +1672.76 827.65405273 +1709.38 823.92419434 +1746.00 820.20831299 +1782.62 816.50573730 +1819.24 812.81665039 +1855.86 809.14135742 +1892.48 805.47930908 +1929.11 801.83062744 +1965.73 798.19567871 +2002.35 794.57373047 +2038.97 790.96514893 +2103.18 784.67028809 +2176.42 777.53955078 +2249.66 770.46105957 +2322.91 763.43511963 +2396.15 756.46118164 +2469.39 749.53863525 +2542.63 742.66772461 +2615.88 735.84790039 +2689.12 729.07867432 +2762.36 722.36022949 +2835.60 715.69189453 +2908.84 709.07330322 +2982.09 702.50457764 +3055.33 695.98529053 +3128.57 689.51477051 +3201.81 683.09332275 +3275.05 676.72033691 +3348.30 670.39544678 +3421.54 664.11865234 +3494.78 657.88952637 +3568.02 651.70764160 +3641.27 645.57299805 +3714.51 639.48529053 +3787.75 633.44384766 +3860.99 627.44897461 +3934.23 621.50012207 +4007.48 615.59686279 +4080.72 609.73919678 +4211.92 599.35876465 +4358.41 587.93902588 +4504.89 576.69604492 +4651.38 565.62768555 +4797.86 554.73223877 +4944.34 544.00714111 +5090.83 533.45056152 +5237.31 523.06066895 +5383.80 512.83508301 +5530.28 502.77194214 +5676.77 492.86947632 +5823.25 483.12536621 +5969.73 473.53784180 +6116.22 464.10513306 +6262.70 454.82498169 +6409.19 445.69567871 +6555.67 436.71548462 +6702.16 427.88220215 +6848.64 419.19415283 +6995.12 410.64965820 +7141.61 402.24661255 +7288.09 393.98330688 +7434.58 385.85818481 +7581.06 377.86911011 +7727.55 370.01449585 +7874.03 362.29278564 +8020.52 354.70190430 +8167.00 347.24038696 +8434.97 333.91983032 +8727.94 319.83322144 +9020.91 306.23168945 +9313.88 293.10226440 +9606.84 280.43252563 +9899.81 268.20996094 +10192.78 256.42227173 +10485.75 245.05772400 +10778.72 234.10450745 +11071.69 223.55526733 +11364.66 213.46099854 +11657.62 203.82254028 +11950.59 194.61927795 +12243.56 185.83157349 +12536.53 177.44065857 +12829.50 169.42863464 +13122.47 161.77836609 +13415.44 154.47352600 +13708.41 147.49855042 +14001.38 140.83848572 +14294.34 134.47917175 +14587.31 128.40698242 +14880.28 122.60897827 +15173.25 117.07277679 +15466.22 111.78656769 +15759.19 106.73903656 +16052.16 101.91941071 +16345.12 97.31741333 +16892.19 89.27307892 +17478.12 81.39314270 +18064.06 74.20874786 +18650.00 67.65850067 +19235.94 61.68643188 +19821.88 56.24151230 +20407.81 51.27719498 +20993.75 46.75107193 +21579.69 42.62445831 +22165.62 38.86209106 +22751.56 35.43181992 +23337.50 32.30433273 +23923.44 29.45289993 +24509.38 26.85315895 +25095.31 24.48288918 +25681.25 22.32183838 +26267.19 20.35153770 +26853.12 18.55515289 +27439.06 16.91732979 +28025.00 15.42407608 +28610.94 14.06262493 +29196.88 12.82135010 +29782.81 11.68963528 +30368.75 10.65781879 +30954.69 9.71707630 +31540.62 8.85936928 +32126.56 8.07737446 +32712.50 7.36440086 +33828.88 6.17551947 +35000.75 5.13343382 +36172.62 4.26719570 +37344.50 3.54713035 +38516.38 2.94857216 +39688.25 2.45101714 +40860.12 2.03742242 +42032.00 1.69361842 +43203.88 1.40782928 +44375.75 1.17026639 +45547.62 0.97279024 +46719.50 0.80863762 +47891.38 0.67218441 +49063.25 0.55875725 +50235.12 0.46446994 +51407.00 0.38609335 +52578.88 0.32094219 +53750.75 0.26678506 +54922.62 0.22176652 +56094.50 0.18434472 +57266.38 0.15323755 +58438.25 0.12737961 +59610.12 0.10588498 +60782.00 0.08801746 +61953.88 0.07316504 +63125.75 0.06081883 +64297.62 0.05055601 +65469.50 0.04202496 +67746.75 0.02934480 +70090.50 0.02027684 +72434.25 0.01401102 +74778.00 0.00968141 +77121.75 0.00668972 +79465.50 0.00462250 +81809.25 0.00319409 +84153.00 0.00220707 +86496.75 0.00152505 +88840.50 0.00105379 +91184.25 0.00072815 +93528.00 0.00050314 +95871.75 0.00034767 +98215.50 0.00024023 +100559.25 0.00016600 +102903.00 0.00011470 +105246.75 0.00007926 +107590.50 0.00005477 +109934.25 0.00003784 +112278.00 0.00002615 +114621.75 0.00001807 +116965.50 0.00001248 +119309.25 0.00000863 +121653.00 0.00000596 +123996.75 0.00000412 +126340.50 0.00000285 +128684.25 0.00000197 +131028.00 0.00000136 +135671.50 0.00000065 +140359.00 0.00000031 +145046.50 0.00000015 +149734.00 0.00000007 +154421.50 0.00000003 +159109.00 0.00000002 +163796.50 0.00000001 +168484.00 0.0 +173171.50 0.0 +177859.00 0.0 +182546.50 0.0 +187234.00 0.0 +191921.50 0.0 +196609.00 0.0 +201296.50 0.0 +205984.00 0.0 +210671.50 0.0 +215359.00 0.0 +220046.50 0.0 +224734.00 0.0 +229421.50 0.0 +234109.00 0.0 +238796.50 0.0 +243484.00 0.0 +248171.50 0.0 +252859.00 0.0 +257546.50 0.0 +262324.00 0.0 +271699.00 0.0 +281074.00 0.0 +290449.00 0.0 +299824.00 0.0 +309199.00 0.0 +318574.00 0.0 +327949.00 0.0 +337324.00 0.0 +346699.00 0.0 +356074.00 0.0 +365449.00 0.0 +374824.00 0.0 +384199.00 0.0 +393574.00 0.0 +402949.00 0.0 +412324.00 0.0 +421699.00 0.0 +431074.00 0.0 +440449.00 0.0 +449824.00 0.0 +459199.00 0.0 +468574.00 0.0 +477949.00 0.0 +487324.00 0.0 +496699.00 0.0 +506074.00 0.0 +515449.00 0.0 +525360.00 0.0 +544110.00 0.0 +562860.00 0.0 +581610.00 0.0 +600360.00 0.0 +619110.00 0.0 +637860.00 0.0 +656610.00 0.0 +675360.00 0.0 +694110.00 0.0 +712860.00 0.0 +731610.00 0.0 +750360.00 0.0 +769110.00 0.0 +787860.00 0.0 +806610.00 0.0 +825360.00 0.0 +844110.00 0.0 +862860.00 0.0 +881610.00 0.0 +900360.00 0.0 +919110.00 0.0 +937860.00 0.0 +956610.00 0.0 +975360.00 0.0 +994110.00 0.0 +1012860.0 0.0 +1031610.0 0.0 +1052144.0 0.0 +1089644.0 0.0 +1127144.0 0.0 +1164644.0 0.0 +1202144.0 0.0 +1239644.0 0.0 +1277144.0 0.0 +1314644.0 0.0 +1352144.0 0.0 +1389644.0 0.0 +1427144.0 0.0 +1464644.0 0.0 +1502144.0 0.0 +1539644.0 0.0 +1577144.0 0.0 +1614644.0 0.0 +1652144.0 0.0 +1689644.0 0.0 +1727144.0 0.0 +1764644.0 0.0 +1802144.0 0.0 +1839644.0 0.0 +1877144.0 0.0 +1914644.0 0.0 +1952144.0 0.0 +1989644.0 0.0 +2027144.0 0.0 +2064644.0 0.0 +2107136.0 0.0 +2182136.0 0.0 +2257136.0 0.0 +2332136.0 0.0 +2407136.0 0.0 +2482136.0 0.0 +2557136.0 0.0 +2632136.0 0.0 +2707136.0 0.0 +2782136.0 0.0 +2857136.0 0.0 +2932136.0 0.0 +3007136.0 0.0 +3082136.0 0.0 +3157136.0 0.0 +3232136.0 0.0 +3307136.0 0.0 +3382136.0 0.0 +3457136.0 0.0 +3532136.0 0.0 +3607136.0 0.0 +3682136.0 0.0 +3757136.0 0.0 +3832136.0 0.0 +3907136.0 0.0 +3982136.0 0.0 +4057136.0 0.0 +4132136.0 0.0 +4219968.0 0.0 +4369968.0 0.0 +4519968.0 0.0 +4669968.0 0.0 +4819968.0 0.0 +4969968.0 0.0 +5119968.0 0.0 +5269968.0 0.0 +5419968.0 0.0 +5569968.0 0.0 +5719968.0 0.0 +5869968.0 0.0 +6019968.0 0.0 +6169968.0 0.0 +6319968.0 0.0 +6469968.0 0.0 +6619968.0 0.0 +6769968.0 0.0 +6919968.0 0.0 +7069968.0 0.0 +7219968.0 0.0 +7369968.0 0.0 +7519968.0 0.0 +7669968.0 0.0 +7819968.0 0.0 +7969968.0 0.0 +8119968.0 0.0 +8269968.0 0.0 +8451328.0 0.0 +8751328.0 0.0 +9051328.0 0.0 +9351328.0 0.0 +9651328.0 0.0 +9951328.0 0.0 +10251328.0 0.0 +10551328.0 0.0 +10851328.0 0.0 +11151328.0 0.0 +11451328.0 0.0 +11751328.0 0.0 +12051328.0 0.0 +12351328.0 0.0 +12651328.0 0.0 +12951328.0 0.0 +13251328.0 0.0 +13551328.0 0.0 +13851328.0 0.0 +14151328.0 0.0 +14451328.0 0.0 +14751328.0 0.0 +15051328.0 0.0 +15351328.0 0.0 +15651328.0 0.0 +15951328.0 0.0 +16251328.0 0.0 +16551328.0 0.0 +16925440.0 0.0 +17525440.0 0.0 +18125440.0 0.0 +18725440.0 0.0 +19325440.0 0.0 +19925440.0 0.0 +20525440.0 0.0 +21125440.0 0.0 +21725440.0 0.0 +22325440.0 0.0 +22925440.0 0.0 +23525440.0 0.0 +24125440.0 0.0 +24725440.0 0.0 +25325440.0 0.0 +25925440.0 0.0 +26525440.0 0.0 +27125440.0 0.0 +27725440.0 0.0 +28325440.0 0.0 +28925440.0 0.0 +29525440.0 0.0 +30125440.0 0.0 +30725440.0 0.0 +31325440.0 0.0 +31925440.0 0.0 +32525440.0 0.0 +33125440.0 0.0 +33896448.0 0.0 +35096448.0 0.0 +36296448.0 0.0 +37496448.0 0.0 +38696448.0 0.0 +39896448.0 0.0 +41096448.0 0.0 +42296448.0 0.0 +43496448.0 0.0 +44696448.0 0.0 +45896448.0 0.0 +47096448.0 0.0 +48296448.0 0.0 +49496448.0 0.0 +50696448.0 0.0 +51896448.0 0.0 +53096448.0 0.0 +54296448.0 0.0 +55496448.0 0.0 +56696448.0 0.0 +57896448.0 0.0 +59096448.0 0.0 +60296448.0 0.0 +61496448.0 0.0 +62696448.0 0.0 +63896448.0 0.0 +65096448.0 0.0 +66296448.0 0.0 +67884032.0 0.0 +70284032.0 0.0 +72684032.0 0.0 +75084032.0 0.0 +77484032.0 0.0 +79884032.0 0.0 +82284032.0 0.0 +84684032.0 0.0 +87084032.0 0.0 +89484032.0 0.0 +91884032.0 0.0 +94284032.0 0.0 +96684032.0 0.0 +99084032.0 0.0 +101484032.0 0.0 +103884032.0 0.0 +106284032.0 0.0 +108684032.0 0.0 +111084032.0 0.0 +113484032.0 0.0 +115884032.0 0.0 +118284032.0 0.0 +120684032.0 0.0 +123084032.0 0.0 +125484032.0 0.0 +127884032.0 0.0 +130284032.0 0.0 +132684032.0 0.0 +135950336.0 0.0 +140750336.0 0.0 +145550336.0 0.0 +150350336.0 0.0 +155150336.0 0.0 +159950336.0 0.0 +164750336.0 0.0 +169550336.0 0.0 +174350336.0 0.0 +179150336.0 0.0 +183950336.0 0.0 +188750336.0 0.0 +193550336.0 0.0 +198350336.0 0.0 +203150336.0 0.0 +207950336.0 0.0 +212750336.0 0.0 +217550336.0 0.0 +222350336.0 0.0 +227150336.0 0.0 +231950336.0 0.0 +236750336.0 0.0 +241550336.0 0.0 +246350336.0 0.0 +251150336.0 0.0 +255950336.0 0.0 +260750336.0 0.0 +265550336.0 0.0 +272265216.0 0.0 +281865216.0 0.0 +291465216.0 0.0 +301065216.0 0.0 +310665216.0 0.0 +320265216.0 0.0 +329865216.0 0.0 +339465216.0 0.0 +349065216.0 0.0 +358665216.0 0.0 +368265216.0 0.0 +377865216.0 0.0 +387465216.0 0.0 +397065216.0 0.0 +406665216.0 0.0 +416265216.0 0.0 +425865216.0 0.0 +435465216.0 0.0 +445065216.0 0.0 +454665216.0 0.0 +464265216.0 0.0 +473865216.0 0.0 +483465216.0 0.0 +493065216.0 0.0 +502665216.0 0.0 +512265216.0 0.0 +521865216.0 0.0 +531465216.0 0.0 +545259520.0 0.0 +564459520.0 0.0 +583659520.0 0.0 +602859520.0 0.0 +622059520.0 0.0 +641259520.0 0.0 +660459520.0 0.0 +679659520.0 0.0 +698859520.0 0.0 +718059520.0 0.0 +737259520.0 0.0 +756459520.0 0.0 +775659520.0 0.0 +794859520.0 0.0 +814059520.0 0.0 +833259520.0 0.0 +852459520.0 0.0 +871659520.0 0.0 +890859520.0 0.0 +910059520.0 0.0 +929259520.0 0.0 +948459520.0 0.0 +967659520.0 0.0 +986859520.0 0.0 +1006059520.0 0.0 +1025259520.0 0.0 +1044459520.0 0.0 +1063659520.0 0.0 +1091977216.0 0.0 +1130377216.0 0.0 +1168777216.0 0.0 +1207177216.0 0.0 +1245577216.0 0.0 +1283977216.0 0.0 +1322377216.0 0.0 +1360777216.0 0.0 +1399177216.0 0.0 +1437577216.0 0.0 +1475977216.0 0.0 +1514377216.0 0.0 +1552777216.0 0.0 +1591177216.0 0.0 +1629577216.0 0.0 +1667977216.0 0.0 +1706377216.0 0.0 +1744777216.0 0.0 +1783177216.0 0.0 +1821577216.0 0.0 +1859977216.0 0.0 +1898377216.0 0.0 +1936777216.0 0.0 +1975177216.0 0.0 +2013577216.0 0.0 +2051977216.0 0.0 +2090377216.0 0.0 +2128777216.0 0.0 +2186870784.0 0.0 +2263670784.0 0.0 +2340470784.0 0.0 +2417270784.0 0.0 +2494070784.0 0.0 +2570870784.0 0.0 +2647670784.0 0.0 +2724470784.0 0.0 +2801270784.0 0.0 +2878070784.0 0.0 +2954870784.0 0.0 +3031670784.0 0.0 +3108470784.0 0.0 +3185270784.0 0.0 +3262070784.0 0.0 +3338870784.0 0.0 +3415670784.0 0.0 +3492470784.0 0.0 +3569270784.0 0.0 +3646070784.0 0.0 +3722870784.0 0.0 +3799670784.0 0.0 +3876470784.0 0.0 +3953270784.0 0.0 +4030070784.0 0.0 +4106870784.0 0.0 +4183670784.0 0.0 +4260470784.0 0.0 +4379574272.0 0.0 +4533174272.0 0.0 +4686774272.0 0.0 +4840374272.0 0.0 +4993974272.0 0.0 +5147574272.0 0.0 +5301174272.0 0.0 +5454774272.0 0.0 +5608374272.0 0.0 +5761974272.0 0.0 +5915574272.0 0.0 +6069174272.0 0.0 +6222774272.0 0.0 +6376374272.0 0.0 +6529974272.0 0.0 +6683574272.0 0.0 +6837174272.0 0.0 +6990774272.0 0.0 +7144374272.0 0.0 +7297974272.0 0.0 +7451574272.0 0.0 +7605174272.0 0.0 +7758774272.0 0.0 +7912374272.0 0.0 +8065974272.0 0.0 +8219574272.0 0.0 +8373174272.0 0.0 +8526774272.0 0.0 +8770813952.0 0.0 +9078013952.0 0.0 +9385213952.0 0.0 +9692413952.0 0.0 +9999613952.0 0.0 diff --git a/tests/manual/com/raytheon/edex/meteoLib/ControllerTest.java b/tests/manual/com/raytheon/edex/meteoLib/ControllerTest.java deleted file mode 100644 index 77f60c247c..0000000000 --- a/tests/manual/com/raytheon/edex/meteoLib/ControllerTest.java +++ /dev/null @@ -1,102 +0,0 @@ -/** - * This software was developed and / or modified by Raytheon Company, - * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * - * U.S. EXPORT CONTROLLED TECHNICAL DATA - * This software product contains export-restricted data whose - * export/transfer/disclosure is restricted by U.S. law. Dissemination - * to non-U.S. persons whether in the United States or abroad requires - * an export license or other authorization. - * - * Contractor Name: Raytheon Company - * Contractor Address: 6825 Pine Street, Suite 340 - * Mail Stop B8 - * Omaha, NE 68106 - * 402.291.0100 - * - * See the AWIPS II Master Rights File ("Master Rights File.pdf") for - * further licensing information. - **/ -package com.raytheon.edex.meteoLib; - -import static org.junit.Assert.fail; - -import org.junit.Ignore; -import org.junit.Test; - -// TODO fix? -@Ignore -public class ControllerTest { - // TODO - This doesn't work with jenkins builds - static { - System.loadLibrary("meteoLib"); - } - - @Ignore - @Test - public void testScaleless_analysis() { - - float[] xind = { 3, 16, 16, 3 }; - float[] yind = { 3, 3, 16, 16 }; - float[] values = { 1, 2, 3, 4 }; - - int nx = 20; - int ny = 20; - float[] grid = new float[nx * ny]; - - Controller.scaleless_analysis(xind, yind, values, values.length, nx, - ny, grid); - - for (int j = 0; j < ny; j++) { - for (int i = 0; i < nx; i++) { - System.out.print(String.format("%.3f ", grid[j * nx + i])); - } - System.out.println(); - } - fail("Need known test inputs/outputs"); - } - - @Ignore - @Test - public void testDist_filter() { - - int mnx = 20; - int mny = 20; - float[] input = new float[mnx * mny]; - for (int j = 0; j < mny; j++) { - for (int i = 0; i < mnx; i++) { - input[j * mnx + i] = (i == j ? i : 0); - } - } - - int nx = mnx - 10; - int ny = mny - 10; - int xoff = 5; - int yoff = 5; - float[] output = Controller.dist_filter(input, 1, mnx, xoff, yoff, nx, - ny); - - System.out.println(); - for (int j = 0; j < mny; j++) { - for (int i = 0; i < mnx; i++) { - System.out.print(String.format("%.3g ", output[j * mnx + i])); - } - System.out.println(); - } - - nx = mnx; - ny = mny; - xoff = 0; - yoff = 0; - output = Controller.dist_filter(input, 3, mnx, xoff, yoff, nx, ny); - - System.out.println(); - for (int j = 0; j < mny; j++) { - for (int i = 0; i < mnx; i++) { - System.out.print(String.format("%.3g ", output[j * mnx + i])); - } - System.out.println(); - } - fail("Need known test inputs/outputs"); - } -} diff --git a/tests/manual/com/raytheon/uf/common/wxmath/TestCalcRH.java b/tests/manual/com/raytheon/uf/common/wxmath/TestCalcRH.java deleted file mode 100644 index aa18dc38ff..0000000000 --- a/tests/manual/com/raytheon/uf/common/wxmath/TestCalcRH.java +++ /dev/null @@ -1,115 +0,0 @@ -/** - * This software was developed and / or modified by Raytheon Company, - * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * - * U.S. EXPORT CONTROLLED TECHNICAL DATA - * This software product contains export-restricted data whose - * export/transfer/disclosure is restricted by U.S. law. Dissemination - * to non-U.S. persons whether in the United States or abroad requires - * an export license or other authorization. - * - * Contractor Name: Raytheon Company - * Contractor Address: 6825 Pine Street, Suite 340 - * Mail Stop B8 - * Omaha, NE 68106 - * 402.291.0100 - * - * See the AWIPS II Master Rights File ("Master Rights File.pdf") for - * further licensing information. - **/ -package com.raytheon.uf.common.wxmath; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - -import org.junit.BeforeClass; -import org.junit.Test; - -import com.raytheon.edex.meteoLib.Controller; - -/** - * Test for {@link com.raytheon.uf.common.wxmath.CalcRH} - * - *
- * 
- * SOFTWARE HISTORY
- * 
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Aug 14, 2013  #2262     dgilling     Initial creation
- * 
- * 
- * - * @author dgilling - * @version 1.0 - */ - -public class TestCalcRH { - - @BeforeClass - public static void setUpBeforeClass() throws Exception { - System.loadLibrary("meteoLib"); - } - - @Test - public void testDegreesC() { - float[] tempArray = new float[1]; - float[] dewptArray = new float[1]; - int iDim = 1; - int jDim = 1; - int nDim = 1; - - for (float temp = -10.0f; temp <= 80.0f; temp += 5.5f) { - for (float dewpoint = 0.0f; dewpoint <= 80.0f; dewpoint += 1.25f) { - tempArray[0] = temp; - dewptArray[0] = dewpoint; - float[] legacyResult = Controller.calcrh(tempArray, dewptArray, - nDim, iDim, jDim); - float portResult = CalcRH.calcrh(temp, dewpoint); - - assertEquals("Ported calcrh does not match legacy for temp= " - + temp + ", dewpt= " + dewpoint, legacyResult[0], - portResult, 0.005f); - } - } - } - - @Test - public void testDegreesK() { - float[] tempArray = new float[1]; - float[] dewptArray = new float[1]; - int iDim = 1; - int jDim = 1; - int nDim = 1; - - for (float temp = 263.15f; temp <= 373.15f; temp += 5.5f) { - for (float dewpoint = 273.15f; dewpoint <= 333.15f; dewpoint += 1.25f) { - tempArray[0] = temp; - dewptArray[0] = dewpoint; - float[] legacyResult = Controller.calcrh(tempArray, dewptArray, - nDim, iDim, jDim); - float portResult = CalcRH.calcrh(temp, dewpoint); - - assertEquals("Ported calcrh does not match legacy for temp= " - + temp + ", dewpt= " + dewpoint, legacyResult[0], - portResult, 0.005f); - } - } - } - - @Test - public void testTempOutsideRange() { - float temperature = 1.0e06f; - float dewpoint = 40f; - float portResult = CalcRH.calcrh(temperature, dewpoint); - assertTrue(Float.isNaN(portResult)); - } - - @Test - public void testDewPtOutsideRange() { - float temperature = 40f; - float dewpoint = 1.0e06f; - float portResult = CalcRH.calcrh(temperature, dewpoint); - assertTrue(Float.isNaN(portResult)); - } -} diff --git a/tests/unit/com/raytheon/uf/common/wxmath/TestCalcRH.java b/tests/unit/com/raytheon/uf/common/wxmath/TestCalcRH.java new file mode 100644 index 0000000000..1cefbe7801 --- /dev/null +++ b/tests/unit/com/raytheon/uf/common/wxmath/TestCalcRH.java @@ -0,0 +1,106 @@ +/** + * This software was developed and / or modified by Raytheon Company, + * pursuant to Contract DG133W-05-CQ-1067 with the US Government. + * + * U.S. EXPORT CONTROLLED TECHNICAL DATA + * This software product contains export-restricted data whose + * export/transfer/disclosure is restricted by U.S. law. Dissemination + * to non-U.S. persons whether in the United States or abroad requires + * an export license or other authorization. + * + * Contractor Name: Raytheon Company + * Contractor Address: 6825 Pine Streetf, Suite 340 + * Mail Stop B8 + * Omahaf, NE 68106 + * 402.291.0100 + * + * See the AWIPS II Master Rights File ("Master Rights File.pdf") for + * further licensing information. + **/ +package com.raytheon.uf.common.wxmath; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileReader; +import java.io.IOException; + +import org.junit.Test; + +/** + * Test for {@link com.raytheon.uf.common.wxmath.CalcRH} + * + *
+ * 
+ * SOFTWARE HISTORY
+ * 
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * Aug 14f, 2013  #2262     dgilling     Initial creation
+ * 
+ * 
+ * + * @author dgilling + * @version 1.0 + */ + +public class TestCalcRH { + + private static final File DATA_FILE = new File("./data/WxMath/CalcRH.tab"); + + @Test + public void testDegreesC() throws IOException { + BufferedReader reader = new BufferedReader(new FileReader(DATA_FILE)); + // Discard header + reader.readLine(); + for (String line = reader.readLine(); line != null; line = reader + .readLine()) { + String[] values = line.split("\t"); + float temp = Float.parseFloat(values[0]); + float dewpoint = Float.parseFloat(values[1]); + float expected = Float.parseFloat(values[2]); + float result = CalcRH.calcrh(temp, dewpoint); + assertEquals("CalcRH does not match expected for temp= " + temp + + "f, dewpt= " + dewpoint, expected, result, 0.005f); + + } + reader.close(); + } + + @Test + public void testDegreesK() throws IOException { + BufferedReader reader = new BufferedReader(new FileReader(DATA_FILE)); + // Discard header + reader.readLine(); + for (String line = reader.readLine(); line != null; line = reader + .readLine()) { + String[] values = line.split("\t"); + float temp = Float.parseFloat(values[0]) + 273.15f; + float dewpoint = Float.parseFloat(values[1]) + 273.15f; + float expected = Float.parseFloat(values[2]); + float result = CalcRH.calcrh(temp, dewpoint); + assertEquals("CalcRH does not match expected for temp= " + temp + + "f, dewpt= " + dewpoint, expected, result, 0.005f); + + } + reader.close(); + } + + @Test + public void testTempOutsideRange() { + float temperature = 1.0e06f; + float dewpoint = 40f; + float portResult = CalcRH.calcrh(temperature, dewpoint); + assertTrue(Float.isNaN(portResult)); + } + + @Test + public void testDewPtOutsideRange() { + float temperature = 40f; + float dewpoint = 1.0e06f; + float portResult = CalcRH.calcrh(temperature, dewpoint); + assertTrue(Float.isNaN(portResult)); + } +} diff --git a/tests/manual/com/raytheon/uf/common/wxmath/TestHgt2Pres.java b/tests/unit/com/raytheon/uf/common/wxmath/TestHgt2Pres.java similarity index 63% rename from tests/manual/com/raytheon/uf/common/wxmath/TestHgt2Pres.java rename to tests/unit/com/raytheon/uf/common/wxmath/TestHgt2Pres.java index 685b12719c..aa9e35f94b 100644 --- a/tests/manual/com/raytheon/uf/common/wxmath/TestHgt2Pres.java +++ b/tests/unit/com/raytheon/uf/common/wxmath/TestHgt2Pres.java @@ -22,10 +22,12 @@ package com.raytheon.uf.common.wxmath; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; -import org.junit.BeforeClass; -import org.junit.Test; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileReader; +import java.io.IOException; -import com.raytheon.edex.meteoLib.Controller; +import org.junit.Test; /** * Test for {@link com.raytheon.uf.common.wxmath.Hgt2Pres} @@ -46,20 +48,24 @@ import com.raytheon.edex.meteoLib.Controller; public class TestHgt2Pres { - @BeforeClass - public static void setUpBeforeClass() throws Exception { - System.loadLibrary("meteoLib"); - } + private static final File DATA_FILE = new File("./data/WxMath/Hgt2Pres.tab"); @Test - public void testHgt2PresInRange() { - for (float height = -1000; height < 1.0e06f; height += 12.25f) { - float legacyResult = Controller.hgt2pres(height); - float portResult = Hgt2Pres.hgt2pres(height); + public void testHgt2PresInRange() throws IOException { + BufferedReader reader = new BufferedReader(new FileReader(DATA_FILE)); + // Discard header + reader.readLine(); + for (String line = reader.readLine(); line != null; line = reader + .readLine()) { + String[] values = line.split("\t"); + float height = Float.parseFloat(values[0]); + float expected = Float.parseFloat(values[1]); + float result = Hgt2Pres.hgt2pres(height); + assertEquals("Hgt2Pres does not match expected for height= " + + height, expected, result, 0.05f); - assertEquals("Ported hgt2pres does not match legacy for height= " - + height, legacyResult, portResult, 0.05f); } + reader.close(); } @Test diff --git a/tests/manual/com/raytheon/uf/common/wxmath/TestPToZsa.java b/tests/unit/com/raytheon/uf/common/wxmath/TestPToZsa.java similarity index 61% rename from tests/manual/com/raytheon/uf/common/wxmath/TestPToZsa.java rename to tests/unit/com/raytheon/uf/common/wxmath/TestPToZsa.java index 48b1bc5d49..197e127ed2 100644 --- a/tests/manual/com/raytheon/uf/common/wxmath/TestPToZsa.java +++ b/tests/unit/com/raytheon/uf/common/wxmath/TestPToZsa.java @@ -22,10 +22,12 @@ package com.raytheon.uf.common.wxmath; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; -import org.junit.BeforeClass; -import org.junit.Test; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileReader; +import java.io.IOException; -import com.raytheon.edex.meteoLib.Controller; +import org.junit.Test; /** * Test for {@link com.raytheon.uf.common.wxmath.PToZsa} @@ -46,31 +48,24 @@ import com.raytheon.edex.meteoLib.Controller; public class TestPToZsa { - @BeforeClass - public static void setUpBeforeClass() throws Exception { - System.loadLibrary("meteoLib"); - } + private static final File DATA_FILE = new File("./data/WxMath/PToZsa.tab"); @Test - public final void testPToZsaInRangeLow() { - for (float pressure = 1.0f; pressure <= 1e05f; pressure += 12.25f) { - float legacyResult = Controller.ptozsa(pressure); - float portResult = PToZsa.ptozsa(pressure); + public final void testPToZsaInRange() throws IOException { + BufferedReader reader = new BufferedReader(new FileReader(DATA_FILE)); + // Discard header + reader.readLine(); + for (String line = reader.readLine(); line != null; line = reader + .readLine()) { + String[] values = line.split("\t"); + float pressure = Float.parseFloat(values[0]); + float expected = Float.parseFloat(values[1]); + float result = PToZsa.ptozsa(pressure); + assertEquals("PToZsa does not match expected for pressure= " + + pressure, expected, result, 0.005 + pressure / 100000); - assertEquals("Ported ptozsa does not match legacy for pressure= " - + pressure, legacyResult, portResult, 0.05f); - } - } - - @Test - public final void testPToZsaInRangeHigh() { - for (float pressure = 1e05f; pressure <= 1e10f; pressure += 2253.33f) { - float legacyResult = Controller.ptozsa(pressure); - float portResult = PToZsa.ptozsa(pressure); - - assertEquals("Ported ptozsa does not match legacy for pressure= " - + pressure, legacyResult, portResult, 0.5f); } + reader.close(); } @Test diff --git a/tests/manual/com/raytheon/uf/common/wxmath/TestScaleless.java b/tests/unit/com/raytheon/uf/common/wxmath/TestScaleless.java similarity index 100% rename from tests/manual/com/raytheon/uf/common/wxmath/TestScaleless.java rename to tests/unit/com/raytheon/uf/common/wxmath/TestScaleless.java diff --git a/tests/manual/com/raytheon/uf/common/wxmath/TestZToPsa.java b/tests/unit/com/raytheon/uf/common/wxmath/TestZToPsa.java similarity index 59% rename from tests/manual/com/raytheon/uf/common/wxmath/TestZToPsa.java rename to tests/unit/com/raytheon/uf/common/wxmath/TestZToPsa.java index 5aa42846e3..fe34c5cb37 100644 --- a/tests/manual/com/raytheon/uf/common/wxmath/TestZToPsa.java +++ b/tests/unit/com/raytheon/uf/common/wxmath/TestZToPsa.java @@ -22,10 +22,12 @@ package com.raytheon.uf.common.wxmath; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; -import org.junit.BeforeClass; -import org.junit.Test; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileReader; +import java.io.IOException; -import com.raytheon.edex.meteoLib.Controller; +import org.junit.Test; /** * Test for {@link com.raytheon.uf.common.wxmath.ZToPsa} @@ -46,31 +48,25 @@ import com.raytheon.edex.meteoLib.Controller; public class TestZToPsa { - @BeforeClass - public static void setUpBeforeClass() throws Exception { - System.loadLibrary("meteoLib"); - } + private static final File DATA_FILE = new File("./data/WxMath/ZToPsa.tab"); @Test - public final void testZToPsaInRangeLow() { - for (float height = -1000; height < 1.0e06f; height += 12.25f) { - float legacyResult = Controller.ztopsa(height); - float portResult = ZToPsa.ztopsa(height); + public final void testZToPsaInRange() throws IOException { + BufferedReader reader = new BufferedReader(new FileReader(DATA_FILE)); + // Discard header + reader.readLine(); + for (String line = reader.readLine(); line != null; line = reader + .readLine()) { + String[] values = line.split("\t"); + float height = Float.parseFloat(values[0]); + float expected = Float.parseFloat(values[1]); + float result = ZToPsa.ztopsa(height); + assertEquals( + "ZToPsa does not match expected for height= " + height, + expected, result, 0.05f); - assertEquals("Ported ptozsa does not match legacy for height= " - + height, legacyResult, portResult, 0.05f); - } - } - - @Test - public final void testZToPsaInRangeHigh() { - for (float height = 1.0e06f; height < 1.0e10f; height += 2253.33f) { - float legacyResult = Controller.ztopsa(height); - float portResult = ZToPsa.ztopsa(height); - - assertEquals("Ported ptozsa does not match legacy for height= " - + height, legacyResult, portResult, 0.5f); } + reader.close(); } @Test diff --git a/tests/manual/com/raytheon/uf/common/wxmath/package-info.java b/tests/unit/com/raytheon/uf/common/wxmath/package-info.java similarity index 72% rename from tests/manual/com/raytheon/uf/common/wxmath/package-info.java rename to tests/unit/com/raytheon/uf/common/wxmath/package-info.java index bcc47ef88b..818dd3fb00 100644 --- a/tests/manual/com/raytheon/uf/common/wxmath/package-info.java +++ b/tests/unit/com/raytheon/uf/common/wxmath/package-info.java @@ -35,11 +35,4 @@ * @version 1.0 */ -package com.raytheon.uf.common.wxmath; - -// TODO -// FIXME: Because this common plugin is only part of a viz feature at the -// moment, it does not work with the current auto-test framework, which only -// tests EDEX plugins and plugins referenced by EDEX features. If either this -// plugin becomes part of an EDEX feature or the auto test framework is able to -// test viz code, this package should be moved to /tests/unit/. \ No newline at end of file +package com.raytheon.uf.common.wxmath; \ No newline at end of file