Correct array constructor for strings in CABLE-POP_TRENDY #427
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
CABLE
Description
The model did not compile with gfortran v14.2.
Possible dimension names in input files are defined as a character arrays in cable_common_module. They have different character lengths. The current notation is not Fortran standard compliant. I replaced
with
Same for
LonNames
andTimeNames
.I found this very cool notation on stackoverflow.
Another error was also in cable_common, where the continuation character was within the string:
The compiler does not know if
&
is part of the string or the continuation character. I pulled it out of the string.I also extended VarNames in spatio_temporal_dataset from 16 to length 32 because they are used currently only in cable_cru_Trendy and the names used there had a maximum of 32 characters.
I finally compiled with debug flags, made both arguments of Fortran intrinsics (min) the same kind, removed all unused variables and unused module variables mainly in cable_input and casa_inout.
I would suggest adding '-e03' to the Intel debug flags for better standard compliance. I have not tested that and have not changed CMakeLists.txt.
Type of change
Checklist