Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libcdi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mpim-sw
libcdi
Commits
f2407b4f
Commit
f2407b4f
authored
4 years ago
by
Volker Neff
Browse files
Options
Downloads
Patches
Plain Diff
add gridCreate function
parent
51b038e6
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
examples/cdi_write.jl
+10
-0
10 additions, 0 deletions
examples/cdi_write.jl
interfaces/julia/libcdi.jl
+32
-0
32 additions, 0 deletions
interfaces/julia/libcdi.jl
with
42 additions
and
0 deletions
examples/cdi_write.jl
0 → 100644
+
10
−
0
View file @
f2407b4f
include
(
"./../interfaces/julia/libcdi.jl"
)
using
.
cdi
println
(
"cdi_write example has started"
)
println
(
instances
(
cdi
.
GRID
))
println
(
instances
(
GRID
))
const
size
=
200
gridID
=
gridCreate
(
LONLAT
,
convert
(
Csize_t
,
size
))
\ No newline at end of file
This diff is collapsed.
Click to expand it.
interfaces/julia/libcdi.jl
0 → 100644
+
32
−
0
View file @
f2407b4f
module
cdi
@enum
GRID
::
Cint
begin
GENERIC
=
1
# Generic grid
GAUSSIAN
=
2
# Regular Gaussian lon/lat grid
GAUSSIAN_REDUCED
=
3
# Reduced Gaussian lon/lat grid
LONLAT
=
4
# Regular longitude/latitude grid
SPECTRAL
=
5
# Spherical harmonic coefficients
FOURIER
=
6
# Fourier coefficients
GME
=
7
# Icosahedral-hexagonal GME grid
TRAJECTORY
=
8
# Trajectory
UNSTRUCTURED
=
9
# General unstructured grid
CURVILINEAR
=
10
# Curvilinear grid
PROJECTION
=
12
# Projected coordinates
CHARXY
=
13
# One horizontal character dimension
PROJ_RLL
=
21
# Rotated Latitude Longitude
PROJ_LCC
=
22
# Lambert Conformal Conic
PROJ_LAEA
=
23
# Lambert Azimuthal Equal Area
PROJ_SINU
=
24
# Sinusoidal
PROJ_STERE
=
25
# Polar stereographic
end
function
gridCreate
(
gridtype
::
GRID
,
size
::
Unsigned
)
:
Cint
println
(
"Create Grid"
)
return
ccall
(
Cint
,
(
Cint
,
Csize_t
),
gridtype
,
size
)
end
export
GRID
,
LONLAT
export
gridCreate
end
#module cdi
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment