├── .editorconfig ├── .github └── ISSUE_TEMPLATE.md ├── .gitignore ├── .mch-ci.yml ├── .python-version ├── AUTHORS.md ├── CONTRIBUTING.md ├── Dockerfile ├── HISTORY.md ├── Jenkinsfile ├── LICENSE ├── MANIFEST.in ├── README.md ├── USAGE.md ├── img └── integrated_concentration_site-Goesgen_species-1_domain-full_lang-de_ts-20200217T0900.png ├── poetry.lock ├── pyproject.toml ├── scripts ├── animate.sh ├── count_loc.sh └── create_composite_plot.sh ├── sonar-project.properties ├── src ├── pyflexplot │ ├── __init__.py │ ├── cli │ │ ├── __init__.py │ │ ├── cli.py │ │ ├── click.py │ │ ├── main.py │ │ ├── preset.py │ │ ├── preset_click.py │ │ └── py.typed │ ├── config │ │ ├── __init__.py │ │ ├── base_settings.py │ │ ├── service_settings.py │ │ └── settings.yaml │ ├── data │ │ ├── naturalearthdata │ │ │ └── shapefiles │ │ │ │ └── natural_earth │ │ │ │ ├── .gitignore │ │ │ │ ├── cultural │ │ │ │ ├── ne_10m_admin_0_countries_lakes.README.html │ │ │ │ ├── ne_10m_admin_0_countries_lakes.VERSION.txt │ │ │ │ ├── ne_10m_admin_0_countries_lakes.cpg │ │ │ │ ├── ne_10m_admin_0_countries_lakes.dbf │ │ │ │ ├── ne_10m_admin_0_countries_lakes.prj │ │ │ │ ├── ne_10m_admin_0_countries_lakes.shp │ │ │ │ ├── ne_10m_admin_0_countries_lakes.shx │ │ │ │ ├── ne_10m_populated_places.README.html │ │ │ │ ├── ne_10m_populated_places.VERSION.txt │ │ │ │ ├── ne_10m_populated_places.cpg │ │ │ │ ├── ne_10m_populated_places.dbf │ │ │ │ ├── ne_10m_populated_places.prj │ │ │ │ ├── ne_10m_populated_places.shp │ │ │ │ ├── ne_10m_populated_places.shx │ │ │ │ ├── ne_110m_admin_0_countries_lakes.README.html │ │ │ │ ├── ne_110m_admin_0_countries_lakes.VERSION.txt │ │ │ │ ├── ne_110m_admin_0_countries_lakes.cpg │ │ │ │ ├── ne_110m_admin_0_countries_lakes.dbf │ │ │ │ ├── ne_110m_admin_0_countries_lakes.prj │ │ │ │ ├── ne_110m_admin_0_countries_lakes.shp │ │ │ │ ├── ne_110m_admin_0_countries_lakes.shx │ │ │ │ ├── ne_110m_populated_places.README.html │ │ │ │ ├── ne_110m_populated_places.VERSION.txt │ │ │ │ ├── ne_110m_populated_places.cpg │ │ │ │ ├── ne_110m_populated_places.dbf │ │ │ │ ├── ne_110m_populated_places.prj │ │ │ │ ├── ne_110m_populated_places.shp │ │ │ │ ├── ne_110m_populated_places.shx │ │ │ │ ├── ne_50m_admin_0_countries_lakes.README.html │ │ │ │ ├── ne_50m_admin_0_countries_lakes.VERSION.txt │ │ │ │ ├── ne_50m_admin_0_countries_lakes.cpg │ │ │ │ ├── ne_50m_admin_0_countries_lakes.dbf │ │ │ │ ├── ne_50m_admin_0_countries_lakes.prj │ │ │ │ ├── ne_50m_admin_0_countries_lakes.shp │ │ │ │ ├── ne_50m_admin_0_countries_lakes.shx │ │ │ │ ├── ne_50m_populated_places.README.html │ │ │ │ ├── ne_50m_populated_places.VERSION.txt │ │ │ │ ├── ne_50m_populated_places.cpg │ │ │ │ ├── ne_50m_populated_places.dbf │ │ │ │ ├── ne_50m_populated_places.prj │ │ │ │ ├── ne_50m_populated_places.shp │ │ │ │ └── ne_50m_populated_places.shx │ │ │ │ └── physical │ │ │ │ ├── ne_10m_coastline.README.html │ │ │ │ ├── ne_10m_coastline.VERSION.txt │ │ │ │ ├── ne_10m_coastline.cpg │ │ │ │ ├── ne_10m_coastline.dbf │ │ │ │ ├── ne_10m_coastline.prj │ │ │ │ ├── ne_10m_coastline.shp │ │ │ │ ├── ne_10m_coastline.shx │ │ │ │ ├── ne_10m_lakes.README.html │ │ │ │ ├── ne_10m_lakes.VERSION.txt │ │ │ │ ├── ne_10m_lakes.cpg │ │ │ │ ├── ne_10m_lakes.dbf │ │ │ │ ├── ne_10m_lakes.prj │ │ │ │ ├── ne_10m_lakes.shp │ │ │ │ ├── ne_10m_lakes.shx │ │ │ │ ├── ne_10m_lakes_europe.README.html │ │ │ │ ├── ne_10m_lakes_europe.VERSION.txt │ │ │ │ ├── ne_10m_lakes_europe.cpg │ │ │ │ ├── ne_10m_lakes_europe.dbf │ │ │ │ ├── ne_10m_lakes_europe.prj │ │ │ │ ├── ne_10m_lakes_europe.shp │ │ │ │ ├── ne_10m_lakes_europe.shx │ │ │ │ ├── ne_10m_rivers_europe.README.html │ │ │ │ ├── ne_10m_rivers_europe.VERSION.txt │ │ │ │ ├── ne_10m_rivers_europe.cpg │ │ │ │ ├── ne_10m_rivers_europe.dbf │ │ │ │ ├── ne_10m_rivers_europe.prj │ │ │ │ ├── ne_10m_rivers_europe.shp │ │ │ │ ├── ne_10m_rivers_europe.shx │ │ │ │ ├── ne_10m_rivers_lake_centerlines.README.html │ │ │ │ ├── ne_10m_rivers_lake_centerlines.VERSION.txt │ │ │ │ ├── ne_10m_rivers_lake_centerlines.cpg │ │ │ │ ├── ne_10m_rivers_lake_centerlines.dbf │ │ │ │ ├── ne_10m_rivers_lake_centerlines.prj │ │ │ │ ├── ne_10m_rivers_lake_centerlines.shp │ │ │ │ ├── ne_10m_rivers_lake_centerlines.shx │ │ │ │ ├── ne_110m_coastline.README.html │ │ │ │ ├── ne_110m_coastline.VERSION.txt │ │ │ │ ├── ne_110m_coastline.cpg │ │ │ │ ├── ne_110m_coastline.dbf │ │ │ │ ├── ne_110m_coastline.prj │ │ │ │ ├── ne_110m_coastline.shp │ │ │ │ ├── ne_110m_coastline.shx │ │ │ │ ├── ne_110m_lakes.README.html │ │ │ │ ├── ne_110m_lakes.VERSION.txt │ │ │ │ ├── ne_110m_lakes.cpg │ │ │ │ ├── ne_110m_lakes.dbf │ │ │ │ ├── ne_110m_lakes.prj │ │ │ │ ├── ne_110m_lakes.shp │ │ │ │ ├── ne_110m_lakes.shx │ │ │ │ ├── ne_110m_rivers_lake_centerlines.README.html │ │ │ │ ├── ne_110m_rivers_lake_centerlines.VERSION.txt │ │ │ │ ├── ne_110m_rivers_lake_centerlines.cpg │ │ │ │ ├── ne_110m_rivers_lake_centerlines.dbf │ │ │ │ ├── ne_110m_rivers_lake_centerlines.prj │ │ │ │ ├── ne_110m_rivers_lake_centerlines.shp │ │ │ │ ├── ne_110m_rivers_lake_centerlines.shx │ │ │ │ ├── ne_50m_coastline.README.html │ │ │ │ ├── ne_50m_coastline.VERSION.txt │ │ │ │ ├── ne_50m_coastline.cpg │ │ │ │ ├── ne_50m_coastline.dbf │ │ │ │ ├── ne_50m_coastline.prj │ │ │ │ ├── ne_50m_coastline.shp │ │ │ │ ├── ne_50m_coastline.shx │ │ │ │ ├── ne_50m_lakes.README.html │ │ │ │ ├── ne_50m_lakes.VERSION.txt │ │ │ │ ├── ne_50m_lakes.cpg │ │ │ │ ├── ne_50m_lakes.dbf │ │ │ │ ├── ne_50m_lakes.prj │ │ │ │ ├── ne_50m_lakes.shp │ │ │ │ ├── ne_50m_lakes.shx │ │ │ │ ├── ne_50m_rivers_lake_centerlines.README.html │ │ │ │ ├── ne_50m_rivers_lake_centerlines.VERSION.txt │ │ │ │ ├── ne_50m_rivers_lake_centerlines.cpg │ │ │ │ ├── ne_50m_rivers_lake_centerlines.dbf │ │ │ │ ├── ne_50m_rivers_lake_centerlines.prj │ │ │ │ ├── ne_50m_rivers_lake_centerlines.shp │ │ │ │ └── ne_50m_rivers_lake_centerlines.shx │ │ └── presets │ │ │ ├── case_study │ │ │ ├── deterministic.toml │ │ │ ├── ens_cloud_timing.toml │ │ │ ├── ens_probability.toml │ │ │ └── ens_stats.toml │ │ │ ├── opr │ │ │ ├── cosmo-1e-ctrl │ │ │ │ ├── all_pdf.toml │ │ │ │ ├── all_png.toml │ │ │ │ └── all_shp.toml │ │ │ ├── cosmo-1e │ │ │ │ ├── all_pdf.toml │ │ │ │ ├── all_png.toml │ │ │ │ └── all_shp.toml │ │ │ ├── cosmo-2e-ctrl │ │ │ │ ├── all_pdf.toml │ │ │ │ └── all_png.toml │ │ │ ├── cosmo-2e │ │ │ │ ├── all_pdf.toml │ │ │ │ ├── all_png.toml │ │ │ │ └── all_shp.toml │ │ │ ├── icon-ch1-ctrl │ │ │ │ ├── all_pdf.toml │ │ │ │ ├── all_png.toml │ │ │ │ └── all_shp.toml │ │ │ ├── icon-ch2-eps │ │ │ │ ├── all_pdf.toml │ │ │ │ ├── all_png.toml │ │ │ │ └── all_shp.toml │ │ │ ├── ifs-hres-eu │ │ │ │ ├── all_pdf.toml │ │ │ │ ├── all_png.toml │ │ │ │ └── all_shp.toml │ │ │ └── ifs-hres │ │ │ │ ├── all_pdf.toml │ │ │ │ ├── all_png.toml │ │ │ │ └── all_shp.toml │ │ │ └── test │ │ │ ├── cosmo-1e-ctrl │ │ │ ├── affected_area.toml │ │ │ ├── cloud_timing.toml │ │ │ ├── concentration.toml │ │ │ ├── deposition.toml │ │ │ └── integrated_concentration.toml │ │ │ ├── cosmo-2e-ctrl │ │ │ ├── all_png.toml │ │ │ └── multipanel_time.toml │ │ │ ├── cosmo-2e │ │ │ ├── cloud_timing.toml │ │ │ ├── multipanel_stats.toml │ │ │ ├── probability.toml │ │ │ ├── risk.toml │ │ │ └── stats.toml │ │ │ ├── cosmo-e │ │ │ ├── cloud_timing.toml │ │ │ ├── multipanel_stats.toml │ │ │ ├── probability.toml │ │ │ └── stats.toml │ │ │ ├── icon-ch1-ctrl │ │ │ ├── all_pdf.toml │ │ │ ├── all_png.toml │ │ │ └── all_shp.toml │ │ │ ├── icon-ch2-eps │ │ │ ├── all_pdf.toml │ │ │ ├── all_png.toml │ │ │ └── all_shp.toml │ │ │ ├── ifs-hres-eu │ │ │ ├── affected_area.toml │ │ │ ├── all_pdf.toml │ │ │ ├── all_png.toml │ │ │ ├── all_shp.toml │ │ │ ├── concentration.toml │ │ │ ├── deposition.toml │ │ │ └── integrated_concentration.toml │ │ │ └── ifs-hres │ │ │ ├── affected_area.toml │ │ │ ├── all_pdf.toml │ │ │ ├── all_png.toml │ │ │ ├── all_shp.toml │ │ │ ├── concentration.toml │ │ │ ├── deposition.toml │ │ │ └── integrated_concentration.toml │ ├── data_transformation │ │ └── rotated_pole.py │ ├── input │ │ ├── __init__.py │ │ ├── data.py │ │ ├── field.py │ │ ├── fix_nc_input.py │ │ ├── meta_data.py │ │ ├── py.typed │ │ ├── read_fields.py │ │ └── species.py │ ├── output.py │ ├── plot_layouts.py │ ├── plots.py │ ├── plotting │ │ ├── __init__.py │ │ ├── boxed_plot.py │ │ ├── coord_trans.py │ │ ├── domain.py │ │ ├── map_axes.py │ │ ├── proj_bbox.py │ │ ├── py.typed │ │ ├── ref_dist_indicator.py │ │ └── text_box_axes.py │ ├── py.typed │ ├── s3.py │ ├── save_data.py │ ├── setups │ │ ├── __init__.py │ │ ├── base_setup.py │ │ ├── dimensions.py │ │ ├── files_setup.py │ │ ├── layout_setup.py │ │ ├── model_setup.py │ │ ├── plot_panel_setup.py │ │ ├── plot_setup.py │ │ └── setup_file.py │ ├── utils │ │ ├── __init__.py │ │ ├── exceptions.py │ │ ├── formatting.py │ │ ├── logging.py │ │ ├── py.typed │ │ ├── summarize.py │ │ ├── typing.py │ │ └── wrappers.py │ └── words.py ├── srtools │ ├── __init__.py │ ├── crop_netcdf.py │ └── py.typed ├── srutils │ ├── __init__.py │ ├── click.py │ ├── dataclasses.py │ ├── datetime.py │ ├── dict.py │ ├── exceptions.py │ ├── format.py │ ├── geo.py │ ├── iter.py │ ├── paths.py │ ├── pdf.py │ ├── plotting.py │ ├── py.typed │ ├── str.py │ ├── testing.py │ ├── various.py │ └── varname.py └── words │ ├── __init__.py │ ├── exceptions.py │ ├── py.typed │ ├── test.py │ ├── word.py │ └── words.py ├── tests ├── data │ └── pyflexplot │ │ └── flexpart │ │ ├── artificial │ │ ├── flexpart_cosmo-e_const_000.nc │ │ ├── flexpart_cosmo-e_const_001.nc │ │ ├── flexpart_cosmo-e_const_002.nc │ │ ├── flexpart_cosmo-e_const_003.nc │ │ ├── flexpart_cosmo-e_const_004.nc │ │ ├── flexpart_cosmo-e_const_005.nc │ │ ├── flexpart_cosmo-e_const_006.nc │ │ ├── flexpart_cosmo-e_const_007.nc │ │ ├── flexpart_cosmo-e_const_008.nc │ │ ├── flexpart_cosmo-e_const_009.nc │ │ ├── flexpart_cosmo-e_const_010.nc │ │ ├── flexpart_cosmo-e_const_011.nc │ │ ├── flexpart_cosmo-e_const_012.nc │ │ ├── flexpart_cosmo-e_const_013.nc │ │ ├── flexpart_cosmo-e_const_014.nc │ │ ├── flexpart_cosmo-e_const_015.nc │ │ ├── flexpart_cosmo-e_const_016.nc │ │ ├── flexpart_cosmo-e_const_017.nc │ │ ├── flexpart_cosmo-e_const_018.nc │ │ ├── flexpart_cosmo-e_const_019.nc │ │ └── flexpart_cosmo-e_const_020.nc │ │ └── reduced │ │ ├── flexpart_cosmo-1_2019052800.nc │ │ ├── flexpart_cosmo-1_2019093012.nc │ │ ├── flexpart_cosmo-1e-ctrl_1032_2021040800_6-releases.nc │ │ ├── flexpart_cosmo-1e-ctrl_2020102105.nc │ │ ├── flexpart_cosmo-2e_2021030503_000_MUE.nc │ │ ├── flexpart_cosmo-2e_2021030503_005_MUE.nc │ │ ├── flexpart_cosmo-2e_2021030503_010_MUE.nc │ │ ├── flexpart_cosmo-2e_2021030503_015_MUE.nc │ │ ├── flexpart_cosmo-2e_2021030503_020_MUE.nc │ │ ├── flexpart_cosmo-e_2019072712_000.nc │ │ ├── flexpart_cosmo-e_2019072712_001.nc │ │ ├── flexpart_cosmo-e_2019072712_005.nc │ │ ├── flexpart_cosmo-e_2019072712_010.nc │ │ ├── flexpart_cosmo-e_2019072712_015.nc │ │ ├── flexpart_cosmo-e_2019072712_020.nc │ │ ├── flexpart_ifs-hres-eu_1023_20201113120000.nc │ │ ├── flexpart_ifs-hres_1018_20200921000000_no-deposition.nc │ │ └── flexpart_ifs-hres_20200317000000.nc ├── fast │ ├── test_pyflexplot │ │ ├── test_data │ │ │ ├── test_cloud_timing.py │ │ │ ├── test_ens_cloud_timing.py │ │ │ └── test_ens_probability.py │ │ ├── test_input │ │ │ ├── test_field_time_properties.py │ │ │ └── test_meta_data.py │ │ ├── test_plotting │ │ │ ├── test_coord_trans.py │ │ │ ├── test_domain.py │ │ │ ├── test_proj_bbox.py │ │ │ └── test_text_box_axes.py │ │ ├── test_s3 │ │ │ └── test_s3.py │ │ ├── test_setups │ │ │ ├── __init__.py │ │ │ ├── shared.py │ │ │ ├── test_cast.py │ │ │ ├── test_core_dimensions.py │ │ │ ├── test_create.py │ │ │ ├── test_dimensions.py │ │ │ ├── test_plot_panel_setup.py │ │ │ ├── test_plot_panel_setup_group.py │ │ │ ├── test_plot_setup.py │ │ │ ├── test_plot_setup_group.py │ │ │ └── test_setup_file.py │ │ └── test_utils │ │ │ └── test_formatting │ │ │ └── test_level_range_formatter.py │ ├── test_srutils │ │ ├── __init__.py │ │ ├── test_dataclasses │ │ │ ├── __init__.py │ │ │ └── test_cast_field_value.py │ │ ├── test_datetime │ │ │ ├── __init__.py │ │ │ └── test_datetime_range.py │ │ ├── test_dict │ │ │ ├── __init__.py │ │ │ ├── multival │ │ │ │ ├── __init__.py │ │ │ │ ├── test_compress.py │ │ │ │ └── test_decompress.py │ │ │ ├── nested │ │ │ │ ├── __init__.py │ │ │ │ ├── test_decompress.py │ │ │ │ ├── test_flatten.py │ │ │ │ ├── test_linearize.py │ │ │ │ └── test_resolve_wildcards.py │ │ │ └── test_merge.py │ │ ├── test_format │ │ │ ├── __init__.py │ │ │ └── test_ordinal.py │ │ ├── test_iter │ │ │ ├── __init__.py │ │ │ └── test_flatten.py │ │ ├── test_str │ │ │ ├── __init__.py │ │ │ ├── test_sorted_paths.py │ │ │ ├── test_split_outside_parens.py │ │ │ └── utils.py │ │ ├── test_testing │ │ │ ├── __init__.py │ │ │ └── test_assert_nested_equal.py │ │ └── test_varname │ │ │ ├── __init__.py │ │ │ └── test_format.py │ └── test_words │ │ ├── __init__.py │ │ ├── test_format.py │ │ ├── test_test.py │ │ ├── test_translated_word.py │ │ └── test_translated_words.py ├── medium │ └── test_pyflexplot │ │ └── test_input │ │ ├── __init__.py │ │ ├── shared.py │ │ ├── test_read_dimensions.py │ │ └── test_read_flexpart_fields │ │ ├── __init__.py │ │ ├── shared.py │ │ ├── test_deterministic.py │ │ ├── test_dry_run.py │ │ ├── test_ensemble.py │ │ └── test_ensemble_artificial.py └── slow │ └── test_pyflexplot │ └── test_plots │ ├── .gitignore │ ├── __init__.py │ ├── ref_cosmo-1_affected_area.py │ ├── ref_cosmo-1_cloud_arrival_time.py │ ├── ref_cosmo-1_concentration.py │ ├── ref_cosmo-1_integrated_concentration.py │ ├── ref_cosmo-1_total_deposition.py │ ├── ref_cosmo-1e-ctrl_affected_area.py │ ├── ref_cosmo-1e-ctrl_concentration_multipanel_time.py │ ├── ref_cosmo-1e-ctrl_tot_deposition_multipanel_time.py │ ├── ref_cosmo-1e_total_deposition_dummy.py │ ├── ref_cosmo-2e_ens_cloud_arrival_time.py │ ├── ref_cosmo-2e_ens_cloud_departure_time.py │ ├── ref_cosmo-2e_multipanel_ens_stats_integr_concentration.py │ ├── ref_cosmo-e_ens_cloud_arrival_time.py │ ├── ref_cosmo-e_ens_cloud_departure_time.py │ ├── ref_cosmo-e_ens_max_integrated_concentration.py │ ├── ref_cosmo-e_ens_mean_concentration.py │ ├── ref_cosmo-e_ens_mean_total_deposition.py │ ├── ref_cosmo-e_ens_min_affected_area.py │ ├── ref_cosmo-e_ens_probability_wet_deposition.py │ ├── ref_ifs-hres-eu_affected_area.py │ ├── ref_ifs-hres-eu_integrated_concentration.py │ ├── ref_ifs-hres-eu_total_deposition.py │ ├── ref_ifs-hres_affected_area.py │ ├── ref_ifs-hres_cloud_departure_time.py │ ├── ref_ifs-hres_concentration.py │ ├── ref_ifs-hres_total_deposition.py │ ├── shared.py │ ├── test_cosmo-1.py │ ├── test_cosmo-1e-ctrl.py │ ├── test_cosmo-2e.py │ ├── test_cosmo-e.py │ ├── test_ifs-hres-eu.py │ ├── test_ifs-hres.py │ └── test_shape-files.py └── various ├── flexpart_cosmo_species.txt ├── flexpart_ifs_species.txt ├── flexpart_ifs_species_nofill.txt ├── rasterization_file_sizes.nb.py ├── rasterization_file_sizes_all.pdf ├── rasterization_file_sizes_by_model.pdf └── rasterization_file_sizes_zorder.pdf /.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | indent_style = space 7 | indent_size = 4 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | charset = utf-8 11 | end_of_line = lf 12 | 13 | [*.bat] 14 | indent_style = tab 15 | end_of_line = crlf 16 | 17 | [LICENSE] 18 | insert_final_newline = false 19 | 20 | [Makefile] 21 | indent_style = tab 22 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | * PyFlexPlot version: 2 | * Python version: 3 | * Operating System: 4 | 5 | ### Description 6 | 7 | Describe what you were trying to get done. 8 | Tell us what happened, what went wrong, and what you expected to happen. 9 | 10 | ### What I Did 11 | 12 | ``` 13 | Paste the command(s) you ran and the output. 14 | If there was a crash, please include the traceback here. 15 | ``` 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | env/ 12 | env-dev/ 13 | build/ 14 | develop-eggs/ 15 | dist/ 16 | downloads/ 17 | eggs/ 18 | .eggs/ 19 | lib/ 20 | lib64/ 21 | parts/ 22 | sdist/ 23 | var/ 24 | wheels/ 25 | *.egg-info/ 26 | .installed.cfg 27 | *.egg 28 | .terraform/ 29 | 30 | # PyInstaller 31 | # Usually these files are written by a python script from a template 32 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 33 | *.manifest 34 | *.spec 35 | 36 | # Installer logs 37 | pip-log.txt 38 | pip-delete-this-directory.txt 39 | 40 | # Unit test / coverage reports 41 | htmlcov/ 42 | .tox/ 43 | .coverage 44 | .coverage.* 45 | .cache 46 | nosetests.xml 47 | coverage.xml 48 | *.cover 49 | .hypothesis/ 50 | .pytest_cache/ 51 | 52 | # Translations 53 | *.mo 54 | *.pot 55 | 56 | # Django stuff: 57 | *.log 58 | local_settings.py 59 | 60 | # Flask stuff: 61 | instance/ 62 | .webassets-cache 63 | 64 | # Scrapy stuff: 65 | .scrapy 66 | 67 | # Sphinx documentation 68 | docs/_build/ 69 | 70 | # PyBuilder 71 | target/ 72 | 73 | # Jupyter Notebook 74 | .ipynb_checkpoints 75 | 76 | # pyenv 77 | .python-version 78 | 79 | # celery beat schedule file 80 | celerybeat-schedule 81 | 82 | # SageMath parsed files 83 | *.sage.py 84 | 85 | # dotenv 86 | .env 87 | 88 | # virtualenv 89 | .venv 90 | .venvs 91 | venv/ 92 | venvs/ 93 | venv_*/ 94 | 95 | # Spyder project settings 96 | .spyderproject 97 | .spyproject 98 | 99 | # Rope project settings 100 | .ropeproject 101 | 102 | # mkdocs documentation 103 | /site 104 | 105 | # mypy 106 | .mypy_cache/ 107 | 108 | # Eclipse 109 | .project 110 | 111 | # VS Code 112 | .vscode 113 | 114 | # Local poetry config 115 | poetry.toml 116 | 117 | # Conda environment for local CSCS development 118 | .conda-env 119 | 120 | # Job submission tool batchPP 121 | script_* 122 | stdeo_* 123 | 124 | # Output directories 125 | plot_* 126 | 127 | # Other stuff 128 | .idea 129 | test-data 130 | 131 | # test data 132 | debugging/ 133 | output/ 134 | input/ 135 | -------------------------------------------------------------------------------- /.mch-ci.yml: -------------------------------------------------------------------------------- 1 | default: 2 | - build: 3 | - checkGivenSemanticVersion: 4 | checkSemanticVersion: 5 | - getSemanticVersion: 6 | gitCalculateSemanticVersion: 7 | - getImageName: 8 | containerConstructImageName: 9 | - imageTester: 10 | containerBuildImage: 11 | fullImageName: ${var.image}-tester 12 | target: tester 13 | extraArgs: 14 | - --build-arg 15 | - VERSION=${var.version} 16 | - imageAwsRunner: 17 | containerBuildImage: 18 | fullImageName: ${var.image} 19 | target: runner 20 | extraArgs: 21 | - --build-arg 22 | - VERSION=${var.version} 23 | pullAlways: false 24 | - test: 25 | - unit: 26 | - script: mkdir -p test_reports 27 | - pythonTest: 28 | fullImageName: ${var.image}-tester 29 | testDirectory: tests 30 | packageManager: '' 31 | pullAlways: false 32 | - pythonCoverage: 33 | fullImageName: ${var.image}-tester 34 | packageManager: '' 35 | pullAlways: false 36 | - lint: 37 | - script: mkdir -p test_reports 38 | - pythonLint: 39 | fullImageName: ${var.image}-tester 40 | packageManager: '' 41 | pullAlways: false 42 | - pythonTypeChecker: 43 | fullImageName: ${var.image}-tester 44 | packageManager: '' 45 | pullAlways: false 46 | - verify: 47 | - securityScan: 48 | - securityReport: 49 | format: [ 'html', 'sbom', 'table', 'print' ] 50 | severity: [ 'CRITICAL', 'HIGH' ] 51 | target: file://poetry.lock 52 | qualityGate: 53 | threshold: 5 54 | criticalFactor: 5 55 | highFactor: 1 56 | - publishSbom: 57 | - securityPublishSbom: 58 | - publish: 59 | - image: 60 | containerPublishImage: 61 | - deploy: 62 | - pypi: 63 | pythonPublishPackage: 64 | setPackageVersion: False 65 | pythonImageName: '3.10' 66 | pullAlways: false 67 | - clean: 68 | - images: 69 | script: | 70 | if test -n "${var.version}"; then 71 | podman image rm -f $(podman image ls -q \ 72 | -f "label=ch.meteoswiss.project=${var.project}-${var.version}") || : 73 | fi 74 | 75 | variables: 76 | project: pyflexplot 77 | # default full image name, useful when running tasks locally 78 | image: ${var.containerImageName}:${var.version} 79 | solution: dispersionmodelling 80 | notifyOnNightlyFailure: p_dispersionmodelling@meteoswiss.ch 81 | -------------------------------------------------------------------------------- /.python-version: -------------------------------------------------------------------------------- 1 | 3.10 2 | -------------------------------------------------------------------------------- /AUTHORS.md: -------------------------------------------------------------------------------- 1 | # Credits 2 | 3 | ## Author 4 | 5 | - Stefan Ruedisuehli 6 | 7 | ## Contributors 8 | 9 | - Victoria Cherkas 10 | - Paulina Grochal 11 | - Pirmin Kaufmann 12 | - Marco Ketzel 13 | - Mathis Kretz 14 | - Néstor Tarin Burriel 15 | - Tobias Wicky 16 | 17 | ## Maintainer 18 | 19 | - Pirmin Kaufmann 20 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM dockerhub.apps.cp.meteoswiss.ch/mch/python-3.10 AS builder 2 | ARG VERSION 3 | LABEL ch.meteoswiss.project=pyflexplot-${VERSION} 4 | 5 | COPY poetry.lock /src/app-root/ 6 | COPY pyproject.toml /src/app-root/ 7 | COPY src/ /src/app-root/src/ 8 | COPY README.md /src/app-root/ 9 | 10 | RUN cd /src/app-root \ 11 | # we need to build the wheel in order to install the binary python \ 12 | # package that uses click to parse the command arguments 13 | && poetry build --format wheel \ 14 | && poetry export -o requirements.txt \ 15 | && poetry export --dev -o requirements_dev.txt 16 | 17 | FROM dockerhub.apps.cp.meteoswiss.ch/mch/python-3.10:latest-slim AS base 18 | ARG VERSION 19 | LABEL ch.meteoswiss.project=pyflexplot-${VERSION} 20 | 21 | COPY --from=builder /src/app-root/dist/*.whl /src/app-root/ 22 | COPY --from=builder /src/app-root/requirements.txt /src/app-root/ 23 | 24 | RUN pip install -r /src/app-root/requirements.txt \ 25 | && pip install /src/app-root/*.whl --no-deps \ 26 | && rm /src/app-root/*.whl 27 | 28 | WORKDIR /src/app-root 29 | 30 | FROM base AS runner 31 | ARG VERSION 32 | LABEL ch.meteoswiss.project=pyflexplot-${VERSION} 33 | 34 | RUN mkdir /src/app-root/data /src/app-root/output 35 | 36 | ENTRYPOINT ["pyflexplot"] 37 | 38 | FROM base AS tester 39 | ARG VERSION 40 | LABEL ch.meteoswiss.project=pyflexplot-${VERSION} 41 | 42 | COPY --from=builder /src/app-root/requirements_dev.txt /src/app-root/requirements_dev.txt 43 | RUN pip install -r /src/app-root/requirements_dev.txt 44 | 45 | COPY tests /src/app-root/tests 46 | -------------------------------------------------------------------------------- /HISTORY.md: -------------------------------------------------------------------------------- 1 | # History 2 | 3 | ## 2.0.x (2024-xx-xx) 4 | 5 | - Integrate poetry dependency management substituting conda development environments (following MCH python templates) 6 | - Automate distributable package generation using poetry 7 | - Configure CI/CD pipeline to run in MCH Jenkins server 8 | - Containerize pyflexplot tool to be able to run it within a container 9 | - Integrate AWS deployment 10 | 11 | ## 1.1.1 (2024-02-28) 12 | 13 | - Add presets and adapt code to plot FLEXPART-ICON output. by @pirmink in [#37](https://github.com/MeteoSwiss-APN/pyflexplot/pull/37) 14 | 15 | ## 1.1.0 (2024-01-16) 16 | 17 | - PyFlexPlot produces PDF or PNG plots from FLEXPART output in NetCDF format. This release adds the capability to write out shapefiles. -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2023 Federal Office of Meteorlogy and Climatology MeteoSwiss 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include AUTHORS.md 2 | include CONTRIBUTING.md 3 | include HISTORY.md 4 | include LICENSE 5 | include README.md 6 | 7 | recursive-include requirements * 8 | recursive-include src py.typed 9 | recursive-include src/*/data * 10 | recursive-include tests * 11 | recursive-exclude * __pycache__ 12 | recursive-exclude * *.py[co] 13 | 14 | recursive-include docs *.rst conf.py Makefile make.bat *.jpg *.png *.gif 15 | -------------------------------------------------------------------------------- /USAGE.md: -------------------------------------------------------------------------------- 1 | # Usage 2 | 3 | Use PyFlexPlot in a project: 4 | 5 | ```python 6 | import pyflexplot 7 | ``` 8 | 9 | Before running, make sure to activate your project environment: 10 | 11 | ```bash 12 | conda activate pyflexplot 13 | ``` 14 | -------------------------------------------------------------------------------- /img/integrated_concentration_site-Goesgen_species-1_domain-full_lang-de_ts-20200217T0900.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/img/integrated_concentration_site-Goesgen_species-1_domain-full_lang-de_ts-20200217T0900.png -------------------------------------------------------------------------------- /scripts/animate.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ ${#} -lt 3 ]; then 4 | echo "usage: $(basename "${0}") INFILE1 INFILE2 ... OUTFILE" >&2 5 | exit 1 6 | fi 7 | 8 | infiles=("${@}") 9 | outfile=${infiles[ -1]} 10 | unset infiles[-1] 11 | 12 | echo "${#infiles[@]} infiles:" 13 | for infile in ${infiles[@]}; do 14 | echo "${infile}" 15 | done 16 | echo "outfile: ${outfile}" 17 | 18 | delay=33 # in 0.01 s 19 | loop=0 # 0 for infinite 20 | convert -delay ${delay} -loop ${loop} ${infiles[@]} ${outfile%.gif}.gif 21 | -------------------------------------------------------------------------------- /scripts/count_loc.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Count lines of code. 4 | # 5 | # Dependencies: 6 | # - pygount (https://github.com/roskakori/pygount) 7 | # - datamash (https://www.gnu.org/software/datamash) 8 | # 9 | 10 | dirs=(${@}) 11 | [ ${#dirs[@]} -eq 0 ] && dirs=($(echo src/*/ tests/*/*/)) 12 | 13 | ntot=0 14 | for dir in ${dirs[@]} 15 | do 16 | [ "${dir: -1}" == "/" ] && dir="${dir:0: -1}" 17 | [ "${dir: -9}" == ".egg-info" ] && continue 18 | n=$(pygount -s=py ${dir} | cut -f1 | datamash sum 1) 19 | [ "${n}" == "" ] && n=0 20 | ntot=$((ntot + n)) 21 | echo -e "${n}\t${ntot}\t${dir}" 22 | done 23 | echo "${ntot}" 24 | -------------------------------------------------------------------------------- /sonar-project.properties: -------------------------------------------------------------------------------- 1 | sonar.projectVersion=n/a 2 | sonar.projectName=pyflexplot 3 | sonar.projectKey=pyflexplot_ZPtNsJpiEtdI 4 | sonar.python.version=3.11 5 | sonar.python.xunit.reportPath=test_reports/junit.xml 6 | sonar.python.coverage.reportPaths=test_reports/coverage.xml 7 | sonar.python.pylint.reportPath=test_reports/pylint.log 8 | sonar.sarifReportPaths=test_reports/config-report.sarif,test_reports/tflint.sarif 9 | sonar.coverage.exclusions=test/** 10 | sonar.exclusions=doc/**,security_reports/**,test_reports/** 11 | -------------------------------------------------------------------------------- /src/pyflexplot/cli/__init__.py: -------------------------------------------------------------------------------- 1 | """Subpackage ``pyflexplot.cli``.""" 2 | # Standard library 3 | from typing import List 4 | 5 | __author__ = """Stefan Ruedisuehli""" 6 | __email__ = "stefan.ruedisuehli@env.ethz.ch" 7 | __version__ = "1.0.10" 8 | 9 | __all__: List[str] = [] 10 | -------------------------------------------------------------------------------- /src/pyflexplot/cli/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/cli/py.typed -------------------------------------------------------------------------------- /src/pyflexplot/config/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/config/__init__.py -------------------------------------------------------------------------------- /src/pyflexplot/config/service_settings.py: -------------------------------------------------------------------------------- 1 | # Third party 2 | from pydantic import BaseModel 3 | 4 | # Local 5 | from .base_settings import BaseServiceSettings 6 | 7 | class Bucket(BaseModel): 8 | region: str 9 | name: str 10 | endpoint_url: str 11 | retries: int 12 | 13 | class S3(BaseModel): 14 | input: Bucket 15 | output: Bucket 16 | 17 | class AWS(BaseModel): 18 | s3: S3 19 | 20 | class Paths(BaseModel): 21 | input: str 22 | output: str 23 | 24 | class LocalSettings(BaseModel): 25 | paths: Paths 26 | 27 | class AppSettings(BaseModel): 28 | app_name: str 29 | aws: AWS 30 | local: LocalSettings 31 | 32 | class ServiceSettings(BaseServiceSettings): 33 | main: AppSettings 34 | -------------------------------------------------------------------------------- /src/pyflexplot/config/settings.yaml: -------------------------------------------------------------------------------- 1 | main: 2 | app_name: Pyflexplot 3 | aws: 4 | s3: 5 | input: 6 | region: eu-central-2 7 | name: meteoswiss-flexpart-flexpart-output-dev 8 | endpoint_url: "" 9 | retries: 10 10 | output: 11 | region: eu-central-2 12 | name: meteoswiss-flexpart-pyflexplot-output-dev 13 | endpoint_url: "" 14 | retries: 10 15 | local: 16 | paths: 17 | input: /src/app-root/data 18 | output: /src/app-root/output 19 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/.gitignore: -------------------------------------------------------------------------------- 1 | archive 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_10m_admin_0_countries_lakes.VERSION.txt: -------------------------------------------------------------------------------- 1 | 4.1.0 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_10m_admin_0_countries_lakes.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_10m_admin_0_countries_lakes.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_10m_admin_0_countries_lakes.dbf -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_10m_admin_0_countries_lakes.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.017453292519943295]] 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_10m_admin_0_countries_lakes.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_10m_admin_0_countries_lakes.shp -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_10m_admin_0_countries_lakes.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_10m_admin_0_countries_lakes.shx -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_10m_populated_places.VERSION.txt: -------------------------------------------------------------------------------- 1 | 4.1.0 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_10m_populated_places.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_10m_populated_places.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_10m_populated_places.dbf -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_10m_populated_places.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.017453292519943295]] 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_10m_populated_places.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_10m_populated_places.shp -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_10m_populated_places.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_10m_populated_places.shx -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_110m_admin_0_countries_lakes.VERSION.txt: -------------------------------------------------------------------------------- 1 | 4.1.0 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_110m_admin_0_countries_lakes.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_110m_admin_0_countries_lakes.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_110m_admin_0_countries_lakes.dbf -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_110m_admin_0_countries_lakes.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.017453292519943295]] 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_110m_admin_0_countries_lakes.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_110m_admin_0_countries_lakes.shp -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_110m_admin_0_countries_lakes.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_110m_admin_0_countries_lakes.shx -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_110m_populated_places.VERSION.txt: -------------------------------------------------------------------------------- 1 | 4.1.0 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_110m_populated_places.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_110m_populated_places.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_110m_populated_places.dbf -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_110m_populated_places.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.017453292519943295]] 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_110m_populated_places.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_110m_populated_places.shp -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_110m_populated_places.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_110m_populated_places.shx -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_50m_admin_0_countries_lakes.VERSION.txt: -------------------------------------------------------------------------------- 1 | 4.1.0 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_50m_admin_0_countries_lakes.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_50m_admin_0_countries_lakes.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_50m_admin_0_countries_lakes.dbf -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_50m_admin_0_countries_lakes.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_50m_admin_0_countries_lakes.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_50m_admin_0_countries_lakes.shp -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_50m_admin_0_countries_lakes.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_50m_admin_0_countries_lakes.shx -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_50m_populated_places.VERSION.txt: -------------------------------------------------------------------------------- 1 | 4.1.0 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_50m_populated_places.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_50m_populated_places.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_50m_populated_places.dbf -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_50m_populated_places.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.017453292519943295]] 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_50m_populated_places.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_50m_populated_places.shp -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_50m_populated_places.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/cultural/ne_50m_populated_places.shx -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_10m_coastline.VERSION.txt: -------------------------------------------------------------------------------- 1 | 4.1.0 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_10m_coastline.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_10m_coastline.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_10m_coastline.dbf -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_10m_coastline.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]] 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_10m_coastline.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_10m_coastline.shp -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_10m_coastline.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_10m_coastline.shx -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_10m_lakes.VERSION.txt: -------------------------------------------------------------------------------- 1 | 4.1.0 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_10m_lakes.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_10m_lakes.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_10m_lakes.dbf -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_10m_lakes.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_10m_lakes.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_10m_lakes.shp -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_10m_lakes.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_10m_lakes.shx -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_10m_lakes_europe.VERSION.txt: -------------------------------------------------------------------------------- 1 | 4.1.0 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_10m_lakes_europe.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_10m_lakes_europe.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_10m_lakes_europe.dbf -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_10m_lakes_europe.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.017453292519943295]] 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_10m_lakes_europe.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_10m_lakes_europe.shp -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_10m_lakes_europe.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_10m_lakes_europe.shx -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_10m_rivers_europe.VERSION.txt: -------------------------------------------------------------------------------- 1 | 4.1.0 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_10m_rivers_europe.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_10m_rivers_europe.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_10m_rivers_europe.dbf -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_10m_rivers_europe.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.017453292519943295]] 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_10m_rivers_europe.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_10m_rivers_europe.shp -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_10m_rivers_europe.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_10m_rivers_europe.shx -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_10m_rivers_lake_centerlines.VERSION.txt: -------------------------------------------------------------------------------- 1 | 4.1.0 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_10m_rivers_lake_centerlines.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_10m_rivers_lake_centerlines.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_10m_rivers_lake_centerlines.dbf -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_10m_rivers_lake_centerlines.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.017453292519943295]] 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_10m_rivers_lake_centerlines.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_10m_rivers_lake_centerlines.shp -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_10m_rivers_lake_centerlines.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_10m_rivers_lake_centerlines.shx -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_110m_coastline.VERSION.txt: -------------------------------------------------------------------------------- 1 | 4.1.0 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_110m_coastline.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_110m_coastline.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_110m_coastline.dbf -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_110m_coastline.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.017453292519943295]] 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_110m_coastline.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_110m_coastline.shp -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_110m_coastline.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_110m_coastline.shx -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_110m_lakes.VERSION.txt: -------------------------------------------------------------------------------- 1 | 4.1.0 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_110m_lakes.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_110m_lakes.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_110m_lakes.dbf -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_110m_lakes.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_110m_lakes.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_110m_lakes.shp -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_110m_lakes.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_110m_lakes.shx -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_110m_rivers_lake_centerlines.VERSION.txt: -------------------------------------------------------------------------------- 1 | 4.1.0 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_110m_rivers_lake_centerlines.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_110m_rivers_lake_centerlines.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_110m_rivers_lake_centerlines.dbf -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_110m_rivers_lake_centerlines.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_110m_rivers_lake_centerlines.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_110m_rivers_lake_centerlines.shp -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_110m_rivers_lake_centerlines.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_110m_rivers_lake_centerlines.shx -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_50m_coastline.VERSION.txt: -------------------------------------------------------------------------------- 1 | 4.1.0 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_50m_coastline.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_50m_coastline.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_50m_coastline.dbf -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_50m_coastline.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_50m_coastline.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_50m_coastline.shp -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_50m_coastline.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_50m_coastline.shx -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_50m_lakes.VERSION.txt: -------------------------------------------------------------------------------- 1 | 4.1.0 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_50m_lakes.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_50m_lakes.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_50m_lakes.dbf -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_50m_lakes.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_50m_lakes.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_50m_lakes.shp -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_50m_lakes.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_50m_lakes.shx -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_50m_rivers_lake_centerlines.VERSION.txt: -------------------------------------------------------------------------------- 1 | 4.1.0 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_50m_rivers_lake_centerlines.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_50m_rivers_lake_centerlines.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_50m_rivers_lake_centerlines.dbf -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_50m_rivers_lake_centerlines.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.017453292519943295]] 2 | -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_50m_rivers_lake_centerlines.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_50m_rivers_lake_centerlines.shp -------------------------------------------------------------------------------- /src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_50m_rivers_lake_centerlines.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/data/naturalearthdata/shapefiles/natural_earth/physical/ne_50m_rivers_lake_centerlines.shx -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/case_study/deterministic.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to create deterministic COSMO-1E-CTRL plots 2 | 3 | [_base] 4 | # Data source: tsa:/scratch/ruestefa/shared/test/pyflexplot/ 5 | infile = "data/cosmo-2e/grid_conc_xxxx_20190731000000_000.nc" 6 | model = "COSMO-2E" 7 | outfile = "case_study/cosmo-2e-ctrl_{plot_variable}_{release_site}_species-{species_id}_{domain}_{lang}_ts-{time_idx:02d}.png" 8 | combine_species = true 9 | # species_id = "*" 10 | species_id = 1 11 | 12 | [_base."_concentration+"] 13 | plot_variable = "concentration" 14 | level = 0 15 | time = "*" 16 | [_base."_concentration+"."_integr+"] 17 | integrate = true 18 | time = 11 19 | 20 | [_base._cloud] 21 | level = 0 22 | time = 0 23 | [_base._cloud."_arrival_time+"] 24 | plot_variable = "cloud_arrival_time" 25 | [_base._cloud."_departure_time+"] 26 | plot_variable = "cloud_departure_time" 27 | 28 | [_base._deposition] 29 | integrate = true 30 | time = 11 31 | [_base._deposition."_wet+"] 32 | plot_variable = "wet_deposition" 33 | [_base._deposition."_tot+"] 34 | plot_variable = "tot_deposition" 35 | 36 | [_base."_affected_area+"] 37 | plot_variable = "affected_area" 38 | level = 0 39 | time = 11 40 | integrate = true 41 | 42 | # ["**"._full.de] 43 | # domain = "full" 44 | # lang = "de" 45 | # ["**"._ch.de] 46 | # domain = "ch" 47 | # lang = "de" 48 | 49 | ["**"._full.en] 50 | domain = "full" 51 | lang = "en" 52 | # ["**"._ch.en] 53 | # domain = "ch" 54 | # lang = "en" 55 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/case_study/ens_cloud_timing.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to plot cloud arrival time. 2 | 3 | [_base] 4 | # Data source: tsa:/scratch/ruestefa/shared/test/pyflexplot/ 5 | infile = "data/cosmo-2e/grid_conc_xxxx_20190731000000_{ens_member:03d}.nc" 6 | ens_member_id = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20] 7 | model = "COSMO-2E" 8 | outfile = "case_study/cosmo-2e_{ens_variable}_{domain}_{lang}_ts-{time_idx:02d}.png" 9 | plot_variable = "concentration" 10 | ens_param_mem_min = 11 11 | ens_param_thr = 0.0 12 | combine_species = true 13 | # species_id = "*" 14 | species_id = 1 15 | time = 0 16 | level = 0 17 | 18 | [_base."_arrival_time+"] 19 | ens_variable = "cloud_arrival_time" 20 | [_base."_departure_time+"] 21 | ens_variable = "cloud_departure_time" 22 | 23 | # ["**"._full.de] 24 | # domain = "full" 25 | # lang = "de" 26 | # ["**"._ch.de] 27 | # domain = "ch" 28 | # lang = "de" 29 | 30 | ["**"._full.en] 31 | domain = "full" 32 | lang = "en" 33 | # ["**"._ch.en] 34 | # domain = "ch" 35 | # lang = "en" 36 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/case_study/ens_probability.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to create ensemble threshold agreement plots. 2 | 3 | [_base] 4 | # Data source: tsa:/scratch/ruestefa/shared/test/pyflexplot/ 5 | infile = "data/cosmo-2e/grid_conc_xxxx_20190731000000_{ens_member:03d}.nc" 6 | ens_member_id = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20] 7 | model = "COSMO-2E" 8 | outfile = "case_study/cosmo-2e_{plot_variable}_{ens_variable}_{domain}_{lang}_ts-{time_idx:02d}.png" 9 | ens_variable = "probability" 10 | ens_param_thr = 0 11 | combine_species = true 12 | # species_id = "*" 13 | species_id = 1 14 | time = -1 15 | 16 | [_base._concentration] 17 | plot_variable = "concentration" 18 | level = 0 19 | [_base._concentration."_integr+"] 20 | integrate = true 21 | 22 | [_base._deposition] 23 | integrate = true 24 | [_base._deposition."_tot+"] 25 | plot_variable = "tot_deposition" 26 | [_base._deposition."_wet+"] 27 | plot_variable = "wet_deposition" 28 | 29 | [_base."_affected_area+"] 30 | plot_variable = "affected_area" 31 | integrate = true 32 | level = 0 33 | 34 | # ["**"._full.de] 35 | # domain = "full" 36 | # lang = "de" 37 | # ["**"._ch.de] 38 | # domain = "ch" 39 | # lang = "de" 40 | 41 | ["**"._full.en] 42 | domain = "full" 43 | lang = "en" 44 | # ["**"._ch.en] 45 | # domain = "ch" 46 | # lang = "en" 47 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/opr/cosmo-1e-ctrl/all_pdf.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to create deterministic COSMO-1E-CTRL plots 2 | 3 | [_base] 4 | # Test data source: /store/mch/msopr/pyflexplot_testdata/ 5 | infile = "data/cosmo-1e-ctrl/grid_conc_0910_20200216000000.nc" 6 | model = "COSMO-1E" 7 | lang = "de" 8 | outfile_time_format = "%Y%m%dT%H%M" 9 | combine_species = false 10 | 11 | [_base._concentration] 12 | plot_variable = "concentration" 13 | level = 0 14 | 15 | [_base._concentration._integr] 16 | integrate = true 17 | time = -1 18 | 19 | [_base._tot_deposition] 20 | plot_variable = "tot_deposition" 21 | integrate = true 22 | 23 | [_base._affected_area] 24 | plot_variable = "affected_area" 25 | integrate = true 26 | level = 0 27 | time = -1 28 | combine_species = true 29 | 30 | [_base._concentration._multipanel_time] 31 | plot_type = "multipanel" 32 | multipanel_param = "time" 33 | time = [2, 4, 8, -1] 34 | 35 | [_base._concentration.full] 36 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Konzentration.pdf" 37 | domain = "full" 38 | [_base._concentration._integr.full] 39 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_integrierte_Luftaktivitaet.pdf" 40 | domain = "full" 41 | [_base._tot_deposition.full] 42 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Deposition.pdf" 43 | domain = "full" 44 | [_base._affected_area.full] 45 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_beaufschl_Gebiet.pdf" 46 | domain = "full" 47 | [_base._concentration._multipanel_time.full] 48 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Konzentration.pdf" 49 | domain = "full" 50 | 51 | [_base._concentration.zoom] 52 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Konzentration_zoom.pdf" 53 | domain = "ch" 54 | [_base._concentration._integr.zoom] 55 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_integrierte_Luftaktivitaet_zoom.pdf" 56 | domain = "ch" 57 | [_base._tot_deposition.zoom] 58 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Deposition_zoom.pdf" 59 | domain = "ch" 60 | [_base._affected_area.zoom] 61 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_beaufschl_Gebiet_zoom.pdf" 62 | domain = "ch" 63 | [_base._concentration._multipanel_time.zoom] 64 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Konzentration_zoom.pdf" 65 | domain = "ch" 66 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/opr/cosmo-1e-ctrl/all_png.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to create deterministic COSMO-1E-CTRL plots 2 | 3 | [_base] 4 | # Test data source: /store/mch/msopr/pyflexplot_testdata/ 5 | infile = "data/cosmo-1e-ctrl/grid_conc_0910_20200216000000.nc" 6 | model = "COSMO-1E" 7 | lang = "de" 8 | outfile_time_format = "%Y%m%dT%H%M" 9 | combine_species = false 10 | 11 | [_base._concentration] 12 | plot_variable = "concentration" 13 | level = 0 14 | 15 | [_base._concentration._integr] 16 | integrate = true 17 | time = -1 18 | 19 | [_base._tot_deposition] 20 | plot_variable = "tot_deposition" 21 | integrate = true 22 | 23 | [_base._affected_area] 24 | plot_variable = "affected_area" 25 | integrate = true 26 | level = 0 27 | time = -1 28 | combine_species = true 29 | 30 | [_base._concentration."_png+"] 31 | outfile = "concentration_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 32 | [_base._concentration._integr."_png+"] 33 | outfile = "integrated_concentration_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 34 | [_base._tot_deposition."_png+"] 35 | outfile = "deposition_tot_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 36 | [_base._affected_area."_png+"] 37 | outfile = "affected_area_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 38 | 39 | [_base._concentration."_multipanel_time+"] 40 | outfile = "concentration_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 41 | plot_type = "multipanel" 42 | multipanel_param = "time" 43 | time = [2, 4, 8, -1] 44 | 45 | ["**".full] 46 | domain = "full" 47 | 48 | ["**".zoom] 49 | domain = "ch" 50 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/opr/cosmo-1e-ctrl/all_shp.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to create deterministic COSMO-1E-CTRL shapefiles 2 | 3 | [_base] 4 | # Test data source: /store/mch/msopr/pyflexplot_testdata/ 5 | infile = "data/cosmo-1e-ctrl/grid_conc_0910_20200216000000.nc" 6 | model = "COSMO-1E" 7 | lang = "de" 8 | outfile_time_format = "%Y%m%dT%H%M" 9 | combine_species = false 10 | 11 | [_base._concentration] 12 | plot_variable = "concentration" 13 | level = 0 14 | 15 | [_base._concentration._integr] 16 | integrate = true 17 | time = -1 18 | 19 | [_base._tot_deposition] 20 | plot_variable = "tot_deposition" 21 | integrate = true 22 | 23 | [_base._affected_area] 24 | plot_variable = "affected_area" 25 | integrate = true 26 | level = 0 27 | time = -1 28 | combine_species = true 29 | 30 | [_base._concentration."_shp+"] 31 | outfile = "concentration_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.shp" 32 | [_base._concentration._integr."_shp+"] 33 | outfile = "integrated_concentration_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.shp" 34 | [_base._tot_deposition."_shp+"] 35 | outfile = "deposition_tot_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.shp" 36 | [_base._affected_area."_shp+"] 37 | outfile = "affected_area_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.shp" 38 | 39 | [_base._concentration."_multipanel_time+"] 40 | outfile = "concentration_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.shp" 41 | plot_type = "multipanel" 42 | multipanel_param = "time" 43 | time = [2, 4, 8, -1] 44 | 45 | ["**".full] 46 | domain = "full" 47 | 48 | ["**".zoom] 49 | domain = "ch" 50 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/opr/cosmo-1e/all_shp.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to create ensemble COSMO-1E shapefiles 2 | 3 | [_base] 4 | # Test data source: /store/mch/msopr/pyflexplot_testdata/ 5 | infile = "data/cosmo-1e/2021030503/{ens_member:03}/grid_conc_20210305030000.nc_GOE" 6 | ens_member_id = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] 7 | model = "COSMO-1E" 8 | lang = "de" 9 | outfile_time_format = "%Y%m%dT%H%M" 10 | combine_species = true 11 | 12 | [_base._concentration] 13 | plot_variable = "concentration" 14 | level = 0 15 | integrate = false 16 | time = "*" 17 | 18 | [_base._concentration._integr] 19 | integrate = true 20 | time = -1 21 | 22 | [_base._tot_deposition] 23 | plot_variable = "tot_deposition" 24 | integrate = true 25 | time = -1 26 | 27 | [_base._affected_area] 28 | plot_variable = "affected_area" 29 | integrate = true 30 | level = 0 31 | time = -1 32 | 33 | [_base._concentration."_probability+"] 34 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_probability_{domain}.shp" 35 | ens_variable = "probability" 36 | ens_param_thr = 0 37 | [_base._concentration._integr."_probability+"] 38 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_probability_{domain}.shp" 39 | ens_variable = "probability" 40 | ens_param_thr = 0 41 | [_base._tot_deposition."_probability+"] 42 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_probability_{domain}.shp" 43 | ens_variable = "probability" 44 | ens_param_thr = 0 45 | [_base._affected_area."_probability+"] 46 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_probability_{domain}.shp" 47 | ens_variable = "probability" 48 | ens_param_thr = 0 49 | 50 | ["**".ch] 51 | domain = "ch" 52 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/opr/cosmo-2e-ctrl/all_pdf.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to create deterministic COSMO-2E-CTRL plots 2 | 3 | [_base] 4 | # Data source: tsa:/scratch/ruestefa/shared/test/pyflexplot/ 5 | infile = "data/cosmo-2e/2021030503/000/grid_conc_20210305030000.nc_BUG" 6 | model = "COSMO-2E" 7 | lang = "de" 8 | outfile_time_format = "%Y%m%dT%H%M" 9 | combine_species = false 10 | 11 | [_base._concentration] 12 | plot_variable = "concentration" 13 | level = 0 14 | 15 | [_base._concentration._integr] 16 | integrate = true 17 | time = -1 18 | 19 | [_base._tot_deposition] 20 | plot_variable = "tot_deposition" 21 | integrate = true 22 | 23 | [_base._affected_area] 24 | plot_variable = "affected_area" 25 | integrate = true 26 | level = 0 27 | time = -1 28 | combine_species = true 29 | 30 | [_base._concentration._multipanel_time] 31 | plot_type = "multipanel" 32 | multipanel_param = "time" 33 | time = [2, 4, 8, -1] 34 | 35 | [_base._concentration.full] 36 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Konzentration.pdf" 37 | domain = "full" 38 | [_base._concentration._integr.full] 39 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_integrierte_Luftaktivitaet.pdf" 40 | domain = "full" 41 | [_base._tot_deposition.full] 42 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Deposition.pdf" 43 | domain = "full" 44 | [_base._affected_area.full] 45 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_beaufschl_Gebiet.pdf" 46 | domain = "full" 47 | [_base._concentration._multipanel_time.full] 48 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Konzentration.pdf" 49 | domain = "full" 50 | 51 | [_base._concentration.zoom] 52 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Konzentration_zoom.pdf" 53 | domain = "ch" 54 | [_base._concentration._integr.zoom] 55 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_integrierte_Luftaktivitaet_zoom.pdf" 56 | domain = "ch" 57 | [_base._tot_deposition.zoom] 58 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Deposition_zoom.pdf" 59 | domain = "ch" 60 | [_base._affected_area.zoom] 61 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_beaufschl_Gebiet_zoom.pdf" 62 | domain = "ch" 63 | [_base._concentration._multipanel_time.zoom] 64 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Konzentration_zoom.pdf" 65 | domain = "ch" 66 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/opr/cosmo-2e-ctrl/all_png.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to create deterministic COSMO-2E-CTRL plots 2 | 3 | [_base] 4 | # Data source: tsa:/scratch/ruestefa/shared/test/pyflexplot/ 5 | infile = "data/cosmo-2e/2021030503/000/grid_conc_20210305030000.nc_BUG" 6 | model = "COSMO-2E" 7 | lang = "de" 8 | outfile_time_format = "%Y%m%dT%H%M" 9 | combine_species = false 10 | 11 | [_base._concentration] 12 | plot_variable = "concentration" 13 | level = 0 14 | 15 | [_base._concentration._integr] 16 | integrate = true 17 | time = -1 18 | 19 | [_base._tot_deposition] 20 | plot_variable = "tot_deposition" 21 | integrate = true 22 | 23 | [_base._affected_area] 24 | plot_variable = "affected_area" 25 | integrate = true 26 | level = 0 27 | time = -1 28 | combine_species = true 29 | 30 | [_base._concentration."_png+"] 31 | outfile = "concentration_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 32 | [_base._concentration._integr."_png+"] 33 | outfile = "integrated_concentration_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 34 | [_base._tot_deposition."_png+"] 35 | outfile = "deposition_tot_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 36 | [_base._affected_area."_png+"] 37 | outfile = "affected_area_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 38 | 39 | [_base._concentration."_multipanel_time+"] 40 | outfile = "concentration_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 41 | plot_type = "multipanel" 42 | multipanel_param = "time" 43 | time = [2, 4, 8, -1] 44 | 45 | ["**".full] 46 | domain = "full" 47 | 48 | ["**".zoom] 49 | domain = "ch" 50 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/opr/cosmo-2e/all_shp.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to create ensemble COSMO-2E shapefiles 2 | 3 | [_base] 4 | # Test data source: /store/mch/msopr/pyflexplot_testdata/ 5 | infile = "data/cosmo-2e/2021030503/{ens_member:03}/grid_conc_20210305030000.nc_GOE" 6 | ens_member_id = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20] 7 | model = "COSMO-2E" 8 | lang = "de" 9 | outfile_time_format = "%Y%m%dT%H%M" 10 | combine_species = true 11 | 12 | [_base._concentration] 13 | plot_variable = "concentration" 14 | level = 0 15 | integrate = false 16 | time = "*" 17 | 18 | [_base._concentration._integr] 19 | integrate = true 20 | time = -1 21 | 22 | [_base._tot_deposition] 23 | plot_variable = "tot_deposition" 24 | integrate = true 25 | time = -1 26 | 27 | [_base._affected_area] 28 | plot_variable = "affected_area" 29 | integrate = true 30 | level = 0 31 | time = -1 32 | 33 | [_base._concentration."_probability+"] 34 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_probability_{domain}.shp" 35 | ens_variable = "probability" 36 | ens_param_thr = 0 37 | [_base._concentration._integr."_probability+"] 38 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_probability_{domain}.shp" 39 | ens_variable = "probability" 40 | ens_param_thr = 0 41 | [_base._tot_deposition."_probability+"] 42 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_probability_{domain}.shp" 43 | ens_variable = "probability" 44 | ens_param_thr = 0 45 | [_base._affected_area."_probability+"] 46 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_probability_{domain}.shp" 47 | ens_variable = "probability" 48 | ens_param_thr = 0 49 | 50 | ["**".ch] 51 | domain = "ch" 52 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/opr/icon-ch1-ctrl/all_pdf.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to create deterministic ICON-CH1-CTRL plots in PDF format 2 | 3 | [_base] 4 | # Test data source: /store_new/mch/msopr/pyflexplot_testdata/ 5 | infile = "data/icon-ch1-ctrl/grid_conc_20240604210000_BUG.nc" 6 | model = "ICON-CH1-CTRL" 7 | lang = "de" 8 | outfile_time_format = "%Y%m%dT%H%M" 9 | combine_species = false 10 | 11 | [_base._concentration] 12 | plot_variable = "concentration" 13 | level = 0 14 | 15 | [_base._concentration._integr] 16 | integrate = true 17 | time = -1 18 | 19 | [_base._tot_deposition] 20 | plot_variable = "tot_deposition" 21 | integrate = true 22 | 23 | [_base._affected_area] 24 | plot_variable = "affected_area" 25 | integrate = true 26 | level = 0 27 | time = -1 28 | combine_species = true 29 | 30 | [_base._concentration._multipanel_time] 31 | plot_type = "multipanel" 32 | multipanel_param = "time" 33 | time = [2, 4, 8, -1] 34 | 35 | [_base._concentration.full] 36 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Konzentration.pdf" 37 | domain = "full" 38 | [_base._concentration._integr.full] 39 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_integrierte_Luftaktivitaet.pdf" 40 | domain = "full" 41 | [_base._tot_deposition.full] 42 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Deposition.pdf" 43 | domain = "full" 44 | [_base._affected_area.full] 45 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_beaufschl_Gebiet.pdf" 46 | domain = "full" 47 | [_base._concentration._multipanel_time.full] 48 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Konzentration.pdf" 49 | domain = "full" 50 | 51 | [_base._concentration.zoom] 52 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Konzentration_zoom.pdf" 53 | domain = "ch" 54 | [_base._concentration._integr.zoom] 55 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_integrierte_Luftaktivitaet_zoom.pdf" 56 | domain = "ch" 57 | [_base._tot_deposition.zoom] 58 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Deposition_zoom.pdf" 59 | domain = "ch" 60 | [_base._affected_area.zoom] 61 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_beaufschl_Gebiet_zoom.pdf" 62 | domain = "ch" 63 | [_base._concentration._multipanel_time.zoom] 64 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Konzentration_zoom.pdf" 65 | domain = "ch" 66 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/opr/icon-ch1-ctrl/all_png.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to create deterministic ICON-CH1-CTRL plots in PNG format 2 | 3 | [_base] 4 | # Test data source: /store_new/mch/msopr/pyflexplot_testdata/ 5 | infile = "data/icon-ch1-ctrl/grid_conc_20240604210000_BUG.nc" 6 | model = "ICON-CH1-CTRL" 7 | lang = "de" 8 | outfile_time_format = "%Y%m%dT%H%M" 9 | combine_species = false 10 | outfile = "forecast-iconch1eps-dispersion~{base_time}~{plot_variable}~{domain}~{release_site}~{species_id}~{time_step}.png" 11 | 12 | [_base._concentration] 13 | plot_variable = "concentration" 14 | level = 0 15 | 16 | [_base._concentration._integr] 17 | integrate = true 18 | time = -1 19 | 20 | [_base._tot_deposition] 21 | plot_variable = "tot_deposition" 22 | integrate = true 23 | 24 | [_base._affected_area] 25 | plot_variable = "affected_area" 26 | integrate = true 27 | level = 0 28 | time = -1 29 | combine_species = true 30 | 31 | [_base._concentration."_png+"] 32 | 33 | [_base._concentration._integr."_png+"] 34 | 35 | [_base._tot_deposition."_png+"] 36 | 37 | [_base._affected_area."_png+"] 38 | 39 | ["**".full] 40 | domain = "full" 41 | 42 | ["**".zoom] 43 | domain = "ch" 44 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/opr/icon-ch1-ctrl/all_shp.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to create deterministic ICON-CH1-CTRL shapefiles 2 | 3 | [_base] 4 | # Test data source: /store_new/mch/msopr/pyflexplot_testdata/ 5 | infile = "data/icon-ch1-ctrl/grid_conc_20240604210000_BUG.nc" 6 | model = "ICON-CH1-CTRL" 7 | lang = "de" 8 | outfile_time_format = "%Y%m%dT%H%M" 9 | combine_species = false 10 | 11 | [_base._concentration] 12 | plot_variable = "concentration" 13 | level = 0 14 | 15 | [_base._concentration._integr] 16 | integrate = true 17 | time = -1 18 | 19 | [_base._tot_deposition] 20 | plot_variable = "tot_deposition" 21 | integrate = true 22 | 23 | [_base._affected_area] 24 | plot_variable = "affected_area" 25 | integrate = true 26 | level = 0 27 | time = -1 28 | combine_species = true 29 | 30 | [_base._concentration."_shp+"] 31 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Konzentration_{species_id}_{time_step}.shp" 32 | 33 | [_base._concentration._integr."_shp+"] 34 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_integrierte_Luftaktivitaet_{species_id}.shp" 35 | 36 | [_base._tot_deposition."_shp+"] 37 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Deposition_{species_id}_{time_step}.shp" 38 | 39 | [_base._affected_area."_shp+"] 40 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_beaufschl_Gebiet.shp" 41 | 42 | ["**".full] 43 | domain = "full" 44 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/opr/ifs-hres-eu/all_pdf.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to create deterministic IFS-HRES-EU plots in PDF format 2 | 3 | [_base] 4 | # Test data source: /store_new/mch/msopr/pyflexplot_testdata/ 5 | infile = "data/ifs-hres-eu/grid_conc_0999_20200818000000_fessenheim_5spec.nc" 6 | model = "IFS-HRES-EU" 7 | lang = "de" 8 | outfile_time_format = "%Y%m%dT%H%M" 9 | combine_species = false 10 | 11 | [_base._concentration] 12 | plot_variable = "concentration" 13 | level = 0 14 | 15 | [_base._concentration._integr] 16 | integrate = true 17 | time = -1 18 | 19 | [_base._tot_deposition] 20 | plot_variable = "tot_deposition" 21 | integrate = true 22 | 23 | [_base._affected_area] 24 | plot_variable = "affected_area" 25 | integrate = true 26 | level = 0 27 | time = -1 28 | combine_species = true 29 | 30 | [_base._concentration._multipanel_time] 31 | plot_type = "multipanel" 32 | multipanel_param = "time" 33 | time = [2, 4, 8, -1] 34 | 35 | [_base._concentration.full] 36 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Konzentration.pdf" 37 | domain = "full" 38 | [_base._concentration._integr.full] 39 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_integrierte_Luftaktivitaet.pdf" 40 | domain = "full" 41 | [_base._tot_deposition.full] 42 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Deposition.pdf" 43 | domain = "full" 44 | [_base._affected_area.full] 45 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_beaufschl_Gebiet.pdf" 46 | domain = "full" 47 | [_base._concentration._multipanel_time.full] 48 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Konzentration.pdf" 49 | domain = "full" 50 | 51 | [_base._concentration.zoom] 52 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Konzentration_zoom.pdf" 53 | domain = "alps" 54 | [_base._concentration._integr.zoom] 55 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_integrierte_Luftaktivitaet_zoom.pdf" 56 | domain = "alps" 57 | [_base._tot_deposition.zoom] 58 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Deposition_zoom.pdf" 59 | domain = "alps" 60 | [_base._affected_area.zoom] 61 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_beaufschl_Gebiet_zoom.pdf" 62 | domain = "alps" 63 | [_base._concentration._multipanel_time.zoom] 64 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Konzentration_zoom.pdf" 65 | domain = "alps" 66 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/opr/ifs-hres-eu/all_png.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to create deterministic IFS-EU plots in PNG format 2 | 3 | [_base] 4 | # Test data source: /store_new/mch/msopr/pyflexplot_testdata/ 5 | infile = "data/ifs-hres-eu/grid_conc_0999_20200818000000_fessenheim_5spec.nc" 6 | model = "IFS-HRES-EU" 7 | lang = "de" 8 | outfile_time_format = "%Y%m%dT%H%M" 9 | combine_species = false 10 | outfile = "forecast-ifs-eu-dispersion~{base_time}~{plot_variable}~{domain}~{release_site}~1~{time_step}.png" 11 | 12 | [_base._concentration] 13 | plot_variable = "concentration" 14 | level = 0 15 | 16 | [_base._concentration._integr] 17 | integrate = true 18 | time = -1 19 | 20 | [_base._tot_deposition] 21 | plot_variable = "tot_deposition" 22 | integrate = true 23 | 24 | [_base._affected_area] 25 | plot_variable = "affected_area" 26 | integrate = true 27 | level = 0 28 | time = -1 29 | combine_species = true 30 | 31 | [_base._concentration."_png+"] 32 | 33 | [_base._concentration._integr."_png+"] 34 | 35 | [_base._tot_deposition."_png+"] 36 | 37 | [_base._affected_area."_png+"] 38 | 39 | ["**".full] 40 | domain = "full" 41 | 42 | ["**".zoom] 43 | domain = "alps" 44 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/opr/ifs-hres-eu/all_shp.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to create deterministic IFS-EU shapefiles 2 | 3 | [_base] 4 | # Test data source: /store_new/mch/msopr/pyflexplot_testdata/ 5 | infile = "data/ifs-hres-eu/grid_conc_0999_20200818000000_fessenheim_5spec.nc" 6 | model = "IFS-HRES-EU" 7 | lang = "de" 8 | outfile_time_format = "%Y%m%dT%H%M" 9 | combine_species = false 10 | 11 | [_base._concentration] 12 | plot_variable = "concentration" 13 | level = 0 14 | 15 | [_base._concentration._integr] 16 | integrate = true 17 | time = -1 18 | 19 | [_base._tot_deposition] 20 | plot_variable = "tot_deposition" 21 | integrate = true 22 | 23 | [_base._affected_area] 24 | plot_variable = "affected_area" 25 | integrate = true 26 | level = 0 27 | time = -1 28 | combine_species = true 29 | 30 | [_base._concentration."_shp+"] 31 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Konzentration_{species_id}_{time_step}.shp" 32 | 33 | [_base._concentration._integr."_shp+"] 34 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_integrierte_Luftaktivitaet_{species_id}.shp" 35 | 36 | [_base._tot_deposition."_shp+"] 37 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Deposition_{species_id}_{time_step}.shp" 38 | 39 | [_base._affected_area."_shp+"] 40 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_beaufschl_Gebiet.shp" 41 | 42 | ["**".full] 43 | domain = "full" 44 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/opr/ifs-hres/all_pdf.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to create deterministic IFS-HRES plots in PDF format 2 | 3 | [_base] 4 | # Test data source: /store_new/mch/msopr/pyflexplot_testdata/ 5 | infile = "data/ifs-hres/grid_conc_1000_20200818000000_bushehr_2spec.nc" 6 | model = "IFS-HRES" 7 | lang = "de" 8 | outfile_time_format = "%Y%m%dT%H%M" 9 | combine_species = false 10 | 11 | [_base._concentration] 12 | plot_variable = "concentration" 13 | level = 0 14 | 15 | [_base._concentration._integr] 16 | integrate = true 17 | time = -1 18 | 19 | [_base._tot_deposition] 20 | plot_variable = "tot_deposition" 21 | integrate = true 22 | 23 | [_base._affected_area] 24 | plot_variable = "affected_area" 25 | integrate = true 26 | level = 0 27 | time = -1 28 | combine_species = true 29 | 30 | [_base._concentration._multipanel_time] 31 | plot_type = "multipanel" 32 | multipanel_param = "time" 33 | time = [2, 4, 8, -1] 34 | 35 | [_base._concentration.full] 36 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Konzentration.pdf" 37 | domain = "cloud" 38 | [_base._concentration._integr.full] 39 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_integrierte_Luftaktivitaet.pdf" 40 | domain = "cloud" 41 | [_base._tot_deposition.full] 42 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Deposition.pdf" 43 | domain = "cloud" 44 | [_base._affected_area.full] 45 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_beaufschl_Gebiet.pdf" 46 | domain = "cloud" 47 | [_base._concentration._multipanel_time.full] 48 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Konzentration.pdf" 49 | domain = "cloud" 50 | 51 | [_base._concentration.zoom] 52 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Konzentration_zoom.pdf" 53 | domain = "release_site" 54 | [_base._concentration._integr.zoom] 55 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_integrierte_Luftaktivitaet_zoom.pdf" 56 | domain = "release_site" 57 | [_base._tot_deposition.zoom] 58 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Deposition_zoom.pdf" 59 | domain = "release_site" 60 | [_base._affected_area.zoom] 61 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_beaufschl_Gebiet_zoom.pdf" 62 | domain = "release_site" 63 | [_base._concentration._multipanel_time.zoom] 64 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Konzentration_zoom.pdf" 65 | domain = "release_site" 66 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/opr/ifs-hres/all_png.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to create deterministic IFS plots in PNG format 2 | 3 | [_base] 4 | # Test data source: /store_new/mch/msopr/pyflexplot_testdata/ 5 | infile = "data/ifs-hres/grid_conc_1000_20200818000000_bushehr_2spec.nc" 6 | model = "IFS-HRES" 7 | lang = "de" 8 | outfile_time_format = "%Y%m%dT%H%M" 9 | combine_species = false 10 | outfile = "forecast-ifs-dispersion~{base_time}~{plot_variable}~{domain}~{release_site}~1~{time_step}.png" 11 | 12 | [_base._concentration] 13 | plot_variable = "concentration" 14 | level = 0 15 | 16 | [_base._concentration._integr] 17 | integrate = true 18 | time = -1 19 | 20 | [_base._tot_deposition] 21 | plot_variable = "tot_deposition" 22 | integrate = true 23 | 24 | [_base._affected_area] 25 | plot_variable = "affected_area" 26 | integrate = true 27 | level = 0 28 | time = -1 29 | combine_species = true 30 | 31 | [_base._concentration."_png+"] 32 | 33 | [_base._concentration._integr."_png+"] 34 | 35 | [_base._tot_deposition."_png+"] 36 | 37 | [_base._affected_area."_png+"] 38 | 39 | ["**".full] 40 | domain = "cloud" 41 | 42 | ["**".zoom] 43 | domain = "release_site" 44 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/opr/ifs-hres/all_shp.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to create deterministic IFS shapefiles 2 | 3 | [_base] 4 | # Test data source: /store_new/mch/msopr/pyflexplot_testdata/ 5 | infile = "data/ifs-hres/grid_conc_1000_20200818000000_bushehr_2spec.nc" 6 | model = "IFS-HRES" 7 | lang = "de" 8 | outfile_time_format = "%Y%m%dT%H%M" 9 | combine_species = false 10 | 11 | [_base._concentration] 12 | plot_variable = "concentration" 13 | level = 0 14 | 15 | [_base._concentration._integr] 16 | integrate = true 17 | time = -1 18 | 19 | [_base._tot_deposition] 20 | plot_variable = "tot_deposition" 21 | integrate = true 22 | 23 | [_base._affected_area] 24 | plot_variable = "affected_area" 25 | integrate = true 26 | level = 0 27 | time = -1 28 | combine_species = true 29 | 30 | [_base._concentration."_shp+"] 31 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Konzentration_{species_id}_{time_step}.shp" 32 | 33 | [_base._concentration._integr."_shp+"] 34 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_integrierte_Luftaktivitaet_{species_id}.shp" 35 | 36 | [_base._tot_deposition."_shp+"] 37 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Deposition_{species_id}_{time_step}.shp" 38 | 39 | [_base._affected_area."_shp+"] 40 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_beaufschl_Gebiet.shp" 41 | 42 | ["**".full] 43 | domain = "cloud" 44 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/test/cosmo-1e-ctrl/affected_area.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to create deterministic COSMO-1E-CTRL plots 2 | # Derived from opr/cosmo-1e-ctrl/all_png.toml 3 | 4 | [_base] 5 | # Data source: tsa:/scratch/ruestefa/shared/test/pyflexplot/ 6 | infile = "data/cosmo-1e-ctrl/grid_conc_0910_20200216000000.nc" 7 | model = "COSMO-1E" 8 | lang = "de" 9 | outfile_time_format = "%Y%m%dT%H%M" 10 | combine_species = false 11 | 12 | # [_base._concentration] 13 | # plot_variable = "concentration" 14 | # level = 0 15 | 16 | # [_base._concentration._integr] 17 | # integrate = true 18 | # time = -1 19 | 20 | # [_base._tot_deposition] 21 | # plot_variable = "tot_deposition" 22 | # integrate = true 23 | 24 | [_base._affected_area] 25 | plot_variable = "affected_area" 26 | integrate = true 27 | level = 0 28 | time = -1 29 | combine_species = true 30 | 31 | # [_base._concentration."_png+"] 32 | # outfile = "concentration_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 33 | # [_base._concentration._integr."_png+"] 34 | # outfile = "integrated_concentration_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 35 | # [_base._tot_deposition."_png+"] 36 | # outfile = "deposition_tot_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 37 | [_base._affected_area."_png+"] 38 | outfile = "affected_area_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 39 | 40 | ["**"._de.ch] 41 | lang = "de" 42 | domain = "ch" 43 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/test/cosmo-1e-ctrl/cloud_timing.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to create deterministic COSMO-1E-CTRL plots 2 | 3 | [_base] 4 | # Data source: tsa:/scratch/ruestefa/shared/test/pyflexplot/ 5 | infile = "data/cosmo-1e-ctrl/grid_conc_0910_20200216000000.nc" 6 | model = "COSMO-1E" 7 | outfile_time_format = "%Y%m%dT%H%M" 8 | species_id = 1 9 | 10 | [_base._cloud] 11 | level = 0 12 | time = 0 13 | # time = "*" 14 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_{plot_variable}_{time_step}.png" 15 | 16 | [_base._cloud."_arrival+"] 17 | plot_variable = "cloud_arrival_time" 18 | [_base._cloud."_departure+"] 19 | plot_variable = "cloud_departure_time" 20 | 21 | ["**"._de.ch] 22 | lang = "de" 23 | domain = "ch" 24 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/test/cosmo-1e-ctrl/concentration.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to create deterministic COSMO-1E-CTRL plots 2 | # Derived from opr/cosmo-1e-ctrl/all_png.toml 3 | 4 | [_base] 5 | # Data source: tsa:/scratch/ruestefa/shared/test/pyflexplot/ 6 | infile = "data/cosmo-1e-ctrl/grid_conc_0910_20200216000000.nc" 7 | name = "COSMO-1E" 8 | outfile_time_format = "%Y%m%dT%H%M" 9 | combine_species = false 10 | 11 | [_base._concentration] 12 | plot_variable = "concentration" 13 | level = 0 14 | 15 | # [_base._concentration._integr] 16 | # integrate = true 17 | # time = -1 18 | 19 | # [_base._tot_deposition] 20 | # plot_variable = "tot_deposition" 21 | # integrate = true 22 | 23 | # [_base._affected_area] 24 | # plot_variable = "affected_area" 25 | # integrate = true 26 | # level = 0 27 | # time = -1 28 | # combine_species = true 29 | 30 | [_base._concentration."_png+"] 31 | outfile = "concentration_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 32 | # [_base._concentration._integr."_png+"] 33 | # outfile = "integrated_concentration_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 34 | # [_base._tot_deposition."_png+"] 35 | # outfile = "deposition_tot_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 36 | # [_base._affected_area."_png+"] 37 | # outfile = "affected_area_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 38 | 39 | ["**"._de.ch] 40 | lang = "de" 41 | domain = "ch" 42 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/test/cosmo-1e-ctrl/deposition.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to create deterministic COSMO-1E-CTRL plots 2 | # Derived from opr/cosmo-1e-ctrl/all_pdf.toml 3 | 4 | [_base] 5 | # Data source: tsa:/scratch/ruestefa/shared/test/pyflexplot/ 6 | infile = "data/cosmo-1e-ctrl/grid_conc_0910_20200216000000.nc" 7 | model = "COSMO-1E" 8 | outfile_time_format = "%Y%m%dT%H%M" 9 | combine_species = false 10 | 11 | # [_base._concentration] 12 | # plot_variable = "concentration" 13 | # level = 0 14 | 15 | # [_base._concentration._integr] 16 | # integrate = true 17 | # time = -1 18 | 19 | [_base._tot_deposition] 20 | plot_variable = "tot_deposition" 21 | integrate = true 22 | 23 | # [_base._affected_area] 24 | # plot_variable = "affected_area" 25 | # integrate = true 26 | # level = 0 27 | # time = -1 28 | # combine_species = true 29 | 30 | # [_base._concentration."_png+"] 31 | # outfile = "concentration_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 32 | # [_base._concentration._integr."_png+"] 33 | # outfile = "integrated_concentration_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 34 | [_base._tot_deposition."_png+"] 35 | outfile = "deposition_tot_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 36 | # [_base._affected_area."_png+"] 37 | # outfile = "affected_area_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 38 | 39 | ["**"._de.ch] 40 | lang = "de" 41 | domain = "ch" 42 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/test/cosmo-1e-ctrl/integrated_concentration.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to create deterministic COSMO-1E-CTRL plots 2 | # Derived from opr/cosmo-1e-ctrl/all_png.toml 3 | 4 | [_base] 5 | # Data source: tsa:/scratch/ruestefa/shared/test/pyflexplot/ 6 | infile = "data/cosmo-1e-ctrl/grid_conc_0910_20200216000000.nc" 7 | model = "COSMO-1E" 8 | outfile_time_format = "%Y%m%dT%H%M" 9 | combine_species = false 10 | 11 | [_base._concentration] 12 | plot_variable = "concentration" 13 | level = 0 14 | 15 | [_base._concentration._integr] 16 | integrate = true 17 | time = -1 18 | 19 | # [_base._tot_deposition] 20 | # plot_variable = "tot_deposition" 21 | # integrate = true 22 | 23 | # [_base._affected_area] 24 | # plot_variable = "affected_area" 25 | # integrate = true 26 | # level = 0 27 | # time = -1 28 | # combine_species = true 29 | 30 | # [_base._concentration."_png+"] 31 | # outfile = "concentration_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 32 | [_base._concentration._integr."_png+"] 33 | outfile = "integrated_concentration_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 34 | # [_base._tot_deposition."_png+"] 35 | # outfile = "deposition_tot_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 36 | # [_base._affected_area."_png+"] 37 | # outfile = "affected_area_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 38 | 39 | ["**"._de.ch] 40 | lang = "de" 41 | domain = "ch" 42 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/test/cosmo-2e-ctrl/all_png.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to create deterministic COSMO-1E-CTRL plots 2 | 3 | [_base] 4 | # Data source: tsa:/scratch/ruestefa/shared/test/pyflexplot/ 5 | infile = "data/cosmo-2e/2021041100/000/grid_conc_20210411030000_MUE.nc" 6 | model = "COSMO-2E" 7 | lang = "de" 8 | outfile_time_format = "%Y%m%dT%H%M" 9 | combine_species = false 10 | 11 | [_base._concentration] 12 | plot_variable = "concentration" 13 | level = 0 14 | 15 | [_base._concentration._integr] 16 | integrate = true 17 | time = -1 18 | 19 | [_base._tot_deposition] 20 | plot_variable = "tot_deposition" 21 | integrate = true 22 | 23 | [_base._affected_area] 24 | plot_variable = "affected_area" 25 | integrate = true 26 | level = 0 27 | time = -1 28 | combine_species = true 29 | 30 | [_base._concentration."_png+"] 31 | outfile = "{model}_concentration_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 32 | [_base._concentration._integr."_png+"] 33 | outfile = "{model}_integrated_concentration_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 34 | [_base._tot_deposition."_png+"] 35 | outfile = "{model}_deposition_tot_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 36 | [_base._affected_area."_png+"] 37 | outfile = "{model}_affected_area_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 38 | 39 | ["**".full] 40 | domain = "full" 41 | 42 | ["**".ch] 43 | domain = "ch" 44 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/test/cosmo-2e-ctrl/multipanel_time.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to plot multiple time steps in one plot. 2 | 3 | [_base] 4 | # Data source: tsa:/scratch/ruestefa/shared/test/pyflexplot/ 5 | infile = "data/cosmo-2e/2021041100/000/grid_conc_20210411030000_MUE.nc" 6 | outfile = "{model}_{plot_variable}_species-{species_id}_{domain}_{lang}_ts-{time_idx:02d}.png" 7 | model = "COSMO-2E" 8 | plot_type = "multipanel" 9 | multipanel_param = "time" 10 | time = [2, 4, 8, 12] 11 | species_id = "*" 12 | combine_species = true 13 | 14 | [_base."_concentration+"] 15 | plot_variable = "concentration" 16 | level = 0 17 | 18 | # ["**"._full.de] 19 | # domain = "full" 20 | # lang = "de" 21 | 22 | ["**"._full.en] 23 | domain = "full" 24 | lang = "en" 25 | 26 | # ["**"._ch.de] 27 | # domain = "ch" 28 | # lang = "de" 29 | 30 | # ["**"._ch.en] 31 | # domain = "ch" 32 | # lang = "en" 33 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/test/cosmo-2e/cloud_timing.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to plot cloud arrival time. 2 | 3 | [_base] 4 | # Data source: tsa:/scratch/ruestefa/shared/test/pyflexplot/ 5 | infile = "data/cosmo-2e/2021041100/{ens_member:03d}/grid_conc_20210411030000_MUE.nc" 6 | ens_member_id = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20] 7 | # ens_member_id = [0, 2, 5, 8, 11, 14, 17, 20] 8 | model = "COSMO-2E" 9 | outfile = "cosmo-2e_{ens_variable}_{domain}_{lang}_ts-{time_idx:02d}.png" 10 | plot_variable = "concentration" 11 | ens_param_mem_min = 1 12 | ens_param_thr = 0.0 13 | time = 0 14 | combine_species = true 15 | # species_id = "*" 16 | species_id = 1 17 | level = 0 18 | 19 | [_base."_arrival_time+"] 20 | ens_variable = "cloud_arrival_time" 21 | 22 | [_base."_departure_time+"] 23 | ens_variable = "cloud_departure_time" 24 | 25 | # ["**"._full.en] 26 | # domain = "full" 27 | # lang = "en" 28 | 29 | ["**"._full.de] 30 | domain = "full" 31 | lang = "de" 32 | 33 | # ["**"._ch.en] 34 | # domain = "ch" 35 | # lang = "en" 36 | 37 | # ["**"._ch.de] 38 | # domain = "ch" 39 | # lang = "de" 40 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/test/cosmo-2e/multipanel_stats.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to plot basic statistical measures. 2 | 3 | [_base] 4 | # Data source: tsa:/scratch/ruestefa/shared/test/pyflexplot/ 5 | infile = "data/cosmo-2e/2021041100/{ens_member:03d}/grid_conc_20210411030000_MUE.nc" 6 | ens_member_id = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20] 7 | # ens_member_id = [0, 2, 5, 8, 11, 14, 17, 20] 8 | model = "COSMO-2E" 9 | plot_type = "multipanel" 10 | multipanel_param = "ens_variable" 11 | outfile = "cosmo-2e_ens_stats_{plot_variable}_species-{species_id}_{domain}_{lang}_ts-{time_idx:02d}.png" 12 | ens_variable = ["minimum", "maximum", "mean", "median"] 13 | species_id = "*" 14 | combine_species = true 15 | time = -1 16 | 17 | # [_base."_concentration+"] 18 | # plot_variable = "concentration" 19 | # level = 0 20 | # time = 12 21 | 22 | [_base."_total_deposition+"] 23 | plot_variable = "tot_deposition" 24 | integrate = true 25 | 26 | # ["**"._full.de] 27 | # domain = "full" 28 | # lang = "de" 29 | 30 | ["**"._full.en] 31 | domain = "full" 32 | lang = "en" 33 | 34 | # ["**"._ch.de] 35 | # domain = "ch" 36 | # lang = "de" 37 | 38 | # ["**"._ch.en] 39 | # domain = "ch" 40 | # lang = "en" 41 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/test/cosmo-2e/probability.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to create ensemble threshold agreement plots. 2 | 3 | [_base] 4 | # Data source: tsa:/scratch/ruestefa/shared/test/pyflexplot/ 5 | infile = "data/cosmo-2e/2021041100/{ens_member:03d}/grid_conc_20210411030000_MUE.nc" 6 | ens_member_id = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20] 7 | # ens_member_id = [0, 2, 5, 8, 11, 14, 17, 20] 8 | outfile = "test_ens_probability/cosmo-2e_{ens_variable}_{plot_variable}_{domain}_{lang}_ts-{time_idx:02d}.png" 9 | model = "COSMO-2E" 10 | ens_variable = "probability" 11 | # ens_param_thr = 1e-5 12 | ens_param_thr = 0 13 | combine_species = true 14 | # species_id = "*" 15 | species_id = 1 16 | time = -1 17 | 18 | [_base._concentration] 19 | plot_variable = "concentration" 20 | level = 0 21 | [_base._concentration."_integr+"] 22 | integrate = true 23 | 24 | [_base._deposition] 25 | integrate = true 26 | [_base._deposition."_tot+"] 27 | plot_variable = "tot_deposition" 28 | [_base._deposition."_wet+"] 29 | plot_variable = "wet_deposition" 30 | 31 | [_base."_affected_area+"] 32 | plot_variable = "affected_area" 33 | integrate = true 34 | level = 0 35 | 36 | # ["**"._full.en] 37 | # domain = "full" 38 | # lang = "en" 39 | 40 | ["**"._full.de] 41 | domain = "full" 42 | lang = "de" 43 | 44 | # ["**"._ch.en] 45 | # domain = "ch" 46 | # lang = "en" 47 | 48 | # ["**"._ch.de] 49 | # domain = "ch" 50 | # lang = "de" 51 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/test/cosmo-2e/risk.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to create ensemble plots. 2 | 3 | [_base] 4 | # Data source: tsa:/scratch/ruestefa/shared/test/pyflexplot/ 5 | infile = "data/cosmo-2e/2021041100/{ens_member:03d}/grid_conc_20210411030000_MUE.nc" 6 | ens_member_id = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20] 7 | # ens_member_id = [0, 4, 8, 12, 16, 20] 8 | outfile = "cosmo-2e_risk-like_{ens_variable}_{plot_variable}_{release_site}_{domain}_{lang}_ts-{time_idx:02d}_{time_step}.png" 9 | model = "COSMO-2E" 10 | combine_species = true 11 | species_id = 1 12 | time = -1 13 | 14 | [_base._concentration] 15 | plot_variable = "concentration" 16 | level = 0 17 | integrate = true 18 | 19 | [_base._deposition] 20 | integrate = true 21 | plot_variable = "tot_deposition" 22 | 23 | # [_base._concentration."_probability+"] 24 | # ens_variable = "probability" 25 | # ens_param_thr = 0 26 | 27 | # [_base._deposition."_probability+"] 28 | # ens_variable = "probability" 29 | # ens_param_thr = 0 30 | 31 | [_base._concentration._percentile] 32 | ens_variable = "percentile" 33 | color_style = "mono" 34 | 35 | [_base._deposition._percentile] 36 | ens_variable = "percentile" 37 | color_style = "mono" 38 | 39 | # [_base._concentration._percentile."_90+"] 40 | # ens_param_pctl = 90 41 | 42 | # [_base._deposition._percentile."_10+"] 43 | # ens_param_pctl = 10 44 | # [_base._deposition._percentile."_30+"] 45 | # ens_param_pctl = 30 46 | # [_base._deposition._percentile."_50+"] 47 | # ens_param_pctl = 50 48 | # [_base._deposition._percentile."_70+"] 49 | # ens_param_pctl = 70 50 | # [_base._deposition._percentile."_90+"] 51 | # ens_param_pctl = 90 52 | 53 | [_base._concentration._percentile."_multipanel+"] 54 | plot_type = "multipanel" 55 | multipanel_param = "ens_param_pctl" 56 | # ens_param_pctl = [10, 50, 70, 90] 57 | ens_param_pctl = [5, 50, 75, 95] 58 | 59 | [_base._deposition._percentile."_multipanel+"] 60 | plot_type = "multipanel" 61 | multipanel_param = "ens_param_pctl" 62 | # ens_param_pctl = [10, 50, 70, 90] 63 | ens_param_pctl = [5, 50, 75, 95] 64 | 65 | # ["**"._full.en] 66 | # domain = "full" 67 | # lang = "en" 68 | 69 | ["**"._full.de] 70 | domain = "full" 71 | lang = "de" 72 | 73 | # ["**"._ch.en] 74 | # domain = "ch" 75 | # lang = "en" 76 | 77 | # ["**"._ch.de] 78 | # domain = "ch" 79 | # lang = "de" 80 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/test/cosmo-2e/stats.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to plot basic statistical measures. 2 | 3 | [_base] 4 | # Data source: tsa:/scratch/ruestefa/shared/test/pyflexplot/ 5 | infile = "data/cosmo-2e/2021041100/{ens_member:03d}/grid_conc_20210411030000_MUE.nc" 6 | # ens_member_id = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20] 7 | ens_member_id = [0, 2, 5, 8, 11, 14, 17, 20] 8 | outfile = "test_ens_stats/cosmo-2e_{ens_variable}_{plot_variable}_species-{species_id}_{domain}_{lang}_ts-{time_idx:02d}.png" 9 | model = "COSMO-2E" 10 | combine_species = true 11 | # species_id = "*" 12 | species_id = 1 13 | 14 | [_base._concentration] 15 | plot_variable = "concentration" 16 | level = 0 17 | time = "*" 18 | [_base._concentration._integr] 19 | integrate = true 20 | time = -1 21 | 22 | # [_base._deposition] 23 | # integrate = true 24 | # time = -1 25 | # [_base._deposition._dry] 26 | # plot_variable = "dry_deposition" 27 | # [_base._deposition._wet] 28 | # plot_variable = "wet_deposition" 29 | # [_base._deposition._tot] 30 | # plot_variable = "tot_deposition" 31 | 32 | [_base._affected_area] 33 | plot_variable = "affected_area" 34 | integrate = true 35 | level = 0 36 | time = -1 37 | 38 | [_base._concentration._integr._pctl] 39 | ens_variable = "percentile" 40 | [_base._concentration._integr._pctl."_10+"] 41 | ens_param_pctl = 10 42 | [_base._concentration._integr._pctl."_50+"] 43 | ens_param_pctl = 50 44 | [_base._concentration._integr._pctl."_70+"] 45 | ens_param_pctl = 70 46 | [_base._concentration._integr._pctl."_90+"] 47 | ens_param_pctl = 90 48 | 49 | # [_base._affected_area._pctl] 50 | # ens_variable = "percentile" 51 | # [_base._affected_area._pctl."_10+"] 52 | # ens_param_pctl = 10 53 | # [_base._affected_area._pctl."_50+"] 54 | # ens_param_pctl = 50 55 | # [_base._affected_area._pctl."_70+"] 56 | # ens_param_pctl = 70 57 | # [_base._affected_area._pctl."_90+"] 58 | # ens_param_pctl = 90 59 | 60 | # [_base._deposition._wet."_min+"] 61 | # ens_variable = "minimum" 62 | # [_base._deposition._wet."_max+"] 63 | # ens_variable = "maximum" 64 | # [_base._concentration._integr."_median+"] 65 | # ens_variable = "median" 66 | # [_base._concentration._integr."_mean+"] 67 | # ens_variable = "mean" 68 | # [_base._concentration._integr."_stddev+"] 69 | # ens_variable = "stddev" 70 | 71 | ["**"._de.full] 72 | domain = "full" 73 | lang = "de" 74 | # ["**"._de.ch] 75 | # domain = "ch" 76 | # lang = "de" 77 | 78 | # ["**"._en.full] 79 | # domain = "full" 80 | # lang = "en" 81 | # ["**"._en.ch] 82 | # domain = "ch" 83 | # lang = "en" 84 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/test/cosmo-e/cloud_timing.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to plot cloud arrival time. 2 | 3 | [_base] 4 | # Data source: tsa:/scratch/ruestefa/shared/test/pyflexplot/ 5 | infile = "data/cosmo-e/grid_conc_xxxx_20190731000000_{ens_member:03d}.nc" 6 | ens_member_id = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20] 7 | # ens_member_id = [0, 2, 5, 8, 11, 14, 17, 20] 8 | model = "COSMO-E" 9 | outfile = "cosmo-e_{ens_variable}_{domain}_{lang}_ts-{time_idx:02d}.png" 10 | plot_variable = "concentration" 11 | ens_param_mem_min = 1 12 | ens_param_thr = 0.0 13 | time = 0 14 | combine_species = true 15 | # species_id = "*" 16 | species_id = 1 17 | level = 0 18 | 19 | [_base."_arrival_time+"] 20 | ens_variable = "cloud_arrival_time" 21 | 22 | [_base."_departure_time+"] 23 | ens_variable = "cloud_departure_time" 24 | 25 | # ["**"._full.en] 26 | # domain = "full" 27 | # lang = "en" 28 | 29 | ["**"._full.de] 30 | domain = "full" 31 | lang = "de" 32 | 33 | # ["**"._ch.en] 34 | # domain = "ch" 35 | # lang = "en" 36 | 37 | # ["**"._ch.de] 38 | # domain = "ch" 39 | # lang = "de" 40 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/test/cosmo-e/multipanel_stats.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to plot basic statistical measures. 2 | 3 | [_base] 4 | # Data source: tsa:/scratch/ruestefa/shared/test/pyflexplot/ 5 | infile = "data/cosmo-e/grid_conc_xxxx_20190731000000_{ens_member:03d}.nc" 6 | # ens_member_id = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20] 7 | ens_member_id = [0, 2, 5, 8, 11, 14, 17, 20] 8 | model = "COSMO-E" 9 | time = 6 10 | plot_type = "multipanel" 11 | multipanel_param = "ens_variable" 12 | outfile = "cosmo-e_ens_stats_{plot_variable}_species-{species_id}_{domain}_{lang}_ts-{time_idx:02d}.png" 13 | ens_variable = ["minimum", "maximum", "mean", "median"] 14 | species_id = [1, 2] 15 | combine_species = true 16 | 17 | # [_base."_concentration+"] 18 | # plot_variable = "concentration" 19 | # level = 0 20 | 21 | [_base."_total_deposition+"] 22 | plot_variable = "tot_deposition" 23 | integrate = true 24 | 25 | # ["**"._full.de] 26 | # domain = "full" 27 | # lang = "de" 28 | 29 | ["**"._full.en] 30 | domain = "full" 31 | lang = "en" 32 | 33 | # ["**"._ch.de] 34 | # domain = "ch" 35 | # lang = "de" 36 | 37 | # ["**"._ch.en] 38 | # domain = "ch" 39 | # lang = "en" 40 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/test/cosmo-e/probability.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to create ensemble threshold agreement plots. 2 | 3 | [_base] 4 | # Data source: tsa:/scratch/ruestefa/shared/test/pyflexplot/ 5 | infile = "data/cosmo-e/grid_conc_xxxx_20190731000000_{ens_member:03d}.nc" 6 | ens_member_id = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20] 7 | # ens_member_id = [0, 2, 5, 8, 11, 14, 17, 20] 8 | outfile = "test_ens_probability/cosmo-e_{ens_variable}_{plot_variable}_{domain}_{lang}_ts-{time_idx:02d}.png" 9 | model = "COSMO-E" 10 | ens_variable = "probability" 11 | # ens_param_thr = 1e-5 12 | ens_param_thr = 0 13 | combine_species = true 14 | # species_id = "*" 15 | species_id = 1 16 | time = -1 17 | 18 | [_base._concentration] 19 | plot_variable = "concentration" 20 | level = 0 21 | [_base._concentration."_integr+"] 22 | integrate = true 23 | 24 | [_base._deposition] 25 | integrate = true 26 | [_base._deposition."_tot+"] 27 | plot_variable = "tot_deposition" 28 | [_base._deposition."_wet+"] 29 | plot_variable = "wet_deposition" 30 | 31 | [_base."_affected_area+"] 32 | plot_variable = "affected_area" 33 | integrate = true 34 | level = 0 35 | 36 | # ["**"._full.en] 37 | # domain = "full" 38 | # lang = "en" 39 | 40 | ["**"._full.de] 41 | domain = "full" 42 | lang = "de" 43 | 44 | # ["**"._ch.en] 45 | # domain = "ch" 46 | # lang = "en" 47 | 48 | # ["**"._ch.de] 49 | # domain = "ch" 50 | # lang = "de" 51 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/test/cosmo-e/stats.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to plot basic statistical measures. 2 | 3 | [_base] 4 | # Data source: tsa:/scratch/ruestefa/shared/test/pyflexplot/ 5 | infile = "data/cosmo-e/grid_conc_xxxx_20190731000000_{ens_member:03d}.nc" 6 | # ens_member_id = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20] 7 | ens_member_id = [0, 2, 5, 8, 11, 14, 17, 20] 8 | outfile = "test_ens_stats/cosmo-e_{ens_variable}_{plot_variable}_species-{species_id}_{domain}_{lang}_ts-{time_idx:02d}.png" 9 | model = "COSMO-E" 10 | combine_species = true 11 | # species_id = "*" 12 | species_id = 1 13 | 14 | [_base._concentration] 15 | plot_variable = "concentration" 16 | level = 0 17 | time = "*" 18 | [_base._concentration._integr] 19 | integrate = true 20 | time = -1 21 | 22 | # [_base._deposition] 23 | # integrate = true 24 | # time = -1 25 | # [_base._deposition._dry] 26 | # plot_variable = "dry_deposition" 27 | # [_base._deposition._wet] 28 | # plot_variable = "wet_deposition" 29 | # [_base._deposition._tot] 30 | # plot_variable = "tot_deposition" 31 | 32 | [_base._affected_area] 33 | plot_variable = "affected_area" 34 | integrate = true 35 | level = 0 36 | time = -1 37 | 38 | [_base._concentration._integr._pctl] 39 | ens_variable = "percentile" 40 | [_base._concentration._integr._pctl."_10+"] 41 | ens_param_pctl = 10 42 | [_base._concentration._integr._pctl."_50+"] 43 | ens_param_pctl = 50 44 | [_base._concentration._integr._pctl."_70+"] 45 | ens_param_pctl = 70 46 | [_base._concentration._integr._pctl."_90+"] 47 | ens_param_pctl = 90 48 | 49 | # [_base._affected_area._pctl] 50 | # ens_variable = "percentile" 51 | # [_base._affected_area._pctl."_10+"] 52 | # ens_param_pctl = 10 53 | # [_base._affected_area._pctl."_50+"] 54 | # ens_param_pctl = 50 55 | # [_base._affected_area._pctl."_70+"] 56 | # ens_param_pctl = 70 57 | # [_base._affected_area._pctl."_90+"] 58 | # ens_param_pctl = 90 59 | 60 | # [_base._deposition._wet."_min+"] 61 | # ens_variable = "minimum" 62 | # [_base._deposition._wet."_max+"] 63 | # ens_variable = "maximum" 64 | # [_base._concentration._integr."_median+"] 65 | # ens_variable = "median" 66 | # [_base._concentration._integr."_mean+"] 67 | # ens_variable = "mean" 68 | # [_base._concentration._integr."_stddev+"] 69 | # ens_variable = "stddev" 70 | 71 | ["**"._de.full] 72 | domain = "full" 73 | lang = "de" 74 | # ["**"._de.ch] 75 | # domain = "ch" 76 | # lang = "de" 77 | 78 | # ["**"._en.full] 79 | # domain = "full" 80 | # lang = "en" 81 | # ["**"._en.ch] 82 | # domain = "ch" 83 | # lang = "en" 84 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/test/icon-ch1-ctrl/all_pdf.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to create deterministic ICON-CH1-CTRL plots in PDF format 2 | 3 | [_base] 4 | # Test data source: /store_new/mch/msopr/pyflexplot_testdata/ 5 | infile = "data/icon-ch1-ctrl/grid_conc_20240604210000_BUG.nc" 6 | model = "ICON-CH1-CTRL" 7 | lang = "de" 8 | outfile_time_format = "%Y%m%dT%H%M" 9 | combine_species = false 10 | 11 | [_base._concentration] 12 | plot_variable = "concentration" 13 | level = 0 14 | 15 | [_base._concentration._integr] 16 | integrate = true 17 | time = -1 18 | 19 | [_base._tot_deposition] 20 | plot_variable = "tot_deposition" 21 | integrate = true 22 | 23 | [_base._affected_area] 24 | plot_variable = "affected_area" 25 | integrate = true 26 | level = 0 27 | time = -1 28 | combine_species = true 29 | 30 | [_base._concentration._multipanel_time] 31 | plot_type = "multipanel" 32 | multipanel_param = "time" 33 | time = [2, 4, 8, -1] 34 | 35 | [_base._concentration.full] 36 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Konzentration.pdf" 37 | domain = "full" 38 | [_base._concentration._integr.full] 39 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_integrierte_Luftaktivitaet.pdf" 40 | domain = "full" 41 | [_base._tot_deposition.full] 42 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Deposition.pdf" 43 | domain = "full" 44 | [_base._affected_area.full] 45 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_beaufschl_Gebiet.pdf" 46 | domain = "full" 47 | [_base._concentration._multipanel_time.full] 48 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Konzentration.pdf" 49 | domain = "full" 50 | 51 | [_base._concentration.zoom] 52 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Konzentration_zoom.pdf" 53 | domain = "ch" 54 | [_base._concentration._integr.zoom] 55 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_integrierte_Luftaktivitaet_zoom.pdf" 56 | domain = "ch" 57 | [_base._tot_deposition.zoom] 58 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Deposition_zoom.pdf" 59 | domain = "ch" 60 | [_base._affected_area.zoom] 61 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_beaufschl_Gebiet_zoom.pdf" 62 | domain = "ch" 63 | [_base._concentration._multipanel_time.zoom] 64 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Konzentration_zoom.pdf" 65 | domain = "ch" 66 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/test/icon-ch1-ctrl/all_png.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to create deterministic ICON-CH1-CTRL plots in PNG format 2 | 3 | [_base] 4 | # Test data source: /store_new/mch/msopr/pyflexplot_testdata/ 5 | infile = "data/icon-ch1-ctrl/grid_conc_20240604210000_BUG.nc" 6 | model = "ICON-CH1-CTRL" 7 | lang = "de" 8 | outfile_time_format = "%Y%m%dT%H%M" 9 | combine_species = false 10 | outfile = "forecast-iconch1eps-dispersion-test~{base_time}~{plot_variable}~{domain}~{release_site}~{species_id}~{time_step}.png" 11 | 12 | [_base._concentration] 13 | plot_variable = "concentration" 14 | level = 0 15 | 16 | [_base._concentration._integr] 17 | integrate = true 18 | time = -1 19 | 20 | [_base._tot_deposition] 21 | plot_variable = "tot_deposition" 22 | integrate = true 23 | 24 | [_base._affected_area] 25 | plot_variable = "affected_area" 26 | integrate = true 27 | level = 0 28 | time = -1 29 | combine_species = true 30 | 31 | [_base._concentration."_png+"] 32 | 33 | [_base._concentration._integr."_png+"] 34 | 35 | [_base._tot_deposition."_png+"] 36 | 37 | [_base._affected_area."_png+"] 38 | 39 | ["**".full] 40 | domain = "full" 41 | 42 | ["**".zoom] 43 | domain = "ch" 44 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/test/icon-ch1-ctrl/all_shp.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to create deterministic ICON-CH1-CTRL shapefiles 2 | 3 | [_base] 4 | # Test data source: /store_new/mch/msopr/pyflexplot_testdata/ 5 | infile = "data/icon-ch1-ctrl/grid_conc_20240604210000_BUG.nc" 6 | model = "ICON-CH1-CTRL" 7 | lang = "de" 8 | outfile_time_format = "%Y%m%dT%H%M" 9 | combine_species = false 10 | 11 | [_base._concentration] 12 | plot_variable = "concentration" 13 | level = 0 14 | 15 | [_base._concentration._integr] 16 | integrate = true 17 | time = -1 18 | 19 | [_base._tot_deposition] 20 | plot_variable = "tot_deposition" 21 | integrate = true 22 | 23 | [_base._affected_area] 24 | plot_variable = "affected_area" 25 | integrate = true 26 | level = 0 27 | time = -1 28 | combine_species = true 29 | 30 | [_base._concentration."_shp+"] 31 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Konzentration_{species_id}_{time_step}.shp" 32 | 33 | [_base._concentration._integr."_shp+"] 34 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_integrierte_Luftaktivitaet_{species_id}.shp" 35 | 36 | [_base._tot_deposition."_shp+"] 37 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Deposition_{species_id}_{time_step}.shp" 38 | 39 | [_base._affected_area."_shp+"] 40 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_beaufschl_Gebiet.shp" 41 | 42 | ["**".full] 43 | domain = "full" 44 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/test/ifs-hres-eu/affected_area.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to create deterministic IFS-HRES-EU plots 2 | # Derived from opr/cosmo-1e-ctrl/all_png.toml 3 | 4 | [_base] 5 | # Data source: tsa:/scratch/ruestefa/shared/test/pyflexplot/ 6 | infile = "data/ifs-hres-eu/grid_conc_0999_20200818000000_fessenheim_5spec.nc" 7 | model = "IFS-HRES-EU" 8 | outfile_time_format = "%Y%m%dT%H%M" 9 | combine_species = false 10 | 11 | # [_base._concentration] 12 | # plot_variable = "concentration" 13 | # level = 0 14 | 15 | # [_base._concentration._integr] 16 | # integrate = true 17 | # time = -1 18 | 19 | # [_base._tot_deposition] 20 | # plot_variable = "tot_deposition" 21 | # integrate = true 22 | 23 | [_base._affected_area] 24 | plot_variable = "affected_area" 25 | integrate = true 26 | level = 0 27 | time = -1 28 | combine_species = true 29 | 30 | # [_base._concentration."_png+"] 31 | # outfile = "concentration_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 32 | # [_base._concentration._integr."_png+"] 33 | # outfile = "integrated_concentration_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 34 | # [_base._tot_deposition."_png+"] 35 | # outfile = "deposition_tot_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 36 | [_base._affected_area."_png+"] 37 | outfile = "affected_area_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 38 | 39 | ["**"._de.alps] 40 | lang = "de" 41 | domain = "alps" 42 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/test/ifs-hres-eu/all_pdf.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to create deterministic IFS-HRES-EU plots in PDF format 2 | 3 | [_base] 4 | # Test data source: /store_new/mch/msopr/pyflexplot_testdata/ 5 | infile = "data/ifs-hres-eu/grid_conc_0999_20200818000000_fessenheim_5spec.nc" 6 | model = "IFS-HRES-EU" 7 | lang = "de" 8 | outfile_time_format = "%Y%m%dT%H%M" 9 | combine_species = false 10 | 11 | [_base._concentration] 12 | plot_variable = "concentration" 13 | level = 0 14 | 15 | [_base._concentration._integr] 16 | integrate = true 17 | time = -1 18 | 19 | [_base._tot_deposition] 20 | plot_variable = "tot_deposition" 21 | integrate = true 22 | 23 | [_base._affected_area] 24 | plot_variable = "affected_area" 25 | integrate = true 26 | level = 0 27 | time = -1 28 | combine_species = true 29 | 30 | [_base._concentration._multipanel_time] 31 | plot_type = "multipanel" 32 | multipanel_param = "time" 33 | time = [2, 4, 8, -1] 34 | 35 | [_base._concentration.full] 36 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Konzentration.pdf" 37 | domain = "full" 38 | [_base._concentration._integr.full] 39 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_integrierte_Luftaktivitaet.pdf" 40 | domain = "full" 41 | [_base._tot_deposition.full] 42 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Deposition.pdf" 43 | domain = "full" 44 | [_base._affected_area.full] 45 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_beaufschl_Gebiet.pdf" 46 | domain = "full" 47 | [_base._concentration._multipanel_time.full] 48 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Konzentration.pdf" 49 | domain = "full" 50 | 51 | [_base._concentration.zoom] 52 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Konzentration_zoom.pdf" 53 | domain = "alps" 54 | [_base._concentration._integr.zoom] 55 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_integrierte_Luftaktivitaet_zoom.pdf" 56 | domain = "alps" 57 | [_base._tot_deposition.zoom] 58 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Deposition_zoom.pdf" 59 | domain = "alps" 60 | [_base._affected_area.zoom] 61 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_beaufschl_Gebiet_zoom.pdf" 62 | domain = "alps" 63 | [_base._concentration._multipanel_time.zoom] 64 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Konzentration_zoom.pdf" 65 | domain = "alps" 66 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/test/ifs-hres-eu/all_png.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to create deterministic IFS-EU plots in PNG format 2 | 3 | [_base] 4 | # Test data source: /store_new/mch/msopr/pyflexplot_testdata/ 5 | infile = "data/ifs-hres-eu/grid_conc_0999_20200818000000_fessenheim_5spec.nc" 6 | model = "IFS-HRES-EU" 7 | lang = "de" 8 | outfile_time_format = "%Y%m%dT%H%M" 9 | combine_species = false 10 | outfile = "forecast-ifs-eu-dispersion-test~{base_time}~{plot_variable}~{domain}~{release_site}~1~{time_step}.png" 11 | 12 | [_base._concentration] 13 | plot_variable = "concentration" 14 | level = 0 15 | 16 | [_base._concentration._integr] 17 | integrate = true 18 | time = -1 19 | 20 | [_base._tot_deposition] 21 | plot_variable = "tot_deposition" 22 | integrate = true 23 | 24 | [_base._affected_area] 25 | plot_variable = "affected_area" 26 | integrate = true 27 | level = 0 28 | time = -1 29 | combine_species = true 30 | 31 | [_base._concentration."_png+"] 32 | 33 | [_base._concentration._integr."_png+"] 34 | 35 | [_base._tot_deposition."_png+"] 36 | 37 | [_base._affected_area."_png+"] 38 | 39 | ["**".full] 40 | domain = "full" 41 | 42 | ["**".zoom] 43 | domain = "alps" 44 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/test/ifs-hres-eu/all_shp.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to create deterministic IFS-EU shapefiles 2 | 3 | [_base] 4 | # Test data source: /store_new/mch/msopr/pyflexplot_testdata/ 5 | infile = "data/ifs-hres-eu/grid_conc_0999_20200818000000_fessenheim_5spec.nc" 6 | model = "IFS-HRES-EU" 7 | lang = "de" 8 | outfile_time_format = "%Y%m%dT%H%M" 9 | combine_species = false 10 | 11 | [_base._concentration] 12 | plot_variable = "concentration" 13 | level = 0 14 | 15 | [_base._concentration._integr] 16 | integrate = true 17 | time = -1 18 | 19 | [_base._tot_deposition] 20 | plot_variable = "tot_deposition" 21 | integrate = true 22 | 23 | [_base._affected_area] 24 | plot_variable = "affected_area" 25 | integrate = true 26 | level = 0 27 | time = -1 28 | combine_species = true 29 | 30 | [_base._concentration."_shp+"] 31 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Konzentration_{species_id}_{time_step}.shp" 32 | 33 | [_base._concentration._integr."_shp+"] 34 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_integrierte_Luftaktivitaet_{species_id}.shp" 35 | 36 | [_base._tot_deposition."_shp+"] 37 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Deposition_{species_id}_{time_step}.shp" 38 | 39 | [_base._affected_area."_shp+"] 40 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_beaufschl_Gebiet.shp" 41 | 42 | ["**".full] 43 | domain = "full" 44 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/test/ifs-hres-eu/concentration.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to create deterministic IFS-HRES-EU plots 2 | # Derived from opr/cosmo-1e-ctrl/all_png.toml 3 | 4 | [_base] 5 | # Data source: tsa:/scratch/ruestefa/shared/test/pyflexplot/ 6 | infile = "data/ifs-hres-eu/grid_conc_0999_20200818000000_fessenheim_5spec.nc" 7 | model = "IFS-HRES-EU" 8 | outfile_time_format = "%Y%m%dT%H%M" 9 | combine_species = false 10 | 11 | [_base._concentration] 12 | plot_variable = "concentration" 13 | level = 0 14 | 15 | # [_base._concentration._integr] 16 | # integrate = true 17 | # time = -1 18 | 19 | # [_base._tot_deposition] 20 | # plot_variable = "tot_deposition" 21 | # integrate = true 22 | 23 | # [_base._affected_area] 24 | # plot_variable = "affected_area" 25 | # integrate = true 26 | # level = 0 27 | # time = -1 28 | # combine_species = true 29 | 30 | [_base._concentration."_png+"] 31 | outfile = "concentration_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 32 | # [_base._concentration._integr."_png+"] 33 | # outfile = "integrated_concentration_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 34 | # [_base._tot_deposition."_png+"] 35 | # outfile = "deposition_tot_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 36 | # [_base._affected_area."_png+"] 37 | # outfile = "affected_area_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 38 | 39 | ["**"._de.alps] 40 | lang = "de" 41 | domain = "alps" 42 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/test/ifs-hres-eu/deposition.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to create deterministic IFS-HRES-EU plots 2 | # Derived from opr/cosmo-1e-ctrl/all_png.toml 3 | 4 | [_base] 5 | # Data source: tsa:/scratch/ruestefa/shared/test/pyflexplot/ 6 | infile = "data/ifs-hres-eu/grid_conc_0999_20200818000000_fessenheim_5spec.nc" 7 | model = "IFS-HRES-EU" 8 | outfile_time_format = "%Y%m%dT%H%M" 9 | combine_species = false 10 | 11 | # [_base._concentration] 12 | # plot_variable = "concentration" 13 | # level = 0 14 | 15 | # [_base._concentration._integr] 16 | # integrate = true 17 | # time = -1 18 | 19 | [_base._tot_deposition] 20 | plot_variable = "tot_deposition" 21 | integrate = true 22 | 23 | # [_base._affected_area] 24 | # plot_variable = "affected_area" 25 | # integrate = true 26 | # level = 0 27 | # time = -1 28 | # combine_species = true 29 | 30 | # [_base._concentration."_png+"] 31 | # outfile = "concentration_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 32 | # [_base._concentration._integr."_png+"] 33 | # outfile = "integrated_concentration_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 34 | [_base._tot_deposition."_png+"] 35 | outfile = "deposition_tot_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 36 | # [_base._affected_area."_png+"] 37 | # outfile = "affected_area_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 38 | 39 | ["**"._de.alps] 40 | lang = "de" 41 | domain = "alps" 42 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/test/ifs-hres-eu/integrated_concentration.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to create deterministic IFS-HRES-EU plots 2 | # Derived from opr/cosmo-1e-ctrl/all_png.toml 3 | 4 | [_base] 5 | # Data source: tsa:/scratch/ruestefa/shared/test/pyflexplot/ 6 | infile = "data/ifs-hres-eu/grid_conc_0999_20200818000000_fessenheim_5spec.nc" 7 | model = "IFS-HRES-EU" 8 | outfile_time_format = "%Y%m%dT%H%M" 9 | combine_species = false 10 | 11 | [_base._concentration] 12 | plot_variable = "concentration" 13 | level = 0 14 | 15 | [_base._concentration._integr] 16 | integrate = true 17 | time = -1 18 | 19 | # [_base._tot_deposition] 20 | # plot_variable = "tot_deposition" 21 | # integrate = true 22 | 23 | # [_base._affected_area] 24 | # plot_variable = "affected_area" 25 | # integrate = true 26 | # level = 0 27 | # time = -1 28 | # combine_species = true 29 | 30 | # [_base._concentration."_png+"] 31 | # outfile = "concentration_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 32 | [_base._concentration._integr."_png+"] 33 | outfile = "integrated_concentration_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 34 | # [_base._tot_deposition."_png+"] 35 | # outfile = "deposition_tot_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 36 | # [_base._affected_area."_png+"] 37 | # outfile = "affected_area_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 38 | 39 | ["**"._de.alps] 40 | lang = "de" 41 | domain = "alps" 42 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/test/ifs-hres/affected_area.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to create deterministic IFS-HRES-EU plots 2 | # Derived from opr/cosmo-1e-ctrl/all_png.toml 3 | 4 | [_base] 5 | # Data source: tsa:/scratch/ruestefa/shared/test/pyflexplot/ 6 | infile = "data/ifs-hres/grid_conc_1000_20200818000000_bushehr_2spec.nc" 7 | model = "IFS-HRES" 8 | outfile_time_format = "%Y%m%dT%H%M" 9 | combine_species = false 10 | domain = "cloud" 11 | 12 | # [_base._concentration] 13 | # plot_variable = "concentration" 14 | # level = 0 15 | 16 | # [_base._concentration._integr] 17 | # integrate = true 18 | # time = -1 19 | 20 | # [_base._tot_deposition] 21 | # plot_variable = "tot_deposition" 22 | # integrate = true 23 | 24 | [_base._affected_area] 25 | plot_variable = "affected_area" 26 | integrate = true 27 | level = 0 28 | time = -1 29 | combine_species = true 30 | 31 | # [_base._concentration."_png+"] 32 | # outfile = "concentration_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 33 | # [_base._concentration._integr."_png+"] 34 | # outfile = "integrated_concentration_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 35 | # [_base._tot_deposition."_png+"] 36 | # outfile = "deposition_tot_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 37 | [_base._affected_area."_png+"] 38 | outfile = "affected_area_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 39 | 40 | ["**"._de.release_site] 41 | lang = "de" 42 | domain = "release_site" 43 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/test/ifs-hres/all_pdf.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to create deterministic IFS-HRES plots in PDF format 2 | 3 | [_base] 4 | # Test data source: /store_new/mch/msopr/pyflexplot_testdata/ 5 | infile = "data/ifs-hres/grid_conc_1000_20200818000000_bushehr_2spec.nc" 6 | model = "IFS-HRES" 7 | lang = "de" 8 | outfile_time_format = "%Y%m%dT%H%M" 9 | combine_species = false 10 | 11 | [_base._concentration] 12 | plot_variable = "concentration" 13 | level = 0 14 | 15 | [_base._concentration._integr] 16 | integrate = true 17 | time = -1 18 | 19 | [_base._tot_deposition] 20 | plot_variable = "tot_deposition" 21 | integrate = true 22 | 23 | [_base._affected_area] 24 | plot_variable = "affected_area" 25 | integrate = true 26 | level = 0 27 | time = -1 28 | combine_species = true 29 | 30 | [_base._concentration._multipanel_time] 31 | plot_type = "multipanel" 32 | multipanel_param = "time" 33 | time = [2, 4, 8, -1] 34 | 35 | [_base._concentration.full] 36 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Konzentration.pdf" 37 | domain = "cloud" 38 | [_base._concentration._integr.full] 39 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_integrierte_Luftaktivitaet.pdf" 40 | domain = "cloud" 41 | [_base._tot_deposition.full] 42 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Deposition.pdf" 43 | domain = "cloud" 44 | [_base._affected_area.full] 45 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_beaufschl_Gebiet.pdf" 46 | domain = "cloud" 47 | [_base._concentration._multipanel_time.full] 48 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Konzentration.pdf" 49 | domain = "cloud" 50 | 51 | [_base._concentration.zoom] 52 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Konzentration_zoom.pdf" 53 | domain = "release_site" 54 | [_base._concentration._integr.zoom] 55 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_integrierte_Luftaktivitaet_zoom.pdf" 56 | domain = "release_site" 57 | [_base._tot_deposition.zoom] 58 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Deposition_zoom.pdf" 59 | domain = "release_site" 60 | [_base._affected_area.zoom] 61 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_beaufschl_Gebiet_zoom.pdf" 62 | domain = "release_site" 63 | [_base._concentration._multipanel_time.zoom] 64 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Konzentration_zoom.pdf" 65 | domain = "release_site" 66 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/test/ifs-hres/all_png.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to create deterministic IFS plots in PNG format 2 | 3 | [_base] 4 | # Test data source: /store_new/mch/msopr/pyflexplot_testdata/ 5 | infile = "data/ifs-hres/grid_conc_1000_20200818000000_bushehr_2spec.nc" 6 | model = "IFS-HRES" 7 | lang = "de" 8 | outfile_time_format = "%Y%m%dT%H%M" 9 | combine_species = false 10 | outfile = "forecast-ifs-dispersion-test~{base_time}~{plot_variable}~{domain}~{release_site}~1~{time_step}.png" 11 | 12 | [_base._concentration] 13 | plot_variable = "concentration" 14 | level = 0 15 | 16 | [_base._concentration._integr] 17 | integrate = true 18 | time = -1 19 | 20 | [_base._tot_deposition] 21 | plot_variable = "tot_deposition" 22 | integrate = true 23 | 24 | [_base._affected_area] 25 | plot_variable = "affected_area" 26 | integrate = true 27 | level = 0 28 | time = -1 29 | combine_species = true 30 | 31 | [_base._concentration."_png+"] 32 | 33 | [_base._concentration._integr."_png+"] 34 | 35 | [_base._tot_deposition."_png+"] 36 | 37 | [_base._affected_area."_png+"] 38 | 39 | ["**".full] 40 | domain = "cloud" 41 | 42 | ["**".zoom] 43 | domain = "release_site" 44 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/test/ifs-hres/all_shp.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to create deterministic IFS shapefiles 2 | 3 | [_base] 4 | # Test data source: /store_new/mch/msopr/pyflexplot_testdata/ 5 | infile = "data/ifs-hres/grid_conc_1000_20200818000000_bushehr_2spec.nc" 6 | model = "IFS-HRES" 7 | lang = "de" 8 | outfile_time_format = "%Y%m%dT%H%M" 9 | combine_species = false 10 | 11 | [_base._concentration] 12 | plot_variable = "concentration" 13 | level = 0 14 | 15 | [_base._concentration._integr] 16 | integrate = true 17 | time = -1 18 | 19 | [_base._tot_deposition] 20 | plot_variable = "tot_deposition" 21 | integrate = true 22 | 23 | [_base._affected_area] 24 | plot_variable = "affected_area" 25 | integrate = true 26 | level = 0 27 | time = -1 28 | combine_species = true 29 | 30 | [_base._concentration."_shp+"] 31 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Konzentration_{species_id}_{time_step}.shp" 32 | 33 | [_base._concentration._integr."_shp+"] 34 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_integrierte_Luftaktivitaet_{species_id}.shp" 35 | 36 | [_base._tot_deposition."_shp+"] 37 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_Deposition_{species_id}_{time_step}.shp" 38 | 39 | [_base._affected_area."_shp+"] 40 | outfile = "{release_start}_{release_site}_FLEXPART-{model}_Dispersion_beaufschl_Gebiet.shp" 41 | 42 | ["**".full] 43 | domain = "cloud" 44 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/test/ifs-hres/concentration.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to create deterministic IFS-HRES-EU plots 2 | # Derived from opr/cosmo-1e-ctrl/all_png.toml 3 | 4 | [_base] 5 | # Data source: tsa:/scratch/ruestefa/shared/test/pyflexplot/ 6 | infile = "data/ifs-hres/grid_conc_1000_20200818000000_bushehr_2spec.nc" 7 | model = "IFS-HRES" 8 | outfile_time_format = "%Y%m%dT%H%M" 9 | combine_species = false 10 | domain = "cloud" 11 | 12 | [_base._concentration] 13 | plot_variable = "concentration" 14 | level = 0 15 | 16 | # [_base._concentration._integr] 17 | # integrate = true 18 | # time = -1 19 | 20 | # [_base._tot_deposition] 21 | # plot_variable = "tot_deposition" 22 | # integrate = true 23 | 24 | # [_base._affected_area] 25 | # plot_variable = "affected_area" 26 | # integrate = true 27 | # level = 0 28 | # time = -1 29 | # combine_species = true 30 | 31 | [_base._concentration."_png+"] 32 | outfile = "concentration_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 33 | # [_base._concentration._integr."_png+"] 34 | # outfile = "integrated_concentration_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 35 | # [_base._tot_deposition."_png+"] 36 | # outfile = "deposition_tot_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 37 | # [_base._affected_area."_png+"] 38 | # outfile = "affected_area_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 39 | 40 | ["**"._de.release_site] 41 | lang = "de" 42 | domain = "release_site" 43 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/test/ifs-hres/deposition.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to create deterministic IFS-HRES-EU plots 2 | # Derived from opr/cosmo-1e-ctrl/all_png.toml 3 | 4 | [_base] 5 | # Data source: tsa:/scratch/ruestefa/shared/test/pyflexplot/ 6 | infile = "data/ifs-hres/grid_conc_1000_20200818000000_bushehr_2spec.nc" 7 | model = "IFS-HRES" 8 | outfile_time_format = "%Y%m%dT%H%M" 9 | combine_species = false 10 | 11 | # [_base._concentration] 12 | # plot_variable = "concentration" 13 | # level = 0 14 | 15 | # [_base._concentration._integr] 16 | # integrate = true 17 | # time = -1 18 | 19 | [_base._tot_deposition] 20 | plot_variable = "tot_deposition" 21 | integrate = true 22 | 23 | # [_base._affected_area] 24 | # plot_variable = "affected_area" 25 | # integrate = true 26 | # level = 0 27 | # time = -1 28 | # combine_species = true 29 | 30 | # [_base._concentration."_png+"] 31 | # outfile = "concentration_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 32 | # [_base._concentration._integr."_png+"] 33 | # outfile = "integrated_concentration_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 34 | [_base._tot_deposition."_png+"] 35 | outfile = "deposition_tot_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 36 | # [_base._affected_area."_png+"] 37 | # outfile = "affected_area_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 38 | 39 | ["**"._de.release_site] 40 | lang = "de" 41 | domain = "release_site" 42 | -------------------------------------------------------------------------------- /src/pyflexplot/data/presets/test/ifs-hres/integrated_concentration.toml: -------------------------------------------------------------------------------- 1 | # PyFlexPlot setup file to create deterministic IFS-HRES-EU plots 2 | # Derived from opr/cosmo-1e-ctrl/all_png.toml 3 | 4 | [_base] 5 | # Data source: tsa:/scratch/ruestefa/shared/test/pyflexplot/ 6 | infile = "data/ifs-hres/grid_conc_1000_20200818000000_bushehr_2spec.nc" 7 | model = "IFS-HRES" 8 | outfile_time_format = "%Y%m%dT%H%M" 9 | combine_species = false 10 | 11 | [_base._concentration] 12 | plot_variable = "concentration" 13 | level = 0 14 | 15 | [_base._concentration._integr] 16 | integrate = true 17 | time = -1 18 | 19 | # [_base._tot_deposition] 20 | # plot_variable = "tot_deposition" 21 | # integrate = true 22 | 23 | # [_base._affected_area] 24 | # plot_variable = "affected_area" 25 | # integrate = true 26 | # level = 0 27 | # time = -1 28 | # combine_species = true 29 | 30 | # [_base._concentration."_png+"] 31 | # outfile = "concentration_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 32 | [_base._concentration._integr."_png+"] 33 | outfile = "integrated_concentration_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 34 | # [_base._tot_deposition."_png+"] 35 | # outfile = "deposition_tot_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 36 | # [_base._affected_area."_png+"] 37 | # outfile = "affected_area_site-{release_site}_species-{species_id}_domain-{domain}_lang-{lang}_ts-{time_step}.png" 38 | 39 | ["**"._de.release_site] 40 | lang = "de" 41 | domain = "release_site" 42 | -------------------------------------------------------------------------------- /src/pyflexplot/data_transformation/rotated_pole.py: -------------------------------------------------------------------------------- 1 | """Functions to convert from rotated to unrotated coordinates.""" 2 | # Third-party 3 | import numpy as np 4 | 5 | 6 | def latrot2lat( 7 | phirot: np.ndarray, 8 | rlarot: np.ndarray, 9 | polphi: float, 10 | polgam: float = 0, 11 | ) -> np.ndarray: 12 | rad_to_deg = 180 / np.pi 13 | deg_to_rad = np.pi / 180 14 | 15 | zsinpol = np.sin(deg_to_rad * polphi) 16 | zcospol = np.cos(deg_to_rad * polphi) 17 | 18 | zphis = deg_to_rad * phirot 19 | zrlas = np.where(rlarot > 180.0, rlarot - 360.0, rlarot) 20 | zrlas = deg_to_rad * zrlas 21 | 22 | zgam = deg_to_rad * polgam 23 | zarg = zsinpol * np.sin(zphis) + zcospol * np.cos(zphis) * ( 24 | np.cos(zrlas) * np.cos(zgam) - np.sin(zgam) * np.sin(zrlas) 25 | ) 26 | 27 | return rad_to_deg * np.arcsin(zarg) 28 | 29 | 30 | def lonrot2lon( 31 | phirot: np.ndarray, 32 | rlarot: np.ndarray, 33 | polphi: float, 34 | pollam: float, 35 | polgam: float = 0, 36 | ) -> np.ndarray: 37 | rad_to_deg = 57.2957795 38 | deg_to_rad = 0.0174532925 39 | 40 | zsinpol = np.sin(deg_to_rad * polphi) 41 | zcospol = np.cos(deg_to_rad * polphi) 42 | zlampol = deg_to_rad * pollam 43 | zphis = deg_to_rad * phirot 44 | 45 | zrlas = np.where(rlarot > 180.0, rlarot - 360.0, rlarot) 46 | zrlas = deg_to_rad * zrlas 47 | 48 | zgam = deg_to_rad * polgam 49 | zarg1 = np.sin(zlampol) * ( 50 | -zsinpol 51 | * np.cos(zphis) 52 | * (np.cos(zrlas) * np.cos(zgam) - np.sin(zrlas) * np.sin(zgam)) 53 | + zcospol * np.sin(zphis) 54 | ) - np.cos(zlampol) * np.cos(zphis) * ( 55 | np.sin(zrlas) * np.cos(zgam) + np.cos(zrlas) * np.sin(zgam) 56 | ) 57 | 58 | zarg2 = np.cos(zlampol) * ( 59 | -zsinpol 60 | * np.cos(zphis) 61 | * (np.cos(zrlas) * np.cos(zgam) - np.sin(zrlas) * np.sin(zgam)) 62 | + zcospol * np.sin(zphis) 63 | ) + np.sin(zlampol) * np.cos(zphis) * ( 64 | np.sin(zrlas) * np.cos(zgam) + np.cos(zrlas) * np.sin(zgam) 65 | ) 66 | zarg2 = np.where(zarg2 == 0.0, 1.0e-20, zarg2) 67 | 68 | return rad_to_deg * np.arctan2(zarg1, zarg2) 69 | -------------------------------------------------------------------------------- /src/pyflexplot/input/__init__.py: -------------------------------------------------------------------------------- 1 | """Subpackage ``pyflexplot.input``.""" 2 | # Standard library 3 | from typing import List 4 | 5 | __author__ = """Stefan Ruedisuehli""" 6 | __email__ = "stefan.ruedisuehli@env.ethz.ch" 7 | __version__ = "0.13.10" 8 | 9 | __all__: List[str] = [] 10 | -------------------------------------------------------------------------------- /src/pyflexplot/input/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/input/py.typed -------------------------------------------------------------------------------- /src/pyflexplot/plotting/__init__.py: -------------------------------------------------------------------------------- 1 | """Subpackage ``pyflexplot.plotting``.""" 2 | # Standard library 3 | from typing import List 4 | 5 | __author__ = """Stefan Ruedisuehli""" 6 | __email__ = "stefan.ruedisuehli@env.ethz.ch" 7 | __version__ = "1.0.10" 8 | 9 | __all__: List[str] = [] 10 | -------------------------------------------------------------------------------- /src/pyflexplot/plotting/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/plotting/py.typed -------------------------------------------------------------------------------- /src/pyflexplot/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/py.typed -------------------------------------------------------------------------------- /src/pyflexplot/setups/__init__.py: -------------------------------------------------------------------------------- 1 | """Subpackage ``pyflexplot.setups``.""" 2 | # Standard library 3 | from typing import List 4 | 5 | __author__ = """Stefan Ruedisuehli""" 6 | __email__ = "stefan.ruedisuehli@env.ethz.ch" 7 | __version__ = "0.14.0" 8 | 9 | __all__: List[str] = [] 10 | -------------------------------------------------------------------------------- /src/pyflexplot/setups/files_setup.py: -------------------------------------------------------------------------------- 1 | """Files setup.""" 2 | # Standard library 3 | import dataclasses as dc 4 | from typing import Tuple 5 | from typing import Union 6 | 7 | # Local 8 | from .base_setup import BaseSetup 9 | 10 | 11 | # SR_TMP <<< TODO cleaner solution 12 | def is_files_setup_param(param: str, recursive: bool = False) -> bool: 13 | if recursive: 14 | raise NotImplementedError("recursive") 15 | return param.replace("files.", "") in FilesSetup.get_params() 16 | 17 | 18 | # SR_TMP TODO pull common base class out of LayoutSetup, ModelSetup etc. 19 | @dc.dataclass 20 | class FilesSetup(BaseSetup): 21 | input: str 22 | output: Union[str, Tuple[str, ...]] 23 | output_time_format: str = "%Y%m%d%H%M" 24 | -------------------------------------------------------------------------------- /src/pyflexplot/setups/layout_setup.py: -------------------------------------------------------------------------------- 1 | """Layout setup.""" 2 | # Standard library 3 | import dataclasses as dc 4 | from typing import Any 5 | from typing import Mapping 6 | from typing import Optional 7 | 8 | # Local 9 | from .base_setup import BaseSetup 10 | 11 | 12 | # SR_TMP <<< TODO cleaner solution 13 | def is_layout_setup_param(param: str, recursive: bool = False) -> bool: 14 | if recursive: 15 | raise NotImplementedError("recursive") 16 | return param.replace("layout.", "") in LayoutSetup.get_params() 17 | 18 | 19 | # SR_TMP TODO pull common base class out of LayoutSetup, ModelSetup etc. 20 | @dc.dataclass 21 | class LayoutSetup(BaseSetup): 22 | color_style: str = "auto" 23 | plot_type: str = "auto" 24 | multipanel_param: Optional[str] = None 25 | scale_fact: float = 1.0 26 | type: str = "auto" 27 | 28 | def __post_init__(self) -> None: 29 | # Check plot_type 30 | choices = ["auto", "multipanel"] 31 | assert self.plot_type in choices, self.plot_type 32 | 33 | # Check multipanel_param 34 | if self.multipanel_param is not None: 35 | multipanel_param_choices = ["ens_variable", "ens_params.pctl", "time"] 36 | if self.multipanel_param not in multipanel_param_choices: 37 | raise NotImplementedError( 38 | f"unknown multipanel_param '{self.multipanel_param}'" 39 | f"; choices: {', '.join(multipanel_param_choices)}" 40 | ) 41 | 42 | # pylint: disable=W0221 # arguments-differ (simulation_type) 43 | @classmethod 44 | def create( 45 | cls, 46 | params: Mapping[str, Any], 47 | *, 48 | simulation_type: str = "deterministic", 49 | ) -> "LayoutSetup": 50 | params = cls.cast_many(params) 51 | if params.get("type", "auto") == "auto": 52 | if simulation_type == "deterministic": 53 | params["type"] = "post_vintage" 54 | elif simulation_type == "ensemble": 55 | params["type"] = "post_vintage_ens" 56 | else: 57 | raise ValueError(f"invalid simulation_type '{simulation_type}'") 58 | params = cls.cast_many(params) 59 | return cls(**params) 60 | -------------------------------------------------------------------------------- /src/pyflexplot/setups/model_setup.py: -------------------------------------------------------------------------------- 1 | """Model setup.""" 2 | # Standard library 3 | import dataclasses as dc 4 | from typing import Any 5 | from typing import Dict 6 | from typing import Mapping 7 | from typing import Optional 8 | from typing import Tuple 9 | 10 | # Local 11 | from .base_setup import BaseSetup 12 | 13 | 14 | # SR_TMP <<< TODO cleaner solution 15 | def is_model_setup_param(param: str, recursive: bool = False) -> bool: 16 | if recursive: 17 | raise NotImplementedError("recursive") 18 | return param.replace("model.", "") in ModelSetup.get_params() 19 | 20 | 21 | # SR_TMP TODO pull common base class out of ModelSetup, LayoutSetup . 22 | @dc.dataclass 23 | class ModelSetup(BaseSetup): 24 | name: str = "N/A" 25 | base_time: Optional[int] = None 26 | ens_member_id: Optional[Tuple[int, ...]] = None 27 | simulation_type: str = "N/A" 28 | 29 | @classmethod 30 | def _create_mod_params_post_cast(cls, params: Mapping[str, Any]) -> Dict[str, Any]: 31 | """Modify params in ``create`` after typecasting.""" 32 | params = dict(params) 33 | members: Optional[list] = params.get("ens_member_id", []) 34 | multiple_members = members is not None and len(members) > 1 35 | if "simulation_type" not in params: 36 | if multiple_members: 37 | params["simulation_type"] = "ensemble" 38 | else: 39 | params["simulation_type"] = "deterministic" 40 | if params["simulation_type"] == "deterministic" and multiple_members: 41 | raise ValueError( 42 | f"deterministic simulation cannot have multiple members: {members}" 43 | ) 44 | return params 45 | -------------------------------------------------------------------------------- /src/pyflexplot/utils/__init__.py: -------------------------------------------------------------------------------- 1 | """Subpackage ``pyflexplot.utils``.""" 2 | # Standard library 3 | from typing import List 4 | 5 | __author__ = """Stefan Ruedisuehli""" 6 | __email__ = "stefan.ruedisuehli@env.ethz.ch" 7 | __version__ = "1.0.10" 8 | 9 | __all__: List[str] = [] 10 | -------------------------------------------------------------------------------- /src/pyflexplot/utils/exceptions.py: -------------------------------------------------------------------------------- 1 | """Exceptions.""" 2 | 3 | 4 | # Derived from ``Exception`` 5 | 6 | 7 | class ArrayDimensionError(Exception): 8 | """Array has wrong dimensions.""" 9 | 10 | 11 | class AttributeConflictError(Exception): 12 | """Conflicting object attributes.""" 13 | 14 | 15 | class FieldAllNaNError(Exception): 16 | """Field contains only NaN values.""" 17 | 18 | 19 | class InconsistentArrayShapesError(Exception): 20 | """Arrays have inconsistent shapes.""" 21 | 22 | 23 | class KeyConflictError(Exception): 24 | """Conflicting dictionary keys.""" 25 | 26 | 27 | class MaxIterationError(Exception): 28 | """Maximum number of iterations of a loop exceeded.""" 29 | 30 | 31 | class MinFontSizeReachedError(Exception): 32 | """Font size cannot be reduced further.""" 33 | 34 | 35 | class MinStrLenReachedError(Exception): 36 | """String cannot be further truncated.""" 37 | 38 | 39 | class MissingCacheEntryError(Exception): 40 | """Entry missing in cache.""" 41 | 42 | 43 | class NoPresetFileFoundError(Exception): 44 | """No preset file found in directory/ies.""" 45 | 46 | 47 | class NotSummarizableError(Exception): 48 | """Object could not be summarized.""" 49 | 50 | 51 | class TooWideRefDistIndicatorError(Exception): 52 | """Reference distance indicator is too wide for the plot.""" 53 | 54 | 55 | class UnequalSetupParamValuesError(Exception): 56 | """Values of a param differs between multiple setups.""" 57 | -------------------------------------------------------------------------------- /src/pyflexplot/utils/logging.py: -------------------------------------------------------------------------------- 1 | # pylint: disable=E1101 # no-member (logging.verbose, logging.VERBOSE) 2 | """Preset setup files.""" 3 | # Standard library 4 | import logging 5 | from typing import Optional 6 | 7 | 8 | def get_log_level() -> int: 9 | return logging.getLogger().level 10 | 11 | 12 | def set_log_level(verbosity: int) -> None: 13 | if verbosity <= 0: 14 | logging.getLogger().setLevel(logging.INFO) 15 | elif verbosity == 1: 16 | logging.getLogger().setLevel(logging.VERBOSE) # type: ignore 17 | elif verbosity >= 2: 18 | logging.getLogger().setLevel(logging.DEBUG) 19 | 20 | 21 | def log( 22 | *, 23 | err: Optional[str] = None, 24 | wrn: Optional[str] = None, 25 | inf: Optional[str] = None, 26 | vbs: Optional[str] = None, 27 | dbg: Optional[str] = None, 28 | ) -> None: 29 | """Log the message at the lowest available level. 30 | 31 | If case of multiple messages, only that at the lowest level is logged, 32 | whereby ``inf`` (info) > ``vbs`` (verbose) > ``dbg`` (debug), i.e., if all 33 | are passed, ``dbg`` wins. 34 | 35 | """ 36 | if err is not None: 37 | err = f"error: {err}" 38 | logging.error(err) 39 | if wrn is not None: 40 | wrn = f"warning: {wrn}" 41 | logging.warning(wrn) 42 | level = get_log_level() 43 | if level <= logging.DEBUG and dbg is not None: 44 | logging.debug(dbg) 45 | return 46 | if level <= logging.VERBOSE and vbs is not None: # type: ignore 47 | logging.verbose(vbs) # type: ignore 48 | return 49 | if level <= logging.INFO and inf is not None: 50 | logging.info(inf) 51 | return 52 | 53 | 54 | def add_logging_level(name: str, level: int) -> None: 55 | """Add additional logging level. 56 | 57 | src: https://stackoverflow.com/a/55049399/4419816 58 | 59 | """ 60 | 61 | def new_log(msg, *args, **kwargs): 62 | if logging.getLogger().isEnabledFor(level): 63 | logging.log(level, msg, *args, **kwargs) 64 | 65 | logging.addLevelName(level, "VERBOSE") 66 | setattr(logging, name.upper(), level) 67 | setattr(logging.Logger, name, new_log) 68 | setattr(logging, name, new_log) 69 | -------------------------------------------------------------------------------- /src/pyflexplot/utils/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/pyflexplot/utils/py.typed -------------------------------------------------------------------------------- /src/pyflexplot/utils/typing.py: -------------------------------------------------------------------------------- 1 | """Custom types for type hints.""" 2 | # Standard library 3 | from typing import Callable 4 | from typing import List 5 | from typing import Sequence 6 | from typing import Tuple 7 | from typing import Union 8 | 9 | # Third-party 10 | import click 11 | import numpy as np 12 | 13 | # Primary 14 | ColorType = Union[str, Tuple[float, float, float], Tuple[float, float, float, float]] 15 | ClickParamType = Union[click.Option, click.Parameter] 16 | FontSizeType = Union[str, float] 17 | LocationType = Union[str, int] 18 | MarkerStyleType = Union[str, int] 19 | PointConverterT = Union[ 20 | Callable[[float, float], Tuple[float, float]], 21 | Callable[[np.ndarray, np.ndarray], Tuple[np.ndarray, np.ndarray]], 22 | ] 23 | RawTextBlockType = Union[str, Sequence[str]] 24 | RectType = Tuple[float, float, float, float] 25 | TextBlockType = List[str] 26 | 27 | # Secondary 28 | RawTextBlocksType = Union[str, Sequence[RawTextBlockType]] 29 | TextBlocksType = List[TextBlockType] 30 | -------------------------------------------------------------------------------- /src/pyflexplot/utils/wrappers.py: -------------------------------------------------------------------------------- 1 | """Wrappers for utility functions with select default arguments.""" 2 | # Standard library 3 | from typing import Any 4 | from typing import Type 5 | 6 | # First-party 7 | from srutils.dataclasses import cast_field_value as cast_field_value_ 8 | 9 | 10 | def cast_field_value(cls: Type, name: str, value: Any, **kwargs: Any) -> Any: 11 | kwargs = { 12 | "auto_wrap": True, 13 | "bool_mode": "intuitive", 14 | "timedelta_unit": "hours", 15 | "unpack_str": False, 16 | **kwargs, 17 | } 18 | return cast_field_value_(cls, name, value, **kwargs) 19 | -------------------------------------------------------------------------------- /src/srtools/__init__.py: -------------------------------------------------------------------------------- 1 | """Some tools.""" 2 | 3 | __author__ = """Stefan Ruedisuehli""" 4 | __email__ = "stefan.ruedisuehli@env.ethz.ch" 5 | __version__ = "0.1.0" 6 | 7 | # Standard library 8 | from typing import List 9 | 10 | __all__: List[str] = [] 11 | -------------------------------------------------------------------------------- /src/srtools/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/srtools/py.typed -------------------------------------------------------------------------------- /src/srutils/__init__.py: -------------------------------------------------------------------------------- 1 | """Some utility functions and classes for testing.""" 2 | __author__ = "Stefan Ruedisuehli" 3 | __email__ = "stefan.ruedisuehli@env.ethz.ch" 4 | __version__ = "0.1.0" 5 | 6 | # Standard library 7 | from typing import List 8 | 9 | __all__: List[str] = [] 10 | -------------------------------------------------------------------------------- /src/srutils/exceptions.py: -------------------------------------------------------------------------------- 1 | """Exceptions.""" 2 | 3 | # Derived from Exception 4 | 5 | 6 | class InvalidParameterError(Exception): 7 | """Parameter is invalid.""" 8 | 9 | 10 | class InvalidVariableNameCharFilterError(Exception): 11 | """Function to filter invalid variable name characters is invalid.""" 12 | 13 | 14 | class InvalidVariableNameError(Exception): 15 | """A string is not a valid variable name.""" 16 | 17 | 18 | class UnexpandableValueError(Exception): 19 | """Value is not expandable.""" 20 | 21 | 22 | # Derived from other standard exceptions 23 | 24 | 25 | class IncompatibleTypesError(TypeError): 26 | """Types are incompatible.""" 27 | 28 | 29 | class KeyConflictError(KeyError): 30 | """Key conflict.""" 31 | 32 | 33 | class UnsupportedTypeError(TypeError): 34 | """Type is unsupported.""" 35 | 36 | 37 | # Derived from custom exceptions 38 | 39 | 40 | class InvalidParameterNameError(InvalidParameterError): 41 | """Parameter has invalid name.""" 42 | 43 | 44 | class InvalidParameterValueError(InvalidParameterError): 45 | """Parameter has invalid value.""" 46 | -------------------------------------------------------------------------------- /src/srutils/geo.py: -------------------------------------------------------------------------------- 1 | """Geometric/geographic utilities.""" 2 | from __future__ import annotations 3 | 4 | # Standard library 5 | from typing import cast 6 | from typing import Tuple 7 | from typing import Union 8 | 9 | FracDegsT = float 10 | FullDegsT = int 11 | FullMinsT = int 12 | FullSecsT = int 13 | DegsT = Union[ 14 | FracDegsT, 15 | Tuple[FullDegsT], 16 | Tuple[FullDegsT, FullMinsT], 17 | Tuple[FullDegsT, FullMinsT, FullSecsT], 18 | ] 19 | 20 | 21 | class Degrees: 22 | """Degrees, useful for instance to convert between notations.""" 23 | 24 | def __init__(self, deg: DegsT): 25 | """Create an instance of ``Degrees``. 26 | 27 | Args: 28 | deg: Degrees in one of the following formats: fraction notation; 29 | full degrees; full degrees/minutes; full degrees/minutes/seconds. 30 | 31 | """ 32 | self._frac: float 33 | 34 | # Check for fraction 35 | if isinstance(deg, (int, float)): 36 | self._frac = float(deg) 37 | return None 38 | 39 | # Check for most common non-stable sequence 40 | if isinstance(deg, set): 41 | raise ValueError("deg cannot be a set", deg) 42 | 43 | # Check for `(degs,)` 44 | try: 45 | (degs,) = cast(Tuple[FullDegsT], deg) 46 | except TypeError: 47 | pass 48 | else: 49 | self._frac = float(deg[0]) 50 | return None 51 | 52 | # Check for `(degs, mins)` 53 | try: 54 | degs, mins = cast(Tuple[FullDegsT, FullMinsT], deg) 55 | except TypeError: 56 | pass 57 | else: 58 | self._frac = float(degs) + mins / 60.0 59 | return None 60 | 61 | # Check for `(degs, mins, secs)` 62 | try: 63 | degs, mins, secs = cast(Tuple[FullDegsT, FullMinsT, FullSecsT], deg) 64 | except TypeError: 65 | pass 66 | else: 67 | self._frac = float(degs) + mins / 60.0 + secs / 3600.0 68 | 69 | raise ValueError( 70 | f"invalid deg='{deg}'; must be `float` or `(degs, [mins, [secs,]])`" 71 | ) 72 | 73 | def frac(self) -> float: 74 | """Return degrees as a fraction.""" 75 | return self._frac 76 | 77 | def dms(self) -> Tuple[FullDegsT, FullMinsT, FullSecsT]: 78 | """Return full degrees, minutes, and seconds.""" 79 | degs = self._frac 80 | mins = degs % 1 * 60 81 | secs = mins % 1 * 60 82 | return int(degs), int(mins), int(secs) 83 | 84 | def degs(self) -> FullDegsT: 85 | """Return full degrees.""" 86 | return self.dms()[0] 87 | 88 | def mins(self) -> FullMinsT: 89 | """Return full minutes.""" 90 | return self.dms()[1] 91 | 92 | def secs(self) -> FullSecsT: 93 | """Return full seconds.""" 94 | return self.dms()[2] 95 | -------------------------------------------------------------------------------- /src/srutils/iter.py: -------------------------------------------------------------------------------- 1 | """Iteration utilities.""" 2 | # Standard library 3 | from typing import Sequence 4 | 5 | 6 | def flatten(obj, cls=None, max_depth=None, *, _depth=0): 7 | """Flatten a nested sequence recursively.""" 8 | max_depth_reached = max_depth is not None and 0 <= max_depth < _depth 9 | 10 | def is_expandable(obj): 11 | if not isiterable(obj, str_ok=False): 12 | return False 13 | if cls is not None: 14 | return isinstance(obj, cls) 15 | return True 16 | 17 | if max_depth_reached or not is_expandable(obj): 18 | return [obj] 19 | 20 | flat = [] 21 | for ele in obj: 22 | flat.extend(flatten(ele, cls=cls, max_depth=max_depth, _depth=_depth + 1)) 23 | 24 | if _depth == 0: 25 | try: 26 | flat = cls(flat) 27 | except TypeError: 28 | pass 29 | return flat 30 | 31 | 32 | def isiterable(obj, str_ok=True): 33 | """Check whether an object is iterable. 34 | 35 | Args: 36 | obj (object): Object to check. 37 | 38 | str_ok (bool, optional): Whether strings are considered iterable. 39 | Defaults to True. 40 | 41 | """ 42 | if isinstance(obj, str): 43 | return str_ok 44 | try: 45 | iter(obj) 46 | except TypeError: 47 | return False 48 | else: 49 | return True 50 | 51 | 52 | def resolve_indices( 53 | idcs: Sequence[int], n: int, force_in_range: bool = False 54 | ) -> Sequence[int]: 55 | """Resolve indices, like subtracting negative indices from the end. 56 | 57 | Args: 58 | idcs: Indices. Not required to be consecutive, in order, or unique. 59 | May be positive (from start) or negative (from end). 60 | 61 | n: Length of the sequence which the indices refer to. 62 | 63 | force_in_range (optional): Instead of raising an exception when an index 64 | is out of range (i.e., negative or equal or larger than ``n`` after 65 | negative index resolution), force it into the range (set it to zero 66 | or ``n - 1``). 67 | 68 | """ 69 | idcs_new = [] 70 | for i in idcs: 71 | i_in = i 72 | if i < 0: 73 | i += n 74 | if i < 0: 75 | if not force_in_range: 76 | raise ValueError(f"invalid index {i_in}: {i} < 0") 77 | i = 0 78 | if i >= n: 79 | if not force_in_range: 80 | raise ValueError(f"invalid index {i_in}: {i} >= {n}") 81 | i = n - 1 82 | idcs_new.append(i) 83 | return type(idcs)(idcs_new) # type: ignore 84 | -------------------------------------------------------------------------------- /src/srutils/pdf.py: -------------------------------------------------------------------------------- 1 | """Work with PDF files.""" 2 | from __future__ import annotations 3 | 4 | # Standard library 5 | import dataclasses as dc 6 | import os 7 | from typing import Sequence 8 | 9 | # Third-party 10 | from pypdf import PdfReader 11 | from pypdf import PdfWriter 12 | from pypdf._page import PageObject 13 | from pypdf.errors import PdfReadError 14 | 15 | 16 | @dc.dataclass 17 | class MultiPagePDF: 18 | """A multi-page PDF file composed of multiple individual PDF files.""" 19 | 20 | pages: list[PageObject] 21 | 22 | def write(self, path: str) -> None: 23 | """Write the file to disk.""" 24 | writer = PdfWriter() 25 | for page in self.pages: 26 | writer.add_page(page) 27 | dir_path = os.path.dirname(path) 28 | if dir_path: 29 | os.makedirs(dir_path, exist_ok=True) 30 | with open(path, "wb") as fo: 31 | writer.write(fo) 32 | 33 | @staticmethod 34 | def _read_pages(paths: Sequence[str]) -> list[PageObject]: 35 | """Read pages from disk.""" 36 | pages: list[PageObject] = [] 37 | for path_i in paths: 38 | try: 39 | file = PdfReader(path_i) 40 | except (ValueError, TypeError, PdfReadError) as e: 41 | # Occur sporadically; likely a file system issue 42 | raise PdfReadError(path_i) from e 43 | page = file.pages[0] 44 | pages.append(page) 45 | return pages 46 | 47 | @classmethod 48 | def from_files(cls, paths: Sequence[str]) -> MultiPagePDF: 49 | pages = cls._read_pages(paths) 50 | return cls(pages) 51 | -------------------------------------------------------------------------------- /src/srutils/plotting.py: -------------------------------------------------------------------------------- 1 | """Plotting utilities.""" 2 | # Standard library 3 | from typing import Sequence 4 | from typing import Tuple 5 | from typing import Union 6 | 7 | # Third-party 8 | import matplotlib as mpl 9 | import matplotlib.pyplot as plt 10 | import numpy as np 11 | from matplotlib.colors import Colormap 12 | 13 | ColorType = Union[str, Tuple[float, float, float], Tuple[float, float, float, float]] 14 | 15 | 16 | def truncate_cmap( 17 | cmap: str | Colormap, minval: float = 0.0, maxval: float = 1.0, n: int = 100 18 | ) -> Colormap: 19 | """Truncate a color map. 20 | 21 | Based on: https://stackoverflow.com/a/18926541/4419816 22 | 23 | """ 24 | if isinstance(cmap, str): 25 | cmap = plt.get_cmap(cmap) 26 | return mpl.colors.LinearSegmentedColormap.from_list( 27 | f"truncated({cmap.name}, {minval:.2f}, {maxval:.2f})", 28 | cmap(np.linspace(minval, maxval, n)), 29 | ) 30 | 31 | 32 | def concatenate_cmaps( 33 | cmap1: Union[str, Colormap], cmap2: Union[str, Colormap], n: int = 100 34 | ) -> Colormap: 35 | """Concatenate two color maps.""" 36 | if isinstance(cmap1, str): 37 | cmap1 = mpl.cm.get_cmap(cmap1) 38 | if isinstance(cmap2, str): 39 | cmap2 = mpl.cm.get_cmap(cmap2) 40 | colors1 = cmap1(np.linspace(0.0, 1.0, n)).tolist() 41 | colors2 = cmap2(np.linspace(0.0, 1.0, n)).tolist() 42 | return mpl.colors.LinearSegmentedColormap.from_list( 43 | f"concatenated({cmap1.name}, {cmap2.name})", colors1 + colors2 44 | ) 45 | 46 | 47 | def linear_cmap( 48 | name: str, colors: Union[Sequence[ColorType], ColorType], n: int = 100 49 | ) -> Colormap: 50 | """Create a linear color map from one or more colors.""" 51 | if ( 52 | isinstance(colors, str) 53 | or isinstance(colors, tuple) 54 | and isinstance(next(iter(colors)), float) 55 | ): 56 | colors = ["white", colors] # type: ignore 57 | return mpl.colors.LinearSegmentedColormap.from_list(name, colors, N=n) 58 | -------------------------------------------------------------------------------- /src/srutils/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/srutils/py.typed -------------------------------------------------------------------------------- /src/words/__init__.py: -------------------------------------------------------------------------------- 1 | """Top-level package for words.""" 2 | 3 | __author__ = """Stefan Ruedisuehli""" 4 | __email__ = "stefan.ruedisuehli@env.ethz.ch" 5 | __version__ = "0.1.0" 6 | 7 | # Standard library 8 | from typing import List 9 | 10 | # Local 11 | from .word import TranslatedWord 12 | from .word import Word 13 | from .word import WordT 14 | from .words import TranslatedWords 15 | from .words import Words 16 | 17 | __all__: List[str] = [ 18 | "TranslatedWord", 19 | "TranslatedWords", 20 | "Word", 21 | "WordT", # SR_TMP TODO Subclass ContextWord from Word and eliminate WordT 22 | "Words", 23 | ] 24 | -------------------------------------------------------------------------------- /src/words/exceptions.py: -------------------------------------------------------------------------------- 1 | """Exceptions.""" 2 | 3 | 4 | # Primary 5 | 6 | 7 | class WordsError(Exception): 8 | """Error related to words.""" 9 | 10 | 11 | # Secondary 12 | 13 | 14 | class MissingLanguageError(WordsError): 15 | """Language is missing.""" 16 | 17 | 18 | class MissingWordError(WordsError): 19 | """Word is missing.""" 20 | -------------------------------------------------------------------------------- /src/words/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/src/words/py.typed -------------------------------------------------------------------------------- /src/words/test.py: -------------------------------------------------------------------------------- 1 | """Wrappers for ``TranslatedWord[s]`` with testing-friendly interface.""" 2 | from __future__ import annotations 3 | 4 | # Standard library 5 | from typing import Sequence 6 | from typing import Type 7 | 8 | # Local 9 | from .word import TranslatedWord 10 | from .words import TranslatedWords 11 | 12 | 13 | class TranslatedTestWord(TranslatedWord): 14 | """Testing wrapper for ``TranslatedWord``.""" 15 | 16 | 17 | class TranslatedTestWords(TranslatedWords): 18 | """Testing wrapper for ``TranslatedWords``.""" 19 | 20 | cls_word: Type[TranslatedWord] = TranslatedTestWord 21 | 22 | def __init__(self, raw_words: Sequence[str], langs: Sequence[str]) -> None: 23 | """Create an instance of ``TranslatedTestWords``.""" 24 | words_langs: dict[str, dict[str, str]] = { 25 | word: {lang: word for lang in langs} for word in raw_words 26 | } 27 | name = None 28 | super().__init__(name, words_langs) 29 | -------------------------------------------------------------------------------- /tests/data/pyflexplot/flexpart/artificial/flexpart_cosmo-e_const_000.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/tests/data/pyflexplot/flexpart/artificial/flexpart_cosmo-e_const_000.nc -------------------------------------------------------------------------------- /tests/data/pyflexplot/flexpart/artificial/flexpart_cosmo-e_const_001.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/tests/data/pyflexplot/flexpart/artificial/flexpart_cosmo-e_const_001.nc -------------------------------------------------------------------------------- /tests/data/pyflexplot/flexpart/artificial/flexpart_cosmo-e_const_002.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/tests/data/pyflexplot/flexpart/artificial/flexpart_cosmo-e_const_002.nc -------------------------------------------------------------------------------- /tests/data/pyflexplot/flexpart/artificial/flexpart_cosmo-e_const_003.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/tests/data/pyflexplot/flexpart/artificial/flexpart_cosmo-e_const_003.nc -------------------------------------------------------------------------------- /tests/data/pyflexplot/flexpart/artificial/flexpart_cosmo-e_const_004.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/tests/data/pyflexplot/flexpart/artificial/flexpart_cosmo-e_const_004.nc -------------------------------------------------------------------------------- /tests/data/pyflexplot/flexpart/artificial/flexpart_cosmo-e_const_005.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/tests/data/pyflexplot/flexpart/artificial/flexpart_cosmo-e_const_005.nc -------------------------------------------------------------------------------- /tests/data/pyflexplot/flexpart/artificial/flexpart_cosmo-e_const_006.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/tests/data/pyflexplot/flexpart/artificial/flexpart_cosmo-e_const_006.nc -------------------------------------------------------------------------------- /tests/data/pyflexplot/flexpart/artificial/flexpart_cosmo-e_const_007.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/tests/data/pyflexplot/flexpart/artificial/flexpart_cosmo-e_const_007.nc -------------------------------------------------------------------------------- /tests/data/pyflexplot/flexpart/artificial/flexpart_cosmo-e_const_008.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/tests/data/pyflexplot/flexpart/artificial/flexpart_cosmo-e_const_008.nc -------------------------------------------------------------------------------- /tests/data/pyflexplot/flexpart/artificial/flexpart_cosmo-e_const_009.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/tests/data/pyflexplot/flexpart/artificial/flexpart_cosmo-e_const_009.nc -------------------------------------------------------------------------------- /tests/data/pyflexplot/flexpart/artificial/flexpart_cosmo-e_const_010.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/tests/data/pyflexplot/flexpart/artificial/flexpart_cosmo-e_const_010.nc -------------------------------------------------------------------------------- /tests/data/pyflexplot/flexpart/artificial/flexpart_cosmo-e_const_011.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/tests/data/pyflexplot/flexpart/artificial/flexpart_cosmo-e_const_011.nc -------------------------------------------------------------------------------- /tests/data/pyflexplot/flexpart/artificial/flexpart_cosmo-e_const_012.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/tests/data/pyflexplot/flexpart/artificial/flexpart_cosmo-e_const_012.nc -------------------------------------------------------------------------------- /tests/data/pyflexplot/flexpart/artificial/flexpart_cosmo-e_const_013.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/tests/data/pyflexplot/flexpart/artificial/flexpart_cosmo-e_const_013.nc -------------------------------------------------------------------------------- /tests/data/pyflexplot/flexpart/artificial/flexpart_cosmo-e_const_014.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/tests/data/pyflexplot/flexpart/artificial/flexpart_cosmo-e_const_014.nc -------------------------------------------------------------------------------- /tests/data/pyflexplot/flexpart/artificial/flexpart_cosmo-e_const_015.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/tests/data/pyflexplot/flexpart/artificial/flexpart_cosmo-e_const_015.nc -------------------------------------------------------------------------------- /tests/data/pyflexplot/flexpart/artificial/flexpart_cosmo-e_const_016.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/tests/data/pyflexplot/flexpart/artificial/flexpart_cosmo-e_const_016.nc -------------------------------------------------------------------------------- /tests/data/pyflexplot/flexpart/artificial/flexpart_cosmo-e_const_017.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/tests/data/pyflexplot/flexpart/artificial/flexpart_cosmo-e_const_017.nc -------------------------------------------------------------------------------- /tests/data/pyflexplot/flexpart/artificial/flexpart_cosmo-e_const_018.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/tests/data/pyflexplot/flexpart/artificial/flexpart_cosmo-e_const_018.nc -------------------------------------------------------------------------------- /tests/data/pyflexplot/flexpart/artificial/flexpart_cosmo-e_const_019.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/tests/data/pyflexplot/flexpart/artificial/flexpart_cosmo-e_const_019.nc -------------------------------------------------------------------------------- /tests/data/pyflexplot/flexpart/artificial/flexpart_cosmo-e_const_020.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/tests/data/pyflexplot/flexpart/artificial/flexpart_cosmo-e_const_020.nc -------------------------------------------------------------------------------- /tests/data/pyflexplot/flexpart/reduced/flexpart_cosmo-1_2019052800.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/tests/data/pyflexplot/flexpart/reduced/flexpart_cosmo-1_2019052800.nc -------------------------------------------------------------------------------- /tests/data/pyflexplot/flexpart/reduced/flexpart_cosmo-1_2019093012.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/tests/data/pyflexplot/flexpart/reduced/flexpart_cosmo-1_2019093012.nc -------------------------------------------------------------------------------- /tests/data/pyflexplot/flexpart/reduced/flexpart_cosmo-1e-ctrl_1032_2021040800_6-releases.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/tests/data/pyflexplot/flexpart/reduced/flexpart_cosmo-1e-ctrl_1032_2021040800_6-releases.nc -------------------------------------------------------------------------------- /tests/data/pyflexplot/flexpart/reduced/flexpart_cosmo-1e-ctrl_2020102105.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/tests/data/pyflexplot/flexpart/reduced/flexpart_cosmo-1e-ctrl_2020102105.nc -------------------------------------------------------------------------------- /tests/data/pyflexplot/flexpart/reduced/flexpart_cosmo-2e_2021030503_000_MUE.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/tests/data/pyflexplot/flexpart/reduced/flexpart_cosmo-2e_2021030503_000_MUE.nc -------------------------------------------------------------------------------- /tests/data/pyflexplot/flexpart/reduced/flexpart_cosmo-2e_2021030503_005_MUE.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/tests/data/pyflexplot/flexpart/reduced/flexpart_cosmo-2e_2021030503_005_MUE.nc -------------------------------------------------------------------------------- /tests/data/pyflexplot/flexpart/reduced/flexpart_cosmo-2e_2021030503_010_MUE.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/tests/data/pyflexplot/flexpart/reduced/flexpart_cosmo-2e_2021030503_010_MUE.nc -------------------------------------------------------------------------------- /tests/data/pyflexplot/flexpart/reduced/flexpart_cosmo-2e_2021030503_015_MUE.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/tests/data/pyflexplot/flexpart/reduced/flexpart_cosmo-2e_2021030503_015_MUE.nc -------------------------------------------------------------------------------- /tests/data/pyflexplot/flexpart/reduced/flexpart_cosmo-2e_2021030503_020_MUE.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/tests/data/pyflexplot/flexpart/reduced/flexpart_cosmo-2e_2021030503_020_MUE.nc -------------------------------------------------------------------------------- /tests/data/pyflexplot/flexpart/reduced/flexpart_cosmo-e_2019072712_000.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/tests/data/pyflexplot/flexpart/reduced/flexpart_cosmo-e_2019072712_000.nc -------------------------------------------------------------------------------- /tests/data/pyflexplot/flexpart/reduced/flexpart_cosmo-e_2019072712_001.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/tests/data/pyflexplot/flexpart/reduced/flexpart_cosmo-e_2019072712_001.nc -------------------------------------------------------------------------------- /tests/data/pyflexplot/flexpart/reduced/flexpart_cosmo-e_2019072712_005.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/tests/data/pyflexplot/flexpart/reduced/flexpart_cosmo-e_2019072712_005.nc -------------------------------------------------------------------------------- /tests/data/pyflexplot/flexpart/reduced/flexpart_cosmo-e_2019072712_010.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/tests/data/pyflexplot/flexpart/reduced/flexpart_cosmo-e_2019072712_010.nc -------------------------------------------------------------------------------- /tests/data/pyflexplot/flexpart/reduced/flexpart_cosmo-e_2019072712_015.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/tests/data/pyflexplot/flexpart/reduced/flexpart_cosmo-e_2019072712_015.nc -------------------------------------------------------------------------------- /tests/data/pyflexplot/flexpart/reduced/flexpart_cosmo-e_2019072712_020.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/tests/data/pyflexplot/flexpart/reduced/flexpart_cosmo-e_2019072712_020.nc -------------------------------------------------------------------------------- /tests/data/pyflexplot/flexpart/reduced/flexpart_ifs-hres-eu_1023_20201113120000.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/tests/data/pyflexplot/flexpart/reduced/flexpart_ifs-hres-eu_1023_20201113120000.nc -------------------------------------------------------------------------------- /tests/data/pyflexplot/flexpart/reduced/flexpart_ifs-hres_1018_20200921000000_no-deposition.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/tests/data/pyflexplot/flexpart/reduced/flexpart_ifs-hres_1018_20200921000000_no-deposition.nc -------------------------------------------------------------------------------- /tests/data/pyflexplot/flexpart/reduced/flexpart_ifs-hres_20200317000000.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/tests/data/pyflexplot/flexpart/reduced/flexpart_ifs-hres_20200317000000.nc -------------------------------------------------------------------------------- /tests/fast/test_pyflexplot/test_data/test_ens_probability.py: -------------------------------------------------------------------------------- 1 | """Tests for function ``pyflexplot.data.ensemble_probability``.""" 2 | # Third-party 3 | import numpy as np 4 | import pytest # noqa: F401 # imported but unused 5 | 6 | # First-party 7 | from pyflexplot.input.data import ensemble_probability 8 | 9 | # Shorthands for special values 10 | N = np.nan 11 | I = np.inf # noqa: E741 # ambiguous variable name 12 | 13 | 14 | def a(*args, **kwargs): 15 | """Shorthand function to create array.""" 16 | return np.array(*args, **kwargs) 17 | 18 | 19 | class TestEnsembleProbability2D: 20 | """Fraction of threshold exceedences along a 2D-array axis.""" 21 | 22 | arr = np.array( 23 | [ 24 | [3, 5, 6, 0, 1, 0, 3, 5], 25 | [6, 3, 4, 4, 4, 1, 6, 9], 26 | [2, 1, 4, 2, 6, 8, 4, 2], 27 | [9, 6, 7, 5, 7, 3, 1, 3], 28 | ] 29 | ) 30 | 31 | thr = 4 32 | 33 | def test_default(self): 34 | res = ensemble_probability(self.arr, self.thr) 35 | sol = np.array([2, 2, 2, 1, 2, 1, 1, 2]) * 100 / self.arr.shape[0] 36 | assert np.allclose(res, sol) 37 | 38 | def test_upper(self): 39 | res = ensemble_probability(self.arr, self.thr, "upper") 40 | sol = np.array([2, 2, 0, 2, 1, 3, 2, 2]) * 100 / self.arr.shape[0] 41 | assert np.allclose(res, sol) 42 | 43 | 44 | class TestEnsembleProbability3D: 45 | """Fraction of threshold exceedences along a 3D-array axis.""" 46 | 47 | arr = np.array( 48 | [ 49 | [[5, 2, 8], [0, 5, 0], [2, 1, 2], [9, 5, 2], [2, 0, 2]], 50 | [[5, 6, 7], [0, 0, 1], [2, 1, 9], [4, 5, 2], [0, 3, 9]], 51 | [[5, 6, 9], [1, 3, 8], [5, 3, 1], [3, 3, 3], [5, 3, 7]], 52 | ] 53 | ) 54 | 55 | thr = 2 56 | 57 | def test_default(self): 58 | res = ensemble_probability(self.arr, self.thr) 59 | sol = ( 60 | np.array( 61 | [ 62 | [3, 2, 3], 63 | [0, 2, 1], 64 | [1, 1, 1], 65 | [3, 3, 1], 66 | [1, 2, 2], 67 | ] 68 | ) 69 | * 100 70 | / self.arr.shape[0] 71 | ) 72 | assert np.allclose(res, sol) 73 | 74 | def test_upper(self): 75 | res = ensemble_probability(self.arr, self.thr, "upper") 76 | sol = ( 77 | np.array( 78 | [ 79 | [0, 0, 0], 80 | [3, 1, 2], 81 | [0, 2, 1], 82 | [0, 0, 0], 83 | [1, 1, 0], 84 | ] 85 | ) 86 | * 100 87 | / self.arr.shape[0] 88 | ) 89 | assert np.allclose(res, sol) 90 | -------------------------------------------------------------------------------- /tests/fast/test_pyflexplot/test_input/test_field_time_properties.py: -------------------------------------------------------------------------------- 1 | """Test class ``pyflexplot.input.data.FieldTimeProperties``.""" 2 | # Third-party 3 | import numpy as np 4 | 5 | # First-party 6 | from pyflexplot.input.field import FieldTimeProperties 7 | from pyflexplot.utils.summarize import summarize 8 | from srutils.testing import assert_nested_equal 9 | 10 | N = np.nan 11 | 12 | 13 | class TestFieldTimeProperties: 14 | arr = np.array( 15 | [[[N, 0, N, 1, 1], [0, 2, 4, N, N]], [[0, N, N, 3, 9], [0, 4, N, 16, N]]], 16 | np.float32, 17 | ) 18 | mask = np.array([[1, 1, 0, 1, 1], [1, 1, 1, 1, 0]], np.bool_) 19 | mask_nz = np.array([[0, 0, 0, 1, 1], [0, 1, 1, 1, 0]], np.bool_) 20 | stats = { 21 | "min": 0, 22 | "max": 16, 23 | "mean": 40 / 12, 24 | "median": 1.5, 25 | } 26 | stats_nz = { 27 | "min": 1, 28 | "max": 16, 29 | "mean": 40 / 8, 30 | "median": 3.5, 31 | } 32 | 33 | def test_stats(self): 34 | props = FieldTimeProperties(self.arr) 35 | assert np.isclose(props.stats.min, self.stats["min"]) 36 | assert np.isclose(props.stats.max, self.stats["max"]) 37 | assert np.isclose(props.stats.mean, self.stats["mean"]) 38 | assert np.isclose(props.stats.median, self.stats["median"]) 39 | 40 | def test_stats_nonzero(self): 41 | props = FieldTimeProperties(self.arr) 42 | assert np.isclose(props.stats_nz.min, self.stats_nz["min"]) 43 | assert np.isclose(props.stats_nz.max, self.stats_nz["max"]) 44 | assert np.isclose(props.stats_nz.mean, self.stats_nz["mean"]) 45 | assert np.isclose(props.stats_nz.median, self.stats_nz["median"]) 46 | 47 | def test_summarize(self): 48 | props = FieldTimeProperties(self.arr) 49 | summary = { 50 | "type": "FieldTimeProperties", 51 | "stats": {"type": "FieldStats", **self.stats}, 52 | "stats_nz": {"type": "FieldStats", **self.stats_nz}, 53 | } 54 | assert_nested_equal( 55 | summarize(props), summary, "res", "sol", float_close_ok=True 56 | ) 57 | 58 | def test_mask(self): 59 | props = FieldTimeProperties(self.arr) 60 | assert (props.mask == self.mask).all() 61 | 62 | def test_mask_nonzero(self): 63 | props = FieldTimeProperties(self.arr) 64 | assert (props.mask_nz == self.mask_nz).all() 65 | -------------------------------------------------------------------------------- /tests/fast/test_pyflexplot/test_plotting/test_proj_bbox.py: -------------------------------------------------------------------------------- 1 | """Test for module ``pyflexplot.plotting.proj_bbox``.""" 2 | # Standard library 3 | import dataclasses as dc 4 | 5 | # Third-party 6 | import cartopy.crs as ccrs 7 | import matplotlib.pyplot as plt 8 | import numpy as np 9 | import pytest 10 | 11 | # First-party 12 | from pyflexplot.plotting.proj_bbox import ProjectedBoundingBox 13 | from pyflexplot.plotting.proj_bbox import Projections 14 | 15 | 16 | @dc.dataclass 17 | class Cfg: 18 | clon: float = 0.0 19 | curr_proj: str = "axes" 20 | lon0: float = -180.0 21 | lon1: float = 180.0 22 | lat0: float = -90.0 23 | lat1: float = 90.0 24 | 25 | 26 | @pytest.mark.skip("unfinished") 27 | class TestRegLatLon: 28 | fig, ax = plt.subplots() 29 | ax.set_xlim(-90, 90) 30 | ax.set_ylim(0, 45) 31 | 32 | def bbox(self, cfg: Cfg) -> ProjectedBoundingBox: 33 | return ProjectedBoundingBox( 34 | ax=self.ax, 35 | projs=Projections.create_regular(clon=cfg.clon), 36 | curr_proj=cfg.curr_proj, 37 | lon0=cfg.lon0, 38 | lon1=cfg.lon1, 39 | lat0=cfg.lat0, 40 | lat1=cfg.lat1, 41 | ) 42 | 43 | def test(self): 44 | cfg = Cfg(lon0=160, lon1=180, lat0=46, lat1=60, clon=180) 45 | bbox = self.bbox(cfg) 46 | bbox.to_data() 47 | # breakpoint() 48 | 49 | 50 | def test_global() -> None: 51 | """Test transformation of global bbox. 52 | 53 | Implemented to reproduce a bug in production. 54 | 55 | """ 56 | ax = plt.figure().add_axes((0.0, 0.05, 0.7872, 0.85), projection=ccrs.PlateCarree()) 57 | bb = ProjectedBoundingBox(ax=ax, projs=Projections.create_regular()).to_axes() 58 | bb.to_map() # Here, the bug triggered an exception 59 | assert np.allclose(bb, (-180, 180, -90, 90)) 60 | -------------------------------------------------------------------------------- /tests/fast/test_pyflexplot/test_setups/__init__.py: -------------------------------------------------------------------------------- 1 | """Tests for module ``pyflexplot.setup``.""" 2 | 3 | # Standard library 4 | from typing import List 5 | 6 | __all__: List[str] = [] 7 | -------------------------------------------------------------------------------- /tests/fast/test_pyflexplot/test_setups/test_core_dimensions.py: -------------------------------------------------------------------------------- 1 | """Test class ``pyflexplot.setup.CoreDimensions``.""" 2 | # Third-party 3 | import pytest 4 | 5 | # First-party 6 | from pyflexplot.setups.dimensions import CoreDimensions 7 | 8 | 9 | class Test_Init: 10 | """Initialize ``CoreDimensions`` objects.""" 11 | 12 | def test_no_args(self): 13 | cdims = CoreDimensions() 14 | res = cdims.dict() 15 | sol = { 16 | "level": None, 17 | "nageclass": None, 18 | "release": None, 19 | "species_id": None, 20 | "time": None, 21 | "variable": None, 22 | "multiplier": None, 23 | } 24 | assert res == sol 25 | 26 | def test_all_args(self): 27 | params = { 28 | "level": 2, 29 | "nageclass": 0, 30 | "release": 3, 31 | "species_id": 2, 32 | "time": 0, 33 | "variable": "dry_deposition", 34 | "multiplier": 1, 35 | } 36 | cdims = CoreDimensions(**params) 37 | res = cdims.dict() 38 | sol = params 39 | assert res == sol 40 | 41 | def test_some_args(self): 42 | params = { 43 | "release": 1, 44 | "species_id": 2, 45 | "variable": "concentration", 46 | "multiplier": 10, 47 | } 48 | cdims = CoreDimensions(**params) 49 | res = cdims.dict() 50 | sol = { 51 | "level": None, 52 | "nageclass": None, 53 | "release": 1, 54 | "species_id": 2, 55 | "time": None, 56 | "variable": "concentration", 57 | "multiplier": 10, 58 | } 59 | assert res == sol 60 | 61 | def test_variable_fail(self): 62 | params = {"variable": ("concentration", "dry_deposition", "wet_deposition")} 63 | with pytest.raises(ValueError): 64 | CoreDimensions(**params) 65 | -------------------------------------------------------------------------------- /tests/fast/test_srutils/__init__.py: -------------------------------------------------------------------------------- 1 | """Tests for package ``srutils``.""" 2 | 3 | # Standard library 4 | from typing import List 5 | 6 | __all__: List[str] = [] 7 | -------------------------------------------------------------------------------- /tests/fast/test_srutils/test_dataclasses/__init__.py: -------------------------------------------------------------------------------- 1 | """Tests for module ``srutils.dataclasses``.""" 2 | 3 | # Standard library 4 | from typing import List 5 | 6 | __all__: List[str] = [] 7 | -------------------------------------------------------------------------------- /tests/fast/test_srutils/test_datetime/__init__.py: -------------------------------------------------------------------------------- 1 | """Tests for module ``srutils.datetime``.""" 2 | 3 | # Standard library 4 | from typing import List 5 | 6 | __all__: List[str] = [] 7 | -------------------------------------------------------------------------------- /tests/fast/test_srutils/test_dict/__init__.py: -------------------------------------------------------------------------------- 1 | """Tests for module ``srutils.dict``.""" 2 | -------------------------------------------------------------------------------- /tests/fast/test_srutils/test_dict/multival/__init__.py: -------------------------------------------------------------------------------- 1 | """Tests for module ``srutils.dict``.""" 2 | # Standard library 3 | from typing import List 4 | 5 | __all__: List[str] = [] 6 | -------------------------------------------------------------------------------- /tests/fast/test_srutils/test_dict/multival/test_compress.py: -------------------------------------------------------------------------------- 1 | """Test function ``srutils.dict.compress_multival_dicts``.""" 2 | # First-party 3 | from srutils.dict import compress_multival_dicts 4 | 5 | 6 | def test_simple(): 7 | dcts = [ 8 | {"a": 1, "b": 2, "c": 3}, 9 | {"a": 4, "b": 2, "c": 3}, 10 | ] 11 | res = compress_multival_dicts(dcts) 12 | sol = {"a": [1, 4], "b": 2, "c": 3} 13 | assert res == sol 14 | 15 | 16 | def test_extend_first(): 17 | dcts = [ 18 | {"a": [1, 2], "b": 3}, 19 | {"a": 4, "b": 5}, 20 | ] 21 | res = compress_multival_dicts(dcts) 22 | sol = {"a": [1, 2, 4], "b": [3, 5]} 23 | assert res == sol 24 | 25 | 26 | def test_extend_other(): 27 | dcts = [ 28 | {"a": 1, "b": 3}, 29 | {"a": [2, 4], "b": 5}, 30 | ] 31 | res = compress_multival_dicts(dcts) 32 | sol = {"a": [1, 2, 4], "b": [3, 5]} 33 | assert res == sol 34 | 35 | 36 | def test_extend_both(): 37 | dcts = [ 38 | {"a": [1, 2], "b": 3}, 39 | {"a": 4, "b": 5}, 40 | {"a": [2, 6], "b": [5, 7]}, 41 | ] 42 | res = compress_multival_dicts(dcts) 43 | sol = {"a": [1, 2, 4, 6], "b": [3, 5, 7]} 44 | assert res == sol 45 | -------------------------------------------------------------------------------- /tests/fast/test_srutils/test_dict/nested/__init__.py: -------------------------------------------------------------------------------- 1 | """Tests for module ``srutils.dict``.""" 2 | # Standard library 3 | from typing import List 4 | 5 | __all__: List[str] = [] 6 | -------------------------------------------------------------------------------- /tests/fast/test_srutils/test_format/__init__.py: -------------------------------------------------------------------------------- 1 | """Tests for module ``srutils.format``.""" 2 | 3 | # Standard library 4 | from typing import List 5 | 6 | __all__: List[str] = [] 7 | -------------------------------------------------------------------------------- /tests/fast/test_srutils/test_format/test_ordinal.py: -------------------------------------------------------------------------------- 1 | """Tests for function ``srutils.format.ordinal``.""" 2 | # Standard library 3 | import dataclasses as dc 4 | 5 | # Third-party 6 | import pytest 7 | 8 | # First-party 9 | from srutils.format import ordinal 10 | 11 | 12 | @dc.dataclass 13 | class Config: 14 | in_: int 15 | out: str 16 | 17 | 18 | @pytest.mark.parametrize( 19 | "config", 20 | [ 21 | Config(0, "0th"), 22 | Config(1, "1st"), 23 | Config(2, "2nd"), 24 | Config(3, "3rd"), 25 | Config(4, "4th"), 26 | Config(5, "5th"), 27 | Config(6, "6th"), 28 | Config(7, "7th"), 29 | Config(8, "8th"), 30 | Config(9, "9th"), 31 | Config(10, "10th"), 32 | Config(11, "11th"), 33 | Config(12, "12th"), 34 | Config(13, "13th"), 35 | Config(14, "14th"), 36 | Config(15, "15th"), 37 | Config(16, "16th"), 38 | Config(17, "17th"), 39 | Config(18, "18th"), 40 | Config(19, "19th"), 41 | Config(20, "20th"), 42 | Config(21, "21st"), 43 | Config(22, "22nd"), 44 | Config(23, "23rd"), 45 | Config(24, "24th"), 46 | Config(25, "25th"), 47 | Config(26, "26th"), 48 | Config(27, "27th"), 49 | Config(28, "28th"), 50 | Config(29, "29th"), 51 | Config(30, "30th"), 52 | Config(31, "31st"), 53 | Config(32, "32nd"), 54 | Config(33, "33rd"), 55 | Config(34, "34th"), 56 | Config(35, "35th"), 57 | Config(36, "36th"), 58 | Config(37, "37th"), 59 | Config(38, "38th"), 60 | Config(39, "39th"), 61 | Config(100, "100th"), 62 | Config(101, "101st"), 63 | Config(102, "102nd"), 64 | Config(103, "103rd"), 65 | Config(2_210, "2210th"), 66 | Config(2_211, "2211th"), 67 | Config(2_212, "2212th"), 68 | Config(2_213, "2213th"), 69 | Config(2_214, "2214th"), 70 | Config(3_4520, "34520th"), 71 | Config(3_4521, "34521st"), 72 | Config(3_4522, "34522nd"), 73 | Config(3_4523, "34523rd"), 74 | Config(3_4524, "34524th"), 75 | Config(1_999_930, "1999930th"), 76 | Config(1_999_931, "1999931st"), 77 | Config(1_999_932, "1999932nd"), 78 | Config(1_999_933, "1999933rd"), 79 | Config(1_999_934, "1999934th"), 80 | ], 81 | ) 82 | def test_ordinal(config): 83 | assert ordinal(config.in_) == config.out 84 | -------------------------------------------------------------------------------- /tests/fast/test_srutils/test_iter/__init__.py: -------------------------------------------------------------------------------- 1 | """Tests for module ``srutils.iter``.""" 2 | 3 | # Standard library 4 | from typing import List 5 | 6 | __all__: List[str] = [] 7 | -------------------------------------------------------------------------------- /tests/fast/test_srutils/test_iter/test_flatten.py: -------------------------------------------------------------------------------- 1 | """Test function ``srutils.iter.flatten``.""" 2 | 3 | # First-party 4 | from srutils.iter import flatten 5 | 6 | 7 | def test_empty(): 8 | assert flatten([]) == [] 9 | assert flatten(tuple()) == [] 10 | 11 | 12 | def test_flat(): 13 | assert flatten([1, 2, 3]) == [1, 2, 3] 14 | assert flatten((1, 2, 3)) == [1, 2, 3] 15 | assert flatten(range(1, 4)) == [1, 2, 3] 16 | 17 | 18 | def test_nested_flat_regular(): 19 | assert flatten([[1, 2], [3, 4]]) == [1, 2, 3, 4] 20 | 21 | 22 | def test_nested_flat_irregular(): 23 | assert flatten([1, [2, 3], [4]]) == [1, 2, 3, 4] 24 | 25 | 26 | def test_nested_deep_regular(): 27 | res = flatten(([([1], [2]), ([3], [4])], [([5], [6]), ([7], [8])])) 28 | assert res == [1, 2, 3, 4, 5, 6, 7, 8] 29 | 30 | 31 | def test_nested_deep_irregular(): 32 | res = flatten([1, [2, [3, [4, [5]], [6]]], [7, [8]]]) 33 | assert res == [1, 2, 3, 4, 5, 6, 7, 8] 34 | 35 | 36 | def test_max_depth(): 37 | lst = [1, [2, [3, [4, [5]], [6]]], [7, [8]]] 38 | assert flatten(lst, max_depth=0) == [1, [2, [3, [4, [5]], [6]]], [7, [8]]] 39 | assert flatten(lst, max_depth=1) == [1, 2, [3, [4, [5]], [6]], 7, [8]] 40 | assert flatten(lst, max_depth=2) == [1, 2, 3, [4, [5]], [6], 7, 8] 41 | assert flatten(lst, max_depth=3) == [1, 2, 3, 4, [5], 6, 7, 8] 42 | assert flatten(lst, max_depth=4) == [1, 2, 3, 4, 5, 6, 7, 8] 43 | assert flatten(lst, max_depth=-1) == [1, 2, 3, 4, 5, 6, 7, 8] 44 | assert flatten(lst, max_depth=None) == [1, 2, 3, 4, 5, 6, 7, 8] 45 | 46 | 47 | def test_nested_select_cls(): 48 | lst = [[[[1], [2]], [(3,), (4,)]], (((5,), [6]), ([7], (8,)))] 49 | tup = ([[[1], [2]], [(3,), (4,)]], (((5,), [6]), ([7], (8,)))) 50 | assert flatten(lst, cls=list) == [1, 2, (3,), (4,), (((5,), [6]), ([7], (8,)))] 51 | assert flatten(tup, cls=tuple) == ([[[1], [2]], [(3,), (4,)]], 5, [6], [7], 8) 52 | -------------------------------------------------------------------------------- /tests/fast/test_srutils/test_str/__init__.py: -------------------------------------------------------------------------------- 1 | """Tests for module ``srutils.str``.""" 2 | 3 | # Standard library 4 | from typing import List 5 | 6 | __all__: List[str] = [] 7 | -------------------------------------------------------------------------------- /tests/fast/test_srutils/test_str/test_sorted_paths.py: -------------------------------------------------------------------------------- 1 | """Test function ``srutils.str.sorted_paths``.""" 2 | # Standard library 3 | import dataclasses as dc 4 | from typing import List 5 | from typing import Optional 6 | 7 | # Third-party 8 | import pytest 9 | 10 | # First-party 11 | from srutils.str import sorted_paths 12 | 13 | 14 | def test_nodup(): 15 | paths = ["foo.py", "bar.c", "baz.json"] 16 | assert sorted_paths(paths) == sorted(paths) 17 | assert sorted_paths(paths, reverse=True) == sorted(paths, reverse=True) 18 | assert sorted_paths(paths, key=len) == sorted(paths, key=len) 19 | 20 | 21 | @dc.dataclass 22 | class _TestCase: 23 | description: str 24 | paths: List[str] # in same order as expected after ``sorted_paths(...)`` 25 | dup_sep: Optional[str] = "-" 26 | builtin_ok: bool = False 27 | 28 | def sorted(self) -> List[str]: 29 | return sorted_paths(sorted(self.paths), self.dup_sep) 30 | 31 | def err_msg(self, msg: str, p1: List[str], p2: List[str]) -> str: 32 | return f"{self.description}:\n{msg}:\n {p1}\n {p2}" 33 | 34 | def test(self) -> None: 35 | self._test_builtin() 36 | p1 = self.sorted() 37 | p2 = self.paths 38 | assert p1 == p2, self.err_msg("sorted_paths != paths", p1, p2) 39 | 40 | def _test_builtin(self) -> None: 41 | """Compare ``sorted_paths`` and the builtin ``sorted``.""" 42 | p1 = self.sorted() 43 | p2 = sorted(self.paths) 44 | if self.builtin_ok: 45 | assert p1 == p2, self.err_msg("sorted_paths != sorted", p1, p2) 46 | else: 47 | assert p1 != p2, self.err_msg("sorted_paths == sorted", p1, p2) 48 | 49 | 50 | def test_TestCase(): 51 | case = _TestCase("test", ["foo.png", "bar.png", "bar-1.png", "bar-10.png"]) 52 | assert sorted_paths(case.paths) == case.sorted() 53 | 54 | 55 | @pytest.mark.parametrize( 56 | "case", 57 | [ 58 | _TestCase( 59 | "one duplicate type, all numbered, all same magnitude", 60 | ["foo-1.png", "foo-2.png", "foo-3.png"], 61 | builtin_ok=True, 62 | ), 63 | _TestCase( 64 | "one duplicate type, first unnumbered, all same magnitude", 65 | ["foo.png", "foo-1.png", "foo-2.png"], 66 | ), 67 | _TestCase( 68 | "one duplicate type, different magnitudes", 69 | ["foo.png"] + list(map("foo-{}.png".format, range(1, 21))), 70 | ), 71 | _TestCase( 72 | "two duplicate types, plus a non-duplicate", 73 | ["bar.c", "bar-1.c", "bar-10.c", "baz.c", "foo-1.c", "foo-10.c"], 74 | ), 75 | _TestCase( 76 | "different separator", 77 | ["bar.f", "bar.1.f", "bar.10.f", "foo-1.c", "foo-10.c", "foo.c"], 78 | dup_sep=".", 79 | ), 80 | _TestCase( 81 | "multiple separators", 82 | ["bar.f", "bar.1.f", "bar.10.f", "foo.c", "foo-1.c", "foo-10.c"], 83 | dup_sep="-.", 84 | ), 85 | ], 86 | ) 87 | def test_sorted_paths(case): 88 | case.test() 89 | -------------------------------------------------------------------------------- /tests/fast/test_srutils/test_str/test_split_outside_parens.py: -------------------------------------------------------------------------------- 1 | """Test function ``srutils.str.split_outside_parens``.""" 2 | # Third-party 3 | import pytest 4 | 5 | # First-party 6 | from srutils.str import split_outside_parens 7 | 8 | # Local 9 | from .utils import not_raises 10 | 11 | 12 | def test_no_parens(): 13 | assert split_outside_parens("hello world") == ["hello", "world"] 14 | assert split_outside_parens("hello world") == ["hello", "world"] 15 | assert split_outside_parens("foo, bar and baz", ",") == ["foo", " bar and baz"] 16 | 17 | 18 | def test_parens(): 19 | assert split_outside_parens("foo (bar baz) oof") == ["foo", "(bar baz)", "oof"] 20 | assert split_outside_parens("foo (bar baz) oof") == ["foo", "(bar baz)", "oof"] 21 | 22 | 23 | def test_brackets(): 24 | def f(s): 25 | return split_outside_parens(s, parens="[]") 26 | 27 | assert f("foo [bar baz] oof") == ["foo", "[bar baz]", "oof"] 28 | assert f("foo [bar baz] oof") == ["foo", "[bar baz]", "oof"] 29 | assert f("foo ([bar baz] oof)") == ["foo", "([bar baz]", "oof)"] 30 | 31 | 32 | def test_mixed(): 33 | def f(s): 34 | return split_outside_parens(s, parens=("([", ")]")) 35 | 36 | assert f("foo [bar baz] oof") == ["foo", "[bar baz]", "oof"] 37 | assert f("foo (bar baz) oof") == ["foo", "(bar baz)", "oof"] 38 | assert f("foo ([bar baz] oof)") == ["foo", "([bar baz] oof)"] 39 | 40 | 41 | def test_maxsplit(): 42 | def f(s): 43 | return split_outside_parens(s, parens=("([", ")]"), maxsplit=1) 44 | 45 | assert f("foo [bar baz] oof") == ["foo", "[bar baz] oof"] 46 | assert f("foo (bar baz) oof") == ["foo", "(bar baz) oof"] 47 | assert f("foo ([bar baz] oof)") == ["foo", "([bar baz] oof)"] 48 | 49 | 50 | def test_arg_parens_ok(): 51 | s = "..." 52 | with not_raises(ValueError): 53 | split_outside_parens(s, parens="()") 54 | split_outside_parens(s, parens="[}") 55 | split_outside_parens(s, parens=("(", ")")) 56 | split_outside_parens(s, parens=("([{", ")]}")) 57 | 58 | 59 | def test_arg_parens_fail(): 60 | s = "..." 61 | with pytest.raises(ValueError): 62 | split_outside_parens(s, parens="") 63 | split_outside_parens(s, parens="[") 64 | split_outside_parens(s, parens="[])") 65 | split_outside_parens(s, parens="[])") 66 | split_outside_parens(s, parens=("[])",)) 67 | split_outside_parens(s, parens=("[", "")) 68 | split_outside_parens(s, parens=("", "]")) 69 | split_outside_parens(s, parens=("[", "]", ")")) 70 | -------------------------------------------------------------------------------- /tests/fast/test_srutils/test_str/utils.py: -------------------------------------------------------------------------------- 1 | """Testing utilities.""" 2 | # Standard library 3 | from contextlib import contextmanager 4 | from typing import Generator 5 | from typing import Tuple 6 | from typing import Type 7 | from typing import Union 8 | 9 | # Third-party 10 | import pytest 11 | 12 | 13 | @contextmanager 14 | def not_raises( 15 | unexpected_exception: Union[Type[Exception], Tuple[Type[Exception]]] 16 | ) -> Generator[None, None, None]: 17 | """Test that an exception is not raised. 18 | 19 | Based on: https://stackoverflow.com/a/42327075/4419816 20 | 21 | """ 22 | try: 23 | yield 24 | except unexpected_exception as e: 25 | raise pytest.fail(f"DID RAISE {unexpected_exception}") from e 26 | -------------------------------------------------------------------------------- /tests/fast/test_srutils/test_testing/__init__.py: -------------------------------------------------------------------------------- 1 | """Tests for module ``srutils.testing``.""" 2 | 3 | # Standard library 4 | from typing import List 5 | 6 | __all__: List[str] = [] 7 | -------------------------------------------------------------------------------- /tests/fast/test_srutils/test_testing/test_assert_nested_equal.py: -------------------------------------------------------------------------------- 1 | """Test function ``srutils.testing.assert_nested_equal``.""" 2 | # Third-party 3 | import numpy as np 4 | import pytest # type: ignore 5 | 6 | # First-party 7 | from srutils.testing import assert_nested_equal 8 | 9 | 10 | def test_flat_list(): 11 | assert_nested_equal([1, 2, "hello", "world"], [1, 2, "hello", "world"]) 12 | 13 | 14 | def test_nested_list(): 15 | assert_nested_equal([[1, "foo"], "bar", [[2]]], [[1, "foo"], "bar", [[2]]]) 16 | 17 | 18 | def test_mixed_list_tuple(): 19 | assert_nested_equal([(1, "foo"), "bar", ([2],)], ([1, "foo"], "bar", [(2,)])) 20 | 21 | 22 | def test_array_list_tuple(): 23 | assert_nested_equal( 24 | [np.array([1, 2, 3]), (4, [5, 6])], 25 | [[1, 2, 3], [4, np.array([5, 6])]], 26 | ) 27 | 28 | 29 | def test_flat_dict(): 30 | assert_nested_equal( 31 | {"a": 1, "b": "c", 2: "d", 3: 4}, 32 | {3: 4, "a": 1, "b": "c", 2: "d"}, 33 | ) 34 | 35 | 36 | def test_nested_dict(): 37 | assert_nested_equal( 38 | {1: {2: "a", "b": 3}, "c": "d", 4: 5}, 39 | {"c": "d", 1: {2: "a", "b": 3}, 4: 5}, 40 | ) 41 | 42 | 43 | def test_flat_set(): 44 | assert_nested_equal({1, 2, "a", "b"}, {"b", 1, 2, "a"}) 45 | 46 | 47 | def test_float_close_flat(): 48 | obj1, obj2 = [1, 2, 3 + 1e-6], [1, 2, 3] 49 | with pytest.raises(AssertionError): 50 | assert_nested_equal(obj1, obj2) 51 | assert_nested_equal(obj1, obj2, float_close_ok=True) 52 | 53 | 54 | def test_string(): 55 | assert_nested_equal(["a"], ["a"]) 56 | with pytest.raises(AssertionError): 57 | assert_nested_equal(["a"], ["b"]) 58 | -------------------------------------------------------------------------------- /tests/fast/test_srutils/test_varname/__init__.py: -------------------------------------------------------------------------------- 1 | """Tests for module ``srutils.varname``.""" 2 | 3 | # Standard library 4 | from typing import List 5 | 6 | __all__: List[str] = [] 7 | -------------------------------------------------------------------------------- /tests/fast/test_words/__init__.py: -------------------------------------------------------------------------------- 1 | """Tests for package ``words``.""" 2 | 3 | # Standard library 4 | from typing import List 5 | 6 | __all__: List[str] = [] 7 | -------------------------------------------------------------------------------- /tests/fast/test_words/test_test.py: -------------------------------------------------------------------------------- 1 | """Test module ``words.test``.""" 2 | # Standard library 3 | import functools 4 | 5 | # First-party 6 | from srutils.testing import property_obj 7 | from words.test import TranslatedTestWord 8 | 9 | property_word = functools.partial(property_obj, TranslatedTestWord) 10 | property_words = functools.partial(property_obj, TranslatedTestWord) 11 | 12 | 13 | class _Test_Basic: 14 | ws = property_words(["foo", "bar", "baz"]) 15 | 16 | def test_all_implicit(self): 17 | assert self.ws["foo"] == "foo" 18 | assert self.ws["bar"] == "bar" 19 | assert self.ws["baz"] == "baz" 20 | -------------------------------------------------------------------------------- /tests/medium/test_pyflexplot/test_input/__init__.py: -------------------------------------------------------------------------------- 1 | """Tests for module ``pyflexplot.input``.""" 2 | -------------------------------------------------------------------------------- /tests/medium/test_pyflexplot/test_input/shared.py: -------------------------------------------------------------------------------- 1 | """Utilities for tests for module ``pyflexplot.input``.""" 2 | # Standard library 3 | import distutils.dir_util 4 | from pathlib import Path 5 | 6 | # Third-party 7 | import pytest # type: ignore 8 | 9 | DATA_ROOT = Path(__file__).parents[3] / "data/pyflexplot" 10 | 11 | 12 | @pytest.fixture 13 | def datadir_flexpart_artificial(tmpdir, request): 14 | """Return path to temporary directory with artificial flexpart data.""" 15 | return prepare_datadir("flexpart/artificial", tmpdir, request) 16 | 17 | 18 | @pytest.fixture 19 | def datadir_flexpart_reduced(tmpdir, request): 20 | """Return path to temporary directory with reduced flexpart data.""" 21 | return prepare_datadir("flexpart/reduced", tmpdir, request) 22 | 23 | 24 | def prepare_datadir(subdir, tmpdir, request): 25 | data_dir = DATA_ROOT / subdir 26 | if data_dir.is_dir(): 27 | distutils.dir_util.copy_tree(data_dir, str(tmpdir)) 28 | return tmpdir 29 | -------------------------------------------------------------------------------- /tests/medium/test_pyflexplot/test_input/test_read_flexpart_fields/__init__.py: -------------------------------------------------------------------------------- 1 | """Tests for module ``pyflexplot.input.read_fields``.""" 2 | -------------------------------------------------------------------------------- /tests/medium/test_pyflexplot/test_input/test_read_flexpart_fields/test_ensemble_artificial.py: -------------------------------------------------------------------------------- 1 | """Tests for module ``pyflexplot.input.read_fields``. 2 | 3 | These tests use artificial ensemble data comprised of input fields that are 4 | constant and equal in value to the respective ensemble member id. 5 | 6 | """ 7 | # Standard library 8 | import dataclasses as dc 9 | from typing import List 10 | 11 | # Third-party 12 | import numpy as np 13 | import pytest # type: ignore 14 | 15 | # First-party 16 | from pyflexplot.input.read_fields import read_fields 17 | from pyflexplot.setups.plot_setup import PlotSetupGroup 18 | 19 | # Local 20 | from .shared import datadir_artificial as datadir # noqa:F401 21 | 22 | 23 | @dc.dataclass 24 | class Config: 25 | ens_mem_ids: List[int] 26 | ens_var: str 27 | 28 | 29 | @pytest.mark.parametrize( 30 | "config", 31 | [ 32 | Config(ens_mem_ids=[0], ens_var="mean"), # config[0] 33 | Config(ens_mem_ids=[1], ens_var="mean"), # config[1] 34 | Config(ens_mem_ids=[0, 10], ens_var="minimum"), # [conf2] 35 | Config(ens_mem_ids=[0, 10], ens_var="mean"), # [conf3] 36 | Config(ens_mem_ids=[0, 10], ens_var="median"), # config[4] 37 | Config(ens_mem_ids=[0, 10], ens_var="maximum"), # [conf5] 38 | Config(ens_mem_ids=[2, 4, 8, 16], ens_var="minimum"), # [conf6] 39 | Config(ens_mem_ids=[2, 4, 8, 16], ens_var="mean"), # [conf7] 40 | Config(ens_mem_ids=[2, 4, 8, 16], ens_var="median"), # conf8] 41 | Config(ens_mem_ids=[2, 4, 8, 16], ens_var="maximum"), # [conf9] 42 | ], 43 | ) 44 | def test_concentration(datadir, config): # noqa:F811 45 | datafile_fmt = f"{datadir}/flexpart_cosmo-e_const_{{ens_member:03d}}.nc" 46 | 47 | setup_dct = { 48 | "files": { 49 | "input": datafile_fmt, 50 | "output": "bar.png", 51 | }, 52 | "model": { 53 | "name": "COSMO-E", 54 | "simulation_type": "ensemble", 55 | "ens_member_id": config.ens_mem_ids, 56 | }, 57 | "panels": [ 58 | { 59 | "plot_variable": "concentration", 60 | "dimensions": { 61 | "time": -1, 62 | "species_id": 1, 63 | "level": 0, 64 | }, 65 | "ens_variable": config.ens_var, 66 | } 67 | ], 68 | } 69 | setup_dct_lst = [setup_dct] 70 | setups = PlotSetupGroup.create(setup_dct_lst) 71 | field_groups = read_fields(setups, {"cls_fixer": None}) 72 | 73 | assert len(field_groups) == 1 74 | field_group = next(iter(field_groups)) 75 | assert len(field_group) == 1 76 | field = next(iter(field_group)) 77 | fld = field.fld 78 | 79 | assert np.allclose([fld.min(), fld.max()], fld.mean()) 80 | 81 | f_reduce = { 82 | "minimum": np.min, 83 | "maximum": np.max, 84 | "mean": np.mean, 85 | "median": np.median, 86 | }[config.ens_var] 87 | 88 | res = f_reduce(fld) 89 | sol = f_reduce(config.ens_mem_ids) 90 | assert np.isclose(res, sol) 91 | -------------------------------------------------------------------------------- /tests/slow/test_pyflexplot/test_plots/.gitignore: -------------------------------------------------------------------------------- 1 | *.png 2 | -------------------------------------------------------------------------------- /tests/slow/test_pyflexplot/test_plots/__init__.py: -------------------------------------------------------------------------------- 1 | """Test package ``pyflexplot``.""" 2 | -------------------------------------------------------------------------------- /tests/slow/test_pyflexplot/test_plots/test_ifs-hres-eu.py: -------------------------------------------------------------------------------- 1 | """Test the elements of complete plots based on deterministic IFS-HRES data.""" 2 | # Local 3 | from .shared import _TestBase 4 | from .shared import _TestCreatePlot # noqa:F401 5 | from .shared import _TestCreateReference # noqa:F401 6 | from .shared import datadir # noqa:F401 # required by _TestBase.test 7 | 8 | INFILE_1 = "flexpart_ifs-hres-eu_1023_20201113120000.nc" 9 | 10 | 11 | # Uncomment to create plots for all tests 12 | # _TestBase = _TestCreatePlot 13 | 14 | 15 | # Uncomment to references for all tests 16 | # _TestBase = _TestCreateReference 17 | 18 | 19 | class Test_IntegratedConcentration(_TestBase): 20 | reference = "ref_ifs-hres-eu_integrated_concentration" 21 | setup_dct = { 22 | "files": { 23 | "input": INFILE_1, 24 | "output": f"{reference}.png", 25 | }, 26 | "layout": { 27 | "plot_type": "auto", 28 | }, 29 | "model": { 30 | "name": "IFS-HRES-EU", 31 | }, 32 | "panels": [ 33 | { 34 | "plot_variable": "concentration", 35 | "integrate": True, 36 | "lang": "en", 37 | "domain": "cloud", 38 | "dimensions": { 39 | "species_id": 1, 40 | "time": 10, 41 | "level": 0, 42 | }, 43 | } 44 | ], 45 | } 46 | 47 | 48 | class Test_TotalDeposition(_TestBase): 49 | reference = "ref_ifs-hres-eu_total_deposition" 50 | setup_dct = { 51 | "files": { 52 | "input": INFILE_1, 53 | "output": f"{reference}.png", 54 | }, 55 | "layout": { 56 | "plot_type": "auto", 57 | }, 58 | "model": { 59 | "name": "IFS-HRES-EU", 60 | }, 61 | "panels": [ 62 | { 63 | "plot_variable": "tot_deposition", 64 | "integrate": True, 65 | "lang": "de", 66 | "domain": "cloud", 67 | "dimensions": { 68 | "species_id": 1, 69 | "time": -1, 70 | }, 71 | } 72 | ], 73 | } 74 | 75 | 76 | class Test_AffectedArea(_TestBase): 77 | reference = "ref_ifs-hres-eu_affected_area" 78 | setup_dct = { 79 | "files": { 80 | "input": INFILE_1, 81 | "output": f"{reference}.png", 82 | }, 83 | "model": { 84 | "name": "IFS-HRES-EU", 85 | }, 86 | "panels": [ 87 | { 88 | "plot_variable": "affected_area", 89 | "integrate": True, 90 | "lang": "en", 91 | "domain": "cloud", 92 | "dimensions": { 93 | "species_id": 1, 94 | "level": 0, 95 | "time": -1, 96 | }, 97 | } 98 | ], 99 | } 100 | -------------------------------------------------------------------------------- /various/flexpart_cosmo_species.txt: -------------------------------------------------------------------------------- 1 | SPECIES_001:TRACER Tracer name 2 | SPECIES_002:O3 Tracer name 3 | SPECIES_003:NO Tracer name 4 | SPECIES_004:NO2 Tracer name 5 | SPECIES_005:HNO3 Tracer name 6 | SPECIES_006:HNO2 Tracer name 7 | SPECIES_007:H2O2 Tracer name 8 | SPECIES_008:SO2 Tracer name 9 | SPECIES_009:HCHO Tracer name 10 | SPECIES_010:PAN Tracer name 11 | SPECIES_011:NH3 Tracer name 12 | SPECIES_012:SO4-aero Tracer name 13 | SPECIES_013:NO3-aero Tracer name 14 | SPECIES_014:I2-131 Tracer name 15 | SPECIES_015:I-131a Tracer name 16 | SPECIES_016:Cs-137 Tracer name 17 | SPECIES_017:Y-91 Tracer name 18 | SPECIES_018:Ru-106 Tracer name 19 | SPECIES_019:Kr-85 Tracer name 20 | SPECIES_020:Sr-90 Tracer name 21 | SPECIES_021:Xe-133 Tracer name 22 | SPECIES_022:CO Tracer name 23 | SPECIES_024:AIRTRACER Tracer name 24 | SPECIES_025:AERO-TRACER Tracer name 25 | SPECIES_029:Te-132 Tracer name 26 | SPECIES_030:I-131e Tracer name 27 | SPECIES_031:I-131o Tracer name 28 | SPECIES_032:Co-60 Tracer name 29 | SPECIES_033:Ir-192 Tracer name 30 | SPECIES_034:H-3 Tracer name 31 | SPECIES_035:Ba-140 Tracer name 32 | SPECIES_036:Zr-95 Tracer name 33 | SPECIES_037:Ru-103 Tracer name 34 | SPECIES_038:Pu-241 Tracer name 35 | SPECIES_039:Norm Tracer name 36 | -------------------------------------------------------------------------------- /various/rasterization_file_sizes_all.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/various/rasterization_file_sizes_all.pdf -------------------------------------------------------------------------------- /various/rasterization_file_sizes_by_model.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/various/rasterization_file_sizes_by_model.pdf -------------------------------------------------------------------------------- /various/rasterization_file_sizes_zorder.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeteoSwiss-APN/pyflexplot/22dfe1295f4d5e16dfd6ad502d7c4c63b3e7a16c/various/rasterization_file_sizes_zorder.pdf --------------------------------------------------------------------------------