ESCOMP / ESCOMP/mizuRoute

handling NaN fillvalue in runoff input data

Open
#584 0 comments 0 reactions 0 assignees View on GitHub
bug standalone
Dominant language
Fortran
Stars
59
Forks
73
Avg merge
5d 22h
Merged PRs (30d)
2

Description

If compiled with a flag `-ffpe-trap=invalid` and your runoff includes `NaN` as Fillvalue in the netCDF (like netCDF generated with xarray), the code stops with the compiler's message : `Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation` or similar to this.

The error happen at

`where ( abs(dummy - forc_data_in%fillvalue) < verySmall ) dummy = realMissing`

in read_runoff.f90.

Here fillvalue is NaN and the fortran trap `dummy - forc_data_in%fillvalue` as an invalid answer.

The code may need to handle NaN fillvalue by changing NaN to realMissing.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.