Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • startR startR
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 29
    • Issues 29
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 7
    • Merge requests 7
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Earth SciencesEarth Sciences
  • startRstartR
  • Issues
  • #44
Closed
Open
Issue created Jan 27, 2020 by Jaume Ramon@jramonDeveloper

Start(): load point data given a series of latitudes and longitudes

Hi @nperez and @aho ,

I am loading point station data with Start():

lats <- c(51.30760,51.97100,52.10000,54.01486,55.00690,55.19500,51.94355,53.51917,46.95580,53.12750,50.92847,52.16630,53.40360,55.35277,55.11070,62.90566,67.36186)
lons <- c(4.519800,4.926000,-0.416700,6.587639,13.154200,7.158000,1.922200,10.102861,16.652200,0.436100,6.219629,14.122600,6.352800,-7.332018,36.597700,27.653497,26.637833)
data <- Start(
                time = 'all',
                ensemble = 'all',
                sdate = format(ymd(paste0(1993:2016, sprintf('%02d',12), "01")), "%Y%m%d"),
                latitude = values(lats),
                longitude = values(lons),
                var = 'sfcWind',
                dat = '/esarchive/exp/ecmwf/system5c3s/monthly_mean/$var$_f6h/$var$_$sdate$.nc',
                pattern_dims = 'dat',
                synonims = list(latitude=c('lat', 'latitude'),longitude=c('lon', 'longitude')),
                return_vars = list(time = NULL,
                                latitude = 'dat',
                                longitude = 'dat'),
                retrieve = TRUE)

However, Start() rounds the longitudes and latitudes to the unit and then loads these latitudes and longitudes. If some of the latitudes or longitudes are repeated, it only loads them once. Consequently, the lengths of the original latitudes or longitudes (objects lats and lons) differ from the lats lons provided by Start(). This is somehow undesirable, especially in those cases when I need to re-build R objects from the Start() output object (the pairs of lats/lons are then mixed so I need to find exactly which index corresponds to each latitude/longitude...).

Ideally, I would like Start() to provide vectors of longitudes and latitudes with the same length as the original ones. I attach a full use case script where I show this issue.

I'm getting by loading the each point separately, so no need to hurry.

Thank you in advance.

Edited Jan 28, 2020 by Jaume Ramon
Assignee
Assign to
Time tracking