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
  • #124
Closed
Open
Issue created Dec 03, 2021 by Carlos Delgado Torres@cdelgadoMaintainer

merge_across_dims_narm=TRUE does not remove NA values

Hi @nperez and @aho,

I'm trying to load EC-Earth3-i2 decadal predictions, which are organised as follows: since this model is initialised in November, the first two lead months (Nov and Dec) are stored in the first file, and the rest of the lead months are stored in files with one calendar year each (from Jan to Dec). Please see, for example, this folder: "/esarchive/exp/CMIP6/dcppA-hindcast/EC-Earth3/DCPP/EC-Earth-Consortium/EC-Earth3/dcppA-hindcast/r6i2p1f1/Amon/psl/gr/v20210309/".

To do so, I'm using the "merge_across_dims_narm" parameter in Start(), but both "merge_across_dims_narm=TRUE" and "merge_across_dims_narm=FALSE" return the same dimensions (and the 10 missing values corresponding to the first file are not removed).

This is the code I am using:


library(startR)

narmTRUE <- startR::Start(dataset = '/esarchive/exp/CMIP6/dcppA-hindcast/EC-Earth3/DCPP/EC-Earth-Consortium/EC-Earth3/dcppA-hindcast/$member$/Amon/$var$/gr/v20210309/$var$_Amon_EC-Earth3_dcppA-hindcast_s$sdate$-$member$_gr_$fyear$.nc',
                          var = 'psl',
                          sdate = paste0(1970:1972),
                          lat = indices(1),
                          lon = indices(1),
                          fyear = 'all',
                          fmonth = 'all',
                          fyear_depends = 'sdate',
                          member = 'r6i2p1f1',
                          fmonth_across = 'fyear',
                          merge_across_dims = TRUE,
                          merge_across_dims_narm = TRUE, 
                          largest_dims_length = c(fmonth = 12),
                          synonims = list(fmonth = c('fmonth','time'), lon = c('lon', 'longitude'), lat = c('lat', 'latitude')),
                          return_vars = list(lat = 'dataset', lon = 'dataset'),
                          num_procs = 1 , retrieve = TRUE)

narmFALSE <- startR::Start(dataset = '/esarchive/exp/CMIP6/dcppA-hindcast/EC-Earth3/DCPP/EC-Earth-Consortium/EC-Earth3/dcppA-hindcast/$member$/Amon/$var$/gr/v20210309/$var$_Amon_EC-Earth3_dcppA-hindcast_s$sdate$-$member$_gr_$fyear$.nc',
                           var = 'psl',
                           sdate = paste0(1970:1972),
                           lat = indices(1),
                           lon = indices(1),
                           fyear = 'all',
                           fmonth = 'all',
                           fyear_depends = 'sdate',
                           member = 'r6i2p1f1',
                           fmonth_across = 'fyear',
                           merge_across_dims = TRUE,
                           merge_across_dims_narm = FALSE, 
                           largest_dims_length = c(fmonth = 12),
                           synonims = list(fmonth = c('fmonth','time'), lon = c('lon', 'longitude'), lat = c('lat', 'latitude')),
                           return_vars = list(lat = 'dataset', lon = 'dataset'),
                           num_procs = 1 , retrieve = TRUE)

dim(narmTRUE)
dim(narmFALSE)

Could you please have a look at it and let me know if I am making any mistakes?

Thanks a lot,

Carlos

Assignee
Assign to
Time tracking