{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Remapping the Initial Dataset\n", "---\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This notebook serves as a template for the interpolation of initial data onto the limited area grid. \n", "The interpolation is performed by the `Climate Data Operators (CDO)`. " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The **CDO (Climate Data Operators)** are a collection of command-line operators to manipulate and analyze NetCDF and GRIB data. The CDO package is developed and maintained at the MPI for Meteorology in Hamburg. The CDO are also capable of remapping data to regular grids and triangular grids. Here, we will demonstrate how the CDO command-line tools can be used for the interpolation of the initial datasets." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Preparations" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Internally, the CDOs make use of the ECCodes package for GRIB2 decoding/encoding:" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "module load eccodes\n", "export ECCODES_DEFINITION_PATH=/pool/data/ICON/ICON_training/eccodes/definitions.edzw-2.27.0-1:$ECCODES_DEFINITION_PATH" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We need to specify the input and output grid:" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "tags": [] }, "outputs": [], "source": [ "export INGRID=\"/scratch/${USER::1}/$USER/example_data/const/icon_grid_0026_R03B07_G.nc\" # grid for which the input data has been provided\n", "export LOCALGRID=\"/pool/data/ICON/ICON_training/exercise_lam/grids/iconR3B08_DOM01.nc\" # this is the name (and path) of the destination grid (limited area grid)" ] }, { "cell_type": "markdown", "metadata": { "tags": [] }, "source": [ "The following command defines the output directory as well as the filename containing the remapped data:" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "tags": [] }, "outputs": [], "source": [ "# Create directory where the pre-processed input (initial and boundary data) for the LAM run is stored\n", "export DATADIR_LAM=/scratch/${USER::1}/$USER/data_lam\n", "mkdir -p ${DATADIR_LAM}\n", "export OUTFILE=\"$DATADIR_LAM/init_ML_20210714T000000Z.nc\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
INGRID
and the data file DATAFILE
. Which grid number IGN
in the grid file corresponds to the horizontal grid of the variables listed in FIELDS
?\n",
"TGN
in target grid file.\n",
"