예제 #1
0
    key_name = 'exp_control_naburu'
else:
    key_name = sys.argv[1]

print('diagnose ' + key_name)
#key_name='2layer_long_run_2'
#key_name='exp_forcing_naburu_tau10_output_test'
base = '/scratch/midway2/holo/'
#base='/home/t-970c07/scratch-midway2/'
#base='/project2/rossby/group07/'
#base='/Projects/mount/'
load_path = base + key_name + '/'
save_path = '/project2/rossby/group07/model_outputs_netCDF/' + key_name + '/'
#save_path=base+'/model_outputs_netCDF/'+key_name+'/'
print('Diagnostics for experiment: ', key_name)
MT.mkdirs_r(save_path)
# print('Current directory:', os.getcwd())
print('Retrieving data from: ', load_path)
print('Experiment name: ', key_name)
# print('Files present: ',glob.glob(load_path+'/*'))

# In[]
D = data_converter.experiment(load_path)

#time1=D.time_steps[-1]
eke = D.load_eke()
print('EKE = ', eke)

MT.pickle_save(path=save_path, name=key_name + '_EKE', data=eke, verbose=True)
MT.save_log_txt(path=save_path, name=key_name + '_EKE', hist=eke, verbose=True)
예제 #2
0
key_name = 'exp_control_naburu2_jet'
print('diagnose ' + key_name)

plot = True
#key_name='exp_both'
base = '/home/t-970c07/scratch-midway2/'
#base='/project2/rossby/group07/'
#base='/Projects/mount/'
load_path = base + key_name + '/'

plot_path = '/project2/rossby/group07/2layer_nn_plots/' + key_name + '/'

#save_path='/project2/rossby/group07/model_outputs_netCDF/'+key_name+'/'
#MT.mkdirs_r(save_path)
MT.mkdirs_r(plot_path)
#save_path=base+'/netCDF_files/'
print(os.getcwd())


# In[]
class experiment(object):
    def __init__(self, path, dt=None):
        """
            load experiment diagnostiscs
            returns:

            self.path
            self.diagnostics
            self.setup
            self.snapshots