(Original author's: Ben Hillman and Walter Hannah from the ACME-ECP Confluence)
...
The committee that defines the standards: https://j3-fortran.org/
What standard to use: You should stick mostly with Fortran95 but we do want to use the ISO-C bindings available in Fortran2003. So technically that means Fortran2003 is allowed but see below.
Modern language features (classes)
Do not use modern Fortran approaches for abstraction, such as classes. Current OpenACC/OpenMP implementations do not play well with Fortran classes, so we should avoid using these for anything that we think might need to be ported in the future. But in general, it is probably best to avoid their use for this project, and favor more fundamental data structures.
...
In general, you should never use features that are new in the latest Fortran standard. It takes a long time for compilers to implement them correctly and even longer from them to perform well. For example, avoid Fortran2003 features for type extension and inheritance, polymorphism, dynamic type allocation, (and type-bound procedures.)
Line width
Source code lines should not exceed 100 characters in length.
Once a line reaches 100 characters, it should be split into multiple lines with a continuation character. This rule applies to comment lines as well.
...
if (crm_ny.eq.1) then
crm_angle(:ncol) = pi/2.
else
crm_angle(:ncol) = 0.
end if
Avoid GNU specific extensions
For portability, stick to language standards and avoid relying on GNU specific features.
While compiling your code with gfortran, test your code with -std=f2003
etc. (not -std=gnu
which is the default)
https://gcc.gnu.org/onlinedocs/gfortran/Extensions-implemented-in-GNU-Fortran.html
Specifying either -std=f95, -std=f2003, -std=f2008, or -std=f2018 disables extensions
Other Sources