Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • CSTools CSTools
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 28
    • Issues 28
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • External
  • CSToolsCSTools
  • Merge requests
  • !189

Fix pipeline and correct CST_Subset

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Eva Rifà requested to merge develop-fix_pipeline into master Oct 11, 2023
  • Overview 0
  • Commits 1
  • Pipelines 1
  • Changes 12

In order to fix the pipeline, some modifications:

  • Update some unit tests due to last changes in the package
  • Correct error in CST_Subset. Due to the changes for a previous error there was a modification in CST_Subset here: !185 (merged). Here below I leave an example for the error. The modification is in this line where the argument 'indices' is now a list and must be subset correctly. (FYI @vagudets)
library(CSTools)
library(startR)
repos1 <- "/esarchive/exp/ecmwf/system5_m1/monthly_mean/$var$_f6h/$var$_$sdate$.nc"
repos2 <- "/esarchive/exp/ecmwf/system4_m1/monthly_mean/$var$_f6h/$var$_$sdate$.nc"

suppressWarnings(
  data <- Start(dat = list(list(name = 'system4_m1', path = repos2),
                            list(name = 'system5_m1', path = repos1)),
                var = c('tas', 'sfcWind'),
                sdate = c('20170101'),
                ensemble = indices(1),
                time = indices(1:3),
                lat = indices(1:2),
                lon = indices(1:2),
                synonims = list(lat = c('lat', 'latitude'),
                                lon = c('lon', 'longitude')),
                return_vars =  list(time = 'sdate',
                                    longitude = 'dat',
                                    latitude = 'dat'),
                metadata_dims = c('dat', 'var'),
                retrieve = T)
)
suppressWarnings(
  exp_start <- as.s2dv_cube(data)
)
source("https://earth.bsc.es/gitlab/external/cstools/-/raw/master/R/CST_Subset.R")
res8 <- CST_Subset(exp_start, along = c('lon', 'sdate', 'ensemble', 'var', 'dat'),
                     indices = list(1:2, 1, 1, 1, 1),
                     drop = 'none')
Edited Oct 11, 2023 by Eva Rifà
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: develop-fix_pipeline