Project

General

Profile

Creating weights for ICON-CH1 regridding

Added by Moritz Wurfbaum 7 days ago

First of all a disclaimer: This is the first time for me working with CDO. Its an amazing tool but cant figure out how to create weights for regridding.

I am trying to regrid grib2 files from the new ICON-CH1 model (Alpine Region). They provide unstructured grid locations in a grib2 file. Right now I'm failing at creating the weights.

My approach:

# Convert the horizontal constants from grib2 to nc
cdo -f nc copy horizontal_constants_ICON-CH1-EPS.grib2 horizontal_constants.nc

# Rename the parameters
ncrename -v param1.191.0,clon -v param2.191.0,clat horizontal_constants.nc

# Create the weights
cdo gennn,grid_definition.txt horizontal_constants.nc weights_horizontal_to_latlon.nc

Warning: Reference to horizontal grid not available!
cdo    gennn (Abort): Reference to source grid not found!

# Dump debug info from nc file
ncdump -h horizontal_constants.nc

netcdf horizontal_constants {
dimensions:
    time = UNLIMITED ; // (1 currently)
    ncells = 1147980 ;
variables:
    double time(time) ;
        time:standard_name = "time" ;
        time:units = "minutes since 2025-3-16 03:00:00" ;
        time:calendar = "proleptic_gregorian" ;
        time:axis = "T" ;
    float clat(time, ncells) ;
        clat:CDI_grid_type = "unstructured" ;
        clat:number_of_grid_in_reference = 1 ;
        clat:institution = "MCH" ;
    float clon(time, ncells) ;
        clon:CDI_grid_type = "unstructured" ;
        clon:number_of_grid_in_reference = 1 ;
        clon:institution = "MCH" ;
[...]
}

Attached all referenced files.

Thank you so much for your help!

grid_definition.txt (121 Bytes) grid_definition.txt Grid definition CH1
horizontal_constants.nc (8.76 MB) horizontal_constants.nc Horizontal constants after conversion and renaming
horizontal_constants_ICON-CH1-EPS.grib2 (4.38 MB) horizontal_constants_ICON-CH1-EPS.grib2 Horizontal constants as provided for CH1