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
  • #59
Closed
Open
Issue created Jun 17, 2020 by Silvia Terzago@silviaDeveloper

CST_QuantileMapping() not preserving the "datetime" dimension

Hi @nperez

 I am using CST_QuantileMapping() on several start dates and I am saving the outputs to files with CST_SaveExp(), one file for each start date.  

The output files seem to have an issue in the "date-time" dimension: If you explore the file i.e. with cdo sinfov, you will see that the date-time information is wrong, with any file having the same start date. The date in the filename is correct, however.

I reported below an example to reproduce the data with the date-time issue.

Thanks a lot! Best, Silvia

exp <- list(name = 'experiment', path = infile)
obs <- list(name = 'observation',path = reffile)

exp %<-% CST_Load('prlr', exp=list(exp), obs=NULL, sdates =startDates, nmember = nens, storefreq = "daily", sampleperiod = 1, latmin =latn, latmax = latx, lonmin = lonn, lonmax = lonx, output = 'lonlat',nprocs=6)
obs %<-% CST_Load('prlr', exp=list(obs), obs=NULL, sdates =startDates, nmember = 1, storefreq = "daily", sampleperiod = 1, latmin =latn, latmax = latx, lonmin = lonn, lonmax = lonx, output = 'lonlat',nprocs=6)
dim(exp$data)
dim(obs$data)

# SplitDim 
print("Splitting ftime by month ...")
expm   <- CST_SplitDim(exp, split_dim = c('ftime'))
obsm   <- CST_SplitDim(obs, split_dim = c('ftime'))
dim(expm$data)
dim(obsm$data)

exp.qm  <- CST_QuantileMapping(expm,obsm, method = "QUANT", wet.day=F,sample_dims = c('member', 'sdate', 'ftime'))
dim(exp.qm$data)

# MergeDims
print("Restoring original dimensions ...")
exp.qmm <- CST_MergeDims(exp.qm, merge_dims=c("ftime", "monthly"), na.rm=TRUE)

print (paste("Save Bias-Adjusted data to", outdir))
CST_SaveExp(exp.qmm, outpath)
Assignee
Assign to
Time tracking