Skip to content

C2SM/odin-comin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

101 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ODIN-ComIn: Online Data Interpolator for ICON

ODIN (Online Data INterpolator) is a plugin for the ICON model and for ICON-ART that allows direct sampling of model variables at user-defined observation locations during runtime. It is implemented using ICON's ComIn interface and is written in Python.

The plugin enables efficient and reproducible extraction of model output for:

  • Monitoring stations (time-averaged or instantaneous)
  • Mobile trajectories (aircraft, drones, vehicles)
  • Satellite retrievals (including possibility of applying averaging kernels)

Key features:

  • Horizontal inverse distance weighted interpolation to arbitrary locations
  • Vertical interpolation linearly with geometric height
  • Interpolation to satellite observations accurately accounting for overlap between ICON grid cells and satellite pixels
  • Application of averaging kernels to satellite observations
  • Possibility to extend ICON profile above model top using output from another model for comparison with satellite total column observations
  • Output to structured NetCDF files
  • Configuration via a YAML file (no code changes required)
  • Parallel scaling with MPI

Installation & Compilation

To use ODIN within ICON:

  1. Compile ICON with ComIn support enabled.

    • Make sure the --enable-comin option is active in the ICON build system.
  2. Build the ComIn Python adapter.

    • Provides efficient NumPy-based access to ICON arrays.
  3. Clone this repository into your working environment.

  4. Install Python dependencies:

Detailed build notes for CSCS Eiger are provided in documentation/notes.txt.

Configuration

All runtime options are handled via a YAML configuration file. The example below corresponds to a test example available upon request. In this example, ICON-ART fields are interplated to TROPOMI satellite observations and total columns are extrapolated above the model top using CAMS global model data.

NUMBER_OF_NN: 4 time_interval_writeout: 3600 accepted_distance: 12.0 jg: 1 msgrank: 0

dict_vars: CH4: var_names: ["CH4_EMIS", "CH4_BG"] signs: ["plus"] factor: [1.0e9, 1.0] unit: "ppb" long_name: "CH4 concentration" Temp: var_names: ["temp"] signs: [] factor: [1] unit: "Kelvin" long_name: "Temperature"

dict_vars_cif_sat: CH4: var_names: ["CH4_EMIS", "CH4_BG"] signs: ["plus"] factor: [1.0e9, 1.0] unit: "ppb" long_name: "CH4 concentration" Temp: var_names: ["temp"] signs: [] factor: [1] unit: "Kelvin" long_name: "Temperature"

dict_vars_cif_stations: CH4: var_names: ["CH4_EMIS", "CH4_BG"] signs: ["plus"] factor: [1.0e9, 1.0] unit: "ppb" long_name: "CH4 concentration" Temp: var_names: ["temp"] signs: [] factor: [1] unit: "Kelvin" long_name: "Temperature"

do_monitoring_stations: false do_satellite_CH4: true do_satellite_cif: false do_stations_cif: false

plugin_dir: "/capstor/scratch/cscs/zhug/Romania6km/plugin" tropomi_filename: "/capstor/scratch/cscs/zhug/Romania6km/testcase/input/TROPOMI/TROPOMI_SRON_corners_20190101_20191231.nc" cams_base_path: "/capstor/scratch/cscs/zhug/Romania6km/testcase/input/CAMS/LBC/" cams_params_file: "/capstor/scratch/cscs/zhug/Romania6km/testcase/input/CAMS/cams_params_minimal.nc" path_to_input_nc: "/capstor/scratch/cscs/zhug/Romania6km/testcase/input/empty_output_file/input_flight.nc" path_to_input_sat_cif: "/capstor/scratch/cscs/zhug/Romania6km/testcase/input/cif/sat.csv" path_to_input_stations_cif: "/capstor/scratch/cscs/zhug/Romania6km/testcase/input/cif/surf.csv" file_name_output_sat_cif: "output_sat_cif.nc" file_name_output_stations_cif: "output_stations_cif.nc" file_name_output: "output.nc" file_name_output_sat_CH4: "output_sat_ch4.nc"

Usage

Run ICON with ODIN by adding the plugin to the runscript.

Testcase

The testcase was removed from the master repository and only be found in the original repository on gitlab.empa.ch.

Example Applications

•	Monitoring stations: Extract CH₄ and temperature at ICOS sites with hourly averaging.
•	Aircraft flights: Sample ICON along measured flight tracks at model timestep resolution.
•	Satellite retrievals: Generate TROPOMI-equivalent XCH₄ with averaging kernels and CAMS extension.

Documentation

The code is commented with Doxygen-comments, so one can compile a documentation on their own with the Doxyfile in documentation

Data & Code Availability

The ODIN-ComIn plugin and testcase data are hosted here: https://github.com/C2SM/odin-comin/ The Bachelor Thesis describing the methods in detail is included in the documentation/ subfolder: ODIN: An online data interpolator for the ICON-ART atmospheric transport model using the ComIn interface (Zeno Hug, 2025)

License

This project is released under the MIT License. See LICENSE for details.

Citation

If you use this software in scientific work, please cite:

Zeno Hug (2025): ODIN: An online data interpolator for the ICON-ART atmospheric transport model using the ComIn interface. Bachelor Thesis, Empa, Atmospheric Modelling and Remote Sensing group.

About

ODIN-ComIn: Online Data Interpolator for ICON and ICON-ART

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages