wiki:access/GeneratingAMIPSSTs

Creating AMIP SST ancillary files

The UM ancillary file program can generate ice and SST ancillary files as described in UMDP 73. Normally it uses the climatological files qrclim.sst and qrclim.ice (e.g. raijin:~access/data/master/sst/hadisst_6190/v1/qrclim.sst). However there is also an undocumented option which allows generating "long" climatologies from user specified input files. This can be used to generate ancillary files from the AMIP data.

The procedure described here runs on raijin.

AMIP boundary conditions are different to conventional monthly mean data, because they are processed to ensure that the monthly mean of daily interpolated values matches the original monthly mean. This procedure is described in http://www-pcmdi.llnl.gov/projects/amip/AMIP2EXPDSN/BCS/bcsintro.php. The recommendation is to interpolate the 1 degree data to the model grid and then to time process this to set up the boundary condition form. We'd already developed a tool for this last processing stage for CCAM.

Data source

1951-2012 SST and ice netcdf files from http://www-pcmdi.llnl.gov/projects/amip/AMIP2EXPDSN/BCS/amipobs_dwnld.php, combined into single files amipobs_sst_360x180_1951-2012.nc and amipobs_sic_360x180_1951-2012.nc (e.g. with ncrcat from nco).

Note that the AMIP SST interpolation scheme uses mid-month values, so running to the end of 2012 really needs a value for Jan 2013 which is not yet available. The calculation method used here extends the data with the climatological mean plus the anomaly of the last available month. This should be close, but it is not strictly correct. (Note - as at 2015-01-20, last update of PCMDI data was 2013-05-01.)

Creating master ancillary files

These files have the grid correctly specified, starting at 89.5S, 0.5E. However the Met Office 1 degree data has the grid specified as 90 to -89, 0 to 359, and the ancillary program adjusts the grid by 0.5 degrees to compensate (done whenever the input is 1 degree resolution, with no checking of the actual coordinates!!! ). The simplest way around this is to shift the coordinates of the AMIP data to match.

I shifted the coordinates of the netcdf files by overwriting the lat/lon values (e.g. ~mrd599/src/python/um_extras/grid_shift.py).

Then use ~access/bin/xancil to convert these to ancillary files ice1951-2012_pcmdi_shifted and sst1951-2012_pcmdi_shifted (see AncillaryFileGeneration#Creatingancillaryfilesfromnetcdf). These are still on the 1 degree grid. Use gregorian calendar at this stage and remove the setting for minimum allowed SST. For ice choose "Use AMIPII ancillary sea-ice format" and unselect "Calculate sea-ce fraction from SST". Also select "Convert to sea-ice fraction from percentage" (the PCMDI sea ice data has concentration as a percentage, in range 0-100 while the UM expects it to be a fraction in range 0-1). Also choose the "Don't calculate land mask" option in both cases.

The 1951-2012 files have been copied to subdirectories of the CAP master ancillary directory, /projects/access/data/master/sst/pcmdi and /projects/access/data/master/seaice/pcmdi

Interpolating to the model grid

In climate runs the model uses coastal tiling (grid points are part land, part sea). However these points are set as land in the land mask file so the coastal points will have missing SST if the land mask is used in the interpolation. The solution is to use a zero land mask. The Met Office AMIP ancillary files also do this. The script ~access/apps/pythonlib/umfile_utils/um_zero_field.py zeros out the land mask in an ancillary file (see wiki:UMFiles)

module use ~access/modules
module load pythonlib/umfile_utils
~access/apps/pythonlib/umfile_utils/um_zero_field.py -v 30 qrparm.nomask 

Running CAP on raijin

module use ~access/modules
module load cap/7.7
export DATASETS=sstice
export SSTIOPTS="-d USER -j $ANCIL_MASTER/sst/pcmdi/sst1951-2012_pcmdi_shifted -i $ANCIL_MASTER/seaice/pcmdi/ice1951-2012_pcmdi_shifted -f -l -q -c 0.01"
$ANCIL_PARENT/bin/ancil_top -model n96 -output $WORKDIR/ancil.vn7.7/n96 -memory 2 -mask  $WORKDIR/ancil.vn7.7/n96/qrparm.nomask

This uses the normal n96 grid specification, but the non-default output location and non-default mask file. Options specified in SSTIOPTS are

  • -f Generate fractional sea-ice
  • -q Don't reset SST at ice points (caused a crash)
  • -l long climatology (output has same times as input)
  • -c 0.01 minimum ice concentration (default was 0.5)

The interpolation runs as a batch job, producing files qrclim.ice.user and qrclim.sst.user in directory $WORKDIR/ancil.vn7.7/n96. It takes only about 30 seconds CPU time.

Forming AMIP boundary conditions

The files we have now are on the correct grid but are regular monthly means rather than AMIP style boundary conditions. The program raijin:~mrd599/bin/set_amip_bc converts monthly means to BCs. However it only works with netcdf files so there's another round of conversions required.

Convert to netcdf as follows (using xconv gives an extra surface dimension in the netcdf file which causes problems)

python ~access/apps/pythonlib/umfile_utils/um2netcdf.py -i qrclim.sst -o $WORKDIR/sst_n96.nc -s 0,24
python ~access/apps/pythonlib/umfile_utils/um2netcdf.py -i qrclim.seaice -o $WORKDIR/ice_n96.nc -s 0,31

set_amip_bc requires that the output file exist, so just copy the inputs to sstbc_n96.nc and icebc_n96.nc say.

Run as

set_amip_bc -i sst_n96.nc -o sstbc_n96.nc -v ts  
set_amip_bc -i ice_n96.nc -o icebc_n96.nc -v sic --icefrac

Finally convert these back to ancillary files using xancil again. Note that the BC generation process can produce temperatures much less than freezing and ice concentrations less than zero (the interpolation to daily values within the model fixes these up). The SST limit in xancil should be set to zero rather than the default 271.4. Also disable limits when converting the ice file.

These ancillary files are using the Gregorian calendar. To use them in a 360 day calendar run it's sufficient to just change the calendar type in the header and not worry about changing any of the data itself. ~access/apps/pythonlib/umfile_utils/change_calendar.py does this.

Final files sstbc_1951_2012_n96, sicbc_1951_2012_n96

GA6.0 and ENDGAME

Generating fields on the EG grid requires CAP 8.3 which runs quite differently (see CAP_raijin). Other stages are the same.

Note that CAP 8.3 should not be used for generating files on the original new dynamics (ND) grid (there's an apparent shift of 1 grid point to the N).

Start with a EG mask file qrparm.nomask generated as before.

Comparison to Met Office ancillary files

We have the N96 files sice_amip2_7803_n96_v6.0 and sst_amip2_7803_n96_v6.0 with data from Jan 1978 to June 2003. Data in these files is longitudinally shifted after July 2002 because the PCMDI data was shifted for a while (now corrected). These files were used in our AMIP run that fortunately finished in December 2000.

From 1982-2001 the RMS differences between the new data and the Met Office version are very small, particularly away from the sea-ice edge. The differences are larger before 1982, perhaps because the earlier part of the PCMDI data was revised after the AMIP II experiments had been done.

Last modified 6 years ago Last modified on Feb 3, 2015 4:33:12 PM

Attachments (1)

Download all attachments as: .zip