Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • SUNSET SUNSET
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 44
    • Issues 44
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Terraform modules
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Earth SciencesEarth Sciences
  • SUNSETSUNSET
  • Merge requests
  • !234

Create Saving function for cross-validation workflows

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged vagudets requested to merge dev-saving_crossval into master Jul 25, 2025
  • Overview 0
  • Commits 21
  • Pipelines 1
  • Changes 9

Hi @nperez,

I gathered the portions of the code in Crossval_anomalies.R and Crossval_calibration.R that are used to save the results, cleaned them a little bit and put them in a function, found in modules/Saving/Saving_crossval.R (we can come up with a better name).

For now this function is still at the end of Crossval_anomalies.R and Crossval_calibration.R, but it could also be removed from there and called separately, to save everything at the end of the workflow including the metrics. It has a parameter module for the name of the module used (e.g. "Anomalies", "Calibration"). This is to check what the user wants to save from the recipe and to create the subdirectory where the outputs are saved.

I also changed a couple more things I noticed, let me know if you agree:

In Crossval_calibration() and Crossval_anomalies:

  • Compute the limits with full hindcast period even when forecast is not requested

In Crossval_Anomalies():

  • Return limits computed with the full hindcast period in cat_lims (previously, it returned the limits computed within the cross-validation loop, with the syear dimension)
  • Select central sday in anomalies before returning them (not only in full values)

In the saving functions:

  • Ensure that the order of the dimensions of the netCDF is always (time, longitude, latitude)

Cheers,

Victòria

Edited Jul 25, 2025 by vagudets
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: dev-saving_crossval