This is the C++/CUDA morphing code library developed by Jeffrey for all meteorological calculation in Hong Kong Observatory. The code was mostly closed for use in HKO before but now it is open to provide continual updates for HKO colleagues.
This initial release only provides the code for scientific branch. For HKO users, most of the time you only need turn on the build mode for "scientific" and maybe "external" (for bziped read of GRIB files) with "-DSCIENTIFIC=ON" and "-DEXTERNAL=ON" when executing the cmake command. See "Supported build modes" below for info. No HKO software executables are included in this repository.
- clone the repository from Git.
- install all of the dependency (listed below)
- Execute "mkdir cmake"
- Enter the directory cmake, execute "cmake ../". Note that additional variable would be needed for the cmake to find the dependent packages.
- Execute "cmake --build ."
- The header files are in the "include" directory while the libjeff.a is in the "src" directory.
Build modes can be turned on/off by the argument -D{build modes}=ON/OFF.
- SCIENTIFIC (For the equations for meteorological computation and also the support for various grid types in handling NWP/satellite/RADAR/LIDAR data.)
- DATABASE (Not yet released)
- EXTERNAL
- MATHSTAT (For numerical routines. ON by default. Can be suppressed by -DMATHSTAT=OFF)
- XGBOOST (Not yet released)
- GPU (automatic if nvcc >= 10.0 is detected. Can be suppressed by -DGPU=OFF)
- ROBOTICS (private at the moment)
The current version of the library would build depends on the build mode input during the configuration stage. If no build mode was input, the library would only be built with the modules in the 'always' catergory. If ROBOTICS built mode is ON, the SCIENTIFIC built mode would be suppressed even if it is set to ON.
The library assume the user is using g++ for compiling C++ codes and nvcc for CUDA codes
- GSL library version 1.16, other version of GSL library may work but was not tested
- [NetCDF Fortran version 4.2]
- [NetCDF version 4.2.1.1] (implicitly needs HDF5)
- [NetCDF-cxx4 version 4.2]
- ecCodes version 2.16.0, other version of ecCodes may work but was not well tested. I only tested with version 2.16 and version 2.9
- [civetweb v.1.12]
- [XGBOOST]
- BZIP2 - sudo apt-get install libz2-dev
- ZLIB - usually pre-installed
- libssh version 0.9.5
- CONCURRENT_BUILD_THREAD - the number of thread to be used for the make, i.e. the in X in "make -j X". Default value is 4.
- GPU - set to OFF to suppress GPU build mode even when nvcc is detected
- GSL_PREFIX - the prefix for the configuration of the libgsl. Default is /usr/
- NETCDF_PREFIX - the prefix for the configuration of the netCDF library. Default is /usr/
- NETCDFC_PREFIX - the prefix for the configuration of the netCDF-C library. Default is /usr/
- NETCDFCXX_PREFIX - the prefix for the configuration of the netCDF-CXX library. Default is /usr/
NETCDF read fucntion yet to be compatible with the sftp mode
- Create the code with header file named as .JEFFH and source file named as .JEFFC. Put the code under the appropriate build mode directory
For use within Hong Kong Observatory (meteorological authority of Hong Kong SAR), MIT license applies. For others, the conditions in LICENSE.md applies.
This repository is no longer actively updated as the main repository has been moved back to my own storage system. If you need updated version of the library, please contact me by email.