rmendels / rerddapXtracto

xtractomactic using rerddap
Other
14 stars 4 forks source link

possibly really daft question #8

Closed ChrisHarrod closed 6 years ago

ChrisHarrod commented 6 years ago

Firstly - many thanks for this package which I'm wanting to use to estimate upwelling intensity down here in Chile. As the subject line says, this might be a stupid question - I'm not an R blackbelt...

in the cran Vignette (https://cran.r-project.org/web/packages/xtractomatic/vignettes/Usingxtractomatic.html) there is this chunk of text:

We calculate 6-hourly upwelling at (37,-122) for the year 2005 and use the coast angle that ERD uses for (36N , 122W) which is 152 degrees.

require(xtractomatic) xpos <- c(238, 238) ypos <- c(37, 37) tpos <- c("2005-01-01", "2005-12-31") ektrx <- xtracto_3D(xpos, ypos, tpos, "erdlasFnTran6ektrx") ektry <- xtracto_3D(xpos, ypos, tpos, "erdlasFnTran6ektry") upwelling <- upwell(ektrx$data, ektry$data, 152)

I note that xpos has transformed co-ordinates (238 instead of -122) Here's the question - do negative co-ordinates have to be transformed (by subtraction from 360)?

I'm after data for various spots along the N Chilean coast e.g. -23.28, -70.66 Do both these numbers need subtracting from 360, or can they go in the code as is?

This also extend to the other feature of your lovely script?

I apologise if this is something extremely obvious for R users.

Cheers Chris