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

contamination of types_mod with other module data #449

Open
hkershaw-brown opened this issue Jan 31, 2023 · 0 comments
Open

contamination of types_mod with other module data #449

hkershaw-brown opened this issue Jan 31, 2023 · 0 comments
Labels
Refactor Working but needs cleanup

Comments

@hkershaw-brown
Copy link
Member

Note for refactoring:

Data from other modules has crept into types_mod. I can't really justify the footprint of correcting this for its own sake, but this note is to keep track of this issue for any future refactoring.

State structure and filenames_io(?)

public :: MAX_NUM_DOMS, MAX_FILES

These parameters should also go home to their respective modules:

!----------------------------------------------------------------------------
! constants that need to be shared - really has nothing to do with types ...
!----------------------------------------------------------------------------
integer, parameter :: metadatalength = 64 ! 75 is max w/out wrapping in ncdump
integer, parameter :: varnamelength = 31 ! max name of any fortran variable
! in F90/95. increased to 63 in F2003
integer, parameter :: obstypelength = 31 ! because of variable name limits.
! use this for obs types/state quantities
integer, parameter :: vtablenamelength = 64 ! use this for the model_mod variable table items

Also a bunch of physical constants, probably should be in a physical_constants_mod and/or model specific:

!----------------------------------------------------------------------------
! Constants, some of which are model dependent and shouldn't be in this
! module.
!----------------------------------------------------------------------------

real(r8), parameter :: t_kelvin = 273.15_r8
real(r8), parameter :: es_alpha = 611.2_r8
real(r8), parameter :: es_beta = 17.67_r8
real(r8), parameter :: es_gamma = 243.5_r8
real(r8), parameter :: gas_constant_v = 461.6_r8
real(r8), parameter :: gas_constant = 287.0_r8 ! wikipedia has 287.06, WRF has 287.05 ...
real(r8), parameter :: L_over_Rv = 5418.12_r8
real(r8), parameter :: ps0 = 100000.0_r8 ! Base sea level pressure
real(r8), parameter :: earth_radius = 6370.0_r8 ! km, consistant with WRF
real(r8), parameter :: gravity = 9.81_r8 ! wikipedia has 9.80665

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

No branches or pull requests

1 participant