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
  • Issues
  • #29
Closed
Open
Issue created Nov 27, 2019 by Silvia Terzago@silviaDeveloper

CST_RFSlope output to be set as numeric()

Hi @jhardenberg , @nperez

I noticed that when the output of CST_RFSlope is passed directly to CST_RainFARM (as in the following example), the CST_RainFARM function fails with the following error:

slo <- CST_RFSlope(data=ls$exp, time_dim=c("member","sdate", "ftime"))

fs <- CST_RainFARM(data=ls$exp,nf=down_fact, weights=w_clim, slope=slo, kmin=1, nens=nrealiz, verbose=TRUE, time_dim=c("member","sdate", "ftime"), drop_realization=TRUE)

Error in kx^(-(sx + 1)/4) : non-conformable arrays

The problem is the that the spectral slope is not a plain "numeric" object (as CST_RainFARM would expect) but it has dimensions:

dim(slo)

dataset

1

If you manually set the slope to "numeric" it works:

slo <- as.numeric(slo)

s <- CST_RainFARM(data=ls$exp,nf=down_fact, weights=w_clim, slope=slo, kmin=1, nens=nrealiz, verbose=TRUE, time_dim=c("member","sdate", "ftime"), drop_realization=TRUE)

Is there a reason to have a dimension associated to the slope? Otherwise we can think of setting the RFSlope output as numeric by default to improve the compatibility with CST_RainFARM

Cheers,

Silvia

Assignee
Assign to
Time tracking