Skip to content
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

Duplicate locations of some constants? #11

Closed
mnlevy1981 opened this issue Feb 16, 2016 · 3 comments
Closed

Duplicate locations of some constants? #11

mnlevy1981 opened this issue Feb 16, 2016 · 3 comments
Assignees
Labels

Comments

@mnlevy1981
Copy link
Collaborator

We had copies of c0, c1, c2, c1000, and p5 in marbl_kinds_mod.F90, and I am in the process of moving them to a new marbl_constants_mod.F90 module, but it appears they are also stored in marbl_parms.F90 Obviously these only need to be stored in one place, but which module to use should depend on what other constants / parameters we end up saving and where we stick the parameters (will there be a marbl_params_type inside marbl_interface_class?)

@mnlevy1981 mnlevy1981 added the bug label Mar 21, 2016
@mnlevy1981
Copy link
Collaborator Author

There is a FIXME note in marbl_mod.F90 saying

eliminate marbl_parms

which is certainly one way to avoid duplicate variable declarations...

@mnlevy1981
Copy link
Collaborator Author

mnlevy1981 commented May 24, 2016

Duplicate variables have been removed from marbl_parms, I set it up so that marbl_constants_mod contains

  • Mathematical constants (c0, c1, p5, etc)
  • Conversion factors (spd, mpercm, etc)
  • Physical constants (T0_Kelvin, rho_sw, R13C_std, etc)

I still need to move pi from marbl_ciso_mod to marbl_constants -- one possibility is to hard-code a value and store pi as a parameter (CVMix uses 3.14159265358979323846, but I need to see if that is bit-for-bit with MARBL's 4*atan(1)

@mnlevy1981
Copy link
Collaborator Author

This has been implemented in a branch and will be fixed when #80 is merged onto master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant