Skip to content
GitLab
  • Menu
Projects Groups 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
    • Contributors
    • Graph
    • Compare
  • Issues 29
    • Issues 29
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 8
    • Merge requests 8
  • 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 Sciences
  • startRstartR
  • Issues
  • #103
Closed
Open
Created May 19, 2021 by acarreri@acarreriDeveloper

StartR and s2dv return different values

Hi @aho, @nperez

I tried two different ways of loading data, one with StartR, one with s2dv. And I think I ask for a similar interpolation but it doesn't return the same values. I use R/3.6.1-foss-2015a-bare on WS.

My codes:

library(startR)
rm(list=ls())
gc()

vari <- 'tos'
path_obs <- paste0('/esarchive/recon/ecmwf/era5/monthly_mean/', vari, '_f1h-r1440x721cds/$var$_$year$$month$.nc')
startdates_obs  <- paste0(c(1980:1982)) 
lat_min <- -90
lat_max <- 90
lon_min <- 0
lon_max <- 360
data_obs <- startR::Start(dat = path_obs,
                                   var = vari,
                                   year = startdates_obs, 
                                   time = 'all', 
                                   lat = values(list(lat_min, lat_max)),
                                   lon = values(list(lon_min, lon_max)),
                                   month = 'all',
                                   month_depends = 'year', #ca fait quoi si je mets ici 'time' ?
                                   time_across = 'month', 
                                   merge_across_dims = TRUE,
                                   merge_across_dims_narm = TRUE,
                                    transform = startR::CDORemapper,
                                   transform_extra_cells = 2,
                                   transform_params = list(grid = 'r360x180',
                                                           method = 'conservative',
                                                           crop = c(lon_min, lon_max, 
                                                                    lat_min, lat_max)),
                                   transform_vars = c('lat', 'lon'),
                                   synonims = list(lon = c('lon', 'longitude'), 
                                                   lat = c('lat', 'latitude')),
                                   return_vars = list(lat='dat',
                                                      lon='dat',
                                                      time=c('year','month')),
                                   #lon_reorder = CircularSort(-180,180), 
                                   lat_reorder = Sort(decreasing = T),
                                   retrieve = TRUE)

and

library(maps)
library(s2dv)
# Clean memory
rm(list=ls())
gc()
vari <- 'tos'
startdates_obs  <- paste0(c(1980:1982), '0101')
obs_era <- list(name = 'era5',
                 path = file.path('/esarchive/recon/ecmwf/era5/monthly_mean', 
                                  '$VAR_NAME$_f1h-r1440x721cds/$VAR_NAME$_$YEAR$$MONTH$.nc'))
data_obs <- s2dv::Load(var = vari,
             exp = NULL,
             obs = list(obs_era),
             sdates= startdates_obs,
             nmember=1,
             leadtimemin = 1,
             leadtimemax = 12,
             output = 'lonlat',
             grid = 'r360x180',
             method = 'conservative',
             storefreq = 'monthly',
             nprocs= 1)

I checked that the retrieved lon and lat of both data are the same.

But I got different results:

  • with StartR:

image

  • with s2dv:

image

I'm doing maybe something wrong, but I can't see where.

Many thanks!

Aude

Assignee
Assign to
Time tracking