You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As mentioned on the [home](index) page, LandSea.jl is a backend package that allows a user to import and handle land-sea masks and topographic data. Examples of such land-sea mask datasets include:
4
+
* ERA5 reanalysis land-sea masks and topographic data (0.25º or T639 spectral)
5
+
* NASA IMERG land-sea mask (0.1º)
6
+
* ETOPO topographic datasets, with land-sea mask estimation
7
+
8
+
## Retrieving a LandSea Dataset
9
+
10
+
To retrieve Land-Sea dataset, we recommend extending the `getLandSea()` function exported by LandSea.jl as needed via the following method:
11
+
12
+
```julia
13
+
import LandSea: getLandSea
14
+
15
+
function getLandSea(
16
+
ids ::<Dataset Type of Interest>,
17
+
geo ::GeoRegion
18
+
)
19
+
20
+
...
21
+
22
+
end
23
+
```
24
+
25
+
See the docs below:
26
+
```@docs
27
+
getLandSea
28
+
```
29
+
30
+
## Examples
31
+
32
+
The following packages serve as examples of how LandSea.jl can be used to download topographic and land-sea mask information:
Copy file name to clipboardExpand all lines: src/LandSea.jl
+30-3Lines changed: 30 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -19,10 +19,10 @@ export
19
19
Abstract supertype for LandSea Datasets. All `LandSeaData` types contain the following fields:
20
20
* `lon` - Vector containing the longitude points for the Land-Sea Dataset
21
21
* `lat` - Vector containing the latitude points for the Land-Sea Dataset
22
-
* `lsm` - Vector or Array containing data regarding the Land-Sea Mask. 1 is Land, 0 is Ocean, NaN is outside the bounds of the GeoRegion
22
+
* `lsm` - Vector or Matrix containing data regarding the Land-Sea Mask. 1 is Land, 0 is Ocean, NaN is outside the bounds of the GeoRegion.
23
23
24
24
!!! info
25
-
If `lsm` is a vector, then `lon`, `lat` and `lsm` all must have the same length
25
+
If `lsm` is a vector, then `lon`, `lat` and `lsm` all must have the same length. Otherwise if `lsm` is a matrix, then its first and second dimensions are longitude and latitude respectively, and it must have size `length(lon)` and `length(lat)`.
26
26
"""
27
27
abstract type LandSeaData end
28
28
@@ -34,8 +34,17 @@ A LandSea Dataset that also contains information on the topographic height.
34
34
A `LandSeaTopo` type will also contain the following field:
35
35
* `z` - Vector or Array containing data regarding the Orographic Height in meters. NaN is outside the bounds of the GeoRegion
36
36
37
+
A `LandSeaTopo` type can be created using the function:
38
+
39
+
LandSeaTopo(
40
+
lon :: Vector{FT1},
41
+
lat :: Vector{FT1},
42
+
lsm :: Union{Vector{FT2},Matrix{FT2}},
43
+
z :: Union{Vector{FT2},Matrix{FT2}}
44
+
) where {FT1 <: Real, FT2 <: Real} -> LandSeaTopo
45
+
37
46
!!! info
38
-
If `z` or `lsm` are vectors, then `lon`, `lat`, `lsm` and `z` all must be vectors of the same length
47
+
`z` and `lsm` must both be either (1) vectors or (2) matrices of the same size. If `lsm` and `z` are vectors, then `lon`, `lat`, `lsm` and `z` all must have the same length. Otherwise if `lsm` and `z` are matrices, then their first and second dimensions are longitude and latitude respectively, and they are of size `length(lon)` and `length(lat)`.
An extensible function type to retrieve LandSea Datasets. You can use this function name in your packages if you want to retrieve a specific LandSea dataset.
149
+
150
+
getLandSea(
151
+
ids :: <Dataset Type of Interest>,
152
+
geo :: GeoRegion
153
+
) -> LandSeaData
154
+
155
+
Arguments
156
+
=========
157
+
- `ids` : A `struct` type for the dataset of interest (e.g., a [`NASAPrecipitationDataset`](https://georegionsecosystem.github.io/NASAPrecipitation.jl/stable/datasets/intro))
0 commit comments