Top Banner
Using the UCLA Large Eddy Simulation code Thijs Heus, Bjorn Stevens, Axel Seifert, Cathy Hohenegger Max Planck Institute for Meteorology November 7 - 11, 2011 Max-Planck-Institut für Meteorologie Overview of UCLA LES UCLALES Tutorial Thijs Heus Max Planck Institute for Meteorology November 7 - 11, 2011 Max-Planck-Institut für Meteorologie This Week Monday Tuesday Wednesday Thursday Friday 9.30 ClimateServiceCenter 112 Bjorn - Introduction Thijs - Setting Up ZMAW 301 Cathy – Surface Thijs - Statistics Geomatikum 13.35 Thijs – Dynamics I Practical: Own topics Geomatikum 13.35 Axel - Microphysics Practical: Own topics ZMAW 301 Thijs – Dynamics II Topics of interest 13.00 ClimateServiceCenter 112 Thijs – Code Structure ClimateServiceCenter 112 Executing the code and building a case. ZMAW 024 Practical: Own topics 15.00 ZMAW 301 Thijs – In- and Output Geomatikum 13.35 Bjorn - Radiation 18.00 Icebreaker/Beer/... Dinner Overview of UCLA LES Large-Eddy Simulations History Overview of UCLA LES Thijs Heus 3 / 117 Our Group Hans-Ertel Zentrum for research on Clouds and Convection Led by Cathy Hohenegger and Axel Seifert Funded by Deutscher Wetter Dienst Hunt for knowledge on convective clouds in various conditions Large Eddy Simulations are our primary (but not only) tool Overview of UCLA LES Large-Eddy Simulations History Overview of UCLA LES Thijs Heus 4 / 117
44

Using the UCLA Large Eddy Simulation code Overview of UCLA ...

Jan 01, 2017

Download

Documents

vothu
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Using the UCLA Large Eddy Simulation code Overview of UCLA ...

Using the UCLA Large Eddy Simulation code

Thijs Heus, Bjorn Stevens, Axel Seifert, Cathy Hohenegger

Max Planck Institute for Meteorology

November 7 - 11, 2011

Max-Planck-Institut für Meteorologie

Overview of UCLA LESUCLALES Tutorial

Thijs Heus

Max Planck Institute for Meteorology

November 7 - 11, 2011

Max-Planck-Institut für Meteorologie

This WeekMonday Tuesday Wednesday Thursday Friday

9.30 ClimateServiceCenter 112Bjorn - IntroductionThijs - Setting Up

ZMAW 301Cathy – SurfaceThijs - Statistics

Geomatikum 13.35Thijs – Dynamics IPractical: Own topics

Geomatikum 13.35Axel - MicrophysicsPractical: Own topics

ZMAW 301Thijs – Dynamics II Topics of interest

13.00 ClimateServiceCenter 112Thijs – Code Structure

ClimateServiceCenter 112Executing the code and building a case.

ZMAW 024Practical: Own topics

15.00 ZMAW 301Thijs – In- and Output

Geomatikum 13.35Bjorn - Radiation

18.00 Icebreaker/Beer/... Dinner

Overview of UCLA LES Large-Eddy Simulations History

Overview of UCLA LES Thijs Heus 3 / 117

Our Group

� Hans-Ertel Zentrum for research on Clouds and Convection

� Led by Cathy Hohenegger and Axel Seifert

� Funded by Deutscher Wetter Dienst

� Hunt for knowledge on convective clouds in various conditions

� Large Eddy Simulations are our primary (but not only) tool

Overview of UCLA LES Large-Eddy Simulations History

Overview of UCLA LES Thijs Heus 4 / 117

Page 2: Using the UCLA Large Eddy Simulation code Overview of UCLA ...

Cascade of Models

� General Circulation Models

� Regional Models

� Large-Eddy Simulations

� Direct Numerical Simulations

Overview of UCLA LES Large-Eddy Simulations History

Overview of UCLA LES Thijs Heus 5 / 117

Cascade of ModelsGeneral Circulation Models

� Domain size: Entire Earth

� Horizontal Boundary conditions: None

� Horizontal grid spacing: 50km

� Total number of points: about 400× 400× 100

� Simulation duration: Weeks - millennia

� Resolved: Hadley Circulation, fronts, ...

� Parameterized: Clouds, Boundary layers, Surface, Microphysics

Overview of UCLA LES Large-Eddy Simulations History

Overview of UCLA LES Thijs Heus 6 / 117

Cascade of ModelsRegional Models

� Domain size: Continental scale or smaller

� Studies of organization, deep systems,...

� Horizontal Boundary conditions: Nested/forced by GCM

� Horizontal grid spacing: 5km

� Total number of points: about 400× 400× 100

� Simulation duration: Weeks

� Resolved: Deep clouds

� Parameterized: Shallow Clouds, Boundary layers, Surface,Microphysics

Overview of UCLA LES Large-Eddy Simulations History

Overview of UCLA LES Thijs Heus 7 / 117

Cascade of ModelsLarge-Eddy Simulations

� Domain size:1− 100km

� Studies of boundary layer processes, idealized (and not so idealized)clouds

� Horizontal Boundary conditions: Periodic

� Horizontal grid spacing: 50m

� Total number of points: about 400× 400× 100

� Simulation duration: Hours/Days

� Resolved: Shallow Clouds, Boundary layers

� Parameterized: Turbulence, Surface, Microphysics

Overview of UCLA LES Large-Eddy Simulations History

Overview of UCLA LES Thijs Heus 8 / 117

Page 3: Using the UCLA Large Eddy Simulation code Overview of UCLA ...

Cascade of ModelsDirect Numerical Simulations

� Domain size:1m

� Studies of turbulence, possibly with interactions of other processes

� Horizontal Boundary conditions: Periodic

� Horizontal grid spacing: 1mm

� Total number of points: about 1000× 1000× 1000

� Simulation duration: Minutes

� Resolved: Turbulence, surface (?)

� Parameterized: Microphysics

Overview of UCLA LES Large-Eddy Simulations History

Overview of UCLA LES Thijs Heus 9 / 117

Cascade of ModelsOther

Focus of LES is on Geophysical Fluid DynamicsMany processes are still unresolved or beyond the scope of LES:

� Radiation - At best, 2D radiation is available

� Chemistry, aerosols and microphysics

� Near-Surface processes

Overview of UCLA LES Large-Eddy Simulations History

Overview of UCLA LES Thijs Heus 10 / 117

Large-Eddy SimulationsPrinciple

� Spatially filter (smooth) the Navier Stokes Equations

� Ensure that the width of this spatial filter lies in the inertial subrangeof the turbulent field

� Explicitly solve the most energetic scales

� Model the Sub Filter Scale (SFS) turbulence. The details of this SFSmodel should not matter.

We violate these principles on a daily basis. But still, over 90% of theenergy in the bulk of the convective boundary layer is usually resolved.

Overview of UCLA LES Large-Eddy Simulations History

Overview of UCLA LES Thijs Heus 11 / 117

Filtering

u =

∫G (r)udr

With G the filter (could be a (grid-)box, a gaussian, a spectral filter,....)

Overview of UCLA LES Large-Eddy Simulations History

Overview of UCLA LES Thijs Heus 12 / 117

Page 4: Using the UCLA Large Eddy Simulation code Overview of UCLA ...

Navier Stokes Equations

∂ui

∂t= −uj

∂ui

∂xj−cpΘ0

∂π

∂xi+ν

∂2ui

∂x2j

+Fi

Overview of UCLA LES Large-Eddy Simulations History

Overview of UCLA LES Thijs Heus 13 / 117

Large-Eddy Equations

∂ui

∂t= −uj

∂ui

∂xj−cpΘ0

∂π

∂xi+

1

ρ0

∂(ρ0τij)

∂xj+Fi

∂φ

∂t= −uj

∂φ

∂xj+

1

ρ0

∂(ρ0γφj)

∂xj+Sφ

Anelastic continuity∂(ρ0ui )

∂xi= 0

Ideal gas law equation of state

θv = θ (1 + (Rv/Rd − 1)qt − (Rv/Rd)ql) .

Overview of UCLA LES Large-Eddy Simulations History

Overview of UCLA LES Thijs Heus 14 / 117

Closure

� τij ≡ uiuj − ui uj is the Sub Filter Scale flux and needs to be modeled

� Can be done byI Smagorinsky diagnostic closureI Deardorff prognostic TKEI Higher order closuresI Nothing at all (Numerical diffusion)

� All models start off with models for homogeneous isotropic turbulence

� Empirical modifications are nearly always done to match stableturbulence and condensation gradients.

Overview of UCLA LES Large-Eddy Simulations History

Overview of UCLA LES Thijs Heus 15 / 117

History

� Dry LES: Smagorinsky (1963), Lilly(1967), Deardorff(1972)

� Cloudy LES: Sommeria(1976)

� ’Big breakthrough LES’: Schmidt and Schumann (1989)

� ’Huge breakthrough LES’: Earth Simulator Global LES (2001)

Overview of UCLA LES Large-Eddy Simulations History

Overview of UCLA LES Thijs Heus 16 / 117

Page 5: Using the UCLA Large Eddy Simulation code Overview of UCLA ...

History IIntercomparisons

� Dry CBL: Nieuwstadt et al. (1986, 1993) and Andren et al. (1994)

� Non-Precip Stratocumlus: Moeng et al. (1996)

� Radiative Smoke: Bretherton et al. (1999)

� Non-Precip Shallow Cu: Siebesma et al. (2003)

� Non-Precip Stratocumlus: Stevens et al. (2001)

� Diurnal Cycle Cu: Brown et al. (2001)

� Sheared and Stable BLs: Holtslag(2006), Beare(2006)

� Precip Stratocumlus: Ackerman et al. (2008)

Overview of UCLA LES Large-Eddy Simulations History

Overview of UCLA LES Thijs Heus 17 / 117

History IIIntercomparisons

� Precip Cumlus: van Zanten et al. (2011)

� Precip Stratocumlus: Ackerman et al. (2008)

� Radiative, transition runs: Sandu, de Roode, Blossey (2012)

Overview of UCLA LES Large-Eddy Simulations History

Overview of UCLA LES Thijs Heus 18 / 117

HistoryUCLALES

� Based on a meso-scale modeling code by prof. Cotton and prof.Pielke at Colorado State University (eighties, nineties)

� Started as LES by Bjorn in the nineties

� Blossomed with him at UCLA (hence the name)

� Parallelized by Jim Edwards, Microphysics with help of GrahamFeingold and Axel Seifert, dynamics by Verica Savic Jovcic

� Participated in all GCSS intercomparisons, and in many processstudies

Overview of UCLA LES Large-Eddy Simulations History

Overview of UCLA LES Thijs Heus 19 / 117

When not to use LES

When your problem has ...

� ... nothing to do with turbulence

� ... exclusively to do with turbulence (use DNS!)

� ... is dominated by larger scales (e.g. frontal systems)

Or when you don’t have sufficient computer power to do high resolutionsimulations. In which case, start doing theory.

Overview of UCLA LES Large-Eddy Simulations History

Overview of UCLA LES Thijs Heus 20 / 117

Page 6: Using the UCLA Large Eddy Simulation code Overview of UCLA ...

When not (yet) to use UCLA LES

When your problem has ...

� ... strong pressure fluctuations (anelastic approximation is used)

� ... orography, heterogeneous surface conditions or land-atmosphereinteractions

� ... has an important lateral component to it (Periodic boundaryconditins)

Or when you’re not willing to look into the code.

Overview of UCLA LES Large-Eddy Simulations History

Overview of UCLA LES Thijs Heus 21 / 117

What can be done with (UCLA) LESClassical studies

� Clear convective boundary layers

� Shallow cumulus clouds

� Stratocumulus clouds

Overview of UCLA LES Large-Eddy Simulations History

Overview of UCLA LES Thijs Heus 22 / 117

What can be done with (UCLA) LESModern studies

� Precipitation and microphysics

� Cloud and parcel tracking

� Deep convection

� Stable boundary layers

� Surface interaction

� Day-to-day runs like in the KNMI Testbed

Overview of UCLA LES Large-Eddy Simulations History

Overview of UCLA LES Thijs Heus 23 / 117

Model Philosophy

Why use stand-alone LES models at all?

� Research desires ad-hoc changes

� Big model structures (WRF, ECHAM, ICON...) tend to be cluttered,lots of unnecessary additions, hard to run and compile, unreadable,...

� UCLALES is just small enough to understand (more or less)

� It is easy to code any forcing/output you want, and use it for 1 study

� Optimized for user/developer time, not CPU Time

Overview of UCLA LES Large-Eddy Simulations History

Overview of UCLA LES Thijs Heus 24 / 117

Page 7: Using the UCLA Large Eddy Simulation code Overview of UCLA ...

Course Aim

After this course, you should...

� Be able to run and tweak the model

� Know where to look up scripts and examples (including in thesehandouts)

� Understand the (im-)possibilities and sensitivities of UCLA LES

� Have a feel for what resolution should be used when, and what modelsetting is necessary.

Overview of UCLA LES Large-Eddy Simulations History

Overview of UCLA LES Thijs Heus 25 / 117

Drinks tonight?

Hadley’s, 18.00?

Overview of UCLA LES Large-Eddy Simulations History

Overview of UCLA LES Thijs Heus 26 / 117

Setting up the code: Obtaining, compiling, running (andversion management)

UCLALES Tutorial

Thijs Heus

Max Planck Institute for Meteorology

November 7 - 11, 2011

Max-Planck-Institut für Meteorologie

Course Setup

� login on tornado

� cd course/yourname

� Contents:I A public SSH key (for gitorious.org)I A directory with the lectures (will be updated)I A directory with supplementary material (e.g. articles to read)I A directory to run your runs

� Do not overwrite these files - they will be updated

� Not yet here: The source code

� Feel free to do the course on your own account/machine!

Setting up Git Compilation Executing

Setting up Thijs Heus 28 / 117

Page 8: Using the UCLA Large Eddy Simulation code Overview of UCLA ...

Git version management

� Git is a distributed version management system

� All history of all branches is captured

� Easy to create branches for some project (like the course)

� Easy to merge fixes and features from branch to branch

� The main repository sits on www.gitorious.org/uclales

� The master branch should always be the most stable, up-to-datebranch

Setting up Git Compilation Executing

Setting up Thijs Heus 29 / 117

Gitorious.org

� Register on www.gitorious.org (already done?)

� Tell me your username there, to give you (write) access to UCLALES

� Login at www.gitorious.org

� Go to “Manage SSH keys”

� Go to “Add SSH key”

� Add the contents of key/id rsa.pub (or ∼/.ssh/id rsa.pub) andclick OK

� Take some time to browse through the website

Setting up Git Compilation Executing

Setting up Thijs Heus 30 / 117

Using GitObtaining the code

� In your course directory, download the code with git [email protected]:uclales/uclales.git

� cd uclales; ls

� The entire history is now local in your folder

� git branch -a shows all branches

� By default, you are on the master branch

Setting up Git Compilation Executing

Setting up Thijs Heus 31 / 117

Using GitSwitching branches

� The course work will be done based on the course branch, so change:git checkout course

� Some differences appear there

� Now make your personal branch, based on the course branch: gitcheckout -b yourname

� Here you can play whatever you like

Setting up Git Compilation Executing

Setting up Thijs Heus 32 / 117

Page 9: Using the UCLA Large Eddy Simulation code Overview of UCLA ...

Using GitChanging something

� Open the file test1

� Write something in it

� See what is different: git status and git diff

� If you are happy with you change, commit: git commit test1 orgit commit -a for all changes

� Write a commit message and save

� See what is different now: git diff

� Nothing!

Setting up Git Compilation Executing

Setting up Thijs Heus 33 / 117

Using GitCreating a new file

� Open the new file test2

� Write something in it

� See what is different: git status and git diff

� You have to add the file with git add test2

� If you are happy with you change, commit: git commit test1 orgit commit -a for all changes

� Write a commit message and save

� See what is different now: git diff

� Nothing!

Setting up Git Compilation Executing

Setting up Thijs Heus 34 / 117

Using GitUpdating the remote repository

� On gitorious.org, nothing has changed yet

� To update: git push origin yourname

� Refresh gitorious.org; many new branches

� To get them all: git pull

� git branch -a has more branches now

Setting up Git Compilation Executing

Setting up Thijs Heus 35 / 117

Using GitOther commands

� git rm filename and git mv filename (Re)move files

� git merge branchname merges branchname into the current branch

� git checkout -f filename resets a single file to whatever wascommitted

� git reset is the panic button and reverts everything to the previousstate

� See uclales/doc/git uclales.pdf for longer explanation

Setting up Git Compilation Executing

Setting up Thijs Heus 36 / 117

Page 10: Using the UCLA Large Eddy Simulation code Overview of UCLA ...

CompilationRequirements

UCLALES requires almost no outside libraries.

� NetCDF (v3 or later) for input and output

� MPI (Only if you want to do Parallel runs)

� A Fortran 95 compiler (IFort, gfortran, xlf work)

� Git for keeping up to date with the source code

� CMake (optional) for easier/faster compilation

Setting up Git Compilation Executing

Setting up Thijs Heus 37 / 117

CompilationCmake and Make

There are two ways of compiling the code.� CMake does its best to create a Makefile automatically.

I Allows for parallel compilationI Easier to maintainI Not on every systemI On tornado: add /sw/sles10-x64/cmake-2.8.4/bin/ to your PATH

� A bunch of predefined Makefiles are available in the misc/makefilesdirectory.

Setting up Git Compilation Executing

Setting up Thijs Heus 38 / 117

Compilation ICMake

� The CMakeLists.txt file in the uclales dir sets all the options,searches for libraries etc.

� Overrides can be set on the commandline or in a configuration file

� Choose/edit a configuration file in uclales/config. This sets pathsto libraries

� For now, just copy the tornado one to default:cp tornado.cmake default.cmake

� Create a build directorymkdir build; cd build from the uclales dir

Setting up Git Compilation Executing

Setting up Thijs Heus 39 / 117

Compilation IICMake

� Run CMake to create the makefile: cmake -D MPI=FALSE ..

� make -j4 to build the binary uclales

� Executing ./uclales gives an error now: Missing NAMELIST

Setting up Git Compilation Executing

Setting up Thijs Heus 40 / 117

Page 11: Using the UCLA Large Eddy Simulation code Overview of UCLA ...

CompilationCMake options

CMake responds to a number of commandline options, case sensitive,always with -D as a flag

Variable ValuesMPI TRUE,

FALSESwitch between parallel andserial

CMAKE BUILD TYPE DEBUG,RELEASE

Switch between debug set-tings and optimized

PROFILER GPROF,SCALASCA,MARMOT

Switch on profiler (to assessspeed bottleneck)

Setting up Git Compilation Executing

Setting up Thijs Heus 41 / 117

Executing

� Copy the executable uclales to the run directory

� We need a runscript(uclales/misc/jobscripts/runscript course seq)

� We need a NAMELIST(uclales/misc/initfiles/namelist drycbl)

� Submit it: qsub runscript course seq

� Wait...

� See what happens with: tail -f output

Setting up Git Compilation Executing

Setting up Thijs Heus 42 / 117

Model OptionsUCLALES Tutorial

Thijs Heus

Max Planck Institute for Meteorology

November 7 - 11, 2011

Max-Planck-Institut für Meteorologie

Starting a model run

There are four ingredients that feed into the model

� Hardcoded options

� Restart files (in NetCDF format)

� Data files (in text format)

� An option file: NAMELIST

Model Options Data files Namelist

Model Options Thijs Heus 44 / 117

Page 12: Using the UCLA Large Eddy Simulation code Overview of UCLA ...

Available runs I

In misc/initfiles the following cases are provided by default:

� namelist astex: The Astex case.

� namelist cumulus: Namelist to reproduce the idealized cumuluscases reported in Stevens, JAS (2007). Requires the generation of asound in file with bstate.f95.

� namelist drycbl: Idealized dry CBL consisting of a layer with initiallyuniform stratification and constant forcing.

� namelist dycm01: The DYCOMS GCSS RF01 case, requires thegeneration of a sound in file with bstate.f95.

Model Options Data files Namelist

Model Options Thijs Heus 45 / 117

Available runs II

� namelist dycm02: The DYCOMS GCSS RF02 case, requires thegeneration of a sound in file with bstate.f95, as well as the generationof zm grid in and zt grid in files uzing zgrid.gcss9.f.

� namelist rico: The RICO GCSS composite case.

� namelist smoke: The GCSS smoke case.

Model Options Data files Namelist

Model Options Thijs Heus 46 / 117

Data files* grid in

� zm grid in, zt grid in Input files for vertical non-equidistant gridsthat are not possible with the namelist options. A single column ofvalues, needs to have at least nzp-2 points

Model Options Data files Namelist

Model Options Thijs Heus 47 / 117

Data filessound in

� A completely flexible input file for the initial profiles of the meanquantities

� Textfile with a bunch of rows:I height in meters or in pressure (depending on ipsflg) The first

number is the surface pressureI Temperature. Depending on itsflg, the absolute temperature,

potential temperature or liquid water potential temperature.I Humidity. Depending on irsflg, the relative humidity or total

humidityI Horizontal velocity fields, u and v .

The file contents should cover the entire domain. Between anchorpoints, linear interpolation happens.

Model Options Data files Namelist

Model Options Thijs Heus 48 / 117

Page 13: Using the UCLA Large Eddy Simulation code Overview of UCLA ...

Data filesls flux in

Time dependent fluxes and large scale forcings.� The first block sets the surface values, with columns:

I Time in secondsI Surface heat flux in Wm−2

I Surface moisture flux in Wm−2

I Surface liquid water potential temperatureI Surface pressure

� From the second block on, every block starts with: # time

� Within each block, the following columns show up:I Large scale subsidence ws , gives the tendency −ws

∂φ∂z

I Large scale tendency for θlI Large scale tendency for qt

The block contents should cover the entire domain. Between anchorpoints, linear interpolation happens.

Model Options Data files Namelist

Model Options Thijs Heus 49 / 117

Data filesnudge in

Nudges the average fields to a preset value:

∂φ

∂t

∣∣∣∣ =φnudge − φ

τ

With τ−1 the nudging strength.The columns depict:

� height in meters

� Nudging strength

� The nudging value of u, v , θl and qt

The nudging can be time dependent, so each block shows the nudging ata specific time, set by the number that starts the block just after the #

Model Options Data files Namelist

Model Options Thijs Heus 50 / 117

Data filesdatafiles directory

� dmin wetgrowth lookup.dat Only for level=5 microphysics: Lookup table for growth ice hydrometeors

� *.lay: To be copied to the run dirs and named backrad in. Itdescribes the radiative background state of the atmosphere, includingpressure, temperature, humidity and ozone profiles. Only used foriradtyp = 4 and between the top of the domain and the top of theatmosphere.

� *.dat Internal lookup tables for iradtyp=4 radiation

Model Options Data files Namelist

Model Options Thijs Heus 51 / 117

The Namelist

� The only obligatory input file

� Has to be named: NAMELIST (in capitals)

� All input is being put in a single namelist, read at LES.f90

Model Options Data files Namelist

Model Options Thijs Heus 52 / 117

Page 14: Using the UCLA Large Eddy Simulation code Overview of UCLA ...

Grid and Time setup I

Variable Defaultexpnme Default experiment namefilprf x file prefix for use in constructing output filesnxp 132 total number of x points (Ny + 4)nyp 132 total number of y points (Ny + 4)nzp 105 total number of z pointsdeltax 35.0 m grid spacing in x-directiondeltay 35.0 m grid spacing in y -direction

Model Options Data files Namelist

Model Options Thijs Heus 53 / 117

Grid and Time setup II

deltaz 17.5 m grid spacing in z-directiondzrat 1.02 grid stretching ration (default 2% per interval)dzmax 1200 m height at which grid-stretching beginsigrdtyp 1 control parameter for selecting vertical griddtlong 10 s maximum timestephfilin test. name of input history file for HISTORY starts

(xxx.)timmax 18000 s final time of simulation

Model Options Data files Namelist

Model Options Thijs Heus 54 / 117

Grid and Time setup III

wctime Wall clock time to break off the simulationnfpt 5 number of levels in upper sponge layerdistim 300 s minimum relaxation time in sponge layernaddsc 0 number of additional scalarsruntyp INITIAL type of run (’INITIAL’ or ’HISTORY’)

Model Options Data files Namelist

Model Options Thijs Heus 55 / 117

Physics I

Variable Defaultiradtyp 0 control parameter for selecting radiation

modelCCN 150 ×106 cloud droplet mixing ratiolevel 0 0=thermodynamic level, 1=dry cbl, 2=moist

cbl (no rain), 3=moist cbl (with rain), 4, 5=ice microphysics

corflg false coriolis acceleration (true/false)radfrq 0 radiation update intervalstrtim 0 GMT of model time

Model Options Data files Namelist

Model Options Thijs Heus 56 / 117

Page 15: Using the UCLA Large Eddy Simulation code Overview of UCLA ...

Physics II

cntlat 31.5◦ N model central latitudecase name astex specify case name (rico,astex,bomex)lsvarflg false reads large scale forcings from the file lscale indiv 3.75e-6

s−1divergence

umean 0. Mean U velocity (subtracted during the cal-culations

vmean 0. Mean V velocity (subtracted during the cal-culations

th00 288 Basic state temperature (subtracted duringthe calculations

Model Options Data files Namelist

Model Options Thijs Heus 57 / 117

Physics III

sst 292 K sea surface temperatureisfctyp 0 surface parameterization type (0: specified

fluxes; 1: specified surface layer gradients; 2:fixed lower boundary of water, 3-5: Specificvariations. See the surface lecture for moreinformation.

ubmin 0.20 minimum u for u∗ computationzrough 0.1 momentum roughness height (if less than zero

use Charnock relation)dthcon 100 Wm−2 surface temperature gradient (isfcflg=1) or

surface heat flux (itsflg=0)drtcon 0 Wm−2 surface humidity (mixing ratio) gradient (is-

fcflg=1) or surface latent heat flux (itsflg=0)csx 0.23 Smagorinsky Coefficient

Model Options Data files Namelist

Model Options Thijs Heus 58 / 117

Physics IV

prndtl 1/3 Prandtl Number (if less than zero no sgs forscalars)

sfc albedo Albedo of the surfacelnudge Switching on/off nudgingtnudgefac Factor to strengthen the nudgingltimedep Switch for time depend fluxes and large scale

forcingsSolarConstant Top of Atmosphere radiation

Model Options Data files Namelist

Model Options Thijs Heus 59 / 117

Initial profiles I

Variable Defaultipsflg 1 control parameter for input sounding (0: pres-

sure in hPa; 1: height in meters with ps(1)=psfc)

itsflg 1 control parameter for input sounding (0: ts =θ; 1: ts = θl)

irsflg 1 control parameter for input sounding (0: rs =Rel. Hum) 1: (rs = qt)

us n/a input zonal wind soudingvs n/a input meridional wind soudingts n/a input temperature souding

Model Options Data files Namelist

Model Options Thijs Heus 60 / 117

Page 16: Using the UCLA Large Eddy Simulation code Overview of UCLA ...

Initial profiles II

rts n/a input humidity soudingps n/a input pressure soundinghs n/a vertical positioniseed 0 random seedzrand 200 m height below which random perturbations are

added

Model Options Data files Namelist

Model Options Thijs Heus 61 / 117

Statistics and output I

Variable Defaultoutflg true output flag (true/false)lsync false Synchronize the crosssection output

(true/false)frqhis 9000 s history write intervalfrqanl 3600 s analysis write intervalslcflg false write slice output (true/false)istpfl 1 print interval for timestep info

Model Options Data files Namelist

Model Options Thijs Heus 62 / 117

Statistics and output II

ssam intvl 30 s statistics sampling intervalsavg intvl 1800 s statistics averaging intervallcross false Crosssection output (true/false)frqcross 3600 s crosssection write intervallxy false Crosssection output in xy plane (true/false)zcross 0 Crosssection location of xy plane (true/false)lxz false Crosssection output in xz plane (true/false)

Model Options Data files Namelist

Model Options Thijs Heus 63 / 117

Statistics and output III

ycross 0 Crosssection location of xy plane (true/false)lyz false Crosssection output in yz plane (true/false)xcross 0 Crosssection location of xy plane (true/false)lwaterbudget false Crosssection of (costly) waterbudget

(true/false)

Model Options Data files Namelist

Model Options Thijs Heus 64 / 117

Page 17: Using the UCLA Large Eddy Simulation code Overview of UCLA ...

Structure of the codeUCLALES Tutorial

Thijs Heus

Max Planck Institute for Meteorology

November 7 - 11, 2011

Max-Planck-Institut für Meteorologie

Files and Modules I

LES Main program which calls a timing routine and thedriver, as well as the driver subroutine and the subrou-tine which defines and reads the model NAMELISTfile.

advf Calculates the tendencies associated with scalar ad-vection.

advl Calculates the tendencies associated with momentumadvection.

defs Defines physical constants.forc Case specific forcings (radiation, subsidence, etc.).

Structure Main files and modules Main variables Grid and Parallelization

Structure Thijs Heus 66 / 117

Files and Modules II

grid Definition of grid, allocation of memory and I/O man-agement

init Routines for processing input (either from a file or theNAMELIST), definition of basic state, initialization offields, and definition of initial random perturbations.

lsvar computes sst, div and winds for astex case (only whenlsvar=true in NAMELIST)

ncio Defines structure of ncdf output files.icemcrp Bulk microphysical routines.mpi interface Definition of MPI parameters and MPI routines for

the domain decomposition (only when using MPImode else seq interface).

prss Poisson solver, calculates the velocity tendencies as-sociated with pressure gradients, also implementstime-filter for Runge Kutta scheme and updates ve-locity.

Structure Main files and modules Main variables Grid and Parallelization

Structure Thijs Heus 67 / 117

Files and Modules III

rad cldwtr Calculates radiation properties from cloud water andeffective radius.

rad corkds Reads gas concentrations and calculates radiativeproperties such as optical depth and absorption coef-ficients.

rad d4strm Computes radiative fluxes and optical properties forRayleigh scattering.

rad driver Includes background soundings for atmosphericgases.

rad gcss Simple radiative parametrization for SW and LWfluxes (Delta-Eddigton approximation).

rad rndnmb Contains a random number generator.rad solver Radiation solver.

Structure Main files and modules Main variables Grid and Parallelization

Structure Thijs Heus 68 / 117

Page 18: Using the UCLA Large Eddy Simulation code Overview of UCLA ...

Files and Modules IV

sgsm Subgrid scale solver.srfc Surface boundary condition routines.stat Routines for calculating, accumulating and out-

putting model statistics. Statistical output is pro-vided through the course of a simulation and tendsto be problem specific.

step Time stepper. Also includes several routines for com-puting tendencies due to physical processes (Coriolisforce, buoyancy) or boundary conditions (Rayleighfriction for sponge layer near lid). Updating ofscalars is done here. CFL computations and timestep-regridding are also here.

Structure Main files and modules Main variables Grid and Parallelization

Structure Thijs Heus 69 / 117

Files and Modules V

thrm Thermodynamic routines for calculating quantitieslike temperature, and cloud water, given the ther-modynamic state of the model, i.e., θl , qt , ρ0, π0,Θ0.

util A collection of basic utilities including boundary con-ditions, FFT calls, explicit array operations such asdomain or slab averaging or covariances, the tri-diagonal solver, and some NetCDF utilities. Manyof the routines in this module make active MPI calls.

Structure Main files and modules Main variables Grid and Parallelization

Structure Thijs Heus 70 / 117

Main Variables I

a xp,a xt1,a xt2 4D Data arrays used to summarize variablesa up,a vp,a wp 3D un, vn, wn

a ut,a vt,a wt ” ∂tu, ∂tv , ∂tu

a tp,a tt ” Liquid water potential temperature, θ′ nl , ∂tθl

a rp,a rt ” Total water mixing ratio rnt , ∂trt

a rpp,a rpt ” Rain mass mixing ratio rnr , ∂trr (for level 3)

a npp,a npt ” Rain number mixing ratio, nnr , ∂tnr (for level

3)

Structure Main files and modules Main variables Grid and Parallelization

Structure Thijs Heus 71 / 117

Main Variables II

a theta ” Potential temperature, θ (diagnosed frommodel state)

rc,rv ” Condensate and vapor mixing ratio rc , rv(note that rc can be either the cloud or totalcondensate mixing ratio depending on whenit is accessed)

press, a pexnr ” Pressure and Exner function (p, π respec-tively)

a scr1, a scr2 ” Three dimensional scratch arraysa ustar, a tstar,a rstar

2D Surface scales, u∗, θ∗, r∗ respectively

uw sfc, vw sfc,ww sfc

” Surface momentum fluxes, u′w ′, v ′w ′, w ′w ′respectively.

wt sfc, wq sfc ” Surface thermodynamic fluxes, w ′θ′, w ′r ′ re-spectively.

Structure Main files and modules Main variables Grid and Parallelization

Structure Thijs Heus 72 / 117

Page 19: Using the UCLA Large Eddy Simulation code Overview of UCLA ...

Main Variables III

precip ” Precipitation fluxdn0 1D Basic state density, ρ0(z).xt, yt, zt ” Position of thermodynamic pointsxm, ym, zm ” position of momentum pointsdzi t ” 1/(zm(k)− zm(k − 1)dzi m ” 1/(zt(k + 1)− zt(k)

Structure Main files and modules Main variables Grid and Parallelization

Structure Thijs Heus 73 / 117

The Horizontal Grid

� The grid is equidistant inthe 2 horizontal directions

� 1 processor covers a certainpart of the grid

� And has 2 ghost cells aroundit on all sides

� All processors together showa big amount of overlap

� Parallelization remainsefficient with > 16× 16points per processor

Structure Main files and modules Main variables Grid and Parallelization

Structure Thijs Heus 74 / 117

The Vertical Grid

dzi_m = 1 / (zt(k+1)−zt(k))

dzi_t = 1 / ( zm(k) − zm(k+1))

zm(1)

zt(1)

zm(3)

zm(4)

zm(2)

zt(4)

zt(2)

u(4,i)

u(3,i)

u(2,i) T(2,i+1)

u(1,i)

T(3,i)

T(4,i)

T(2,i)

T(4,i+1)

T(3,i+1) zt(3)

T(1,i+1)T(1,i)

w(1,i) w(1,i)

w(2,i+1)w(2,i)

w(3,i) w(3,i+1)

u(4,i+1)

u(3,i+1)

u(2,i+1)

u(1,i+1)

u(2,i-1)

u(3,i-1)

u(4, i-1)

u(1,i-1)

� The grid is staggered as aArakawa C-grid

� Pressure and scalars aredefined at cell center

� The velocities are defined atthe cell faces to avoiddecoupling between pressureand velocity

� The upper/right cell facehas the same index as thecell center

Structure Main files and modules Main variables Grid and Parallelization

Structure Thijs Heus 75 / 117

Statistics and outputUCLALES Tutorial

Thijs Heus

Max Planck Institute for Meteorology

November 7 - 11, 2011

Max-Planck-Institut für Meteorologie

Page 20: Using the UCLA Large Eddy Simulation code Overview of UCLA ...

Output files I

� Restart files *.rst only for internal model use. Output every frqhisseconds

� 3D output files name.nc: 3D output of the main quantities. Outputdone every frqanl seconds. Bulky!

� 2D Crosssections name.out.cross*nc: Crosssections of the data inth xy, xz, yz planes, as well as 2D integrated quantities like LiquidWater Path. Output done every frqcross seconds, governed bylcross, lxy, lxz, lyz

� 1D Profiles name.ps*nc. Profiles as a function of height. Outputevery savg intvl, sampling every ssam intvl. Need to be postprocessed for MPI runs.

Statistics

Statistics Thijs Heus 77 / 117

Output files II

� Timeseries name.ts.*nc. Domain averaged surface values, liquidwater paths, cloud fraction etc. Output and sampling done everyssam intvl. Needs to be post processed for MPI runs.

Statistics

Statistics Thijs Heus 78 / 117

Statistics and output I

Variable Defaultoutflg true output flag (true/false)lsync false Synchronize the crosssection output

(true/false)frqhis 9000 s history write intervalfrqanl 3600 s analysis write intervalslcflg false write slice output (true/false)istpfl 1 print interval for timestep info

Statistics

Statistics Thijs Heus 79 / 117

Statistics and output II

ssam intvl 30 s statistics sampling intervalsavg intvl 1800 s statistics averaging intervallcross false Crosssection output (true/false)frqcross 3600 s crosssection write intervallxy false Crosssection output in xy plane (true/false)zcross 0 Crosssection location of xy plane (true/false)lxz false Crosssection output in xz plane (true/false)

Statistics

Statistics Thijs Heus 80 / 117

Page 21: Using the UCLA Large Eddy Simulation code Overview of UCLA ...

Statistics and output III

ycross 0 Crosssection location of xy plane (true/false)lyz false Crosssection output in yz plane (true/false)xcross 0 Crosssection location of xy plane (true/false)lwaterbudget false Crosssection of (costly) waterbudget

(true/false)

Statistics

Statistics Thijs Heus 81 / 117

Timeseries

� Postprocessing to make 1 file out of all the files per processor

� Build tool in uclales/misc/synthesis:

� ifort reducets.f90 -o reducets`/path/to/netcdflib/bin/nc-config --fflags --flibs `

� NOTE: The quotation marks are accent graves (Under the tilde at aUS International keyboard

� Use it to gather your timeseries statistics with: reducets name nxnyI name is the stem of the filename (so everything before .ts.00....I nx is the number of processes in the x-directionI ny is the number of processes in the y-direction

Statistics

Statistics Thijs Heus 82 / 117

Profiles

� Postprocessing to make 1 file out of all the files per processor

� Build tool in uclales/misc/synthesis:

� ifort reduceps.f90 -o reduceps`/path/to/netcdflib/bin/nc-config --fflags --flibs `

� NOTE: The quotation marks are accent graves (Under the tilde at aUS International keyboard

� Use it to gather your profile statistics with: reduceps name nx nyI name is the stem of the filename (so everything before .ps.00....I nx is the number of processes in the x-directionI ny is the number of processes in the y-direction

Statistics

Statistics Thijs Heus 83 / 117

Adding to Profiles and Timeseries

� Both profiles and timeseries are written from ncio.f90 and stat.f90

� They are known to change over time.

Statistics

Statistics Thijs Heus 84 / 117

Page 22: Using the UCLA Large Eddy Simulation code Overview of UCLA ...

Plot

� You’re completely free to do what you want :)

� Depending on who you are and what you want for a plot, you coulduse NCL, Matlab, Python, Ferret, NCView,...

� We’d like to build up a tools database, so feel even more free tosubmit scripts over git

� As a starter, copy the 2 plotfld.* scripts fromuclales/misc/analysis/

� Explore plotfld.csh, and put in the right variable names and timeframe.

� Run it!

� Output sits in two pdf files t1.pdf and p1.pdf

Statistics

Statistics Thijs Heus 85 / 117

Crosssections

� Postprocessing to make 1 file out of all the files per processor:

� cdo gather name.out.cross*nc name.out.cross.nc

� Watch the file quickly with (for instance) ncview

Statistics

Statistics Thijs Heus 86 / 117

Advection, diffusion and subgridUCLALES Tutorial

Thijs Heus

Max Planck Institute for Meteorology

November 7 - 11, 2011

Max-Planck-Institut für Meteorologie

The LES EquationsOther forces

Solving velocity uj and scalars φ includes Advection, Diffusion, Pressureand other forces and sources.

∂ui

∂t= −uj

∂ui

∂xj−cpΘ0

∂π

∂xi+

1

ρ0

∂(ρ0τij)

∂xj+Fi

∂φ

∂t= −uj

∂φ

∂xj+

1

ρ0

∂(ρ0γφj)

∂xj+Sφ

Anelastic continuity∂(ρ0ui )

∂xi= 0

Ideal gas law equation of state

θv = θ

[1 + (

Rv

Rd− 1)qt − Rv

Rdql

].

Dynamics Time Advection Diffusion Pressure

Dynamics Thijs Heus 88 / 117

Page 23: Using the UCLA Large Eddy Simulation code Overview of UCLA ...

Timestepping I

Time stepping is based on a Runge-Kutta third order method.The tendencies are calculated through 3 iterations:

φn∗ = φn+ α1

∂φn

∂t∆t

φn∗∗ = φn

∗+ α2∂φn

∂t∆t+ β2

∂φn∗∂t

∆t

φn+1 = φn∗∗+ α3

∂φn∗∗∂t

∆t+ β3∂φn∗∂t

∆t

With αi = ( 815 ,−17

60 ,34 ) and βi = (0,−15

12 ,−1512 ).

Dynamics Time Advection Diffusion Pressure

Dynamics Thijs Heus 89 / 117

Timestepping II

� The timestep ∆t (or dt.) in the code is variable

� Bounded by the Courant criterion (CFL = 0.5)

� Bounded by dt long in NAMELIST. Use it for:I Unstabilties not in advectionI Unstable spin upsI Circumventing bugs (but fix them later!)

� Not bounded by e.g. statistical timesteps. First step after tsamp istaken for statistics; faster but slightly imprecise.

Dynamics Time Advection Diffusion Pressure

Dynamics Thijs Heus 90 / 117

The LES EquationsOther forces

Solving velocity uj and scalars φ includes Advection, Diffusion, Pressureand other forces and sources.

∂ui

∂t= −uj

∂ui

∂xj−cpΘ0

∂π

∂xi+

1

ρ0

∂(ρ0τij)

∂xj+Fi

∂φ

∂t= −uj

∂φ

∂xj+

1

ρ0

∂(ρ0γφj)

∂xj+Sφ

Anelastic continuity∂(ρ0ui )

∂xi= 0

Ideal gas law equation of state

θv = θ

[1 + (

Rv

Rd− 1)qt − Rv

Rdql

].

Dynamics Time Advection Diffusion Pressure

Dynamics Thijs Heus 91 / 117

Advection

Advection can be best thought of flux through the boundaries of the cell:

∂uiφi

∂x=

Fi+ 12− Fi− 1

2

∆x

with Fi+ 12

the flux through the cell boundary at i + 12 .

Dynamics Time Advection Diffusion Pressure

Dynamics Thijs Heus 92 / 117

Page 24: Using the UCLA Large Eddy Simulation code Overview of UCLA ...

Advection

0.0 0.5 1.0 1.5 2.0 2.5 3.00.0

0.2

0.4

0.6

0.8

1.0

2nd2nds4th4ths6thc

Dynamics Time Advection Diffusion Pressure

Dynamics Thijs Heus 93 / 117

Advection

Dynamics Time Advection Diffusion Pressure

Dynamics Thijs Heus 94 / 117

Advection4th order

In UCLALES, we do 4th order Central Differencing for momentumadvection, and flux-limited advection for scalars to guarantee positivevalues

F 4thi+ 1

2=

ui+ 12

12[−φi−1 + 7φi + 7φi+1 − φi+2]

Fκi+ 1

2= ui+ 1

2

[φi +

1

2κi+ 1

2(φi − φi−1)

]With κi+ 1

2> 0 and a function of consecutive gradients (assuming ui+ 1

2):

r = φi+1−φi

φi−φi−1

Dynamics Time Advection Diffusion Pressure

Dynamics Thijs Heus 95 / 117

Flux limiter schemes

Depending on the setting lmtr in advf.f90, we use:

minmod min (r , 1)

superbee max (min (2r , 1) ,min (r , 2))

MC min(2r ,1 + r

2, 2)

vanLeerr + |r |1 + |r |

By default, it is set to MC.Effectively, limiter schemes switch back to low order upwind schemeswhenever the local gradient is to steep.This happens a lot in turbulent fields. This can cause so much diffusionthat the SFS scheme is rendered useless

Dynamics Time Advection Diffusion Pressure

Dynamics Thijs Heus 96 / 117

Page 25: Using the UCLA Large Eddy Simulation code Overview of UCLA ...

The LES EquationsOther forces

Solving velocity uj and scalars φ includes Advection, Diffusion, Pressureand other forces and sources.

∂ui

∂t= −uj

∂ui

∂xj−cpΘ0

∂π

∂xi+

1

ρ0

∂(ρ0τij)

∂xj+Fi

∂φ

∂t= −uj

∂φ

∂xj+

1

ρ0

∂(ρ0γφj)

∂xj+Sφ

Anelastic continuity∂(ρ0ui )

∂xi= 0

Ideal gas law equation of state

θv = θ

[1 + (

Rv

Rd− 1)qt − Rv

Rdql

].

Dynamics Time Advection Diffusion Pressure

Dynamics Thijs Heus 97 / 117

Diffusion I

The sub-grid fluxes τij and γφj are not known explicitly and thus must bemodeled. This constitutes the model closure. The basic or default form ofthe closure makes use of the Smagorinsky model, wherein

τij = −ρ0KmDij and γφj = −Km

Pr

∂φ

∂xj,

where

Dij =∂ui

∂xj+∂uj

∂xi

is the resolved deformation, Km is the eddy viscosity, and Pr is an eddyPrandtl number. The Smagorinsky model calculates the eddy viscosity as

Km = (Cs`)2S

√1− Ri

Prwhere Ri =

S2

N2

Dynamics Time Advection Diffusion Pressure

Dynamics Thijs Heus 98 / 117

Diffusion II

and

S2 ≡ ∂ui

∂xjDij and N2 =

g

Θ0

∂θv∂z

.

In the above Cs is the Smagorinsky constant and takes on values near 0.2,and

`−2 = (∆x∆y∆z)−2/3 + (zκ/Cs)−2,

where κ = 0.35 is the von Karman constant in the model.

Dynamics Time Advection Diffusion Pressure

Dynamics Thijs Heus 99 / 117

The LES EquationsOther forces

Solving velocity uj and scalars φ includes Advection, Diffusion, Pressureand other forces and sources.

∂ui

∂t= −uj

∂ui

∂xj−cpΘ0

∂π

∂xi+

1

ρ0

∂(ρ0τij)

∂xj+Fi

∂φ

∂t= −uj

∂φ

∂xj+

1

ρ0

∂(ρ0γφj)

∂xj+Sφ

Anelastic continuity∂(ρ0ui )

∂xi= 0

Ideal gas law equation of state

θv = θ

[1 + (

Rv

Rd− 1)qt − Rv

Rdql

].

Dynamics Time Advection Diffusion Pressure

Dynamics Thijs Heus 100 / 117

Page 26: Using the UCLA Large Eddy Simulation code Overview of UCLA ...

Pressure(s) I

Exner function: π = (p/p00)Rd/cp

The anelastic approximation solves for perturbations about a hydrostaticbasic state of constant potential temperature, i.e.,

dπ0

dz= − g

cpΘ0,

where subscript 0 denotes a basic state value, which depend only on z (Θ0

being constant).For gravity, we use buoyancy deviations from the slab average (not thebasic state). For consistency, introduce a second exner π1:

d

dz(π0 + π1) = − g

cp θv,

Dynamics Time Advection Diffusion Pressure

Dynamics Thijs Heus 101 / 117

Calculating Pressure I

Start with continuity:∂(ρ0ui )

∂xi= 0

And the momentum equation:

∂ui

∂t= −uj

∂ui

∂xj−cpΘ0

∂π

∂xi+

1

ρ0

∂(ρ0τij)

∂xj+Fi

Fill them in in each other:

∂xi

(ρ0∂ui

∂t

)=

∂xi

[−ρ0uj

∂ui

∂xj− ρ0cpΘ0

∂π

∂xi+∂(ρ0τij)

∂xj+ρ0Fi

]= 0

Dynamics Time Advection Diffusion Pressure

Dynamics Thijs Heus 102 / 117

Calculating Pressure II

∂xi

[−ρ0uj

∂ui

∂xj− ρ0cpΘ0

∂π

∂xi+∂(ρ0τij)

∂xj+ρ0Fi

]= 0

Bring the pressure to the other side:

∂xi

(ρ0cpΘ0

∂π

∂xi

)=

∂xi

[−ρ0uj

∂ui

∂xj+∂(ρ0τij)

∂xj+ρ0Fi

]And we end up with a Poisson equation:

∂xi

(ρ0∂π

∂xi

)=

1

cpΘ0

∂xi

[−ρ0uj

∂ui

∂xj+∂(ρ0τij)

∂xj+ρ0Fi

]that can be solved efficiently (but globally!) in Fourier space.

Dynamics Time Advection Diffusion Pressure

Dynamics Thijs Heus 103 / 117

The surface modelUCLALES Tutorial

Cathy Hohenegger

Max Planck Institute for Meteorology

November 7 - 11, 2011

Max-Planck-Institut für Meteorologie

Page 27: Using the UCLA Large Eddy Simulation code Overview of UCLA ...

Max-Planck-Institut für Meteorologie

Outline •  The problem •  Physical basis •  The surface subroutine in the UCLALES •  Future development

Outline Max-Planck-Institut für Meteorologie

Why caring about the surface ?

From a very pragmatic point of view: Need to know the conditions at the bottom boundary to be able to integrate the relevant equations

The problem

Max-Planck-Institut für Meteorologie

Why caring about the surface ?

From a less pragmatic point of view:

Surface influences the structure and evolution of the planetary boundary layer

–  Friction: momentum flux: slows down wind –  Solar absorption: sensible heat flux: warms/cools overlying air –  Solar absorption: latent heat flux: water source for precipitation –  Introduces diurnal cycle

Partitions available energy between sensible and latent heat fluxes

The problem Max-Planck-Institut für Meteorologie

Physical basis

The physics

Outer layer

Surface layer

h

z<<h

z>>z0

The atmospheric boundary layer, J.R. Garratt

Page 28: Using the UCLA Large Eddy Simulation code Overview of UCLA ...

Max-Planck-Institut für Meteorologie

Physical basis

The physics

Outer layer

Surface layer

h

z<<h

z>>z0

Flow in the PBL is turbulent χ = χ + χ�

∂u

∂t= −1

ρ

∂p

∂z+ fv − ∂u�w�

∂z

The atmospheric boundary layer, J.R. Garratt

Max-Planck-Institut für Meteorologie

Variables to be determined

The physics

Surface stress in x Surface stress in y Surface sensible heat flux Surface buoyancy flux Surface latent heat flux

τx0 = −ρu�w�0

τy0 = −ρv�w�0

H0 = ρcpw�θ�0

Hv0 = ρcpw�θ�v0

LE0 = ρLvw�q�0

Max-Planck-Institut für Meteorologie

How do we compute the fluxes?

The physics

Use of surface similarity theory: •  Only valid for the surface layer z0 < z << h where fluxes remain

constant •  Isolate the relevant scales that can fully characterize the flow in

the surface layer •  Arrange them in dimensionless group to form appropriate

relationships •  Use data for fitting

Max-Planck-Institut für Meteorologie

How do we compute the fluxes?

The physics

Use of surface similarity theory: •  Only valid for the surface layer z0 < z << h where fluxes remain

constant •  Isolate the relevant scales that can fully characterize the flow in

the surface layer •  Arrange them in dimensionless group to form appropriate

relationships •  Use data for fitting

In general: determine e.g. appropriate velocity and length scales to scale the wind profile to derive not only the wind profile law but also to use this to formulate a suitable drag law

Page 29: Using the UCLA Large Eddy Simulation code Overview of UCLA ...

Max-Planck-Institut für Meteorologie

The pysics

Friction velocity

Temperature scale

Temperature scale

Humidity scale

Obukov stability length

u2∗0 =

�(u�w�

0)2 + (v�w�0)2 = −u�w�

0

θ∗0 =−w�θ�

0

u∗0

θv∗0 =−w�θ�

v0

u∗0

q∗0 =−w�q�0

u∗0

L =u2∗0θv

kgθv∗0

Characteristic scales

Max-Planck-Institut für Meteorologie

The physics

Friction velocity

Temperature scale

Temperature scale

Humidity scale

Obukov stability length

u2∗0 =

�(u�w�

0)2 + (v�w�0)2 = −u�w�

0

θ∗0 =−w�θ�

0

u∗0

θv∗0 =−w�θ�

v0

u∗0

q∗0 =−w�q�0

u∗0

L =u2∗0θv

kgθv∗0

Characteristic scales

Max-Planck-Institut für Meteorologie

The physics

Relations: First-order closure

Assume neutral and homogeneous atmosphere:

u�w�0 = −KM

∂u

∂zKM ∼ kzu∗0u�w�

0 = −u2∗0

kz

u∗0∂u

∂z= 1

Integrate: ku

u∗0= ln

z

z0

k = 0.4

Max-Planck-Institut für Meteorologie

The physics

Relations: First-order closure

Assume neutral and homogeneous atmosphere:

u�w�0 = −KM

∂u

∂zKM ∼ kzu∗0u�w�

0 = −u2∗0

kz

u∗0∂u

∂z= 1

Integrate: ku

u∗0= ln

z

z0

Page 30: Using the UCLA Large Eddy Simulation code Overview of UCLA ...

Max-Planck-Institut für Meteorologie

The physics

Relations: First-order closure

In general:

ζ = z/L

u�w�0 = −u2

∗0 = −KM∂u

∂zkz

u∗0∂u

∂z= ΦM (ζ)

Integrate:

ku

u∗0= ln(

z

z0)−

�(1− ΦM (ζ �))d(lnζ �)

ku

u∗0= ln(

z

z0)−ΨM (ζ)

Max-Planck-Institut für Meteorologie

The physics

Relations: First-order closure

In general:

ζ = z/L

u�w�0 = −u2

∗0 = −KM∂u

∂zkz

u∗0∂u

∂z= ΦM (ζ)

Integrate:

ku

u∗0= ln(

z

z0)−

�(1− ΦM (ζ �))d(lnζ �)

ku

u∗0= ln(

z

z0)−ΨM (ζ)

w�θ�v0 = −u∗0θv∗0 = −KH

∂θv

∂zkz

θv∗0∂θv

∂z= ΦH(ζ)

k(θv − θv0)θv∗0

= ln(z

zT)−

�(1− ΦH(ζ �))d(lnζ �)

k(θv − θv0)θv∗0

= ln(z

zT)−ΨH(ζ)

Max-Planck-Institut für Meteorologie

The physics

Form of the functions

Businger et al. (1971) Max-Planck-Institut für Meteorologie

The physics

ζ < 0 : ΦM (ζ) = (1− 16ζ)−1/4

ζ > 0 : ΦM (ζ) = (1 + 5ζ)

ζ < 0 : ΨM (ζ) = 2ln(1 + x

2) + ln(

1 + x2

2)− 2tan−1(x) + π/2, x = (1− 16ζ)1/4

ζ > 0 : ΨM (ζ) = −5ζ

kz

u∗0∂u

∂z= ΦM (ζ)

ku

u∗0= ln(

z

z0)−ΨM (ζ)

Form of the functions

Following Garrat:

Page 31: Using the UCLA Large Eddy Simulation code Overview of UCLA ...

Max-Planck-Institut für Meteorologie

The physics

Form of the functions

Businger et al. (1971) Max-Planck-Institut für Meteorologie

The physics

ζ < 0 : ΦH(ζ) = (1− 16ζ)−1/2

ζ > 0 : ΦH(ζ) = (1 + 5ζ)

ζ < 0 : ΨH(ζ) = 2ln(1 + x

2), x = (1− 16ζ)1/2

ζ > 0 : ΨH(ζ) = −5ζ

Form of the functions

Following Garrat:

kz

θv∗0∂θv

∂z= ΦH(ζ)

k(θv − θv0)θv∗0

= ln(z

zT)−ΨH(ζ)

Max-Planck-Institut für Meteorologie

The physics

u�w�0 = −u2

∗0 = −KM∂u

∂zku

u∗0= ln(

z

z0)−ΨM (ζ)

w�θ�v0 = −u∗0θv∗0 = −KH

∂θv

∂z

Alternative: bulk transfer relations

k(θv − θv0)θv∗0

= ln(z

zT)−ΨH(ζ)

Max-Planck-Institut für Meteorologie

The physics

u�w�0 = −u2

∗0 = −KM∂u

∂zku

u∗0= ln(

z

z0)−ΨM (ζ)

CD =k2

(ln( zz0

)−ΨM (ζ))2CH =

k2

(ln( zz0

)−ΨM (ζ))(ln( zzT

)−ΨH(ζ))

w�θ�v0 = −u∗0θv∗0 = −KH

∂θv

∂z

u�w�0 = −u2

∗0 = −CDu2

Alternative: bulk transfer relations

k(θv − θv0)θv∗0

= ln(z

zT)−ΨH(ζ)

w�θ�v0 = −u∗0θv∗0 = −CH u(θv − θv0)

Page 32: Using the UCLA Large Eddy Simulation code Overview of UCLA ...

Max-Planck-Institut für Meteorologie

The physics

u�w�0 = −u2

∗0 = −KM∂u

∂zku

u∗0= ln(

z

z0)−ΨM (ζ)

CD =k2

(ln( zz0

)−ΨM (ζ))2CH =

k2

(ln( zz0

)−ΨM (ζ))(ln( zzT

)−ΨH(ζ))

w�θ�v0 = −u∗0θv∗0 = −KH

∂θv

∂z

u�w�0 = −u2

∗0 = −CDu2

Alternative: aerodynamic resistance

raM =1

CDu

u�w�0 =

−u

raM

raH =1

CH u

k(θv − θv0)θv∗0

= ln(z

zT)−ΨH(ζ)

w�θ�v0 =

θv0 − θv

raH

w�θ�v0 = −u∗0θv∗0 = −CH u(θv − θv0)

Max-Planck-Institut für Meteorologie

srfc.f90

The surface subroutine in UCLALES •  Case default:

sensible and latent heat fluxes prescribed, moment fluxes diagnosed from ku

u∗0= ln(

z

z0)−ΨM (ζ)

Max-Planck-Institut für Meteorologie

srfc.f90

The surface subroutine in UCLALES •  Case default:

sensible and latent heat fluxes prescribed, moment fluxes diagnosed from

•  Case 1: gradient in temperature and moisture prescribed, sensible and latent heat fluxes from momentum fluxes from

ku

u∗0= ln(

z

z0)−ΨM (ζ)

ku

u∗0= ln(

z

z0)−ΨM (ζ)

k(θv − θv0)θv∗0

= ln(z

zT)−ΨH(ζ)

Max-Planck-Institut für Meteorologie

srfc.f90

The surface subroutine in UCLALES •  Case default:

sensible and latent heat fluxes prescribed, moment fluxes diagnosed from

•  Case 1: gradient in temperature and moisture prescribed, sensible and latent heat fluxes from momentum fluxes from

•  Case 2: surface temperature and moisture prescribed sensible and latent heat fluxes from momentum fluxes from

ku

u∗0= ln(

z

z0)−ΨM (ζ)

ku

u∗0= ln(

z

z0)−ΨM (ζ)

ku

u∗0= ln(

z

z0)−ΨM (ζ)

k(θv − θv0)θv∗0

= ln(z

zT)−ΨH(ζ)

k(θv − θv0)θv∗0

= ln(z

zT)−ΨH(ζ)

Page 33: Using the UCLA Large Eddy Simulation code Overview of UCLA ...

Max-Planck-Institut für Meteorologie

srfc.f90

The surface subroutine in UCLALES •  Case default:

sensible and latent heat fluxes prescribed, moment fluxes diagnosed from

•  Case 1: gradient in temperature and moisture prescribed, sensible and latent heat fluxes from momentum fluxes from

•  Case 2: surface temperature and moisture prescribed sensible and latent heat fluxes from momentum fluxes from

•  Case 3: CD, CH, surface temperature and moisture prescribed sensible and latent heat fluxes from momentum fluxes from

ku

u∗0= ln(

z

z0)−ΨM (ζ)

ku

u∗0= ln(

z

z0)−ΨM (ζ)

ku

u∗0= ln(

z

z0)−ΨM (ζ)

u2∗0 = CDu2

k(θv − θv0)θv∗0

= ln(z

zT)−ΨH(ζ)

k(θv − θv0)θv∗0

= ln(z

zT)−ΨH(ζ)

u∗0θv∗0 = CH u(θv − θv0)

Max-Planck-Institut für Meteorologie

srfc.f90

The surface subroutine in UCLALES •  Case 4:

Buoyancy flux prescribed moment fluxes diagnosed from

To note: •  Need to know z0 and zT . Currently z0=zT =zrough. If zrough sets to a

value smaller or equal to zero, then true for ocean

•  Cases 2, 3 and 4 assume to be over the ocean, i.e. qo=qsat(SST) •  First point should be in the surface layer but higher than z0

ku

u∗0= ln(

z

z0)−ΨM (ζ)

z0 =0.016

gu2∗0

Max-Planck-Institut für Meteorologie

srfc.f90

Namelist options with the cases

isfctyp! dthcon! drtcon! zrough! sst!

Default" 0" Sensible  heat  flux  Wm-­‐2"

Latent  heat  flux  Wm-­‐2"

Roughness  length"

Not  needed"

Case  1" 1" Temperature  gradient  K  m-­‐1"

Moisture  gradient  kg  kg-­‐1  m-­‐1"

Roughness  length"

Not  needed"

Case  2" 2" Not  needed" Not  needed" Roughness  length"

Sea  surface  temperature"

Case  3" 3" CH" Cq" CD" Sea  surface  temperature"

Case  4" 4" Buoyancy  flux  Wm-­‐2"

Not  needed" Roughness  length"

Sea  surface  temperature"

Max-Planck-Institut für Meteorologie

Future development

Future development

At the moment, we cannot compute the fluxes interactively for land points •  Latent heat flux is the sum of evaporation and transpiration.

Evaporation and transpiration are computed according to:

•  A land surface model provides surface and vegetation resistances as well as surface temperature

ρLv

raH + rs(qsat(T0)− q)

Page 34: Using the UCLA Large Eddy Simulation code Overview of UCLA ...

Microphysics and ThermodynamicsUCLALES Tutorial

Axel Seifert

Max Planck Institute for Meteorology

November 7 - 11, 2011

Max-Planck-Institut für Meteorologie

Overview

➔ microstructure of clouds

➔ cloud processes

➔ bulk parameterization

➔ warm rain: autoconversion / accretion

➔ sedimentation

➔ more details on sedimentation and evaporation

➔ turbulence effects on warm rain

➔ ice particle fall speeds

➔ ice nucleation

➔ glacitation of clouds

➔ UCLA-LES microphysics schemes

Microstructure of liquid clouds

(from Hudson and Noble, 2009, JGR)

Drop size distributions in maritime shallow clouds

Liquid clouds are characterised by small micrometer sized droplet. Typical drops sizes range from 1-2 µm and a few tens of micrometers.

Microstructure of mixed-phase clouds

In mixed-phase clouds we find small liquid droplet coexisting with ice particles of different shapes and sizes. Here an example of measurements with a Cloud Particle Imager (CPI) by Fleishhauer et al. (2002).

Page 35: Using the UCLA Large Eddy Simulation code Overview of UCLA ...

Cloud microphysical processes

Evaporation and condensation of cloud droplets are usually parameterized by a saturation adjustment scheme.

Autoconversion is an artificial process introduced by the separation of cloud droplets and rain. Parameterization of the process is quite difficult and many different schemes are available.

Evaporation of raindrops can be very important in convective systems, since it determines the strength of the cold pool. Parameterization is not easy, since evaporation is very size dependent.

Even for the warm rain processes a lot of things are unknown or in discussion for decades, like effects of mixing / entrainment on the cloud droplet distribution, effects of turbulence on coalescence, coalescence efficiencies, collisional breakup or the details of the nucleation process. In most cloud models these problems are neglected or parameterized in a quite simple and ad-hoc way.

Cloud microphysical processesConversion processes, like snow to graupel conversion by riming, are very difficult to parameterize but very important in convective clouds.

Especially for snow and graupel the particle properties like particle density and fall speeds are important parameters. The assumption of a constant particle density is questionable.

Aggregation processes assume certain collision and sticking efficiencies, which are not well known.

Hail processes is especially complicated because of wet growth, partial melting or shedding.

The so-called ice multiplication (or Hallet-Mossop process) may be very important, but is still not well understood

Cloud microphysical processes

This is the level=5scheme in UCLA-LES

... but secondary processes, like Hallet-Mossop, are not included in the diagram.

Spectral formulation of cloud microphysics

The particle size distribution f(x), with some measure of particle size x, is explicity calculated from

with

and

Page 36: Using the UCLA Large Eddy Simulation code Overview of UCLA ...

The gravitational collision-coalescence kernel

The effects of in-cloud turbulence on the collision frequency is a current research topic. Recent results indicate that turbulence can significantly enhance the rain formation process.

collision efficiency:

Collisional breakup

coalescence

no coalescence(rebound)

collisional breakup(filament type)

DNS by University Stuttgart

Bulk microphysical schemes

Instead of f(x) only moments of the size distribution are explicitly predicted like the liquid water content:

or the number concentration of particles:

maybe even a third one, like the sixth moment (reflectivity)

Bin vs. bulk microphysics

UCLA-LES level=3 and level=5 are a two-moment schemes

UCLA-LES level=4 is a mix of one- and two-moment scheme

Note: cloud droplets are single moment in all UCLA-LES schemes, number is prescribed.

Page 37: Using the UCLA Large Eddy Simulation code Overview of UCLA ...

Kesslerʻs warm phase scheme

In 1969 Kessler published a very simple warm rain parameterization which is still used in many bulk schemes.

„As we know, water clouds sometimes persist for a long time without evidence of precipitation, but various measurements show that cloud amounts > 1 g/m3 are usually associated with production of precipitation. It seems reasonable to model nature in a system where the rate of cloud autoconversion increases with the cloud content but is zero for amounts below some threshold.“

(E. Kessler: On the Distribution and Continuity of Water Substance in Atmospheric Circulation, Meteor. Monogr. , 1969)

Assuming a Gamma distribution forcloud droplets

the following autoconversion can be derived from the spectral collection equation

with a universal function.

The universal function parameterizes the time evolution, i.e. the broadening, of the cloud droplet distribution during the rain formation process.

A two-moment warm phase scheme

Seifert and Beheng (2001), Atmos. Res.

A two-moment warm phase scheme

Seifert and Beheng (2001), Atmos. Res.

The colored lines represent solutions of the spectral collection equation for various initial conditions.

The dashed line is the fit:

This function describes the broadening of the cloud droplet size distribution by collisions between cloud droplets.

no rain no cloud

optimum atLc = 0.9 L

A comparison of warm phase autoconversion schemes

spectral KE1969 BR1974 BE1994 SB2001

spectral KE1969 BR1974 BE1994 SB2001

‣ For high LWC the differences between the schemes are usually small

‣ For low LWC the differences are larger and the effects of drop size or cloud droplet number concentration on coalescence, can be important.

Page 38: Using the UCLA Large Eddy Simulation code Overview of UCLA ...

Sedimentation as an example for bulk process schemes … use the fundamental parameterization assumption

… and specify a fall speed....

A power-law for the particle fall speed

leads to the following sedimentation velocity:

Note: This was just a one-moment scheme!

An interesting result for sedimentation:

Spectral microphysics:

One-moment scheme:

Two-moment scheme:

No gravitational sorting!

Has gravitational sorting!

Note: A linear PDE is parameterized by a nonlinear PDE!!

Page 39: Using the UCLA Large Eddy Simulation code Overview of UCLA ...

An idealized rainfall experiment

Sedimentation of a layer of raindrops as described by the spectral equation,a one-moment scheme and a two-moment scheme.

Both parameterizations have serious problems with this simple test!

Wacker and Seifert (2001), Atmos. Res.

! = !(qr) in mm-1

When you are stuck: Look at the real thing!

Especially in convective precipitation the raindrop size distribution f(D) is highly variable and not necessarily exponential. A better description is a Gamma distribution:

f(D) = N0 Dµ exp(-λD)

Zhang et al. (2001) measured µ vs. λ

Problem: µ and N0 are highly variable and have a strong impact on evaporation and sedimentation

Two-moment schemes do not necessarily solve (all) our problems! .... but we can help them out.

Another idealized rainfall experiment

Seifert (2005), JAM

Simulation using a 1D rainshaft model with a homogenous cloud as initial condition.

The shape of the raindrop size distribution can be parameterized as a function of the slope parameter

f(D) = N0 Dµ exp(-λD)

with µ = µ(λ)

YES! We can simulate the empirical relationship with a quit simple bin model.

The shape parameter of the raindrop distribution

Seifert (2008), JAS

Adding evaporation to the problem leads to more scatter in the µ-λ-relation.Using a µ-D-relation instead of µ-λ allows to distinguish large and small mean diameters

• Low µ for D ≈ 1 mm: „breakup/coalescence regime“

• Large µ for D >> 1 mm: „gravitational sorting regime“

• Large uncertainty for small mean diameters: evaporation, gravitational sorting,…

Not yet in UCLA-LES level=3 or 4, only level=5

Page 40: Using the UCLA Large Eddy Simulation code Overview of UCLA ...

The size effect of evaporation

Seifert (2008), JAS

Not yet in UCLA-LES level=3 or 4, only level=5

Using the spectral bin model, an empirical parameterization of the size effect of evaporation can be derived:

with

Results of the revised two-moment schemein a 1D rainshaft model

Seifert (2008), JAS

Comparison of the spectral bin and the two-moment bulk model for an strong rain event (rain rate R, mean diameter Dm and shape parameter µ)

Note: No overshooting or any other artifacts in rainrate

Microphysics sensitivities in UCLA-LES

Stevens and Seifert (2008), Journal of the Meteorological Society of Japan

Read the paper!

B. STEVENS and A. SEIFERTNovember 2008 151

of our subsequent analysis is based on simulations developing from the moister initial data, we have no reason to expect that they would exhibit sensi-tivities to the numerical mesh, and random seed, incommensurate to what was shown based on simu-lations developing from drier initial data.

3. A posteriori analysis (the simulations)

For the base case, simulations with KK produce precipitation less efficiently than simulations with SB microphysics. Both schemes produce a marked sensitivity of the rain rate to the number concentra-tion, although the number concentration at which this occurs varies depending on the scheme. Table 3 summarizes these findings in terms of pertinent integrals from the simulations. Those with KK have a marked transition in rain rate between what one might call clean, and very clean, maritime con-ditions!corresponding to droplet concentrations between 35 and 70 mg!1. For SB this transition occurs more gradually and is centered at more modest droplet concentrations, between 70 and 105 mg!1. Simulations with both models suggest that cloud fraction and liquid water path decrease with increasing precipitation, although again such changes appear to be more gradual in the simula-tions using SB. Finally, larger values of Rmx/R in the KK relative to the SB simulations suggests the former are more effective in reducing precipitation through evaporation.

In all cases precipitation is effective in arresting the growth of the cloud layer, as zi decreases with increasing R in most cases. While such a result was anticipated based on theoretical arguments (Stevens 2007) it complicates simple relationships between microphysical processes and macrophysi-cal outcomes. Processes which can suppress rain,

may lead to deeper clouds that then develop more rain. One way to control for this effect is to be mindful of the depth of the cloud layer (as indi-cated by zi) when comparing the simulations. So for instance, as Nc is further reduced from 70 to 35 mg!1 in the simulations with SB, precipitation does not increase markedly (it actually decreases at the surface). However, the cloud layer remains shal-lower. An analysis of the time-series of the surface rain rate (Fig. 4) supports the idea that the efficient production of rain retards the growth of the cloud layer in the early stages of the simulation, leading to a shallower cloud layer and less rain overall. We take for granted that deeper clouds!ceteris paribus!rain more readily.

Table 3. As in Table 2 but as a function of droplet numbers with both KK and SB microphysics for the control (moist) case.

Nc Microphysics C zi R Rmx NR

3570

105140

SB 13.017.420.019.8

16.817.3

6.53.9

0.130.140.170.18

2183236824772494

36.542.311.6

8.1

53.150.119.111.4

25.916.910.4

7.5

3570

105140

KK 14.720.320.520.9

30.53.11.40.4

0.110.180.180.19

2271250625272508

37.52.31.80.3

86.79.04.41.1

16.95.03.43.0

Fig. 4. Time-series showing evolution of inversion height and surface rain rate for Nc = 70 (black) and 30 (gray) mg!1.

Columns are cloud droplet number concentration, liquid water path, rain water path, cloud cover, inversion height, surface rain rate, max. rain rate and number of raindrops

Journal of the Meteorological Society of Japan Vol. 86A152

In Table 4 we present statistics for a large num-ber of additional simulations, wherein we system-atically vary components or parameters of the microphysical models used in the simulations. Our motivation in doing so, and a goal of this study, is to better understand in which way and to what de-gree the overall bulk statistics of a simulation are sensitive to the various components or parameters, and whether or not such sensitivities are consistent with an a priori analysis of the schemes. The main points in the table can be summarized as follows:

1. Pronounced sensitivities to the formulation of the terminal velocity (as controlled by the choice of in the formulation of sedimenta-tion, simulations S01-S05, see also Fig. 5) become evident as approaches zero, but differences among simulations with given by Eq. 6 or set to some constant value signifi-cantly greater than zero, are relatively mod-est. Narrower distributions (larger values of

) tend to produce more rain at the surface. 2. SB auto-conversion produces rain more ef-

ficiently than KK (compare S01, S03, S09 and S10). To the extent auto-conversion is the only processes limiting the surface rain rate Table 3 suggests that Nc must be reduced from 70 to 35 mg!1 before KK produces rain as efficiently as SB.

3. Maximum rain-rates vary more gradually with Nc for SB, than they do for KK. This is evident in relationship between Rmx and Nc in Table 3), particularly at high number concentrations.

4. The inclusion of self-collection in SB plays an important role in reducing the number of rain drops, so that in the absence of other effects self-collection leads to larger rain drops which are less susceptible to evaporation (compare the difference between Rmx and R, which we attribute to evaporation, in S06 and S01). The results suggest that aside from differences in

Fig. 5. Profile of cloud water, rain rate and cloud-core fraction for simulations as a function of the representation of the ter-minal velocity of microphysical moments: parameterized (solid) = 0 (dotted), = 5 (short dash), = 10 (long dash), KK (dash-dot).

Table 4. Tabulation following Table 2, with simulations named for purposes of referencing within the text. The parenthetical triplets associated with the microphysical description refer to the processes of auto-conversion, accretion, and sedimentation. Hence (SB,KK,SB) as appears in the comment for 09 indicates an SB treatment of auto-conversion and sedimentation, but a KK treatment of accretion. Unless otherwise indicated the SB repre-sentation of accretion incorporates self-collection, but not break-up.

Name Microphysics C zi R Rmx NR

S01S02S03S04S05S06S07S08S09S10S11S12

SBSB- = 0SB- = 5SB- = 10(SB, SB, KK)SB (no SC)(SB, KK, SB)KK(SB, KK, KK)(KK, SB, SB)S03 with BreakupS11 with Ventilation

17.416.618.918.316.822.820.420.322.418.916.214.7

17.36.8

19.422.720.838.120.33.1

55.61.6

19.615.6

0.140.160.150.150.130.170.150.180.160.180.130.11

236823572368240124312452227325062348250523352336

42.318.031.042.440.327.642.92.3

18.12.7

36.523.0

50.124.953.660.256.485.999.39.0

95.57.0

53.062.9

16.914.918.416.716.864.057.05.0

58.33.9

16.721.6

Turbulence effect on warm rain

Seifert, Nuijens and Stevens (2010), QJ

Again, read the paper!

Turbulence can enhance the collision frequency of droplet. This can be included in the SB warm rain scheme and is included in UCLA-LES.

Turbulence Effects on Warm-Rain Autoconversion 1759

(a) (b)

Figure 4. Accumulated surface precipitation as a function of the assumed aerosol concentration Na and the assumed in-cloud turbulent dissipation rate!. (Other parameters are "0 = 1.5 K km!1, w0 = 2 m s!1, #w = 40 min.) This figure is available in colour online at wileyonlinelibrary.com/journal/qj

frequency, respectively. From e and $, the local (turbulent)energy dissipation rate, !, can be calculated through Eq. (14)where ‘local’ in this case refers to scales on the size of agrid box. At each time step within the LES, the dissipationrate ! as well as the Taylor-microscale Reynolds numberRe%, estimated from Eq. (15), are used to calculate themicrophysical parameters kcc and krr.

Local dissipation rates in LES of shallow cumulus seemto be generally around 10–100 cm2s!3 in clear air andincipient or decaying cloud elements, but can reach valuesup to a few thousand cm2s!3 within the top of developing,vigorous clouds (not shown here). It is difficult to sayhow seriously one should take such values. LES is designedto reproduce the structure of the large eddies, and valueslike the local dissipation are likely not represented withquantitative fidelity, both because of the uncertain artof sub-grid modelling, and because numerical errors aremost evident at the grid scale, which then influence theproduction and dissipation of sub-grid turbulence kineticenergy (Ghosal, 1996). Nonetheless we expect that LES canprovide at least a rough estimate, and a reasonable spatialdistribution, of the mean dissipation rate across the cloud.For this reason, and because LES allows feedbacks fromcloud-scale circulations, we believe it makes sense to explorethe effect of turbulence enhancements of coalescence withinthe LES framework.

Assuming that the effect of turbulence on coalescenceprocesses saturates at high energy dissipation rates, andbased on observations where maximum in-cloud dissipationrates are on the order of about 100 cm2s!3 (Siebert, et al.,2006b) (though the observed cumuli in these cases weregenerally less vigorous than the cumuli simulated here), weset an upper limit of ! to 600 cm2s!3 when calculating kcc andkrr. Hence, if anything our estimates of turbulence effectsare likely to be somewhat conservative, in part to guardagainst undue influences of errors in the representation ofsubgrid-scale processes by the model, and in part to avoidundue extrapolation of the turbulence enhancement factorsprovided by Wang et al. (2008).

The initial data for the simulations are based on a moisterversion of the standard precipitating shallow cumulus

case that was constructed by the GCSS" boundary-layerworking group, based on the RICO† field study (Rauber,et al., 2007). This modified moister version was first usedby Stevens and Seifert (2008), to which we refer for adetailed set-up of the case. All simulations use a domainof 19.2 km#19.2 km#5 km, with a grid spacing of 100 min the horizontal and 40 m in the vertical, unless otherwisenoted. The model time step is variable, with a maximumCourant number of 0.5. Because we are using a newversion of the UCLA LES, the reference case with dropconcentrations of 70 cm!3 was first compared to the earlierversion of the model (Stevens and Seifert, 2008). Althoughthe baseline simulations show small quantitative differencesfrom what was reported by Stevens and Seifert (2008),the general behaviour is similar, and well within the rangeone would expect based on small changes to the numerics.The simulations we analyze for this study are thus basedon the new model version with turbulence-enhanced (T)and non-turbulence enhanced (NT) coalescence at cloudnumber mixing ratios of Nc = 70, 140 or 300 cm!3, with afocus on the high concentrations, so as to explore the roleof turbulence in situations where rain production mightotherwise not be favoured.

Does including turbulence effects matter? In terms ofimpact on domain-averaged precipitation in LESs, ourresults suggest they do. The CCN cases shift from producingvery little surface precipitation in the 140 cm!3 case (hardlyvisible in Figure 5), to quite moderate and at times intenserainfall comparable to or even stronger than the rainfallproduced in the 70 cm!3 non-turbulent case. The practicallynon-raining case with 300 cm!3 case shifts to a lightly rainingcase (Figure 5).

Except for the 70 cm!3 case, rain amounts at higherdrop concentrations appear too small to significantly affectcloud and boundary-layer characteristics (Table II) in termsof the time-averaged fraction of cloudy columns, denotedby C, or the inversion height zi (estimated as the heightof the maximum &v gradient). The differences amongall simulations are consistent with the finding that more

"GEWEX (Global Energy and Water Experiment) Cloud System Studies.†Rain In Cumulus over the Ocean.

Copyright c$ 2010 Royal Meteorological Society Q. J. R. Meteorol. Soc. 136: 1753–1762 (2010)

1760 A. Seifert et al.

Figure 5. Time series of the number of cloudy columns (cloud cover) C, liquid (cloud + rain) water path L, rain water path R, and surface rain-rateRsfc for simulations with cloud droplet number concentrations Nc of 140 cm!3 (grey) and 300 cm!3 (black), with (solid line) and without (dashed line)turbulence-enhanced coalescence.

Table II. Sensitivity to turbulence-enhanced coalescence (T), versus no turbulence enhancement (NT), for cloud dropletnumber concentrations Nc = 70, 140 and 300 mg!1. NT-140-hr and T-140-hr represent simulations with doubled

horizontal resolution (grid spacing of 50 m).

Run L (gm!2) R (gm!2) zi (m) C Rsfc (W m!2) Rmax (W m!2) Nr (dm!3)

NT-70 18.6 7.0 2418 0.17 8.6 16.6 19.7T-70 19.3 22.2 2358 0.15 43.3 51.6 26.6NT-140 18.9 0.8 2449 0.17 0.8 2.0 8.7T-140 19.7 8.3 2422 0.17 13.2 18.8 14.9NT-140-hr 21.1 1.0 2422 0.21 1.1 2.6 8.9T-140-hr 21.9 3.9 2399 0.21 4.9 9.9 10.9NT-300 20.2 0.0 2442 0.17 0.0 0.0 4.7T-300 18.3 0.4 2438 0.16 0.4 0.9 6.4

Variables are cloud (liquid) water path L, rain water path R, inversion height zi, fraction of cloudy columns C,rain-drop number concentrations averaged over raining regions Nr, surface rain rate Rsfc, and the maximumrain-rate Rmax within the (domain-averaged) profile of rain-rate.All variables are averaged over the last four hours of each simulation.A rain rate of 29 W m!2 corresponds to 1 mm day!1.

precipitation over a long time period leads to a shallowerboundary layer (Stevens and Seifert, 2008). However, interms of different rain measures, such as time-averagedrain water paths R, the maximum value of rain ratewithin the time-averaged vertical profile of rain Rmax, orthe conditionally averaged raindrop number concentrationNr over grid cells where rr > 1 mg kg!1, the impact ofturbulence is clearly evident.

One of the reasons that turbulence-enhanced coalescencehas such a noticeable effect may be the collocation of regionsthat generally experience the highest energy dissipation rates(cloud core and cloud-top of actively developing clouds)with those regions where the biggest raindrops naturallydevelop first, i.e. in regions with the highest liquid water atcloud-top, where increased coalescence would thus be mostbeneficial. This is evident in Figure 6 where the cross-sectionof a typical cumulus cloud is taken from a simulation.The figure also emphasizes how poorly the LES resolves theinternal microstructure of such shallow clouds, emphasizingthat the detailed interaction of turbulence and microphysicslikely requires a ten-fold, or perhaps hundred-fold, increase

in resolution before the fine-scale structure of such shallowclouds, and the local character of turbulence dissipation, isadequately resolved.

Thus it is not surprising that, as discussed in Stevensand Seifert (2008), a sensitivity to resolution remains, withsomewhat less precipitation at a finer (50 m) resolution (theT-140-hr run). At higher resolution the clouds tend to bemore dilute (with less cloud-core liquid water), whereas lessnumerical diffusion leads to more cloud-top cloud amount,and a somewhat lower and sharper inversion. Despite thissensitivity, the general response of the simulation to theincorporation of turbulence effects on droplet coalescencerates remains. Even so, based on Figure 6 the possibilityremains that the general response changes once LES beginsto resolve the fine-scale internal structure of evolving clouds.As LES is designed to well reproduce large cloud-scaleeddies (and even with the best subgrid model it can onlycrudely represent the structure of subgrid-scale processessuch as turbulence dissipation), one should thus take theLES results as suggestive rather than definitive. In otherwords, our results advance, rather than settle, the argument

Copyright c" 2010 Royal Meteorological Society Q. J. R. Meteorol. Soc. 136: 1753–1762 (2010)

rainshaft model UCLA-LES RICO simulations

Page 41: Using the UCLA Large Eddy Simulation code Overview of UCLA ...

Ice particle fall speeds

è For the parameterization of sedimentation and growth rates the terminal fall velocity of the particles is of greatest importance

è Often used for ,tuning‘, because actual particles habits for a case are usually not

known and can hardly be predicted.

small ice crystals precipitation-sized crystals

Ice nucleationèHomogeneous nucleation from vapor: Does not occur in the atmosphere!

èHomogeneous freezing of cloud droplets: at about -37 C, can occur in stron deep convective updrafts

èHomogeneous freezing of liquid aerosols: colder than -37, but below RH=100 %, may be the main mechanism for cirrus formation. Does still need high ice supersaturation of 140-170 %.

èHeterogeneous freezing: needs ice nuclei (IN), for each specific IN strongly temperature and RH dependent. Usually we don‘t know the IN distribution and have to make ad-hoc choices, e.g., climatology.

èDifferent modes of heterogeneous nucleation: immersion freezing, deposition nucleation, contact nucleation, etc.

èThe importance of different substances, e.g., soot, dust, or organics is still under debate. Aerosol age, and aerosol processing does play a role (also for CCN).

My personal advice: Stay away from ice clouds, if you can!

If you can not for some reason, then make at least sure that your results are not overly dependent on your IN choices, and get some f****** observations.

Glaciation of clouds

èmore IN lead to a more efficient glaciation

èless CCN lead to a more efficient glaciation, because large drizzle drops or rain have a higher freezing probability

èTherefore your choices of CCN and IN matter for the cloud dynamics

4 Seifert et al.: Aerosol-cloud-precipitation effects over Germany

a) high CCN, low IN b) low CCN, low IN

c) high CCN, high IN c) low CCN, high IN

Fig. 3. Probability density function of ice fraction in % as a function of temperature. Shown are the 4 experiments with high CCN, low INassumptions (a), low CCN, low IN (b), high CCN, high IN (c) and low CCN, high IN (d).

Teller, A. and Levin, Z.: The effects of aerosols on precipitationand dimensions of subtropical clouds: a sensitivity study using anumerical cloud model, Atmos. Chem. Phys., 6, 67–80, 2006.

4 Seifert et al.: Aerosol-cloud-precipitation effects over Germany

a) high CCN, low IN b) low CCN, low IN

c) high CCN, high IN c) low CCN, high IN

Fig. 3. Probability density function of ice fraction in % as a function of temperature. Shown are the 4 experiments with high CCN, low INassumptions (a), low CCN, low IN (b), high CCN, high IN (c) and low CCN, high IN (d).

Teller, A. and Levin, Z.: The effects of aerosols on precipitationand dimensions of subtropical clouds: a sensitivity study using anumerical cloud model, Atmos. Chem. Phys., 6, 67–80, 2006.

4 Seifert et al.: Aerosol-cloud-precipitation effects over Germany

a) high CCN, low IN b) low CCN, low IN

c) high CCN, high IN c) low CCN, high IN

Fig. 3. Probability density function of ice fraction in % as a function of temperature. Shown are the 4 experiments with high CCN, low INassumptions (a), low CCN, low IN (b), high CCN, high IN (c) and low CCN, high IN (d).

Teller, A. and Levin, Z.: The effects of aerosols on precipitationand dimensions of subtropical clouds: a sensitivity study using anumerical cloud model, Atmos. Chem. Phys., 6, 67–80, 2006.

4 Seifert et al.: Aerosol-cloud-precipitation effects over Germany

a) high CCN, low IN b) low CCN, low IN

c) high CCN, high IN c) low CCN, high IN

Fig. 3. Probability density function of ice fraction in % as a function of temperature. Shown are the 4 experiments with high CCN, low INassumptions (a), low CCN, low IN (b), high CCN, high IN (c) and low CCN, high IN (d).

Teller, A. and Levin, Z.: The effects of aerosols on precipitationand dimensions of subtropical clouds: a sensitivity study using anumerical cloud model, Atmos. Chem. Phys., 6, 67–80, 2006.

PDF of IWC/TWC as a function of temperature

Seifert et al. (2011), ACPD

UCLA-LES microphysics schemeslevel=2: Pure condensation

level=3: Bjorn‘s warm rain scheme based on SB 2001 • two-moment rain as described in Stevens and Seifert (2008).• Code is short and easy to understand.

level=4: Thijs‘ mixed-phase scheme• one-moment snow and graupel, two-moment rain and ice,• works fine for bubble convection, but not yet tuned for other cases.• Code is well organized, but not documented

level=5: Axel‘s two-moment mixed-phase scheme with hail, • everything two-moment, well tested on 1-3 km grids, i.e. COSMO model, • but not much experience with LES cases.• Scheme is very modular, many choices, more extensions, i.e. process

parameterizations, are available, e.g. more ice nucleation or CCN activation schemes.

• Code got quite messy recently and may be a bit confusing, but the structure is still okay. Several published papers that describe the schemes.

Page 42: Using the UCLA Large Eddy Simulation code Overview of UCLA ...

RadiationUCLALES Tutorial

Bjorn Stevens

Max Planck Institute for Meteorology

November 7 - 11, 2011

Max-Planck-Institut für Meteorologie

ExcercisesUCLALES Tutorial

Bjorn Stevens

Max Planck Institute for Meteorology

November 7 - 11, 2011

Max-Planck-Institut für Meteorologie

The Dry Convective Boundary Layer

� Run the code with uclales/misc/initfiles/namelist drycbl

� Process the statistics with reduceps and reducets

� Stitch the crosssections together with cdo gather

� Plot with ncview, ncl, the scripts in uclales/misc/analysis, oryour program of choice

Exercises

Exercises Bjorn Stevens 108 / 117

Questions I

� What are the profiles of the 3 velocity components? Do youunderstand that?

� There are 3 different ways of defining the boundary layer height zi:I The maximum gradient in θlI The maximum variance in θlI The minimum buoyancy flux

� What are the differences?

� The encroachment rate is equal to:

zenc(t) =

√2Ft

Γ

with F the surface heat flux and Γ the temperature lapse rate. Howdoes zi compare with zenc? What is the difference?

Exercises

Exercises Bjorn Stevens 109 / 117

Page 43: Using the UCLA Large Eddy Simulation code Overview of UCLA ...

Questions II

� Look at the variances: u2, w2, t2. What do they look like? Whatis/is not with what you expect from Boundary Layer theory?

� Look at the vertical flux profiles, and in particular tot tw and sfs tw.

� Finally, compare the advective tendency (adv u) with thediffusion(dff u). What do you notice? Would you say that the LESis well resolved? Where / why (not)?

Exercises

Exercises Bjorn Stevens 110 / 117

Questions III

� Optional, to be done after the Statistics class: It would be veryuseful to have conditional sampling of the thermal updrafts.Unfortunately, they are not in the .ps file at the moment. As a(lengthier) exercise, we are going to do that here.

� Open the files ncio.f90 and stat.f90. First, have a look atstat.f90

� The name of a ps variable is defined in s2 from line 52 on. Thisincludes the cs2 variables for buoyant cloud conditional sampling.Append cs3 variables for (at least) w and tv at the end of the array.Raise nvar2 at l.33 accordingly.

� Make sure you know the number of your new variables.

Exercises

Exercises Bjorn Stevens 111 / 117

Questions IV

� The conditional sampling for cloud water is done in subroutineaccum lvl2 between lines 604 and 658. Look at those in depth.

� The function get avg creates an average over the 2 horizontaldirection out of a 3D array.

� The function get csum creates a conditional sum over an array, onplaces where the final array is 1

� Use these lines for a conditional sampling of dry thermals. Put it insubroutine accum lvl1

� In ncio.f90 the variable output names, longnames and units areprovided. Use the code from line 989 on as an example to add yourvariables.

Exercises

Exercises Bjorn Stevens 112 / 117

Questions V

� That should be all: Try and compile. Now it gets time to debug.

Exercises

Exercises Bjorn Stevens 113 / 117

Page 44: Using the UCLA Large Eddy Simulation code Overview of UCLA ...

BOMEX Shallow Cumulus

� Check articles/siebesma2003.pdf for the initial settings ofBOMEX

� Build a NAMELIST based on it. Hint: the RICO Namelist should be agood starting point

� Run the run, postprocess like the Dry CBL run

� If successful, commit your NAMELIST to git

� Rerun your run with a different name, but with level=3 formicrophysics in the NAMELIST

Exercises

Exercises Thijs Heus 114 / 117

Questions I

� Plot the cloud fraction and the cloud cover. What is the differencebetween the two?

� What are cloud base and cloud top? There are several cloudbases/tops in the .ts file. What is the difference between them?What can we (implicitly) learn about these clouds based upon thesenumbers?

� One classical way of parametrizing (shallow) cumuli in large scalemodels, is to model the transport through the cloud layer with a massflux approach. If necessary, read up on it in siebesma1995.pdf.They found that entrainment and detrainment rates in the large scalemodels were off by an order of magnitude.

Exercises

Exercises Thijs Heus 115 / 117

Questions II

� Try and reproduce figures 6 and on from that study using the outputof the .ps file. cs1 is the conditional sampling over the cloud. cs2is the conditional sampling for the buoyant part of the cloud.

� BOMEX was an intercomparison case of non-precipitating cumulusclouds. Is the non-precipitating really true, or just because of a lackof microphysical models a decade ago?

� If precipitation is present, does it matter?

Exercises

Exercises Thijs Heus 116 / 117

DYCOMS RF02 Stratocumulus

� The Dycoms Stratocumulus case is described in ackerman2009.pdf

� Done with 70cm−3 CCN and prescribed radiation.

� Is the cloud layer sensitive to these kind of choices?

� The autoconversion rate can be switched to theKhairoutdinov/Kogan scheme (optimized for Stratocumulus) orSeifert Beheng (more general). Any difference?

� Compare with the results from the paper

Exercises

Exercises Thijs Heus 117 / 117