Add global physical constants
This commit is contained in:
parent
6c9c8468b8
commit
bd2abe41bd
@ -20,16 +20,23 @@ from get_data import get_data_woa2009 as read_data
|
|||||||
# MANUAL DEFINED OUTPUTS MISSING
|
# MANUAL DEFINED OUTPUTS MISSING
|
||||||
# ############################################################################################
|
# ############################################################################################
|
||||||
print 'MANUAL DEFINED OUTPUTS MISSING'
|
print 'MANUAL DEFINED OUTPUTS MISSING'
|
||||||
|
dim = ('lon','lat','z','time',)
|
||||||
dir_plot = '/glusterfs/inspect/users/xg911182/Code/Python/plots_test/'
|
dir_plot = '/glusterfs/inspect/users/xg911182/Code/Python/plots_test/'
|
||||||
variables = {'s':{},'theta':{},'grd':[],'valid':[]}
|
variables = {'s':{},'theta':{},'grd':[],'valid':[]}
|
||||||
|
|
||||||
# Input 1 ####################################################################################
|
# Input 1 ####################################################################################
|
||||||
# Physical constants
|
# Physical constants
|
||||||
# output : r_earth
|
# output : r_earth, rho0, grav, gbuo
|
||||||
# r_earth : earth radis [m]
|
# r_earth : earth radis [m]
|
||||||
|
# rho0 : reference density [kg m**-3]
|
||||||
|
# grav : gravity [m s**-2]
|
||||||
|
# gbuo :
|
||||||
# PHYSICAL CONSTATS MISSING
|
# PHYSICAL CONSTATS MISSING
|
||||||
# ############################################################################################
|
# ############################################################################################
|
||||||
print 'PHYSICAL CONSTATS MISSING'
|
r_earth = 6.4e06
|
||||||
|
rho0 = 1027.0
|
||||||
|
grav = 9.81
|
||||||
|
gbuo = -grav/rho0
|
||||||
|
|
||||||
# step a #####################################################################################
|
# step a #####################################################################################
|
||||||
# Read necessary data to calculate reference state
|
# Read necessary data to calculate reference state
|
||||||
@ -46,7 +53,7 @@ beg_time = time.time()
|
|||||||
print ''
|
print ''
|
||||||
print ' ----------------------------------------------'
|
print ' ----------------------------------------------'
|
||||||
print ' Read data'
|
print ' Read data'
|
||||||
grd, data = read_data(variables)
|
grd, data = read_data(variables,dim)
|
||||||
print ' ----------------------------------------------'
|
print ' ----------------------------------------------'
|
||||||
end_time = time.time()
|
end_time = time.time()
|
||||||
print 'Elapsed time to read data: '+ '{:.2f}'.format(end_time-beg_time)+'s'
|
print 'Elapsed time to read data: '+ '{:.2f}'.format(end_time-beg_time)+'s'
|
||||||
|
Loading…
Reference in New Issue
Block a user