Extent in db.grid.init() function causing Error

Any question regarding the Interpolation method using Kriging

Extent in db.grid.init() function causing Error

Postby deepster » Tue Jul 12, 2022 1:41 am

Hi,
I'm currently trying to krig a map of temperature data for the continental USA. The data I am using is not present in the upper East coast so the map falls short of interpolating past Pennsylvania. I'm using the "origin" and "extend" parameters in the db.grid.init() to ensure predictions are made for the entire country, but when I implement the "extend" parameter in the function I get the error in the screenshot below. Also these are my inputs x_floor = -125, x_ceil = -85, y_floor = 25, y_ceil = 49 which represent the lat lon borders of the USA.
Attachments
kriging_error.png
kriging_error.png (52.72 KiB) Viewed 4260 times
deepster
 
Posts: 1
Joined: Tue Jul 12, 2022 1:21 am

Re: Extent in db.grid.init() function causing Error

Postby Fabien Ors » Tue Jul 12, 2022 8:22 am

Hi,

Thank you for your feedback.
Please, could you give us the output of the following commands :

Code: Select all
db.print(db_100ft, flag.stats=T)
cat("grid_size is: ", grid_size,"\n")


Note that the extend argument of db.grid.init is the total size of the grid. Thus you should initialize it to :

Code: Select all
extend=c(x_ceil-x_floor, y_ceil-y_floor)


If you want that your grid overlaps all your data, this extension should be greater than :

Code: Select all
db_100ft$extends

in both directions.

Best regards
Fabien Ors
Administrateur du site
 
Posts: 226
Joined: Thu Sep 20, 2012 1:07 pm


Return to Kriging

Who is online

Users browsing this forum: No registered users and 3 guests

cron