dnychka / fieldsRPackage

GNU General Public License v2.0
14 stars 1 forks source link

Interpolation problem #1

Open qianmoeast opened 2 years ago

qianmoeast commented 2 years ago

Dear author, I am honored to have fields as a package for spline function interpolation. I encountered a problem when I used this package for interpolation. 1. How to use covariates. For example, I want to use dem to correct temperature data, but I saw the usage examples and still did not achieve the function I wanted. 2. How to realize cubic spline interpolation, just like anuspin software.

dnychka commented 2 years ago

Thank you for using the fields package For this application see the examples in the help file for spatialProcess.

Specifically here is the example. You may have to read up some about Kriging and spatial statistics – this is preferred to just using a spline and it is not always a good idea to just use interpolation (fitting the data exactly) adding a the possibility of some smoothing of the observations is important. To my knowledge the anuspin is fairly old methodology – I hope you find fields useful. Also see the the fields vignette for more examples and explanations.

working with covariates and filling in missing station data

using an ensemble method

see the example under help(sim.spatialProcess) to see how to

handle a conditional simulation on a grid of predictions with

covariates.

data(COmonthlyMet) fit1E<- spatialProcess(CO.loc,CO.tmin.MAM.climate, Z=CO.elev, profileLambda=TRUE, profileARange=TRUE ) set.panel( 2,2) plot( fit1E)

set.panel(1,2)

plots of the fitted surface and surface of prediction standard errors

out.p<-predictSurface( fit1E, grid.list=CO.Grid, ZGrid= CO.elevGrid, extrap=TRUE)

imagePlot( out.p, col=larry.colors()) US(add=TRUE, col="grey") contour( CO.elevGrid, add=TRUE, levels=seq(1000,3000,,5), col="black") title("Average Spring daily min. temp in CO")

out.p2<-predictSurfaceSE( fit1E, grid.list=CO.Grid, ZGrid= CO.elevGrid, extrap=TRUE, verbose=FALSE)

imagePlot( out.p2, col=larry.colors()) US(add=TRUE, col="grey") points( fit1E$x, pch=".") title("Prediction SE") set.panel()

Douglas Nychka Personal email Cell 3037253199

From: qianmoeast @.> Reply-To: dnychka/fieldsRPackage @.> Date: Thursday, January 6, 2022 at 4:53 PM To: dnychka/fieldsRPackage @.> Cc: Subscribed @.> Subject: [dnychka/fieldsRPackage] Interpolation problem (Issue #1)

Dear author, I am honored to have fields as a package for spline function interpolation. I encountered a problem when I used this package for interpolation. 1. How to use covariates. For example, I want to use dem to correct temperature data, but I saw the usage examples and still did not achieve the function I wanted. 2. How to realize cubic spline interpolation, just like anuspin software.

— Reply to this email directly, view it on GitHubhttps://github.com/dnychka/fieldsRPackage/issues/1, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADHJ7U2ATKDIT4IVPRXWHXTUUYTQ3ANCNFSM5LNQJ3UQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you are subscribed to this thread.Message ID: @.***>