Skip to content

Commit

Permalink
mmm ntiedtke initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
scrasmussen committed Mar 10, 2024
1 parent 1a7d5f8 commit 65939e1
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 12 deletions.
5 changes: 3 additions & 2 deletions scm/src/scm_physical_constants.F90
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ module scm_physical_constants
real(kind=dp),parameter:: con_cliq =4.1855e+3
real(kind=dp),parameter:: con_csol =2.1060e+3
real(kind=dp),parameter:: con_cvap =1.8460e+3
real(kind=dp),parameter:: con_hvap =2.5000e+6
real(kind=dp),parameter:: con_hfus =3.3358e+5
real(kind=dp),parameter:: con_hvap =2.5000e+6 !< latent heat of vaporization of water at 0C
real(kind=dp),parameter:: con_hfus =3.3358e+5 !< latent heat of fusion of water at 0C
real(kind=dp),parameter:: con_xls =2.85e+6 !< latent heat of sublimation of water at 0C
real(kind=dp),parameter:: con_psat =6.1078e+2_dp !< pres at H2O 3pt (\f$Pa\f$)
real(kind=dp),parameter:: con_t0c =2.7315e+2
real(kind=dp),parameter:: con_ttp =2.7316e+2
Expand Down
7 changes: 7 additions & 0 deletions scm/src/scm_physical_constants.meta
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,13 @@
dimensions = ()
type = real
kind = kind_phys
[con_xls]
standard_name = latent_heat_of_sublimation_of_water_at_0C
long_name = latent heat of sublimation of water at 0C
units = J kg-1
dimensions = ()
type = real
kind = kind_phys
[con_pi]
standard_name = pi
long_name = ratio of a circle's circumference to its diameter
Expand Down
20 changes: 10 additions & 10 deletions scm/src/suite_info.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env python

class suite(object):

DEFAULT_MAX_TIMESTEP = 1800.0

def __init__(self, name, tracers, namelist, timestep, max_timestep, supported):
DEFAULT_MAX_TIMESTEP = 1800.0
self._name = name #should remain unchanged after init
Expand All @@ -12,12 +12,12 @@ def __init__(self, name, tracers, namelist, timestep, max_timestep, supported):
self.tracers = self._default_tracers #can be modified after init
self.namelist = self._default_namelist #can be modified after init
self._supported = supported

if max_timestep > 0:
self._max_timestep = max_timestep #should remain unchanged after init
else:
self._max_timestep = DEFAULT_MAX_TIMESTEP

if timestep <= self._max_timestep and timestep > 0:
self._default_timestep = timestep #should remain unchanged after init
self.timestep = self._default_timestep #can be modified after init
Expand All @@ -26,7 +26,7 @@ def __init__(self, name, tracers, namelist, timestep, max_timestep, supported):
else:
message = 'The timestep for suite {0} cannot be set greater than the max_timestep of {1}'.format(self._name, self._max_timestep)
raise Exception(message)

@property
def timestep(self):
"""Get the timestep for the given suite."""
Expand All @@ -40,7 +40,7 @@ def timestep(self, value):
else:
message = 'The timestep for suite {0} cannot be set greater than the max_timestep of {1}'.format(self._name, self._max_timestep)
raise Exception(message)

suite_list = []
suite_list.append(suite('SCM_GFS_v16', 'tracers_GFS_v16.txt', 'input_GFS_v16.nml', 600.0, 1800.0, True ))
suite_list.append(suite('SCM_GFS_v17_p8', 'tracers_GFS_v17_p8.txt', 'input_GFS_v17_p8.nml', 600.0, 600.0, True ))
Expand All @@ -49,6 +49,7 @@ def timestep(self, value):
suite_list.append(suite('SCM_WoFS_v0', 'tracers_WoFS_v0.txt', 'input_WoFS_v0.nml', 600.0, 600.0 , True ))
suite_list.append(suite('SCM_HRRR', 'tracers_HRRR.txt', 'input_HRRR.nml', 600.0, 600.0 , True ))

suite_list.append(suite('SCM_RAP_tietke', 'tracers_RAP.txt', 'input_RAP_tietke.nml', 600.0, 600.0 , False ))
suite_list.append(suite('SCM_GFS_v15p2', 'tracers_GFS_v15p2.txt', 'input_GFS_v15p2.nml', 600.0, 1800.0, False))
suite_list.append(suite('SCM_GFS_v15p2_RRTMGP', 'tracers_GFS_v15p2.txt', 'input_GFS_v15p2_RRTMGP.nml', 600.0, 1800.0, False))
suite_list.append(suite('SCM_GFS_v15p2_no_nsst', 'tracers_GFS_v15p2.txt', 'input_GFS_v15p2.nml', 600.0, 1800.0, False))
Expand All @@ -67,14 +68,13 @@ def timestep(self, value):
suite_list.append(suite('SCM_csawmg', 'tracers_csawmg.txt', 'input_csawmg.nml', 600.0, 1800.0, False))

def main():

#print supported suites separated by commas
suite_string = ''
for s in suite_list:
if s._supported:
suite_string += s._name + ',' + s._name + '_ps' + ','
suite_string += s._name + ',' + s._name + '_ps' + ','
print(suite_string[:-1])

if __name__ == '__main__':
main()

main()

0 comments on commit 65939e1

Please sign in to comment.