@@ -32,6 +32,8 @@ Tested on systems with NetCDF4 including:
3232* Windows Subsystem for Linux
3333* Windows Cygwin
3434
35+ See [ API] ( ./API.md ) for usage.
36+
3537## Build
3638
3739Requirements:
@@ -78,7 +80,7 @@ include(FetchContent)
7880
7981FetchContent_Declare(nc4fortran_proj
8082 GIT_REPOSITORY https://github.com/geospace-code/nc4fortran.git
81- GIT_TAG v1.3 .0)
83+ GIT_TAG v1.5 .0)
8284
8385FetchContent_MakeAvailable(nc4fortran_proj)
8486
@@ -113,73 +115,7 @@ and have a file in the master project `subprojects/nc4fortran.wrap` containing:
113115[wrap-git]
114116directory = nc4fortran
115117url = https://github.com/geospace-code/nc4fortran.git
116- revision = head
117- ```
118-
119- ## Usage
120-
121- All examples assume:
122-
123- ``` fortran
124- use nc4fortran, only: netcdf_file
125- type(netcdf_file) :: hf
126- ```
127-
128- * gzip compression may be applied for rank &ge ; 2 arrays by setting ` comp_lvl ` to a value between 1 and 9.
129- Shuffle filter is automatically applied for better compression
130- * string attributes may be applied to any variable at time of writing or later.
131-
132- ` integer, intent(out) :: ierr ` is optional.
133- It will be non-zero if error detected.
134- This value should be checked, particularly for write operations to avoid missing error conditions.
135- If ` ierr ` is omitted, nc4fortran will ` error stop ` on error.
136-
137- ### Create new NetCDF file, with variable "value1"
138-
139- ``` fortran
140- call hf%open('test.nc', action='w')
141-
142- call hf%write('value1', 123.)
143-
144- call hf%close()
145- ```
146-
147- ### Check if variable exists
148-
149- This will not raise error stop, even if the file isn't opened, but it will print a message to stderr.
150-
151- ``` fortran
152- logical :: exists
153-
154- exists = hf%exist('fooname')
155- ```
156-
157- ### Add/append variable "value1" to existing NetCDF file "test.nc"
158-
159- * if file ` test.nc ` exists, add a variable to it
160- * if file ` test.nc ` does not exist, create it and add a variable to it.
161-
162- ``` fortran
163- call hf%open('test.nc', action='rw')
164-
165- call hf%write('value1', 123.)
166-
167- call hf%close()
168- ```
169-
170- ### Read scalar, 3-D array of unknown size
171-
172- ``` fortran
173- call ncf%open('test.nc', action='r')
174-
175- integer, allocatable :: dims(:)
176- real, allocatable :: A(:,:,:)
177-
178- call ncf%shape('foo', dims)
179- allocate(A(dims(1), dims(2), dims(3)))
180- call ncf%read('foo', A)
181-
182- call ncf%close()
118+ revision = v1.5.0
183119```
184120
185121## Permissive syntax
0 commit comments