How to use the atlite.datasets.era5 function in atlite

To help you get started, we’ve selected a few atlite examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github PyPSA / atlite / test / test_preparation_and_conversion.py View on Github external
def test_compare_with_get_data_era5(cutout_era5, tmp_path):
        """
        The prepared data should be exactly the same as from the low level function
        """
        influx = atlite.datasets.era5.get_data(cutout_era5, 'influx', tmpdir=tmp_path)
        assert_allclose(influx.influx_toa, cutout_era5.data.influx_toa, atol=1e-5, rtol=1e-5)
github PyPSA / atlite / test / test_cutout_preparation.py View on Github external
def test_compare_with_get_data_era5():
    period = pd.Period(time)
    influx = atlite.datasets.era5.get_data(ref.coords, period, 'influx', tmpdir=tmp_dir)
    influx = influx.compute()
    assert_allclose(influx.influx_toa, ref.data.influx_toa, atol=1e-5, rtol=1e-5)