Recent Changes - Search:

UM User Group

PmWiki

pmwiki.org

edit SideBar

Sst Forcing

An SST forcing experiment is where an AGCM is forced using a prescribed Sea Surface Temperature pattern. The idea behind this is normally to try and work out what influence a given pattern of SST has on the atmosphere. This page described how I setup and ran such an experiment on the UM (infact job xbaqa on the Reading UMUI).

Generating an SST pattern

Firstly, I we need an SST pattern. Often this pattern will be constructed from a climatological SST pattern plus (or minus) an SST anomaly pattern.

This is how I created an SST pattern for the experiment xbaqa

 
               Regression Pattern
                        |
                        v
            Select regions to create mask
                        |
                        v
                 edit mask details                  Regression Pattern
                        |                                   |
                        v                                   v
                   Final Mask ------->      apply mask to Regression pattern
                                                            |
                                                            v
                                                      scale pattern 
                                                            |
                                                            v
                                                    add to climatology <------ SST climatology
                                                            |
                                                            v
                                                     Final SST Pattern


This looks more complicated than it really is. Essentially, I used part of a regression pattern, scaled that by a certain amount, and then added the resulting scaled pattern to a SST climatology pattern.
There are probably easier ways to do this, but this is how I did it.

I’ll go through each step in turn.

Regression Pattern

We need some SST pattern to start with, this could be anything; an idealised SST pattern, an EOF pattern etc. In this case I chose a pattern formed by regressing observed SST onto a low frequency index of North Atlantic SST. I scaled the index so that it had a standard deviation of 1.

The first way I used this regression pattern is to work out which areas I wanted to keep and which areas to mask out. In this case I wanted to just keep the North Atlantic region and to mask out all the land and other parts of the ocean.

Select regions to create mask

I used an idl program called makemask3.pro Δ to select regions of interest from the regression pattern and output that region as a mask of 0′s and 1′s. makemask3.pro Δ lives here: makemask3.pro Δ and is attached below. It makes use of a Regions Of Interest routine from Dave Fanning’s IDL site. It has to be said that is makemask3.pro Δ not hugely use-friendly. But, if you examine the comments, you should be able to get it to work. Here’s an example:

makemask3,'Reg_pattern.nc','regcof','Lons','Lats',0,'Atl_only_Mask.nc',
2.00000e+20,3,0,100,'mask_regions1.sav',-1

In makemask3 Δ you can select a number of regions using the tool. You can save these regions, using the Save As Option on the File menu. This explains the ‘mask_regions1.sav’ in the example above. This is a set of regions defined previously and which I wanted to use in this session. This is because, inevitably, the regions you select aren’t quite what you wanted - so you’ll probably have to go back and edit them. This feature allows you to do this (in a round about way!).

Once you’re happy with you regions, click on quit. makemask3 will convert these regions to a mask, and then show you that mask. If you’re happy with this mask then hit Y and the mask will be saved to disk (with eg the filename Atl_only_Mask.nc). Otherwise, hit M and you can go back
and modify this mask before finally saving it to disk.

Edit Mask Details

My next step was to smooth the edges of the mask in Atl_only_Mask.nc so
that the gradients at the edges of the SST anomalies would not be too large and also to fine-tune the mask. I did this using an IDL routine called editmask , it lives here editmask.pro Δ and is attached below. I use it in the following way:

  
editmask,'Atl_only_Mask.nc','Mask','Lons','Lats','Atl_only_Mask_edit.nc'

Where Atl_only_Mask.nc is the rough mask from the previous section and Atl_only_Mask_edit.nc is the output file.

Again, editmask is not all that user-friendly, but it gets the job done.
editmask will bring up a window with you current mask, then you can set points to 1 on the mask by clicking with the left mouse button. If you click the middle button you will set the point to zero. Click the left mouse button whilst the cursor is over in the right hand box ( ‘Save and Exit’ ) - and you will save the mask and exit.

The upper box containing ‘1.00000′ allows you to change the value of the set point from 1 to some other value. If you click in the box then a prompt will appear in the console window asking for a new value for the set point. Type in a new value between 0 and 1 and hit enter. Now all points set by clicking the left mouse button will now be set to the new value.

Smoothing the Edges

The reason this is useful is that it allows us to smooth the edges of the mask. I have some automatic routines to do this (see below), but they have some limitations (essentially they can only deal with simple situations).

So, to do this by hand, I changed the set point to some value between 0 and 1 and then changed the mask points at the edge of the mask to this new value. I did this only on mask points that will border onto other ocean points, not those that border onto land points.

So what values to choose for the smoothing? You can use a simple linear smoothing, (ie 1,0.66666,0.33333,0), but I have been using a Cos^2 smoothing because this ensures that both the anomaly field and the gradient of the anomaly field go to zero at the edge of the mask. This could be important as some atmospheric processes are rather sensitive to SST gradients.

Here’s a list of smoothing values for a number of smoothing points:

number of pointsvalues
41, 0.75, 0.25, 0
51, 0.853553, 0.5, 0.146477, 0
61, 0.904509, 0.654509, 0.345491, 0.0954915, 0
71, 0.933013, 0.75, 0.5, 0.25, 0.0669873, 0

Other ways to Slice and Smooth

I have a number of other tools to create SST patterns.

  • mask_out_region2.pro Δ (attached below) allows you to mask in (or out) a region defined by a longitude latitude box.
  • smooth_mask2.pro Δ (attached below) will smooth an irregular mask (of 0s and 1s) perpendicular/normal to the boundaries with a cos^2 profile as discussed above.
  • smooth_NS.pro Δ (attached below) takes a mask of 0s and 1s and smooths (using a cos^2 profile) to create a latitude band. eg:
 
smooth_NS,'/home/dan/data/MASKS/Atlantic_mask_ocean_grid2.nc','test.nc','Mask',
'longitude','latitude',5,[59.375,-35.6250],[10,-10],'smoothed mask field. Created by
/home/dan/WORK/Experiments/RegionalCoupling/SST_Pattern/SEASONAL/smooth_NS.idl'

NB For all these programs you will also need wr_2dfield.pro Δ (attached below).

The comments contained within these programs should go some way to explaining how they work. If all else fails email me on d.l.r.hodson@reading.ac.uk

Adding the Anomaly to the Climatology

Finally, to produce the SST pattern I added the SST anomaly to an SST climatology for the model. I use a program called mkssts2.pro Δ to do this. This lives here mkssts2.pro Δ and is attached below. It reads in an SST Anomaly and an SST climatology, multiplies the SST Anomaly by a user-defined factor, adds the result to the SST climatology and outputs this to a file.

For the SST climatology I used the model climatology that is packaged with the UM called qrclim. To the best of my knowledge this is an observational climatology base on the years 1961–1990. (according to Clive Jones at the metoffice).
There’s a copy at Reading here:

/home/dan/WORK/Experiments/NAforcing/Forcing/SST-Climatology/qrclim.nc

Otherwise, you can find it on wren.cfs.ac.uk in /ohome/lrum/vn4.5/ancil/atmos/cl_9673/qrclim.sst

You’ll need to convert this to a netCDF file using xconv before you can use mkssts2.pro Δ

The final thing I need to do was to convert this netCDF file to something that the UM could understand.

Creating an Ancillary File

The last step was to convert the netCDF SST file into an ancillary file that the UM can read in.
The best way to do this is using Jeff’s Xancil program. This lives on HPCX and the unix system in Reading.
This will allow you to create the SST ancil file we require.

Building an Experiment

As always, the best way to create you experiment is probably to copy an experimental job from someone else. You could try my xbcpa experiment if you’ve got access to the UMUI at Reading. Otherwise try the basis file Δ I’ve attached below (You’ll need to gunzip and tar -xf it first). You might like to read Uploading UMUI Basis Files to find out how to use this.

Finally, I told the UMUI job where the SST forcing ancil file lived. In the UMUI, open your job and select Atmosphere-Ancillary and input data files-Climatologies and Potential climatologies-Sea Surface Temperatures-_. Then enter the _full path and file name into the boxes Directory name of Environment variable and file name . Click on close and then save the job.

Running the Experiment

You might like to read Basic Experiment to get some idea how to do this.

Control Run

Usually we run a control run too - an experiment forced with only a climatological SST pattern. In the past I’ve used a control run (xazlc) by Warwick Norton as my control. This job used the climatological SST file mentioned above (qrclim.sst) as the forcing.
You can find some of the fields for this control run here: /home/dan/data/UM_DATA/XAZL/ at Reading. Or email me at d.l.r.hodson@reading.ac.uk
to ask about this!

The results

Extracting the data

Now we’re on HPCX - you should probably read you’d better read this

 there used to be a script to extract fields - but not at the moment..

Analysing the results

The basic idea behind these experiments was to run the AGCM for a number of years -with identical SST forcing each year. Effectively, therefore, each year is statistically independent in that each starts with a different set of initial atmospheric conditions. Consequently we will consider them to be different members of an ensemble with the same forcing, but different initial conditions.
With this in mind I’ve written a few programs that can help analyse this data.

  • makeseasons will convert the individual months into seasonal means (djf,mam etc)
  • make_ens_mean will average all the years together to produce an ensemble mean. It will also produce an estimate of the internal variability that is the standard deviation of the departures from the ensemble mean. This is useful because it allows us to attempt significance testing when comparing the SST+anomaly expt with the SST-anomaly experiment.

In fact, I used two versions of makeseasons, makeseasons.pro Δ and makeseasons4d.pro Δ , the first for 3d fields, the last for 4d fields.
Both are attached below. You’ll also need wr_3dfield.pro Δ and wr_4dfield.pro Δ to run these, also attached below.

Also, I used make_ens_mean2.pro Δ and
make_ens_mean4d2.pro Δ to create the ensemble means, these are also attached below.

Automation

Rather than running these programs for each field in each experiment, I set up a script to do this semi-automatically: make_ensembles Δ (attached below). It creates ensemble mean seasonal means of each field using the above programs. It also does some file splitting to get around memory problems when processing very large 4d fields. It’s not all that transparent what it does, but it may be useful.

Plotting the difference

The main point of the experiments was to examine the differences between applying a positive and a negative anomaly. I used a ferret script called T2plot.jnl Δ to do this (attached below).
This script plots the difference between the + and - experiment with a measure of significance.
This requires some user input in the form of the significance - the t-value - I was unable to work out the best way to calculate this in ferret. This can be found for a given p and number of degrees of freedom from this page (which originally comes from here).

For example:

 
cancel/all data
use "/home/dan/data/UM_DATA/XBCP/xbcpb/surface_temp/ens_mean_seasonal_mean/
surface_temp_xbcpb_ENSmean9_son.nc"
use "/home/dan/data/UM_DATA/XBCP/xbcpb/surface_temp/ens_mean_seasonal_mean/
VARsurface_temp_xbcpb_ENSmean9_son.nc"
use "/home/dan/data/UM_DATA/XAZL/xazlc/surface_temp/ens_mean_seasonal_mean/
surface_temp_xazlc_ENSmean9_son.nc"
use "/home/dan/data/UM_DATA/XAZL/xazlc/surface_temp/ens_mean_seasonal_mean/
VARsurface_temp_xazlc_ENSmean9_son.nc"
go T2plot  1,3,temp,6,2.120,1,1,9,9

Here the arguments show the data fields 1 and 3 contain my two data fields (and the script assumes 2 and 4 contain the associated inter-ensemble variance files). temp is the variable name for the data fields. 2.120 is the t_value for 9+9–2 degrees of freedom and p0.05. 9,9 are the number of ensemble members that went to make data fields 1 and 3 respectively. 6= is a flag which modifies the details of the final plot - such as contour interval, shade range - this is not ideal, but you should be able to see how the script works and probably improve on it.

There is also a T24dplot2.jnl Δ (attached below) which will cope with ensemble means made from 4d fields. This works in much the same way.

That’s about it. Direct queries and bug reports to d.l.r.hodson@reading.ac.uk. Good Luck!

Dan Hodson? - 30 Sep 2004


FilenameDescriptionAfter downloading:
T24dplot2.txt Δ{Ferret} script for plotting differences betwen ensemble means (4d)change .txt to .jnl
T2plot.txt Δ{Ferret} script for plotting differences betwen ensemble meanschange .txt to .jnl
editmask.txt ΔIDL routine for editing a SST maskchange .txt to .pro
make_ens_mean2.txt ΔIDL routine for creating an ensemble mean from an N year runchange .txt to .pro
make_ens_mean4d2.txt ΔIDL routine for creating an ensemble mean from an N year run (4d fields)change .txt to .pro
make_ensembles ΔKSH script to automate ensemble creation 
makemask3.txt ΔIDL routine to create an SST maskchange .txt to .pro
makeseasons.txt ΔIDL routine to create seasonal meanschange .txt to .pro
makeseasons4d.txt ΔIDL routine to create seasonal means (4d fields)change .txt to .pro
mask_out_region2.txt ΔIDL routine to mask out regionschange .txt to .pro
mkssts2.txt ΔIDL routine to create climatolgy±anomaly fileschange .txt to .pro
smooth_NS.txt ΔIDL routine to smooth mask edges (N and S)change .txt to .pro
smooth_mask2.txt ΔIDL routine to smooth mask edgeschange .txt to .pro
wr_2dfield.txt ΔIDL routine to write 2d netCDF fileschange .txt to .pro
wr_3dfield.txt ΔIDL routine to write 3d netCDF fileschange .txt to .pro
wr_4dfield.txt ΔIDL routine to write 4d netCDF fileschange .txt to .pro
xbcp.gz ΔExample Um Ui Basis File 
Add Comment 
Sign as Author 
Enter code 876

Edit - History - Print - Recent Changes - Search
Page last modified on February 06, 2007, at 06:08 PM