Skip to content

handling NaN in runoff input data #584

@nmizukami

Description

@nmizukami

If compiled with a flag -ffpe-trap=invalid and your runoff includes NaN as Fillvalue in the netCDF, 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions