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
  • !106

Fix Analogs with new lonL and latL parameters

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Nuria Pérez-Zanón requested to merge develop-AnalogsLocalDist into master Jun 04, 2021
  • Overview 7
  • Commits 2
  • Pipelines 2
  • Changes 2

Hi @bertvs

In this development branch is the fix I have implemented for the case you detected.

Here is a code showing an example. The first one (with the current version on CRAN) fails while using the version from this branch works.

expL <- rnorm(1:200)
dim(expL) <- c(member=10,lat = 4, lon = 5)
obsL <- c(rnorm(1:180),expL[1,,]*1.2)
dim(obsL) <- c(time = 10,lat = 4, lon = 5)
time_obsL <- paste(rep("01", 10), rep("01", 10), 1994 : 2003, sep = "-")
time_expL <- time_obsL[1]
lon <- seq(-1, 5, 1.5)
lat <- seq(30, 35, 1.5)
expLL <- CSTools::s2dv_cube(data = expL, lat = lat, lon = lon,
                  Dates = list(start = time_expL, end = time_expL))
obsLL <- CSTools::s2dv_cube(data = obsL, lat = lat, lon = lon,
                  Dates = list(start = time_obsL, end = time_obsL))
region <- c(2, 3.5, 31.5, 33.5)
# CASE CRAN version
downscaled_field <- CSTools::CST_Analogs(expL = expLL, obsL = obsLL,
                        region = region,
                         criteria = 'Local_dist') #FAILS
# CASE development branch version
library(ClimProjDiags); library(multiApply); library(abind)
source("/esarchive/scratch/nperez/git/cstools/R/CST_Analogs.R") #load development version
downscaled_field <- CST_Analogs(expL = expLL, obsL = obsLL,
                        region = region,
                         criteria = 'Local_dist') # works

It should work also for your case. To ensure, could you please check it and report here any problem you may found?

Thanks,

Núria

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: develop-AnalogsLocalDist