GithubHelp home page GithubHelp logo

plot_profile's Introduction

$${color{red} This space repository space is space deprecated space and space unmaintained}$$

plot_profile is a Python-based command line tool to retrieve and visualise both observational data as well as variables simulated with ICON

  1. git clone https://github.com/MeteoSwiss-APN/plot_profile.git
  2. conda activate base
  3. conda install pip
  4. conda deactivate
  5. module load python
  6. cd plot_profile
  7. make venv install-dev (or just: install)

This package only works on tsa, where access to the DWH is possible. The package expects hourly output files in netcdf-format in a folder with the name corresponding to the init-time of the simulation, YYMMDDHH. The filenames need to follow the MeteoSwiss-style convention: lfffDDHHMMSS.nc (e.g. lfff00010000.nc corresponds to a model leadtime of +1h).

First activate the conda environment: conda activate plot_profile.

The available entrypoints of the package can be displayed with: plot_profile -h. The available stations can be listed with: plot_profile --stations. The available variables can be listed with: plot_profile --variables.

Further down you find example commands and corresponding graphs for each entrypoint.

  • date: Init or valid date. -> YYMMDDHH, except for radiosounding plots which include the full year.
  • add_obs: Observation, 2 arguments -> device, variable.
  • add_model: Simulated variable, 3 arguments -> model, variable, identifier.
  • model_src: Information about model -> identifier, folder, YYMMDDHH of simulation init.
  • height_src: File containing HEIGHT/HHL -> identifier, full path.
  • height_file: File containing HEIGHT/HHL -> full path.
  • colours: Matplotlib colour name -> one colour for each line, ordering does not necessarily follow user input.
  • xmin, xmax, ymin, ymax: Min and max values for x- and y-axis.

Plot radiosoundings

plot_rs --date 2021111912 --params temp --params dewp_temp --alt_top 2500

example_graphs/rs_211119_12_temp_dewp_temp_pay.png

plot_rs --date 2022011112 --params temp --clouds --relhum_thresh 95 --grid

example_graphs/rs_220111_12_temp_pay.png

plot_rs --date 2022041912 --params temp --params dewp_temp --params wind_vel --params wind_dir

example_graphs/rs_220419_12_temp_dewp_temp_wind_vel_wind_dir_pay.png

plot_rs --date 2017101602 --params temp --params dewp_temp --loc inn

example_graphs/rs_171016_02_temp_dewp_temp_inn.png

Compare vertical profiles of e.g. temperature measured by radiosounding and simulated by model for 1 specific leadtime. exp and ref serve as identifiers to connect an add_model-statement to the model_src.

  • add_model: model variable identifier
  • model_src: identifier path date

plot_profiles --loc ifl --date 19091312 --add_model icon temp ref --add_model icon qv ref --model_src ref /store/s83/swester/teamx/tdf_2019091212/output/ 19091212 --height_src ref /store/s83/swester/teamx/tdf_2019091212/output/19091212/lfff00000000c.nc

example_graphs/profiles_190913_12_ifl_icon~ref_temp_qv.png

plot_profiles --loc pay --date 21111900 --add_obs rs temp --add_model icon temp ref --add_model icon temp exp --model_src ref /scratch/swester/output_icon/ICON-1/ 21111812 --model_src exp /scratch/swester/output_icon/exp1/ 21111812

example_graphs/profiles_211119_00_pay_icon~ref_temp_icon~exp_temp_rs_temp.png

Timeseries of 1 or multiple observed and/or modelled variables. The selected variables overall may not have more than 2 differing units.

! start of variables which are accumulated in ICON (radiation, precip) always has to match the init-date of the simulation

plot_timeseries --loc ulr --start 19091212 --end 19091318 --add_obs 2m sw_down --add_model icon sw_down 1 exp --model_src exp /store/s83/swester/teamx/tdf_2019091212/output/ 19091212 --height_file /store/s83/swester/teamx/tdf_2019091212/output/19091212/lfff00000000c.nc

example_graphs/timeseries_190912_12-190913_18_ulr_icon~exp_sw_down~1_2m_sw_down.png

plot_timeseries --loc pay --start 21111900 --end 21111912 --add_obs 2m ver_vis --add_obs 2m cbh

example_graphs/timeseries_211119_00-211119_12_pay_2m_ver_vis_2m_cbh.png

plot_timeseries --loc pay --start 21111900 --end 21111906 --add_model icon temp 1 ref --add_model icon temp 1 exp --add_obs 10m_tower temp --model_src ref /scratch/swester/output_icon/ICON-1/ 21111812 --model_src exp /scratch/swester/output_icon/exp1/ 21111812

example_graphs/timeseries_211119_00-211119_06_pay_icon~ref_temp~1_icon~exp_temp~1_10m_tower_temp.png

Plot profiles of 1 variable for multiple leadtimes. Option to add observations of the same variable for times where they are available. It is possible to plot 2 different variables in 1 graph. If more than 2 variables are specified, 3 separate plots are created.

plot_icon_profiles --date 17101512 --folder /store/s83/swester/teamx/cap_2017101512/output/ --var temp --leadtime 6 --leadtime 8 --leadtime 10 --leadtime 12 --leadtime 14 --height_file /store/s83/swester/teamx/cap_2017101512/output/17101512/lfff00000000c.nc --loc ifl

example_graphs/profile_icon-1_171015_12_+6_+14_ifl_temp.png

plot_icon_profiles --date 21111812 --folder /scratch/swester/output_icon/ICON-1/ --var qc --var qc_dia --leadtime 18 --loc pay

example_graphs/profile_icon-1_211118_12_+18_pay_qc_qc_dia.png

plot_icon_profiles --date 21111012 --folder /scratch/swester/output_icon/ICON-1/ --var qv --var temp --var qc --leadtime 12 --leadtime 13 --loc gre

example_graphs/profile_icon-1_211110_12_+12_+13_gre_temp.png

Plot heatmaps (also called "time-height-crosssections") of modelled 3D variables. Optionally add cloud base height measured by ceilometers.

! for some reason currently not understood the start_leadtime is not correctly used on the x-axis, always use --start_leadtime 0

plot_icon_heatmap --date 17101512 --folder /store/s83/swester/teamx/cap_2017101512/output/ --var temp --alt_top 2500 --start_leadtime 0 --end_leadtime 18 --loc ifl --height_file /store/s83/swester/teamx/cap_2017101512/output/17101512/lfff00000000c.nc

example_graphs/heatmap_icon-1_171015_12_+0_+18_ifl_temp.png

plot_icon_heatmap --date 21111812 --folder /scratch/swester/output_icon/ICON-1/ --var temp --alt_top 2000 --start_leadtime 0 --end_leadtime 12 --verbose

example_graphs/heatmap_icon-1_211118_12_+0_+12_pay_temp.png

plot_icon_heatmap --date 21111812 --folder /scratch/swester/output_icon/ICON-1/ --var clc --alt_top 2000 --start_leadtime 0 --end_leadtime 24 --add_cbh

example_graphs/heatmap_icon-1_211118_12_+0_+24_pay_clc.png

This package was created with Cookiecutter and the MeteoSwiss-APN/mch-python-blueprint project template.

plot_profile's People

Contributors

annikalau avatar artdandoy avatar bascrezee avatar fabianschoeni avatar leuty avatar mizeller avatar swester avatar tlezuo avatar victoria-cherkas avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

tlezuo leuty swester

plot_profile's Issues

remove depracated pip option

When installing, make aborts installation because of the following line:
PIP_OPTS = --use-feature=in-tree-build
This feature is by now the default and therefore the option flag was removed by pip. See e.g. here. The flag can safely be removed, we did so in kenda_python a while ago with no implications whatsoever. Sidenote: Unfortunately I cannot open PRs in this repository :-(

default height_file to lfff00000000c.nc in specified folder

currently, the user has to specify the constants file to retrieve HEIGHT/HHL unless it comes from the icon-1e-dev-suite for which there is a default file available:
/store/s83/swester/grids/HEIGHT_ICON-1E.nc

the default should be changed such that the package looks for the lfff00000000c.nc file in the simulation-folder instead.

flexible -C option for raso retrieve

for Payerne (--loc pay), the option "-C 34" retrieves a high-resolution radiosounding. for other locations, this option has to be removed, otherwise no radiosounding at all is produced.
dwh_retrieve.py should automatically add -C 34 for payerne and omit or use -C 1 for all others.

start of timeseries of accumulated variable

de-accumulation of variables which are "accumulated and averaged since the beginning" does not check whether the start is meaningful
either: check and exit if start does not match init
or: automatically grab all files

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.