contourShift: Apply contour-shifting to bias correct

Description Usage Arguments Details Value References Examples

View source: R/biasCorrect.R

Description

Apply contour-shifting to bias correct a predicted contour using existing mappings.

Usage

1
2
3
contourShift(maps, predicted, bcYear, predStartYear, regions, level,
  datTypePred, myLandMat = landMat, myAllRegions = allRegions,
  myLand = land)

Arguments

maps

object obtained from the createMappings function (see details)

predicted

array of predicted values of dimension year x month x longitude x latitude

bcYear

year to be bias-corrected

predStartYear

year prediction array starts in

regions

region information list (see details)

level

concentration level for which to build contour

datTypePred

string indicating the format of the prediction: either "gfdl" or "simple" (see details)

myLandMat

binary matrix specifying land locations

myAllRegions

a single SpatialPolygons object given the region under consideration

myLand

SpatialPolygons corresponding to the land

Details

The object maps is obtained from running the createMapping function. It is a list of five objects where month, startYear, and endYear give the month, first year, and last year that were mapped. The variables obsList and predList are lists of arrays with one 3-dimensional array for each region. The first dimension is for the year. The other two dimensions are for the fixed points' y-coordinates, the mapped points' x-coordinates, the mapped points' y-coordinates, the length of the mapping vectors in the x-direction, the length of the vectors in the y-direction, and the angles of the mapping vectors.

A region information list is a list six objects: regions, lines, out, centRegion, centLines, and centFrom. The first three objects are ordered lists giving information about each of the regions that will be mapped outside the Central Arctic region. The variable regions gives SpatialPolygons objects for the corresponding regions and the variable lines gives the SpatialLines objects for the corresponding fixed lines. The variable out gives SpatialPolygons objects that are outside the corresponding regions, but that border the fixed lines. These are used when building new polygons to determine if points are being mapped outside the region of interest. The variable centRegions is the SpatialPolygons object corresponding to the central Arctic region, centLines is the SpatialLines object for the fixed line, and centFrom is an n x 2 matrix with each row repeatedly giving the coordinates of the center point from which mapping vectors will emanate. The package contains regionInfo in the regionInfo.rda file, which can be used unless you want to define your own regions.

The predicted data array, predicted, should be single array of dimension: years x longitude (304) x latitude (448). If datTypePred = "simple", the values in the array should indicate whether each grid box is categorized to contain ice (1: ice-covered, 0: no ice, NA: land). If datTypePred = "gfdl". #' If datTypePred = "gfdl" , the values in the predicted array correspond to the raw ice concentrations values predicted (including indicators for missing data, land etc.) formatted as in the CM2.5 Forecast-oriented Low-Ocean Resolution (FLOR) model produced by the National Oceanic and Atmospheric Administration<e2><80><99>s Geophysical Fluid Dynamics Laboratory converted to a Polar Stereographic grid (Vecchi et al. 2014; Msadek et al. 2014). Weights for converting to a polar stereograhic grid were obtained from the spherical coordinate remapping and interpolation package (SCRIP) (Jones 1997).

Value

SpatialPolygons object of the adjusted region

References

CM2.5 Forecast-oriented Low-Ocean Resolution (FLOR) model:

Jones, P.W. "A user<e2><80><99>s guide for SCRIP: A spherical coordinate remapping and interpolation package." Los Alamos National Laboratory, Los Alamos, NM (1997).

Msadek, R., et al. "Importance of initial conditions in seasonal predictions of Arctic sea ice extent." Geophysical Research Letters 41.14 (2014): 5208-5215.

National Center for Atmospheric Research, 2017: Earth system grid at NCAR. https://www.earthsystemgrid.org/home.html.

Vecchi, Gabriel A., et al. "On the seasonal forecasting of regional tropical cyclone activity." Journal of Climate 27.21 (2014): 7994-8016.

Examples

1
2
3
4
5
6
7
## Not run: 
adj <- contourShift(maps = discrep, predicted = emFeb2012, bcYear = 2012, predStartYear = 1980,
                    regions = regionInfo, level = 15, datTypePred = "gfdl")
plot(land, col = "grey", border = FALSE)
plot(adj, add = TRUE, col = "blue")

## End(Not run)

IceCast documentation built on Aug. 16, 2017, 9:03 a.m.