Beispiel #1
0
if not ip is None:
    ip.magic("%load_ext autoreload")
    ip.magic("%autoreload 2")

#
# Load observations.
#

filename = os.path.join(mcrf.liras.liras_path, "data",
                        "forward_simulations_b_noise.nc")

offsets = {"a": 3000, "b": 2800}

scene = "b"
offset = offsets[scene]
observations = NetCDFDataProvider(filename)
observations.add_offset("profile", -offset)

#
# Create the data provider.
#

ip = offset + 253 * 3 + 32

data_provider = ModelDataProvider(99,
                                  ice_psd=ice.psd,
                                  liquid_psd=rain.psd,
                                  scene=scene.upper())

#
# Define hydrometeors and sensors.
Beispiel #2
0
from parts.retrieval.a_priori import SensorNoiseAPriori
from parts.utils.data_providers import NetCDFDataProvider

import matplotlib.pyplot as plt
from IPython import get_ipython
ip = get_ipython()
if not ip is None:
    ip.magic("%load_ext autoreload")
    ip.magic("%autoreload 2")

#
# Load observations.
#

filename = os.path.join(mcrf.joint_flight.path, "data", "combined", "input.nc")
data_provider = NetCDFDataProvider(filename)

ice_shape = "FluffyMcSnowPhase"
ice.scattering_data = "/home/simonpf/src/joint_flight/data/scattering/{}.xml".format(
    ice_shape)

if ice_shape in psd_shapes_low:
    alpha, log_beta = psd_shapes_high[ice_shape]
    ice.psd = D14NDmIce(alpha, np.exp(log_beta))

#
# Define hydrometeors and sensors.
#

hydrometeors = [ice, rain]
sensors = [hamp_radar, hamp_passive, ismar]
input_file = args.input_file[0]
output_file = args.output_file[0]

liras_path = mcrf.liras.liras_path

if not os.path.isabs(input_file):
    input_file = os.path.join(liras_path, input_file)

if not os.path.isabs(output_file):
    output_file = os.path.join(liras_path, output_file)

#
# Load observations.
#

observations = NetCDFDataProvider(input_file, parallel=True)
observations.add_offset("profile", -i_start)
n = observations.file_handle.dimensions["profile"].size

if not snow_shape == "None":
    if args.reference:
        from mcrf.liras.reference import ice, snow, rain, rh_a_priori, cloud_water_a_priori
    else:
        from mcrf.liras import ice, snow, rain, rh_a_priori, cloud_water_a_priori
    ice_shape = os.path.join(liras_path, "data", "scattering", ice_shape)
    ice.scattering_data = ice_shape
    snow_shape = os.path.join(liras_path, "data", "scattering", snow_shape)
    snow.scattering_data = snow_shape
    hydrometeors = [ice, snow, rain]
else:
    if args.reference: