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

Quantile Mapping function for CSTools

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Nuria Pérez-Zanón requested to merge develop-QMapCor into master Oct 17, 2019
  • Overview 33
  • Commits 27
  • Pipelines 20
  • Changes 9

Hi @jhardenberg!

I have created function CST_QuantileMapping based on qmap package. I have selected this package because it allows using different methodologies for the quantile mapping adjustment and it is the one used in ADAMONT. Furthermore, it has multiple references and it was used in the publication "Bias Correction of GCM Precipitation by Quantile Mapping: How Well Do Methods Preserve Changes in Quantiles and Extremes?"(2015).

The function structure is the expected for CSTools package:

  • CST_QuantileMapping working on 's2dv_cube' objects
  • QuantileMapping working in arrays with multiple dimensions (and calling multiApply::Apply)
  • a basic function 'qmapcor' which performs the computation in the minimum number of dimensions

The function allows to provide a hindcast in 'exp' and historical observation in 'obs' and, if needed, a forecast in 'exp_cor' in which the correction will be applied. It also contains two important parameters implemented by myself:

  • one to select the length of the sample on time dimension using sample_length parameter (if the drift changes along the timeseries the correction captures the change and, if the forecast is longer than the hindcast, the correction of the latest sample is reused)

  • another to select the dimensions to use in the sample defining sample_dimensions parameter (for instance, a user may consider part of the sample all start date and members or may prefer to correct them separately, by default the first case is considered)

I am in the testing phase now (I need to focus in the sample_dimesnions parameter) but if you want to give me early feedback it would be great! I also attached a draft of the file I am using to test the functions CST_QM_test2.R

Thanks in advance!

Núria

Edited Oct 17, 2019 by Nuria Pérez-Zanón
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: develop-QMapCor