mirror of
https://github.com/meteoinfo/MeteoInfo.git
synced 2025-12-08 20:36:05 +00:00
to version 4.1
This commit is contained in:
parent
ef80a76ff4
commit
d6b8c42208
@ -69,7 +69,7 @@ import java.util.zip.ZipInputStream;
|
||||
public static String getVersion() {
|
||||
String version = GlobalUtil.class.getPackage().getImplementationVersion();
|
||||
if (version == null || version.equals("")) {
|
||||
version = "4.0.5";
|
||||
version = "4.1";
|
||||
}
|
||||
return version;
|
||||
}
|
||||
|
||||
@ -1,32 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<MeteoInfo File="milconfig.xml" Type="configurefile">
|
||||
<Path OpenPath="D:\Working\MIScript\Jython\mis\meteo\calc">
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\dataset"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\io\web"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\others"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\test"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\mywork\music"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\common_math"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\common_math\special"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\meteo"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\array\slice"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\io"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\io\radar"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\common_math\integrate"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\common_math"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\common_math\interpolate"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\array\slice"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\array"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\meteo\calc"/>
|
||||
</Path>
|
||||
<File>
|
||||
<OpenedFiles>
|
||||
<OpenedFile File="D:\Working\MIScript\Jython\mis\meteo\calc\mixed_layer_cape_cin_test.py"/>
|
||||
<OpenedFile File="D:\Working\MIScript\Jython\mis\meteo\calc\parcel_profile_with_lcl_test.py"/>
|
||||
<OpenedFile File="D:\Working\MIScript\Jython\mis\array\searchsorted.py"/>
|
||||
<OpenedFile File="D:\Working\MIScript\Jython\mis\meteo\calc\mixed_layer_cape_cin.py"/>
|
||||
</OpenedFiles>
|
||||
<RecentFiles>
|
||||
<RecentFile File="D:\Working\MIScript\Jython\mis\meteo\calc\mixed_layer_cape_cin_test.py"/>
|
||||
<RecentFile File="D:\Working\MIScript\Jython\mis\meteo\calc\parcel_profile_with_lcl_test.py"/>
|
||||
<RecentFile File="D:\Working\MIScript\Jython\mis\array\searchsorted.py"/>
|
||||
<RecentFile File="D:\Working\MIScript\Jython\mis\meteo\calc\mixed_layer_cape_cin.py"/>
|
||||
</RecentFiles>
|
||||
</File>
|
||||
<Font>
|
||||
|
||||
Binary file not shown.
@ -35,7 +35,7 @@ __all__ = [
|
||||
'temperature_from_potential_temperature','vapor_pressure','virtual_potential_temperature',
|
||||
'virtual_temperature','virtual_temperature_from_dewpoint',
|
||||
'water_latent_heat_vaporization','water_latent_heat_sublimation','water_latent_heat_melting',
|
||||
'wet_bulb_potential_temperature'
|
||||
'wet_bulb_temperature','wet_bulb_potential_temperature'
|
||||
]
|
||||
|
||||
|
||||
@ -2869,26 +2869,26 @@ def wet_bulb_temperature(pressure, temperature, dewpoint):
|
||||
|
||||
Parameters
|
||||
----------
|
||||
pressure : `pint.Quantity`
|
||||
pressure : `hPa`
|
||||
Initial atmospheric pressure
|
||||
|
||||
temperature : `pint.Quantity`
|
||||
temperature : `kelvin`
|
||||
Initial atmospheric temperature
|
||||
|
||||
dewpoint : `pint.Quantity`
|
||||
dewpoint : `kelvin`
|
||||
Initial atmospheric dewpoint
|
||||
|
||||
Returns
|
||||
-------
|
||||
`pint.Quantity`
|
||||
`kelvin`
|
||||
Wet-bulb temperature
|
||||
|
||||
Examples
|
||||
--------
|
||||
>>> from metpy.calc import wet_bulb_temperature
|
||||
>>> from metpy.units import units
|
||||
>>> wet_bulb_temperature(993 * units.hPa, 32 * units.degC, 15 * units.degC)
|
||||
<Quantity(20.3937601, 'degree_Celsius')>
|
||||
>>> from mipylib.meteolib.calc import wet_bulb_temperature
|
||||
>>> from mipylib.meteolib import constants as cons
|
||||
>>> wet_bulb_temperature(993, 32 + cons.degCtoK, 15 + cons.degCtoK)
|
||||
<(20.3937601, 'degree_Celsius')>
|
||||
|
||||
See Also
|
||||
--------
|
||||
@ -2907,21 +2907,18 @@ def wet_bulb_temperature(pressure, temperature, dewpoint):
|
||||
|
||||
lcl_press, lcl_temp = lcl(pressure, temperature, dewpoint)
|
||||
|
||||
it = np.nditer([pressure.magnitude, lcl_press.magnitude, lcl_temp.magnitude, None],
|
||||
op_dtypes=['float', 'float', 'float', 'float'],
|
||||
flags=['buffered'])
|
||||
|
||||
for press, lpress, ltemp, ret in it:
|
||||
moist_adiabat_temperatures = moist_lapse(units.Quantity(press, pressure.units),
|
||||
units.Quantity(ltemp, lcl_temp.units),
|
||||
units.Quantity(lpress, lcl_press.units))
|
||||
ret[...] = moist_adiabat_temperatures.m_as(temperature.units)
|
||||
ret = np.zeros_like(pressure)
|
||||
ret_flat = ret.flat
|
||||
i = 0
|
||||
for press, lpress, ltemp in zip(pressure.flat, lcl_press.flat, lcl_temp.flat):
|
||||
ml = moist_lapse(press, ltemp, lpress)
|
||||
ret_flat[i] = ml.item()
|
||||
i += 1
|
||||
|
||||
# If we started with a scalar, return a scalar
|
||||
ret = it.operands[3]
|
||||
if ret.size == 1:
|
||||
ret = ret[0]
|
||||
return units.Quantity(ret, temperature.units)
|
||||
return ret
|
||||
|
||||
|
||||
def dewpoint_from_relative_humidity(temperature, relative_humidity):
|
||||
|
||||
@ -61,7 +61,7 @@ class flatiter(object):
|
||||
value = ArrayUtil.array(value, None)
|
||||
|
||||
if isinstance(key, int):
|
||||
return self.flat_index.setSection(key, value)
|
||||
return self.flat_index.setObject(key, value)
|
||||
elif isinstance(key, slice):
|
||||
sidx = 0 if key.start is None else key.start
|
||||
if sidx < 0:
|
||||
|
||||
@ -151,5 +151,5 @@ def lambertw(z, k=0, tol=1e-8):
|
||||
r = LambertW.Wk(JythonUtil.toComplex(z), k)
|
||||
return JythonUtil.toComplex(r)
|
||||
else:
|
||||
r = LambertW.Wk(z, k)
|
||||
r = LambertW.Wk(z._array, k)
|
||||
return np.array(r)
|
||||
|
||||
2
pom.xml
2
pom.xml
@ -36,7 +36,7 @@
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<revision>4.0.5</revision>
|
||||
<revision>4.1</revision>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
<maven.compiler.release>8</maven.compiler.release>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user