Changes between Version 13 and Version 14 of udg/ecoms/RPackage/examples/continentalSelection


Ignore:
Timestamp:
Sep 2, 2014 5:27:37 PM (7 years ago)
Author:
juaco
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • udg/ecoms/RPackage/examples/continentalSelection

    v13 v14  
    6565#!text/R
    6666> obs.regridded <- interpGridData(gridData = ex2.obs, new.grid = getGrid(ex2), method = "bilinear")
     67[2014-09-02 17:22:11] Performing bilinear interpolation... may take a while
     68[2014-09-02 17:22:30] Done
     69Warning messages:
     701: In interpGridData(gridData = ex2.obs, new.grid = getGrid(ex2), method = "bilinear") :
     71  The new longitudes are outside the data extent
     722: In interpGridData(gridData = ex2.obs, new.grid = getGrid(ex2), method = "bilinear") :
     73  The new latitudes are outside the data extent
     74}}}
     75
     76Note the warnings reminding us that the extent of the input grid is wider that that of CFS. However, in this case we can safely ignore this warnings, since all the land areas we are interest in are within the CFS domain.
     77
     78{{{
     79#!text/R
    6780> plotMeanField(obs.regridded)
    6881}}}
    6982
     83[[Image(image-20140902-172548.png)]]
    7084
    7185
     86Now that both model data and observations are in the same grid, we can compute the bias. First, we calculate the spatial mean of WFDEI, which is the reference against which to compute the biases:
     87
     88{{{
     89#!text/R
     90ref <- apply(obs.regridded$Data, MARGIN = c(3,2), mean, na.rm = TRUE)
     91}}}
    7292
    7393
    74 
    75