NetCDF I/O
Read and write 2D, 3D, and 4D NetCDF grids with a single call. Supports byte, short, int, float, and double data types with automatic type dispatch.
OpenMP Parallelism
Cache-optimized column-major loop ordering with OpenMP parallelization for high-throughput processing of large geospatial datasets.
Simple API
Generic interfaces let you call readgrid, writegrid, gengrid, and setFillValue with any type — the compiler dispatches automatically.
100 Derived Types
Combinatorial type system covering all dimension (2D–4D), precision (byte–double), and coordinate type combinations in a single module.
Robust Error Handling
Every allocation is checked with stat=, every NetCDF call is validated, and colored diagnostics pinpoint errors without segfaults.
Linux Native
Auto-detecting Makefile supports Fedora, RHEL, Debian, Ubuntu and more. Compiles as a shared library (libFPL.so) for easy linking.
Minimal boilerplate
Declare a typed structure, set the variable and dimension names, then call readgrid. FPL handles NetCDF dimension queries, type validation, memory allocation, and coordinate extraction in a single call.
The same pattern works for writing (writegrid), grid generation (gengrid), fill-value masking (setFillValue), and memory cleanup (dealloc).
program main
use fpl
implicit none
type(nc3d_float_llf_ti) :: temp
temp%varname = "temperature"
temp%lonname = "lon"
temp%latname = "lat"
temp%timename = "time"
call readgrid("input.nc", temp)
! Process: Celsius → Fahrenheit
where(temp%ncdata /= temp%FillValue)
temp%ncdata = temp%ncdata * 1.8 + 32
end where
call writegrid("output.nc", temp)
call dealloc(temp)
end program main
Quick Install
sudo apt install gfortran libnetcdf-dev libnetcdff-dev makegit clone https://github.com/pimentafm/FortranProcessingLibrary.git && cd FortranProcessingLibrary && make && sudo make installgfortran -o myapp myapp.f90 -I/usr/include/ -lFPL