JuliaClimate / JuliaClimate/ClimateBase.jl

[FR] Land Mask

Open
#49 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

easy feature request hard
Dominant language
Julia
Stars
38
Forks
3
PR merge metrics
No merged PRs in 30d

Description

With current functionality it is straight-forward to make a "land mask". This means to average given array R over only land or over only ocean. To do this we first create a filed W that is 0 over ocean and 1 over land.

W = [island(lon, lat) ? 1.0 : 0.0 for lon in lons for lat in lats]
Rland = spacemean(R, W)

What we actually need is to create a function island that returns 1 if the given longitude and latitude is over land, and 0 otherwise. How to do it?

The alternative would be to save a high resolution lon-lat grid with booleans to disk, and load this every time and check. But I think this file might be too large to be attached to the source code of ClimateBase.jl.


So, depending on how easy it is to make the island function, this issue is either easy or hard.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing spacemean entry point and the proposed Julia example using island, W, Rland, lons, and lats. Determine how island should identify land without shipping an impractically large high-resolution grid, then verify that spacemean produces separate land and ocean averages from the resulting mask.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.