Interpolation. Computer User Training Course Paul Dando. User Support. ECMWF 25 February 2016

Similar documents
Interpolation. Introduction and basic concepts. Computer User Training Course Paul Dando. User Support Section.

Big changes coming to ECMWF Product Generation system

COM INTRO 2017: GRIB Decoding - Solutions to practicals. Solution to Practical 1: using grib_dump and grib_ls

The new ECMWF interpolation package MIR

COM INTRO 2016: GRIB Decoding - Solutions to practicals. Solution to Practical 1: using grib_dump and grib_ls

MIR. ECMWF s New Interpolation Package. P. Maciel, T. Quintino, B. Raoult, M. Fuentes, S. Villaume ECMWF. ECMWF March 9, 2016

ECMWF New Users Metview Tutorial

eccodes GRIB Fortran 90 - Python APIs Practicals 2 Dominique Lucas and Xavi Abellan

About the SPEEDY model (from Miyoshi PhD Thesis):

How to run OpenIFS as a shallow water model

eccharts Cihan Sahin Slide 1 Meteorological Operational Systems November

BUFR decoding. Dominique Lucas User Support. February Intro Bufr decoding

ECMWF point database: providing direct access to any model output grid-point values

eccodes GRIB Fortran 90 - Python APIs Practicals 2 Dominique Lucas and Xavi Abellan

LECTURE TWO Representations, Projections and Coordinates

SES 123 Global and Regional Energy Lab Worksheet

Metview and Python - what they can do for each other

Metview 5.0 and Beyond, to its Pythonic Future

Introduction to Metview

WRF-NMM Standard Initialization (SI) Matthew Pyle 8 August 2006

Metview FLEXTRA Tutorial. Meteorological Visualisation Section Operations Department ECMWF

Use of n-vector for Radar Applications

Where is the Space Station?

SES 123 Global and Regional Energy Lab Procedures

L7 Raster Algorithms

Question: What are the origins of the forces of magnetism (how are they produced/ generated)?

Geometric Correction of Imagery

MLEP Intermediate GPS Workshop Exercise Two Using Maps

WHERE THEORY MEETS PRACTICE

External, initial and boundary data. Rodica Claudia DUMITRACHE Amalia IRIZA

Introduction to ECMWF resources:

Optimisation of a bathymetry database for the North European Shelf Seas

Global Soil Wetness Project Phase 3 Atmospheric Boundary Conditions (Experiment

Module 4. Stereographic projection: concept and application. Lecture 4. Stereographic projection: concept and application

Section 1.2: Points and Lines

Online Trajectory Module in COSMO - A short user guide

Start > All Programs > OpenGrADS 2.0 > Grads Prompt

cdo Data Processing (and Production) Luis Kornblueh, Uwe Schulzweida, Deike Kleberg, Thomas Jahns, Irina Fast

GRIB API advanced tools

Dynamics of the Atmosphere GEMPAK Supplementary Handout

grib_api.h File Reference

Migration GRIB1 -> GRIB2: Short summary of important modifications

Distributed rainfall runoff model: 1K DHM event. Demonstration and Project

GEOG 4110/5100 Advanced Remote Sensing Lecture 4

Quick Start Guide. RainWise CC-2000 Edition. Visit our Website to Register Your Copy (weatherview32.com)

Metview Introduction

PyNGL & PyNIO Geoscience Visualization & Data IO Modules

Metview Macro Language

Bird Solar Model Source Creator

Gridded data from many sources

RECOMMENDATION ITU-R P DIGITAL TOPOGRAPHIC DATABASES FOR PROPAGATION STUDIES. (Question ITU-R 202/3)

Interpolation of gridded data using Geostrophic Balance. Lennon O Naraigh *

Geometric Correction

The Global River Width Algorithm

Web Services at ECMWF

Purpose: To explore the raster grid and vector map element concepts in GIS.

You will create some icons yourself, but some are supplied for you. If you are at ECMWF then you can copy the icons from the command line like this:

1. Introduction Surveying Method chosen depends on:

MATLAB & Practical Application on Climate Variability Studies EXERCISES

Introduction P phase arrival times

Project assignment: Particle-based simulation of transport by ocean currents

ERTH3021 Exploration and Mining Geophysics

Projections for use in the Merced River basin

Format specification for the SMET Weather Station Meteorological Data Format version 1.1

16.6. Parametric Surfaces. Parametric Surfaces. Parametric Surfaces. Vector Calculus. Parametric Surfaces and Their Areas

NWSDSS. Hydrologic Engineering Center National Weather Service to Data Storage System Conversion Utility. User's Manual. Version 5.

Metview 4 ECMWF s next generation meteorological workstation

Geoapplications development Control work 1 (2017, Fall)

Definition of Basic Polar Data Product

Fundamentals of Structural Geology Exercise: concepts from chapter 2

Analysis Methods in Atmospheric and Oceanic Science

Ecography. Supplementary material

CSI 769 Fall 2010 Solar and Heliospheric Physics

Yandex.Maps API Background theory

GateKeeper Mapping Creating Zone Layers & Utilising the Grid Generator GateKeeper Version 3.5 February 2015

The EC Presenting a multi-terabyte dataset MWF via ER the web

Using ODB at ECMWF. Piotr Kuchta Sándor Kertész. Development Section ECMWF. Slide 1. MOS Workshop, 2013 November 18-20, ECMWF

Generation of WRF-ARW Background Errors (BE) For GSI

eccodes: Advanced Topics Part II

Dominique Lucas Xavier Abellan Ecija User Support

Metview 4 ECMWF s latest generation meteorological workstation

Progress on Advanced Dynamical Cores for the Community Atmosphere Model. June 2010

Solar Panel Irradiation Exposure efficiency of solar panels with shadow

Meteorology and Python

User guide for MODIS derived vegetation fractional cover metrics

PC-Cluster Operation Manual

Assignment 2 Arrays and Functions

v SMS 11.1 Tutorial BOUSS2D Prerequisites Overview Tutorial Time minutes

VIIRS-CrIS Mapping. P. Brunel, P. Roquet. Météo-France, Lannion. CSPP/IMAPP USERS GROUP MEETING 2015 EUMETSAT Darmstadt, Germany

IPSL Boot Camp Part 5:

The challenges of the ECMWF graphics packages

Generating SVG weather maps and meteorological graphs using Magics++

v CMS-Wave Analysis SMS 12.2 Tutorial Prerequisites Requirements Time Objectives

2 Assembling a consistent time series of sea ice data

Revision History. Applicable Documents

REQUEST FOR A SPECIAL PROJECT

A brief introduction 1 to retrieving ERA Interim via the web and webapi

Multi-Domain Pattern. I. Problem. II. Driving Forces. III. Solution

Accurate Conversion of Earth-Fixed Earth-Centered Coordinates to Geodetic Coordinates

P445/515 Data Analysis using PAW

Transcription:

Interpolation Computer User Training Course 2016 Paul Dando User Support advisory@ecmwf.int ECMWF 25 February 2016 1

Contents Introduction Overview of Interpolation Spectral Transformations Grid point Transformations Interpolation Options Future plans Practical 2

Introduction Weather data can have different representations Interpolation is how we recalculate data in a different representation Interpolation is available in - MARS - Operational dissemination - Metview graphics package Documentation: https://software.ecmwf.int/emoslib 3

Introduction - Interpolation black box INPUT FIELD GRIB Product Data array Transformations INTERPOLATION - Spectral Spectral - Spectral Grid-point - Grid-point Grid-point Change resolution Sub-area extractions Derived fields - e.g. U and V from vorticity and divergence Rotated grids OUTPUT FIELD GRIB Product Data array 4

Introduction Interpolation black box (2) Input can be a GRIB product or value array Output can be a GRIB product or value array For GRIB products, characteristics / info read from the GRIB header A number of Fortran routines (part of EMOSLIB) perform the interpolation MARS (and Metview) calls these for you Possible to make calls to these functions yourself Example programs on internet pages for EMOSLIB 5

Spectral Transformations Some data (e.g. pressure and some model level) is stored in Spectral format These fields cannot be plotted directly - Need to be transformed to grid points Spectral to grid-point - Latitude/Longitude - Regular and Reduced Gaussian - Automatic truncation based on output grid resolution - Interpolation coefficient files created (in $PPDIR) Spectral to Spectral - With truncation - With rotation (very expensive in resources) 6

Spectral to grid-point: truncation Automatic truncation before interpolation reduces resources needed and avoids spurious aliased values Grid increment Truncation 2.5 Δ T63 1.5 Δ < 2.5 T106 0.6 Δ < 1.5 T213 0.4 Δ < 0.6 T319 0.3 Δ < 0.4 T511 0.15 Δ < 0.3 T799 0.09 Δ < 0.15 T1279 0.0 Δ < 0.09 T2047 MARS retrievals can override using resol keyword, e.g. resol=106 7

Grid-point Transformations Allowed combinations TO Regular Lat /Lon Regular Gaussian Reduced Gaussian Regular Lat /Lon Regular Gaussian Reduced Gaussian NB cannot interpolate to a reduced Gaussian grid from a different representation 8

Regular (or Full) Gaussian grids F80 N lines of latitude between pole and equator Latitude spacing not regular but is symmetric about equator 4 x N equally spaced points at each latitude No latitude points at poles or equator Special treatment at poles 9

Original reduced Gaussian grids N80 Lines of latitude same as a regular Gaussian grid 4 x N points at the equator Fewer longitude points at latitudes close to poles Local east-west grid length similar for all latitudes Used up to March 2016 10

Octahedral reduced Gaussian grids O80 Lines of latitude same as a regular Gaussian grid 20 longitude points at the latitude nearest the pole Increases by 4 points at each latitude line from pole towards the equator 4 N + 16 longitude points at latitude lines closest to equator Total number of points = 4 N (N+9) To be used from March 2016 11

Interpolation Options These apply only to Grid-point Interpolation Interpolation schemes - Bilinear - Nearest-neighbour - 12-point scheme for interpolation to rotated lat-long grids Treatment of - land-sea masks - precipitation Geographical sub-areas 12

Bilinear Interpolation Default for all parameters except vegetation, precipitation type and soil type fields and Wave 2D spectra Each point of output grid generated from 4 neighbouring points of input grid approximated as Cartesian coordinates Vegetation, soil type, precipitation type fields and Wave 2D spectra use nearest neighbour 13

Rotation from reduced Gaussian grids Uses a 12-point interpolation scheme Spline fitting can produce non-physical values for some fields, e.g., cloud cover - Consider using bilinear interpolation for such fields - i.e. with MARS keyword interpolation = bilinear 14

Land-Sea Masks Land-sea masks represented as values 0 and 1 (or fractional) If land-sea mask of neighbouring point differs from grid-point being generated, weight of input point is modified to reduce effect L 1 L 2 L 3 S 1 Point S 1 has lower (0.2x) weight in calculation of L N Land-sea masks are applied by default to surface fields (except MSL and LSM or interpolations to Reduced Gaussian grids) 15

Precipitation an accumulated field Rules are applied to prevent spreading of trace amounts: Interpolated value for precipitation at a point is set to zero if: - the calculated value is less than a defined threshold - its neighbour with the highest weight had no precipitation Polar values for precipitation are always the average of nearest Gaussian line with no threshold check applied For ENS fields, accumulated fields can use double interpolation - E.g. Interpolate from N320 to N160 and then to lat-lon - (Octahedral grid: O640 to O320 and then to lat-lon.) 16

Geographical Sub-areas Sub-areas can be created for new fields by specifying latitude / longitude boundaries (north / west / south / east) Sub-areas are based on the full global grid - Global regular grids have a line of longitude at the 0 meridian - Regular latitude-longitude grids have a line of latitude at the equator - Gaussian grids are symmetrical about the equator Boundaries of sub-areas are expanded outwards towards global grid (for rotations, boundaries are preserved) - Can change behaviour in MARS by setting the environment variable $MARS_INTERPOLATION_INWARDS Sub-areas not currently supported for reduced Gaussian grids full global grid is produced for these 17

Geographical sub-areas an example Adjustment of Sub areas Original (regular Lat / Lon) grid 18

Geographical sub-areas an example User requests a subarea In this case, their subarea falls between grid points 19

Geographical sub-areas an example The subarea is widened - to encompass all points within and around the specified subarea - e.g. for 1x1 grid, NWSE (10.5, 2.5, -20.3, 84.2) becomes (11, 2, -21, 85) 20

Interfaces to the interpolation Fortran interface - Low level interface - Code needs to be complied and linked with Emoslib library - Special functions for GRIB2 (intf2 & intuvp2) https://software.ecmwf.int/emoslib/field+interpolation+software MARS/Metview interface - Recommended high level interface - Interpolation during data retrieval from archive - Options are described in MARS user guide - Same interface even if underlying interpolation package will change - This is what we use for the practical exercises retrieve, type https://software.ecmwf.int/wiki/display/udoc/post-processing+keywords = fc, param = t, levelist = 1000/500, grid = 1.5/1.5, area = 75/-20/10/60, target = "t_ll_eu.grb" 21

Interpolation with MARS: the recipe book To a regular 1.5 x1.5 lat-lon grid retrieve, type = fc, param = t, levelist = 1000/500, grid = 1.5/1.5, target = "t_ll.grb" To an F640 regular Gaussian grid retrieve, type = fc, param = t, levelist = 1000/500, grid = F640, target = "t_regular_gg.grb" To an N320 original reduced Gaussian grid retrieve, type = fc, param = t, levelist = 1000/500, grid = N320, target = "t_reduced_gg.grb" To a subarea of a 0.5 x0.5 lat-lon grid retrieve, type = fc, param = t, levelist = 1000/500, area = 75/-20/10/60, grid = 0.5/0.5, target = "t_ll_eu.grb" 22

Interpolation with MARS: the recipe book To a subarea of a 0.5 x0.5 lat-lon grid with rotation retrieve, type = fc, param = t, levelist = 1000/500, area = 1/-17/-21/8, grid = 0.5/0.5, rotation = -32.5/10.0, target = "t_ll_rotated.grb" To a 0.125 x0.125 lat-lon grid using nearest-neighbour method retrieve, type = fc, param = t, levelist = 1000/500, grid = 0.125/0.125, interpolation = nearest neig, target = "t_ll_nearest.grb 23

Future plans EMOSLIB is not easy to maintain A new interpolation package is being written in C++ - Improve code, efficiency, maintainability and portability The new package will provide a Library and API - It will be callable from C, C++, Fortran 90, Python - It will include some Unix-style command line tools All current EMOSLIB features will be supported Some new features will be added - Include routines for single-point interpolation - Handle different grid types - Parallelisation / multiple-threaded Will undergo extensive testing at ECMWF before release 24

Practical: Interpolation with MARS Work in your $SCRATCH Copy the scripts from /home/ectrain/trx/paul/interpolation cd $SCRATCH cp /home/ectrain/trx/paul/interpolation/interp*.ksh./ First, run interp1.ksh:./interp1.ksh This will retrieve some data from MARS to a file out1.grib Next run the other scripts in turn. - Each will create a new file called out2.grib,, out8.grib Inspect each output file with grib_ls and grib_dump - Note how the grid description in Section 2 of the header differs - Look at the MARS requests that create each of the files 25