diff --git a/stable b/stable
index 25b294bf..9f925ba2 120000
--- a/stable
+++ b/stable
@@ -1 +1 @@
-v5.2.7
\ No newline at end of file
+v6.0.0
\ No newline at end of file
diff --git a/v6 b/v6
new file mode 120000
index 00000000..9f925ba2
--- /dev/null
+++ b/v6
@@ -0,0 +1 @@
+v6.0.0
\ No newline at end of file
diff --git a/v6.0 b/v6.0
new file mode 120000
index 00000000..9f925ba2
--- /dev/null
+++ b/v6.0
@@ -0,0 +1 @@
+v6.0.0
\ No newline at end of file
diff --git a/v6.0.0/404.html b/v6.0.0/404.html
new file mode 100644
index 00000000..9dd61c0c
--- /dev/null
+++ b/v6.0.0/404.html
@@ -0,0 +1,21 @@
+
+
+
This page contains a brief description of the functions not covered in the tutorials. I aim to describe what the functions do, their arguments, and what is returned.
Check if a point with longitude and latitude coordinates plon and plat is found within a region defined by the bounds [rN,rS,rE,rW] format, with tlon and tlat being the threshold/margin of error for the longitude and latitude respectively.
Arguments:
plon::Real : Longitude of the point in question.
plat::Real : Latitude of the point in question.
rN::Real : North bound of region
rS::Real : South bound of region
rE::Real : East bound of region
rW::Real : West bound of region
tlon::Real : Threshold for longitude bounds in °. If set to 0, means that there is no leniency for the point to fall outside the longitude bounds
tlat::Real : Threshold for latitude bounds in °. If set to 0, means that there is no leniency for the point to fall outside the latitude bounds
throw::Bool : If throw=true, then if (plon,plat) is not within the region, an error is thrown and the program stops running.
Check if a grid with bounds [gN,gS,gE,gW] is found within a region defined by the bounds [rN,rS,rE,rW] format, with tlon and tlat being the threshold/margin of error for the longitude and latitude respectively.
Arguments:
gN::Real : North bound of grid
gS::Real : South bound of grid
gE::Real : East bound of grid
gW::Real : West bound of grid
rN::Real : North bound of region
rS::Real : South bound of region
rE::Real : East bound of region
rW::Real : West bound of region
tlon::Real : Threshold for longitude bounds in °. If set to 0, means that there is no leniency for the point to fall outside the longitude bounds
tlat::Real : Threshold for latitude bounds in °. If set to 0, means that there is no leniency for the point to fall outside the latitude bounds
throw::Bool : If throw=true, then if (plon,plat) is not within the region, an error is thrown and the program stops running.
+
+
+
+
\ No newline at end of file
diff --git a/v6.0.0/assets/api.md.EwSGmM2a.js b/v6.0.0/assets/api.md.EwSGmM2a.js
new file mode 100644
index 00000000..65009a86
--- /dev/null
+++ b/v6.0.0/assets/api.md.EwSGmM2a.js
@@ -0,0 +1 @@
+import{_ as e,c as o,o as i,a7 as t}from"./chunks/framework.Bu--eeyr.js";const f=JSON.parse('{"title":"Application Programming Interface (APIs)","description":"","frontmatter":{},"headers":[],"relativePath":"api.md","filePath":"api.md","lastUpdated":null}'),n={name:"api.md"},d=t('
This page contains a brief description of the functions not covered in the tutorials. I aim to describe what the functions do, their arguments, and what is returned.
Check if a point with longitude and latitude coordinates plon and plat is found within a region defined by the bounds [rN,rS,rE,rW] format, with tlon and tlat being the threshold/margin of error for the longitude and latitude respectively.
Arguments:
plon::Real : Longitude of the point in question.
plat::Real : Latitude of the point in question.
rN::Real : North bound of region
rS::Real : South bound of region
rE::Real : East bound of region
rW::Real : West bound of region
tlon::Real : Threshold for longitude bounds in °. If set to 0, means that there is no leniency for the point to fall outside the longitude bounds
tlat::Real : Threshold for latitude bounds in °. If set to 0, means that there is no leniency for the point to fall outside the latitude bounds
throw::Bool : If throw=true, then if (plon,plat) is not within the region, an error is thrown and the program stops running.
Check if a grid with bounds [gN,gS,gE,gW] is found within a region defined by the bounds [rN,rS,rE,rW] format, with tlon and tlat being the threshold/margin of error for the longitude and latitude respectively.
Arguments:
gN::Real : North bound of grid
gS::Real : South bound of grid
gE::Real : East bound of grid
gW::Real : West bound of grid
rN::Real : North bound of region
rS::Real : South bound of region
rE::Real : East bound of region
rW::Real : West bound of region
tlon::Real : Threshold for longitude bounds in °. If set to 0, means that there is no leniency for the point to fall outside the longitude bounds
tlat::Real : Threshold for latitude bounds in °. If set to 0, means that there is no leniency for the point to fall outside the latitude bounds
throw::Bool : If throw=true, then if (plon,plat) is not within the region, an error is thrown and the program stops running.
We use the functions RectRegion and PolyRegion to define rectilinear and polygonal regions respectively. For example, we construct the sample RectRegionTRC
julia
julia> using GeoRegions
+
+julia> RectRegion("TRC","GLB","Test Rectangle Region",[30,20,50,10])
+[ Info: 2024-08-08T01:51:42.102 - GeoRegions.jl - Checking to see if the ID TRC is in use
+┌ Warning: 2024-08-08T01:51:42.186 - GeoRegions.jl - TRC is not a valid GeoRegion identifier, use RectRegion(), TiltRegion() or PolyRegion() to add this GeoRegion to the list.
+└ @ GeoRegions ~/work/GeoRegions.jl/GeoRegions.jl/src/georegions/read.jl:562
+[ Info: 2024-08-08T01:51:42.188 - GeoRegions.jl - Adding the GeoRegion TRC to the list.
+[ Info: 2024-08-08T01:51:42.214 - GeoRegions.jl - Retrieving information for the GeoRegion defined by the ID GLB
+[ Info: 2024-08-08T01:51:42.664 - GeoRegions.jl - Performing a check to determine if the Test Rectangle Region GeoRegion (TRC) is inside the Globe GeoRegion (GLB)
+[ Info: 2024-08-08T01:51:42.664 - GeoRegions.jl - The GeoRegion TRC (Test Rectangle Region) is indeed a subset of the GeoRegion GLB (Globe)
+The Rectilinear Region TRC has the following properties:
+ Region ID (ID) : TRC
+ Parent ID (pID) : GLB
+ Name (name) : Test Rectangle Region
+ Bounds (N,S,E,W) : [30.0, 20.0, 50.0, 10.0]
+ (is180,is360) : (false, true)
+
+julia> PolyRegion("TPL","GLB","Test Polygonal Region",[30,40,50,40,30],[20,30,20,10,20])
+[ Info: 2024-08-08T01:51:43.160 - GeoRegions.jl - Checking to see if the ID TPL is in use
+┌ Warning: 2024-08-08T01:51:43.160 - GeoRegions.jl - TPL is not a valid GeoRegion identifier, use RectRegion(), TiltRegion() or PolyRegion() to add this GeoRegion to the list.
+└ @ GeoRegions ~/work/GeoRegions.jl/GeoRegions.jl/src/georegions/read.jl:562
+[ Info: 2024-08-08T01:51:43.161 - GeoRegions.jl - Adding the GeoRegion TPL to the list.
+[ Info: 2024-08-08T01:51:43.308 - GeoRegions.jl - Retrieving information for the GeoRegion defined by the ID GLB
+[ Info: 2024-08-08T01:51:43.347 - GeoRegions.jl - Performing a check to determine if the Test Polygonal Region GeoRegion (TPL) is inside the Globe GeoRegion (GLB)
+[ Info: 2024-08-08T01:51:43.347 - GeoRegions.jl - The GeoRegion TPL (Test Polygonal Region) is indeed a subset of the GeoRegion GLB (Globe)
+The Polygonal Region TPL has the following properties:
+ Region ID (ID) : TPL
+ Parent ID (pID) : GLB
+ Name (name) : Test Polygonal Region
+ Bounds (N,S,E,W) : [30.0, 10.0, 50.0, 30.0]
+ Shape (shape) : Point{2, Float64}[[30.0, 20.0], [40.0, 30.0], [50.0, 20.0], [40.0, 10.0], [30.0, 20.0]]
+ (is180,is360) : (false, true)
Defining PolyRegions
When defining PolyRegions, the first and last set of (lon,lat) coordinates must be the same (i.e. a closed polygon must be defined)
The GeoRegions will be automatically added to the following files in joinpath(DEPOT_PATH[1],"files","GeoRegions"):
RectRegions will be added to rectlist.txt
PolyRegions will be added to polylist.txt
If the GeoRegion ID TRC already exists, however, this will throw an error
julia
julia> using GeoRegions
+
+julia> RectRegion("TRC","GLB","Test Rectangle Region2",[40,20,52,10])
+[ Info: 2024-08-08T01:51:43.635 - GeoRegions.jl - Checking to see if the ID TRC is in use
+[ Info: 2024-08-08T01:51:43.635 - GeoRegions.jl - The ID TRC is already in use
+ERROR: 2024-08-08T01:51:43.635 - GeoRegions.jl - The GeoRegion TRC has already been defined. Please use another identifier.
Sometimes we would like to independently check if an ID has already been used. We can use the function isGeoRegion() to perform this checkIf the GeoRegion IDTRC\` already exists, however, this will throw an error
julia> using GeoRegions
+
+julia> isGeoRegion("AR6_SEA")
+[ Info: 2024-08-08T01:51:44.198 - GeoRegions.jl - Checking to see if the ID AR6_SEA is in use
+[ Info: 2024-08-08T01:51:44.198 - GeoRegions.jl - The ID AR6_SEA is already in use
+true
+
+julia> isGeoRegion("RND",throw=false)
+[ Info: 2024-08-08T01:51:44.210 - GeoRegions.jl - Checking to see if the ID RND is in use
+┌ Warning: 2024-08-08T01:51:44.210 - GeoRegions.jl - RND is not a valid GeoRegion identifier, use RectRegion(), TiltRegion() or PolyRegion() to add this GeoRegion to the list.
+└ @ GeoRegions ~/work/GeoRegions.jl/GeoRegions.jl/src/georegions/read.jl:562
+false
+
+julia> isGeoRegion("RND")
+[ Info: 2024-08-08T01:51:44.211 - GeoRegions.jl - Checking to see if the ID RND is in use
+ERROR: 2024-08-08T01:51:44.211 - GeoRegions.jl - RND is not a valid GeoRegion identifier, use RectRegion(), TiltRegion() or PolyRegion() to add this GeoRegion to the list.
To remove an existing GeoRegion, we can use the function removeGeoRegion
julia
julia> using GeoRegions
+
+julia> removeGeoRegion("TRC")
+[ Info: 2024-08-08T01:51:44.317 - GeoRegions.jl - Removing the GeoRegion TRC ...
Global GeoRegion
The Global GeoRegion GLB is considered to be an integral part of the GeoRegions.jl package and therefore it cannot be removed.
julia
julia> using GeoRegions
+
+julia> removeGeoRegion("GLB")
+ERROR: 2024-08-08T01:51:44.326 - GeoRegions.jl - The Global GeoRegion "GLB" is an integral part of the GeoRegions.jl package and cannot be removed.
Should one wish to entirely reset the list of GeoRegions, one can call resetGeoRegions(). See Custom GeoRegions for more details.
`,28),t=[k];function l(e,p,E,r,g,d){return a(),i("div",null,t)}const F=s(n,[["render",l]]);export{y as __pageData,F as default};
diff --git a/v6.0.0/assets/georegions_create.md.DjnUQb5I.lean.js b/v6.0.0/assets/georegions_create.md.DjnUQb5I.lean.js
new file mode 100644
index 00000000..6c4b0b27
--- /dev/null
+++ b/v6.0.0/assets/georegions_create.md.DjnUQb5I.lean.js
@@ -0,0 +1 @@
+import{_ as s,c as i,o as a,a7 as h}from"./chunks/framework.Bu--eeyr.js";const y=JSON.parse('{"title":"Creating GeoRegions","description":"","frontmatter":{},"headers":[],"relativePath":"georegions/create.md","filePath":"georegions/create.md","lastUpdated":null}'),n={name:"georegions/create.md"},k=h("",28),t=[k];function l(e,p,E,r,g,d){return a(),i("div",null,t)}const F=s(n,[["render",l]]);export{y as __pageData,F as default};
diff --git a/v6.0.0/assets/georegions_intro.md.BRampsM4.js b/v6.0.0/assets/georegions_intro.md.BRampsM4.js
new file mode 100644
index 00000000..f95e2b4b
--- /dev/null
+++ b/v6.0.0/assets/georegions_intro.md.BRampsM4.js
@@ -0,0 +1,2 @@
+import{_ as e,c as o,o as i,a7 as t}from"./chunks/framework.Bu--eeyr.js";const b=JSON.parse('{"title":"What is a GeoRegion?","description":"","frontmatter":{},"headers":[],"relativePath":"georegions/intro.md","filePath":"georegions/intro.md","lastUpdated":null}'),a={name:"georegions/intro.md"},n=t(`
Simply put, a GeoRegion is a geographic region. In v1 of GeoRegions.jl, a GeoRegion could only be rectilinear in shape. However, as of GeoRegions.jl v2, we use Julia types to differentiate between rectilinear GeoRegions, and GeoRegions of arbitrary polygonal shape:
Rectilinear GeoRegions are denoted by the RectRegion type
Polygonal GeoRegions are denoted by the PolyRegion type
The main difference between a PolyRegion and a RectRegion, is that a PolyRegion also contains a mask field which allows us to extract a data field of a polygonal shape from the rectilinear bounds that are the natural result of a rectilinear grid.
a geographical region that can be either rectilinear region, or a polygonal shape within a specified rectilinear bound.
identified by an ID
itself a subregion of a parentGeoRegion (identified by pID, which must itself be a valid ID)
Default GeoRegions
When using GeoRegions.jl, the default GeoRegion should generally be the global domain, specified by GLB and given by the [N,S,E,W] coordinates [90,-90,360,0]. The Global GeoRegion GLB is considered to be a subset of itself.
`,9),d=[n];function l(c,s,p,r,g,h){return i(),o("div",null,d)}const f=e(a,[["render",l]]);export{b as __pageData,f as default};
diff --git a/v6.0.0/assets/georegions_intro.md.BRampsM4.lean.js b/v6.0.0/assets/georegions_intro.md.BRampsM4.lean.js
new file mode 100644
index 00000000..cdd26614
--- /dev/null
+++ b/v6.0.0/assets/georegions_intro.md.BRampsM4.lean.js
@@ -0,0 +1 @@
+import{_ as e,c as o,o as i,a7 as t}from"./chunks/framework.Bu--eeyr.js";const b=JSON.parse('{"title":"What is a GeoRegion?","description":"","frontmatter":{},"headers":[],"relativePath":"georegions/intro.md","filePath":"georegions/intro.md","lastUpdated":null}'),a={name:"georegions/intro.md"},n=t("",9),d=[n];function l(c,s,p,r,g,h){return i(),o("div",null,d)}const f=e(a,[["render",l]]);export{b as __pageData,f as default};
diff --git a/v6.0.0/assets/georegions_predefined.md.BOa24chq.js b/v6.0.0/assets/georegions_predefined.md.BOa24chq.js
new file mode 100644
index 00000000..cfc55d49
--- /dev/null
+++ b/v6.0.0/assets/georegions_predefined.md.BOa24chq.js
@@ -0,0 +1,39 @@
+import{_ as s,c as i,o as a,a7 as h}from"./chunks/framework.Bu--eeyr.js";const o=JSON.parse('{"title":"List of Available GeoRegions","description":"","frontmatter":{},"headers":[],"relativePath":"georegions/predefined.md","filePath":"georegions/predefined.md","lastUpdated":null}'),n={name:"georegions/predefined.md"},k=h(`
This page contains a list of the GeoRegions that are currently available in GeoRegions.jl.
The default GeoRegion covers the global domain identified as GLB
julia
julia> using GeoRegions
+
+julia> GeoRegion("GLB")
+[ Info: 2024-08-08T01:51:44.337 - GeoRegions.jl - Retrieving information for the GeoRegion defined by the ID GLB
+The Rectilinear Region GLB has the following properties:
+ Region ID (ID) : GLB
+ Parent ID (pID) : GLB
+ Name (name) : Globe
+ Bounds (N,S,E,W) : [90.0, -90.0, 360.0, 0.0]
+ (is180,is360) : (false, true)
Add the GF_ prefix to the 3-letter IDs given in Giorgi & Francisco [2000] to call GeoRegions adapted from this paper. All GeoRegions are defined as the RectRegion type.
Defined in GeoRegions > 1.1
All GF_* domains are defined only in versions ≥1.1
julia
julia> using GeoRegions
+
+julia> GeoRegion("GF_WAF")
+[ Info: 2024-08-08T01:51:44.340 - GeoRegions.jl - Retrieving information for the GeoRegion defined by the ID GF_WAF
+The Rectilinear Region GF_WAF has the following properties:
+ Region ID (ID) : GF_WAF
+ Parent ID (pID) : GLB
+ Name (name) : Western Africa
+ Bounds (N,S,E,W) : [20.0, -15.0, 25.0, -20.0]
+ (is180,is360) : (true, false)
SREX Regions adapted from Seneviratne et al. [2012]
Add the SRX_ prefix to the 3-letter IDs given in Seneviratne et al. [2012] to call GeoRegions adapted from this paper. All GeoRegions are defined as the PolyRegion type, even though many of them are rectilinear.
Defined in GeoRegions ≧ 2
All SRX_* domains are defined only in versions ≥2
julia
julia> using GeoRegions
+
+julia> GeoRegion("SRX_CNA")
+[ Info: 2024-08-08T01:51:44.342 - GeoRegions.jl - Retrieving information for the GeoRegion defined by the ID SRX_CNA
+The Polygonal Region SRX_CNA has the following properties:
+ Region ID (ID) : SRX_CNA
+ Parent ID (pID) : GLB
+ Name (name) : Central North America
+ Bounds (N,S,E,W) : [50.0, 28.6, -85.0, -105.0]
+ Shape (shape) : Point{2, Float64}[[-85.0, 50.0], [-85.0, 28.6], [-105.0, 28.6], [-105.0, 50.0], [-85.0, 50.0]]
+ (is180,is360) : (true, false)
AR6 Regions adapted from Iturbide et al., [2020]
Add the AR6_ prefix to the 3-letter IDs given in Iturbide et al., [2020] to call GeoRegions adapted from this paper. All GeoRegions are defined as the PolyRegion type.
Defined in GeoRegions ≧ 2
All AR6_* domains are defined only in versions ≥2
julia
julia> using GeoRegions
+
+julia> GeoRegion("AR6_EAS")
+[ Info: 2024-08-08T01:51:44.353 - GeoRegions.jl - Retrieving information for the GeoRegion defined by the ID AR6_EAS
+The Polygonal Region AR6_EAS has the following properties:
+ Region ID (ID) : AR6_EAS
+ Parent ID (pID) : GLB
+ Name (name) : East Asia
+ Bounds (N,S,E,W) : [45.0, 19.5, 152.0, 100.0]
+ Shape (shape) : Point{2, Float64}[[100.0, 19.5], [100.0, 37.0], [108.0, 37.0], [117.0, 45.0], [152.0, 45.0], [132.0, 25.0], [132.0, 19.5], [100.0, 19.5]]
+ (is180,is360) : (false, true)
`,16),t=[k];function l(p,e,E,d,r,g){return a(),i("div",null,t)}const F=s(n,[["render",l]]);export{o as __pageData,F as default};
diff --git a/v6.0.0/assets/georegions_predefined.md.BOa24chq.lean.js b/v6.0.0/assets/georegions_predefined.md.BOa24chq.lean.js
new file mode 100644
index 00000000..a68edde4
--- /dev/null
+++ b/v6.0.0/assets/georegions_predefined.md.BOa24chq.lean.js
@@ -0,0 +1 @@
+import{_ as s,c as i,o as a,a7 as h}from"./chunks/framework.Bu--eeyr.js";const o=JSON.parse('{"title":"List of Available GeoRegions","description":"","frontmatter":{},"headers":[],"relativePath":"georegions/predefined.md","filePath":"georegions/predefined.md","lastUpdated":null}'),n={name:"georegions/predefined.md"},k=h("",16),t=[k];function l(p,e,E,d,r,g){return a(),i("div",null,t)}const F=s(n,[["render",l]]);export{o as __pageData,F as default};
diff --git a/v6.0.0/assets/georegions_read.md.aVhjiFRk.js b/v6.0.0/assets/georegions_read.md.aVhjiFRk.js
new file mode 100644
index 00000000..b680a00a
--- /dev/null
+++ b/v6.0.0/assets/georegions_read.md.aVhjiFRk.js
@@ -0,0 +1,27 @@
+import{_ as i,c as s,o as e,a7 as a}from"./chunks/framework.Bu--eeyr.js";const u=JSON.parse('{"title":"Reading in Defined GeoRegion Information","description":"","frontmatter":{},"headers":[],"relativePath":"georegions/read.md","filePath":"georegions/read.md","lastUpdated":null}'),n={name:"georegions/read.md"},t=a(`
The Difference between Bounds and Shape in a PolyRegion
What is the difference between the fields bound and shape in a PolyRegion? The answer is simple: a bound is a rectilinear-region in the lon-lat coordinate system, while the shape denotes the actual PolyRegion. We retrieve the longitude and latitude coordinates for the bound and shape fields using the function coordGeoRegion().
Bound and Shape in RectRegion
There is no field shape in a RectRegion because the shape of a RectRegion is defined by its rectilinear bound.
From plotting the bounds (blon,blat) and the shape(slon,slat), we see that the bound is the region defined by the westernmost, easternmost, northernmost and southernmost coordinates of the shape.
`,20),o=[t];function l(p,h,d,r,g,c){return e(),s("div",null,o)}const E=i(n,[["render",l]]);export{u as __pageData,E as default};
diff --git a/v6.0.0/assets/georegions_read.md.aVhjiFRk.lean.js b/v6.0.0/assets/georegions_read.md.aVhjiFRk.lean.js
new file mode 100644
index 00000000..8614d76d
--- /dev/null
+++ b/v6.0.0/assets/georegions_read.md.aVhjiFRk.lean.js
@@ -0,0 +1 @@
+import{_ as i,c as s,o as e,a7 as a}from"./chunks/framework.Bu--eeyr.js";const u=JSON.parse('{"title":"Reading in Defined GeoRegion Information","description":"","frontmatter":{},"headers":[],"relativePath":"georegions/read.md","filePath":"georegions/read.md","lastUpdated":null}'),n={name:"georegions/read.md"},t=a("",20),o=[t];function l(p,h,d,r,g,c){return e(),s("div",null,o)}const E=i(n,[["render",l]]);export{u as __pageData,E as default};
diff --git a/v6.0.0/assets/index.md.BB2ui9LQ.js b/v6.0.0/assets/index.md.BB2ui9LQ.js
new file mode 100644
index 00000000..d3a3dfb2
--- /dev/null
+++ b/v6.0.0/assets/index.md.BB2ui9LQ.js
@@ -0,0 +1,2 @@
+import{_ as i,c as s,o as e,a7 as t}from"./chunks/framework.Bu--eeyr.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{"layout":"home","hero":{"name":"GeoRegions.jl","text":"Geographic Regions for Gridded Data","tagline":"Extract and analyze gridded Earth Observation data in a few simple steps.","image":{"src":"/logo.png","alt":"GeoRegions"},"actions":[{"theme":"brand","text":"Getting Started","link":"/georegions/intro"},{"theme":"alt","text":"Tutorials","link":"/using/isin"},{"theme":"alt","text":"View on Github","link":"https://github.com/juliaclimate/GeoRegions.jl"}]},"features":[{"icon":"","title":"Simple","details":"Only Longitude/Latitude coordinates needed","link":"/lists/default"},{"icon":"","title":"Customizable","details":"Define your own custom Geographic Regions","link":"/georegions/create"},{"icon":"","title":"Useful","details":"Data Extraction made easy using GeoRegions.jl","link":"/using/extract"}]},"headers":[],"relativePath":"index.md","filePath":"index.md","lastUpdated":null}'),a={name:"index.md"},n=t(`
The latest version of GeoRegions can be installed using the Julia package manager (accessed by pressing ] in the Julia command prompt)
julia
julia> ]
+(@v1.10) pkg> add GeoRegions
You can update GeoRegions.jl to the latest version using
julia
(@v1.10) pkg> update GeoRegions
And if you want to get the latest release without waiting for me to update the Julia Registry (although this generally isn't necessary since I make a point to release patch versions as soon as I find bugs or add new working features), you may fix the version to the main branch of the GitHub repository:
If you are interested in using GeoRegions.jl or are trying to figure out how to use it, please feel free to ask me questions and get in touch! Please feel free to open an issue if you have any questions, comments, suggestions, etc!
`,9),l=[n];function o(h,p,r,d,g,k){return e(),s("div",null,l)}const E=i(a,[["render",o]]);export{u as __pageData,E as default};
diff --git a/v6.0.0/assets/index.md.BB2ui9LQ.lean.js b/v6.0.0/assets/index.md.BB2ui9LQ.lean.js
new file mode 100644
index 00000000..e92ea0e4
--- /dev/null
+++ b/v6.0.0/assets/index.md.BB2ui9LQ.lean.js
@@ -0,0 +1 @@
+import{_ as i,c as s,o as e,a7 as t}from"./chunks/framework.Bu--eeyr.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{"layout":"home","hero":{"name":"GeoRegions.jl","text":"Geographic Regions for Gridded Data","tagline":"Extract and analyze gridded Earth Observation data in a few simple steps.","image":{"src":"/logo.png","alt":"GeoRegions"},"actions":[{"theme":"brand","text":"Getting Started","link":"/georegions/intro"},{"theme":"alt","text":"Tutorials","link":"/using/isin"},{"theme":"alt","text":"View on Github","link":"https://github.com/juliaclimate/GeoRegions.jl"}]},"features":[{"icon":"","title":"Simple","details":"Only Longitude/Latitude coordinates needed","link":"/lists/default"},{"icon":"","title":"Customizable","details":"Define your own custom Geographic Regions","link":"/georegions/create"},{"icon":"","title":"Useful","details":"Data Extraction made easy using GeoRegions.jl","link":"/using/extract"}]},"headers":[],"relativePath":"index.md","filePath":"index.md","lastUpdated":null}'),a={name:"index.md"},n=t("",9),l=[n];function o(h,p,r,d,g,k){return e(),s("div",null,l)}const E=i(a,[["render",o]]);export{u as __pageData,E as default};
diff --git a/v6.0.0/assets/inter-italic-cyrillic-ext.r48I6akx.woff2 b/v6.0.0/assets/inter-italic-cyrillic-ext.r48I6akx.woff2
new file mode 100644
index 00000000..b6b603d5
Binary files /dev/null and b/v6.0.0/assets/inter-italic-cyrillic-ext.r48I6akx.woff2 differ
diff --git a/v6.0.0/assets/inter-italic-cyrillic.By2_1cv3.woff2 b/v6.0.0/assets/inter-italic-cyrillic.By2_1cv3.woff2
new file mode 100644
index 00000000..def40a4f
Binary files /dev/null and b/v6.0.0/assets/inter-italic-cyrillic.By2_1cv3.woff2 differ
diff --git a/v6.0.0/assets/inter-italic-greek-ext.1u6EdAuj.woff2 b/v6.0.0/assets/inter-italic-greek-ext.1u6EdAuj.woff2
new file mode 100644
index 00000000..e070c3d3
Binary files /dev/null and b/v6.0.0/assets/inter-italic-greek-ext.1u6EdAuj.woff2 differ
diff --git a/v6.0.0/assets/inter-italic-greek.DJ8dCoTZ.woff2 b/v6.0.0/assets/inter-italic-greek.DJ8dCoTZ.woff2
new file mode 100644
index 00000000..a3c16ca4
Binary files /dev/null and b/v6.0.0/assets/inter-italic-greek.DJ8dCoTZ.woff2 differ
diff --git a/v6.0.0/assets/inter-italic-latin-ext.CN1xVJS-.woff2 b/v6.0.0/assets/inter-italic-latin-ext.CN1xVJS-.woff2
new file mode 100644
index 00000000..2210a899
Binary files /dev/null and b/v6.0.0/assets/inter-italic-latin-ext.CN1xVJS-.woff2 differ
diff --git a/v6.0.0/assets/inter-italic-latin.C2AdPX0b.woff2 b/v6.0.0/assets/inter-italic-latin.C2AdPX0b.woff2
new file mode 100644
index 00000000..790d62dc
Binary files /dev/null and b/v6.0.0/assets/inter-italic-latin.C2AdPX0b.woff2 differ
diff --git a/v6.0.0/assets/inter-italic-vietnamese.BSbpV94h.woff2 b/v6.0.0/assets/inter-italic-vietnamese.BSbpV94h.woff2
new file mode 100644
index 00000000..1eec0775
Binary files /dev/null and b/v6.0.0/assets/inter-italic-vietnamese.BSbpV94h.woff2 differ
diff --git a/v6.0.0/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2 b/v6.0.0/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2
new file mode 100644
index 00000000..2cfe6153
Binary files /dev/null and b/v6.0.0/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2 differ
diff --git a/v6.0.0/assets/inter-roman-cyrillic.C5lxZ8CY.woff2 b/v6.0.0/assets/inter-roman-cyrillic.C5lxZ8CY.woff2
new file mode 100644
index 00000000..e3886dd1
Binary files /dev/null and b/v6.0.0/assets/inter-roman-cyrillic.C5lxZ8CY.woff2 differ
diff --git a/v6.0.0/assets/inter-roman-greek-ext.CqjqNYQ-.woff2 b/v6.0.0/assets/inter-roman-greek-ext.CqjqNYQ-.woff2
new file mode 100644
index 00000000..36d67487
Binary files /dev/null and b/v6.0.0/assets/inter-roman-greek-ext.CqjqNYQ-.woff2 differ
diff --git a/v6.0.0/assets/inter-roman-greek.BBVDIX6e.woff2 b/v6.0.0/assets/inter-roman-greek.BBVDIX6e.woff2
new file mode 100644
index 00000000..2bed1e85
Binary files /dev/null and b/v6.0.0/assets/inter-roman-greek.BBVDIX6e.woff2 differ
diff --git a/v6.0.0/assets/inter-roman-latin-ext.4ZJIpNVo.woff2 b/v6.0.0/assets/inter-roman-latin-ext.4ZJIpNVo.woff2
new file mode 100644
index 00000000..9a8d1e2b
Binary files /dev/null and b/v6.0.0/assets/inter-roman-latin-ext.4ZJIpNVo.woff2 differ
diff --git a/v6.0.0/assets/inter-roman-latin.Di8DUHzh.woff2 b/v6.0.0/assets/inter-roman-latin.Di8DUHzh.woff2
new file mode 100644
index 00000000..07d3c53a
Binary files /dev/null and b/v6.0.0/assets/inter-roman-latin.Di8DUHzh.woff2 differ
diff --git a/v6.0.0/assets/inter-roman-vietnamese.BjW4sHH5.woff2 b/v6.0.0/assets/inter-roman-vietnamese.BjW4sHH5.woff2
new file mode 100644
index 00000000..57bdc22a
Binary files /dev/null and b/v6.0.0/assets/inter-roman-vietnamese.BjW4sHH5.woff2 differ
diff --git a/v6.0.0/assets/landsea_create.md.CM6v8mp_.js b/v6.0.0/assets/landsea_create.md.CM6v8mp_.js
new file mode 100644
index 00000000..34d1a2e9
--- /dev/null
+++ b/v6.0.0/assets/landsea_create.md.CM6v8mp_.js
@@ -0,0 +1,51 @@
+import{_ as s,c as a,o as i,a7 as n}from"./chunks/framework.Bu--eeyr.js";const E=JSON.parse('{"title":"Loading and Saving Land-Sea Mask Datasets","description":"","frontmatter":{},"headers":[],"relativePath":"landsea/create.md","filePath":"landsea/create.md","lastUpdated":null}'),e={name:"landsea/create.md"},t=n(`
The Land-Sea Dataset can be obtained using the function getLandSea(). There are two options:
Saving the LandSea dataset as a local NetCDF file
Extract the LandSea dataset directly from the OPeNDAP servers
Option (1) has a longer initial cost, because you have to download the global file, and then use the data from the global file to extract out the information for the GeoRegion of interest. However, once the data has been downloaded once, you don't need to download the data again and this greatly speeds up latency time.
Option (2) however, is much faster for smaller GeoRegions when loading the data directly from OPeNDAP is much easier than downloading the entire dataset. However, loading data directly from OPeNDAP comes with its own noticeable latency, which can add up if done iteratively.
You can toggle between the two options using the keyword argument savelsd - true sets the function to option 1, and false is option 2.
See end of the page for the API.
For more details on smoothing the land-sea mask, such that distance from the actual coastline is better resolved, please see this page
Retrieve ETOPO 2022 data for a GeoRegion from OPeNDAP servers
Arguments
geo : The GeoRegion of interest
Keyword Arguments
path :: The path to which an ETOPO folder is created within and ETOPO LandSea data saved into
resolution : The resolution of the dataset to be downloaded, in units of arc-seconds. Possible values are 15, 30 and 60, default is 60.
bedrock, geoid : The type of ETOPO data (bedrock, geoid, ice-surface) to be downloaded. Bedrock has priority over geoid, so if both are true, the bedrock is downloaded.
savelsd : Save LandSea dataset into a local NetCDF file.
returnlsd : If savelsd = true, you can choose to simply save the data into the NetCDF file, or load return it as a LandSea dataset. Otherwise, if savelsd = false, you always return the LandSea dataset.
smooth : If smooth = true, then you can smooth the land-sea mask using the Gaussian Filter of ImageFiltering.jl such that the coastline (i.e. the separation between land and ocean) becomes blurred.
σlon : Smooth in the longitude direction (every increase of 1 in σlon roughly corresponds to 8 pixels)
σlat : Smooth in the latitude direction (every increase of 1 in σlat roughly corresponds to 8 pixels)
iterations : Iterations of gausssian smoothing, the higher, the closer the smoothing follows a semi-log. 50-100 iterations is generally enough.
`,17),l=[t];function p(h,o,d,k,r,c){return i(),a("div",null,l)}const u=s(e,[["render",p]]);export{E as __pageData,u as default};
diff --git a/v6.0.0/assets/landsea_create.md.CM6v8mp_.lean.js b/v6.0.0/assets/landsea_create.md.CM6v8mp_.lean.js
new file mode 100644
index 00000000..b4173e24
--- /dev/null
+++ b/v6.0.0/assets/landsea_create.md.CM6v8mp_.lean.js
@@ -0,0 +1 @@
+import{_ as s,c as a,o as i,a7 as n}from"./chunks/framework.Bu--eeyr.js";const E=JSON.parse('{"title":"Loading and Saving Land-Sea Mask Datasets","description":"","frontmatter":{},"headers":[],"relativePath":"landsea/create.md","filePath":"landsea/create.md","lastUpdated":null}'),e={name:"landsea/create.md"},t=n("",17),l=[t];function p(h,o,d,k,r,c){return i(),a("div",null,l)}const u=s(e,[["render",p]]);export{E as __pageData,u as default};
diff --git a/v6.0.0/assets/landsea_intro.md.pYe5xaAo.js b/v6.0.0/assets/landsea_intro.md.pYe5xaAo.js
new file mode 100644
index 00000000..3f8b01d3
--- /dev/null
+++ b/v6.0.0/assets/landsea_intro.md.pYe5xaAo.js
@@ -0,0 +1 @@
+import{_ as e,c as a,o as t,a7 as o}from"./chunks/framework.Bu--eeyr.js";const b=JSON.parse('{"title":"Land-Sea Mask Datasets","description":"","frontmatter":{},"headers":[],"relativePath":"landsea/intro.md","filePath":"landsea/intro.md","lastUpdated":null}'),s={name:"landsea/intro.md"},i=o('
The data is loaded into a LandSea dataset struct-type, which is a subset of the supertype AbstractLandSea. We export this supertype, and its abstract subtypes LandSeaTopo and LandSeaFlat, so that other packages can extend the use of these abstract types with their own LandSea Types.
For examples of how to extend the functionality of the LandSea datasets, you may refer to the following examples:
',12),n=[i];function d(l,r,p,c,h,g){return t(),a("div",null,n)}const f=e(s,[["render",d]]);export{b as __pageData,f as default};
diff --git a/v6.0.0/assets/landsea_intro.md.pYe5xaAo.lean.js b/v6.0.0/assets/landsea_intro.md.pYe5xaAo.lean.js
new file mode 100644
index 00000000..8f82c483
--- /dev/null
+++ b/v6.0.0/assets/landsea_intro.md.pYe5xaAo.lean.js
@@ -0,0 +1 @@
+import{_ as e,c as a,o as t,a7 as o}from"./chunks/framework.Bu--eeyr.js";const b=JSON.parse('{"title":"Land-Sea Mask Datasets","description":"","frontmatter":{},"headers":[],"relativePath":"landsea/intro.md","filePath":"landsea/intro.md","lastUpdated":null}'),s={name:"landsea/intro.md"},i=o("",12),n=[i];function d(l,r,p,c,h,g){return t(),a("div",null,n)}const f=e(s,[["render",d]]);export{b as __pageData,f as default};
diff --git a/v6.0.0/assets/landsea_smooth.md.Cb82iFV6.js b/v6.0.0/assets/landsea_smooth.md.Cb82iFV6.js
new file mode 100644
index 00000000..3b53b0ee
--- /dev/null
+++ b/v6.0.0/assets/landsea_smooth.md.Cb82iFV6.js
@@ -0,0 +1,100 @@
+import{_ as s,c as a,o as i,a7 as n}from"./chunks/framework.Bu--eeyr.js";const E=JSON.parse('{"title":"Smoothing of the Land-Sea Mask Dataset","description":"","frontmatter":{},"headers":[],"relativePath":"landsea/smooth.md","filePath":"landsea/smooth.md","lastUpdated":null}'),e={name:"landsea/smooth.md"},t=n(`
The land-sea mask created from the ETOPO dataset comprises of 1s and 0s, where 1 denotes land and 0 denotes the ocean. However, it may often be useful to sort grid points not only by their land-surface type, but how distant they are from the coastline. GeoRegions.jl uses Gaussian Filtering from ImageFiltering.jl to perform a smoothing of the land-sea mask.
The degree of smoothing is expressed by the arguments σlon and σlat, which are integer inputs respectively.
You can get a smoothed land-sea mask via two means:
Calling the smoothing directly when retrieving the Land-Sea Dataset (recommended)
Smoothing a preexisting Land-Sea Dataset that has been loaded (not recommended)
The API for smoothing is listed below. However, it is worth nothing that when implementing the smoothing, you need to first call a larger GeoRegion around the GeoRegion of interest as a buffer.
You see here that smoothing the land-sea mask directly upon itself causes errors at the edges of the grid. This is because the smoothing applied is a circular smoothing, meaning that the boundaries are considered to be doubly-periodic, and thus bleed into each other. Thus, it is always best practice to call the smoothing directly when retrieving the Land-Sea dataset.
Perform a gaussian smoothing on the Land-Sea mask given a LandSeaTopo Mask dataset. If usetopography is set to true, then before the filtering, any points where height >= 0 is set to 1, and <0 is set = 0.
The smoothed land-sea mask will be saved into lsd.lsm
Arguments
lsd : A Land-Sea Dataset with Topography
Keyword Arguments
σlon : Smooth in the longitude direction (every increase of 1 in σlon roughly corresponds to 8 pixels)
σlat : Smooth in the latitude direction (every increase of 1 in σlat roughly corresponds to 8 pixels)
iterations : Iterations of gausssian smoothing, the higher, the closer the smoothing follows a semi-log. 50-100 iterations is generally enough.
topography : If true, then the land-sea mask that is smoothed will be based on the topography instead of the raw ERA5 land-sea mask
`,20),l=[t];function p(h,o,k,d,r,g){return i(),a("div",null,l)}const u=s(e,[["render",p]]);export{E as __pageData,u as default};
diff --git a/v6.0.0/assets/landsea_smooth.md.Cb82iFV6.lean.js b/v6.0.0/assets/landsea_smooth.md.Cb82iFV6.lean.js
new file mode 100644
index 00000000..23a8b62d
--- /dev/null
+++ b/v6.0.0/assets/landsea_smooth.md.Cb82iFV6.lean.js
@@ -0,0 +1 @@
+import{_ as s,c as a,o as i,a7 as n}from"./chunks/framework.Bu--eeyr.js";const E=JSON.parse('{"title":"Smoothing of the Land-Sea Mask Dataset","description":"","frontmatter":{},"headers":[],"relativePath":"landsea/smooth.md","filePath":"landsea/smooth.md","lastUpdated":null}'),e={name:"landsea/smooth.md"},t=n("",20),l=[t];function p(h,o,k,d,r,g){return i(),a("div",null,l)}const u=s(e,[["render",p]]);export{E as __pageData,u as default};
diff --git a/v6.0.0/assets/lists_api.md.Cad_bBQq.js b/v6.0.0/assets/lists_api.md.Cad_bBQq.js
new file mode 100644
index 00000000..26955196
--- /dev/null
+++ b/v6.0.0/assets/lists_api.md.Cad_bBQq.js
@@ -0,0 +1,23 @@
+import{_ as s,c as i,o as a,a7 as e}from"./chunks/framework.Bu--eeyr.js";const E=JSON.parse('{"title":"Tabular Listings of GeoRegions","description":"","frontmatter":{},"headers":[],"relativePath":"lists/api.md","filePath":"lists/api.md","lastUpdated":null}'),l={name:"lists/api.md"},n=e(`
A list of GeoRegions and their basic properties can be called using the function tableGeoRegions(), which lists all available GeoRegions, both predefined and custom/user-defined.
Display all available GeoRegions in tabular format.
Keyword Arguments
onlycustom : If true, only custom, user-defined GeoRegions will be displayed. To show all available GeoRegions (including predefined GeoRegions), set onlycustom to false
Besides listing all available GeoRegions, it is also possible to list a variety of different specifications of GeoRegions with the tableGeoRegions() function, as well as tableRectRegions() and tablePolyRegions().
Similarly, it is also possible to list the GeoRegions in custom files. The template for these files can be retrieved using the function templateGeoRegions()
Display all available GeoRegions in tabular format.
Keyword Arguments
onlycustom : If true, only custom, user-defined GeoRegions will be displayed. To show all available GeoRegions (including predefined GeoRegions), set onlycustom to false
`,15),t=[n];function h(p,o,k,r,d,g){return a(),i("div",null,t)}const y=s(l,[["render",h]]);export{E as __pageData,y as default};
diff --git a/v6.0.0/assets/lists_api.md.Cad_bBQq.lean.js b/v6.0.0/assets/lists_api.md.Cad_bBQq.lean.js
new file mode 100644
index 00000000..792c9081
--- /dev/null
+++ b/v6.0.0/assets/lists_api.md.Cad_bBQq.lean.js
@@ -0,0 +1 @@
+import{_ as s,c as i,o as a,a7 as e}from"./chunks/framework.Bu--eeyr.js";const E=JSON.parse('{"title":"Tabular Listings of GeoRegions","description":"","frontmatter":{},"headers":[],"relativePath":"lists/api.md","filePath":"lists/api.md","lastUpdated":null}'),l={name:"lists/api.md"},n=e("",15),t=[n];function h(p,o,k,r,d,g){return a(),i("div",null,t)}const y=s(l,[["render",h]]);export{E as __pageData,y as default};
diff --git a/v6.0.0/assets/lists_default.md.B49KRQ7R.js b/v6.0.0/assets/lists_default.md.B49KRQ7R.js
new file mode 100644
index 00000000..2de506bb
--- /dev/null
+++ b/v6.0.0/assets/lists_default.md.B49KRQ7R.js
@@ -0,0 +1,3 @@
+import{_ as s,c as e,o as i,a7 as a}from"./chunks/framework.Bu--eeyr.js";const _=JSON.parse('{"title":"Default List of All Predefined GeoRegions","description":"","frontmatter":{},"headers":[],"relativePath":"lists/default.md","filePath":"lists/default.md","lastUpdated":null}'),t={name:"lists/default.md"},l=a(`
using GeoRegions
+resetGeoRegions(allfiles=true)
+tableGeoRegions()
`,2),n=[l];function o(d,h,p,r,k,c){return i(),e("div",null,n)}const u=s(t,[["render",o]]);export{_ as __pageData,u as default};
diff --git a/v6.0.0/assets/lists_default.md.B49KRQ7R.lean.js b/v6.0.0/assets/lists_default.md.B49KRQ7R.lean.js
new file mode 100644
index 00000000..7946dca3
--- /dev/null
+++ b/v6.0.0/assets/lists_default.md.B49KRQ7R.lean.js
@@ -0,0 +1 @@
+import{_ as s,c as e,o as i,a7 as a}from"./chunks/framework.Bu--eeyr.js";const _=JSON.parse('{"title":"Default List of All Predefined GeoRegions","description":"","frontmatter":{},"headers":[],"relativePath":"lists/default.md","filePath":"lists/default.md","lastUpdated":null}'),t={name:"lists/default.md"},l=a("",2),n=[l];function o(d,h,p,r,k,c){return i(),e("div",null,n)}const u=s(t,[["render",o]]);export{_ as __pageData,u as default};
diff --git a/v6.0.0/assets/regiongrids_create.md.BlJAOEEu.js b/v6.0.0/assets/regiongrids_create.md.BlJAOEEu.js
new file mode 100644
index 00000000..34f092d2
--- /dev/null
+++ b/v6.0.0/assets/regiongrids_create.md.BlJAOEEu.js
@@ -0,0 +1,74 @@
+import{_ as s,c as i,o as a,a7 as n}from"./chunks/framework.Bu--eeyr.js";const E=JSON.parse('{"title":"RegionGrid: Applying GeoRegions to Gridded Data","description":"","frontmatter":{},"headers":[],"relativePath":"regiongrids/create.md","filePath":"regiongrids/create.md","lastUpdated":null}'),e={name:"regiongrids/create.md"},l=n(`
In this section, we go through the basic steps of creating a RegionGrid for RectRegions and PolyRegions. See if you can spot the differences between the RegionGrids generated by the two different types.
The Polygonal Grid has the following properties:
+ Grid Bounds (grid) : [52, 39, 55, 50]
+ Longitude Indices (ilon) : [50, 51, 52, 53, 54, 55]
+ Latitude Indices (ilat) : [39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52]
+ Longitude Points (lon) : [-82.0, -80.0, -78.0, -76.0, -74.0, -72.0]
+ Latitude Points (lat) : [-14.0, -12.0, -10.0, -8.0, -6.0, -4.0, -2.0, 0.0, 2.0, 4.0, 6.0, 8.0, 10.0, 12.0]
+ Region Size (nlon * nlat) : 6 lon points x 14 lat points
+ Region Mask (sum(mask) / (nlon * nlat)) : 70 / 84
So here, we see that in this PolyGrid example, the RegionGrid contains an additional field mask that, within the rectilinear longitude-latitude shape bounding the GeoRegion (because gridded data here is assumed to be rectilinear), the data is within the GeoRegion. Values of 1 indicate it is within the GeoRegion, otherwise the values are \`NaN.
julia
ggrd.mask
6×14 Matrix{Float64}:
+ NaN NaN 1.0 1.0 1.0 1.0 1.0 … NaN NaN NaN NaN NaN
+ NaN 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 NaN NaN NaN
+ 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 NaN NaN
+ 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 NaN
+ 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0
+ 1.0 1.0 1.0 1.0 1.0 1.0 1.0 … 1.0 1.0 1.0 1.0 1.0
The PolyGrid type derived from a PolyRegion allows us to apply a mask to filter out data that is within the shape of a PolyRegion on a rectilinear lon-lat grid defined by the bound of a PolyRegion. We consider the following example of an AR6 region over South Asia:
Creates a RectGrid or PolyGrid type based on the following arguments. This method is suitable for rectilinear grids of longitude/latitude output such as from Isca, or from satellite and reanalysis gridded datasets.
Arguments
geo : A GeoRegion of interest
lon : A vector or AbstractRange containing the longitude points
lat : A vector or AbstractRange containing the latitude points
Creates a RegionMask type based on the following arguments. This method is more suitable for non-rectilinear grids of longitude and latitude points, such as in the output of WRF or CESM.
`,26),t=[l];function p(h,k,o,d,r,g){return a(),i("div",null,t)}const y=s(e,[["render",p]]);export{E as __pageData,y as default};
diff --git a/v6.0.0/assets/regiongrids_create.md.BlJAOEEu.lean.js b/v6.0.0/assets/regiongrids_create.md.BlJAOEEu.lean.js
new file mode 100644
index 00000000..0c80bf7b
--- /dev/null
+++ b/v6.0.0/assets/regiongrids_create.md.BlJAOEEu.lean.js
@@ -0,0 +1 @@
+import{_ as s,c as i,o as a,a7 as n}from"./chunks/framework.Bu--eeyr.js";const E=JSON.parse('{"title":"RegionGrid: Applying GeoRegions to Gridded Data","description":"","frontmatter":{},"headers":[],"relativePath":"regiongrids/create.md","filePath":"regiongrids/create.md","lastUpdated":null}'),e={name:"regiongrids/create.md"},l=n("",26),t=[l];function p(h,k,o,d,r,g){return a(),i("div",null,t)}const y=s(e,[["render",p]]);export{E as __pageData,y as default};
diff --git a/v6.0.0/assets/regiongrids_intro.md.Dj2V1J0q.js b/v6.0.0/assets/regiongrids_intro.md.Dj2V1J0q.js
new file mode 100644
index 00000000..9eb339bf
--- /dev/null
+++ b/v6.0.0/assets/regiongrids_intro.md.Dj2V1J0q.js
@@ -0,0 +1,3 @@
+import{_ as e,c as i,o,a7 as t}from"./chunks/framework.Bu--eeyr.js";const u=JSON.parse('{"title":"What is a RegionGrid?","description":"","frontmatter":{},"headers":[],"relativePath":"regiongrids/intro.md","filePath":"regiongrids/intro.md","lastUpdated":null}'),a={name:"regiongrids/intro.md"},n=t(`
But how do we go from defining a GeoRegion, to extracting data for that GeoRegion? The answer is with the information in the RegionGrid types, which maps gridded lon-lat data to a given GeoRegion as follows:
Mapping gridded lon-lat data to a RectRegion gives a RectGrid structure
Mapping gridded lon-lat data to a PolyRegion gives a PolyGrid structure
Mapping non-rectilinear gridded lon-lat data to a RegionMask gives a RegionMask structure
However, the basic uses of RectGrid and PolyGrid are the same, and as such their differences are largely transparent to the user, except for one field found in PolyGrid, the mask, which will be elaborated upon later.
So basically a RegionGrid contains information on the indices of the gridded data that are part of the GeoRegion, thus helping us extract the relevant data for a given GeoRegion.
Fear not! I have template files that one can use to define RectRegions and PolyRegions. Simply use the templateGeoRegion() to copy the templates into a directory of your choice.
Defining PolyRegions
When defining PolyRegions, the first and last set of (lon,lat) coordinates must be the same (i.e. a closed polygon must be defined)
We can then read in GeoRegions from your custom file using the function addGeoRegions(), which will then read all the GeoRegion information in the file and add it to the list of GeoRegions.
julia
addGeoRegions("recttest.txt")
+GeoRegion("TRP")
The Rectilinear Region TRP has the following properties:
+ Region ID (ID) : TRP
+ Parent ID (pID) : GLB
+ Name (name) : Tropical
+ Bounds (N,S,E,W) : [30.0, -30.0, 360.0, 0.0]
+ (is180,is360) : (false, true)
Should one wish to entirely reset the list of GeoRegions, one can call resetGeoRegions():
julia
resetGeoRegions()
[ Info: 2024-08-08T01:51:58.735 - GeoRegions.jl - Resetting the custom lists of GeoRegions back to the default
+┌ Warning: 2024-08-08T01:51:58.735 - GeoRegions.jl - Overwriting /home/runner/.julia/files/GeoRegions/rectlist.txt with original file in /home/runner/work/GeoRegions.jl/GeoRegions.jl/src/georegions/../../extra/rectlist.txt ...
+└ @ GeoRegions ~/work/GeoRegions.jl/GeoRegions.jl/src/georegions/read.jl:473
+┌ Warning: 2024-08-08T01:51:58.740 - GeoRegions.jl - Overwriting /home/runner/.julia/files/GeoRegions/polylist.txt with original file in /home/runner/work/GeoRegions.jl/GeoRegions.jl/src/georegions/../../extra/polylist.txt ...
+└ @ GeoRegions ~/work/GeoRegions.jl/GeoRegions.jl/src/georegions/read.jl:473
+┌ Warning: 2024-08-08T01:51:58.740 - GeoRegions.jl - Overwriting /home/runner/.julia/files/GeoRegions/tiltlist.txt with original file in /home/runner/work/GeoRegions.jl/GeoRegions.jl/src/georegions/../../extra/tiltlist.txt ...
+└ @ GeoRegions ~/work/GeoRegions.jl/GeoRegions.jl/src/georegions/read.jl:473
And if one wishes to reset the predefined list of GeoRegions, we can do:
Reset all the files containing GeoRegion information back to the default.
Arguments
allfiles : If true, reset the GeoRegions defined in Giorgi & Francisco [2000], AR6 Regions (Iturbide et al., 2020; ESSD) and Seneviratne et al. [2012] as well. If false, only reset the custom GeoRegions.
`,25),o=[t];function l(p,r,h,d,g,c){return i(),s("div",null,o)}const b=e(n,[["render",l]]);export{u as __pageData,b as default};
diff --git a/v6.0.0/assets/using_custom.md.BZlJdPS8.lean.js b/v6.0.0/assets/using_custom.md.BZlJdPS8.lean.js
new file mode 100644
index 00000000..78c40086
--- /dev/null
+++ b/v6.0.0/assets/using_custom.md.BZlJdPS8.lean.js
@@ -0,0 +1 @@
+import{_ as e,c as s,o as i,a7 as a}from"./chunks/framework.Bu--eeyr.js";const u=JSON.parse('{"title":"Adding GeoRegions from Templates","description":"","frontmatter":{},"headers":[],"relativePath":"using/custom.md","filePath":"using/custom.md","lastUpdated":null}'),n={name:"using/custom.md"},t=a("",25),o=[t];function l(p,r,h,d,g,c){return i(),s("div",null,o)}const b=e(n,[["render",l]]);export{u as __pageData,b as default};
diff --git a/v6.0.0/assets/using_extract.md.Cj1zD3i2.js b/v6.0.0/assets/using_extract.md.Cj1zD3i2.js
new file mode 100644
index 00000000..4474500c
--- /dev/null
+++ b/v6.0.0/assets/using_extract.md.Cj1zD3i2.js
@@ -0,0 +1,100 @@
+import{_ as s,c as a,o as n,a7 as i}from"./chunks/framework.Bu--eeyr.js";const N=JSON.parse('{"title":"Extracting Gridded Data using RegionGrid","description":"","frontmatter":{},"headers":[],"relativePath":"using/extract.md","filePath":"using/extract.md","lastUpdated":null}'),e={name:"using/extract.md"},p=i(`
Suppose we have Global Data. However, we are only interested in a specific region (say, the North Central American region as defined in AR6), how do we extract data for this region?
The simple answer is, we use the extractGrid() function, which takes in a RegionGrid and a data array, and returns a new data array for the GeoRegion.
The Polygonal Region AR6_NCA has the following properties:
+ Region ID (ID) : AR6_NCA
+ Parent ID (pID) : GLB
+ Name (name) : Northern Central America
+ Bounds (N,S,E,W) : [33.8, 16.0, -90.0, -122.5]
+ Shape (shape) : Point{2, Float64}[[-90.0, 25.0], [-104.5, 16.0], [-122.5, 33.8], [-105.0, 33.8], [-90.0, 25.0]]
+ (is180,is360) : (true, false)
We also define some sample test data in the global domain
33×18 Matrix{Float64}:
+ NaN NaN NaN NaN NaN NaN … NaN NaN NaN
+ NaN NaN NaN NaN NaN NaN NaN NaN 0.265381
+ NaN NaN NaN NaN NaN NaN NaN -0.224422 0.567931
+ NaN NaN NaN NaN NaN NaN 1.67151 0.0993618 0.778459
+ NaN NaN NaN NaN NaN NaN 0.163252 -0.644675 -1.14833
+ NaN NaN NaN NaN NaN NaN … -1.43777 0.514898 0.791617
+ NaN NaN NaN NaN NaN NaN -0.702647 0.32758 -0.726071
+ NaN NaN NaN NaN NaN NaN -0.379183 1.83802 0.239722
+ NaN NaN NaN NaN NaN NaN 0.347784 0.0311085 -0.482691
+ NaN NaN NaN NaN NaN NaN -0.588135 2.95287 0.680521
+ ⋮ ⋮ ⋱ ⋮
+ NaN NaN NaN NaN NaN 0.554907 NaN NaN NaN
+ NaN NaN NaN NaN NaN 1.17125 … NaN NaN NaN
+ NaN NaN NaN NaN NaN NaN NaN NaN NaN
+ NaN NaN NaN NaN NaN NaN NaN NaN NaN
+ NaN NaN NaN NaN NaN NaN NaN NaN NaN
+ NaN NaN NaN NaN NaN NaN NaN NaN NaN
+ NaN NaN NaN NaN NaN NaN … NaN NaN NaN
+ NaN NaN NaN NaN NaN NaN NaN NaN NaN
+ NaN NaN NaN NaN NaN NaN NaN NaN NaN
extractGrid(
+ odata :: AbstractArray{<:Real,N},
+ ggrd :: RegionGrid
+) where N <: Int -> Array{<:Real,N}
Extracts data from odata, an Array of dimension N (where N ∈ 2,3,4) that contains data of a Parent GeoRegion, into another Array of dimension N, containing only within a sub GeoRegion we are interested in.
Warning
Please ensure that the 1st dimension is longitude and 2nd dimension is latitude before proceeding. The order of the 3rd and 4th dimensions (when used), however, is not significant.
Arguments
odata : An array of dimension N containing gridded data in the region we are interesting in extracting from
ggrd : A RegionGrid containing detailed information on what to extract
extractGrid!(
+ odata :: AbstractArray{<:Real,N},
+ ndata :: AbstractArray{<:Real,N},
+ ggrd :: RegionGrid
+) where N <: Int -> nothing
Extracts data from odata, an Array of dimension N (where N ∈ 2,3,4) that contains data of a Parent GeoRegion, into ndata, another Array of dimension N, containing only within a sub GeoRegion we are interested in.
This allows for iterable in-place modification to save memory space and reduce allocations if the dimensions are fixed.
Warning
Please ensure that the 1st dimension is longitude and 2nd dimension is latitude before proceeding. The order of the 3rd and 4th dimensions (when used), however, is not significant.
Arguments
odata : An array of dimension N containing gridded data in the region we are interesting in extracting from
ndata : An array of dimension N meant as a placeholder for the extracted data to minimize allocations
ggrd : A RegionGrid containing detailed information on what to extract
`,26),t=[p];function l(h,d,o,r,k,c){return n(),a("div",null,t)}const E=s(e,[["render",l]]);export{N as __pageData,E as default};
diff --git a/v6.0.0/assets/using_extract.md.Cj1zD3i2.lean.js b/v6.0.0/assets/using_extract.md.Cj1zD3i2.lean.js
new file mode 100644
index 00000000..a4d9c55c
--- /dev/null
+++ b/v6.0.0/assets/using_extract.md.Cj1zD3i2.lean.js
@@ -0,0 +1 @@
+import{_ as s,c as a,o as n,a7 as i}from"./chunks/framework.Bu--eeyr.js";const N=JSON.parse('{"title":"Extracting Gridded Data using RegionGrid","description":"","frontmatter":{},"headers":[],"relativePath":"using/extract.md","filePath":"using/extract.md","lastUpdated":null}'),e={name:"using/extract.md"},p=i("",26),t=[p];function l(h,d,o,r,k,c){return n(),a("div",null,t)}const E=s(e,[["render",l]]);export{N as __pageData,E as default};
diff --git a/v6.0.0/assets/using_isin.md.BOt5_RYr.js b/v6.0.0/assets/using_isin.md.BOt5_RYr.js
new file mode 100644
index 00000000..b23aa447
--- /dev/null
+++ b/v6.0.0/assets/using_isin.md.BOt5_RYr.js
@@ -0,0 +1,104 @@
+import{_ as s,c as i,o as a,a7 as n}from"./chunks/framework.Bu--eeyr.js";const E=JSON.parse('{"title":"Is it in a GeoRegion?","description":"","frontmatter":{},"headers":[],"relativePath":"using/isin.md","filePath":"using/isin.md","lastUpdated":null}'),e={name:"using/isin.md"},t=n(`
When dealing with geographic data, we often wish to check if a point or region is inside another region. GeoRegions.jl allows you to perform this check easily with the function isinGeoRegion.
Point Type
We use the Point2 Type from the package GeometryBasics.jl, which is reexported by GeoRegions.jl, as an easy way to denote points. This also allows us to use the package PolygonOps.jl to determine if a point is inside a region.
The Polygonal Region AR6_EAO has the following properties:
+ Region ID (ID) : AR6_EAO
+ Parent ID (pID) : GLB
+ Name (name) : Equatorial Atlantic Ocean
+ Bounds (N,S,E,W) : [7.6, -10.0, 8.0, -50.0]
+ Shape (shape) : Point{2, Float64}[[-34.0, -10.0], [-34.0, 0.0], [-50.0, 0.0], [-50.0, 7.6], [-20.0, 7.6], [8.0, 0.0], [8.0, -10.0], [-34.0, -10.0]]
+ (is180,is360) : (true, false)
Here, we note that the coordinates of the GeoRegion (Equatorial Atlantic Ocean) are given in the bounds of (-180,180). It is trivial in this case to calculate if points A and C are within the bounds of the GeoRegion.
By eye it is easy to see that Point A is inside the GeoRegion. However, C is not. Let us now see if we are able to corroborate this with GeoRegions.jl using the function isinGeoRegion()
julia
(
+ isinGeoRegion(A,geo,throw=false), # Point A
+ isinGeoRegion(C,geo,throw=false) # Point C
+)
(true, false)
But what about Point B? Point B is also very obvious within the bounds of the GeoRegion, it is simply that the longitude of Point A is shifted by 360º such that it is now in the (0,360) coordinates frame. We see that this is of no concern to GeoRegions.jl, which can detect that it is within the bounds of the GeoRegion anyway.
Since any arbitrary geographic region can be defined as a GeoRegion, the natural extension now is to determine if a GeoRegion is wholly within another GeoRegion.
Let us consider an arbitrary GeoRegion BIG, and other smaller GeoRegions TS1-4 as defined below, and plot them on a map.
We use the functions RectRegion and PolyRegion to define rectilinear and polygonal regions respectively. For example, we construct the sample RectRegionTRC
julia
julia> using GeoRegions
+
+julia> RectRegion("TRC","GLB","Test Rectangle Region",[30,20,50,10])
+[ Info: 2024-08-08T01:51:42.102 - GeoRegions.jl - Checking to see if the ID TRC is in use
+┌ Warning: 2024-08-08T01:51:42.186 - GeoRegions.jl - TRC is not a valid GeoRegion identifier, use RectRegion(), TiltRegion() or PolyRegion() to add this GeoRegion to the list.
+└ @ GeoRegions ~/work/GeoRegions.jl/GeoRegions.jl/src/georegions/read.jl:562
+[ Info: 2024-08-08T01:51:42.188 - GeoRegions.jl - Adding the GeoRegion TRC to the list.
+[ Info: 2024-08-08T01:51:42.214 - GeoRegions.jl - Retrieving information for the GeoRegion defined by the ID GLB
+[ Info: 2024-08-08T01:51:42.664 - GeoRegions.jl - Performing a check to determine if the Test Rectangle Region GeoRegion (TRC) is inside the Globe GeoRegion (GLB)
+[ Info: 2024-08-08T01:51:42.664 - GeoRegions.jl - The GeoRegion TRC (Test Rectangle Region) is indeed a subset of the GeoRegion GLB (Globe)
+The Rectilinear Region TRC has the following properties:
+ Region ID (ID) : TRC
+ Parent ID (pID) : GLB
+ Name (name) : Test Rectangle Region
+ Bounds (N,S,E,W) : [30.0, 20.0, 50.0, 10.0]
+ (is180,is360) : (false, true)
+
+julia> PolyRegion("TPL","GLB","Test Polygonal Region",[30,40,50,40,30],[20,30,20,10,20])
+[ Info: 2024-08-08T01:51:43.160 - GeoRegions.jl - Checking to see if the ID TPL is in use
+┌ Warning: 2024-08-08T01:51:43.160 - GeoRegions.jl - TPL is not a valid GeoRegion identifier, use RectRegion(), TiltRegion() or PolyRegion() to add this GeoRegion to the list.
+└ @ GeoRegions ~/work/GeoRegions.jl/GeoRegions.jl/src/georegions/read.jl:562
+[ Info: 2024-08-08T01:51:43.161 - GeoRegions.jl - Adding the GeoRegion TPL to the list.
+[ Info: 2024-08-08T01:51:43.308 - GeoRegions.jl - Retrieving information for the GeoRegion defined by the ID GLB
+[ Info: 2024-08-08T01:51:43.347 - GeoRegions.jl - Performing a check to determine if the Test Polygonal Region GeoRegion (TPL) is inside the Globe GeoRegion (GLB)
+[ Info: 2024-08-08T01:51:43.347 - GeoRegions.jl - The GeoRegion TPL (Test Polygonal Region) is indeed a subset of the GeoRegion GLB (Globe)
+The Polygonal Region TPL has the following properties:
+ Region ID (ID) : TPL
+ Parent ID (pID) : GLB
+ Name (name) : Test Polygonal Region
+ Bounds (N,S,E,W) : [30.0, 10.0, 50.0, 30.0]
+ Shape (shape) : Point{2, Float64}[[30.0, 20.0], [40.0, 30.0], [50.0, 20.0], [40.0, 10.0], [30.0, 20.0]]
+ (is180,is360) : (false, true)
Defining PolyRegions
When defining PolyRegions, the first and last set of (lon,lat) coordinates must be the same (i.e. a closed polygon must be defined)
The GeoRegions will be automatically added to the following files in joinpath(DEPOT_PATH[1],"files","GeoRegions"):
RectRegions will be added to rectlist.txt
PolyRegions will be added to polylist.txt
If the GeoRegion ID TRC already exists, however, this will throw an error
julia
julia> using GeoRegions
+
+julia> RectRegion("TRC","GLB","Test Rectangle Region2",[40,20,52,10])
+[ Info: 2024-08-08T01:51:43.635 - GeoRegions.jl - Checking to see if the ID TRC is in use
+[ Info: 2024-08-08T01:51:43.635 - GeoRegions.jl - The ID TRC is already in use
+ERROR: 2024-08-08T01:51:43.635 - GeoRegions.jl - The GeoRegion TRC has already been defined. Please use another identifier.
Sometimes we would like to independently check if an ID has already been used. We can use the function isGeoRegion() to perform this checkIf the GeoRegion IDTRC` already exists, however, this will throw an error
julia> using GeoRegions
+
+julia> isGeoRegion("AR6_SEA")
+[ Info: 2024-08-08T01:51:44.198 - GeoRegions.jl - Checking to see if the ID AR6_SEA is in use
+[ Info: 2024-08-08T01:51:44.198 - GeoRegions.jl - The ID AR6_SEA is already in use
+true
+
+julia> isGeoRegion("RND",throw=false)
+[ Info: 2024-08-08T01:51:44.210 - GeoRegions.jl - Checking to see if the ID RND is in use
+┌ Warning: 2024-08-08T01:51:44.210 - GeoRegions.jl - RND is not a valid GeoRegion identifier, use RectRegion(), TiltRegion() or PolyRegion() to add this GeoRegion to the list.
+└ @ GeoRegions ~/work/GeoRegions.jl/GeoRegions.jl/src/georegions/read.jl:562
+false
+
+julia> isGeoRegion("RND")
+[ Info: 2024-08-08T01:51:44.211 - GeoRegions.jl - Checking to see if the ID RND is in use
+ERROR: 2024-08-08T01:51:44.211 - GeoRegions.jl - RND is not a valid GeoRegion identifier, use RectRegion(), TiltRegion() or PolyRegion() to add this GeoRegion to the list.
To remove an existing GeoRegion, we can use the function removeGeoRegion
julia
julia> using GeoRegions
+
+julia> removeGeoRegion("TRC")
+[ Info: 2024-08-08T01:51:44.317 - GeoRegions.jl - Removing the GeoRegion TRC ...
Global GeoRegion
The Global GeoRegion GLB is considered to be an integral part of the GeoRegions.jl package and therefore it cannot be removed.
julia
julia> using GeoRegions
+
+julia> removeGeoRegion("GLB")
+ERROR: 2024-08-08T01:51:44.326 - GeoRegions.jl - The Global GeoRegion "GLB" is an integral part of the GeoRegions.jl package and cannot be removed.
Simply put, a GeoRegion is a geographic region. In v1 of GeoRegions.jl, a GeoRegion could only be rectilinear in shape. However, as of GeoRegions.jl v2, we use Julia types to differentiate between rectilinear GeoRegions, and GeoRegions of arbitrary polygonal shape:
Rectilinear GeoRegions are denoted by the RectRegion type
Polygonal GeoRegions are denoted by the PolyRegion type
The main difference between a PolyRegion and a RectRegion, is that a PolyRegion also contains a mask field which allows us to extract a data field of a polygonal shape from the rectilinear bounds that are the natural result of a rectilinear grid.
a geographical region that can be either rectilinear region, or a polygonal shape within a specified rectilinear bound.
identified by an ID
itself a subregion of a parentGeoRegion (identified by pID, which must itself be a valid ID)
Default GeoRegions
When using GeoRegions.jl, the default GeoRegion should generally be the global domain, specified by GLB and given by the [N,S,E,W] coordinates [90,-90,360,0]. The Global GeoRegion GLB is considered to be a subset of itself.
+
+
+
+
\ No newline at end of file
diff --git a/v6.0.0/georegions/predefined.html b/v6.0.0/georegions/predefined.html
new file mode 100644
index 00000000..2e4b6bcb
--- /dev/null
+++ b/v6.0.0/georegions/predefined.html
@@ -0,0 +1,62 @@
+
+
+
+
+
+ List of Available GeoRegions | GeoRegions.jl
+
+
+
+
+
+
+
+
+
+
+
+
+
+
This page contains a list of the GeoRegions that are currently available in GeoRegions.jl.
The default GeoRegion covers the global domain identified as GLB
julia
julia> using GeoRegions
+
+julia> GeoRegion("GLB")
+[ Info: 2024-08-08T01:51:44.337 - GeoRegions.jl - Retrieving information for the GeoRegion defined by the ID GLB
+The Rectilinear Region GLB has the following properties:
+ Region ID (ID) : GLB
+ Parent ID (pID) : GLB
+ Name (name) : Globe
+ Bounds (N,S,E,W) : [90.0, -90.0, 360.0, 0.0]
+ (is180,is360) : (false, true)
Add the GF_ prefix to the 3-letter IDs given in Giorgi & Francisco [2000] to call GeoRegions adapted from this paper. All GeoRegions are defined as the RectRegion type.
Defined in GeoRegions > 1.1
All GF_* domains are defined only in versions ≥1.1
julia
julia> using GeoRegions
+
+julia> GeoRegion("GF_WAF")
+[ Info: 2024-08-08T01:51:44.340 - GeoRegions.jl - Retrieving information for the GeoRegion defined by the ID GF_WAF
+The Rectilinear Region GF_WAF has the following properties:
+ Region ID (ID) : GF_WAF
+ Parent ID (pID) : GLB
+ Name (name) : Western Africa
+ Bounds (N,S,E,W) : [20.0, -15.0, 25.0, -20.0]
+ (is180,is360) : (true, false)
SREX Regions adapted from Seneviratne et al. [2012]
Add the SRX_ prefix to the 3-letter IDs given in Seneviratne et al. [2012] to call GeoRegions adapted from this paper. All GeoRegions are defined as the PolyRegion type, even though many of them are rectilinear.
Defined in GeoRegions ≧ 2
All SRX_* domains are defined only in versions ≥2
julia
julia> using GeoRegions
+
+julia> GeoRegion("SRX_CNA")
+[ Info: 2024-08-08T01:51:44.342 - GeoRegions.jl - Retrieving information for the GeoRegion defined by the ID SRX_CNA
+The Polygonal Region SRX_CNA has the following properties:
+ Region ID (ID) : SRX_CNA
+ Parent ID (pID) : GLB
+ Name (name) : Central North America
+ Bounds (N,S,E,W) : [50.0, 28.6, -85.0, -105.0]
+ Shape (shape) : Point{2, Float64}[[-85.0, 50.0], [-85.0, 28.6], [-105.0, 28.6], [-105.0, 50.0], [-85.0, 50.0]]
+ (is180,is360) : (true, false)
AR6 Regions adapted from Iturbide et al., [2020]
Add the AR6_ prefix to the 3-letter IDs given in Iturbide et al., [2020] to call GeoRegions adapted from this paper. All GeoRegions are defined as the PolyRegion type.
Defined in GeoRegions ≧ 2
All AR6_* domains are defined only in versions ≥2
julia
julia> using GeoRegions
+
+julia> GeoRegion("AR6_EAS")
+[ Info: 2024-08-08T01:51:44.353 - GeoRegions.jl - Retrieving information for the GeoRegion defined by the ID AR6_EAS
+The Polygonal Region AR6_EAS has the following properties:
+ Region ID (ID) : AR6_EAS
+ Parent ID (pID) : GLB
+ Name (name) : East Asia
+ Bounds (N,S,E,W) : [45.0, 19.5, 152.0, 100.0]
+ Shape (shape) : Point{2, Float64}[[100.0, 19.5], [100.0, 37.0], [108.0, 37.0], [117.0, 45.0], [152.0, 45.0], [132.0, 25.0], [132.0, 19.5], [100.0, 19.5]]
+ (is180,is360) : (false, true)
+
+
+
+
\ No newline at end of file
diff --git a/v6.0.0/georegions/read.html b/v6.0.0/georegions/read.html
new file mode 100644
index 00000000..786fe462
--- /dev/null
+++ b/v6.0.0/georegions/read.html
@@ -0,0 +1,50 @@
+
+
+
+
+
+ Reading in Defined GeoRegion Information | GeoRegions.jl
+
+
+
+
+
+
+
+
+
+
+
+
+
+
The Difference between Bounds and Shape in a PolyRegion
What is the difference between the fields bound and shape in a PolyRegion? The answer is simple: a bound is a rectilinear-region in the lon-lat coordinate system, while the shape denotes the actual PolyRegion. We retrieve the longitude and latitude coordinates for the bound and shape fields using the function coordGeoRegion().
Bound and Shape in RectRegion
There is no field shape in a RectRegion because the shape of a RectRegion is defined by its rectilinear bound.
From plotting the bounds (blon,blat) and the shape(slon,slat), we see that the bound is the region defined by the westernmost, easternmost, northernmost and southernmost coordinates of the shape.
The latest version of GeoRegions can be installed using the Julia package manager (accessed by pressing ] in the Julia command prompt)
julia
julia> ]
+(@v1.10) pkg> add GeoRegions
You can update GeoRegions.jl to the latest version using
julia
(@v1.10) pkg> update GeoRegions
And if you want to get the latest release without waiting for me to update the Julia Registry (although this generally isn't necessary since I make a point to release patch versions as soon as I find bugs or add new working features), you may fix the version to the main branch of the GitHub repository:
If you are interested in using GeoRegions.jl or are trying to figure out how to use it, please feel free to ask me questions and get in touch! Please feel free to open an issue if you have any questions, comments, suggestions, etc!
+
+
+
+
\ No newline at end of file
diff --git a/v6.0.0/landsea/create.html b/v6.0.0/landsea/create.html
new file mode 100644
index 00000000..d12d7d5c
--- /dev/null
+++ b/v6.0.0/landsea/create.html
@@ -0,0 +1,74 @@
+
+
+
+
+
+ Loading and Saving Land-Sea Mask Datasets | GeoRegions.jl
+
+
+
+
+
+
+
+
+
+
+
+
+
+
The Land-Sea Dataset can be obtained using the function getLandSea(). There are two options:
Saving the LandSea dataset as a local NetCDF file
Extract the LandSea dataset directly from the OPeNDAP servers
Option (1) has a longer initial cost, because you have to download the global file, and then use the data from the global file to extract out the information for the GeoRegion of interest. However, once the data has been downloaded once, you don't need to download the data again and this greatly speeds up latency time.
Option (2) however, is much faster for smaller GeoRegions when loading the data directly from OPeNDAP is much easier than downloading the entire dataset. However, loading data directly from OPeNDAP comes with its own noticeable latency, which can add up if done iteratively.
You can toggle between the two options using the keyword argument savelsd - true sets the function to option 1, and false is option 2.
See end of the page for the API.
For more details on smoothing the land-sea mask, such that distance from the actual coastline is better resolved, please see this page
Retrieve ETOPO 2022 data for a GeoRegion from OPeNDAP servers
Arguments
geo : The GeoRegion of interest
Keyword Arguments
path :: The path to which an ETOPO folder is created within and ETOPO LandSea data saved into
resolution : The resolution of the dataset to be downloaded, in units of arc-seconds. Possible values are 15, 30 and 60, default is 60.
bedrock, geoid : The type of ETOPO data (bedrock, geoid, ice-surface) to be downloaded. Bedrock has priority over geoid, so if both are true, the bedrock is downloaded.
savelsd : Save LandSea dataset into a local NetCDF file.
returnlsd : If savelsd = true, you can choose to simply save the data into the NetCDF file, or load return it as a LandSea dataset. Otherwise, if savelsd = false, you always return the LandSea dataset.
smooth : If smooth = true, then you can smooth the land-sea mask using the Gaussian Filter of ImageFiltering.jl such that the coastline (i.e. the separation between land and ocean) becomes blurred.
σlon : Smooth in the longitude direction (every increase of 1 in σlon roughly corresponds to 8 pixels)
σlat : Smooth in the latitude direction (every increase of 1 in σlat roughly corresponds to 8 pixels)
iterations : Iterations of gausssian smoothing, the higher, the closer the smoothing follows a semi-log. 50-100 iterations is generally enough.
The data is loaded into a LandSea dataset struct-type, which is a subset of the supertype AbstractLandSea. We export this supertype, and its abstract subtypes LandSeaTopo and LandSeaFlat, so that other packages can extend the use of these abstract types with their own LandSea Types.
For examples of how to extend the functionality of the LandSea datasets, you may refer to the following examples:
The land-sea mask created from the ETOPO dataset comprises of 1s and 0s, where 1 denotes land and 0 denotes the ocean. However, it may often be useful to sort grid points not only by their land-surface type, but how distant they are from the coastline. GeoRegions.jl uses Gaussian Filtering from ImageFiltering.jl to perform a smoothing of the land-sea mask.
The degree of smoothing is expressed by the arguments σlon and σlat, which are integer inputs respectively.
You can get a smoothed land-sea mask via two means:
Calling the smoothing directly when retrieving the Land-Sea Dataset (recommended)
Smoothing a preexisting Land-Sea Dataset that has been loaded (not recommended)
The API for smoothing is listed below. However, it is worth nothing that when implementing the smoothing, you need to first call a larger GeoRegion around the GeoRegion of interest as a buffer.
You see here that smoothing the land-sea mask directly upon itself causes errors at the edges of the grid. This is because the smoothing applied is a circular smoothing, meaning that the boundaries are considered to be doubly-periodic, and thus bleed into each other. Thus, it is always best practice to call the smoothing directly when retrieving the Land-Sea dataset.
Perform a gaussian smoothing on the Land-Sea mask given a LandSeaTopo Mask dataset. If usetopography is set to true, then before the filtering, any points where height >= 0 is set to 1, and <0 is set = 0.
The smoothed land-sea mask will be saved into lsd.lsm
Arguments
lsd : A Land-Sea Dataset with Topography
Keyword Arguments
σlon : Smooth in the longitude direction (every increase of 1 in σlon roughly corresponds to 8 pixels)
σlat : Smooth in the latitude direction (every increase of 1 in σlat roughly corresponds to 8 pixels)
iterations : Iterations of gausssian smoothing, the higher, the closer the smoothing follows a semi-log. 50-100 iterations is generally enough.
topography : If true, then the land-sea mask that is smoothed will be based on the topography instead of the raw ERA5 land-sea mask
A list of GeoRegions and their basic properties can be called using the function tableGeoRegions(), which lists all available GeoRegions, both predefined and custom/user-defined.
Display all available GeoRegions in tabular format.
Keyword Arguments
onlycustom : If true, only custom, user-defined GeoRegions will be displayed. To show all available GeoRegions (including predefined GeoRegions), set onlycustom to false
Besides listing all available GeoRegions, it is also possible to list a variety of different specifications of GeoRegions with the tableGeoRegions() function, as well as tableRectRegions() and tablePolyRegions().
Similarly, it is also possible to list the GeoRegions in custom files. The template for these files can be retrieved using the function templateGeoRegions()
Display all available GeoRegions in tabular format.
Keyword Arguments
onlycustom : If true, only custom, user-defined GeoRegions will be displayed. To show all available GeoRegions (including predefined GeoRegions), set onlycustom to false
In this section, we go through the basic steps of creating a RegionGrid for RectRegions and PolyRegions. See if you can spot the differences between the RegionGrids generated by the two different types.
The Polygonal Grid has the following properties:
+ Grid Bounds (grid) : [52, 39, 55, 50]
+ Longitude Indices (ilon) : [50, 51, 52, 53, 54, 55]
+ Latitude Indices (ilat) : [39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52]
+ Longitude Points (lon) : [-82.0, -80.0, -78.0, -76.0, -74.0, -72.0]
+ Latitude Points (lat) : [-14.0, -12.0, -10.0, -8.0, -6.0, -4.0, -2.0, 0.0, 2.0, 4.0, 6.0, 8.0, 10.0, 12.0]
+ Region Size (nlon * nlat) : 6 lon points x 14 lat points
+ Region Mask (sum(mask) / (nlon * nlat)) : 70 / 84
So here, we see that in this PolyGrid example, the RegionGrid contains an additional field mask that, within the rectilinear longitude-latitude shape bounding the GeoRegion (because gridded data here is assumed to be rectilinear), the data is within the GeoRegion. Values of 1 indicate it is within the GeoRegion, otherwise the values are `NaN.
julia
ggrd.mask
6×14 Matrix{Float64}:
+ NaN NaN 1.0 1.0 1.0 1.0 1.0 … NaN NaN NaN NaN NaN
+ NaN 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 NaN NaN NaN
+ 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 NaN NaN
+ 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 NaN
+ 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0
+ 1.0 1.0 1.0 1.0 1.0 1.0 1.0 … 1.0 1.0 1.0 1.0 1.0
The PolyGrid type derived from a PolyRegion allows us to apply a mask to filter out data that is within the shape of a PolyRegion on a rectilinear lon-lat grid defined by the bound of a PolyRegion. We consider the following example of an AR6 region over South Asia:
Creates a RectGrid or PolyGrid type based on the following arguments. This method is suitable for rectilinear grids of longitude/latitude output such as from Isca, or from satellite and reanalysis gridded datasets.
Arguments
geo : A GeoRegion of interest
lon : A vector or AbstractRange containing the longitude points
lat : A vector or AbstractRange containing the latitude points
Creates a RegionMask type based on the following arguments. This method is more suitable for non-rectilinear grids of longitude and latitude points, such as in the output of WRF or CESM.
But how do we go from defining a GeoRegion, to extracting data for that GeoRegion? The answer is with the information in the RegionGrid types, which maps gridded lon-lat data to a given GeoRegion as follows:
Mapping gridded lon-lat data to a RectRegion gives a RectGrid structure
Mapping gridded lon-lat data to a PolyRegion gives a PolyGrid structure
Mapping non-rectilinear gridded lon-lat data to a RegionMask gives a RegionMask structure
However, the basic uses of RectGrid and PolyGrid are the same, and as such their differences are largely transparent to the user, except for one field found in PolyGrid, the mask, which will be elaborated upon later.
So basically a RegionGrid contains information on the indices of the gridded data that are part of the GeoRegion, thus helping us extract the relevant data for a given GeoRegion.
+
+
+
+
\ No newline at end of file
diff --git a/v6.0.0/siteinfo.js b/v6.0.0/siteinfo.js
new file mode 100644
index 00000000..7b4a2e3b
--- /dev/null
+++ b/v6.0.0/siteinfo.js
@@ -0,0 +1 @@
+var DOCUMENTER_CURRENT_VERSION = "v6.0.0";
diff --git a/v6.0.0/using/custom.html b/v6.0.0/using/custom.html
new file mode 100644
index 00000000..5f6ee037
--- /dev/null
+++ b/v6.0.0/using/custom.html
@@ -0,0 +1,36 @@
+
+
+
+
+
+ Adding GeoRegions from Templates | GeoRegions.jl
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Fear not! I have template files that one can use to define RectRegions and PolyRegions. Simply use the templateGeoRegion() to copy the templates into a directory of your choice.
Defining PolyRegions
When defining PolyRegions, the first and last set of (lon,lat) coordinates must be the same (i.e. a closed polygon must be defined)
We can then read in GeoRegions from your custom file using the function addGeoRegions(), which will then read all the GeoRegion information in the file and add it to the list of GeoRegions.
julia
addGeoRegions("recttest.txt")
+GeoRegion("TRP")
The Rectilinear Region TRP has the following properties:
+ Region ID (ID) : TRP
+ Parent ID (pID) : GLB
+ Name (name) : Tropical
+ Bounds (N,S,E,W) : [30.0, -30.0, 360.0, 0.0]
+ (is180,is360) : (false, true)
Should one wish to entirely reset the list of GeoRegions, one can call resetGeoRegions():
julia
resetGeoRegions()
[ Info: 2024-08-08T01:51:58.735 - GeoRegions.jl - Resetting the custom lists of GeoRegions back to the default
+┌ Warning: 2024-08-08T01:51:58.735 - GeoRegions.jl - Overwriting /home/runner/.julia/files/GeoRegions/rectlist.txt with original file in /home/runner/work/GeoRegions.jl/GeoRegions.jl/src/georegions/../../extra/rectlist.txt ...
+└ @ GeoRegions ~/work/GeoRegions.jl/GeoRegions.jl/src/georegions/read.jl:473
+┌ Warning: 2024-08-08T01:51:58.740 - GeoRegions.jl - Overwriting /home/runner/.julia/files/GeoRegions/polylist.txt with original file in /home/runner/work/GeoRegions.jl/GeoRegions.jl/src/georegions/../../extra/polylist.txt ...
+└ @ GeoRegions ~/work/GeoRegions.jl/GeoRegions.jl/src/georegions/read.jl:473
+┌ Warning: 2024-08-08T01:51:58.740 - GeoRegions.jl - Overwriting /home/runner/.julia/files/GeoRegions/tiltlist.txt with original file in /home/runner/work/GeoRegions.jl/GeoRegions.jl/src/georegions/../../extra/tiltlist.txt ...
+└ @ GeoRegions ~/work/GeoRegions.jl/GeoRegions.jl/src/georegions/read.jl:473
And if one wishes to reset the predefined list of GeoRegions, we can do:
Reset all the files containing GeoRegion information back to the default.
Arguments
allfiles : If true, reset the GeoRegions defined in Giorgi & Francisco [2000], AR6 Regions (Iturbide et al., 2020; ESSD) and Seneviratne et al. [2012] as well. If false, only reset the custom GeoRegions.
Suppose we have Global Data. However, we are only interested in a specific region (say, the North Central American region as defined in AR6), how do we extract data for this region?
The simple answer is, we use the extractGrid() function, which takes in a RegionGrid and a data array, and returns a new data array for the GeoRegion.
The Polygonal Region AR6_NCA has the following properties:
+ Region ID (ID) : AR6_NCA
+ Parent ID (pID) : GLB
+ Name (name) : Northern Central America
+ Bounds (N,S,E,W) : [33.8, 16.0, -90.0, -122.5]
+ Shape (shape) : Point{2, Float64}[[-90.0, 25.0], [-104.5, 16.0], [-122.5, 33.8], [-105.0, 33.8], [-90.0, 25.0]]
+ (is180,is360) : (true, false)
We also define some sample test data in the global domain
33×18 Matrix{Float64}:
+ NaN NaN NaN NaN NaN NaN … NaN NaN NaN
+ NaN NaN NaN NaN NaN NaN NaN NaN 0.265381
+ NaN NaN NaN NaN NaN NaN NaN -0.224422 0.567931
+ NaN NaN NaN NaN NaN NaN 1.67151 0.0993618 0.778459
+ NaN NaN NaN NaN NaN NaN 0.163252 -0.644675 -1.14833
+ NaN NaN NaN NaN NaN NaN … -1.43777 0.514898 0.791617
+ NaN NaN NaN NaN NaN NaN -0.702647 0.32758 -0.726071
+ NaN NaN NaN NaN NaN NaN -0.379183 1.83802 0.239722
+ NaN NaN NaN NaN NaN NaN 0.347784 0.0311085 -0.482691
+ NaN NaN NaN NaN NaN NaN -0.588135 2.95287 0.680521
+ ⋮ ⋮ ⋱ ⋮
+ NaN NaN NaN NaN NaN 0.554907 NaN NaN NaN
+ NaN NaN NaN NaN NaN 1.17125 … NaN NaN NaN
+ NaN NaN NaN NaN NaN NaN NaN NaN NaN
+ NaN NaN NaN NaN NaN NaN NaN NaN NaN
+ NaN NaN NaN NaN NaN NaN NaN NaN NaN
+ NaN NaN NaN NaN NaN NaN NaN NaN NaN
+ NaN NaN NaN NaN NaN NaN … NaN NaN NaN
+ NaN NaN NaN NaN NaN NaN NaN NaN NaN
+ NaN NaN NaN NaN NaN NaN NaN NaN NaN
extractGrid(
+ odata :: AbstractArray{<:Real,N},
+ ggrd :: RegionGrid
+) where N <: Int -> Array{<:Real,N}
Extracts data from odata, an Array of dimension N (where N ∈ 2,3,4) that contains data of a Parent GeoRegion, into another Array of dimension N, containing only within a sub GeoRegion we are interested in.
Warning
Please ensure that the 1st dimension is longitude and 2nd dimension is latitude before proceeding. The order of the 3rd and 4th dimensions (when used), however, is not significant.
Arguments
odata : An array of dimension N containing gridded data in the region we are interesting in extracting from
ggrd : A RegionGrid containing detailed information on what to extract
extractGrid!(
+ odata :: AbstractArray{<:Real,N},
+ ndata :: AbstractArray{<:Real,N},
+ ggrd :: RegionGrid
+) where N <: Int -> nothing
Extracts data from odata, an Array of dimension N (where N ∈ 2,3,4) that contains data of a Parent GeoRegion, into ndata, another Array of dimension N, containing only within a sub GeoRegion we are interested in.
This allows for iterable in-place modification to save memory space and reduce allocations if the dimensions are fixed.
Warning
Please ensure that the 1st dimension is longitude and 2nd dimension is latitude before proceeding. The order of the 3rd and 4th dimensions (when used), however, is not significant.
Arguments
odata : An array of dimension N containing gridded data in the region we are interesting in extracting from
ndata : An array of dimension N meant as a placeholder for the extracted data to minimize allocations
ggrd : A RegionGrid containing detailed information on what to extract
When dealing with geographic data, we often wish to check if a point or region is inside another region. GeoRegions.jl allows you to perform this check easily with the function isinGeoRegion.
Point Type
We use the Point2 Type from the package GeometryBasics.jl, which is reexported by GeoRegions.jl, as an easy way to denote points. This also allows us to use the package PolygonOps.jl to determine if a point is inside a region.
The Polygonal Region AR6_EAO has the following properties:
+ Region ID (ID) : AR6_EAO
+ Parent ID (pID) : GLB
+ Name (name) : Equatorial Atlantic Ocean
+ Bounds (N,S,E,W) : [7.6, -10.0, 8.0, -50.0]
+ Shape (shape) : Point{2, Float64}[[-34.0, -10.0], [-34.0, 0.0], [-50.0, 0.0], [-50.0, 7.6], [-20.0, 7.6], [8.0, 0.0], [8.0, -10.0], [-34.0, -10.0]]
+ (is180,is360) : (true, false)
Here, we note that the coordinates of the GeoRegion (Equatorial Atlantic Ocean) are given in the bounds of (-180,180). It is trivial in this case to calculate if points A and C are within the bounds of the GeoRegion.
By eye it is easy to see that Point A is inside the GeoRegion. However, C is not. Let us now see if we are able to corroborate this with GeoRegions.jl using the function isinGeoRegion()
julia
(
+ isinGeoRegion(A,geo,throw=false), # Point A
+ isinGeoRegion(C,geo,throw=false) # Point C
+)
(true, false)
But what about Point B? Point B is also very obvious within the bounds of the GeoRegion, it is simply that the longitude of Point A is shifted by 360º such that it is now in the (0,360) coordinates frame. We see that this is of no concern to GeoRegions.jl, which can detect that it is within the bounds of the GeoRegion anyway.
Since any arbitrary geographic region can be defined as a GeoRegion, the natural extension now is to determine if a GeoRegion is wholly within another GeoRegion.
Let us consider an arbitrary GeoRegion BIG, and other smaller GeoRegions TS1-4 as defined below, and plot them on a map.