@@ -31,7 +31,7 @@ land_mask(Γ::NamedTuple)=land_mask(Γ.hFacC[:,1])
31
31
# # GridSpec function with category argument:
32
32
33
33
"""
34
- GridSpec(category="PeriodicDomain",path=tempname(); ny =nothing, ID=:unknown)
34
+ GridSpec(category="PeriodicDomain",path=tempname(); np =nothing, ID=:unknown)
35
35
36
36
- Select one of the pre-defined grids either by ID (keyword) or by category.
37
37
- Return the corresponding `gcmgrid` specification, including the path where grid files can be accessed (`path`).
@@ -75,43 +75,43 @@ isa(g,gcmgrid)
75
75
true
76
76
```
77
77
78
- 3. by `category` and `path` with the `ny ` argument
79
- - `ny ` is the number of grid points in y for the `LatLonCap` and `CubeSphere` tiles.
80
- `ny ` defaults to 90 for `LatLonCap` and 32 for `CubeSphere`, and so must be included to access the LLC270 grid.
78
+ 3. by `category` and `path` with the `np ` argument
79
+ - `np ` is the number of grid points in x or y for the `LatLonCap` and `CubeSphere` tiles.
80
+ `np ` defaults to 90 for `LatLonCap` and 32 for `CubeSphere`, and so must be included to access the LLC270 grid with the category argument .
81
81
82
82
Examples:
83
83
84
84
```jldoctest; output = false
85
85
using MeshArrays
86
- g = GridSpec("LatLonCap",MeshArrays.GRID_LLC90,ny =90)
87
- g = GridSpec("LatLonCap",MeshArrays.GRID_LLC270,ny =270)
88
- g = GridSpec("CubeSphere",MeshArrays.GRID_CS32,ny =32)
86
+ g = GridSpec("LatLonCap",MeshArrays.GRID_LLC90,np =90)
87
+ g = GridSpec("LatLonCap",MeshArrays.GRID_LLC270,np =270)
88
+ g = GridSpec("CubeSphere",MeshArrays.GRID_CS32,np =32)
89
89
isa(g,gcmgrid)
90
90
91
91
# output
92
92
93
93
true
94
94
```
95
95
"""
96
- function GridSpec (category= " PeriodicDomain" , path= tempname (); ny = nothing , ID= :unknown )
96
+ function GridSpec (category= " PeriodicDomain" , path= tempname (); np = nothing , ID= :unknown )
97
97
98
98
if category== " LatLonCap"
99
99
nFaces= 5
100
100
grTopo= " LatLonCap"
101
- ny === nothing ? ny = 90 : ny
102
- ioSize= [ny ny * 13 ]
103
- facesSize= [(ny, ny * 3 ), (ny, ny * 3 ), (ny, ny ), (ny * 3 , ny ), (ny * 3 , ny )]
104
- if ny == 270
101
+ np === nothing ? np = 90 : np
102
+ ioSize= [np np * 13 ]
103
+ facesSize= [(np, np * 3 ), (np, np * 3 ), (np, np ), (np * 3 , np ), (np * 3 , np )]
104
+ if np == 270
105
105
ioPrec= Float32
106
106
else
107
107
ioPrec= Float64
108
108
end
109
109
elseif category== " CubeSphere"
110
110
nFaces= 6
111
111
grTopo= " CubeSphere"
112
- ny === nothing ? ny = 32 : ny
113
- ioSize= [ny ny * nFaces]
114
- facesSize= [(ny, ny ), (ny, ny ), (ny, ny ), (ny, ny ), (ny, ny ), (ny, ny )]
112
+ np === nothing ? np = 32 : np
113
+ ioSize= [np np * nFaces]
114
+ facesSize= [(np, np ), (np, np ), (np, np ), (np, np ), (np, np ), (np, np )]
115
115
ioPrec= Float32
116
116
elseif category== " PeriodicChannel"
117
117
nFaces= 1
@@ -132,14 +132,14 @@ end
132
132
if ID== :unknown
133
133
gcmgrid (path, grTopo, nFaces, facesSize, ioSize, ioPrec, read, write)
134
134
elseif ID== :LLC90
135
- ny = 90
136
- GridSpec (" LatLonCap" , MeshArrays. GRID_LLC90, ny = ny )
135
+ np = 90
136
+ GridSpec (" LatLonCap" , MeshArrays. GRID_LLC90, np = np )
137
137
elseif ID== :LLC270
138
- ny = 270
139
- GridSpec (" LatLonCap" , MeshArrays. GRID_LLC270, ny = ny )
138
+ np = 270
139
+ GridSpec (" LatLonCap" , MeshArrays. GRID_LLC270, np = np )
140
140
elseif ID== :CS32
141
- ny = 32
142
- GridSpec (" CubeSphere" , MeshArrays. GRID_CS32, ny = ny )
141
+ np = 32
142
+ GridSpec (" CubeSphere" , MeshArrays. GRID_CS32, np = np )
143
143
elseif ID== :onedegree
144
144
GridSpec (" PeriodicChannel" , MeshArrays. GRID_LL360)
145
145
elseif ID== :default
0 commit comments