diff --git a/paper_2_figs/__pycache__/pcent_rate_max.cpython-36.pyc b/paper_2_figs/__pycache__/pcent_rate_max.cpython-36.pyc index 77dd752..c34c0c9 100644 Binary files a/paper_2_figs/__pycache__/pcent_rate_max.cpython-36.pyc and b/paper_2_figs/__pycache__/pcent_rate_max.cpython-36.pyc differ diff --git a/paper_2_figs/equm_time.py b/paper_2_figs/equm_time.py index 1a8f04e..ea37856 100644 --- a/paper_2_figs/equm_time.py +++ b/paper_2_figs/equm_time.py @@ -20,7 +20,7 @@ def sf_spinup(run, months_list, filenames=['plev_pentad']): # Function to open files for a specfied month range and filename. def open_files(run, months, filename): - name_temp = '/scratch/rg419/Data_moist/' + run + '/run%04d/'+filename+'.nc' + name_temp = '/Users/ruthgeen/mnt/scratch/Data_moist/' + run + '/run%04d/'+filename+'.nc' names = [name_temp % m for m in range( months[0], months[1]) ] data = xr.open_mfdataset( names, decode_times=False, chunks={'time': 30}) # Reduce dataset so that only vcomp is retained @@ -52,7 +52,7 @@ def open_files(run, months, filename): temp = sys.stderr # store original stdout object for later sys.stderr = open('log.txt', 'w') # redirect all prints to this log file - #psi_mean = psi_mean.rolling(time=60).mean() + psi_mean = psi_mean.rolling(time=60).mean() #adj_time_70 = np.min(psi_mean.time.where(psi_mean >= 70.,drop=True).values) adj_time = np.min(psi_mean.time.where(psi_mean >= 74.,drop=True).values) #adj_time_75 = np.min(psi_mean.time.where(psi_mean >= 75.,drop=True).values) @@ -81,7 +81,7 @@ def open_files(run, months, filename): # Set plotting directory -plot_dir = '/scratch/rg419/plots/paper_2_figs/' +plot_dir = '/Users/ruthgeen/Documents/plots/paper_2_figs/' mkdir = sh.mkdir.bake('-p') mkdir(plot_dir) @@ -91,23 +91,23 @@ def open_files(run, months, filename): plt.close() #sf_spinup('ss_eq_20', [[1,61]], filenames=['plev_monthly']) -psi_sst, adj_time = sf_spinup('ss_eq_sst', [[1,61],[61,121]], filenames=['plev_monthly','plev_pentad']) +#psi_sst, adj_time = sf_spinup('ss_eq_sst', [[1,61],[61,121]], filenames=['plev_monthly','plev_pentad']) #psi_sst, adj_time = sf_spinup('ss_eq_sst', [[61,121]], filenames=['plev_pentad']) -#psi_2p5, adj_time = sf_spinup('ss_eq_2.5', [[61,121]], filenames=['plev_pentad']) -#psi_5, adj_time = sf_spinup('ss_eq_5', [[61,121]], filenames=['plev_pentad']) -#psi_10, adj_time = sf_spinup('ss_eq_10', [[61,121]], filenames=['plev_pentad']) -#psi_15, adj_time = sf_spinup('ss_eq_15', [[61,121]], filenames=['plev_pentad']) -#psi_20, adj_time = sf_spinup('ss_eq_20', [[61,121]], filenames=['plev_pentad']) +psi_2p5, adj_time = sf_spinup('ss_eq_2.5', [[61,121]], filenames=['plev_pentad']) +psi_5, adj_time = sf_spinup('ss_eq_5', [[61,121]], filenames=['plev_pentad']) +psi_10, adj_time = sf_spinup('ss_eq_10', [[61,121]], filenames=['plev_pentad']) +psi_15, adj_time = sf_spinup('ss_eq_15', [[61,121]], filenames=['plev_pentad']) +psi_20, adj_time = sf_spinup('ss_eq_20', [[61,121]], filenames=['plev_pentad']) -psi_sst.plot.line() -#psi_2p5.plot.line() -#psi_5.plot.line() -#psi_10.plot.line() -#psi_15.plot.line() -#psi_20.plot.line() -plt.xlim([1700,1900]) +#psi_sst.plot.line() +psi_2p5.plot.line() +psi_5.plot.line() +psi_10.plot.line() +psi_15.plot.line() +psi_20.plot.line() +#plt.xlim([1700,1900]) #plt.ylim([60,80]) #plt.yticks(range(60,81,2)) plt.grid(True,linestyle=':') -plt.savefig(plot_dir + 'psi_sst_short.pdf', format='pdf') +plt.savefig(plot_dir + 'psi_60win.pdf', format='pdf') plt.close() \ No newline at end of file diff --git a/paper_2_figs/pcent_bootstrap.py b/paper_2_figs/pcent_bootstrap.py index c105fa3..9cb9966 100644 --- a/paper_2_figs/pcent_bootstrap.py +++ b/paper_2_figs/pcent_bootstrap.py @@ -86,25 +86,25 @@ def bootstrap_method(data, days=False): if __name__ == "__main__": - data = get_data('sn_1.000') - max_rate, max_rate_lat, max_lat = bootstrap_method(data) - np.save('sn_1_bootstrap',np.array([max_rate,max_rate_lat,max_lat])) + #data = get_data('sn_1.000') + #max_rate, max_rate_lat, max_lat = bootstrap_method(data) + #np.save('sn_1_bootstrap',np.array([max_rate,max_rate_lat,max_lat])) - data = get_data('sn_0.500', period_fac=0.5, months=[121,300]) - max_rate, max_rate_lat, max_lat = bootstrap_method(data) - np.save('sn_p5_bootstrap',np.array([max_rate,max_rate_lat,max_lat])) + #data = get_data('sn_0.500', period_fac=0.5, months=[121,300]) + #max_rate, max_rate_lat, max_lat = bootstrap_method(data) + #np.save('sn_p5_bootstrap',np.array([max_rate,max_rate_lat,max_lat])) - data = get_data('rt_0.500') - max_rate, max_rate_lat, max_lat = bootstrap_method(data) - np.save('rt_p5_bootstrap',np.array([max_rate,max_rate_lat,max_lat])) + #data = get_data('rt_0.500') + #max_rate, max_rate_lat, max_lat = bootstrap_method(data) + #np.save('rt_p5_bootstrap',np.array([max_rate,max_rate_lat,max_lat])) - data = get_data('rt_0.750') - max_rate, max_rate_lat, max_lat = bootstrap_method(data) - np.save('rt_p75_bootstrap',np.array([max_rate,max_rate_lat,max_lat])) + #data = get_data('rt_0.750') + #max_rate, max_rate_lat, max_lat = bootstrap_method(data) + #np.save('rt_p75_bootstrap',np.array([max_rate,max_rate_lat,max_lat])) - data = get_data('rt_1.250') - max_rate, max_rate_lat, max_lat = bootstrap_method(data) - np.save('rt_p5_bootstrap',np.array([max_rate,max_rate_lat,max_lat])) + #data = get_data('rt_1.250') + #max_rate, max_rate_lat, max_lat = bootstrap_method(data) + #np.save('rt_1p25_bootstrap',np.array([max_rate,max_rate_lat,max_lat])) data = get_data('rt_1.500') max_rate, max_rate_lat, max_lat = bootstrap_method(data) diff --git a/paper_2_figs/pcent_rate_max.py b/paper_2_figs/pcent_rate_max.py index a9804f2..28ed805 100644 --- a/paper_2_figs/pcent_rate_max.py +++ b/paper_2_figs/pcent_rate_max.py @@ -15,7 +15,7 @@ def precip_load_and_reshape(run, months=[121,181], period_fac=1.): '''Load and reshape multi-year data into year/day of year shape''' - name_temp = '/scratch/rg419/Data_moist/' + run + '/run%04d/plev_pentad.nc' + name_temp = '/Users/ruthgeen/mnt/scratch/Data_moist/' + run + '/run%04d/plev_pentad.nc' names = [name_temp % m for m in range( months[0], months[1]) ] #read data into xarray @@ -69,7 +69,7 @@ def p_cent_rate_max(runs, do_make_sym=True, months=None, days=None, period_fac=1 for run in runs: if months==None: # If no months provided, look for a climatology # Open dataset - data = xr.open_dataset('/scratch/rg419/Data_moist/climatologies/' + run + '.nc') + data = xr.open_dataset('/Users/ruthgeen/mnt/scratch/Data_moist/climatologies/' + run + '.nc') # Get total precip try: data['precipitation'] = data.condensation_rain + data.convection_rain diff --git a/paper_2_figs/pcent_rate_max_plot.py b/paper_2_figs/pcent_rate_max_plot.py index 93dc143..6ea7b60 100644 --- a/paper_2_figs/pcent_rate_max_plot.py +++ b/paper_2_figs/pcent_rate_max_plot.py @@ -18,7 +18,7 @@ if __name__ == "__main__": # Set plotting directory - plot_dir = '/scratch/rg419/plots/paper_2_figs/' + plot_dir = '/Users/ruthgeen/Documents/plots/paper_2_figs/' mkdir = sh.mkdir.bake('-p') mkdir(plot_dir) @@ -38,8 +38,8 @@ fig, (ax1, ax2) = plt.subplots(2, sharex=True) max_rate, max_rate_lat, max_lat = p_cent_rate_max(runs) - max_rate_5, max_rate_lat_5, max_lat_5 = p_cent_rate_max(runs_5) - max_rate_15, max_rate_lat_15, max_lat_15 = p_cent_rate_max(runs_15) + #max_rate_5, max_rate_lat_5, max_lat_5 = p_cent_rate_max(runs_5) + #max_rate_15, max_rate_lat_15, max_lat_15 = p_cent_rate_max(runs_15) rots = np.array([0.5,0.75,1.,1.25,1.5,1.75,2.]) A = np.array([ np.log(rots), np.ones(rots.shape) ]) @@ -56,16 +56,16 @@ ax1.plot([0.5, 0.75, 1., 1.25, 1.5, 1.75, 2.], max_rate_lat.values, 'xk', mew=2, ms=10) - ax1.plot([0.5, 0.75, 1., 1.25, 1.5, 1.75, 2.], max_rate_lat_5.values, 'xb', mew=2, ms=10) - ax1.plot([0.5, 0.75, 1., 1.25, 1.5, 1.75, 2.], max_rate_lat_15.values, 'xr', mew=2, ms=10) + #ax1.plot([0.5, 0.75, 1., 1.25, 1.5, 1.75, 2.], max_rate_lat_5.values, 'xb', mew=2, ms=10) + #ax1.plot([0.5, 0.75, 1., 1.25, 1.5, 1.75, 2.], max_rate_lat_15.values, 'xr', mew=2, ms=10) ax1.plot(rots, line,'k') #ax1.set_xscale('log') #ax1.set_yscale('log') ax1.set_ylabel('Lat. of max rate') ax2.plot([0.5, 0.75, 1., 1.25, 1.5, 1.75, 2.], max_lat.values, 'xk', mew=2, ms=10) - ax2.plot([0.5, 0.75, 1., 1.25, 1.5, 1.75, 2.], max_lat_5.values, 'xb', mew=2, ms=10) - ax2.plot([0.5, 0.75, 1., 1.25, 1.5, 1.75, 2.], max_lat_15.values, 'xr', mew=2, ms=10) + #ax2.plot([0.5, 0.75, 1., 1.25, 1.5, 1.75, 2.], max_lat_5.values, 'xb', mew=2, ms=10) + #ax2.plot([0.5, 0.75, 1., 1.25, 1.5, 1.75, 2.], max_lat_15.values, 'xr', mew=2, ms=10) ax2.set_xlabel('') #ax2.set_ylim([0,1.1]) #ax2.set_yticks([0,0.25,0.5,0.75]) diff --git a/python_bin_updates/data_handling_updates/__pycache__/__init__.cpython-36.pyc b/python_bin_updates/data_handling_updates/__pycache__/__init__.cpython-36.pyc index da3a22a..c9e68ac 100644 Binary files a/python_bin_updates/data_handling_updates/__pycache__/__init__.cpython-36.pyc and b/python_bin_updates/data_handling_updates/__pycache__/__init__.cpython-36.pyc differ diff --git a/python_bin_updates/data_handling_updates/__pycache__/add_vars_netcdf.cpython-36.pyc b/python_bin_updates/data_handling_updates/__pycache__/add_vars_netcdf.cpython-36.pyc index d22708a..d535399 100644 Binary files a/python_bin_updates/data_handling_updates/__pycache__/add_vars_netcdf.cpython-36.pyc and b/python_bin_updates/data_handling_updates/__pycache__/add_vars_netcdf.cpython-36.pyc differ diff --git a/python_bin_updates/data_handling_updates/__pycache__/cell_area.cpython-36.pyc b/python_bin_updates/data_handling_updates/__pycache__/cell_area.cpython-36.pyc index bcfa80c..7e136d7 100644 Binary files a/python_bin_updates/data_handling_updates/__pycache__/cell_area.cpython-36.pyc and b/python_bin_updates/data_handling_updates/__pycache__/cell_area.cpython-36.pyc differ diff --git a/python_bin_updates/data_handling_updates/__pycache__/ellipses.cpython-36.pyc b/python_bin_updates/data_handling_updates/__pycache__/ellipses.cpython-36.pyc index 2ba6848..dda2cf0 100644 Binary files a/python_bin_updates/data_handling_updates/__pycache__/ellipses.cpython-36.pyc and b/python_bin_updates/data_handling_updates/__pycache__/ellipses.cpython-36.pyc differ diff --git a/python_bin_updates/data_handling_updates/__pycache__/gradients.cpython-36.pyc b/python_bin_updates/data_handling_updates/__pycache__/gradients.cpython-36.pyc index 8cf91c3..0daa129 100644 Binary files a/python_bin_updates/data_handling_updates/__pycache__/gradients.cpython-36.pyc and b/python_bin_updates/data_handling_updates/__pycache__/gradients.cpython-36.pyc differ diff --git a/python_bin_updates/data_handling_updates/__pycache__/make_sym.cpython-36.pyc b/python_bin_updates/data_handling_updates/__pycache__/make_sym.cpython-36.pyc index b232f83..7720a10 100644 Binary files a/python_bin_updates/data_handling_updates/__pycache__/make_sym.cpython-36.pyc and b/python_bin_updates/data_handling_updates/__pycache__/make_sym.cpython-36.pyc differ diff --git a/python_bin_updates/data_handling_updates/__pycache__/model_constants.cpython-36.pyc b/python_bin_updates/data_handling_updates/__pycache__/model_constants.cpython-36.pyc index 9e03085..7474144 100644 Binary files a/python_bin_updates/data_handling_updates/__pycache__/model_constants.cpython-36.pyc and b/python_bin_updates/data_handling_updates/__pycache__/model_constants.cpython-36.pyc differ diff --git a/python_bin_updates/data_handling_updates/__pycache__/postprocessing_scripts.cpython-36.pyc b/python_bin_updates/data_handling_updates/__pycache__/postprocessing_scripts.cpython-36.pyc index 009fa6f..cc5e97c 100644 Binary files a/python_bin_updates/data_handling_updates/__pycache__/postprocessing_scripts.cpython-36.pyc and b/python_bin_updates/data_handling_updates/__pycache__/postprocessing_scripts.cpython-36.pyc differ diff --git a/python_bin_updates/data_handling_updates/__pycache__/rolling_mean.cpython-36.pyc b/python_bin_updates/data_handling_updates/__pycache__/rolling_mean.cpython-36.pyc index 7653318..2005740 100644 Binary files a/python_bin_updates/data_handling_updates/__pycache__/rolling_mean.cpython-36.pyc and b/python_bin_updates/data_handling_updates/__pycache__/rolling_mean.cpython-36.pyc differ diff --git a/python_bin_updates/data_handling_updates/__pycache__/time_dics.cpython-36.pyc b/python_bin_updates/data_handling_updates/__pycache__/time_dics.cpython-36.pyc index d417e2c..8247821 100644 Binary files a/python_bin_updates/data_handling_updates/__pycache__/time_dics.cpython-36.pyc and b/python_bin_updates/data_handling_updates/__pycache__/time_dics.cpython-36.pyc differ diff --git a/python_bin_updates/data_handling_updates/__pycache__/time_means.cpython-36.pyc b/python_bin_updates/data_handling_updates/__pycache__/time_means.cpython-36.pyc index f6a4298..8c704a2 100644 Binary files a/python_bin_updates/data_handling_updates/__pycache__/time_means.cpython-36.pyc and b/python_bin_updates/data_handling_updates/__pycache__/time_means.cpython-36.pyc differ diff --git a/python_bin_updates/physics_updates/climatology/__pycache__/precip_centroid.cpython-36.pyc b/python_bin_updates/physics_updates/climatology/__pycache__/precip_centroid.cpython-36.pyc index 2b61dd7..1dc989d 100644 Binary files a/python_bin_updates/physics_updates/climatology/__pycache__/precip_centroid.cpython-36.pyc and b/python_bin_updates/physics_updates/climatology/__pycache__/precip_centroid.cpython-36.pyc differ diff --git a/python_bin_updates/physics_updates/climatology/precip_centroid.py b/python_bin_updates/physics_updates/climatology/precip_centroid.py index 4e5d3a3..8a7c52d 100644 --- a/python_bin_updates/physics_updates/climatology/precip_centroid.py +++ b/python_bin_updates/physics_updates/climatology/precip_centroid.py @@ -26,7 +26,7 @@ def precip_centroid(data, lat_bound=45., lonin=[-1.,361.], res=0.01): lat_bound = lat range to integrate over lonin = longitude range to use''' - area = cell_area(42, '/scratch/rg419/GFDL_model/GFDLmoistModel/') # Area of grid cells + area = cell_area(42, '/Users/ruthgeen/mnt/scratch/GFDL_model/GFDLmoistModel/') # Area of grid cells # Add area to dataset data['area'] = (('lat','lon'), area) diff --git a/python_bin_updates/physics_updates/hadley_cell/__pycache__/__init__.cpython-36.pyc b/python_bin_updates/physics_updates/hadley_cell/__pycache__/__init__.cpython-36.pyc index 08dce43..770069e 100644 Binary files a/python_bin_updates/physics_updates/hadley_cell/__pycache__/__init__.cpython-36.pyc and b/python_bin_updates/physics_updates/hadley_cell/__pycache__/__init__.cpython-36.pyc differ diff --git a/python_bin_updates/physics_updates/hadley_cell/__pycache__/better_regime_fig.cpython-36.pyc b/python_bin_updates/physics_updates/hadley_cell/__pycache__/better_regime_fig.cpython-36.pyc index 55949a2..58b9d3e 100644 Binary files a/python_bin_updates/physics_updates/hadley_cell/__pycache__/better_regime_fig.cpython-36.pyc and b/python_bin_updates/physics_updates/hadley_cell/__pycache__/better_regime_fig.cpython-36.pyc differ diff --git a/python_bin_updates/physics_updates/hadley_cell/__pycache__/mass_streamfunction.cpython-36.pyc b/python_bin_updates/physics_updates/hadley_cell/__pycache__/mass_streamfunction.cpython-36.pyc index f0c46aa..6cd5937 100644 Binary files a/python_bin_updates/physics_updates/hadley_cell/__pycache__/mass_streamfunction.cpython-36.pyc and b/python_bin_updates/physics_updates/hadley_cell/__pycache__/mass_streamfunction.cpython-36.pyc differ diff --git a/python_bin_updates/physics_updates/hadley_cell/__pycache__/overturning_hm.cpython-36.pyc b/python_bin_updates/physics_updates/hadley_cell/__pycache__/overturning_hm.cpython-36.pyc index 48d3654..dc838ce 100644 Binary files a/python_bin_updates/physics_updates/hadley_cell/__pycache__/overturning_hm.cpython-36.pyc and b/python_bin_updates/physics_updates/hadley_cell/__pycache__/overturning_hm.cpython-36.pyc differ diff --git a/python_bin_updates/physics_updates/hadley_cell/__pycache__/psi_edge_loc.cpython-36.pyc b/python_bin_updates/physics_updates/hadley_cell/__pycache__/psi_edge_loc.cpython-36.pyc index 64eed97..0bcccc6 100644 Binary files a/python_bin_updates/physics_updates/hadley_cell/__pycache__/psi_edge_loc.cpython-36.pyc and b/python_bin_updates/physics_updates/hadley_cell/__pycache__/psi_edge_loc.cpython-36.pyc differ diff --git a/python_bin_updates/physics_updates/hadley_cell/__pycache__/streamfun_zeros.cpython-36.pyc b/python_bin_updates/physics_updates/hadley_cell/__pycache__/streamfun_zeros.cpython-36.pyc index 61877e6..c1bb632 100644 Binary files a/python_bin_updates/physics_updates/hadley_cell/__pycache__/streamfun_zeros.cpython-36.pyc and b/python_bin_updates/physics_updates/hadley_cell/__pycache__/streamfun_zeros.cpython-36.pyc differ diff --git a/python_bin_updates/physics_updates/hadley_cell/streamfun_zeros.py b/python_bin_updates/physics_updates/hadley_cell/streamfun_zeros.py index 83529d1..f72b481 100644 --- a/python_bin_updates/physics_updates/hadley_cell/streamfun_zeros.py +++ b/python_bin_updates/physics_updates/hadley_cell/streamfun_zeros.py @@ -64,11 +64,11 @@ def get_streamfun_zeros(data, lev=150., sanity_check=False): -data = xr.open_dataset('/scratch/rg419/Data_moist/climatologies/rt_0.500.nc') +data = xr.open_dataset('/Users/ruthgeen/mnt/scratch/Data_moist/climatologies/rt_0.500.nc') get_streamfun_zeros(data) -data = xr.open_dataset('/scratch/rg419/Data_moist/climatologies/sn_1.000.nc') +data = xr.open_dataset('/Users/ruthgeen/mnt/scratch/Data_moist/climatologies/sn_1.000.nc') get_streamfun_zeros(data) -data = xr.open_dataset('/scratch/rg419/Data_moist/climatologies/rt_2.000.nc') +data = xr.open_dataset('/Users/ruthgeen/mnt/scratch/Data_moist/climatologies/rt_2.000.nc') get_streamfun_zeros(data) \ No newline at end of file