Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
cd10kfsu committed Oct 3, 2022
1 parent bd6ef04 commit eab6d6d
Show file tree
Hide file tree
Showing 3 changed files with 144 additions and 83 deletions.
108 changes: 58 additions & 50 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# F90GIO Release v1.1
# F90GIO Release v2.0
[![build_gfortran](https://github.com/cd10kfsu/F90GIO/actions/workflows/build_gfortran.yml/badge.svg)](https://github.com/cd10kfsu/F90GIO/actions/workflows/build_gfortran.yml)

Author: Da,Cheng Email: [email protected]
Expand All @@ -22,65 +22,73 @@ please acknowledge it in your acknowledgement section in your papers if
possible. Thanks!


I. Install NetCDF/HDF4/HDF5 library
## Major changes
1. Add fast I/O libs for NetCDF and H5 files: `ncio` and `h5io` libs
remove lots of checks in F90GIO, and reduce the times of open/close
files.

1. For installing HDF4, if you'd like to use my netcdf & hdf4 module simultenously, you need
to disable the netcdf-I/O capability:

--disable-netcdf
## Install NetCDF/HDF4/HDF5 library

1. For installing HDF4, if you'd like to use my netcdf & hdf4 module
simultenously, you need to disable the netcdf-I/O capability:
```
--disable-netcdf
```
when runnning configure. Other important flags for F90GIO includes:

```
--enable-fortran F77=YOUR_COMPILER (e.g., F77=ifort)

```
The general flags when you configure HDF4 library can be found in the
file named INSTALL in the directory ~/release_notes of the official
file named INSTALL in the directory `~/release_notes` of the official
source code pakage or see this file online
(https://www.hdfgroup.org/ftp/HDF/HDF_Current/src/unpacked/release_notes/INSTALL).

2. For HDF5 compilation, you need to add flag:

```
--enable-fortran --enable-fotran2003

other general flags when configuring the HDF5 can be found in the directory of
~/release_docs of the official source code package or see this file online
```
other general flags when configuring the HDF5 can be found in the
directory of `~/release_docs` of the official source code package or
see this file online
(http://www.hdfgroup.org/ftp/HDF5/current/src/unpacked/release_docs/INSTALL)

II. Install F90GIO library

1. For the first step, you need to modify the compiling environment in the file:

makefile.config

2. If you want to install the whole F90GIO library, you can go to the src/, and
type:

make all
make install

Then go to the directory test/, run

make all

you will find several .exe excutables. Run these excuatables and compare their
results with *.results_correct

3. F90GIO also supports to build the library alone. For example, if you only want
to build netcdf library, just to to the src/, and type:

make netcdf
make install-netcdf

Then go to the directory test/, run

make test-netcdf

4. Someone may also want to compile those files directly with their own files
instead of building libs. This is also possible. Go to the test-nolib/ and
run:

make test-netcdf

as an example. You can check *.bsh files to see how to use them.


## Install F90GIO library

"make all" in the current directory, and a directory "build" will be created here. The libs and includes will be under "build/libs" and "build/include".

config/env.sh sets the required environmental vars used by CMAKE.

1. To turn off specific lib, you can modify Makefile at the current directory as:
- turn off hdf4
```
mkdir build
. config/env.sh; cd build; cmake -DBUILD_H4=off ..; make; make test
```
- turn off netcdf
```
mkdir build
. config/env.sh; cd build; cmake -DBUILD_NC=off ..; make; make test
```
- turn off hdf5 by
```
mkdir build
. config/env.sh; cd build; cmake -DBUILD_H5=off ..; make; make test
```
2. for hdf5 libs, if you are using hdf5 libs with major version <= 1.8
add the `H5_VERSION_1_8=ON` when running cmake
```
mkdir build
. config/env.sh; cd build; cmake -DBUILD_H5=on -DH5_VERSION_1_8=ON ..; make; make test
```
3. install Fast I/O libs (currently support NC and HDF5)
```
mkdir build
. config/env.sh; cd build
cmake .. -DBUILD_NC=ON -DBUILD_H5=on -DH5_VERSION_1_8=ON -DBUILD_FAST_IO=ON
make; make test
```
33 changes: 0 additions & 33 deletions README_CMAKE.md

This file was deleted.

86 changes: 86 additions & 0 deletions README_LEGACY_MAKE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# F90GIO Release v2.0
[![build_gfortran](https://github.com/cd10kfsu/F90GIO/actions/workflows/build_gfortran.yml/badge.svg)](https://github.com/cd10kfsu/F90GIO/actions/workflows/build_gfortran.yml)

Author: Da,Cheng Email: [email protected]

Fortran 90 General I/O Interface (F90GIO) provides I/O interface for
NetCDF, HDF4, HDF5 reading/writing with Fortran 90 languages.
It is developed in the hope of allieviating researchers' burden in
atmospheric and oceanic science to deal with either re-analysis,
forecast, or remote sensed data. Instead of wasting time learning
these techniques, researchers may prefer to focus on the scientific
problems. With this thought in mind, I decide to deliever this package
to the public. Most of the routines have been tested both on Mac Pro
and Linux clusters.

This README file contains information about: I. what compiler flags
should be included when compiling NetCDF, HDF4, HDF5 libraries; II.
how to compile F90IO library, III. how to use F90IO library.

If you find this package helpful, and you are using it in your papers,
please acknowledge it in your acknowledgement section in your papers if
possible. Thanks!


I. Install NetCDF/HDF4/HDF5 library

1. For installing HDF4, if you'd like to use my netcdf & hdf4 module simultenously, you need
to disable the netcdf-I/O capability:
```
--disable-netcdf
```
when runnning configure. Other important flags for F90GIO includes:
```
--enable-fortran F77=YOUR_COMPILER (e.g., F77=ifort)
```
The general flags when you configure HDF4 library can be found in the
file named INSTALL in the directory `~/release_notes` of the official
source code pakage or see this file online
(https://www.hdfgroup.org/ftp/HDF/HDF_Current/src/unpacked/release_notes/INSTALL).

2. For HDF5 compilation, you need to add flag:
```
--enable-fortran --enable-fotran2003
```
other general flags when configuring the HDF5 can be found in the directory of
`~/release_docs` of the official source code package or see this file online
(http://www.hdfgroup.org/ftp/HDF5/current/src/unpacked/release_docs/INSTALL)

II. Install F90GIO library

1. For the first step, you need to modify the compiling environment in the file:
```
makefile.config
```
2. If you want to install the whole F90GIO library, you can go to the src/, and
type:
```
make all
make install
```
Then go to the directory `test/`, run
```
make all
```
you will find several .exe excutables. Run these excuatables and compare their
results with `*.results_correct`

3. F90GIO also supports to build the library alone. For example, if you only want
to build netcdf library, just to to the `src/`, and type:
```
make netcdf
make install-netcdf
```
Then go to the directory `test/`, run
```
make test-netcdf
```
4. Someone may also want to compile those files directly with their own files
instead of building libs. This is also possible. Go to the `test-nolib/` and
run:
```
make test-netcdf
```
as an example. You can check `*.bsh` files to see how to use them.


0 comments on commit eab6d6d

Please sign in to comment.