-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Love number parameter array exceeds Fortran line limit #504
Comments
I didn't like how this was handled either, as I don't think these numbers (probably any parameter) should be hard-coded. It feels to me the nature of this data array is somewhere between an input file and a parameter. It is too large to be an entry in MOM_input. But it is also just a set of constants that does not feel right to be a user-specified input file. I had the same idea of including the array as a file as part of the codebase and got version-controlled, but there was no precedence. So I just quarantined it into a separate module as the next best thing... |
In fact, the same may apply to tides related parameters (frequencies, amplitudes, Love numbers, astronomical arguments etc). Currently these are input parameters that can be changed (as they should be, for fun experiments and tests), but the defaults are hard-coded. These tidal parameters may get expanded in the future (more constituents, various versions of astronomical arguments), which means larger hard-coded parameter arrays. |
I am leaning towards moving the numbers into a namelist. I see a few advantages:
Some downsides:
I guess another alternative is to see if the |
The
Love_data
parameter inMOM_load_Love_numbers.F90
is split over ~1440 lines. A standard-compliant compiler is only required to support up to 255 lines. Although not generally a problem, this is preventing us from enabling the-pedantic
flag for testing.Unfortunately, I cannot think of any way to split a parameter across multiple lines. Even if I could, I am not sure if it's in our interest to have these numbers hard-coded into the executable.
We could change the array from a parameter to a variable, and fill in the records. We could also store the numbers as an input file, although I think this would be the first instance of such a large dataset added to the codebase. We don't use namelists very much, but this might be a good use of one.
@herrwang0 We discussed this problem back when it was first merged. Do you have any ideas or thoughts on how we might handle this array?
The text was updated successfully, but these errors were encountered: