Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • ClimProjDiags ClimProjDiags
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 1
    • Issues 1
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Earth SciencesEarth Sciences
  • ClimProjDiagsClimProjDiags
  • Issues
  • #10
Closed
Open
Issue created Sep 02, 2022 by aho@ahoMaintainer

New function WeightCells

Hi @nperez

I open this issue for the new function WeightCells() that we talked about a while ago. @erifarov will be in charge of creating this function but I'd like to confirm some details with you first to see if I understand everything correctly.

  • The function aims to apply weights to the spatial data, and the weights are calculated from latitude. So, the minimum requirements of the inputs are: (1) data has lat dimension (2) lat should be a vector providing the latitude value (3) lat_dim specifies the lat dim name.

  • Is the weight formula wt <- sqrt(cos(lat * pi/180)) (lat is degree)? This is what used in s2dv::ACC and mentioned in the ref* below. I see that in WeightedMean(), the weight is calculated by dlon * dlat * cosphi (line133) I'm not quite sure about the physical meaning of these two methods.

  • Is it suitable to have one argument weights to let users put in a prepared weight array?

*ref: https://www.ncl.ucar.edu/Document/Functions/Built-in/eofcov.shtml: "Most frequently, the square root of the cosine of the latitude is used to compute the area weight." wgt = sqrt(cos(lat)) (lat is radian)

Thanks in advance,
An-Chi

Edited Sep 02, 2022 by aho
Assignee
Assign to
Time tracking