Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • CSIndicators CSIndicators
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Graph
    • Compare revisions
  • Issues 18
    • Issues 18
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Terraform modules
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Earth SciencesEarth Sciences
  • CSIndicatorsCSIndicators
  • Issues
  • #51
Closed
Open
Issue created Oct 03, 2024 by vagudets@vagudetsMaintainer

CST_PeriodPET(): Add longname and other variable metadata

Hi @tkariyat,

The function PeriodPET() computes Potential evapotranspiration (PET) using a set of variables provided by the user.

CST_PeriodPET() returns an s2dv_cube with metadata, but it does not return any metadata for the new variable, except for the varName 'PET'. It should return a PET item in the attrs$Variable$metadata list with at least the longname ("Potential evapotranspiration") and the units ("mm/month"? @allabres it would be great if you could confirm)

So basically after these lines:

  coords <- data[[1]]$coords
  Dates <- data[[1]]$attrs$Dates
  metadata <- data[[1]]$attrs$Variable$metadata

We should add something like:

data[[1]]$attrs$Variable$metadata[["PET"]]$longname <- "Potential evapotranspiration"
data[[1]]$attrs$Variable$metadata[["PET"]]$units <- "mm/month"

The metadata of the previous non-coordinate variable could also be removed.

Let me know if you need any clarification. I can also provide some sample data for you to test the changes.

Cheers,

Victòria

Edited Oct 03, 2024 by vagudets
Assignee
Assign to
Time tracking