Issue #2262 Delete meteolib.

Former-commit-id: 125546e4da877fbb732b9fa40c68b08bc764f8e0
This commit is contained in:
Ben Steffensmeier 2013-08-28 14:53:28 -05:00
parent 79c3b08e64
commit 0961408d40
237 changed files with 4823 additions and 34832 deletions

View file

@ -96,10 +96,6 @@
<copy todir="${buildDirectory}/plugins">
<fileset dir="${buildDirectory}/../../../" includes="ohd*/**"/>
</copy>
<echo message="meteolib.*/**"/>
<copy todir="${buildDirectory}/plugins">
<fileset dir="${buildDirectory}/../../../" includes="meteolib.*/**"/>
</copy>
<echo message="javax.*/**"/>
<copy todir="${buildDirectory}/plugins">
<fileset dir="${buildDirectory}/../../../" includes="javax.*/**"/>

View file

@ -96,10 +96,6 @@
<copy todir="${buildDirectory}/plugins">
<fileset dir="${buildDirectory}/../../../" includes="ohd*/**"/>
</copy>
<echo message="meteolib.*/**"/>
<copy todir="${buildDirectory}/plugins">
<fileset dir="${buildDirectory}/../../../" includes="meteolib.*/**"/>
</copy>
<echo message="javax.*/**"/>
<copy todir="${buildDirectory}/plugins">
<fileset dir="${buildDirectory}/../../../" includes="javax.*/**"/>

View file

@ -92,12 +92,6 @@
includes="ohd*/**" />
</copy>
<echo message="PLUGINS: meteolib.*/**" />
<copy todir="${basedir}/cave/p2/plugins">
<fileset dir="${workspace.dir}"
includes="meteolib.*/**" />
</copy>
<echo message="PLUGINS: javax.*/**" />
<copy todir="${basedir}/cave/p2/plugins">
<fileset dir="${workspace.dir}"

View file

@ -84,12 +84,6 @@
includes="ohd*/**" />
</copy>
<echo message="PLUGINS: meteolib.*/**" />
<copy todir="${basedir}/cave/p2/plugins">
<fileset dir="${workspace.dir}"
includes="meteolib.*/**" />
</copy>
<echo message="PLUGINS: javax.*/**" />
<copy todir="${basedir}/cave/p2/plugins">
<fileset dir="${workspace.dir}"

View file

@ -64,13 +64,6 @@
version="0.0.0"
unpack="false"/>
<plugin
id="com.raytheon.edex.meteolib"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="com.raytheon.uf.edex.site"
download-size="0"
@ -119,39 +112,6 @@
version="0.0.0"
unpack="false"/>
<plugin
id="meteolib.jni"
download-size="0"
install-size="0"
version="0.0.0"/>
<plugin
id="meteolib.jni.linux32"
os="linux"
arch="x86"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"/>
<plugin
id="meteolib.jni.linux64"
os="linux"
arch="x86_64"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"/>
<plugin
id="meteolib.jni.win32"
os="win32"
arch="x86"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"/>
<plugin
id="javax.servlet"
download-size="0"

View file

@ -26,7 +26,9 @@ package com.raytheon.uf.viz.core.status;
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Oct 6, 2008 1433 chammack Initial creation
* Oct 06, 2008 1433 chammack Initial creation
* Aug 28, 2013 2262 bsteffen Remove meteolib category.
*
* </pre>
*
* @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";
}

View file

@ -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
return P

View file

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View file

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.raytheon.edex.meteolib</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View file

@ -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

View file

@ -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

View file

@ -1,4 +0,0 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.

View file

@ -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;
}
}

View file

@ -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
*
* <pre>
*
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Dec 10, 2008 mnash Initial creation
*
* </pre>
*
* @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();
}
}
}

View file

@ -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
*
* <pre>
*
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Feb 16, 2010 #4502 jelkins Initial creation
*
* </pre>
*
* @author jelkins
* @version 1.0
*/
public class MeteoLibUtil {
public static String getSoPath() throws IOException {
return Activator.getNativeLibraryPath();
}
}

View file

@ -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;
}
}

View file

@ -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;
}
}

View file

@ -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
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* June 12, 2008 S Manoj Initial Creation.
*
* </pre>
*
* @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;
}
}

View file

@ -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;
}
}

View file

@ -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;
}
}

View file

@ -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;
}
}

View file

@ -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;
}
}

View file

@ -154,45 +154,4 @@
version="0.0.0"
unpack="false"/>
<plugin
id="com.raytheon.edex.meteolib"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="meteolib.jni"
download-size="0"
install-size="0"
version="0.0.0"/>
<plugin
id="meteolib.jni.linux32"
os="linux"
arch="x86"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"/>
<plugin
id="meteolib.jni.linux64"
os="linux"
arch="x86_64"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"/>
<plugin
id="meteolib.jni.win32"
os="win32"
arch="x86"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"/>
</feature>

View file

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View file

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>meteolib.jni.linux32</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View file

@ -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

View file

@ -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))

View file

@ -1,4 +0,0 @@
bin.includes = META-INF/,\
.,\
libmeteoLib.so
src.includes = libmeteoLib.so

View file

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View file

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>meteolib.jni.linux64</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View file

@ -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

View file

@ -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))

View file

@ -1,4 +0,0 @@
bin.includes = META-INF/,\
.,\
libmeteoLib.so
src.includes = libmeteoLib.so

View file

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View file

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>meteolib.jni.win32</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View file

@ -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

View file

@ -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))

View file

@ -1,3 +0,0 @@
bin.includes = META-INF/,\
.,\
meteoLib.dll

View file

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry exported="true" kind="lib" path="gluegen-rt.jar" sourcepath="/com.raytheon.edex.meteolib/com.raytheon.edex.meteolibsrc.zip"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View file

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>meteolib.jni</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View file

@ -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

View file

@ -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

View file

@ -1,5 +0,0 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
gluegen-rt.jar

Binary file not shown.

View file

@ -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<URL> 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;
}
}

View file

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- ======================================================================
Oct 5, 2009 11:26:05 AM
Update meteoLib.jni
jelkins
====================================================================== -->
<project name="project" default="default">
<description>
Update the so and the java from the files built through the native
library build system.
</description>
<target name="default" description="description">
<fail message="This script is being updated by bkowal to be compatible with the 32-bit / 64-bit plugin split." />
<copy file="../build.native/i386-pc-linux-gnu/lib/libmeteoLib.so" tofile="./libmeteoLib.so"/>
<copy todir="./src">
<fileset dir="../rary.meteorological/i386-pc-linux-gnu.debug-sysv/gluegen/meteoLib_Java"/>
</copy>
</target>
</project>

View file

@ -1,504 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?>
<cproject>
<storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="cdt.managedbuild.config.gnu.so.debug.630675783.1284293642">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.so.debug.630675783.1284293642" moduleId="org.eclipse.cdt.core.settings" name="i386-pc-linux-gnu.debug">
<externalSettings>
<externalSetting>
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/rary.meteorlogical"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/rary.meteorological"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/rary.meteorlogical/Debug"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/rary.meteorological/Debug"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/rary.meteorological/i386-pc-linux-gnu.debug"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/rary.meteorological/i386-pc-linux-gnu.debug-sysv"/>
</externalSetting>
</externalSettings>
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="so" artifactName="meteoLib" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.sharedLib" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.sharedLib" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.so.debug.630675783.1284293642" name="i386-pc-linux-gnu.debug" parent="cdt.managedbuild.config.gnu.so.debug" postbuildStep="">
<folderInfo id="cdt.managedbuild.config.gnu.so.debug.630675783.1284293642." name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.so.debug.1093377288" name="Linux GCC" nonInternalBuilderId="cdt.managedbuild.target.gnu.builder.so.debug" superClass="cdt.managedbuild.toolchain.gnu.so.debug">
<targetPlatform id="cdt.managedbuild.target.gnu.platform.so.debug.2105139476" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.so.debug"/>
<builder buildPath="${workspace_loc:/rary.meteorological/i386-pc-linux-gnu.debug-sysv}" id="cdt.managedbuild.target.gnu.builder.so.debug.1978638146" keepEnvironmentInBuildfile="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="2" superClass="cdt.managedbuild.target.gnu.builder.so.debug"/>
<tool id="cdt.managedbuild.tool.gnu.archiver.base.890216757" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.so.debug.413904470" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.so.debug">
<option id="gnu.cpp.compiler.so.debug.option.optimization.level.311725972" name="Optimization Level" superClass="gnu.cpp.compiler.so.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
<option id="gnu.cpp.compiler.so.debug.option.debugging.level.2112502476" name="Debug Level" superClass="gnu.cpp.compiler.so.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
</tool>
<tool command="../../build.native/tools/compile.sh" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG}${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" id="cdt.managedbuild.tool.gnu.c.compiler.so.debug.297904307" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.so.debug">
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.so.debug.option.optimization.level.1687235164" name="Optimization Level" superClass="gnu.c.compiler.so.debug.option.optimization.level" valueType="enumerated"/>
<option id="gnu.c.compiler.so.debug.option.debugging.level.33999297" name="Debug Level" superClass="gnu.c.compiler.so.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
<option id="gnu.c.compiler.option.include.paths.813632318" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="../inc"/>
<listOptionValue builtIn="false" value="../../build.native/i386-pc-linux-gnu/usr/java/include"/>
<listOptionValue builtIn="false" value="../../build.native/i386-pc-linux-gnu/usr/java/include/linux"/>
</option>
<option id="gnu.c.compiler.option.misc.other.349923455" name="Other flags" superClass="gnu.c.compiler.option.misc.other" value="-c -fmessage-length=0 -fno-underscoring -fPIC" valueType="string"/>
<option id="gnu.c.compiler.option.preprocessor.def.symbols.943379947" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols"/>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.2107554933" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>
<tool command="../../build.native/tools/link.sh" commandLinePattern="${COMMAND} gfortran ${FLAGS} ${OUTPUT_FLAG}${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" id="cdt.managedbuild.tool.gnu.c.linker.so.debug.1336318422" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.so.debug">
<option defaultValue="true" id="gnu.c.link.so.debug.option.shared.1310562192" name="Shared (-shared)" superClass="gnu.c.link.so.debug.option.shared" valueType="boolean"/>
<option id="gnu.c.link.option.ldflags.1284735803" name="Linker flags" superClass="gnu.c.link.option.ldflags" value="--hash-style=sysv" valueType="string"/>
<option id="gnu.c.link.option.other.1027753275" name="Other options (-Xlinker [option])" superClass="gnu.c.link.option.other" valueType="stringList">
<listOptionValue builtIn="false" value="-z"/>
<listOptionValue builtIn="false" value="defs"/>
</option>
<option id="gnu.c.link.option.paths.1767979511" name="Library search path (-L)" superClass="gnu.c.link.option.paths" valueType="libPaths">
<listOptionValue builtIn="false" value="../../build.native/i386-pc-linux-gnu/lib"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.449605045" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType>
<outputType id="cdt.managedbuild.tool.gnu.c.linker.so.debug.output.1196467060" outputPrefix="../../build.native/i386-pc-linux-gnu/lib/lib" superClass="cdt.managedbuild.tool.gnu.c.linker.so.debug.output"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.so.debug.1984555167" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.so.debug">
<option defaultValue="true" id="gnu.cpp.link.so.debug.option.shared.943005465" name="Shared (-shared)" superClass="gnu.cpp.link.so.debug.option.shared" valueType="boolean"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.assembler.so.debug.770943500" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.so.debug">
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.120763515" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
</tool>
</toolChain>
</folderInfo>
<sourceEntries>
<entry excluding="src" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name=""/>
<entry excluding="parcel.f" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.so.debug.630675783;cdt.managedbuild.config.gnu.so.debug.630675783.;cdt.managedbuild.tool.gnu.c.compiler.so.debug.754334125;cdt.managedbuild.tool.gnu.c.compiler.input.2036189497">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.so.debug.630675783.1284293642;cdt.managedbuild.config.gnu.so.debug.630675783.1284293642.;cdt.managedbuild.tool.gnu.c.compiler.so.debug.297904307;cdt.managedbuild.tool.gnu.c.compiler.input.2107554933">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.so.debug.630675783;cdt.managedbuild.config.gnu.so.debug.630675783.1325853958;cdt.managedbuild.tool.gnu.c.compiler.so.debug.765709754;cdt.managedbuild.tool.gnu.c.compiler.input.2083746755">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.so.release.856380427;cdt.managedbuild.config.gnu.so.release.856380427.;cdt.managedbuild.tool.gnu.c.compiler.so.release.715137914;cdt.managedbuild.tool.gnu.c.compiler.input.1104932888">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="rary.meteorlogical.cdt.managedbuild.target.gnu.so.212071584" name="Shared Library" projectType="cdt.managedbuild.target.gnu.so"/>
</storageModule>
</cproject>

View file

@ -1 +0,0 @@
/i386-pc-linux-gnu.debug

View file

@ -1,84 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>rary.meteorological</name>
<comment></comment>
<projects>
<project>build.native</project>
<project>rary.cots.java</project>
<project>tool.gluegen</project>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,full,incremental,</triggers>
<arguments>
<dictionary>
<key>?name?</key>
<value></value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.append_environment</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
<value>all</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildArguments</key>
<value>-j2</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildCommand</key>
<value>make</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildLocation</key>
<value>${workspace_loc:/rary.meteorological/i386-pc-linux-gnu.debug-sysv}</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
<value>clean</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.contents</key>
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
<value>false</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
<value>all</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.stopOnError</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
<value>true</value>
</dictionary>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.core.cnature</nature>
</natures>
</projectDescription>

View file

@ -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

View file

@ -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

View file

@ -1,10 +0,0 @@
/*
<gluegen_config>
Package com.raytheon.edex.meteolibrary
Style AllStatic
JavaClass Meteolibrary
CustomCCode #include "meteoLib.h"
</gluegen_config>
*/
#include "meteoLib.h"

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -1,14 +0,0 @@
#include "meteoLib.h"
#include <math.h>
/* 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));
}

View file

@ -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

View file

@ -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

View file

@ -1,37 +0,0 @@
#include "meteoLib.h"
#include <math.h>
#include <stdio.h>
/* ------------------------------------------------------------------
** 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;
}

View file

@ -1,31 +0,0 @@
# include "meteoLib.h"
# include <math.h>
/* -----------------------------------------------------------------
** 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 */
}

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -1,70 +0,0 @@
#include <stdio.h>
# 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<numOfLevel; i++ )
{
if ( press[i] == 850 )
{
temp850 = temp[i];
td850 = td[i];
}
else if ( press[i] < 850 && temp850 == 0 )
{
if ( i == 0 )
{
interp ( press[0], press[1], temp[0], temp[1], td[0],
td[1], 850, &temp850, &td850 );
}
else
{
interp ( press[i-1], press[i], temp[i-1], temp[i],
td[i-1], td[i], 850, &temp850, &td850 );
}
}
else if ( press[i] == 700 )
{
temp700 = temp[i];
td700 = td[i];
}
else if ( press[i] < 700 && temp700 == 0 )
{
interp ( press[i-1], press[i], temp[i-1], temp[i], td[i-1], td[i],
700, &temp700, &td700 );
}
else if ( press[i] == 500 )
{
temp500 = temp[i];
}
else if ( press[i] < 500 && temp500 == 0 )
{
interp ( press[i-1], press[i], temp[i-1], temp[i], td[i-1], td[i],
500, &temp500, &td500 );
}
}
*K = temp850 + td850 - temp500 - ( temp700 - td700 );
*K = *K - 273.15;
return;
}

View file

@ -1,60 +0,0 @@
c
subroutine calcLI(p,t,rh,t5,p5,mni,ni,nj,LI)
c
c...............................................................................
c
c Routine to calculate lifted index from the pressure,
c temperature, and relative humidity and 500mb temp.
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 t RA I Temperature at 500mb (K)
c p5 R I Upper pressure, normally 500mb
c mni I I First dimension of input array.
c ni,nj I I Grid dimensions in i,j.
c LI RA O Lifted Index (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 p(mni,nj), t(mni,nj), rh(mni,nj), t5(mni,nj), p5
real LI(mni,nj),tc,b,tp,tdp,rhqc,eee,pc,w
real Flag,Flg
real adiabatic_te, temp_of_te
Data Flag,Flg/1e37,99998.0/
do 20 j=1,nj
do 20 i=1,ni
if (p(i,j).gt.flg .or. rh(i,j).gt.flg .or.
& t(i,j).gt.flg .or. t5(i,j).gt.flg .or. p(i,j).lt.p5) then
LI(i,j)=flag
else
tp=t(i,j)
rhqc=amin1(100.0,amax1(1.0,rh(i,j)))
eee=rhqc*exp(22.05565-0.0091379024*tp-6106.396/tp)
b=26.66082-alog(eee)
tdp=(b-sqrt(b*b-223.1986))/0.0182758048
tc=tdp-(tp-tdp)*(-0.37329638+41.178204/tp+0.0015945203*tdp)
pc=p(i,j)*(tc/tp)**3.498257
if (pc.le.p5) Then
LI(i,j)=t5(i,j)-tp*(p5/p(i,j))**0.286
else
tc=adiabatic_te(tc,pc)*(p5/pc)**0.286
LI(i,j)=t5(i,j)-temp_of_te(tc,p5)
end if
end if
20 continue
return
end

View file

@ -1,81 +0,0 @@
c
c
subroutine calcpv(p_up,p_low,o_up,o_low,pvort,mni,ni,nj,
& u_up,v_up,u_low,v_low,avort1,avort2,
& dx,dy,coriolis)
c
c...............................................................................
c
c Routine to calculate the isentropic potential vorticity 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 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 (/s)
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 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.
c
c 3. The PV is then [mean abs. vort.]/[stability]
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)
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 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 isentropic 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 isentropic stability through the layer. (hold in pvort)
c
call isen_stability(p_up,p_low,o_up,o_low,pvort,mni,ni,nj)
c
c..... Now calculate the isentropic potential vorticity.
c
do 1 j=1,nj
do 1 i=1,ni
if (pvort(i,j).gt.bad .or.
& avort1(i,j).gt.bad .or. avort2(i,j).gt.bad) then
pvort(i,j) = flag
else
pvort(i,j) = (avort1(i,j) + avort2(i,j)) * 0.5 / pvort(i,j)
endif
1 continue
c
return
end

View file

@ -1,52 +0,0 @@
c
subroutine calcrh(t,td,mni,ni,nj,rh)
c
c..............................................................................
c
c Routine to calculate relative from humidity temperature, and dewpoint.
c
c Changes:
c J. Ramer 10-31-90 Stole framework from calctd.
c
c Inputs/Outputs:
c
c Variable Var Type I/O Description
c ---------- ---------- ----- -------------
c t RA I Temperature (C or K)
c td RA I Dewpoint (same as temp)
c mni I I First dimension of input array.
c ni,nj I I Grid dimensions in i,j.
c rh RA O Relative humidity [range: 0. - 100.]
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), td(mni,nj)
real rh(mni,nj)
real t1,td1
real flg,flag,b,c,k0
Data flg,flag,b,c,k0/99998.0,1e37,0.0091379024,6106.396,273.15/
Do 10 j=1,nj
Do 10 i=1,ni
If (td(i,j).gt.flg .or. t(i,j).gt.flg) then
rh(i,j)=flag
Else If (t(i,j).lt.80.0) Then
t1=t(i,j)+k0
td1=td(i,j)+k0
rh(i,j)=100.0*exp(b*(t1-td1)+c/t1-c/td1)
Else
t1=t(i,j)
td1=td(i,j)
rh(i,j)=100.0*exp(b*(t1-td1)+c/t1-c/td1)
End If
10 Continue
return
end

View file

@ -1,53 +0,0 @@
c
subroutine calcrh2(p,t,q,mni,ni,nj,rh)
c
c..............................................................................
c
c Routine to calculate relative from humidity temperature, and dewpoint.
c
c Changes:
c J. Ramer 10-31-90 Stole framework from calcrh2.
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 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 rh RA O Relative humidity [range: 0. - 100.]
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), q(mni,nj)
real rh(mni,nj)
real flg,flag,a,b,c,eee
Data flg,flag/99998.,1e37/
c Constants a, b and c from esat.f, except a is less by ln(100) to give
c RH in percent.
Data a,b,c/22.05565,0.0091379024,6106.3960/
c first calculate vapor pressure (epsilon is 622 instead of 0.622 because
c q is in g/Kg) then RH in percent.
Do 10 j=1,nj
Do 10 i=1,ni
If (p(i,j).gt.flg .or. t(i,j).gt.flg .or. q(i,j).gt.flg) then
rh(i,j)=flag
Else
eee=p(i,j)*q(i,j)/(622.0+0.378*q(i,j))
rh(i,j)=eee/exp(a-b*t(i,j)-c/t(i,j))
End If
10 Continue
return
end

View file

@ -1,49 +0,0 @@
c
subroutine calctd(t,rh,mni,ni,nj,td)
c
c..............................................................................
c
c Routine to calculate dewpoint from temperature, and relative humidity.
c
c Changes:
c J. Ramer 08-27-90 Stole framework from spechum.
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 td RA O dewpoints. (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 t(mni,nj), rh(mni,nj)
real td(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
td(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)
td(i,j)=(b-sqrt(b*b-223.1986))/0.0182758048
End If
10 Continue
return
end

View file

@ -1,51 +0,0 @@
c
subroutine calctd2(p,t,q,mni,ni,nj,td)
c
c..............................................................................
c
c Routine to calculate dewpoint from pressure, temperature, and
c specific humidity.
c
c Changes:
c J. Ramer 03-21-01 Stole framework from calcrh2.
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 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 td RA O Depoint (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 p(mni,nj), t(mni,nj), q(mni,nj)
real td(mni,nj)
real tdofesat
real flg,flag,eee
Data flg,flag/99998.,1e37/
c first calculate vapor pressure (epsilon is 622 instead of 0.622 because
c q is in g/Kg) then dewpoint
Do 10 j=1,nj
Do 10 i=1,ni
If (p(i,j).gt.flg .or. t(i,j).gt.flg .or. q(i,j).gt.flg) then
td(i,j)=flag
Else
eee=p(i,j)*q(i,j)/(622.0+0.378*q(i,j))
td(i,j)=tdofesat(eee)
End If
10 Continue
return
end

View file

@ -1,59 +0,0 @@
c
c
subroutine calcthetae(p,t,rh,mni,ni,nj,q)
c
c..............................................................................
c
c Routine to calculate equivalent potential temperature from the,
c pressure 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 (C or 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 Theta E (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 p(mni,nj), t(mni,nj), rh(mni,nj)
real q(mni,nj)
real k,eee,w,tdp,tc,b,rhqc
real flg,flag,L_cp
Data flg,flag,L_cp/99998.0,1e37,2540/
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)
If (k.lt.80.0) k=k+273.15
rhqc = amax1(amin1(100.0,rh(i,j)),0.01)
eee=rhqc*exp(22.05565-0.0091379024*k-6106.396/k)
b=26.66082-alog(eee)
tdp=(b-sqrt(b*b-223.1986))/0.0182758048
tc=tdp-(k-tdp)*(-0.37329638+41.178204/k+0.0015945203*tdp)
w=0.622*eee/(p(i,j)-eee)
q(i,j)=k*exp(w*L_cp/tc)*(1000/p(i,j))**0.286
End If
10 Continue
return
end

View file

@ -1,77 +0,0 @@
c
c
subroutine calcthetae2(p,t,td,mni,ni,nj,q)
c
c..............................................................................
c
c Routine to calculate equivalent potential temperature from the
c pressure, temperature and dewpoint.
c
c Changes:
c J. Ramer 10-31-90 Stole from calcthetae.
c
c Inputs/Outputs:
c
c Variable Var Type I/O Description
c ---------- ---------- ----- -------------
c p RA I Pressure (mb)
c t RA I Temperature (C or K)
c td RA I Dewpoint (same as temp)
c mni I I First dimension of input array.
c ni,nj I I Grid dimensions in i,j.
c q RA O Theta E (K).
c
c
c This used a completely standard formulation for the equivalent potential
c temperature, except for two empirical approximations.
c
c The saturation vapor pressure in millibars as a function of temperature is
c
c es = exp(26.660820-0.0091379024*T-6106.3960/T)
c
c where T is temperature in degrees K, as in esat.f.
c
c The temperature of the lifting condensation level in degrees K is
c approximated as
c
c Tc = Td-(T-Td)*(-0.37329638+41.178204/T+0.0015945203*Td)
c
c where T and Td are temperature and dewpoint in degrees K. It is
c within 0.05 degrees over the entire range of meaningful meteorological
c conditions, and is usually within 0.02 degrees.
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), td(mni,nj)
real q(mni,nj)
real eee,td1,t1,w,tc
real flg,flag,L_cp
Data flg,flag,L_cp/99998.0,1e37,2540/
Do 10 j=1,nj
Do 10 i=1,ni
If (p(i,j).gt.flg .or. t(i,j).gt.flg .or. td(i,j).gt.flg) then
q(i,j)=flag
Else
If (t(i,j).lt.80.0) Then
t1=t(i,j)+273.15
td1=td(i,j)+273.15
Else
t1=t(i,j)
td1=td(i,j)
End If
eee=exp(26.66082-0.0091379024*td1-6106.396/td1)
tc=td1-(t1-td1)*(-0.37329638+41.178204/t1+0.0015945203*td1)
w=0.622*eee/(p(i,j)-eee)
q(i,j)=t1*exp(w*L_cp/tc)*(1000/p(i,j))**0.286
End If
10 Continue
return
end

View file

@ -1,56 +0,0 @@
#include "meteoLib.h"
/***************************************************************************
* Calculate the total index
* input : press, temp, td, numOfLevel
* output : total
* Harry Chen
***************************************************************************/
void FTN_MANGLE (calctotidx) ( float * press, float * temp,
float * td, int numOfLevel, float * total )
{
float temp850 = 0;
float temp500 = 0;
float td850 = 0;
float td500 = 0;
int i;
*total = 999;
if ( press[0] < 820 || press[numOfLevel-1] > 500 )
return;
/*
** Determine 850 mb, 500mb temperature and dew point from sounding.
*/
for ( i=0; i<numOfLevel; i++ )
{
if ( press[i] == 850 )
{
temp850 = temp[i];
td850 = td[i];
}
else if ( press[i] < 850 && temp850 == 0 )
{
if ( i == 0 )
{
interp ( press[0], press[1], temp[0], temp[1], td[0],
td[1], 850, &temp850, &td850 );
}
else
{
interp ( press[i-1], press[i], temp[i-1], temp[i],
td[i-1], td[i], 850, &temp850, &td850 );
}
}
else if ( press[i] == 500 )
{
temp500 = temp[i];
}
else if ( press[i] < 500 && temp500 == 0 )
{
interp ( press[i-1], press[i], temp[i-1], temp[i], td[i-1], td[i],
500, &temp500, &td500 );
}
}
*total = ( td850 - temp500 ) + ( temp850 - temp500 );
return;
}

View file

@ -1,51 +0,0 @@
c
c
subroutine calctv(p,t,rh,mni,ni,nj,tv)
c
c..............................................................................
c
c Routine to calculate virtual temperature from the pressure,
c temperature, and relative humidity.
c
c Changes:
c J. Ramer 06-18-03 Stole 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 tv RA O Virtual temperaure.
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 tv(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
tv(i,j)=flag
Else
k=t(i,j)
eee=exp(21.0827887-0.0091379024*k-6106.396/k)
tv(i,j)=t(i,j)*p(i,j)/ (p(i,j)-rh(i,j)*eee)
End If
10 Continue
return
end

View file

@ -1,47 +0,0 @@
c
c
subroutine calctv2(t,q,mni,ni,nj,tv)
c
c..............................................................................
c
c Routine to calculate virtual temperature from the temperature and
c specific humidity.
c
c Changes:
c J. Ramer 11-26-95 stole framework from tv2temp
c
c Inputs/Outputs:
c
c Variable Var Type I/O Description
c ---------- ---------- ----- -------------
c t RA I 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 tv RA O Virtual 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), t(mni,nj)
real tv(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. t(i,j).gt.flg) then
tv(i,j)=flag
Else
tv(i,j)=t(i,j)*(1+0.000608*q(i,j))
End If
10 Continue
return
end

View file

@ -1,123 +0,0 @@
c
subroutine calctw(p,t,rh,mni,ni,nj,tw)
c
c..............................................................................
c
c Routine to calculate wetbulb from temperature, and relative humidity.
c
c Changes:
c J. Ramer 11-12-92 Stole framework from calctd.
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 tw RA O wet-bulb temp (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 t(mni,nj), rh(mni,nj), p(mni,nj)
real tw(mni,nj), td, MyTw
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 .or. p(i,j).gt.flg) then
tw(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)
td=(b-sqrt(b*b-223.1986))/0.0182758048
tw(i,j)=MyTw(k,td,p(i,j))
End If
10 Continue
return
end
Real*4 Function MyTw(K,Kd,p)
C This function takes temperature in degrees K, dewpoint in degrees K
C and pressure in millibars and returns the isobaric wet-bulb temperature
C in degrees K using an iterative technique. For a given guess for the
C wet bulb temp, one tries to do an energy balance, matching cp*(T-Tw) to
C (esat(Tw)-esat(Td))*eps*L/p*.
C
C c0, c1, and c2 are the same constants as from the esat.f function.
C f = cp/(L*epsilon).
C
Implicit None
Integer*4 l
Real*4 f,c0,c1,c2,K,Kd,Kw,ew,p,ed,fp,s,de,Kdx
Data f,c0,c1,c2/0.0006355,26.66082,0.0091379024,6106.3960/
C Special cases of Td >= 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

View file

@ -1,849 +0,0 @@
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <math.h>
#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 (; pp0<eptr; pp0++,pp1++,tt++,qq++,pc++,tec++,tvc++)
{
*pp1 = *pp0;
if (--i<0)
{
pp0 += dd;
tt += dd;
qq += dd;
i = nxm;
}
if (*pp0>1e36 || *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; k<nz; k++)
{
pp1 = pp1_st;
pp = p_dat[k];
tve = tve_dat[k];
tec = tec_st;
tvc = tvc_st;
pc = pc_st;
md = md_st;
pmd = pmd_st;
eptr = pp+nn;
if (dd==0)
{
i = 0x7FFFFFFF;
}
else
{
i = nx;
}
for (; pp<eptr; pp1++,pp++,pc++,tec++,tvc++,tvp++,tve++,md++,pmd++)
{
if (--i<0)
{
pp += dd;
tve += dd;
i = nxm;
}
if (*pc>1e36 || *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<t0)
{
*tvp -= t0;
}
else
{
*tvp -= *tve;
}
if (*pp>*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; k<nz; k++)
{
pp0 = p0;
pc = pc_st;
pmd = pmd_st;
pp1 = pp1_st;
pp = p_dat[k];
tvp1 = tvc_st;
neg = tec_st;
pos = md_st;
cap = cape_dat;
cin = cin_dat;
eptr = pp+nn;
if (dd==0)
{
i = 0x7FFFFFFF;
}
else
{
i = nx;
}
for (; pp<eptr; pp0++,pc++,pmd++,pp1++,pp++,tvp1++,tvp++,
cap++,cin++,pos++,neg++)
{
if (--i<0)
{
pp0 += dd;
pp += dd;
cap += dd;
cin += dd;
i = nxm;
}
if (k==0)
{
*cin = *cap = 1e37;
*pos = *neg = 0;
}
else if (*pp0>1e36)
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 (; pp0<eptr; pp0++,pp1++,tt++,qq++,pc++,tec++,tvc++,pfin++)
{
*pp1 = *pp0;
if (--i<0)
{
pfin += dd;
pp0 += dd;
tt += dd;
qq += dd;
i = nxm;
}
if (*pp0>1e36 || *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; k<nz; k++)
{
pp1 = pp1_st;
pfin = ptop;
pp = p_dat[k];
tve = tve_dat[k];
tec = tec_st;
tvc = tvc_st;
pc = pc_st;
md = md_st;
pmd = pmd_st;
eptr = pp+nn;
if (dd==0)
{
i = 0x7FFFFFFF;
}
else
{
i = nx;
}
for (; pp<eptr; pp1++,pp++,pc++,pfin++,tec++,tvc++,
tvp++,tve++,md++,pmd++)
{
if (--i<0)
{
pfin += dd;
pp += dd;
tve += dd;
i = nxm;
}
if (*pc>1e36 || *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<t0)
{
*tvp -= t0;
}
else
{
*tvp -= *tve;
}
if (*pp>*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; k<nz; k++)
{
pp0 = p0;
pc = pc_st;
pmd = pmd_st;
pp1 = pp1_st;
pp = p_dat[k];
pfin = ptop;
tvp1 = tvc_st;
neg = tec_st;
pos = md_st;
cap = cape_dat;
cin = cin_dat;
eptr = pp+nn;
if (dd==0)
{
i = 0x7FFFFFFF;
}
else
{
i = nx;
}
for (; pp<eptr; pp0++,pc++,pmd++,pp1++,pp++,pfin++,tvp1++,tvp++,
cap++,cin++,pos++,neg++)
{
if (--i<0)
{
pp0 += dd;
pp += dd;
pfin += dd;
cap += dd;
cin += dd;
i = nxm;
}
if (k==0)
{
*cin = *cap = 1e37;
*pos = *neg = 0;
}
else if (*pp0>1e36)
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;
}

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

Some files were not shown because too many files have changed in this diff Show more