mathias1979
Technical User
I'm working with fortran 77 on pgi compilters. I need to go through a real array and replace occurrances of NAN with -9999. I was just trying a simple if statement such as:
if (test(i,j).eq.NAN) test(i,j)=-9999
This just seems to ignore occurances of NAN. And if I try to do something like test(i,j).eq.'NAN') I get a type mismatch error. How can I get around this?
if (test(i,j).eq.NAN) test(i,j)=-9999
This just seems to ignore occurances of NAN. And if I try to do something like test(i,j).eq.'NAN') I get a type mismatch error. How can I get around this?