SST in the initial files

The OpenIFS initial file that contains the sea-surface temperature (SST) is the ICMCL file. The SST is represented as the parameter "soil temperature layer 1" (top soil layer 1-7cm), grib parameter STL1, grib code 139 where the land-sea mask defines a sea gridpoint. STL1 also contains the representation of the sea-ice field, grib parameter CI.

Manipulating the SST for the model involves changes the STL1 field but masking should be used to maintain the values over the land points.

The land-sea mask, grib parameter LSM, grib code 172, is contained in the ICMGG*INIT file. Values of lsm >= 0.5 are treated as land points, values < 0.5 are treated as sea-points.

On this page...

 

 

Metview script: sst_modif.mv

A metview script has been provided that will allow changing the SST.

This script allows a latitude-longitude rectangular box to be used as a mask. The mask can then be used to modify the SST inside that box, by replacing it with another SST field. Examples are given below.

Before changing the SST, take a copy of a previous experiment and change the experiment id.

 

In the experiment directory, make a copy of the metview script.

In this example, we'll assume the experiment id is 'ob01', using a single date 2015110100. The initial files would have been copied from ob00 and the experiment id changed to ob01.

cd scratch/inidir/ob01/2015110100    # go to directory with the initial files for the experiment 
cp ~/mv/sst_modif.mv .               # copy the metview script

Description of sst_modif.mv

The script can be used in various ways to alter the SST field in the GRIB parameter STL1. The script takes care of the masking of the land values.

The metview command is used to process the script and will create a new version of the ICMCL initial file, as described below.

Several files are referred to in the script described below. Note that all files are expected to the GRIB format files.

STL1 land values file
#The model climate init file - used for values of STL1 over land
fInit="ICMCLob01INIT"

The first GRIB file referred to in the script is labelled 'fInit'. This is the GRIB file that the script uses for the land values (LSM >= 0.5) in the new ICMCL file. This will always be the ICMCL file for the experiment since we want the land values unchanged.

Change the file fInit to match the name of the ICMCL file for your experiment id. In this example we use the experiment id 'ob01'.

STL1 reference SST values file
#The file with the reference SST - used for values of STL1 over sea
fRef="ICMCLob01INIT"

This the file that will be used for the replacement sea-surface temperature. In most cases, it will be the same as the original ICMCL file, if we only want to modify a region of the SST. But it could be a GRIB file containing a completely different SST file that will replace the SST values in the original ICMCL file.

Change the file fRef to match the name of the ICMCL file for your experiment id.

Perturbation SST file
#The file with the pertubation SST
fPert="/perm/rd/openifs/oifs_workshop_2017/expts-inidata/erai-climate-sst/sst.ci.stl1.erai.climatology.grb"

The file fPert contains the 'perturbation' SST field. This file is only used if the mask area defined by 'box' (see below) is not 'nil'.

The file: sst.ci.stl1.erai.climatology.grb contains the SST, CI, STL1 parameters taken from the monthly mean ERA-Interim climatology. This is a 20-year climatology from 1989-2008 inclusive.

This climatology is available from the ECMWF data archive at: http://apps.ecmwf.int/mars-catalogue/?levtype=sfc&type=em&class=ei&stream=dacl&expver=1

The perturbation SST is applied according to the formula:

Result of applying perturbation SST over sea-points
  STL[result] = STL[fRef] + ( STL[fPert] - STL[fRef] ).w.box

where STL[result] is the resultant SST values, w is the weight applied to the perturbation and "box" represents the mask created in the sst_modif.mv script (see below). The values of 'box' will be 1 in the defined rectangular mask, otherwise 0.

Outside the mask defined by 'box', the value of STL[fRef] will be used.

File containing land-sea mask
#Land sea mask - taken from initial gridpoint file
fLsm="ICMGGob01INIT"

The land-sea mask, LSM, is always contained in the ICMGG*INIT file.

Change the fLsm filename to match your experiment id.

Specify the rectangular mask and weight...
#The weight
weight=1

#The mask details. Can be set to nil if not used!
# halo in lat/lon is the relaxation area

# Tropical band
box=[20,0,-20,360]  #N,W,S,E
#box=nil
halo=5

The weight can be used when applying the perturbation SST as described above.

The 'halo' value is in degrees and specifies the area outside of the box over which the weight will be linearly reduced to match the reference SST. This avoid a sharp boundary. It is not necessary to change this value.

Rectangular mask 'box' is used to define the area over which the perturbed SST field, specified in the fPert file described above, will be applied. Outside this region, the SST in the fRef file will be used.

For example, using the example box shown from 20N to 20S, 0E to 360E would mean that the SST from the fPert file would be applied, with a weight of 1, inside a band covering the tropics over all longitudes.

Date range: Other options exist in the script to make the modification apply only to certain dates, using the startDate and endDate values.

Example 1: Replacing the observed SST in the tropics with the climatology

In this example, we replace all the observed SSTs values in the tropics with the climatological SST.

To do this, set:

Replace tropical SST with climatology
fInit="ICMCLob01INIT"
fRef="ICMCLob01INIT"
fPert="/perm/rd/openifs/oifs_workshop_2017/expts-inidata/erai-climate-sst/sst.ci.stl1.erai.climatology.grb"
fLsm="ICMGGob01INIT"
weight=1
box=[20,0,-20,360]  #  N, W, S, E
halo=5

This will replace the SST values in the tropical band 20N-20S, for all longitudes, with the climatological SST from the ERA-Interim file. The change in SST will be merged to the reference value over a 'halo' of 5 degrees latitude. Note that if the weight was set to zero, this would effectively not make any change to the SST in this tropical band.

By changing the value of 'weight' the observed SST values can be changed to be a fraction

To replace the SST with climatology over a limited range of longitudes, say, just the central and east Pacific:

box=[10,-180,-10,-80]  #  N, W, S, E

Example 2: Increasing the SST anomaly in the Pacific

In this example, we increase the Pacific SST anomaly compared to the climatology by a factor of 2.

This requires changes to the script as follow:

Increase Pacific SST anomaly...
fInit="ICMCLob01INIT"
fRef="ICMCLob01INIT"
fPert="/perm/rd/openifs/oifs_workshop_2017/expts-inidata/erai-climate-sst/sst.ci.stl1.erai.climatology.grb"
fLsm="ICMGGob01INIT"
weight=-1				# !!! not 2 !!!
box=[10,-180,-10,-80]  #  N, W, S, E
halo=5

The value of -1 for weight means the modified values of SST, inside the box mask become (referring to the equation above):

STL[result] = STL[fRef] + ( STL[fPert] - STL[fRef] ).(-1)
            = STL[fRef] + ( STL[fRef] - STL[fPert] )

so that the SST anomaly with respect to the climatology is added to the existing SST field over the Pacific, effectively doubling the strength of the El Nino signal there.

More complex scenarios

If more complex scenarios are necessary than supported by the above equation, the relevant code in sst_modif.mv to change is:

      g= g*lsmGrb +                                        # STL1 values over land points; provided by fInit
         ref[idxRef]*(1-lsmGrb) +                          # STL1 values over sea points, outside AND inside box mask
         (pert[idxPert]-ref[idxRef]) * maskGrb * weight    # weighted difference added to STL1 values INSIDE box mask

 

Running the script

To run the script, type the command:

metview -b sst_modif.mv

This may generate some warning messages which can be ignored. If the script completes successfully:

....
process date=20160502
 idxRef=184 idxPert=123
process date=20160503
 idxRef=185 idxPert=124
process date=20160504
 idxRef=186 idxPert=125
metview: EXIT (OK) (line 1), exit status 0, starting 'cleanup'

Two new GRIB files will be created:

ICMCLob01INIT.modif - this is the new file with the modified SST fields.
stl1_modif_diff.grib - this is a GRIB file with the difference between the modified and original SST field. It can be used to generate plots of the SST differences using Metview.

Note that the metview command on cca only supported batch processing - no interactive display or plotting is possible. Do not set 'DoPlotDiff=1' if using this script on the HPCF (host 'cca').

Rename ICMCL files to run!

Final and important step, once the sst_modif.mv script has completed and you are satisfied with the changes in the SST field, remember to rename the files to replace the original, so that the model uses the modified file when starting:

mv ICMCLob01INIT ICMCLob01INIT.old
mv ICMCLob01INIT.modif ICMCLob01INIT

(substitute ob01 with your experiment id)