0% found this document useful (0 votes)
154 views7 pages

Opendata Cdo EN PDF

Climate Data Operators (CDO) is a command line tool that can be used to transform numerical weather prediction data sets from a triangular grid, such as that used by ICON, to a regular latitude/longitude grid. This involves using CDO to generate interpolation weights based on the original grid information file and a target grid description. Then CDO can be used to remap individual GRIB2 files from the triangular grid to the regular lat/lon grid using the generated weights file. An example bash script is provided that demonstrates this process.

Uploaded by

kesavaero1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
154 views7 pages

Opendata Cdo EN PDF

Climate Data Operators (CDO) is a command line tool that can be used to transform numerical weather prediction data sets from a triangular grid, such as that used by ICON, to a regular latitude/longitude grid. This involves using CDO to generate interpolation weights based on the original grid information file and a target grid description. Then CDO can be used to remap individual GRIB2 files from the triangular grid to the regular lat/lon grid using the generated weights file. An example bash script is provided that demonstrates this process.

Uploaded by

kesavaero1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Guideline for the transformation of GRIB2 datasets from the

original triangular to the regular lat/lon grid


Version 1.3

February 14, 2018

Product Design and Customer Relations Division


Deutscher Wetterdienst
Frankfurter Straße 135
63067 Offenbach
Germany
http://www.dwd.de
1 Climate Data Operators – CDO
Climate Data Operators (CDO) is a command-line tool to manipulate and analyze climate and numer-
ical weather prediction model data. Supported data formats are GRIB 1/21 , NetCDF 3/42 , SERVICE,
EXTRA and IEG. There are more than 600 operators available including simple statistical and arith-
metic functions, data selection and subsampling tools-, and spatial interpolation. The software tool is
open source and covered by the GNU General Public License v2 (GPL). More information can be found
at https://code.mpimet.mpg.de/projects/CDO and https://code.mpimet.mpg.de/projects/CDO/
wiki. CDO can be used to transform or, to be more significant, to interpolate numerical weather
prediction data sets from the triangular grid into the regular lat/lon grid like ICON (ICOsahedral
Nonhydrostatic) as well for the COSMO (Consortium for Small Scale Modelling). The transformation
processes will be described in detail in the following sections. To be able to perform the transformation
and to take full advantage of CDO features the following additional libraries should be installed:
Unidata NetCDF library (https://www.unidata.ucar.edu/software/netcdf) version 3 or higher,
needed to process NetCDF files with CDO. ECMWF ecCodes library (https://software.ecmwf.i
nt/wiki/display/ECC/ecCodes+Home) version 2.3.0 or higher, which is needed to process GRIB2
files with CDO. More information can be found at https://code.mpimet.mpg.de/projects/CDO/
wiki/CDO and http://www.studytrails.com/blog/install-climate-data-operator-CDO-with-n
etCDF-GRIB2-and-hdf5-support. For the different distributions please visit the following sites: for
Linux distributions https://code.mpimet.mpg.de/projects/CDO/wiki/Linux_Platform, Windows
distributions https://code.mpimet.mpg.de/projects/CDO/wiki/Win32, MacOS distributions http
s://code.mpimet.mpg.de/projects/CDO/wiki/MacOS_Platform.

1.1 CDO features NetCDF and ecCodes


CDO uses a template $GRIB_SAMPLES_PATH/GRIB2.tmpl in order to write GRIB2 data. Note that
when reading an input GRIB2 dataset the applying GRIB2 table version will always be taken by the
defined template and picket not out of the used inputdataset < in >. The directory of the environment
variable GRIB_SAMPLES_PATH and the definitionpath are given by the commands grib_info (GRIB-
API) or codes_info (ecCodes).
1 grib_info
2
3 GRIB_api Version 1.23.1
4 Default definition files path is used: / usr / local / pkg / GRIB_api / definitions / release /1.23.1/ d efi nit ion s.e dzw : / usr / local /
pkg / GRIB_api / definitions / release /1.23.1/ definitions Definition files path can be changed setting
G R I B _ D E F I N I T I O N _ P A T H environment variable
5 SAMPLES path from environment variable G RI B_ S AM P LE S _P A TH = / usr / local / pkg / GRIB_api / definitions / release /1.23.1/ share /
GRIB_api / samples

The template GRIB2.tmpl can be changed using grib_set -s tablesVersion=11 GRIB2.tmpl


GRIB2.tmpl. Accordingly, the definition paths of GRIB-API and ecCodes have to be adjusted in the
config file section.1.def line "MasterTableVersion".
1
GRIB version 1, from the World Meteorological Organisation (WMO)
2
NetCDF Software Package, from the UNIDATA Program Center of the University Corporation for Atmospheric
Research

[2]
2 Transformation of ICON datasets from the triangular grid to the
regular lat/lon grid
In order to transform GRIB2 datasets of ICON, which are available on opendata in the original trian-
gular grid, into a regular lat/lon grid, three basic files are necessary:

• icon_grid_0026_R03B07_G.nc, which contains the greid information,

• the grid description of the output file TARGET_GRID_DESCRIPTION and

• the area weights WEIGHTS_FILE.

These basic files make it possible to run the lat/lon transformation for any section of the original
triangular grid. The files can be downloaded from the following url: https://opendata.dwd.de/
weather/lib/cdo/ICON_GLOBAL*.tar.bz2. If errors occur during transformation, it might be help-
ful to first split the grib file into individual files for each parameter using grib_copy infile.grib2
outfile_[shortName].grib2, and then perform the transform.

2.1 Transformation from the original grid to the lat/lon grid (0.25◦ × 0.25◦ )
This section shows how to use CDO to transform a GRIB2 file of ICON global model from the original
triangular grid into a regular lat/lon grid with a resolution of 0.25◦ × 0.25◦ . The area weights (we
ights_icogl2world_025.nc), which are needed for the interpolation, can be calculated using the
grid-description (target_grid_025.txt) and the grid-information file icon_grid_0026_R03B07_G.nc.
This has to be calculated3 only once.
1 cdo gennn , $ {TARGET_GRID_DESCRIPTION} icon_grid_0026_R03B07_G . nc $ {WEIGHTS_FILE}

Based on the resulting weights file weights_icogl2world_025.nc, CDO can all ICON global GRIB2
files to meet the given grid description using the following command:
1 cdo −f nc remap , $ {TARGET_GRID_DESCRIPTION} , $ {WEIGHTS_FILE} $ { i n _ f i l e } $ { o u t _ f i l e }

The option -f nc defines that the result is written to a netCDF file, the option -f grb2 defines
that the output file is written in the GRIB2 format.

2.2 An illustrative example


First of all, the necessary data and spatial data files have to be downloaded from https://opendata
.dwd.de/weather/lib/cdo/ICON_GLOBAL*.tar.bz2 and stored in a local directory (/user/director
y/...). Once this is complete, the interpolation can be started. The following bash script shows how
a transformation from the ICON-global triangular grid into a regular lat/lon grid can be performed:
1 #!/ bin / bash
2 export WORKDIR= / user / directory / T r a n s f o r m _ O r i g i n a l g i t t e r _ R e g G i t t e r
3 export ICON_GRID_FILE=$ { WORKDIR }/ i c o n _ g r i d _ 0 0 2 6 _ R 0 3 B 0 7 _ G . n c
4 export T A R G E T _ G R I D _ D E S C R I P T I O N = $ { WORKDIR }/ t a r g e t _ g r i d _ w o r l d _ 0 2 5 . t x t

3
The area weights are generated via the "nearest neighbour interpolation (CDOgennn)" method.

[3]
5 export WEIGHTS_FILE=$ { WORKDIR }/ w e i g h t s _ i c o g l 2 w o r l d _ 0 2 5 . n c
6 export in_file=$ { WORKDIR }/ I C O N _ s i n g l e _ l e v e l _ e l e m e n t s _ w o r l d _ T _ 2 M _ 2 0 1 7 0 6 2 5 1 2 _ 0 0 0 . G R I B 2
7 # export out_file=$ { WORKDIR }/ I C O N _ w o r l d _ 0 2 5 x 0 2 5 _ T _ 2 M _ 2 0 1 7 0 6 2 5 1 2 _ 0 0 0 . n c # if netCDF output
8 export out_file=$ { WORKDIR }/ I C O N _ w o r l d _ 0 2 5 x 0 2 5 _ T _ 2 M _ 2 0 1 7 0 6 2 5 1 2 _ 0 0 0 . g r b 2 # if GRIB2 output
9 cd $ { WORKDIR }
10 time cdo gennn , $ { T A R G E T _ G R I D _ D E S C R I P T I O N } $ { ICON_GRID_FILE } $ { WEIGHTS_FILE }
11 echo " end of weights generation with CDO "
12 echo " in_file: " $ { in_file } echo " out_file: " $ { out_file }
13 # For OutputFile: netCDF
14 # time cdo -f nc remap , $ { T A R G E T _ G R I D _ D E S C R I P T I O N } , $ { WEIGHTS_FILE } $ { in_file } $ { out_file }
15 # For OutputFile: GRIB2
16 time cdo -f grb2 remap , $ { T A R G E T _ G R I D _ D E S C R I P T I O N } , $ { WEIGHTS_FILE } $ { in_file } $ { out_file }

Note, that the command in line 10 calculates the interpolation weights WEIGHTS_FILE and that this
has to be done only once. The resulting interp[lation weights can also be used for all other cases with
the same grid-description. Several lines can be commented out or deleted from the script, simplifying
it as follows:
1 #!/ bin / bash
2 export WORKDIR= / user / directory /
3 export T A R G E T _ G R I D _ D E S C R I P T I O N = $ { WORKDIR }/ t a r g e t _ g r i d _ w o r l d _ 0 2 5 . t x t
4 export W E I G H T S _ F I L E = w e i g h t s _ i c o g l 2 w o r l d _ 0 2 5 . n c
5 export in_file=$ { WORKDIR }/ I C O N _ s i n g l e _ l e v e l _ e l e m e n t s _ w o r l d _ T _ 2 M _ 2 0 1 7 0 6 2 5 1 2 _ 0 0 0 . G R I B 2
6 # if output file has to be netCDF
7 # export out_file=$ { WORKDIR }/ I C O N _ w o r l d _ 0 2 5 x 0 2 5 _ T _ 2 M _ 2 0 1 7 0 6 2 5 1 2 _ 0 0 0 . n c
8 # if output file has to be GRIB2
9 export out_file=$ { WORKDIR }/ I C O N _ w o r l d _ 0 2 5 x 0 2 5 _ T _ 2 M _ 2 0 1 7 0 6 2 5 1 2 _ 0 0 0 . g r b 2
10 cd $ { WORKDIR }
11 echo " WORKDIR: " $ { WORKDIR } echo " T A R G E T _ G R I D _ D E S C R I P T I O N : " $ { T A R G E T _ G R I D _ D E S C R I P T I O N }
12 echo " WEIGHTS_FILE: " $ { WEIGHTS_FILE }
13 echo " in_file: " $ { in_file } echo " out_file: " $ { out_file }
14 echo " start remap CDO "
15 # netCDF
16 # time cdo -f nc remap , $ { T A R G E T _ G R I D _ D E S C R I P T I O N } , $ { WEIGHTS_FILE } $ { in_file } $ { out_file }
17 # GRIB2
18 time cdo -f grb2 remap , $ { T A R G E T _ G R I D _ D E S C R I P T I O N } , $ { WEIGHTS_FILE } $ { in_file } $ { out_file }
19 echo " done remap CDO "

2.3 Transformation from the original triangular grid to the lat/lon grid (0.125◦ × 0.125◦ )
Analogously to section 2.2 the following commands have to be used for a resolution of 0.125◦ × 0.125◦
(see Appendix 3.2):
1 CDO -f nc remap , t a r g e t _ g r i d _ w o r l d _ 0 1 2 5 . txt , w e i g h t s _ i c o g l 2 w o r l d _ 0 1 2 5 . nc $ { in_file } $ { out_file } # for netCDF output
2 CDO -f grb2 remap , t a r g e t _ g r i d _ w o r l d _ 0 1 2 5 . txt , w e i g h t s _ i c o g l 2 w o r l d _ 0 1 2 5 . nc $ { in_file } $ { out_file } # for GRIB2 output

2.4 Transformation from the original triangular grid to the lat/lon grid (0.125◦ × 0.125◦ )for
an determined european region
CDO also allows the transformation of self-defined area sections. Let’s take the European area section
fedined by the lat/lon edges (−75 ; 75 ; 5 ; 80) as an example.For this, the TARGET_GRID_DESCRIPTION
file has to be changed accordingly and the interpolation weights WEIGHTS_FILE have to be recal-
culated (see Appendix 3.3):
1 #!/ bin / bash
2 export WORKDIR= / user / directory / T r a n s f o r m _ O r i g i n a l g i t t e r _ R e g G i t t e r /
3 export ICON_GRID_FILE= / user / directory / T r a n s f o r m _ O r i g i n a l g i t t e r _ R e g G i t t e r / src / i c o n _ g r i d _ 0 0 2 6 _ R 0 3 B 0 7 _ G . n c
4 export T A R G E T _ G R I D _ D E S C R I P T I O N = $ { WORKDIR }/ t a r g e t _ g r i d _ e u r o p a _ a u s s c h n i t t . t x t
5 export W E I G H T S _ F I L E = w e i g h t s _ i c o g l 2 w o r l d _ 0 2 5 _ E U A U . n c
6 export in_file=$ { WORKDIR }/ I C O N _ s i n g l e _ l e v e l _ e l e m e n t s _ w o r l d _ T _ 2 M _ 2 0 1 7 0 6 2 5 1 2 _ 0 0 0 . G R I B 2
7 # export out_file=$ { WORKDIR }/ I C O N _ w o r l d _ 0 2 5 x 0 2 5 _ T _ 2 M _ 2 0 1 7 0 6 2 5 1 2 _ 0 0 0 _ E U A U . n c # if netCDF output

[4]
8 export out_file=$ { WORKDIR }/ I C O N _ w o r l d _ 0 2 5 x 0 2 5 _ T _ 2 M _ 2 0 1 7 0 6 2 5 1 2 _ 0 0 0 _ E U A U . g r b 2 # if GRIB2 output
9 cd $ { WORKDIR }
10 time CDO gennn , $ { T A R G E T _ G R I D _ D E S C R I P T I O N } $ { ICON_GRID_FILE } $ { WEIGHTS_FILE }
11 echo " end of weights generation with CDO "
12 echo " in_file: " $ { in_file } echo " out_file: " $ { out_file }
13 # For OutputFile: netCDF
14 # time cdo -f nc remap , $ { T A R G E T _ G R I D _ D E S C R I P T I O N } , $ { WEIGHTS_FILE } $ { in_file } $ { out_file }
15 # For OutputFile: GRIB2
16 time cdo -f grb2 remap , $ { T A R G E T _ G R I D _ D E S C R I P T I O N } , $ { WEIGHTS_FILE } $ { in_file } $ { out_file }

whereby the file target_grid_europa_ausschnitt.txt contains the following values:


1 # CDO grid description file for regular grid Europe source ICON_GLOBAL
2 gridtype = lonlat
3 xsize = 1201
4 ysize = 601
5 xfirst = -75.0
6 xinc = 0.125
7 yfirst = 5.0
8 yinc = 0.125

Thereby, the transformation will be done for the chosen area section(−75 ; 75 ; 5 ; 80) only
(−180 ; 180 ; −90 ; 90). Note, that the script has been code can be simplified by delete the code for
calculation of the weights:
1 #!/ bin / bash
2 export WORKDIR= / user / directory /
3 export T A R G E T _ G R I D _ D E S C R I P T I O N = $ { WORKDIR }/ I C O N _ G L O B A L 2 E U A U _ 0 1 2 5 / t a r g e t _ g r i d _ E U A U _ 0 1 2 5 . t x t
4 export WEIGHTS_FILE=$ { WORKDIR }/ I C O N _ G L O B A L 2 E U A U _ 0 1 2 5 / w e i g h t s _ i c o g l 2 w o r l d _ 0 1 2 5 _ E U A U . n c
5 export in_file=$ { WORKDIR }/ I C O N _ s i n g l e _ l e v e l _ e l e m e n t s _ w o r l d _ T _ 2 M _ 2 0 1 7 0 6 2 5 1 2 _ 0 0 0 . G R I B 2
6 # if output file has to be netCDF
7 # export out_file=$ { WORKDIR }/ I C O N _ w o r l d _ T _ 2 M _ 2 0 1 7 0 6 2 5 1 2 _ 0 0 0 _ E U A U _ 0 1 2 5 . n c
8 # if output file has to be GRIB2
9 export out_file=$ { WORKDIR }/ I C O N _ w o r l d _ T _ 2 M _ 2 0 1 7 0 6 2 5 1 2 _ 0 0 0 _ E U A U _ 0 1 2 5 . g r b 2
10 echo " start remap CDO "
11 cd $ { WORKDIR }
12 # For OutputFile: netCDF
13 # time cdo -f nc remap , $ { T A R G E T _ G R I D _ D E S C R I P T I O N } , $ { WEIGHTS_FILE } $ { in_file } $ { out_file }
14 # For OutputFile: GRIB2
15 time cdo -f grb2 remap , $ { T A R G E T _ G R I D _ D E S C R I P T I O N } , $ { WEIGHTS_FILE } $ { in_file } $ { out_file }
16 echo " done remap CDO "

2.5 Grid description

The grid description defines the boundaries or edges of the target grid as well as the resolution of
the target-grid by defining the increment. A valid grid description (TARGET_GRID_DESCRIPTION) is
necessary in order to carry out the transformation from an original triangular grid to a regular lat/lon
grid. The boundaries for a valid description are given by the following equations:

1
ysize = × (yend − yfirst ) mit yinc ∈ [0.25, 0.125] , yfirst , yend = [−90; 90]
yinc
1
xsize = × (xend − xfirst ) mit xinc ∈ [0.25, 0.125] , xend , xfirst = [−180; 180]
xinc

whereby xinc and yinc should take the values 0.25 or 0.125 and xfirst , xend values between −180 and
180. The differences between yend − yfirst and xend − xfirst have to be positive.

[5]
2.6 Interpolation

The transformation-examples presented in this document use the nearest neighbor method. However,
the ICON model relies on different interpolation methods for different model output fields and there
are three different algorithms used at the DWD for the ICON model outputs in the regular lat/lon
grid:

• Barycentric interpolation,

• Interpolation through radial basis function and

• Nearest neighbor interpolation.

Each method is used for different model output fields. The ICON model documentation includes a
description of the different methods and an explanation of which method is used for which model
output field (Section 10.2. of the ICON model documentation.) Additionally, tables 6.2-11 (page 26ff)
and 7.2-8 of the documentation show the interpolation-method for each model output field (see column
(LL IntpType) ). For more information, please refer to the model documentation. Note that the
barycentric interpolation and interpolation through radial basis function are not supported by default
in CDO.

3 Appendix

3.1 Transformation from the original triangular grid to a regular lat/lon grid
(0.25◦ × 0.25◦ )

A transformation from original triangular grid to a lat/lon grid with a resolution of 0.25◦ × 0.25◦ can
be executed by using CDO. However, some necessary files (downloadable from https://www.dwd.de
/DE/leistungen/opendata/hilfe.html) have to be included in CDO (see Section 2.0). In bash, this
can be done as shown in the example below:
1 #!/ bin / bash
2 export WORKDIR= / user / directory /
3 export T A R G E T _ G R I D _ D E S C R I P T I O N = $ { WORKDIR }/ I C O N _ G L O B A L 2 W O R L D _ 0 2 5 / t a r g e t _ g r i d _ w o r l d _ 0 2 5 . t x t
4 export WEIGHTS_FILE=$ { WORKDIR }/ I C O N _ G L O B A L 2 W O R L D _ 0 2 5 / w e i g h t s _ i c o g l 2 w o r l d _ 0 2 5 . n c
5 export in_file=$ { WORKDIR }/ I C O N _ s i n g l e _ l e v e l _ e l e m e n t s _ w o r l d _ r e g _ T _ 2 M _ 2 0 1 7 0 6 2 5 1 2 _ 0 0 0 . G R I B 2
6 # if output file has to be netCDF
7 # export out_file=$ { WORKDIR }/ ICON_world_ [ YYYYMMDD ][ modelrun ] _ [ timestep ] _025.nc
8 # if output file has to be GRIB2
9 export out_file=$ { WORKDIR }/ ICON_world_ [ shortname ] _ [ YYYYMMDD ][ modelrun ] _ [ timestep ] _025.grb2
10 cd $ { WORKDIR }
11 echo " WORKDIR: " $ { WORKDIR } echo " T A R G E T _ G R I D _ D E S C R I P T I O N : " $ { T A R G E T _ G R I D _ D E S C R I P T I O N }
12 echo " WEIGHTS_FILE: " $ { WEIGHTS_FILE }
13 echo " start remap cdo "
14 # netCDF
15 # time cdo -f nc remap , $ { T A R G E T _ G R I D _ D E S C R I P T I O N } , $ { WEIGHTS_FILE } $ { in_file } $ { out_file }
16 # GRIB2
17 time cdo -f grb2 remap , $ { T A R G E T _ G R I D _ D E S C R I P T I O N } , $ { WEIGHTS_FILE } $ { in_file } $ { out_file }
18 echo " done remap cdo "

[6]
3.2 Transformation from the original triangular grid to a regular lat/lon grid
(0.125◦ × 0.125◦ )
Analogously to section 3.1, one way to transform the dataset with a resolution of (0.125◦ × 0.125◦ )
is given by:
1 #!/ bin / bash
2 export WORKDIR= / user / directory /
3 export T A R G E T _ G R I D _ D E S C R I P T I O N = $ { WORKDIR }/ I C O N _ G L O B A L 2 W O R L D _ 0 1 2 5 / t a r g e t _ g r i d _ w o r l d _ 0 1 2 5 . t x t
4 export WEIGHTS_FILE=$ { WORKDIR }/ I C O N _ G L O B A L 2 W O R L D _ 0 1 2 5 / w e i g h t s _ i c o g l 2 w o r l d _ 0 1 2 5 . n c
5 export in_file=$ { WORKDIR }/ I C O N _ s i n g l e _ l e v e l _ e l e m e n t s _ w o r l d _ r e g _ T _ 2 M _ 2 0 1 7 0 6 2 5 1 2 _ 0 0 0 . G R I B 2
6 # if output file has to be netCDF
7 # export out_file=$ { WORKDIR }/ ICON_iko_world_ [ shortname ] _ [ YYYYMMDD ][ modelrun ] _ [ timestep ] _0125.nc
8 # if output file has to be GRIB2
9 export out_file=$ { WORKDIR }/ ICON_iko_world_ [ shortname ] _ [ YYYYMMDD ][ modelrun ] _ [ timestep ] _0125.grb2
10 cd $ { WORKDIR }
11 echo " WORKDIR: " $ { WORKDIR } echo " T A R G E T _ G R I D _ D E S C R I P T I O N : " $ { T A R G E T _ G R I D _ D E S C R I P T I O N }
12 echo " WEIGHTS_FILE: " $ { WEIGHTS_FILE }
13 echo " start remap cdo "
14 # netCDF
15 # time cdo -f nc remap , $ { T A R G E T _ G R I D _ D E S C R I P T I O N } , $ { WEIGHTS_FILE } $ { in_file } $ { out_file }
16 # GRIB2
17 time cdo -f grb2 remap , $ { T A R G E T _ G R I D _ D E S C R I P T I O N } , $ { WEIGHTS_FILE } $ { in_file } $ { out_file }
18 echo " done remap cdo "

3.3 Transformation from the original triangular grid to the lat/lon grid (0.25◦ × 0.25◦ )
for a specific European region
Analogously to section 3.3, one way to transform the dataset with a resolution of (0.25◦ × 0.25◦ ) is
given by:
1 #!/ bin / bash
2 export WORKDIR= / user / directory /
3 export T A R G E T _ G R I D _ D E S C R I P T I O N = $ { WORKDIR }/ I C O N _ G L O B A L 2 E U A U _ 0 2 5 / t a r g e t _ g r i d _ E U A U _ 0 2 5 . t x t
4 export WEIGHTS_FILE=$ { WORKDIR }/ I C O N _ G L O B A L 2 E U A U _ 0 2 5 / w e i g h t s _ i c o g l 2 w o r l d _ 0 2 5 _ E U A U . n c
5 export in_file=$ { WORKDIR }/ I C O N _ i k o _ s i n g l e _ l e v e l _ e l e m e n t s _ w o r l d _ [ YYYYMMDD ][ modelrun ] _ [ timestep ]. GRIB2
6 # if output file has to be netCDF
7 # export out_file=$ { WORKDIR }/ ICON_iko_world_ [ shortname ] _ [ YYYYMMDD ][ modelrun ] _ [ timestep ] _025.nc
8 # if output file has to be GRIB2
9 export out_file=$ { WORKDIR }/ ICON_iko_world_ [ shortname ] _ [ YYYYMMDD ][ modelrun ] _ [ timestep ] _025.grb2
10 cd $ { WORKDIR }
11 echo " WORKDIR: " $ { WORKDIR } echo " T A R G E T _ G R I D _ D E S C R I P T I O N : " $ { T A R G E T _ G R I D _ D E S C R I P T I O N }
12 echo " WEIGHTS_FILE: " $ { WEIGHTS_FILE }
13 echo " start remap cdo "
14 # netCDF
15 # time cdo -f nc remap , $ { T A R G E T _ G R I D _ D E S C R I P T I O N } , $ { WEIGHTS_FILE } $ { in_file } $ { out_file }
16 # GRIB2
17 time cdo -f grb2 remap , $ { T A R G E T _ G R I D _ D E S C R I P T I O N } , $ { WEIGHTS_FILE } $ { in_file } $ { out_file }
18 echo " done remap cdo "

[7]

You might also like