diff --git a/calc_ref_state.py b/calc_ref_state.py index 974eba7..b0a60d5 100644 --- a/calc_ref_state.py +++ b/calc_ref_state.py @@ -20,16 +20,23 @@ from get_data import get_data_woa2009 as read_data # MANUAL DEFINED OUTPUTS MISSING # ############################################################################################ print 'MANUAL DEFINED OUTPUTS MISSING' +dim = ('lon','lat','z','time',) dir_plot = '/glusterfs/inspect/users/xg911182/Code/Python/plots_test/' variables = {'s':{},'theta':{},'grd':[],'valid':[]} # Input 1 #################################################################################### # Physical constants -# output : r_earth +# output : r_earth, rho0, grav, gbuo # r_earth : earth radis [m] +# rho0 : reference density [kg m**-3] +# grav : gravity [m s**-2] +# gbuo : # PHYSICAL CONSTATS MISSING # ############################################################################################ -print 'PHYSICAL CONSTATS MISSING' +r_earth = 6.4e06 +rho0 = 1027.0 +grav = 9.81 +gbuo = -grav/rho0 # step a ##################################################################################### # Read necessary data to calculate reference state @@ -46,7 +53,7 @@ beg_time = time.time() print '' print ' ----------------------------------------------' print ' Read data' -grd, data = read_data(variables) +grd, data = read_data(variables,dim) print ' ----------------------------------------------' end_time = time.time() print 'Elapsed time to read data: '+ '{:.2f}'.format(end_time-beg_time)+'s'