From 1d2a06d098ea6cda16ebe0e8c563515b74653b71 Mon Sep 17 00:00:00 2001 From: Nathanael Wong Date: Mon, 7 Oct 2024 23:58:59 -0400 Subject: [PATCH] Splitting the definitions, need more elaborations on the different types of grids are --- docs/make.jl | 5 +++++ docs/src/regiongrids.md | 37 +--------------------------------- docs/src/types/generalized.md | 10 +++++++++ docs/src/types/rectilinear.md | 10 +++++++++ docs/src/types/unstructured.md | 10 +++++++++ src/RegionGrids.jl | 4 ++-- 6 files changed, 38 insertions(+), 38 deletions(-) create mode 100644 docs/src/types/generalized.md create mode 100644 docs/src/types/rectilinear.md create mode 100644 docs/src/types/unstructured.md diff --git a/docs/make.jl b/docs/make.jl index 0140b30..16ebcc7 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -19,6 +19,11 @@ makedocs(; pages=[ "Home" => "index.md", "Getting Started" => "regiongrids.md", + "Types of RegionGrids" => [ + "Rectilinear Grids" => "types/rectilinear.md", + "Generalized Grids" => "types/generalized.md", + "Unstructured Grids" => "types/unstructured.md" + ], ], ) diff --git a/docs/src/regiongrids.md b/docs/src/regiongrids.md index 38c4309..74e1f61 100644 --- a/docs/src/regiongrids.md +++ b/docs/src/regiongrids.md @@ -9,8 +9,6 @@ A `RegionGrid` contains information that: RegionGrid ``` -## Types of RegionGrids - The `RegionGrid` abstract type has three subtypes: 1. `RectilinearGrid` type, which is for the extraction of data on rectilinear lon-lat grids 2. `GeneralizedGrid` type, which is for the extraction of data on non-rectilinear lon-lat grids, such as a curvilinear grid. @@ -22,37 +20,4 @@ GeneralizedGrid UnstructuredGrid ``` -Each of these types is in turn subdivided into **two** subtypes, (1) a `-Mask` type and (2) a `-Tilt` type. The `-Tilt` types are the same as the `-Mask` types, but with additional fields that specify the _rotation_ of fields. - -### The `Rectilinear` Grid - -The `RectilinearGrid` type can be further subdivided into three different types based on the `GeoRegion` type: -* Mapping rectilinearly-gridded lon-lat data to a `RectRegion` or `PolyRegion` returns a `RLinearMask` type. -* Mapping rectilinearly-gridded lon-lat data to a `TiltRegion` returns a `RLinearTilt` type. - -```@docs -RLinearMask -RLinearTilt -``` - -### The `GeneralizedGrid` Type - -The `GeneralizedGrid` type can be further subdivided into two different types based on the `GeoRegion` type: -* Mapping generalized gridded lon-lat data to a `RectRegion` or `PolyRegion` returns a `GeneralMask` type. -* Mapping generalized gridded lon-lat data to a `TiltRegion` returns a `GeneralTilt` type. - -```@docs -GeneralMask -GeneralTilt -``` - -### The `UnstructuredGrid` Type - -The `UnstructuredGrid` type can be further subdivided into two different types based on the `GeoRegion` type: -* Mapping unstructured lon-lat data to a `RectRegion` or `PolyRegion` returns a `VectorMask` type. -* Mapping unstructured lon-lat data to a `TiltRegion` returns a `VectorTilt` type. - -```@docs -VectorMask -VectorTilt -``` \ No newline at end of file +Each of these types is in turn subdivided into **two** subtypes, (1) a `-Mask` type and (2) a `-Tilt` type. The `-Tilt` types are the same as the `-Mask` types, but with additional fields that specify the _rotation_ of fields. \ No newline at end of file diff --git a/docs/src/types/generalized.md b/docs/src/types/generalized.md new file mode 100644 index 0000000..46ed5fe --- /dev/null +++ b/docs/src/types/generalized.md @@ -0,0 +1,10 @@ +# Generalized + +The `GeneralizedGrid` type can be further subdivided into two different types based on the `GeoRegion` type: +* Mapping generalized gridded lon-lat data to a `RectRegion` or `PolyRegion` returns a `GeneralMask` type. +* Mapping generalized gridded lon-lat data to a `TiltRegion` returns a `GeneralTilt` type. + +```@docs +GeneralMask +GeneralTilt +``` \ No newline at end of file diff --git a/docs/src/types/rectilinear.md b/docs/src/types/rectilinear.md new file mode 100644 index 0000000..fab7f78 --- /dev/null +++ b/docs/src/types/rectilinear.md @@ -0,0 +1,10 @@ +# Rectilinear + +The `RectilinearGrid` type can be further subdivided into three different types based on the `GeoRegion` type: +* Mapping rectilinearly-gridded lon-lat data to a `RectRegion` or `PolyRegion` returns a `RLinearMask` type. +* Mapping rectilinearly-gridded lon-lat data to a `TiltRegion` returns a `RLinearTilt` type. + +```@docs +RLinearMask +RLinearTilt +``` \ No newline at end of file diff --git a/docs/src/types/unstructured.md b/docs/src/types/unstructured.md new file mode 100644 index 0000000..1524f66 --- /dev/null +++ b/docs/src/types/unstructured.md @@ -0,0 +1,10 @@ +# Unstructured + +The `UnstructuredGrid` type can be further subdivided into two different types based on the `GeoRegion` type: +* Mapping unstructured lon-lat data to a `RectRegion` or `PolyRegion` returns a `VectorMask` type. +* Mapping unstructured lon-lat data to a `TiltRegion` returns a `VectorTilt` type. + +```@docs +VectorMask +VectorTilt +``` \ No newline at end of file diff --git a/src/RegionGrids.jl b/src/RegionGrids.jl index 4bb7b4d..6a7c723 100644 --- a/src/RegionGrids.jl +++ b/src/RegionGrids.jl @@ -137,7 +137,7 @@ abstract type UnstructuredGrid <: RegionGrid end """ VectorMask <: UnstructuredGrid -Information on a `GeneralizedGrid` type that is extracted based on vectors of longitude and latitude points. +Information on a `UnstructuredGrid` type that is extracted based on vectors of longitude and latitude points. """ struct VectorMask{FT<:Real} <: UnstructuredGrid lon :: Vector{FT} @@ -149,7 +149,7 @@ end """ VectorTilt <: UnstructuredGrid -Information on a `GeneralizedGrid` type that is extracted based on vectors of longitude and latitude points. +Information on a `UnstructuredGrid` type that is extracted based on vectors of longitude and latitude points. A `VectorTilt` type will also contain the following fields: * `rotX` - A vector of `Float`s, defining indices of the parent longitude vector describing the region