I work with WRF on some idealized cases at University of Lund. I have a subroutine inside the microphysics module, that gives me back NaN on a an array only when I compile the module with optimization -O3 or -O2. If I run the same code compiled with the debug options switched on or -O1 option the bug disappears. I am still working on it and I would like to ask if it is possible to put some meta-commands inside the code in order to exclude the optimization only for one subroutine instead of all module.
Thanks a lot in advance for any help.