Opened 4 years ago
Closed 4 years ago
#874 closed upgrade (Done)
IMPORTANT: Usage of __FILE__ macro
Reported by: | arango | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | Release ROMS/TOMS 3.9 |
Component: | Nonlinear | Version: | 3.9 |
Keywords: | Cc: |
Description ¶
This update modifies the usage of C-preprocessing macro __FILE__, which expands to the name of the current input file being processed. It is an extensive and simple change to ROMS that facilitates the compiling with Cmake in the future.
Now, we define the local variable MyFile as:
character (len=*), parameter :: MyFile = & & __FILE__
So the current filename can expand beyond the 72 columns and compiled free-form compiler flags to avoid syntax errors. It cleans the code substantially.
Usually, MyFile is used in statements like:
IF (FoundError(exit_flag, NoError, __LINE__, MyFile)) RETURN CALL wclock_on (ng, iNLM, 35, __LINE__, MyFile) CALL wclock_off (ng, iNLM, 35, __LINE__, MyFile)
These changes are part of several sequential updates to facilitate ROMS interface with Joint Effort for Data Assimilation Integration (JEDI) project.