You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
3100 FORMAT (A6,1X,A16,1X,10(1X,F5.1),2(1X,F5.2),3(1X,F5.1),
& 1(1X,F5.3),1(1x,F5.0),11(1X,F5.2),1(1X,F5.3),
& 1(1X,F5.2),1(1X,F5.3),5(1X,F5.2),3(1X,F5.3),
& 2(1X,F5.2),1(1X,F5.1),1(1X,F5.2),1(1X,F5.3),
& 2(1X,F5.0),2(1X,F5.2))
This leads to unstable results when a parameter value is written in the ecotype file using a different number of decimal places (e.g. using 24 instead of 24.0). If the format is specified as "F6.1" and the parameter value is written as 24.0 it will be read as 24.0, but if the parameter value is written as 24 the parameter value will be interpreted as 2.4. I've detected the issue with both gfortran and Intel compilers so I don't think it is compiler-dependent.
The issue can be easily resolved by changing the format specification for all parameters to "F6.0". With that modification, the parameter values are consistently interpreted correctly (e.g. both 24 and 24.0 are interpreted as 24.0). I'll submit a corresponding pull request shortly.
The text was updated successfully, but these errors were encountered:
The NWHEAT model reads ecotype parameters with formatted input with specific number of decimal places ("F5.2"):
dssat-csm-os/Plant/NWHEAT/WH_PHENOL.for
Lines 542 to 553 in 1031deb
This leads to unstable results when a parameter value is written in the ecotype file using a different number of decimal places (e.g. using 24 instead of 24.0). If the format is specified as "F6.1" and the parameter value is written as 24.0 it will be read as 24.0, but if the parameter value is written as 24 the parameter value will be interpreted as 2.4. I've detected the issue with both gfortran and Intel compilers so I don't think it is compiler-dependent.
The issue can be easily resolved by changing the format specification for all parameters to "F6.0". With that modification, the parameter values are consistently interpreted correctly (e.g. both 24 and 24.0 are interpreted as 24.0). I'll submit a corresponding pull request shortly.
The text was updated successfully, but these errors were encountered: