33 Fundamentals of Numerical Modelling

P N Sen

epgp books

1. Learning outcomes
2. Introduction
2.1. Mathematical model
2.2. Modeling and simulation
3. Atmospheric numerical models
3.1. History and development of atmospheric numerical models
3.2. Discretization
3.2.1. Spatial discretization
3.2.2. Time discretization
3.2.3. Methods of obtaining the spatial derivatives
3.3. Finite difference method
3.4. Methods of obtaining the time derivatives
3.5. Computational instability and C – F – L condition
3.6. The spectral method
3.6.1. Galerkin method
4. Modeling
3.7.1. Barotropic model
3.7.2. Primitive equation model
5. Objective analysis
6. Initialization
7. Parameterization
8. Errors in models
9. Different Types of Atmospheric Models
10. Domain and Resolution
11. Modern Numerical Forecasting
12. Summary

  1. Learning outcomes

After studying this module, you shall be able to know:

  • What are models and what are they used for?
  • The difference between analytical (elementary) and numerical methods What are prognostic and diagnostic equations?
  • The utility of numerical modeling The importance of models
  • Approach, framework, ingredients and issues
  1. Introduction

2.1. Mathematical Model

 

A mathematical model is a description of a system using mathematical concepts and language. Mathematical models are used in the natural sciences (such as Physics, Biology, Earth Science, Atmospheric Science) and Engineering disciplines (such as Computer Science, Artificial Intelligence), as well as in the Social Sciences (Such as Economics, Sociology, Psychology).It is a technique that represents an approximation of a field situation or real world situation. Mathematical or Numerical model solves an equation or a set of equations that describes the behavior of the real-world system. Models are essential in performing complex analyses and in making predictions.

 

Numerical model uses Mathematical Equations to describe the physical conditions. Some of these equations are difficult to solve directly by analytical methods, such as nonlinear partial differential equations. The analytical solutions are exact solutions of the problems which are to be dealt with. Many differential equations cannot be solved analytically for a given boundary or initial conditions. Then it is necessary to find a “Numerical Solution” of the differential equation. It approximates the equations for the problem domain for which they are to be solved. There are lots of techniques for solving differential equations numerically.

 

Mathematical models can be of different forms, like dynamical models, statistical models, differential equations, etc. These and other types of models can overlap. Mathematical models may include logical models. In many cases, the quality of a scientific field depends on how well the mathematical models developed on the theoretical side agree with results of repeatable experiments. Lack of agreement between theoretical mathematical models and experimental measurements often leads to important advances as better theories are developed.

 

Mathematical Models can be classified as

  • Linear or Non Linear Static or Dynamic
  • Explicit or Implicit
  • Discrete or Continuous
  • Deterministic or Stochastic

2.2. Modeling and Simulation

 

A Model is program which is developed to generate the way a system works in real world. It uses mathematical formulas and predicts what is likely to happen using the available information. A simulation is the Duplication or Recreation of operation of real world system. A simulation of a system is the operation of the process or system over time. Modeling and Simulation can facilitate understanding a system’s behavior without actually testing the system in the real world. Some examples of computer simulation modeling familiar to most of us include: Weather Forecasting, Flight Simulators used for Training Pilots, Car Crash Modeling etc. There are several types of simulation models. Some of them are mentioned below:

  • Ø Discrete Models – Changes to the system occur at specific times
  • Ø Continuous Models – The state of the system changes continuously over time
  • Ø Mixed Models – Contains both discrete and Continuous
  1. 3. Atmospheric Numerical Models

3.1 History and development of atmospheric numerical models

 

The Atmosphere is only a thin layer of fluid which envelops the Earth. It is only about 1% of the earth’s radius. But it is vital for terrestrial life. The present form of the atmosphere had evolved about 400 million years ago. The state of the atmosphere i.e., the Temperature, Pressure, Humidity, Precipitation etc. of a place at a particular time is known as Weather. Climate of a place is the long term average of the weather condition over that place.

 

Human beings live at the bottom of the atmosphere. All their activities are governed by Weather and Climate. If the condition of the atmosphere is known in advance then man can plan his activity properly. Weather does not recognize international boundary. For forecasting of weather of a place information about the atmospheric parameters from all around is needed. A good communication system is required for getting this information. The modern method of scientific weather forecasting started around the middle of the nineteenth century only after telegraphy was invented.

 

Essentially, there are three methods of weather forecasting:

  1. Synoptic method,
  2. Statistical method and
  3. Numerical method.

Synoptic method is very much subjective and depends on the experience of the forecaster. Statistical methods are also not fully objective. The idea of objective method of weather forecasting was first pointed out by the Norwegian Scientist V. Bjerknes in 1904. He suggested that the future state of the atmosphere could be predicted by integrating the partial differential equations that govern the behavior of the atmosphere, using the “knowledge of the state of the atmosphere at the initial time”. The Equations are based on Conservation Principle.

 

The governing partial differential equations are

i) The law of conservation of Momentum – Newton’s Second law of Motion

ii) The law of conservation of Energy – The first law of Thermodynamics

iii) The law of conservation of Mass – Mass Continuity Equation

iv) The Ideal Gas Laws – Combined Charles Law and Boyle’s Law

v) The law of conservation of Moisture – Moisture Continuity Equation

 

The mathematical forms of these equations are

Equations containing time derivatives are used for prediction of the future state of the atmosphere and are known as Prognostic Equations. The equations which are required for understanding the state of the atmosphere are known as Diagnostic Equations.

 

The first attempt to solve these equations by numerical method was carried out by Lewis Fry Richardson during the First World War. At that time there was no computer and calculations had to be carried out manually and the process was very tedious and time-consuming. The result was not encouraging at all and the practicality of the method was doubted. The reason for the failure of Richardson’s experiment was found out by Courant, Friedrichs and Lewy in 1928. They found out that space and time increments chosen by Richardson to discretize the differential equations have to meet a certain stability requirement. Finally, at the end of World War II the first electronic computer ENIAC (Electronic Numerical Integrator And Computer) was constructed. The first successful numerical forecast was issued by Charney, Fjørtoft and von Neumann in the late 1940s using this computer. They did not solve the above set of equations, but solved much simpler equation based on the principle of conservation of the absolute vorticity.

 

A lot of developments have taken place in all phases of NWP during the past seven decades. Moreover, the computational facility has increased many folds. Now very fast computers with large memory are available. Many models are available and capability and accuracy of weather forecasting has increased considerably. Nowadays, Forecasts for decades and centuries can also be done.

 

3.2. Discretization

 

The above equations are non – linear Partial Differential Equations (PDE) and do not possess analytical solutions. An analytical function represents a given physical field and gives us the value of this field in any of the infinite number of points of space and at any instant of time. But these equations are to be solved numerically. Computers cannot deal with infinite number of points. Computer cannot analytically solve even a very simple differential equation. Therefore, meteorological parameters are to be represented by a finite number of values. This process is known as Discretization. The discretization should be such that the solutions are stable and accurate. It should be time efficient also.

 

3.2.1. Spatial Discretization

 

Spatial Discretization can be done by the following methods:

Finite – Difference Methods

Spectral Methods

Finite – Volume Methods

Finite – Element Methods etc

 

3.2.2. Time Discretization

 

Time Discretization is almost exclusively done by Finite– Difference Method

 

3.2.3. Methods of obtaining the Spatial Derivatives

 

Finite – difference: Taylor Series Expansion

 

Spectral Method: The dependent variables are expressed as a sum of linearly independent orthogonal basis functions.

 

Finite – element: They are analogous to Spectral Method. In the Finite – element modeling the basis functions are low order polynomials. In this method the computational domain is divided into a number of contiguous finite sub – regions known as Elements.

 

Finite – volume: In this method the Prognostic quantity is the value of the dependent variables at the grid points, with the Finite – Volume model it is the integrated value of a variable over a specific finite control volume.

In atmospheric Science Finite Difference and Spectral method are generally used to discretize the equations.

 

3.3. Finite Difference Method

 

The Basic Objective of Spatial Derivatives is to convert Partial Differential Equations to Algebraic Equations.

 

Consider a function  f (x) which can be expanded in Taylor’s series i.e.,

Subtracting the second equation from the first we get after slight readjustment

where the remainder R has order xD2  , i.e., ( ) xD2 O  . Therefore the Truncation error is ( ) xD2 O  . This method of finding out the values of (x)¢f  is known as Central Difference Approximation or Leap Frog Method. Since xD is small, higher the orders of Truncation Error will be smaller with respect to x ,D the more accurate is the finite difference approximation. Thus Leap Frog method of finding out (x)¢f  is more accurate than either Forward Difference or Backward Difference Approximations.

3.4. Methods of obtaining the Time Derivatives

 

Time – Differencing Methods can be Explicit or Implicit or a combination of both i.e., Semi Implicit method.

 

Explicit methods calculate the state of a system at a later time from the state of the system at the current time, while implicit methods find a solution by solving an equation involving both the current state of the system as well as the later one.

Mathematically, if (t) is the current system state and (t + t) is the state at the later time ( t is a small time step), then for an Explicit method

(t +  t) = F (  (t))

while for an Implicit method one solves an equation

 

G (  (t)),    (t +    t)) = 0

 

to find   (t +   t).

 

Computation by Explicit methods is easier. It is clear that Implicit methods are difficult to solve and require more time to compute. For solving some practical problems by explicit methods small time step t is required to keep the solution stable. In such problems with pre assigned accuracy implicit methods are applied because it takes much less computational time with larger time steps.

 

Semi – implicit technique is another method which is used to solve some equations. In this method some terms in the equations are solved explicitly and some implicitly.

 

We shall illustrate the three methods by a simple example.

Let us consider the following first order linear partial differential equation

often referred to as Computational Instability. This computational instability will cause the numerical solution to depart gradually from the true solution and hence be avoided. The condition for numerical solution to remain computationally stable is This condition is necessary for stability but not sufficient. This condition is known Courant– Friedrichs–Lewy (C – F – L) condition for stability.

 

Richardson’s monumental experiment failed because C – F – L condition was not satisfied.

 

3.6. The Spectral Method

 

The finite – difference technique has a number of associated problems such as truncation error, linear and nonlinear instability and has also Pole problem. There is another approach called the Spectral method which avoids some of these difficulties, in particular non linear instability. One of the advantages of the spectral method is that the primitive equations can be solved in terms of global functions rather than in terms of approximations at specific points as in the finite difference method.

 

In the spectral method, we assume that an unknown variable can be approximated in terms of a sum of basis functions.

  • The Basis functions are orthogonal
  • The choice of Basis function is dictated by the geometry of the problem and Boundary conditions.
  • Avoids nonlinear instability since derivatives are known exactly.
  • Global models use spherical harmonics, a combination of Fourier (sine and cosine) functions that represent the zonal structure and associated Legendre functions that represent the meridional structure.
  • The double sine-cosine series are most popular for regional spectral modeling because of their simplicity.
  • In all practical applications, the series expansion of spherical harmonic functions must be truncated at some finite point.
  • It does not have Pole problem.
  • In Spectral Models the horizontal resolution is designated by a “T” (Truncation) number which indicates the number of waves used to represent the data. Thus T80L30 model would indicate ‘triangular’ truncation at wave-number 80, with 30 levels in the vertical. To convert the wave-number to ‘horizontal resolution’ of an approximate grid-length, divide 360 by the wave-number, divide by 3 (it takes 3 grid-points to define a wave), then multiply by 111.1km (per

This equation is solved numerically by Relaxation method to obtain the future state of z, the height. The method of solving any differential equation by a technique of successive approximation is called the Relaxation Method. In Relaxation method an initial guess is made and the error of the guess is estimated. Then the error of the guess is reduced by improved guess. The cycle is repeated over and over until the error at every grid point is reduced below some pre – assigned value. It means that it is an iterative process. In this equation it is assumed that there is no divergence and the model is capable of giving forecast reasonably well for z at 500 hPa level only. This is because synoptically non divergent level is very near to 500 hPa level. Thus Barotropic Model cannot be used for forecasting development of new systems because the model does not allow temperature advection.

 

4.2. Primitive Equation Model

 

In order to give forecasts for all levels the basic equations representing the conservation laws in their primitive forms are to be used. The precise form of the primitive equations depends on the vertical coordinate system chosen.

 

A model’s vertical structure is as important as the horizontal structure and model type.

 

To represent the vertical structure of the atmosphere properly requires selection of a suitable vertical coordinate and sufficient vertical resolution.

 

Unlike the horizontal structure of models where discrete or continuous (grid point or spectral) configurations can be used, virtually all operational models use discrete vertical structures. As such, they produce forecasts for the average over an atmospheric layer between the vertical-coordinate surfaces, not on the surfaces themselves.

 

Pressure coordinates, Log pressure coordinates, Sigma coordinates , Eta Coordinate etc are some the vertical coordinate systems which are used Numerical weather Prediction models. Vertical coordinates are chosen as per the requirement of the problems.

  1. Objective Analysis

Meteorological Observations are taken at a number of stations which are unevenly located at different places. Objective Analysis is the process of interpolating observed meteorological observations to a network of evenly spaced grid points. Objective analysis is based not only on the synoptic observations at the time of analysis or climatology but also predicted ones from previous observations for the time of analysis, satellite observations etc. The inclusion of the time dimension in objective analysis is known as four dimensional data assimilation. There are several methods of Objective analysis. The most commonly used methods are Fitting of Polynomials, Cressman Method, and Optimum Interpolation technique etc.

  1. Initialization

The atmosphere is a fluid. As such, the idea of numerical weather prediction is to sample the state of the fluid at a given time and use the equations of fluid dynamics and thermodynamics to estimate the state of the fluid at some time in the future. Observational data are introduced into the model before running the model. Objectively analyzed data in Numerical Weather Prediction models may generate a large number of waves like Gravity waves in the atmosphere with phase speeds much larger than the speeds of usual meteorological systems. The observations that are used to produce initial fields for numerical weather prediction models do not contain enough information to prevent the occurrence of these waves in the simulations. The procedure of eliminating these waves before the integration of the mathematical equations is known as Initialization. Some of the methods of Initialization are Static Initialization, Dynamic Initialization, and Normal Mode Initialization etc.

  1. Parameterization

Numerical Weather Prediction Model cannot resolve many physical processes that are either too small or complex. Taking into account these processes without actually simulating them is called Parameterization. Parameterization can thus be thought of as modeling the effects of a process rather than modeling the process itself. In Parameterization small-scale or complex systems are represented

 

in the model by a simplified process. In other words, Parameterizations approximate the bulk effects of physical processes which are too small, too brief, too complex, or too poorly understood to be explicitly represented.

 

In most modern models, the following parameterizations are used to represent processes too fast or small or even not well known enough:

  • v Cumulus convection
  • v Microphysical processes
  • v Radiation {Solar Radiation (short wave), Terrestrial Radiation (long wave)}
  • v Turbulence and diffusive processes
  • v Boundary layer and Surface fluxes
  • v Interactions with earth’s surface (Mountain drag effects)

 

Each of these parameterizations has several schemes.

Many of the biggest improvements in model forecasts will come from improving these parameterizations.

  1. Errors in Models

Errors can creep in the models in different forms and ways. Some of them are:

 

  1. Errors in the initial and boundary conditions (observational or analysis errors)
  2. Errors in the assumptions used in development of the model equations
  3. Errors in the numerics
  4. Errors in the parameterization of sub – grid scale processes
  5. Errors can be random and/or systematic errors
  6. Different sources of error will have more affect on different models
  7. Limitations of Predictability limitations are due to the chaotic nature of the atmosphere
  8. Errors can arise from different sources along with the chaotic nature of the atmosphere

Different Types of Atmospheric Models

 

There are a number of atmospheric models which are used for forecasting as well for research. Some

of them are:

Cloud-Resolving Models (CRMs)

Mesoscale Models

Numerical Weather Prediction (NWP) Models

Regional Climate Models (RCMs)

Global Circulation Models (GCMs)

  1. Domain and Resolution

By Domain we mean Geographical area. The horizontal domain of a model is either Global, covering the entire Earth, or Regional, covering only part of the Earth. Regional models are also known as limited-area models or LAMs.

 

In Numerical Weather or Climate Prediction Models three dimensions space has to be taken into consideration. Most of the models are Grid point Models. In Grid point models variables are computed at discrete grid points in the horizontal and vertical directions. The Model resolution refers to the spacing between grid points. The grid spacing is not necessarily equidistance. For instance, some models use a longitude difference as zonal grid spacing, so near the poles the zonal grid spacing becomes zero, which is known as pole problem. Of course, such problems do not occur in Spectral Models. The distance between two grid points is known as the Grid Length. The nearer the points are together, i.e., higher the resolution, the better will the model represent the atmosphere and topography. A practical problem is that small horizontal grids need more levels in the vertical and shorter time steps. This requires more computing power.

 

High resolution is needed for Regional models and for short period forecast. Regional models allow for the use of finer grid spacing than global models because the available computational resources are focused on a specific area instead of being spread over the globe. For a Global forecasting model large computing power is needed because more data are to be handled. In that case the computing power restricts the grid length. For the Climate models coarser grids are used.

  1. Modern Numerical Forecasting

Weather forecasting can be divided, somewhat arbitrarily, into three categories: short-, medium- and long-range.

  • 1) Short-range forecasting: Refers to forecasting the weather valid for one to three days.
  • 2) Medium-range forecasting: This forecast is valid for three days to about two weeks.
  • 3) Long -range or seasonal forecasting: It aims to predict the weather at lead times of a month or a season.

While short range forecasts are valuable to many users, and medium-range forecasts are valuable to the farmers. Long Range Forecast is mainly useful to the planners.

 

Short-range forecasts can be made using Regional models. These models use grid boxes to cover restricted parts of the globe. In a period of two weeks, however, weather systems can travel halfway round the globe. Therefore forecasting in the medium range or beyond requires a global model of the atmosphere.

 

In India several numerical models are used operationally. For Short Range Forecasting India Meteorological Department (IMD) uses high resolution Weather Research Forecasting (WRF) Model. For Medium and Extended Range Forecasting Global Forecast System (GFS – T 1534) and Global Ensemble Forecast System (GEFS – T574) Models are used by IMD. For Long Range or Seasonal forecasting IMD uses Climate Forecast System CFS Model.

  1. Summary

 

Models of the atmosphere are built from fundamental conservation laws governing the physical behavior of the atmosphere. Numerical methods are used to obtain the (approximated) solution to the system of coupled governing equations. At first the equations are discretized. Meteorological data from unevenly distributed stations are brought to the Grid points by Objective analysis. Before running the model the data are initialized. Sub – grid scale systems are introduced by Parameterization. In order to bring the stability of the solution time steps of integration are fixed following C – F – L condition. By solving the Prognostic Equations the Prediction is done. There are several models from Global Scale to Meso scale. Forecasts can be for a few hours or a few days or a season or a few decades or even for centuries.

you can view video on Fundamentals of Numerical Modelling