Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
21028a29
Commit
21028a29
authored
Dec 10, 2010
by
Uwe Schulzweida
Browse files
Docu: added line numbers in listings
parent
32acaa0c
Changes
2
Hide whitespace changes
Inline
Side-by-side
doc/tex/c_examples.tex
View file @
21028a29
\lstset
{
frame=single, backgroundcolor=
\color
{
pyellow
}
, basicstyle=
\small
, columns=flexible, numbers=left, stepnumber=5
}
\chapter
{
\label
{
example
}
Examples
}
This appendix contains complete examples to write, read
...
...
@@ -11,7 +13,7 @@ Here is an example using {\CDI} to write a netCDF dataset with
on surface level and the second variable is a 3D field on 5 pressure
levels. Both variables are on the same lon/lat grid.
\lstinputlisting
[language=C
, frame=single, backgroundcolor=\color{pyellow}, basicstyle=\small, columns=flexible
]
\lstinputlisting
[language=C]
{
../../examples/cdi
_
write.c
}
...
...
@@ -19,7 +21,7 @@ levels. Both variables are on the same lon/lat grid.
This is the
{
\tt
ncdump -h
}
output of the resulting netCDF file
{
\tt
example.nc
}
.
\begin{lstlisting}
[
frame=single, backgroundcolor=
\color
{
pyellow
}
, basicstyle=
\small
, columns=flexible
]
\begin{lstlisting}
[]
netcdf example
{
dimensions:
lon = 12 ;
...
...
@@ -59,7 +61,7 @@ data:
This example reads the netCDF file
{
\tt
example.nc
}
from
\htmlref
{
Appendix B.1
}{
example
_
write
}
.
\lstinputlisting
[language=C
, frame=single, backgroundcolor=\color{pyellow}, basicstyle=\small, columns=flexible
]
\lstinputlisting
[language=C]
{
../../examples/cdi
_
read.c
}
...
...
@@ -69,5 +71,5 @@ This example reads the netCDF file {\tt example.nc} from \htmlref{Appendix B.1}{
and writes the result to a GRIB dataset by simple setting the output file type
to
{
\tt
FILETYPE
\_
GRB
}
.
\lstinputlisting
[language=C
, frame=single, backgroundcolor=\color{pyellow}, basicstyle=\small, columns=flexible
]
\lstinputlisting
[language=C]
{
../../examples/cdi
_
copy.c
}
doc/tex/f_examples.tex
View file @
21028a29
\lstset
{
frame=single, backgroundcolor=
\color
{
pyellow
}
, basicstyle=
\small
, columns=flexible, numbers=left, stepnumber=5
}
\chapter
{
\label
{
example
}
Examples
}
This appendix contains complete examples to write, read
...
...
@@ -11,7 +13,7 @@ Here is an example using {\CDI} to write a netCDF dataset with
on surface level and the second variable is a 3D field on 5 pressure
levels. Both variables are on the same lon/lat grid.
\lstinputlisting
[language=Fortran
, frame=single, backgroundcolor=\color{pyellow}, basicstyle=\small, columns=flexible
]
\lstinputlisting
[language=Fortran]
{
../../examples/cdi
_
write
_
f.f
}
...
...
@@ -19,7 +21,7 @@ levels. Both variables are on the same lon/lat grid.
This is the
{
\tt
ncdump -h
}
output of the resulting netCDF file
{
\tt
example.nc
}
.
\begin{lstlisting}
[
frame=single, backgroundcolor=
\color
{
pyellow
}
, basicstyle=
\small
, columns=flexible
]
\begin{lstlisting}
[]
netcdf example
{
dimensions:
lon = 12 ;
...
...
@@ -59,7 +61,7 @@ data:
This example reads the netCDF file
{
\tt
example.nc
}
from
\htmlref
{
Appendix
\ref
{
example
_
write
}}{
example
_
write
}
.
\lstinputlisting
[language=Fortran
, frame=single, backgroundcolor=\color{pyellow}, basicstyle=\small, columns=flexible
]
\lstinputlisting
[language=Fortran]
{
../../examples/cdi
_
read
_
f.f
}
...
...
@@ -69,7 +71,7 @@ This example reads the netCDF file {\tt example.nc} from \htmlref{Appendix B.1}{
and writes the result to a GRIB dataset by simple setting the output file type
to
{
\tt
FILETYPE
\_
GRB
}
.
\lstinputlisting
[language=Fortran
, frame=single, backgroundcolor=\color{pyellow}, basicstyle=\small, columns=flexible
]
\lstinputlisting
[language=Fortran]
{
../../examples/cdi
_
copy
_
f.f
}
\section
{
\label
{
examples
_
f2003
}
Fortran 2003: mo
\_
cdi and iso
\_
c
\_
binding
}
...
...
@@ -85,7 +87,8 @@ have to be convertet to C charcters by
\item
take
{
\tt
ctrim
}
from
{
\tt
mo
\_
cdi
}
for
{
\tt
CHARACTER(type=c
\_
char)
}
variables
\end{itemize}
\lstinputlisting
[language=Fortran
, frame=single, backgroundcolor=\color{pyellow}, basicstyle=\small, columns=flexible
]
\lstinputlisting
[language=Fortran]
{
../../examples/cdi
_
read
_
f2003.f90
}
\lstinputlisting
[language=Fortran, frame=single, backgroundcolor=\color{pyellow}, basicstyle=\small, columns=flexible]
\lstinputlisting
[language=Fortran]
{
../../examples/cdi
_
write
_
f2003.f90
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment