diff --git a/codes/co2_explain_plot.py b/codes/co2_explain_plot.py new file mode 100644 index 0000000000000000000000000000000000000000..6c5c22aa878f33da314e39d711a4f88690eeed3c --- /dev/null +++ b/codes/co2_explain_plot.py @@ -0,0 +1,136 @@ +#Run before in terminal: module load license_intel intel hdf hdf5 netcdf4 miniconda + +### There are two forms of this code. One is to give both the categorical FOV maps of co-located ### +### VIIRS, CO2 Slicing, and DR as well as the straight up COT and CTP maps. This code also has ### +### the framework for historgram comparative imagaes. ### + + +from datetime import datetime +start_time=datetime.now() + +import matplotlib +matplotlib.use("AGG") +import matplotlib.pyplot as plt +import numpy as np +#import h5py as h +import os +import sys +import cartopy +import cartopy.crs as ccrs +import matplotlib.colors as colors +import matplotlib.patches as patches +import matplotlib.ticker as mticker +from numpy import loadtxt +from cartopy.mpl.gridliner import LONGITUDE_FORMATTER, LATITUDE_FORMATTER +from datetime import date +from shutil import copyfile +import shutil +import netCDF4 as cdf +import sys +sys.path.insert(1,'/home/bandersen/iris-home/all_algorithms/funcs') +import functions_co2_slicing as func + +f1=cdf.Dataset("/apollo/jung/snebuda/brianne/2021/cris.431.n20.20210411_173000.20210411_180000.bt.nc") +f2=cdf.Dataset("/apollo/jung/snebuda/brianne/2021/cris.431.n20.20210411_173000.20210411_180000.wf.nc") +f3=cdf.Dataset("/apollo/jung/snebuda/brianne/2021/cris.431.n20.20210411_173000.20210411_180000.state.nc") +f4=cdf.Dataset("/apollo/jung/snebuda/brianne/2021/cris.431.n20.20210411_173000.20210411_180000.te.nc") +da=f1['date'][:] +la=f1['lat'][:] +lo=f1['lon'][:] +fo=f1['solzen'][:] +fv=f1['fovn'][:] +tc=f1['tocc'][:] +to=f1['lsql'][:] +lf=f1['alfr'][:] +pv=f1['hoct'][:] +bi=f1['bias_gfs'][:] +us=f1['useflag'][:] +ob=f1['tb_obs'][:] +cr=f1['tb_clear'][:] +wf=f2['wf'][:] +pr=f3['pmid'][:] +te=f3['temp'][:] +ta=f4['ptau5'][:] + + +wn1=32 +wn2=53 +wn3=69 +wn4=98 +wn5=122 +wn6=216 +num=1585 + +pbl_top=pr[num,func.pbl(num,pr,te)] +tropp=pr[num,func.trop(num,pr,te,da,la)] +psp=np.size(func.integrate_six(num,pr,te,da,la)[:])-2 +presures=func.integrate_six(num,pr,te,da,la)[2:psp] +gr1=func.integrate_five(num,wn1,wn2,ob,cr,ta,te,pr,da,la,bi) +gr2=func.integrate_five(num,wn2,wn3,ob,cr,ta,te,pr,da,la,bi) +gr3=func.integrate_five(num,wn3,wn4,ob,cr,ta,te,pr,da,la,bi) +gr4=func.integrate_five(num,wn4,wn5,ob,cr,ta,te,pr,da,la,bi) + +a1_01=func.co2(num,28,cr,ob,bi) +a1_02=func.co2(num,30,cr,ob,bi) +a1_03=func.co2(num,32,cr,ob,bi) +a1_04=func.co2(num,34,cr,ob,bi) +a1_05=func.co2(num,36,cr,ob,bi) +a1_06=func.co2(num,49,cr,ob,bi) +a1_07=func.co2(num,51,cr,ob,bi) +a1_08=func.co2(num,53,cr,ob,bi) +a1_09=func.co2(num,55,cr,ob,bi) +a1_10=func.co2(num,57,cr,ob,bi) +a1_11=func.co2(num,65,cr,ob,bi) +a1_12=func.co2(num,67,cr,ob,bi) +a1_13=func.co2(num,69,cr,ob,bi) +a1_14=func.co2(num,71,cr,ob,bi) +a1_15=func.co2(num,73,cr,ob,bi) +a1_16=func.co2(num,94,cr,ob,bi) +a1_17=func.co2(num,96,cr,ob,bi) +a1_18=func.co2(num,98,cr,ob,bi) +a1_19=func.co2(num,100,cr,ob,bi) +a1_20=func.co2(num,102,cr,ob,bi) +a1_21=func.co2(num,122,cr,ob,bi) + +print(a1_03) +print(a1_08) +print(a1_13) +print(a1_18) + +fig=plt.figure() +plt.plot(gr4,presures,color='purple',label=r"$A_3(733.125,748.125)$") +plt.axhline(y=tropp,color='black',linestyle=":",label="Tropopause Height") +plt.axvline(x=0,color='black') +plt.axhline(y=pbl_top,color='black',linestyle="-.",label="PBL Top Height") +plt.ylabel("Pressure hPa") +plt.xlim(-0.5,0.5) +plt.yscale('log',basey=2) +plt.yticks([150,200,300,400,500,600,700,800,900,1000],['150','200','300','400','500','600','700','800','900','1000']) +plt.gca().invert_yaxis() +plt.xlabel(r"$A_{3}$ Value at Pressure Level") +plt.ylim(1000,150) +filepth=("/home/bandersen/iris-home/co2_exampl_plot_2.png") +fig.set_size_inches(10,10) +plt.savefig(filepth) + +xs1=[a1_03] +xs2=[a1_08] +xs3=[a1_13] +xs4=[a1_18] +xs5=[a1_21] +ys=[0.5] + +fig=plt.figure() +plt.scatter(xs1,ys,color='red',label=r"$A_1(691.875)$") +plt.scatter(xs2,ys,color='blue',label=r"$A_1(705)$") +plt.scatter(xs3,ys,color='green',label=r"$A_1(715)$") +plt.scatter(xs4,ys,color='purple',label=r"$A_1(733.125)$") +plt.scatter(xs5,ys,color='grey',label=r"$A_1(748.125)$") +plt.axvline(x=0.5,color='black',label="Cutoff") +plt.ylim(0,1) +plt.xlim(-0.4,1.4) +filepth=("/home/bandersen/iris-home/co2_exampl_plot_1.png") +fig.set_size_inches(10,2) +plt.savefig(filepth) + + diff --git a/codes/comp_color_charts.py b/codes/comp_color_charts.py new file mode 100644 index 0000000000000000000000000000000000000000..9bbc5b489fc11931b9dbdde03a1373c15de4ee34 --- /dev/null +++ b/codes/comp_color_charts.py @@ -0,0 +1,396 @@ +#Run before in terminal: module load license_intel intel hdf hdf5 netcdf4 miniconda + +### There are two forms of this code. One is to give both the categorical FOV maps of co-located ### +### VIIRS, CO2 Slicing, and DR as well as the straight up COT and CTP maps. This code also has ### +### the framework for historgram comparative imagaes. ### + + +from datetime import datetime +start_time=datetime.now() + +import matplotlib +matplotlib.use("AGG") +import matplotlib.pyplot as plt +import numpy as np +import h5py as h +import os +import sys +import cartopy +import cartopy.crs as ccrs +import matplotlib.colors as colors +import matplotlib.patches as patches +import matplotlib.ticker as mticker +from numpy import loadtxt +from cartopy.mpl.gridliner import LONGITUDE_FORMATTER, LATITUDE_FORMATTER +from datetime import date +from shutil import copyfile +import shutil +import netCDF4 as cdf +filepath=("/home/bandersen/iris-home") +extent=[-180,180,-90,90] +x_ticks1=[-180,-165,-150,-135,-120,-105,-90,-75,-60,-45,-30,-15,0,15,30,45,60,75,90,105,120,135,150,165,180] +y_ticks1=[-90,-75,-60,-45,-30,-15,0,15,30,45,60,75,90] +x_ticks2=[-180,-135,-90,-45,0,45,90,135,180] +y_ticks2=[-90,-60,-30,0,30,60,90] +cmap2=colors.ListedColormap(['red','orange','green','blue','white']) +boundaries2=[0,1,2,3,4,5,6] +norm2=colors.BoundaryNorm(boundaries2,cmap2.N,clip=True) +def lev_cat_sel(i,array): + a=array[i] + if a>=0 and a<32: + b=1 + elif a>=32 and a<63: + b=2 + elif a>=63 and a<94: + b=3 + elif a>=94 and a<125: + b=4 + elif a>=125: + b=5 + else: + b=6 + return(b) + +h_a=0.5 +ch_a="5mb" +hh_a=str('%.1f'%h_a) +day_time_a=("2020_08_21_03_18_"+hh_a+"_"+ch_a) +day_label_a=(r'$\bf{Date}$ 2020-08-21 $\bf{Time}$ 03:00-18:00 $\bf{A(\nu)\geq}$ '+hh_a+r' $\bf{Chan}$ 4X5'+r' Minus Bias'+'\n'+'\n'+'\n') +file_a=("/apollo/jung/bandersen/compare_full_no_parts/compare_output_2020_08_21_03_18_chan_"+ch_a+"_h_"+hh_a+".txt") +array_a=loadtxt(file_a,comments='#',delimiter=',',unpack=True) +lat_a=array_a[0][:] +lon_a=array_a[1][:] +lev_a=array_a[9][:] +size_a=np.size(lat_a) +lev_cat_a=[] +for a in range(0,size_a): + b=lev_cat_sel(a,lev_a) + lev_cat_a.append(b) +fig=plt.figure() +proj=ccrs.PlateCarree() +ax=plt.axes(projection=proj) +ax.add_feature(cartopy.feature.OCEAN,zorder=0,alpha=0.5,facecolor='lightskyblue') +ax.add_feature(cartopy.feature.BORDERS,edgecolor='slategray') +ax.add_feature(cartopy.feature.COASTLINE,edgecolor='black') +ax.add_feature(cartopy.feature.LAND,zorder=0,edgecolor='black',alpha=0.5,facecolor='beige') +ax.set_extent(extent,crs=proj) +gl=ax.gridlines(crs=proj,linewidth=2,color='grey',alpha=0.5,linestyle='--',draw_labels=True) +gl.xlocator=mticker.FixedLocator(x_ticks1) +gl.ylocator=mticker.FixedLocator(y_ticks1) +gl.xlabels_top=False +gl.xlabels_bottom=False +gl.ylabels_right=False +gl.ylabels_left=False +gl.xlines=True +gl.xformatter=LONGITUDE_FORMATTER +gl.yformatter=LATITUDE_FORMATTER +gl.xlabel_style={'color':'red','weight':'bold','size':'40'} +gl.ylabel_style={'color':'red','weight':'bold','size':'40'} +g2=ax.gridlines(crs=proj,linewidth=2,color='grey',alpha=0.5,linestyle='--',draw_labels=True) +g2.xlocator=mticker.FixedLocator(x_ticks2) +g2.ylocator=mticker.FixedLocator(y_ticks2) +g2.xlabels_bottom=False +g2.ylabels_right=False +g2.ylabels_left=True +g2.xlines=True +g2.xformatter=LONGITUDE_FORMATTER +g2.yformatter=LATITUDE_FORMATTER +g2.xlabel_style={'color':'white','weight':'bold','size':'16'} +g2.ylabel_style={'color':'white','weight':'bold','size':'16'} +data=plt.scatter(lon_a,lat_a,c=lev_cat_a,cmap=cmap2,s=2) +plt.suptitle(' CO2 Slicing Channesl Selected',weight='bold',fontsize=35) +plt.title(day_label_a,fontsize=18) +cb=plt.colorbar(data,aspect=30,fraction=.045,pad=.04) +cb.set_ticks([1.2,2.0,2.8,3.6,4.4]) +cb.set_ticklabels(['691.875 Cluster','705.000 Cluster','715.000 Cluster','733.125 Cluster','CLR']) +cb.ax.tick_params(labelsize=25) +filepth=(filepath+"/LEV_CO2_cat_"+day_time_a+".png") +fig.set_size_inches(11.75,9.25) +plt.savefig(filepth,dpi=fig.dpi,bbox_inches='tight',facecolor='#AEC0C9',edgecolor='#57575F') + +h_b=1.0 +ch_b="5mb" +hh_b=str('%.1f'%h_b) +day_time_b=("2020_08_21_03_18_"+hh_b+"_"+ch_b) +day_label_b=(r'$\bf{Date}$ 2020-08-21 $\bf{Time}$ 03:00-18:00 $\bf{A(\nu)\geq}$ '+hh_b+r' $\bf{Chan}$ 4X5'+r' Minus Bias'+'\n'+'\n'+'\n') +file_b=("/apollo/jung/bandersen/compare_full_no_parts/compare_output_2020_08_21_03_18_chan_"+ch_b+"_h_"+hh_b+".txt") +array_b=loadtxt(file_b,comments='#',delimiter=',',unpack=True) +lat_b=array_b[0][:] +lon_b=array_b[1][:] +lev_b=array_b[9][:] +size_b=np.size(lat_b) +lev_cat_b=[] +for a in range(0,size_b): + b=lev_cat_sel(a,lev_b) + lev_cat_b.append(b) +fig=plt.figure() +proj=ccrs.PlateCarree() +ax=plt.axes(projection=proj) +ax.add_feature(cartopy.feature.OCEAN,zorder=0,alpha=0.5,facecolor='lightskyblue') +ax.add_feature(cartopy.feature.BORDERS,edgecolor='slategray') +ax.add_feature(cartopy.feature.COASTLINE,edgecolor='black') +ax.add_feature(cartopy.feature.LAND,zorder=0,edgecolor='black',alpha=0.5,facecolor='beige') +ax.set_extent(extent,crs=proj) +gl=ax.gridlines(crs=proj,linewidth=2,color='grey',alpha=0.5,linestyle='--',draw_labels=True) +gl.xlocator=mticker.FixedLocator(x_ticks1) +gl.ylocator=mticker.FixedLocator(y_ticks1) +gl.xlabels_top=False +gl.xlabels_bottom=False +gl.ylabels_right=False +gl.ylabels_left=False +gl.xlines=True +gl.xformatter=LONGITUDE_FORMATTER +gl.yformatter=LATITUDE_FORMATTER +gl.xlabel_style={'color':'red','weight':'bold','size':'40'} +gl.ylabel_style={'color':'red','weight':'bold','size':'40'} +g2=ax.gridlines(crs=proj,linewidth=2,color='grey',alpha=0.5,linestyle='--',draw_labels=True) +g2.xlocator=mticker.FixedLocator(x_ticks2) +g2.ylocator=mticker.FixedLocator(y_ticks2) +g2.xlabels_bottom=False +g2.ylabels_right=False +g2.ylabels_left=True +g2.xlines=True +g2.xformatter=LONGITUDE_FORMATTER +g2.yformatter=LATITUDE_FORMATTER +g2.xlabel_style={'color':'white','weight':'bold','size':'16'} +g2.ylabel_style={'color':'white','weight':'bold','size':'16'} +data=plt.scatter(lon_b,lat_b,c=lev_cat_b,cmap=cmap2,s=2) +plt.suptitle(' CO2 Slicing Channesl Selected',weight='bold',fontsize=35) +plt.title(day_label_b,fontsize=18) +cb=plt.colorbar(data,aspect=30,fraction=.045,pad=.04) +cb.set_ticks([1.2,2.0,2.8,3.6,4.4]) +cb.set_ticklabels(['691.875 Cluster','705.000 Cluster','715.000 Cluster','733.125 Cluster','CLR']) +cb.ax.tick_params(labelsize=25) +filepth=(filepath+"/LEV_CO2_cat_"+day_time_b+".png") +fig.set_size_inches(11.75,9.25) +plt.savefig(filepth,dpi=fig.dpi,bbox_inches='tight',facecolor='#AEC0C9',edgecolor='#57575F') + +h_z=0.5 +ch_z="5nb" +hh_z=str('%.1f'%h_z) +day_time_z=("2020_08_21_03_18_"+hh_z+"_"+ch_z) +day_label_z=(r'$\bf{Date}$ 2020-08-21 $\bf{Time}$ 03:00-18:00 $\bf{A(\nu)\geq}$ '+hh_z+r' $\bf{Chan}$ 4X5'+r' No Bias'+'\n'+'\n'+'\n') +file_z=("/apollo/jung/bandersen/compare_full_no_parts/compare_output_2020_08_21_03_18_chan_"+ch_z+"_h_"+hh_z+".txt") +array_z=loadtxt(file_z,comments='#',delimiter=',',unpack=True) +lat_z=array_z[0][:] +lon_z=array_z[1][:] +lev_z=array_z[9][:] +size_z=np.size(lat_z) +lev_cat_z=[] +for a in range(0,size_z): + b=lev_cat_sel(a,lev_z) + lev_cat_z.append(b) +fig=plt.figure() +proj=ccrs.PlateCarree() +ax=plt.axes(projection=proj) +ax.add_feature(cartopy.feature.OCEAN,zorder=0,alpha=0.5,facecolor='lightskyblue') +ax.add_feature(cartopy.feature.BORDERS,edgecolor='slategray') +ax.add_feature(cartopy.feature.COASTLINE,edgecolor='black') +ax.add_feature(cartopy.feature.LAND,zorder=0,edgecolor='black',alpha=0.5,facecolor='beige') +ax.set_extent(extent,crs=proj) +gl=ax.gridlines(crs=proj,linewidth=2,color='grey',alpha=0.5,linestyle='--',draw_labels=True) +gl.xlocator=mticker.FixedLocator(x_ticks1) +gl.ylocator=mticker.FixedLocator(y_ticks1) +gl.xlabels_top=False +gl.xlabels_zottom=False +gl.ylabels_right=False +gl.ylabels_left=False +gl.xlines=True +gl.xformatter=LONGITUDE_FORMATTER +gl.yformatter=LATITUDE_FORMATTER +gl.xlabel_style={'color':'red','weight':'bold','size':'40'} +gl.ylabel_style={'color':'red','weight':'bold','size':'40'} +g2=ax.gridlines(crs=proj,linewidth=2,color='grey',alpha=0.5,linestyle='--',draw_labels=True) +g2.xlocator=mticker.FixedLocator(x_ticks2) +g2.ylocator=mticker.FixedLocator(y_ticks2) +g2.xlabels_zottom=False +g2.ylabels_right=False +g2.ylabels_left=True +g2.xlines=True +g2.xformatter=LONGITUDE_FORMATTER +g2.yformatter=LATITUDE_FORMATTER +g2.xlabel_style={'color':'white','weight':'bold','size':'16'} +g2.ylabel_style={'color':'white','weight':'bold','size':'16'} +data=plt.scatter(lon_z,lat_z,c=lev_cat_z,cmap=cmap2,s=2) +plt.suptitle(' CO2 Slicing Channesl Selected',weight='bold',fontsize=35) +plt.title(day_label_z,fontsize=18) +cb=plt.colorbar(data,aspect=30,fraction=.045,pad=.04) +cb.set_ticks([1.2,2.0,2.8,3.6,4.4]) +cb.set_ticklabels(['691.875 Cluster','705.000 Cluster','715.000 Cluster','733.125 Cluster','CLR']) +cb.ax.tick_params(labelsize=25) +filepth=(filepath+"/LEV_CO2_cat_"+day_time_z+".png") +fig.set_size_inches(11.75,9.25) +plt.savefig(filepth,dpi=fig.dpi,bbox_inches='tight',facecolor='#AEC0C9',edgecolor='#57575F') + +h_y=1.0 +ch_y="5nb" +hh_y=str('%.1f'%h_y) +day_time_y=("2020_08_21_03_18_"+hh_y+"_"+ch_y) +day_label_y=(r'$\bf{Date}$ 2020-08-21 $\bf{Time}$ 03:00-18:00 $\bf{A(\nu)\geq}$ '+hh_y+r' $\bf{Chan}$ 4X5'+r' No Bias'+'\n'+'\n'+'\n') +file_y=("/apollo/jung/bandersen/compare_full_no_parts/compare_output_2020_08_21_03_18_chan_"+ch_y+"_h_"+hh_y+".txt") +array_y=loadtxt(file_y,comments='#',delimiter=',',unpack=True) +lat_y=array_y[0][:] +lon_y=array_y[1][:] +lev_y=array_y[9][:] +size_y=np.size(lat_y) +lev_cat_y=[] +for a in range(0,size_y): + b=lev_cat_sel(a,lev_y) + lev_cat_y.append(b) +fig=plt.figure() +proj=ccrs.PlateCarree() +ax=plt.axes(projection=proj) +ax.add_feature(cartopy.feature.OCEAN,zorder=0,alpha=0.5,facecolor='lightskyblue') +ax.add_feature(cartopy.feature.BORDERS,edgecolor='slategray') +ax.add_feature(cartopy.feature.COASTLINE,edgecolor='black') +ax.add_feature(cartopy.feature.LAND,zorder=0,edgecolor='black',alpha=0.5,facecolor='beige') +ax.set_extent(extent,crs=proj) +gl=ax.gridlines(crs=proj,linewidth=2,color='grey',alpha=0.5,linestyle='--',draw_labels=True) +gl.xlocator=mticker.FixedLocator(x_ticks1) +gl.ylocator=mticker.FixedLocator(y_ticks1) +gl.xlabels_top=False +gl.xlabels_yottom=False +gl.ylabels_right=False +gl.ylabels_left=False +gl.xlines=True +gl.xformatter=LONGITUDE_FORMATTER +gl.yformatter=LATITUDE_FORMATTER +gl.xlabel_style={'color':'red','weight':'bold','size':'40'} +gl.ylabel_style={'color':'red','weight':'bold','size':'40'} +g2=ax.gridlines(crs=proj,linewidth=2,color='grey',alpha=0.5,linestyle='--',draw_labels=True) +g2.xlocator=mticker.FixedLocator(x_ticks2) +g2.ylocator=mticker.FixedLocator(y_ticks2) +g2.xlabels_yottom=False +g2.ylabels_right=False +g2.ylabels_left=True +g2.xlines=True +g2.xformatter=LONGITUDE_FORMATTER +g2.yformatter=LATITUDE_FORMATTER +g2.xlabel_style={'color':'white','weight':'bold','size':'16'} +g2.ylabel_style={'color':'white','weight':'bold','size':'16'} +data=plt.scatter(lon_y,lat_y,c=lev_cat_y,cmap=cmap2,s=2) +plt.suptitle(' CO2 Slicing Channesl Selected',weight='bold',fontsize=35) +plt.title(day_label_y,fontsize=18) +cb=plt.colorbar(data,aspect=30,fraction=.045,pad=.04) +cb.set_ticks([1.2,2.0,2.8,3.6,4.4]) +cb.set_ticklabels(['691.875 Cluster','705.000 Cluster','715.000 Cluster','733.125 Cluster','CLR']) +cb.ax.tick_params(labelsize=25) +filepth=(filepath+"/LEV_CO2_cat_"+day_time_y+".png") +fig.set_size_inches(11.75,9.25) +plt.savefig(filepth,dpi=fig.dpi,bbox_inches='tight',facecolor='#AEC0C9',edgecolor='#57575F') + +h_x=0.5 +ch_x="5pb" +hh_x=str('%.1f'%h_x) +day_time_x=("2020_08_21_03_18_"+hh_x+"_"+ch_x) +day_label_x=(r'$\bf{Date}$ 2020-08-21 $\bf{Time}$ 03:00-18:00 $\bf{A(\nu)\geq}$ '+hh_x+r' $\bf{Chan}$ 4X5'+r' Plus Bias'+'\n'+'\n'+'\n') +file_x=("/apollo/jung/bandersen/compare_full_no_parts/compare_output_2020_08_21_03_18_chan_"+ch_x+"_h_"+hh_x+".txt") +array_x=loadtxt(file_x,comments='#',delimiter=',',unpack=True) +lat_x=array_x[0][:] +lon_x=array_x[1][:] +lev_x=array_x[9][:] +size_x=np.size(lat_x) +lev_cat_x=[] +for a in range(0,size_x): + b=lev_cat_sel(a,lev_x) + lev_cat_x.append(b) +fig=plt.figure() +proj=ccrs.PlateCarree() +ax=plt.axes(projection=proj) +ax.add_feature(cartopy.feature.OCEAN,zorder=0,alpha=0.5,facecolor='lightskyblue') +ax.add_feature(cartopy.feature.BORDERS,edgecolor='slategray') +ax.add_feature(cartopy.feature.COASTLINE,edgecolor='black') +ax.add_feature(cartopy.feature.LAND,zorder=0,edgecolor='black',alpha=0.5,facecolor='beige') +ax.set_extent(extent,crs=proj) +gl=ax.gridlines(crs=proj,linewidth=2,color='grey',alpha=0.5,linestyle='--',draw_labels=True) +gl.xlocator=mticker.FixedLocator(x_ticks1) +gl.ylocator=mticker.FixedLocator(y_ticks1) +gl.xlabels_top=False +gl.xlabels_xottom=False +gl.ylabels_right=False +gl.ylabels_left=False +gl.xlines=True +gl.xformatter=LONGITUDE_FORMATTER +gl.yformatter=LATITUDE_FORMATTER +gl.xlabel_style={'color':'red','weight':'bold','size':'40'} +gl.ylabel_style={'color':'red','weight':'bold','size':'40'} +g2=ax.gridlines(crs=proj,linewidth=2,color='grey',alpha=0.5,linestyle='--',draw_labels=True) +g2.xlocator=mticker.FixedLocator(x_ticks2) +g2.ylocator=mticker.FixedLocator(y_ticks2) +g2.xlabels_xottom=False +g2.ylabels_right=False +g2.ylabels_left=True +g2.xlines=True +g2.xformatter=LONGITUDE_FORMATTER +g2.yformatter=LATITUDE_FORMATTER +g2.xlabel_style={'color':'white','weight':'bold','size':'16'} +g2.ylabel_style={'color':'white','weight':'bold','size':'16'} +data=plt.scatter(lon_x,lat_x,c=lev_cat_x,cmap=cmap2,s=2) +plt.suptitle(' CO2 Slicing Channesl Selected',weight='bold',fontsize=35) +plt.title(day_label_x,fontsize=18) +cb=plt.colorbar(data,aspect=30,fraction=.045,pad=.04) +cb.set_ticks([1.2,2.0,2.8,3.6,4.4]) +cb.set_ticklabels(['691.875 Cluster','705.000 Cluster','715.000 Cluster','733.125 Cluster','CLR']) +cb.ax.tick_params(labelsize=25) +filepth=(filepath+"/LEV_CO2_cat_"+day_time_x+".png") +fig.set_size_inches(11.75,9.25) +plt.savefig(filepth,dpi=fig.dpi,bbox_inches='tight',facecolor='#AEC0C9',edgecolor='#57575F') + +h_w=1.0 +ch_w="5pb" +hh_w=str('%.1f'%h_w) +day_time_w=("2020_08_21_03_18_"+hh_w+"_"+ch_w) +day_label_w=(r'$\bf{Date}$ 2020-08-21 $\bf{Time}$ 03:00-18:00 $\bf{A(\nu)\geq}$ '+hh_w+r' $\bf{Chan}$ 4X5'+r' Plus Bias'+'\n'+'\n'+'\n') +file_w=("/apollo/jung/bandersen/compare_full_no_parts/compare_output_2020_08_21_03_18_chan_"+ch_w+"_h_"+hh_w+".txt") +array_w=loadtxt(file_w,comments='#',delimiter=',',unpack=True) +lat_w=array_w[0][:] +lon_w=array_w[1][:] +lev_w=array_w[9][:] +size_w=np.size(lat_w) +lev_cat_w=[] +for a in range(0,size_w): + b=lev_cat_sel(a,lev_w) + lev_cat_w.append(b) +fig=plt.figure() +proj=ccrs.PlateCarree() +ax=plt.axes(projection=proj) +ax.add_feature(cartopy.feature.OCEAN,zorder=0,alpha=0.5,facecolor='lightskyblue') +ax.add_feature(cartopy.feature.BORDERS,edgecolor='slategray') +ax.add_feature(cartopy.feature.COASTLINE,edgecolor='black') +ax.add_feature(cartopy.feature.LAND,zorder=0,edgecolor='black',alpha=0.5,facecolor='beige') +ax.set_extent(extent,crs=proj) +gl=ax.gridlines(crs=proj,linewidth=2,color='grey',alpha=0.5,linestyle='--',draw_labels=True) +gl.xlocator=mticker.FixedLocator(x_ticks1) +gl.ylocator=mticker.FixedLocator(y_ticks1) +gl.xlabels_top=False +gl.xlabels_wottom=False +gl.ylabels_right=False +gl.ylabels_left=False +gl.xlines=True +gl.xformatter=LONGITUDE_FORMATTER +gl.yformatter=LATITUDE_FORMATTER +gl.xlabel_style={'color':'red','weight':'bold','size':'40'} +gl.ylabel_style={'color':'red','weight':'bold','size':'40'} +g2=ax.gridlines(crs=proj,linewidth=2,color='grey',alpha=0.5,linestyle='--',draw_labels=True) +g2.xlocator=mticker.FixedLocator(x_ticks2) +g2.ylocator=mticker.FixedLocator(y_ticks2) +g2.xlabels_wottom=False +g2.ylabels_right=False +g2.ylabels_left=True +g2.xlines=True +g2.xformatter=LONGITUDE_FORMATTER +g2.yformatter=LATITUDE_FORMATTER +g2.xlabel_style={'color':'white','weight':'bold','size':'16'} +g2.ylabel_style={'color':'white','weight':'bold','size':'16'} +data=plt.scatter(lon_w,lat_w,c=lev_cat_w,cmap=cmap2,s=2) +plt.suptitle(' CO2 Slicing Channesl Selected',weight='bold',fontsize=35) +plt.title(day_label_w,fontsize=18) +cb=plt.colorbar(data,aspect=30,fraction=.045,pad=.04) +cb.set_ticks([1.2,2.0,2.8,3.6,4.4]) +cb.set_ticklabels(['691.875 Cluster','705.000 Cluster','715.000 Cluster','733.125 Cluster','CLR']) +cb.ax.tick_params(labelsize=25) +filepth=(filepath+"/LEV_CO2_cat_"+day_time_w+".png") +fig.set_size_inches(11.75,9.25) +plt.savefig(filepth,dpi=fig.dpi,bbox_inches='tight',facecolor='#AEC0C9',edgecolor='#57575F') + +print("Done") diff --git a/codes/comp_func.py b/codes/comp_func.py new file mode 100644 index 0000000000000000000000000000000000000000..afa0e1cde0f1154198bd95f75acd09dcfcef19f3 --- /dev/null +++ b/codes/comp_func.py @@ -0,0 +1,2035 @@ +#Run before in terminal: module load license_intel intel hdf hdf5 netcdf4 miniconda + +### This code makes a single txt file with all the comparable information from co-located VIIRS, ### +### DR, and CO2 Slicing. This is used to compare the three, and make anaysis easier. ecmwf_ CD ### +### can also be added if we see fit. ### + +import matplotlib +matplotlib.use("AGG") +import matplotlib.pyplot as plt +import numpy as np +import os +import sys +import cartopy +import cartopy.crs as ccrs +import matplotlib.colors as colors +import matplotlib.patches as patches +import matplotlib.ticker as mticker +from numpy import loadtxt +from cartopy.mpl.gridliner import LONGITUDE_FORMATTER, LATITUDE_FORMATTER +from datetime import date +from shutil import copyfile +import shutil +import netCDF4 as cdf +from glob import glob + +#full_comps(st1,sp1,dt1,dt2,mon1,ye1) is used for making a comp file with all 4 algorithms at each hour +#full_comps_parts(st1,sp1,dt1,dt2,mon1,ye1) is used for making a comp file with CO2 Slcing and NCEP at each hour +#comps_hour(dt1,mon1,ye1) is for making comp file for full day with all 4 algorithms +#comps_hour_parts(dt1,mon1,ye1) is for making comp file for full day with CO2 Slicing and NCEP + +def full_comps(st1,sp1,dt1,dt2,mon1,ye1): + b1=int(st1) + b2=int(sp1) + b3=int(dt1) + b4=int(dt2) + b5=int(mon1) + b6=int(ye1) + if b1>=0 and b1<=9: + c1="0"+str(b1) + else: + c1=str(b1) + if b2>=0 and b2<=9: + c2="0"+str(b2) + else: + c2=str(b2) + if b3>=0 and b3<=9: + c3="0"+str(b3) + else: + c3=str(b3) + if b4>=0 and b4<=9: + c4="0"+str(b4) + else: + c4=str(b4) + if b5>=0 and b5<=9: + c5="0"+str(b5) + else: + c5=str(b5) + c6=str(b6) + st=c1 + sp=c2 + dt=c3 + dp=c4 + mon=c5 + yer=c6 + day_time=(yer+"_"+mon+"_"+dt+"_"+st+"_"+sp) + filepath=("/apollo/jung/bandersen") + file_dr=(filepath+"/txt_dr_output_"+yer+"_"+mon+"_"+dt+"/dr_"+yer+"_"+mon+"_"+dt+"_"+st+"_"+sp+".txt") + array_dr=loadtxt(file_dr,comments='#',delimiter=',',unpack=True) + file_ecm=(filepath+"/ecmwf_data_output_txt_"+yer+'_'+mon+'_'+dt+'/ecmwf_cd_'+yer+mon+dt+'_'+st+'_'+sp+'_n20.txt') + array_ecm=loadtxt(file_ecm,comments='#',delimiter=',',unpack=True) + file_co2=(filepath+"/co2_slicing_full/"+yer+"_"+mon+"_"+dt+"/co2_slicing_output_"+yer+"_"+mon+"_"+dt+"_"+st+"00_"+st+"30.txt") + array_co2_1=loadtxt(file_co2,comments='#',delimiter=',',unpack=True) + file_co2=(filepath+"/co2_slicing_full/"+yer+"_"+mon+"_"+dt+"/co2_slicing_output_"+yer+"_"+mon+"_"+dt+"_"+st+"30_"+sp+"00.txt") + array_co2_2=loadtxt(file_co2,comments='#',delimiter=',',unpack=True) + array_ncep_1=cdf.Dataset(filepath+'/ncep_data_'+yer+'_'+mon+'_'+dt+'/cris.431.n20.'+yer+mon+dt+"_"+st+"0000."+yer+mon+dt+"_"+st+"3000.ncep.nc") + array_ncep_2=cdf.Dataset(filepath+'/ncep_data_'+yer+'_'+mon+'_'+dt+'/cris.431.n20.'+yer+mon+dt+"_"+st+"3000."+yer+mon+dp+"_"+sp+"0000.ncep.nc") + output=(filepath+"/compare_full/co2_dr_ncep_ecmwf_output_"+day_time+".txt") + lat_ecm=array_ecm[0][:] + lon_ecm=array_ecm[1][:] + cld_ecm_28=array_ecm[30][:] + cld_ecm_30=array_ecm[32][:] + cld_ecm_32=array_ecm[34][:] + cld_ecm_34=array_ecm[36][:] + cld_ecm_36=array_ecm[38][:] + cld_ecm_49=array_ecm[51][:] + cld_ecm_51=array_ecm[53][:] + cld_ecm_53=array_ecm[55][:] + cld_ecm_55=array_ecm[57][:] + cld_ecm_57=array_ecm[59][:] + cld_ecm_65=array_ecm[67][:] + cld_ecm_67=array_ecm[69][:] + cld_ecm_69=array_ecm[71][:] + cld_ecm_71=array_ecm[73][:] + cld_ecm_73=array_ecm[75][:] + cld_ecm_94=array_ecm[96][:] + cld_ecm_96=array_ecm[98][:] + cld_ecm_98=array_ecm[100][:] + cld_ecm_100=array_ecm[102][:] + cld_ecm_102=array_ecm[104][:] + cld_ecm_122=array_ecm[124][:] + cld_ecm_216=array_ecm[218][:] + lat_dr=array_dr[0][:] + lon_dr=array_dr[1][:] + cot_dr=array_dr[2][:] + ctp_dr=array_dr[3][:] + size_dr=np.size(lat_dr) + ncep_1=array_ncep_1['lat'][:] + ncep_2=array_ncep_2['lat'][:] + lat_ncep=np.asarray(np.concatenate((ncep_1,ncep_2))) + ncep_1=array_ncep_1['lon'][:] + ncep_2=array_ncep_2['lon'][:] + lon_ncep=np.asarray(np.concatenate((ncep_1,ncep_2))) + ctp_ncep_1=array_ncep_1['ctp'][:] + ctp_ncep_2=array_ncep_2['ctp'][:] + ctp_ncep=np.asarray(np.concatenate((ctp_ncep_1,ctp_ncep_2))) + cldfrac_ncep_1=array_ncep_1['cldfrac'][:] + cldfrac_ncep_2=array_ncep_2['cldfrac'][:] + cot_ncep=np.asarray(np.concatenate((cldfrac_ncep_1,cldfrac_ncep_2))) + sum3_ncep_1=array_ncep_1['sum3'][:] + sum3_ncep_2=array_ncep_2['sum3'][:] + sum3_ncep=np.asarray(np.concatenate((sum3_ncep_1,sum3_ncep_2))) + cld_impacted_ncep_1=array_ncep_1['cld_impacted'][:,28] + cld_impacted_ncep_2=array_ncep_2['cld_impacted'][:,28] + ctag_ncep_28=np.asarray(np.concatenate((cld_impacted_ncep_1,cld_impacted_ncep_2))) + cld_impacted_ncep_1=array_ncep_1['cld_impacted'][:,30] + cld_impacted_ncep_2=array_ncep_2['cld_impacted'][:,30] + ctag_ncep_30=np.asarray(np.concatenate((cld_impacted_ncep_1,cld_impacted_ncep_2))) + cld_impacted_ncep_1=array_ncep_1['cld_impacted'][:,32] + cld_impacted_ncep_2=array_ncep_2['cld_impacted'][:,32] + ctag_ncep_32=np.asarray(np.concatenate((cld_impacted_ncep_1,cld_impacted_ncep_2))) + cld_impacted_ncep_1=array_ncep_1['cld_impacted'][:,34] + cld_impacted_ncep_2=array_ncep_2['cld_impacted'][:,34] + ctag_ncep_34=np.asarray(np.concatenate((cld_impacted_ncep_1,cld_impacted_ncep_2))) + cld_impacted_ncep_1=array_ncep_1['cld_impacted'][:,36] + cld_impacted_ncep_2=array_ncep_2['cld_impacted'][:,36] + ctag_ncep_36=np.asarray(np.concatenate((cld_impacted_ncep_1,cld_impacted_ncep_2))) + cld_impacted_ncep_1=array_ncep_1['cld_impacted'][:,49] + cld_impacted_ncep_2=array_ncep_2['cld_impacted'][:,49] + ctag_ncep_49=np.asarray(np.concatenate((cld_impacted_ncep_1,cld_impacted_ncep_2))) + cld_impacted_ncep_1=array_ncep_1['cld_impacted'][:,51] + cld_impacted_ncep_2=array_ncep_2['cld_impacted'][:,51] + ctag_ncep_51=np.asarray(np.concatenate((cld_impacted_ncep_1,cld_impacted_ncep_2))) + cld_impacted_ncep_1=array_ncep_1['cld_impacted'][:,53] + cld_impacted_ncep_2=array_ncep_2['cld_impacted'][:,53] + ctag_ncep_53=np.asarray(np.concatenate((cld_impacted_ncep_1,cld_impacted_ncep_2))) + cld_impacted_ncep_1=array_ncep_1['cld_impacted'][:,55] + cld_impacted_ncep_2=array_ncep_2['cld_impacted'][:,55] + ctag_ncep_55=np.asarray(np.concatenate((cld_impacted_ncep_1,cld_impacted_ncep_2))) + cld_impacted_ncep_1=array_ncep_1['cld_impacted'][:,57] + cld_impacted_ncep_2=array_ncep_2['cld_impacted'][:,57] + ctag_ncep_57=np.asarray(np.concatenate((cld_impacted_ncep_1,cld_impacted_ncep_2))) + cld_impacted_ncep_1=array_ncep_1['cld_impacted'][:,65] + cld_impacted_ncep_2=array_ncep_2['cld_impacted'][:,65] + ctag_ncep_65=np.asarray(np.concatenate((cld_impacted_ncep_1,cld_impacted_ncep_2))) + cld_impacted_ncep_1=array_ncep_1['cld_impacted'][:,67] + cld_impacted_ncep_2=array_ncep_2['cld_impacted'][:,67] + ctag_ncep_67=np.asarray(np.concatenate((cld_impacted_ncep_1,cld_impacted_ncep_2))) + cld_impacted_ncep_1=array_ncep_1['cld_impacted'][:,69] + cld_impacted_ncep_2=array_ncep_2['cld_impacted'][:,69] + ctag_ncep_69=np.asarray(np.concatenate((cld_impacted_ncep_1,cld_impacted_ncep_2))) + cld_impacted_ncep_1=array_ncep_1['cld_impacted'][:,71] + cld_impacted_ncep_2=array_ncep_2['cld_impacted'][:,71] + ctag_ncep_71=np.asarray(np.concatenate((cld_impacted_ncep_1,cld_impacted_ncep_2))) + cld_impacted_ncep_1=array_ncep_1['cld_impacted'][:,73] + cld_impacted_ncep_2=array_ncep_2['cld_impacted'][:,73] + ctag_ncep_73=np.asarray(np.concatenate((cld_impacted_ncep_1,cld_impacted_ncep_2))) + cld_impacted_ncep_1=array_ncep_1['cld_impacted'][:,94] + cld_impacted_ncep_2=array_ncep_2['cld_impacted'][:,94] + ctag_ncep_94=np.asarray(np.concatenate((cld_impacted_ncep_1,cld_impacted_ncep_2))) + cld_impacted_ncep_1=array_ncep_1['cld_impacted'][:,96] + cld_impacted_ncep_2=array_ncep_2['cld_impacted'][:,96] + ctag_ncep_96=np.asarray(np.concatenate((cld_impacted_ncep_1,cld_impacted_ncep_2))) + cld_impacted_ncep_1=array_ncep_1['cld_impacted'][:,98] + cld_impacted_ncep_2=array_ncep_2['cld_impacted'][:,98] + ctag_ncep_98=np.asarray(np.concatenate((cld_impacted_ncep_1,cld_impacted_ncep_2))) + cld_impacted_ncep_1=array_ncep_1['cld_impacted'][:,100] + cld_impacted_ncep_2=array_ncep_2['cld_impacted'][:,100] + ctag_ncep_100=np.asarray(np.concatenate((cld_impacted_ncep_1,cld_impacted_ncep_2))) + cld_impacted_ncep_1=array_ncep_1['cld_impacted'][:,102] + cld_impacted_ncep_2=array_ncep_2['cld_impacted'][:,102] + ctag_ncep_102=np.asarray(np.concatenate((cld_impacted_ncep_1,cld_impacted_ncep_2))) + cld_impacted_ncep_1=array_ncep_1['cld_impacted'][:,122] + cld_impacted_ncep_2=array_ncep_2['cld_impacted'][:,122] + ctag_ncep_122=np.asarray(np.concatenate((cld_impacted_ncep_1,cld_impacted_ncep_2))) + cld_impacted_ncep_1=array_ncep_1['cld_impacted'][:,216] + cld_impacted_ncep_2=array_ncep_2['cld_impacted'][:,216] + ctag_ncep_216=np.asarray(np.concatenate((cld_impacted_ncep_1,cld_impacted_ncep_2))) + lat_co2=np.asarray(np.concatenate((array_co2_1[0][:],array_co2_2[0][:]))) + lon_co2=np.asarray(np.concatenate((array_co2_1[1][:],array_co2_2[1][:]))) + topo=np.asarray(np.concatenate((array_co2_1[2][:],array_co2_2[2][:]))) + forr=np.asarray(np.concatenate((array_co2_1[3][:],array_co2_2[3][:]))) + fovv=np.asarray(np.concatenate((array_co2_1[4][:],array_co2_2[4][:]))) + ctp_viirs=np.asarray(np.concatenate((array_co2_1[5][:],array_co2_2[5][:]))) + cot_viirs=np.asarray(np.concatenate((array_co2_1[6][:],array_co2_2[6][:]))) + ctp_co2=np.asarray(np.concatenate((array_co2_1[7][:],array_co2_2[7][:]))) + cot_co2=np.asarray(np.concatenate((array_co2_1[8][:],array_co2_2[8][:]))) + lev_co2=np.asarray(np.concatenate((array_co2_1[9][:],array_co2_2[9][:]))) + trop=np.asarray(np.concatenate((array_co2_1[10][:],array_co2_2[10][:]))) + ir_test=np.asarray(np.concatenate((array_co2_1[11][:],array_co2_2[11][:]))) + co2_use_28=np.asarray(np.concatenate((array_co2_1[12][:],array_co2_2[12][:]))) + co2_use_30=np.asarray(np.concatenate((array_co2_1[13][:],array_co2_2[13][:]))) + co2_use_32=np.asarray(np.concatenate((array_co2_1[14][:],array_co2_2[14][:]))) + co2_use_34=np.asarray(np.concatenate((array_co2_1[15][:],array_co2_2[15][:]))) + co2_use_36=np.asarray(np.concatenate((array_co2_1[16][:],array_co2_2[16][:]))) + co2_use_49=np.asarray(np.concatenate((array_co2_1[17][:],array_co2_2[17][:]))) + co2_use_51=np.asarray(np.concatenate((array_co2_1[18][:],array_co2_2[18][:]))) + co2_use_53=np.asarray(np.concatenate((array_co2_1[19][:],array_co2_2[19][:]))) + co2_use_55=np.asarray(np.concatenate((array_co2_1[20][:],array_co2_2[20][:]))) + co2_use_57=np.asarray(np.concatenate((array_co2_1[21][:],array_co2_2[21][:]))) + co2_use_65=np.asarray(np.concatenate((array_co2_1[22][:],array_co2_2[22][:]))) + co2_use_67=np.asarray(np.concatenate((array_co2_1[23][:],array_co2_2[23][:]))) + co2_use_69=np.asarray(np.concatenate((array_co2_1[24][:],array_co2_2[24][:]))) + co2_use_71=np.asarray(np.concatenate((array_co2_1[25][:],array_co2_2[25][:]))) + co2_use_73=np.asarray(np.concatenate((array_co2_1[26][:],array_co2_2[26][:]))) + co2_use_94=np.asarray(np.concatenate((array_co2_1[27][:],array_co2_2[27][:]))) + co2_use_96=np.asarray(np.concatenate((array_co2_1[28][:],array_co2_2[28][:]))) + co2_use_98=np.asarray(np.concatenate((array_co2_1[29][:],array_co2_2[29][:]))) + co2_use_100=np.asarray(np.concatenate((array_co2_1[30][:],array_co2_2[30][:]))) + co2_use_102=np.asarray(np.concatenate((array_co2_1[31][:],array_co2_2[31][:]))) + co2_use_122=np.asarray(np.concatenate((array_co2_1[32][:],array_co2_2[32][:]))) + crtm_obs_28=np.asarray(np.concatenate((array_co2_1[33][:],array_co2_2[33][:]))) + crtm_obs_30=np.asarray(np.concatenate((array_co2_1[34][:],array_co2_2[34][:]))) + crtm_obs_32=np.asarray(np.concatenate((array_co2_1[35][:],array_co2_2[35][:]))) + crtm_obs_34=np.asarray(np.concatenate((array_co2_1[36][:],array_co2_2[36][:]))) + crtm_obs_36=np.asarray(np.concatenate((array_co2_1[37][:],array_co2_2[37][:]))) + crtm_obs_49=np.asarray(np.concatenate((array_co2_1[38][:],array_co2_2[38][:]))) + crtm_obs_51=np.asarray(np.concatenate((array_co2_1[39][:],array_co2_2[39][:]))) + crtm_obs_53=np.asarray(np.concatenate((array_co2_1[40][:],array_co2_2[40][:]))) + crtm_obs_55=np.asarray(np.concatenate((array_co2_1[41][:],array_co2_2[41][:]))) + crtm_obs_57=np.asarray(np.concatenate((array_co2_1[42][:],array_co2_2[42][:]))) + crtm_obs_65=np.asarray(np.concatenate((array_co2_1[43][:],array_co2_2[43][:]))) + crtm_obs_67=np.asarray(np.concatenate((array_co2_1[44][:],array_co2_2[44][:]))) + crtm_obs_69=np.asarray(np.concatenate((array_co2_1[45][:],array_co2_2[45][:]))) + crtm_obs_71=np.asarray(np.concatenate((array_co2_1[46][:],array_co2_2[46][:]))) + crtm_obs_73=np.asarray(np.concatenate((array_co2_1[47][:],array_co2_2[47][:]))) + crtm_obs_94=np.asarray(np.concatenate((array_co2_1[48][:],array_co2_2[48][:]))) + crtm_obs_96=np.asarray(np.concatenate((array_co2_1[49][:],array_co2_2[49][:]))) + crtm_obs_98=np.asarray(np.concatenate((array_co2_1[50][:],array_co2_2[50][:]))) + crtm_obs_100=np.asarray(np.concatenate((array_co2_1[51][:],array_co2_2[51][:]))) + crtm_obs_102=np.asarray(np.concatenate((array_co2_1[52][:],array_co2_2[52][:]))) + crtm_obs_122=np.asarray(np.concatenate((array_co2_1[53][:],array_co2_2[53][:]))) + crtm_obs_216=np.asarray(np.concatenate((array_co2_1[54][:],array_co2_2[54][:]))) + obs_28=np.asarray(np.concatenate((array_co2_1[55][:],array_co2_2[55][:]))) + obs_30=np.asarray(np.concatenate((array_co2_1[56][:],array_co2_2[56][:]))) + obs_32=np.asarray(np.concatenate((array_co2_1[57][:],array_co2_2[57][:]))) + obs_34=np.asarray(np.concatenate((array_co2_1[58][:],array_co2_2[58][:]))) + obs_36=np.asarray(np.concatenate((array_co2_1[59][:],array_co2_2[59][:]))) + obs_49=np.asarray(np.concatenate((array_co2_1[60][:],array_co2_2[60][:]))) + obs_51=np.asarray(np.concatenate((array_co2_1[61][:],array_co2_2[61][:]))) + obs_53=np.asarray(np.concatenate((array_co2_1[62][:],array_co2_2[62][:]))) + obs_55=np.asarray(np.concatenate((array_co2_1[63][:],array_co2_2[63][:]))) + obs_57=np.asarray(np.concatenate((array_co2_1[64][:],array_co2_2[64][:]))) + obs_65=np.asarray(np.concatenate((array_co2_1[65][:],array_co2_2[65][:]))) + obs_67=np.asarray(np.concatenate((array_co2_1[66][:],array_co2_2[66][:]))) + obs_69=np.asarray(np.concatenate((array_co2_1[67][:],array_co2_2[67][:]))) + obs_71=np.asarray(np.concatenate((array_co2_1[68][:],array_co2_2[68][:]))) + obs_73=np.asarray(np.concatenate((array_co2_1[69][:],array_co2_2[69][:]))) + obs_94=np.asarray(np.concatenate((array_co2_1[70][:],array_co2_2[70][:]))) + obs_96=np.asarray(np.concatenate((array_co2_1[71][:],array_co2_2[71][:]))) + obs_98=np.asarray(np.concatenate((array_co2_1[72][:],array_co2_2[72][:]))) + obs_100=np.asarray(np.concatenate((array_co2_1[73][:],array_co2_2[73][:]))) + obs_102=np.asarray(np.concatenate((array_co2_1[74][:],array_co2_2[74][:]))) + obs_122=np.asarray(np.concatenate((array_co2_1[75][:],array_co2_2[75][:]))) + obs_216=np.asarray(np.concatenate((array_co2_1[76][:],array_co2_2[76][:]))) + def find_nearest(array,value): + array=np.asarray(array) + idx=(np.abs(array-value)).argmin() + return array[idx] + def find_nearest_index(array,value): + array=np.asarray(array) + idx=(np.abs(array-value)).argmin() + return(idx) + lat_all=[] + lon_all=[] + topo_all=[] + for_all=[] + fov_all=[] + lev_all=[] + trop_all=[] + ir_all=[] + co2_ctp_all=[] + dr_ctp_all=[] + viirs_ctp_all=[] + ncep_ctp_all=[] + co2_cot_all=[] + dr_cot_all=[] + viirs_cot_all=[] + ncep_cot_all=[] + ncep_sum3_all=[] + co2_28_all=[] + co2_30_all=[] + co2_32_all=[] + co2_34_all=[] + co2_36_all=[] + co2_49_all=[] + co2_51_all=[] + co2_53_all=[] + co2_55_all=[] + co2_57_all=[] + co2_65_all=[] + co2_67_all=[] + co2_69_all=[] + co2_71_all=[] + co2_73_all=[] + co2_94_all=[] + co2_96_all=[] + co2_98_all=[] + co2_100_all=[] + co2_102_all=[] + co2_122_all=[] + ncep_28_all=[] + ncep_30_all=[] + ncep_32_all=[] + ncep_34_all=[] + ncep_36_all=[] + ncep_49_all=[] + ncep_51_all=[] + ncep_53_all=[] + ncep_55_all=[] + ncep_57_all=[] + ncep_65_all=[] + ncep_67_all=[] + ncep_69_all=[] + ncep_71_all=[] + ncep_73_all=[] + ncep_94_all=[] + ncep_96_all=[] + ncep_98_all=[] + ncep_100_all=[] + ncep_102_all=[] + ncep_122_all=[] + ncep_216_all=[] + emc_28_all=[] + emc_30_all=[] + emc_32_all=[] + emc_34_all=[] + emc_36_all=[] + emc_49_all=[] + emc_51_all=[] + emc_53_all=[] + emc_55_all=[] + emc_57_all=[] + emc_65_all=[] + emc_67_all=[] + emc_69_all=[] + emc_71_all=[] + emc_73_all=[] + emc_94_all=[] + emc_96_all=[] + emc_98_all=[] + emc_100_all=[] + emc_102_all=[] + emc_122_all=[] + emc_216_all=[] + crtm_obs_28_all=[] + crtm_obs_30_all=[] + crtm_obs_32_all=[] + crtm_obs_34_all=[] + crtm_obs_36_all=[] + crtm_obs_49_all=[] + crtm_obs_51_all=[] + crtm_obs_53_all=[] + crtm_obs_55_all=[] + crtm_obs_57_all=[] + crtm_obs_65_all=[] + crtm_obs_67_all=[] + crtm_obs_69_all=[] + crtm_obs_71_all=[] + crtm_obs_73_all=[] + crtm_obs_94_all=[] + crtm_obs_96_all=[] + crtm_obs_98_all=[] + crtm_obs_100_all=[] + crtm_obs_102_all=[] + crtm_obs_122_all=[] + crtm_obs_216_all=[] + obs_28_all=[] + obs_30_all=[] + obs_32_all=[] + obs_34_all=[] + obs_36_all=[] + obs_49_all=[] + obs_51_all=[] + obs_53_all=[] + obs_55_all=[] + obs_57_all=[] + obs_65_all=[] + obs_67_all=[] + obs_69_all=[] + obs_71_all=[] + obs_73_all=[] + obs_94_all=[] + obs_96_all=[] + obs_98_all=[] + obs_100_all=[] + obs_102_all=[] + obs_122_all=[] + obs_216_all=[] + for a1 in range(0,size_dr): + a_val=find_nearest(lat_co2,lat_dr[a1]) + a_dr=find_nearest_index(lat_dr,a_val) + a_co2=find_nearest_index(lat_co2,a_val) + a_ncep=find_nearest_index(lat_ncep,a_val) + a_ecm=find_nearest_index(lat_ecm,a_val) + b1=lat_dr[a_dr] + b2=lon_dr[a_dr] + c1=topo[a_co2] + c2=forr[a_co2] + c3=fovv[a_co2] + d1=lev_co2[a_co2] + d2=trop[a_co2] + d3=ir_test[a_co2] + d4=sum3_ncep[a_ncep] + e1=ctp_co2[a_co2] + e2=ctp_dr[a_dr] + e3=ctp_viirs[a_co2] + e4=ctp_ncep[a_ncep] + g1=cot_co2[a_co2] + g2=cot_dr[a_dr] + g3=cot_viirs[a_co2] + g4=cot_ncep[a_ncep] + h1=co2_use_28[a_co2] + h2=co2_use_30[a_co2] + h3=co2_use_32[a_co2] + h4=co2_use_34[a_co2] + h5=co2_use_36[a_co2] + h6=co2_use_49[a_co2] + h7=co2_use_51[a_co2] + h8=co2_use_53[a_co2] + h9=co2_use_55[a_co2] + h10=co2_use_57[a_co2] + h11=co2_use_65[a_co2] + h12=co2_use_67[a_co2] + h13=co2_use_69[a_co2] + h14=co2_use_71[a_co2] + h15=co2_use_73[a_co2] + h16=co2_use_94[a_co2] + h17=co2_use_96[a_co2] + h18=co2_use_98[a_co2] + h19=co2_use_100[a_co2] + h20=co2_use_102[a_co2] + h21=co2_use_122[a_co2] + j1=ctag_ncep_28[a_ncep] + j2=ctag_ncep_30[a_ncep] + j3=ctag_ncep_32[a_ncep] + j4=ctag_ncep_34[a_ncep] + j5=ctag_ncep_36[a_ncep] + j6=ctag_ncep_49[a_ncep] + j7=ctag_ncep_51[a_ncep] + j8=ctag_ncep_53[a_ncep] + j9=ctag_ncep_55[a_ncep] + j10=ctag_ncep_57[a_ncep] + j11=ctag_ncep_65[a_ncep] + j12=ctag_ncep_67[a_ncep] + j13=ctag_ncep_69[a_ncep] + j14=ctag_ncep_71[a_ncep] + j15=ctag_ncep_73[a_ncep] + j16=ctag_ncep_94[a_ncep] + j17=ctag_ncep_96[a_ncep] + j18=ctag_ncep_98[a_ncep] + j19=ctag_ncep_100[a_ncep] + j20=ctag_ncep_102[a_ncep] + j21=ctag_ncep_122[a_ncep] + j22=ctag_ncep_216[a_ncep] + k1=cld_ecm_28[a_ecm] + k2=cld_ecm_30[a_ecm] + k3=cld_ecm_32[a_ecm] + k4=cld_ecm_34[a_ecm] + k5=cld_ecm_36[a_ecm] + k6=cld_ecm_49[a_ecm] + k7=cld_ecm_51[a_ecm] + k8=cld_ecm_53[a_ecm] + k9=cld_ecm_55[a_ecm] + k10=cld_ecm_57[a_ecm] + k11=cld_ecm_65[a_ecm] + k12=cld_ecm_67[a_ecm] + k13=cld_ecm_69[a_ecm] + k14=cld_ecm_71[a_ecm] + k15=cld_ecm_73[a_ecm] + k16=cld_ecm_94[a_ecm] + k17=cld_ecm_96[a_ecm] + k18=cld_ecm_98[a_ecm] + k19=cld_ecm_100[a_ecm] + k20=cld_ecm_102[a_ecm] + k21=cld_ecm_122[a_ecm] + k22=cld_ecm_216[a_ecm] + l1=crtm_obs_28[a_co2] + l2=crtm_obs_30[a_co2] + l3=crtm_obs_32[a_co2] + l4=crtm_obs_34[a_co2] + l5=crtm_obs_36[a_co2] + l6=crtm_obs_49[a_co2] + l7=crtm_obs_51[a_co2] + l8=crtm_obs_53[a_co2] + l9=crtm_obs_55[a_co2] + l10=crtm_obs_57[a_co2] + l11=crtm_obs_65[a_co2] + l12=crtm_obs_67[a_co2] + l13=crtm_obs_69[a_co2] + l14=crtm_obs_71[a_co2] + l15=crtm_obs_73[a_co2] + l16=crtm_obs_94[a_co2] + l17=crtm_obs_96[a_co2] + l18=crtm_obs_98[a_co2] + l19=crtm_obs_100[a_co2] + l20=crtm_obs_102[a_co2] + l21=crtm_obs_122[a_co2] + l22=crtm_obs_216[a_co2] + m1=obs_28[a_co2] + m2=obs_30[a_co2] + m3=obs_32[a_co2] + m4=obs_34[a_co2] + m5=obs_36[a_co2] + m6=obs_49[a_co2] + m7=obs_51[a_co2] + m8=obs_53[a_co2] + m9=obs_55[a_co2] + m10=obs_57[a_co2] + m11=obs_65[a_co2] + m12=obs_67[a_co2] + m13=obs_69[a_co2] + m14=obs_71[a_co2] + m15=obs_73[a_co2] + m16=obs_94[a_co2] + m17=obs_96[a_co2] + m18=obs_98[a_co2] + m19=obs_100[a_co2] + m20=obs_102[a_co2] + m21=obs_122[a_co2] + m22=obs_216[a_co2] + lat_all.append(b1) + lon_all.append(b2) + topo_all.append(c1) + for_all.append(c2) + fov_all.append(c3) + lev_all.append(d1) + trop_all.append(d2) + ir_all.append(d3) + ncep_sum3_all.append(d4) + co2_ctp_all.append(e1) + dr_ctp_all.append(e2) + viirs_ctp_all.append(e3) + ncep_ctp_all.append(e4) + co2_cot_all.append(g1) + dr_cot_all.append(g2) + viirs_cot_all.append(g3) + ncep_cot_all.append(g4) + co2_28_all.append(h1) + co2_30_all.append(h2) + co2_32_all.append(h3) + co2_34_all.append(h4) + co2_36_all.append(h5) + co2_49_all.append(h6) + co2_51_all.append(h7) + co2_53_all.append(h8) + co2_55_all.append(h9) + co2_57_all.append(h10) + co2_65_all.append(h11) + co2_67_all.append(h12) + co2_69_all.append(h13) + co2_71_all.append(h14) + co2_73_all.append(h15) + co2_94_all.append(h16) + co2_96_all.append(h17) + co2_98_all.append(h18) + co2_100_all.append(h19) + co2_102_all.append(h20) + co2_122_all.append(h21) + ncep_28_all.append(j1) + ncep_30_all.append(j2) + ncep_32_all.append(j3) + ncep_34_all.append(j4) + ncep_36_all.append(j5) + ncep_49_all.append(j6) + ncep_51_all.append(j7) + ncep_53_all.append(j8) + ncep_55_all.append(j9) + ncep_57_all.append(j10) + ncep_65_all.append(j11) + ncep_67_all.append(j12) + ncep_69_all.append(j13) + ncep_71_all.append(j14) + ncep_73_all.append(j15) + ncep_94_all.append(j16) + ncep_96_all.append(j17) + ncep_98_all.append(j18) + ncep_100_all.append(j19) + ncep_102_all.append(j20) + ncep_122_all.append(j21) + ncep_216_all.append(j22) + emc_28_all.append(k1) + emc_30_all.append(k2) + emc_32_all.append(k3) + emc_34_all.append(k4) + emc_36_all.append(k5) + emc_49_all.append(k6) + emc_51_all.append(k7) + emc_53_all.append(k8) + emc_55_all.append(k9) + emc_57_all.append(k10) + emc_65_all.append(k11) + emc_67_all.append(k12) + emc_69_all.append(k13) + emc_71_all.append(k14) + emc_73_all.append(k15) + emc_94_all.append(k16) + emc_96_all.append(k17) + emc_98_all.append(k18) + emc_100_all.append(k19) + emc_102_all.append(k20) + emc_122_all.append(k21) + emc_216_all.append(k22) + crtm_obs_28_all.append(l1) + crtm_obs_30_all.append(l2) + crtm_obs_32_all.append(l3) + crtm_obs_34_all.append(l4) + crtm_obs_36_all.append(l5) + crtm_obs_49_all.append(l6) + crtm_obs_51_all.append(l7) + crtm_obs_53_all.append(l8) + crtm_obs_55_all.append(l9) + crtm_obs_57_all.append(l10) + crtm_obs_65_all.append(l11) + crtm_obs_67_all.append(l12) + crtm_obs_69_all.append(l13) + crtm_obs_71_all.append(l14) + crtm_obs_73_all.append(l15) + crtm_obs_94_all.append(l16) + crtm_obs_96_all.append(l17) + crtm_obs_98_all.append(l18) + crtm_obs_100_all.append(l19) + crtm_obs_102_all.append(l20) + crtm_obs_122_all.append(l21) + crtm_obs_216_all.append(l22) + obs_28_all.append(m1) + obs_30_all.append(m2) + obs_32_all.append(m3) + obs_34_all.append(m4) + obs_36_all.append(m5) + obs_49_all.append(m6) + obs_51_all.append(m7) + obs_53_all.append(m8) + obs_55_all.append(m9) + obs_57_all.append(m10) + obs_65_all.append(m11) + obs_67_all.append(m12) + obs_69_all.append(m13) + obs_71_all.append(m14) + obs_73_all.append(m15) + obs_94_all.append(m16) + obs_96_all.append(m17) + obs_98_all.append(m18) + obs_100_all.append(m19) + obs_102_all.append(m20) + obs_122_all.append(m21) + obs_216_all.append(m22) + size=np.size(lat_all) + file=open(output,"w+") + with open(output,'wb') as f: + for a in range(0,size): + z=np.array([lat_all[a],lon_all[a],topo_all[a],for_all[a],fov_all[a],lev_all[a],trop_all[a],ir_all[a],ncep_sum3_all[a],co2_ctp_all[a],dr_ctp_all[a],viirs_ctp_all[a],ncep_ctp_all[a],co2_cot_all[a],dr_cot_all[a],viirs_cot_all[a],ncep_cot_all[a],co2_28_all[a],co2_30_all[a],co2_32_all[a],co2_34_all[a],co2_36_all[a],co2_49_all[a],co2_51_all[a],co2_53_all[a],co2_55_all[a],co2_57_all[a],co2_65_all[a],co2_67_all[a],co2_69_all[a],co2_71_all[a],co2_73_all[a],co2_94_all[a],co2_96_all[a],co2_98_all[a],co2_100_all[a],co2_102_all[a],co2_122_all[a],ncep_28_all[a],ncep_30_all[a],ncep_32_all[a],ncep_34_all[a],ncep_36_all[a],ncep_49_all[a],ncep_51_all[a],ncep_53_all[a],ncep_55_all[a],ncep_57_all[a],ncep_65_all[a],ncep_67_all[a],ncep_69_all[a],ncep_71_all[a],ncep_73_all[a],ncep_94_all[a],ncep_96_all[a],ncep_98_all[a],ncep_100_all[a],ncep_102_all[a],ncep_122_all[a],ncep_216_all[a],emc_28_all[a],emc_30_all[a],emc_32_all[a],emc_34_all[a],emc_36_all[a],emc_49_all[a],emc_51_all[a],emc_53_all[a],emc_55_all[a],emc_57_all[a],emc_65_all[a],emc_67_all[a],emc_69_all[a],emc_71_all[a],emc_73_all[a],emc_94_all[a],emc_96_all[a],emc_98_all[a],emc_100_all[a],emc_102_all[a],emc_122_all[a],emc_216_all[a],crtm_obs_28_all[a],crtm_obs_30_all[a],crtm_obs_32_all[a],crtm_obs_34_all[a],crtm_obs_36_all[a],crtm_obs_49_all[a],crtm_obs_51_all[a],crtm_obs_53_all[a],crtm_obs_55_all[a],crtm_obs_57_all[a],crtm_obs_65_all[a],crtm_obs_67_all[a],crtm_obs_69_all[a],crtm_obs_71_all[a],crtm_obs_73_all[a],crtm_obs_94_all[a],crtm_obs_96_all[a],crtm_obs_98_all[a],crtm_obs_100_all[a],crtm_obs_102_all[a],crtm_obs_122_all[a],crtm_obs_216_all[a],obs_28_all[a],obs_30_all[a],obs_32_all[a],obs_34_all[a],obs_36_all[a],obs_49_all[a],obs_51_all[a],obs_53_all[a],obs_55_all[a],obs_57_all[a],obs_65_all[a],obs_67_all[a],obs_69_all[a],obs_71_all[a],obs_73_all[a],obs_94_all[a],obs_96_all[a],obs_98_all[a],obs_100_all[a],obs_102_all[a],obs_122_all[a],obs_216_all[a]]) + np.savetxt(f,z,fmt='%1.7f',newline=" ") + np.savetxt(f,[-8888],fmt='%d',newline=" ") + f.close() + f=open(output,"rt") + r=f.read() + r=r.replace("-8888","\n") + r=r.replace(" -","-") + r=r.replace("ift","797979") + r=r.replace("inf","797979") + r=r.replace("nan","-9999") + r=r.replace(" ",",") + r=r.replace(","+"\n","\n") + r=r.replace("\n"+",","\n") + r=r.replace("0-","0,-") + r=r.replace("1-","1,-") + r=r.replace("2-","2,-") + r=r.replace("3-","3,-") + r=r.replace("4-","4,-") + r=r.replace("5-","5,-") + r=r.replace("6-","6,-") + r=r.replace("7-","7,-") + r=r.replace("8-","8,-") + r=r.replace("9-","9,-") + f.close() + f=open(output,"wt") + f.write(r) + f.close() + return("done") + + +def comps_hour(dt1,mon1,ye1): + b1=int(dt1) + b2=int(mon1) + b3=int(ye1) + if b1>=0 and b1<=9: + c1="0"+str(b1) + else: + c1=str(b1) + if b2>=0 and b2<=9: + c2="0"+str(b2) + else: + c2=str(b2) + c3=str(b3) + dd=c1 + mon=c2 + yer=c3 + output1=('/apollo/jung/bandersen/compare_full_no_parts/co2_dr_ncep_ecmwf_output_'+yer+'_'+mon+'_'+dd+'_24hr.txt') + files=glob('/apollo/jung/bandersen/compare_full/co2_dr_ncep_ecmwf_output_'+yer+'_'+mon+'_'+dd+'*.txt')[:] + sizer=np.size(files) + lat=[] + lon=[] + topo=[] + forr=[] + fov=[] + lev=[] + trop=[] + ir=[] + sum3=[] + ctpc=[] + ctpd=[] + ctpv=[] + ctpn=[] + cotc=[] + cotd=[] + cotv=[] + cotn=[] + co2_28=[] + co2_30=[] + co2_32=[] + co2_34=[] + co2_36=[] + co2_49=[] + co2_51=[] + co2_53=[] + co2_55=[] + co2_57=[] + co2_65=[] + co2_67=[] + co2_69=[] + co2_71=[] + co2_73=[] + co2_94=[] + co2_96=[] + co2_98=[] + co2_100=[] + co2_102=[] + co2_122=[] + ncep_28=[] + ncep_30=[] + ncep_32=[] + ncep_34=[] + ncep_36=[] + ncep_49=[] + ncep_51=[] + ncep_53=[] + ncep_55=[] + ncep_57=[] + ncep_65=[] + ncep_67=[] + ncep_69=[] + ncep_71=[] + ncep_73=[] + ncep_94=[] + ncep_96=[] + ncep_98=[] + ncep_100=[] + ncep_102=[] + ncep_122=[] + ncep_216=[] + ecmwf_28=[] + ecmwf_30=[] + ecmwf_32=[] + ecmwf_34=[] + ecmwf_36=[] + ecmwf_49=[] + ecmwf_51=[] + ecmwf_53=[] + ecmwf_55=[] + ecmwf_57=[] + ecmwf_65=[] + ecmwf_67=[] + ecmwf_69=[] + ecmwf_71=[] + ecmwf_73=[] + ecmwf_94=[] + ecmwf_96=[] + ecmwf_98=[] + ecmwf_100=[] + ecmwf_102=[] + ecmwf_122=[] + ecmwf_216=[] + crtm_obs_28=[] + crtm_obs_30=[] + crtm_obs_32=[] + crtm_obs_34=[] + crtm_obs_36=[] + crtm_obs_49=[] + crtm_obs_51=[] + crtm_obs_53=[] + crtm_obs_55=[] + crtm_obs_57=[] + crtm_obs_65=[] + crtm_obs_67=[] + crtm_obs_69=[] + crtm_obs_71=[] + crtm_obs_73=[] + crtm_obs_94=[] + crtm_obs_96=[] + crtm_obs_98=[] + crtm_obs_100=[] + crtm_obs_102=[] + crtm_obs_122=[] + crtm_obs_216=[] + obs_28=[] + obs_30=[] + obs_32=[] + obs_34=[] + obs_36=[] + obs_49=[] + obs_51=[] + obs_53=[] + obs_55=[] + obs_57=[] + obs_65=[] + obs_67=[] + obs_69=[] + obs_71=[] + obs_73=[] + obs_94=[] + obs_96=[] + obs_98=[] + obs_100=[] + obs_102=[] + obs_122=[] + obs_216=[] + for i in range(0,sizer): + array_a1=loadtxt(files[i],comments='#',delimiter=',',unpack=True) + lat_a1=array_a1[0][:] + lon_a1=array_a1[1][:] + topo_a1=array_a1[2][:] + forr_a1=array_a1[3][:] + fov_a1=array_a1[4][:] + lev_a1=array_a1[5][:] + trop_a1=array_a1[6][:] + ir_a1=array_a1[7][:] + sum3_a1=array_a1[8][:] + ctpc_a1=array_a1[9][:] + ctpd_a1=array_a1[10][:] + ctpv_a1=array_a1[11][:] + ctpn_a1=array_a1[12][:] + cotc_a1=array_a1[13][:] + cotd_a1=array_a1[14][:] + cotv_a1=array_a1[15][:] + cotn_a1=array_a1[16][:] + co2_28_a1=array_a1[17][:] + co2_30_a1=array_a1[18][:] + co2_32_a1=array_a1[19][:] + co2_34_a1=array_a1[20][:] + co2_36_a1=array_a1[21][:] + co2_49_a1=array_a1[22][:] + co2_51_a1=array_a1[23][:] + co2_53_a1=array_a1[24][:] + co2_55_a1=array_a1[25][:] + co2_57_a1=array_a1[26][:] + co2_65_a1=array_a1[27][:] + co2_67_a1=array_a1[28][:] + co2_69_a1=array_a1[29][:] + co2_71_a1=array_a1[30][:] + co2_73_a1=array_a1[31][:] + co2_94_a1=array_a1[32][:] + co2_96_a1=array_a1[33][:] + co2_98_a1=array_a1[34][:] + co2_100_a1=array_a1[35][:] + co2_102_a1=array_a1[36][:] + co2_122_a1=array_a1[37][:] + ncep_28_a1=array_a1[38][:] + ncep_30_a1=array_a1[39][:] + ncep_32_a1=array_a1[40][:] + ncep_34_a1=array_a1[41][:] + ncep_36_a1=array_a1[42][:] + ncep_49_a1=array_a1[43][:] + ncep_51_a1=array_a1[44][:] + ncep_53_a1=array_a1[45][:] + ncep_55_a1=array_a1[46][:] + ncep_57_a1=array_a1[47][:] + ncep_65_a1=array_a1[48][:] + ncep_67_a1=array_a1[49][:] + ncep_69_a1=array_a1[50][:] + ncep_71_a1=array_a1[51][:] + ncep_73_a1=array_a1[52][:] + ncep_94_a1=array_a1[53][:] + ncep_96_a1=array_a1[54][:] + ncep_98_a1=array_a1[55][:] + ncep_100_a1=array_a1[56][:] + ncep_102_a1=array_a1[57][:] + ncep_122_a1=array_a1[58][:] + ncep_216_a1=array_a1[59][:] + ecmwf_28_a1=array_a1[60][:] + ecmwf_30_a1=array_a1[61][:] + ecmwf_32_a1=array_a1[62][:] + ecmwf_34_a1=array_a1[63][:] + ecmwf_36_a1=array_a1[64][:] + ecmwf_49_a1=array_a1[65][:] + ecmwf_51_a1=array_a1[66][:] + ecmwf_53_a1=array_a1[67][:] + ecmwf_55_a1=array_a1[68][:] + ecmwf_57_a1=array_a1[69][:] + ecmwf_65_a1=array_a1[70][:] + ecmwf_67_a1=array_a1[71][:] + ecmwf_69_a1=array_a1[72][:] + ecmwf_71_a1=array_a1[73][:] + ecmwf_73_a1=array_a1[74][:] + ecmwf_94_a1=array_a1[75][:] + ecmwf_96_a1=array_a1[76][:] + ecmwf_98_a1=array_a1[77][:] + ecmwf_100_a1=array_a1[78][:] + ecmwf_102_a1=array_a1[79][:] + ecmwf_122_a1=array_a1[80][:] + ecmwf_216_a1=array_a1[81][:] + crtm_obs_28_a1=array_a1[82][:] + crtm_obs_30_a1=array_a1[83][:] + crtm_obs_32_a1=array_a1[84][:] + crtm_obs_34_a1=array_a1[85][:] + crtm_obs_36_a1=array_a1[86][:] + crtm_obs_49_a1=array_a1[87][:] + crtm_obs_51_a1=array_a1[88][:] + crtm_obs_53_a1=array_a1[89][:] + crtm_obs_55_a1=array_a1[90][:] + crtm_obs_57_a1=array_a1[91][:] + crtm_obs_65_a1=array_a1[92][:] + crtm_obs_67_a1=array_a1[93][:] + crtm_obs_69_a1=array_a1[94][:] + crtm_obs_71_a1=array_a1[95][:] + crtm_obs_73_a1=array_a1[96][:] + crtm_obs_94_a1=array_a1[97][:] + crtm_obs_96_a1=array_a1[98][:] + crtm_obs_98_a1=array_a1[99][:] + crtm_obs_100_a1=array_a1[100][:] + crtm_obs_102_a1=array_a1[101][:] + crtm_obs_122_a1=array_a1[102][:] + crtm_obs_216_a1=array_a1[103][:] + obs_28_a1=array_a1[104][:] + obs_30_a1=array_a1[105][:] + obs_32_a1=array_a1[106][:] + obs_34_a1=array_a1[107][:] + obs_36_a1=array_a1[108][:] + obs_49_a1=array_a1[109][:] + obs_51_a1=array_a1[110][:] + obs_53_a1=array_a1[111][:] + obs_55_a1=array_a1[112][:] + obs_57_a1=array_a1[113][:] + obs_65_a1=array_a1[114][:] + obs_67_a1=array_a1[115][:] + obs_69_a1=array_a1[116][:] + obs_71_a1=array_a1[117][:] + obs_73_a1=array_a1[118][:] + obs_94_a1=array_a1[119][:] + obs_96_a1=array_a1[120][:] + obs_98_a1=array_a1[121][:] + obs_100_a1=array_a1[122][:] + obs_102_a1=array_a1[123][:] + obs_122_a1=array_a1[124][:] + obs_216_a1=array_a1[125][:] + lat=np.concatenate((lat,lat_a1)) + lon=np.concatenate((lon,lon_a1)) + topo=np.concatenate((topo,topo_a1)) + forr=np.concatenate((forr,forr_a1)) + fov=np.concatenate((fov,fov_a1)) + lev=np.concatenate((lev,lev_a1)) + trop=np.concatenate((trop,trop_a1)) + ir=np.concatenate((ir,ir_a1)) + sum3=np.concatenate((sum3,sum3_a1)) + ctpc=np.concatenate((ctpc,ctpc_a1)) + ctpd=np.concatenate((ctpd,ctpd_a1)) + ctpv=np.concatenate((ctpv,ctpv_a1)) + ctpn=np.concatenate((ctpn,ctpn_a1)) + cotc=np.concatenate((cotc,cotc_a1)) + cotd=np.concatenate((cotd,cotd_a1)) + cotv=np.concatenate((cotv,cotv_a1)) + cotn=np.concatenate((cotn,cotn_a1)) + co2_28=np.concatenate((co2_28,co2_28_a1)) + co2_30=np.concatenate((co2_30,co2_30_a1)) + co2_32=np.concatenate((co2_32,co2_32_a1)) + co2_34=np.concatenate((co2_34,co2_34_a1)) + co2_36=np.concatenate((co2_36,co2_36_a1)) + co2_49=np.concatenate((co2_49,co2_49_a1)) + co2_51=np.concatenate((co2_51,co2_51_a1)) + co2_53=np.concatenate((co2_53,co2_53_a1)) + co2_55=np.concatenate((co2_55,co2_55_a1)) + co2_57=np.concatenate((co2_57,co2_57_a1)) + co2_65=np.concatenate((co2_65,co2_65_a1)) + co2_67=np.concatenate((co2_67,co2_67_a1)) + co2_69=np.concatenate((co2_69,co2_69_a1)) + co2_71=np.concatenate((co2_71,co2_71_a1)) + co2_73=np.concatenate((co2_73,co2_73_a1)) + co2_94=np.concatenate((co2_94,co2_94_a1)) + co2_96=np.concatenate((co2_96,co2_96_a1)) + co2_98=np.concatenate((co2_98,co2_98_a1)) + co2_100=np.concatenate((co2_100,co2_100_a1)) + co2_102=np.concatenate((co2_102,co2_102_a1)) + co2_122=np.concatenate((co2_122,co2_122_a1)) + ncep_28=np.concatenate((ncep_28,ncep_28_a1)) + ncep_30=np.concatenate((ncep_30,ncep_30_a1)) + ncep_32=np.concatenate((ncep_32,ncep_32_a1)) + ncep_34=np.concatenate((ncep_34,ncep_34_a1)) + ncep_36=np.concatenate((ncep_36,ncep_36_a1)) + ncep_49=np.concatenate((ncep_49,ncep_49_a1)) + ncep_51=np.concatenate((ncep_51,ncep_51_a1)) + ncep_53=np.concatenate((ncep_53,ncep_53_a1)) + ncep_55=np.concatenate((ncep_55,ncep_55_a1)) + ncep_57=np.concatenate((ncep_57,ncep_57_a1)) + ncep_65=np.concatenate((ncep_65,ncep_65_a1)) + ncep_67=np.concatenate((ncep_67,ncep_67_a1)) + ncep_69=np.concatenate((ncep_69,ncep_69_a1)) + ncep_71=np.concatenate((ncep_71,ncep_71_a1)) + ncep_73=np.concatenate((ncep_73,ncep_73_a1)) + ncep_94=np.concatenate((ncep_94,ncep_94_a1)) + ncep_96=np.concatenate((ncep_96,ncep_96_a1)) + ncep_98=np.concatenate((ncep_98,ncep_98_a1)) + ncep_100=np.concatenate((ncep_100,ncep_100_a1)) + ncep_102=np.concatenate((ncep_102,ncep_102_a1)) + ncep_122=np.concatenate((ncep_122,ncep_122_a1)) + ncep_216=np.concatenate((ncep_216,ncep_216_a1)) + ecmwf_28=np.concatenate((ecmwf_28,ecmwf_28_a1)) + ecmwf_30=np.concatenate((ecmwf_30,ecmwf_30_a1)) + ecmwf_32=np.concatenate((ecmwf_32,ecmwf_32_a1)) + ecmwf_34=np.concatenate((ecmwf_34,ecmwf_34_a1)) + ecmwf_36=np.concatenate((ecmwf_36,ecmwf_36_a1)) + ecmwf_49=np.concatenate((ecmwf_49,ecmwf_49_a1)) + ecmwf_51=np.concatenate((ecmwf_51,ecmwf_51_a1)) + ecmwf_53=np.concatenate((ecmwf_53,ecmwf_53_a1)) + ecmwf_55=np.concatenate((ecmwf_55,ecmwf_55_a1)) + ecmwf_57=np.concatenate((ecmwf_57,ecmwf_57_a1)) + ecmwf_65=np.concatenate((ecmwf_65,ecmwf_65_a1)) + ecmwf_67=np.concatenate((ecmwf_67,ecmwf_67_a1)) + ecmwf_69=np.concatenate((ecmwf_69,ecmwf_69_a1)) + ecmwf_71=np.concatenate((ecmwf_71,ecmwf_71_a1)) + ecmwf_73=np.concatenate((ecmwf_73,ecmwf_73_a1)) + ecmwf_94=np.concatenate((ecmwf_94,ecmwf_94_a1)) + ecmwf_96=np.concatenate((ecmwf_96,ecmwf_96_a1)) + ecmwf_98=np.concatenate((ecmwf_98,ecmwf_98_a1)) + ecmwf_100=np.concatenate((ecmwf_100,ecmwf_100_a1)) + ecmwf_102=np.concatenate((ecmwf_102,ecmwf_102_a1)) + ecmwf_122=np.concatenate((ecmwf_122,ecmwf_122_a1)) + ecmwf_216=np.concatenate((ecmwf_216,ecmwf_216_a1)) + crtm_obs_28=np.concatenate((crtm_obs_28,crtm_obs_28_a1)) + crtm_obs_30=np.concatenate((crtm_obs_30,crtm_obs_30_a1)) + crtm_obs_32=np.concatenate((crtm_obs_32,crtm_obs_32_a1)) + crtm_obs_34=np.concatenate((crtm_obs_34,crtm_obs_34_a1)) + crtm_obs_36=np.concatenate((crtm_obs_36,crtm_obs_36_a1)) + crtm_obs_49=np.concatenate((crtm_obs_49,crtm_obs_49_a1)) + crtm_obs_51=np.concatenate((crtm_obs_51,crtm_obs_51_a1)) + crtm_obs_53=np.concatenate((crtm_obs_53,crtm_obs_53_a1)) + crtm_obs_55=np.concatenate((crtm_obs_55,crtm_obs_55_a1)) + crtm_obs_57=np.concatenate((crtm_obs_57,crtm_obs_57_a1)) + crtm_obs_65=np.concatenate((crtm_obs_65,crtm_obs_65_a1)) + crtm_obs_67=np.concatenate((crtm_obs_67,crtm_obs_67_a1)) + crtm_obs_69=np.concatenate((crtm_obs_69,crtm_obs_69_a1)) + crtm_obs_71=np.concatenate((crtm_obs_71,crtm_obs_71_a1)) + crtm_obs_73=np.concatenate((crtm_obs_73,crtm_obs_73_a1)) + crtm_obs_94=np.concatenate((crtm_obs_94,crtm_obs_94_a1)) + crtm_obs_96=np.concatenate((crtm_obs_96,crtm_obs_96_a1)) + crtm_obs_98=np.concatenate((crtm_obs_98,crtm_obs_98_a1)) + crtm_obs_100=np.concatenate((crtm_obs_100,crtm_obs_100_a1)) + crtm_obs_102=np.concatenate((crtm_obs_102,crtm_obs_102_a1)) + crtm_obs_122=np.concatenate((crtm_obs_122,crtm_obs_122_a1)) + crtm_obs_216=np.concatenate((crtm_obs_216,crtm_obs_216_a1)) + obs_28=np.concatenate((obs_28,obs_28_a1)) + obs_30=np.concatenate((obs_30,obs_30_a1)) + obs_32=np.concatenate((obs_32,obs_32_a1)) + obs_34=np.concatenate((obs_34,obs_34_a1)) + obs_36=np.concatenate((obs_36,obs_36_a1)) + obs_49=np.concatenate((obs_49,obs_49_a1)) + obs_51=np.concatenate((obs_51,obs_51_a1)) + obs_53=np.concatenate((obs_53,obs_53_a1)) + obs_55=np.concatenate((obs_55,obs_55_a1)) + obs_57=np.concatenate((obs_57,obs_57_a1)) + obs_65=np.concatenate((obs_65,obs_65_a1)) + obs_67=np.concatenate((obs_67,obs_67_a1)) + obs_69=np.concatenate((obs_69,obs_69_a1)) + obs_71=np.concatenate((obs_71,obs_71_a1)) + obs_73=np.concatenate((obs_73,obs_73_a1)) + obs_94=np.concatenate((obs_94,obs_94_a1)) + obs_96=np.concatenate((obs_96,obs_96_a1)) + obs_98=np.concatenate((obs_98,obs_98_a1)) + obs_100=np.concatenate((obs_100,obs_100_a1)) + obs_102=np.concatenate((obs_102,obs_102_a1)) + obs_122=np.concatenate((obs_122,obs_122_a1)) + obs_216=np.concatenate((obs_216,obs_216_a1)) + size=np.size(lat) + file=open(output1,"w+") + with open(output1,'wb') as f: + for a in range(0,size): + z=np.array([lat[a],lon[a],topo[a],forr[a],fov[a],lev[a],trop[a],ir[a],sum3[a],ctpc[a],ctpd[a],ctpv[a],ctpn[a],cotc[a],cotd[a],cotv[a],cotn[a],co2_28[a],co2_30[a],co2_32[a],co2_34[a],co2_36[a],co2_49[a],co2_51[a],co2_53[a],co2_55[a],co2_57[a],co2_65[a],co2_67[a],co2_69[a],co2_71[a],co2_73[a],co2_94[a],co2_96[a],co2_98[a],co2_100[a],co2_102[a],co2_122[a],ncep_28[a],ncep_30[a],ncep_32[a],ncep_34[a],ncep_36[a],ncep_49[a],ncep_51[a],ncep_53[a],ncep_55[a],ncep_57[a],ncep_65[a],ncep_67[a],ncep_69[a],ncep_71[a],ncep_73[a],ncep_94[a],ncep_96[a],ncep_98[a],ncep_100[a],ncep_102[a],ncep_122[a],ncep_216[a],ecmwf_28[a],ecmwf_30[a],ecmwf_32[a],ecmwf_34[a],ecmwf_36[a],ecmwf_49[a],ecmwf_51[a],ecmwf_53[a],ecmwf_55[a],ecmwf_57[a],ecmwf_65[a],ecmwf_67[a],ecmwf_69[a],ecmwf_71[a],ecmwf_73[a],ecmwf_94[a],ecmwf_96[a],ecmwf_98[a],ecmwf_100[a],ecmwf_102[a],ecmwf_122[a],ecmwf_216[a],crtm_obs_28[a],crtm_obs_30[a],crtm_obs_32[a],crtm_obs_34[a],crtm_obs_36[a],crtm_obs_49[a],crtm_obs_51[a],crtm_obs_53[a],crtm_obs_55[a],crtm_obs_57[a],crtm_obs_65[a],crtm_obs_67[a],crtm_obs_69[a],crtm_obs_71[a],crtm_obs_73[a],crtm_obs_94[a],crtm_obs_96[a],crtm_obs_98[a],crtm_obs_100[a],crtm_obs_102[a],crtm_obs_122[a],crtm_obs_216[a],obs_28[a],obs_30[a],obs_32[a],obs_34[a],obs_36[a],obs_49[a],obs_51[a],obs_53[a],obs_55[a],obs_57[a],obs_65[a],obs_67[a],obs_69[a],obs_71[a],obs_73[a],obs_94[a],obs_96[a],obs_98[a],obs_100[a],obs_102[a],obs_122[a],obs_216[a]]) + np.savetxt(f,z,fmt='%1.7f',newline=" ") + np.savetxt(f,[-8888],fmt='%d',newline=" ") + f.close() + f=open(output1,"rt") + r=f.read() + r=r.replace("-8888","\n") + r=r.replace(" -","-") + r=r.replace("ift","888888") + r=r.replace("nan","-9999") + r=r.replace(" ",",") + r=r.replace(","+"\n","\n") + r=r.replace("\n"+",","\n") + r=r.replace("0-","0,-") + r=r.replace("1-","1,-") + r=r.replace("2-","2,-") + r=r.replace("3-","3,-") + r=r.replace("4-","4,-") + r=r.replace("5-","5,-") + r=r.replace("6-","6,-") + r=r.replace("7-","7,-") + r=r.replace("8-","8,-") + r=r.replace("9-","9,-") + f.close() + f=open(output1,"wt") + f.write(r) + f.close() + +def full_comps_parts(st1,sp1,dt1,dt2,mon1,ye1): + b1=int(st1) + b2=int(sp1) + b3=int(dt1) + b4=int(dt2) + b5=int(mon1) + b6=int(ye1) + if b1>=0 and b1<=9: + c1="0"+str(b1) + else: + c1=str(b1) + if b2>=0 and b2<=9: + c2="0"+str(b2) + else: + c2=str(b2) + if b3>=0 and b3<=9: + c3="0"+str(b3) + else: + c3=str(b3) + if b4>=0 and b4<=9: + c4="0"+str(b4) + else: + c4=str(b4) + if b5>=0 and b5<=9: + c5="0"+str(b5) + else: + c5=str(b5) + c6=str(b6) + st=c1 + sp=c2 + dt=c3 + dp=c4 + mon=c5 + yer=c6 + day_time=(yer+"_"+mon+"_"+dt+"_"+st+"_"+sp) + filepath=("/apollo/jung/bandersen") + file_co2=(filepath+"/co2_slicing_full/"+yer+"_"+mon+"_"+dt+"/co2_slicing_output_"+yer+"_"+mon+"_"+dt+"_"+st+"00_"+st+"30.txt") + array_co2_1=loadtxt(file_co2,comments='#',delimiter=',',unpack=True) + file_co2=(filepath+"/co2_slicing_full/"+yer+"_"+mon+"_"+dt+"/co2_slicing_output_"+yer+"_"+mon+"_"+dt+"_"+st+"30_"+sp+"00.txt") + array_co2_2=loadtxt(file_co2,comments='#',delimiter=',',unpack=True) + array_ncep_1=cdf.Dataset(filepath+'/ncep_data_'+yer+'_'+mon+'_'+dt+'/cris.431.n20.'+yer+mon+dt+"_"+st+"0000."+yer+mon+dt+"_"+st+"3000.ncep.nc") + array_ncep_2=cdf.Dataset(filepath+'/ncep_data_'+yer+'_'+mon+'_'+dt+'/cris.431.n20.'+yer+mon+dt+"_"+st+"3000."+yer+mon+dp+"_"+sp+"0000.ncep.nc") + output=(filepath+"/compare_full/co2_ncep_output_"+day_time+".txt") + ncep_1=array_ncep_1['lat'][:] + ncep_2=array_ncep_2['lat'][:] + lat_ncep=np.asarray(np.concatenate((ncep_1,ncep_2))) + ncep_1=array_ncep_1['lon'][:] + ncep_2=array_ncep_2['lon'][:] + lon_ncep=np.asarray(np.concatenate((ncep_1,ncep_2))) + ctp_ncep_1=array_ncep_1['ctp'][:] + ctp_ncep_2=array_ncep_2['ctp'][:] + ctp_ncep=np.asarray(np.concatenate((ctp_ncep_1,ctp_ncep_2))) + cldfrac_ncep_1=array_ncep_1['cldfrac'][:] + cldfrac_ncep_2=array_ncep_2['cldfrac'][:] + cot_ncep=np.asarray(np.concatenate((cldfrac_ncep_1,cldfrac_ncep_2))) + sum3_ncep_1=array_ncep_1['sum3'][:] + sum3_ncep_2=array_ncep_2['sum3'][:] + sum3_ncep=np.asarray(np.concatenate((sum3_ncep_1,sum3_ncep_2))) + cld_impacted_ncep_1=array_ncep_1['cld_impacted'][:,28] + cld_impacted_ncep_2=array_ncep_2['cld_impacted'][:,28] + ctag_ncep_28=np.asarray(np.concatenate((cld_impacted_ncep_1,cld_impacted_ncep_2))) + cld_impacted_ncep_1=array_ncep_1['cld_impacted'][:,30] + cld_impacted_ncep_2=array_ncep_2['cld_impacted'][:,30] + ctag_ncep_30=np.asarray(np.concatenate((cld_impacted_ncep_1,cld_impacted_ncep_2))) + cld_impacted_ncep_1=array_ncep_1['cld_impacted'][:,32] + cld_impacted_ncep_2=array_ncep_2['cld_impacted'][:,32] + ctag_ncep_32=np.asarray(np.concatenate((cld_impacted_ncep_1,cld_impacted_ncep_2))) + cld_impacted_ncep_1=array_ncep_1['cld_impacted'][:,34] + cld_impacted_ncep_2=array_ncep_2['cld_impacted'][:,34] + ctag_ncep_34=np.asarray(np.concatenate((cld_impacted_ncep_1,cld_impacted_ncep_2))) + cld_impacted_ncep_1=array_ncep_1['cld_impacted'][:,36] + cld_impacted_ncep_2=array_ncep_2['cld_impacted'][:,36] + ctag_ncep_36=np.asarray(np.concatenate((cld_impacted_ncep_1,cld_impacted_ncep_2))) + cld_impacted_ncep_1=array_ncep_1['cld_impacted'][:,49] + cld_impacted_ncep_2=array_ncep_2['cld_impacted'][:,49] + ctag_ncep_49=np.asarray(np.concatenate((cld_impacted_ncep_1,cld_impacted_ncep_2))) + cld_impacted_ncep_1=array_ncep_1['cld_impacted'][:,51] + cld_impacted_ncep_2=array_ncep_2['cld_impacted'][:,51] + ctag_ncep_51=np.asarray(np.concatenate((cld_impacted_ncep_1,cld_impacted_ncep_2))) + cld_impacted_ncep_1=array_ncep_1['cld_impacted'][:,53] + cld_impacted_ncep_2=array_ncep_2['cld_impacted'][:,53] + ctag_ncep_53=np.asarray(np.concatenate((cld_impacted_ncep_1,cld_impacted_ncep_2))) + cld_impacted_ncep_1=array_ncep_1['cld_impacted'][:,55] + cld_impacted_ncep_2=array_ncep_2['cld_impacted'][:,55] + ctag_ncep_55=np.asarray(np.concatenate((cld_impacted_ncep_1,cld_impacted_ncep_2))) + cld_impacted_ncep_1=array_ncep_1['cld_impacted'][:,57] + cld_impacted_ncep_2=array_ncep_2['cld_impacted'][:,57] + ctag_ncep_57=np.asarray(np.concatenate((cld_impacted_ncep_1,cld_impacted_ncep_2))) + cld_impacted_ncep_1=array_ncep_1['cld_impacted'][:,65] + cld_impacted_ncep_2=array_ncep_2['cld_impacted'][:,65] + ctag_ncep_65=np.asarray(np.concatenate((cld_impacted_ncep_1,cld_impacted_ncep_2))) + cld_impacted_ncep_1=array_ncep_1['cld_impacted'][:,67] + cld_impacted_ncep_2=array_ncep_2['cld_impacted'][:,67] + ctag_ncep_67=np.asarray(np.concatenate((cld_impacted_ncep_1,cld_impacted_ncep_2))) + cld_impacted_ncep_1=array_ncep_1['cld_impacted'][:,69] + cld_impacted_ncep_2=array_ncep_2['cld_impacted'][:,69] + ctag_ncep_69=np.asarray(np.concatenate((cld_impacted_ncep_1,cld_impacted_ncep_2))) + cld_impacted_ncep_1=array_ncep_1['cld_impacted'][:,71] + cld_impacted_ncep_2=array_ncep_2['cld_impacted'][:,71] + ctag_ncep_71=np.asarray(np.concatenate((cld_impacted_ncep_1,cld_impacted_ncep_2))) + cld_impacted_ncep_1=array_ncep_1['cld_impacted'][:,73] + cld_impacted_ncep_2=array_ncep_2['cld_impacted'][:,73] + ctag_ncep_73=np.asarray(np.concatenate((cld_impacted_ncep_1,cld_impacted_ncep_2))) + cld_impacted_ncep_1=array_ncep_1['cld_impacted'][:,94] + cld_impacted_ncep_2=array_ncep_2['cld_impacted'][:,94] + ctag_ncep_94=np.asarray(np.concatenate((cld_impacted_ncep_1,cld_impacted_ncep_2))) + cld_impacted_ncep_1=array_ncep_1['cld_impacted'][:,96] + cld_impacted_ncep_2=array_ncep_2['cld_impacted'][:,96] + ctag_ncep_96=np.asarray(np.concatenate((cld_impacted_ncep_1,cld_impacted_ncep_2))) + cld_impacted_ncep_1=array_ncep_1['cld_impacted'][:,98] + cld_impacted_ncep_2=array_ncep_2['cld_impacted'][:,98] + ctag_ncep_98=np.asarray(np.concatenate((cld_impacted_ncep_1,cld_impacted_ncep_2))) + cld_impacted_ncep_1=array_ncep_1['cld_impacted'][:,100] + cld_impacted_ncep_2=array_ncep_2['cld_impacted'][:,100] + ctag_ncep_100=np.asarray(np.concatenate((cld_impacted_ncep_1,cld_impacted_ncep_2))) + cld_impacted_ncep_1=array_ncep_1['cld_impacted'][:,102] + cld_impacted_ncep_2=array_ncep_2['cld_impacted'][:,102] + ctag_ncep_102=np.asarray(np.concatenate((cld_impacted_ncep_1,cld_impacted_ncep_2))) + cld_impacted_ncep_1=array_ncep_1['cld_impacted'][:,122] + cld_impacted_ncep_2=array_ncep_2['cld_impacted'][:,122] + ctag_ncep_122=np.asarray(np.concatenate((cld_impacted_ncep_1,cld_impacted_ncep_2))) + cld_impacted_ncep_1=array_ncep_1['cld_impacted'][:,216] + cld_impacted_ncep_2=array_ncep_2['cld_impacted'][:,216] + ctag_ncep_216=np.asarray(np.concatenate((cld_impacted_ncep_1,cld_impacted_ncep_2))) + lat_co2=np.asarray(np.concatenate((array_co2_1[0][:],array_co2_2[0][:]))) + lon_co2=np.asarray(np.concatenate((array_co2_1[1][:],array_co2_2[1][:]))) + topo=np.asarray(np.concatenate((array_co2_1[2][:],array_co2_2[2][:]))) + forr=np.asarray(np.concatenate((array_co2_1[3][:],array_co2_2[3][:]))) + fovv=np.asarray(np.concatenate((array_co2_1[4][:],array_co2_2[4][:]))) + ctp_viirs=np.asarray(np.concatenate((array_co2_1[5][:],array_co2_2[5][:]))) + cot_viirs=np.asarray(np.concatenate((array_co2_1[6][:],array_co2_2[6][:]))) + ctp_co2=np.asarray(np.concatenate((array_co2_1[7][:],array_co2_2[7][:]))) + cot_co2=np.asarray(np.concatenate((array_co2_1[8][:],array_co2_2[8][:]))) + lev_co2=np.asarray(np.concatenate((array_co2_1[9][:],array_co2_2[9][:]))) + trop=np.asarray(np.concatenate((array_co2_1[10][:],array_co2_2[10][:]))) + ir_test=np.asarray(np.concatenate((array_co2_1[11][:],array_co2_2[11][:]))) + co2_use_28=np.asarray(np.concatenate((array_co2_1[12][:],array_co2_2[12][:]))) + co2_use_30=np.asarray(np.concatenate((array_co2_1[13][:],array_co2_2[13][:]))) + co2_use_32=np.asarray(np.concatenate((array_co2_1[14][:],array_co2_2[14][:]))) + co2_use_34=np.asarray(np.concatenate((array_co2_1[15][:],array_co2_2[15][:]))) + co2_use_36=np.asarray(np.concatenate((array_co2_1[16][:],array_co2_2[16][:]))) + co2_use_49=np.asarray(np.concatenate((array_co2_1[17][:],array_co2_2[17][:]))) + co2_use_51=np.asarray(np.concatenate((array_co2_1[18][:],array_co2_2[18][:]))) + co2_use_53=np.asarray(np.concatenate((array_co2_1[19][:],array_co2_2[19][:]))) + co2_use_55=np.asarray(np.concatenate((array_co2_1[20][:],array_co2_2[20][:]))) + co2_use_57=np.asarray(np.concatenate((array_co2_1[21][:],array_co2_2[21][:]))) + co2_use_65=np.asarray(np.concatenate((array_co2_1[22][:],array_co2_2[22][:]))) + co2_use_67=np.asarray(np.concatenate((array_co2_1[23][:],array_co2_2[23][:]))) + co2_use_69=np.asarray(np.concatenate((array_co2_1[24][:],array_co2_2[24][:]))) + co2_use_71=np.asarray(np.concatenate((array_co2_1[25][:],array_co2_2[25][:]))) + co2_use_73=np.asarray(np.concatenate((array_co2_1[26][:],array_co2_2[26][:]))) + co2_use_94=np.asarray(np.concatenate((array_co2_1[27][:],array_co2_2[27][:]))) + co2_use_96=np.asarray(np.concatenate((array_co2_1[28][:],array_co2_2[28][:]))) + co2_use_98=np.asarray(np.concatenate((array_co2_1[29][:],array_co2_2[29][:]))) + co2_use_100=np.asarray(np.concatenate((array_co2_1[30][:],array_co2_2[30][:]))) + co2_use_102=np.asarray(np.concatenate((array_co2_1[31][:],array_co2_2[31][:]))) + co2_use_122=np.asarray(np.concatenate((array_co2_1[32][:],array_co2_2[32][:]))) + crtm_obs_28=np.asarray(np.concatenate((array_co2_1[33][:],array_co2_2[33][:]))) + crtm_obs_30=np.asarray(np.concatenate((array_co2_1[34][:],array_co2_2[34][:]))) + crtm_obs_32=np.asarray(np.concatenate((array_co2_1[35][:],array_co2_2[35][:]))) + crtm_obs_34=np.asarray(np.concatenate((array_co2_1[36][:],array_co2_2[36][:]))) + crtm_obs_36=np.asarray(np.concatenate((array_co2_1[37][:],array_co2_2[37][:]))) + crtm_obs_49=np.asarray(np.concatenate((array_co2_1[38][:],array_co2_2[38][:]))) + crtm_obs_51=np.asarray(np.concatenate((array_co2_1[39][:],array_co2_2[39][:]))) + crtm_obs_53=np.asarray(np.concatenate((array_co2_1[40][:],array_co2_2[40][:]))) + crtm_obs_55=np.asarray(np.concatenate((array_co2_1[41][:],array_co2_2[41][:]))) + crtm_obs_57=np.asarray(np.concatenate((array_co2_1[42][:],array_co2_2[42][:]))) + crtm_obs_65=np.asarray(np.concatenate((array_co2_1[43][:],array_co2_2[43][:]))) + crtm_obs_67=np.asarray(np.concatenate((array_co2_1[44][:],array_co2_2[44][:]))) + crtm_obs_69=np.asarray(np.concatenate((array_co2_1[45][:],array_co2_2[45][:]))) + crtm_obs_71=np.asarray(np.concatenate((array_co2_1[46][:],array_co2_2[46][:]))) + crtm_obs_73=np.asarray(np.concatenate((array_co2_1[47][:],array_co2_2[47][:]))) + crtm_obs_94=np.asarray(np.concatenate((array_co2_1[48][:],array_co2_2[48][:]))) + crtm_obs_96=np.asarray(np.concatenate((array_co2_1[49][:],array_co2_2[49][:]))) + crtm_obs_98=np.asarray(np.concatenate((array_co2_1[50][:],array_co2_2[50][:]))) + crtm_obs_100=np.asarray(np.concatenate((array_co2_1[51][:],array_co2_2[51][:]))) + crtm_obs_102=np.asarray(np.concatenate((array_co2_1[52][:],array_co2_2[52][:]))) + crtm_obs_122=np.asarray(np.concatenate((array_co2_1[53][:],array_co2_2[53][:]))) + crtm_obs_216=np.asarray(np.concatenate((array_co2_1[54][:],array_co2_2[54][:]))) + obs_28=np.asarray(np.concatenate((array_co2_1[55][:],array_co2_2[55][:]))) + obs_30=np.asarray(np.concatenate((array_co2_1[56][:],array_co2_2[56][:]))) + obs_32=np.asarray(np.concatenate((array_co2_1[57][:],array_co2_2[57][:]))) + obs_34=np.asarray(np.concatenate((array_co2_1[58][:],array_co2_2[58][:]))) + obs_36=np.asarray(np.concatenate((array_co2_1[59][:],array_co2_2[59][:]))) + obs_49=np.asarray(np.concatenate((array_co2_1[60][:],array_co2_2[60][:]))) + obs_51=np.asarray(np.concatenate((array_co2_1[61][:],array_co2_2[61][:]))) + obs_53=np.asarray(np.concatenate((array_co2_1[62][:],array_co2_2[62][:]))) + obs_55=np.asarray(np.concatenate((array_co2_1[63][:],array_co2_2[63][:]))) + obs_57=np.asarray(np.concatenate((array_co2_1[64][:],array_co2_2[64][:]))) + obs_65=np.asarray(np.concatenate((array_co2_1[65][:],array_co2_2[65][:]))) + obs_67=np.asarray(np.concatenate((array_co2_1[66][:],array_co2_2[66][:]))) + obs_69=np.asarray(np.concatenate((array_co2_1[67][:],array_co2_2[67][:]))) + obs_71=np.asarray(np.concatenate((array_co2_1[68][:],array_co2_2[68][:]))) + obs_73=np.asarray(np.concatenate((array_co2_1[69][:],array_co2_2[69][:]))) + obs_94=np.asarray(np.concatenate((array_co2_1[70][:],array_co2_2[70][:]))) + obs_96=np.asarray(np.concatenate((array_co2_1[71][:],array_co2_2[71][:]))) + obs_98=np.asarray(np.concatenate((array_co2_1[72][:],array_co2_2[72][:]))) + obs_100=np.asarray(np.concatenate((array_co2_1[73][:],array_co2_2[73][:]))) + obs_102=np.asarray(np.concatenate((array_co2_1[74][:],array_co2_2[74][:]))) + obs_122=np.asarray(np.concatenate((array_co2_1[75][:],array_co2_2[75][:]))) + obs_216=np.asarray(np.concatenate((array_co2_1[76][:],array_co2_2[76][:]))) + size_ncep=np.size(lat_ncep) + def find_nearest(array,value): + array=np.asarray(array) + idx=(np.abs(array-value)).argmin() + return array[idx] + def find_nearest_index(array,value): + array=np.asarray(array) + idx=(np.abs(array-value)).argmin() + return(idx) + lat_all=[] + lon_all=[] + topo_all=[] + for_all=[] + fov_all=[] + lev_all=[] + trop_all=[] + ir_all=[] + co2_ctp_all=[] + viirs_ctp_all=[] + ncep_ctp_all=[] + co2_cot_all=[] + viirs_cot_all=[] + ncep_cot_all=[] + ncep_sum3_all=[] + co2_28_all=[] + co2_30_all=[] + co2_32_all=[] + co2_34_all=[] + co2_36_all=[] + co2_49_all=[] + co2_51_all=[] + co2_53_all=[] + co2_55_all=[] + co2_57_all=[] + co2_65_all=[] + co2_67_all=[] + co2_69_all=[] + co2_71_all=[] + co2_73_all=[] + co2_94_all=[] + co2_96_all=[] + co2_98_all=[] + co2_100_all=[] + co2_102_all=[] + co2_122_all=[] + ncep_28_all=[] + ncep_30_all=[] + ncep_32_all=[] + ncep_34_all=[] + ncep_36_all=[] + ncep_49_all=[] + ncep_51_all=[] + ncep_53_all=[] + ncep_55_all=[] + ncep_57_all=[] + ncep_65_all=[] + ncep_67_all=[] + ncep_69_all=[] + ncep_71_all=[] + ncep_73_all=[] + ncep_94_all=[] + ncep_96_all=[] + ncep_98_all=[] + ncep_100_all=[] + ncep_102_all=[] + ncep_122_all=[] + ncep_216_all=[] + crtm_obs_28_all=[] + crtm_obs_30_all=[] + crtm_obs_32_all=[] + crtm_obs_34_all=[] + crtm_obs_36_all=[] + crtm_obs_49_all=[] + crtm_obs_51_all=[] + crtm_obs_53_all=[] + crtm_obs_55_all=[] + crtm_obs_57_all=[] + crtm_obs_65_all=[] + crtm_obs_67_all=[] + crtm_obs_69_all=[] + crtm_obs_71_all=[] + crtm_obs_73_all=[] + crtm_obs_94_all=[] + crtm_obs_96_all=[] + crtm_obs_98_all=[] + crtm_obs_100_all=[] + crtm_obs_102_all=[] + crtm_obs_122_all=[] + crtm_obs_216_all=[] + obs_28_all=[] + obs_30_all=[] + obs_32_all=[] + obs_34_all=[] + obs_36_all=[] + obs_49_all=[] + obs_51_all=[] + obs_53_all=[] + obs_55_all=[] + obs_57_all=[] + obs_65_all=[] + obs_67_all=[] + obs_69_all=[] + obs_71_all=[] + obs_73_all=[] + obs_94_all=[] + obs_96_all=[] + obs_98_all=[] + obs_100_all=[] + obs_102_all=[] + obs_122_all=[] + obs_216_all=[] + for a1 in range(0,size_ncep): + a_val=find_nearest(lat_co2,lat_ncep[a1]) + a_co2=find_nearest_index(lat_co2,a_val) + a_ncep=find_nearest_index(lat_ncep,a_val) + b1=lat_f[a_co2] + b2=lon_f[a_co2] + c1=topo[a_co2] + c2=forr[a_co2] + c3=fovv[a_co2] + d1=lev_co2[a_co2] + d2=trop[a_co2] + d3=ir_test[a_co2] + d4=sum3_ncep[a_ncep] + e1=ctp_co2[a_co2] + e3=ctp_viirs[a_co2] + e4=ctp_ncep[a_ncep] + g1=cot_co2[a_co2] + g3=cot_viirs[a_co2] + g4=cot_ncep[a_ncep] + h1=co2_use_28[a_co2] + h2=co2_use_30[a_co2] + h3=co2_use_32[a_co2] + h4=co2_use_34[a_co2] + h5=co2_use_36[a_co2] + h6=co2_use_49[a_co2] + h7=co2_use_51[a_co2] + h8=co2_use_53[a_co2] + h9=co2_use_55[a_co2] + h10=co2_use_57[a_co2] + h11=co2_use_65[a_co2] + h12=co2_use_67[a_co2] + h13=co2_use_69[a_co2] + h14=co2_use_71[a_co2] + h15=co2_use_73[a_co2] + h16=co2_use_94[a_co2] + h17=co2_use_96[a_co2] + h18=co2_use_98[a_co2] + h19=co2_use_100[a_co2] + h20=co2_use_102[a_co2] + h21=co2_use_122[a_co2] + j1=ctag_ncep_28[a_ncep] + j2=ctag_ncep_30[a_ncep] + j3=ctag_ncep_32[a_ncep] + j4=ctag_ncep_34[a_ncep] + j5=ctag_ncep_36[a_ncep] + j6=ctag_ncep_49[a_ncep] + j7=ctag_ncep_51[a_ncep] + j8=ctag_ncep_53[a_ncep] + j9=ctag_ncep_55[a_ncep] + j10=ctag_ncep_57[a_ncep] + j11=ctag_ncep_65[a_ncep] + j12=ctag_ncep_67[a_ncep] + j13=ctag_ncep_69[a_ncep] + j14=ctag_ncep_71[a_ncep] + j15=ctag_ncep_73[a_ncep] + j16=ctag_ncep_94[a_ncep] + j17=ctag_ncep_96[a_ncep] + j18=ctag_ncep_98[a_ncep] + j19=ctag_ncep_100[a_ncep] + j20=ctag_ncep_102[a_ncep] + j21=ctag_ncep_122[a_ncep] + j22=ctag_ncep_216[a_ncep] + l1=crtm_obs_28[a_co2] + l2=crtm_obs_30[a_co2] + l3=crtm_obs_32[a_co2] + l4=crtm_obs_34[a_co2] + l5=crtm_obs_36[a_co2] + l6=crtm_obs_49[a_co2] + l7=crtm_obs_51[a_co2] + l8=crtm_obs_53[a_co2] + l9=crtm_obs_55[a_co2] + l10=crtm_obs_57[a_co2] + l11=crtm_obs_65[a_co2] + l12=crtm_obs_67[a_co2] + l13=crtm_obs_69[a_co2] + l14=crtm_obs_71[a_co2] + l15=crtm_obs_73[a_co2] + l16=crtm_obs_94[a_co2] + l17=crtm_obs_96[a_co2] + l18=crtm_obs_98[a_co2] + l19=crtm_obs_100[a_co2] + l20=crtm_obs_102[a_co2] + l21=crtm_obs_122[a_co2] + l22=crtm_obs_216[a_co2] + m1=obs_28[a_co2] + m2=obs_30[a_co2] + m3=obs_32[a_co2] + m4=obs_34[a_co2] + m5=obs_36[a_co2] + m6=obs_49[a_co2] + m7=obs_51[a_co2] + m8=obs_53[a_co2] + m9=obs_55[a_co2] + m10=obs_57[a_co2] + m11=obs_65[a_co2] + m12=obs_67[a_co2] + m13=obs_69[a_co2] + m14=obs_71[a_co2] + m15=obs_73[a_co2] + m16=obs_94[a_co2] + m17=obs_96[a_co2] + m18=obs_98[a_co2] + m19=obs_100[a_co2] + m20=obs_102[a_co2] + m21=obs_122[a_co2] + m22=obs_216[a_co2] + lat_all.append(b1) + lon_all.append(b2) + topo_all.append(c1) + for_all.append(c2) + fov_all.append(c3) + lev_all.append(d1) + trop_all.append(d2) + ir_all.append(d3) + ncep_sum3_all.append(d4) + co2_ctp_all.append(e1) + viirs_ctp_all.append(e3) + ncep_ctp_all.append(e4) + co2_cot_all.append(g1) + viirs_cot_all.append(g3) + ncep_cot_all.append(g4) + co2_28_all.append(h1) + co2_30_all.append(h2) + co2_32_all.append(h3) + co2_34_all.append(h4) + co2_36_all.append(h5) + co2_49_all.append(h6) + co2_51_all.append(h7) + co2_53_all.append(h8) + co2_55_all.append(h9) + co2_57_all.append(h10) + co2_65_all.append(h11) + co2_67_all.append(h12) + co2_69_all.append(h13) + co2_71_all.append(h14) + co2_73_all.append(h15) + co2_94_all.append(h16) + co2_96_all.append(h17) + co2_98_all.append(h18) + co2_100_all.append(h19) + co2_102_all.append(h20) + co2_122_all.append(h21) + ncep_28_all.append(j1) + ncep_30_all.append(j2) + ncep_32_all.append(j3) + ncep_34_all.append(j4) + ncep_36_all.append(j5) + ncep_49_all.append(j6) + ncep_51_all.append(j7) + ncep_53_all.append(j8) + ncep_55_all.append(j9) + ncep_57_all.append(j10) + ncep_65_all.append(j11) + ncep_67_all.append(j12) + ncep_69_all.append(j13) + ncep_71_all.append(j14) + ncep_73_all.append(j15) + ncep_94_all.append(j16) + ncep_96_all.append(j17) + ncep_98_all.append(j18) + ncep_100_all.append(j19) + ncep_102_all.append(j20) + ncep_122_all.append(j21) + ncep_216_all.append(j22) + crtm_obs_28_all.append(l1) + crtm_obs_30_all.append(l2) + crtm_obs_32_all.append(l3) + crtm_obs_34_all.append(l4) + crtm_obs_36_all.append(l5) + crtm_obs_49_all.append(l6) + crtm_obs_51_all.append(l7) + crtm_obs_53_all.append(l8) + crtm_obs_55_all.append(l9) + crtm_obs_57_all.append(l10) + crtm_obs_65_all.append(l11) + crtm_obs_67_all.append(l12) + crtm_obs_69_all.append(l13) + crtm_obs_71_all.append(l14) + crtm_obs_73_all.append(l15) + crtm_obs_94_all.append(l16) + crtm_obs_96_all.append(l17) + crtm_obs_98_all.append(l18) + crtm_obs_100_all.append(l19) + crtm_obs_102_all.append(l20) + crtm_obs_122_all.append(l21) + crtm_obs_216_all.append(l22) + obs_28_all.append(m1) + obs_30_all.append(m2) + obs_32_all.append(m3) + obs_34_all.append(m4) + obs_36_all.append(m5) + obs_49_all.append(m6) + obs_51_all.append(m7) + obs_53_all.append(m8) + obs_55_all.append(m9) + obs_57_all.append(m10) + obs_65_all.append(m11) + obs_67_all.append(m12) + obs_69_all.append(m13) + obs_71_all.append(m14) + obs_73_all.append(m15) + obs_94_all.append(m16) + obs_96_all.append(m17) + obs_98_all.append(m18) + obs_100_all.append(m19) + obs_102_all.append(m20) + obs_122_all.append(m21) + obs_216_all.append(m22) + size=np.size(lat_all) + file=open(output,"w+") + with open(output,'wb') as f: + for a in range(0,size): + z=np.array([lat_all[a],lon_all[a],topo_all[a],for_all[a],fov_all[a],lev_all[a],trop_all[a],ir_all[a],ncep_sum3_all[a],co2_ctp_all[a],viirs_ctp_all[a],ncep_ctp_all[a],co2_cot_all[a],viirs_cot_all[a],ncep_cot_all[a],co2_28_all[a],co2_30_all[a],co2_32_all[a],co2_34_all[a],co2_36_all[a],co2_49_all[a],co2_51_all[a],co2_53_all[a],co2_55_all[a],co2_57_all[a],co2_65_all[a],co2_67_all[a],co2_69_all[a],co2_71_all[a],co2_73_all[a],co2_94_all[a],co2_96_all[a],co2_98_all[a],co2_100_all[a],co2_102_all[a],co2_122_all[a],ncep_28_all[a],ncep_30_all[a],ncep_32_all[a],ncep_34_all[a],ncep_36_all[a],ncep_49_all[a],ncep_51_all[a],ncep_53_all[a],ncep_55_all[a],ncep_57_all[a],ncep_65_all[a],ncep_67_all[a],ncep_69_all[a],ncep_71_all[a],ncep_73_all[a],ncep_94_all[a],ncep_96_all[a],ncep_98_all[a],ncep_100_all[a],ncep_102_all[a],ncep_122_all[a],ncep_216_all[a],crtm_obs_28_all[a],crtm_obs_30_all[a],crtm_obs_32_all[a],crtm_obs_34_all[a],crtm_obs_36_all[a],crtm_obs_49_all[a],crtm_obs_51_all[a],crtm_obs_53_all[a],crtm_obs_55_all[a],crtm_obs_57_all[a],crtm_obs_65_all[a],crtm_obs_67_all[a],crtm_obs_69_all[a],crtm_obs_71_all[a],crtm_obs_73_all[a],crtm_obs_94_all[a],crtm_obs_96_all[a],crtm_obs_98_all[a],crtm_obs_100_all[a],crtm_obs_102_all[a],crtm_obs_122_all[a],crtm_obs_216_all[a],obs_28_all[a],obs_30_all[a],obs_32_all[a],obs_34_all[a],obs_36_all[a],obs_49_all[a],obs_51_all[a],obs_53_all[a],obs_55_all[a],obs_57_all[a],obs_65_all[a],obs_67_all[a],obs_69_all[a],obs_71_all[a],obs_73_all[a],obs_94_all[a],obs_96_all[a],obs_98_all[a],obs_100_all[a],obs_102_all[a],obs_122_all[a],obs_216_all[a]]) + np.savetxt(f,z,fmt='%1.7f',newline=" ") + np.savetxt(f,[-8888],fmt='%d',newline=" ") + f.close() + f=open(output,"rt") + r=f.read() + r=r.replace("-8888","\n") + r=r.replace(" -","-") + r=r.replace("ift","797979") + r=r.replace("inf","797979") + r=r.replace("nan","-9999") + r=r.replace(" ",",") + r=r.replace(","+"\n","\n") + r=r.replace("\n"+",","\n") + r=r.replace("0-","0,-") + r=r.replace("1-","1,-") + r=r.replace("2-","2,-") + r=r.replace("3-","3,-") + r=r.replace("4-","4,-") + r=r.replace("5-","5,-") + r=r.replace("6-","6,-") + r=r.replace("7-","7,-") + r=r.replace("8-","8,-") + r=r.replace("9-","9,-") + f.close() + f=open(output,"wt") + f.write(r) + f.close() + return("done") + +def comps_hour_parts(dt1,mon1,ye1): + b1=int(dt1) + b2=int(mon1) + b3=int(ye1) + if b1>=0 and b1<=9: + c1="0"+str(b1) + else: + c1=str(b1) + if b2>=0 and b2<=9: + c2="0"+str(b2) + else: + c2=str(b2) + c3=str(b3) + dd=c1 + mon=c2 + yer=c3 + output1=('/apollo/jung/bandersen/compare_full_no_parts/co2_ncep_output_'+yer+'_'+mon+'_'+dd+'_24hr.txt') + files=glob('/apollo/jung/bandersen/compare_full/co2_ncep_output_'+yer+'_'+mon+'_'+dd+'*.txt')[:] + sizer=np.size(files) + lat=[] + lon=[] + topo=[] + forr=[] + fov=[] + lev=[] + trop=[] + ir=[] + sum3=[] + ctpc=[] + ctpv=[] + ctpn=[] + cotc=[] + cotv=[] + cotn=[] + co2_28=[] + co2_30=[] + co2_32=[] + co2_34=[] + co2_36=[] + co2_49=[] + co2_51=[] + co2_53=[] + co2_55=[] + co2_57=[] + co2_65=[] + co2_67=[] + co2_69=[] + co2_71=[] + co2_73=[] + co2_94=[] + co2_96=[] + co2_98=[] + co2_100=[] + co2_102=[] + co2_122=[] + ncep_28=[] + ncep_30=[] + ncep_32=[] + ncep_34=[] + ncep_36=[] + ncep_49=[] + ncep_51=[] + ncep_53=[] + ncep_55=[] + ncep_57=[] + ncep_65=[] + ncep_67=[] + ncep_69=[] + ncep_71=[] + ncep_73=[] + ncep_94=[] + ncep_96=[] + ncep_98=[] + ncep_100=[] + ncep_102=[] + ncep_122=[] + ncep_216=[] + crtm_obs_28=[] + crtm_obs_30=[] + crtm_obs_32=[] + crtm_obs_34=[] + crtm_obs_36=[] + crtm_obs_49=[] + crtm_obs_51=[] + crtm_obs_53=[] + crtm_obs_55=[] + crtm_obs_57=[] + crtm_obs_65=[] + crtm_obs_67=[] + crtm_obs_69=[] + crtm_obs_71=[] + crtm_obs_73=[] + crtm_obs_94=[] + crtm_obs_96=[] + crtm_obs_98=[] + crtm_obs_100=[] + crtm_obs_102=[] + crtm_obs_122=[] + crtm_obs_216=[] + obs_28=[] + obs_30=[] + obs_32=[] + obs_34=[] + obs_36=[] + obs_49=[] + obs_51=[] + obs_53=[] + obs_55=[] + obs_57=[] + obs_65=[] + obs_67=[] + obs_69=[] + obs_71=[] + obs_73=[] + obs_94=[] + obs_96=[] + obs_98=[] + obs_100=[] + obs_102=[] + obs_122=[] + obs_216=[] + for i in range(0,sizer): + array_a1=loadtxt(files[i],comments='#',delimiter=',',unpack=True) + lat_a1=array_a1[0][:] + lon_a1=array_a1[1][:] + topo_a1=array_a1[2][:] + forr_a1=array_a1[3][:] + fov_a1=array_a1[4][:] + lev_a1=array_a1[5][:] + trop_a1=array_a1[6][:] + ir_a1=array_a1[7][:] + sum3_a1=array_a1[8][:] + ctpc_a1=array_a1[9][:] + ctpv_a1=array_a1[11][:] + ctpn_a1=array_a1[12][:] + cotc_a1=array_a1[13][:] + cotv_a1=array_a1[15][:] + cotn_a1=array_a1[16][:] + co2_28_a1=array_a1[17][:] + co2_30_a1=array_a1[18][:] + co2_32_a1=array_a1[19][:] + co2_34_a1=array_a1[20][:] + co2_36_a1=array_a1[21][:] + co2_49_a1=array_a1[22][:] + co2_51_a1=array_a1[23][:] + co2_53_a1=array_a1[24][:] + co2_55_a1=array_a1[25][:] + co2_57_a1=array_a1[26][:] + co2_65_a1=array_a1[27][:] + co2_67_a1=array_a1[28][:] + co2_69_a1=array_a1[29][:] + co2_71_a1=array_a1[30][:] + co2_73_a1=array_a1[31][:] + co2_94_a1=array_a1[32][:] + co2_96_a1=array_a1[33][:] + co2_98_a1=array_a1[34][:] + co2_100_a1=array_a1[35][:] + co2_102_a1=array_a1[36][:] + co2_122_a1=array_a1[37][:] + ncep_28_a1=array_a1[38][:] + ncep_30_a1=array_a1[39][:] + ncep_32_a1=array_a1[40][:] + ncep_34_a1=array_a1[41][:] + ncep_36_a1=array_a1[42][:] + ncep_49_a1=array_a1[43][:] + ncep_51_a1=array_a1[44][:] + ncep_53_a1=array_a1[45][:] + ncep_55_a1=array_a1[46][:] + ncep_57_a1=array_a1[47][:] + ncep_65_a1=array_a1[48][:] + ncep_67_a1=array_a1[49][:] + ncep_69_a1=array_a1[50][:] + ncep_71_a1=array_a1[51][:] + ncep_73_a1=array_a1[52][:] + ncep_94_a1=array_a1[53][:] + ncep_96_a1=array_a1[54][:] + ncep_98_a1=array_a1[55][:] + ncep_100_a1=array_a1[56][:] + ncep_102_a1=array_a1[57][:] + ncep_122_a1=array_a1[58][:] + ncep_216_a1=array_a1[59][:] + crtm_obs_28_a1=array_a1[82][:] + crtm_obs_30_a1=array_a1[83][:] + crtm_obs_32_a1=array_a1[84][:] + crtm_obs_34_a1=array_a1[85][:] + crtm_obs_36_a1=array_a1[86][:] + crtm_obs_49_a1=array_a1[87][:] + crtm_obs_51_a1=array_a1[88][:] + crtm_obs_53_a1=array_a1[89][:] + crtm_obs_55_a1=array_a1[90][:] + crtm_obs_57_a1=array_a1[91][:] + crtm_obs_65_a1=array_a1[92][:] + crtm_obs_67_a1=array_a1[93][:] + crtm_obs_69_a1=array_a1[94][:] + crtm_obs_71_a1=array_a1[95][:] + crtm_obs_73_a1=array_a1[96][:] + crtm_obs_94_a1=array_a1[97][:] + crtm_obs_96_a1=array_a1[98][:] + crtm_obs_98_a1=array_a1[99][:] + crtm_obs_100_a1=array_a1[100][:] + crtm_obs_102_a1=array_a1[101][:] + crtm_obs_122_a1=array_a1[102][:] + crtm_obs_216_a1=array_a1[103][:] + obs_28_a1=array_a1[104][:] + obs_30_a1=array_a1[105][:] + obs_32_a1=array_a1[106][:] + obs_34_a1=array_a1[107][:] + obs_36_a1=array_a1[108][:] + obs_49_a1=array_a1[109][:] + obs_51_a1=array_a1[110][:] + obs_53_a1=array_a1[111][:] + obs_55_a1=array_a1[112][:] + obs_57_a1=array_a1[113][:] + obs_65_a1=array_a1[114][:] + obs_67_a1=array_a1[115][:] + obs_69_a1=array_a1[116][:] + obs_71_a1=array_a1[117][:] + obs_73_a1=array_a1[118][:] + obs_94_a1=array_a1[119][:] + obs_96_a1=array_a1[120][:] + obs_98_a1=array_a1[121][:] + obs_100_a1=array_a1[122][:] + obs_102_a1=array_a1[123][:] + obs_122_a1=array_a1[124][:] + obs_216_a1=array_a1[125][:] + lat=np.concatenate((lat,lat_a1)) + lon=np.concatenate((lon,lon_a1)) + topo=np.concatenate((topo,topo_a1)) + forr=np.concatenate((forr,forr_a1)) + fov=np.concatenate((fov,fov_a1)) + lev=np.concatenate((lev,lev_a1)) + trop=np.concatenate((trop,trop_a1)) + ir=np.concatenate((ir,ir_a1)) + sum3=np.concatenate((sum3,sum3_a1)) + ctpc=np.concatenate((ctpc,ctpc_a1)) + ctpv=np.concatenate((ctpv,ctpv_a1)) + ctpn=np.concatenate((ctpn,ctpn_a1)) + cotc=np.concatenate((cotc,cotc_a1)) + cotv=np.concatenate((cotv,cotv_a1)) + cotn=np.concatenate((cotn,cotn_a1)) + co2_28=np.concatenate((co2_28,co2_28_a1)) + co2_30=np.concatenate((co2_30,co2_30_a1)) + co2_32=np.concatenate((co2_32,co2_32_a1)) + co2_34=np.concatenate((co2_34,co2_34_a1)) + co2_36=np.concatenate((co2_36,co2_36_a1)) + co2_49=np.concatenate((co2_49,co2_49_a1)) + co2_51=np.concatenate((co2_51,co2_51_a1)) + co2_53=np.concatenate((co2_53,co2_53_a1)) + co2_55=np.concatenate((co2_55,co2_55_a1)) + co2_57=np.concatenate((co2_57,co2_57_a1)) + co2_65=np.concatenate((co2_65,co2_65_a1)) + co2_67=np.concatenate((co2_67,co2_67_a1)) + co2_69=np.concatenate((co2_69,co2_69_a1)) + co2_71=np.concatenate((co2_71,co2_71_a1)) + co2_73=np.concatenate((co2_73,co2_73_a1)) + co2_94=np.concatenate((co2_94,co2_94_a1)) + co2_96=np.concatenate((co2_96,co2_96_a1)) + co2_98=np.concatenate((co2_98,co2_98_a1)) + co2_100=np.concatenate((co2_100,co2_100_a1)) + co2_102=np.concatenate((co2_102,co2_102_a1)) + co2_122=np.concatenate((co2_122,co2_122_a1)) + ncep_28=np.concatenate((ncep_28,ncep_28_a1)) + ncep_30=np.concatenate((ncep_30,ncep_30_a1)) + ncep_32=np.concatenate((ncep_32,ncep_32_a1)) + ncep_34=np.concatenate((ncep_34,ncep_34_a1)) + ncep_36=np.concatenate((ncep_36,ncep_36_a1)) + ncep_49=np.concatenate((ncep_49,ncep_49_a1)) + ncep_51=np.concatenate((ncep_51,ncep_51_a1)) + ncep_53=np.concatenate((ncep_53,ncep_53_a1)) + ncep_55=np.concatenate((ncep_55,ncep_55_a1)) + ncep_57=np.concatenate((ncep_57,ncep_57_a1)) + ncep_65=np.concatenate((ncep_65,ncep_65_a1)) + ncep_67=np.concatenate((ncep_67,ncep_67_a1)) + ncep_69=np.concatenate((ncep_69,ncep_69_a1)) + ncep_71=np.concatenate((ncep_71,ncep_71_a1)) + ncep_73=np.concatenate((ncep_73,ncep_73_a1)) + ncep_94=np.concatenate((ncep_94,ncep_94_a1)) + ncep_96=np.concatenate((ncep_96,ncep_96_a1)) + ncep_98=np.concatenate((ncep_98,ncep_98_a1)) + ncep_100=np.concatenate((ncep_100,ncep_100_a1)) + ncep_102=np.concatenate((ncep_102,ncep_102_a1)) + ncep_122=np.concatenate((ncep_122,ncep_122_a1)) + ncep_216=np.concatenate((ncep_216,ncep_216_a1)) + crtm_obs_28=np.concatenate((crtm_obs_28,crtm_obs_28_a1)) + crtm_obs_30=np.concatenate((crtm_obs_30,crtm_obs_30_a1)) + crtm_obs_32=np.concatenate((crtm_obs_32,crtm_obs_32_a1)) + crtm_obs_34=np.concatenate((crtm_obs_34,crtm_obs_34_a1)) + crtm_obs_36=np.concatenate((crtm_obs_36,crtm_obs_36_a1)) + crtm_obs_49=np.concatenate((crtm_obs_49,crtm_obs_49_a1)) + crtm_obs_51=np.concatenate((crtm_obs_51,crtm_obs_51_a1)) + crtm_obs_53=np.concatenate((crtm_obs_53,crtm_obs_53_a1)) + crtm_obs_55=np.concatenate((crtm_obs_55,crtm_obs_55_a1)) + crtm_obs_57=np.concatenate((crtm_obs_57,crtm_obs_57_a1)) + crtm_obs_65=np.concatenate((crtm_obs_65,crtm_obs_65_a1)) + crtm_obs_67=np.concatenate((crtm_obs_67,crtm_obs_67_a1)) + crtm_obs_69=np.concatenate((crtm_obs_69,crtm_obs_69_a1)) + crtm_obs_71=np.concatenate((crtm_obs_71,crtm_obs_71_a1)) + crtm_obs_73=np.concatenate((crtm_obs_73,crtm_obs_73_a1)) + crtm_obs_94=np.concatenate((crtm_obs_94,crtm_obs_94_a1)) + crtm_obs_96=np.concatenate((crtm_obs_96,crtm_obs_96_a1)) + crtm_obs_98=np.concatenate((crtm_obs_98,crtm_obs_98_a1)) + crtm_obs_100=np.concatenate((crtm_obs_100,crtm_obs_100_a1)) + crtm_obs_102=np.concatenate((crtm_obs_102,crtm_obs_102_a1)) + crtm_obs_122=np.concatenate((crtm_obs_122,crtm_obs_122_a1)) + crtm_obs_216=np.concatenate((crtm_obs_216,crtm_obs_216_a1)) + obs_28=np.concatenate((obs_28,obs_28_a1)) + obs_30=np.concatenate((obs_30,obs_30_a1)) + obs_32=np.concatenate((obs_32,obs_32_a1)) + obs_34=np.concatenate((obs_34,obs_34_a1)) + obs_36=np.concatenate((obs_36,obs_36_a1)) + obs_49=np.concatenate((obs_49,obs_49_a1)) + obs_51=np.concatenate((obs_51,obs_51_a1)) + obs_53=np.concatenate((obs_53,obs_53_a1)) + obs_55=np.concatenate((obs_55,obs_55_a1)) + obs_57=np.concatenate((obs_57,obs_57_a1)) + obs_65=np.concatenate((obs_65,obs_65_a1)) + obs_67=np.concatenate((obs_67,obs_67_a1)) + obs_69=np.concatenate((obs_69,obs_69_a1)) + obs_71=np.concatenate((obs_71,obs_71_a1)) + obs_73=np.concatenate((obs_73,obs_73_a1)) + obs_94=np.concatenate((obs_94,obs_94_a1)) + obs_96=np.concatenate((obs_96,obs_96_a1)) + obs_98=np.concatenate((obs_98,obs_98_a1)) + obs_100=np.concatenate((obs_100,obs_100_a1)) + obs_102=np.concatenate((obs_102,obs_102_a1)) + obs_122=np.concatenate((obs_122,obs_122_a1)) + obs_216=np.concatenate((obs_216,obs_216_a1)) + size=np.size(lat) + file=open(output1,"w+") + with open(output1,'wb') as f: + for a in range(0,size): + z=np.array([lat[a],lon[a],topo[a],forr[a],fov[a],lev[a],trop[a],ir[a],sum3[a],ctpc[a],ctpv[a],ctpn[a],cotc[a],cotv[a],cotn[a],co2_28[a],co2_30[a],co2_32[a],co2_34[a],co2_36[a],co2_49[a],co2_51[a],co2_53[a],co2_55[a],co2_57[a],co2_65[a],co2_67[a],co2_69[a],co2_71[a],co2_73[a],co2_94[a],co2_96[a],co2_98[a],co2_100[a],co2_102[a],co2_122[a],ncep_28[a],ncep_30[a],ncep_32[a],ncep_34[a],ncep_36[a],ncep_49[a],ncep_51[a],ncep_53[a],ncep_55[a],ncep_57[a],ncep_65[a],ncep_67[a],ncep_69[a],ncep_71[a],ncep_73[a],ncep_94[a],ncep_96[a],ncep_98[a],ncep_100[a],ncep_102[a],ncep_122[a],ncep_216[a],crtm_obs_28[a],crtm_obs_30[a],crtm_obs_32[a],crtm_obs_34[a],crtm_obs_36[a],crtm_obs_49[a],crtm_obs_51[a],crtm_obs_53[a],crtm_obs_55[a],crtm_obs_57[a],crtm_obs_65[a],crtm_obs_67[a],crtm_obs_69[a],crtm_obs_71[a],crtm_obs_73[a],crtm_obs_94[a],crtm_obs_96[a],crtm_obs_98[a],crtm_obs_100[a],crtm_obs_102[a],crtm_obs_122[a],crtm_obs_216[a],obs_28[a],obs_30[a],obs_32[a],obs_34[a],obs_36[a],obs_49[a],obs_51[a],obs_53[a],obs_55[a],obs_57[a],obs_65[a],obs_67[a],obs_69[a],obs_71[a],obs_73[a],obs_94[a],obs_96[a],obs_98[a],obs_100[a],obs_102[a],obs_122[a],obs_216[a]]) + np.savetxt(f,z,fmt='%1.7f',newline=" ") + np.savetxt(f,[-8888],fmt='%d',newline=" ") + f.close() + f=open(output1,"rt") + r=f.read() + r=r.replace("-8888","\n") + r=r.replace(" -","-") + r=r.replace("ift","888888") + r=r.replace("nan","-9999") + r=r.replace(" ",",") + r=r.replace(","+"\n","\n") + r=r.replace("\n"+",","\n") + r=r.replace("0-","0,-") + r=r.replace("1-","1,-") + r=r.replace("2-","2,-") + r=r.replace("3-","3,-") + r=r.replace("4-","4,-") + r=r.replace("5-","5,-") + r=r.replace("6-","6,-") + r=r.replace("7-","7,-") + r=r.replace("8-","8,-") + r=r.replace("9-","9,-") + f.close() + f=open(output1,"wt") + f.write(r) + f.close() + diff --git a/codes/dr_output_txt.py b/codes/dr_output_txt.py new file mode 100644 index 0000000000000000000000000000000000000000..1dcee82908011aabe3e4380e0f961ac6fe1ad527 --- /dev/null +++ b/codes/dr_output_txt.py @@ -0,0 +1,142 @@ +#Run before in terminal: module load license_intel intel hdf hdf5 netcdf4 miniconda + +### This code is to make a single txt file with all the pertinate dual regression information ### +### for use in comparing the different methods. ### + +import matplotlib.pyplot as plt +import numpy as np +import h5py +import sys +import cartopy +import cartopy.crs as ccrs +from numpy import loadtxt +from cartopy.mpl.gridliner import LONGITUDE_FORMATTER, LATITUDE_FORMATTER +from datetime import date +from shutil import copyfile +from glob import glob + +def dr_txt(st1,st2,sp1,dt1,dp1,dd1,mon1,yer1): + b1=int(st1) + b2=int(st2) + b3=int(sp1) + b4=int(dt1) + b5=int(dp1) + b6=int(dd1) + b7=int(mon1) + b8=int(yer1) + if b1>=0 and b1<=9: + c1="0"+str(b1) + else: + c1=str(b1) + if b2>=0 and b2<=9: + c2="0"+str(b2) + else: + c2=str(b2) + if b3>=0 and b3<=9: + c3="0"+str(b3) + else: + c3=str(b3) + if b4>=0 and b4<=9: + c4="0"+str(b4) + else: + c4=str(b4) + if b5>=0 and b5<=9: + c5="0"+str(b5) + else: + c5=str(b5) + if b6>=0 and b6<=9: + c6="0"+str(b6) + else: + c6=str(b6) + if b7>=0 and b7<=9: + c7="0"+str(b7) + else: + c7=str(b7) + c8=str(b8) + st=c1 + fst=c2 + sp=c3 + dt=c4 + dp=c5 + dd=c6 + mon=c7 + yer=c8 + output=('/apollo/jung/bandersen/txt_dr_output_'+yer+'_'+mon+'_'+dd+'/dr_'+yer+'_'+mon+'_'+dd+'_'+st+'_'+sp+'.txt') + files1=glob('/apollo/jung/bandersen/raw_dr_output_'+yer+'_'+mon+'_'+dd+'/CrIS_FSR_j01_d'+yer+mon+dt+'_t'+fst+'*.h5')[:] + files2=glob('/apollo/jung/bandersen/raw_dr_output_'+yer+'_'+mon+'_'+dd+'/CrIS_FSR_j01_d'+yer+mon+dd+'_t'+st+'*.h5')[:] + files3=glob('/apollo/jung/bandersen/raw_dr_output_'+yer+'_'+mon+'_'+dd+'/CrIS_FSR_j01_d'+yer+mon+dp+'_t'+sp+'*.h5')[:] + if np.size(files1)!=0 and np.size(files2)!=0 and np.size(files3)!=0: + files=np.concatenate((files1[-1],files2[:],files3[0]))[:] + elif np.size(files1)!=0 and np.size(files2)!=0 and np.size(files3)==0: + files=np.concatenate((files1[-1],files2[:]))[:] + elif np.size(files1)==0 and np.size(files2)!=0 and np.size(files3)!=0: + files=np.concatenate((files2[:],files3[0]))[:] + else: + files=files2[:] + sizer=np.size(files) + latt=[] + lonn=[] + cott=[] + ctpp=[] + cmss=[] + for i in range(0,sizer): + ff=files[i] + f1=h5py.File(ff,'r') + shape=np.size(f1['Cmask'][:]) + cmskf1=np.reshape(f1['Cmask'],(shape)) + cmsf1=cmskf1[np.where(cmskf1!=-9999)] + ctppf1=np.reshape(f1['CTP'][:],(shape)) + ctpf1=ctppf1[np.where(cmskf1!=-9999)] + cottf1=np.reshape(f1['COT'][:],(shape)) + cotf1=cottf1[np.where(cmskf1!=-9999)] + lattf1=np.reshape(f1['Latitude'][:],(shape)) + latf1=lattf1[np.where(cmskf1!=-9999)] + lonnf1=np.reshape(f1['Longitude'][:],(shape)) + lonf1=lonnf1[np.where(cmskf1!=-9999)] + print(np.shape(lonf1)) + latt=np.concatenate((latt,latf1)) + lonn=np.concatenate((lonn,lonf1)) + cott=np.concatenate((cott,cotf1)) + ctpp=np.concatenate((ctpp,ctpf1)) + cmss=np.concatenate((cmss,cmsf1)) + print(np.shape(lonn)) + print(ctpp) + print(np.shape(ctpp)) + size=np.size(latt) + lat=np.reshape(latt,(size)) + lon=np.reshape(lonn,(size)) + cot=np.reshape(cott,(size)) + ctp=np.reshape(ctpp,(size)) + cms=np.reshape(cmss,(size)) + print(ctp) + print(np.shape(ctp)) + file=open(output,"w+") + with open(output,'wb') as f: + for a in range(0,size): + z=np.array([lat[a],lon[a],cot[a],ctp[a],cms[a]]) + np.savetxt(f,z,fmt='%1.7f',newline=" ") + np.savetxt(f,[-8888],fmt='%d',newline=" ") + f.close() + f=open(output,"rt") + r=f.read() + r=r.replace("-8888","\n") + r=r.replace(" -","-") + r=r.replace("ift","888888") + r=r.replace("nan","-9999") + r=r.replace(" ",",") + r=r.replace(","+"\n","\n") + r=r.replace("\n"+",","\n") + r=r.replace("0-","0,-") + r=r.replace("1-","1,-") + r=r.replace("2-","2,-") + r=r.replace("3-","3,-") + r=r.replace("4-","4,-") + r=r.replace("5-","5,-") + r=r.replace("6-","6,-") + r=r.replace("7-","7,-") + r=r.replace("8-","8,-") + r=r.replace("9-","9,-") + f.close() + f=open(output,"wt") + f.write(r) + f.close() diff --git a/codes/dr_step_1_example.sh b/codes/dr_step_1_example.sh new file mode 100644 index 0000000000000000000000000000000000000000..633f0674365018f31e87572fa6b3007b118c15b2 --- /dev/null +++ b/codes/dr_step_1_example.sh @@ -0,0 +1,28 @@ +for f in /apollo/jung/bandersen/noaa_class_dr_2020_10_10 +do + newName=${f/GCRSO-*\_/GCRSO_} + mv -i "$f" "$newName" +done + +for filename in /apollo/jung/bandersen/noaa_class_dr_2020_10_10/*.h5; do + [ -f "$filename" ] || continue + cp "$filename" "${filename//GCRSO_/}" +done + +for file in /apollo/jung/bandersen/noaa_class_dr_2020_10_10/_j01_*.h5 + do + mv "$file" "SCRIF$file" + done + +mkdir /apollo/jung/bandersen/raw_dr_output_2020_10_10 +cd /apollo/jung/bandersen/raw_dr_output_2020_10_10 + +export HS_RET_DIR=/apollo/jung/bandersen/CSPP_UW_HSRTV_2_0 +source $HS_RET_DIR/env/uw_hs_l2.bash_env +run_HSRTV.scr 3 /apollo/jung/bandersen/noaa_class_dr_2020_10_10 + + +for f in /apollo/jung/bandersen/full_dr_output_2020_10_10/CrIS_FSR_j01_*19.atm_prof_rtv.h5 +do + mv -r "${f}" "${f/19./.}" +done diff --git a/codes/dr_step_2_example.sbatch b/codes/dr_step_2_example.sbatch new file mode 100644 index 0000000000000000000000000000000000000000..2e77932825148041499b18c6f8172ab791c900b5 --- /dev/null +++ b/codes/dr_step_2_example.sbatch @@ -0,0 +1,28 @@ +#!/bin/sh +#SBATCH --job-name=ncep__dr_cd_fov +#SBATCH --partition=all +#SBATCH --mem-per-cpu=6000 +#SBATCH --ntasks=1 +#SBATCH --time=03:30:00 +#SBATCH --output=/home/bandersen/iris-home/%j.out +# +#DONT FORGET +#the directory for the batch output (above) has to exist or the job won't run +cd /home/bandersen/iris-home +module load license_intel intel hdf hdf5 netcdf4 miniconda +#sh codes/dr_1_copy_class_data.sh + +export HS_RET_DIR=/apollo/jung/bandersen/CSPP_UW_HSRTV_2_0 +source $HS_RET_DIR/env/uw_hs_l2.bash_env +run_HSRTV.scr 3 /home/bandersen/iris-home/temp_dr_directory + +python codes/dr_3_output_to_txt.py + +#srun executable if it was set up for parallel processing +#otherwise just running the python like at the command line +#will have the resources of the batch job you requested +#at the top of the script + + + + diff --git a/codes/ecmwf_cd_2_algorithm.sh b/codes/ecmwf_cd_2_algorithm.sh new file mode 100755 index 0000000000000000000000000000000000000000..febb9d3294b9b5939e255887e404088af44ef122 --- /dev/null +++ b/codes/ecmwf_cd_2_algorithm.sh @@ -0,0 +1,25 @@ +cd /apollo/jung/bandersen/CloudDetection/src +rm -f *.o *.mod ../Cloud_and_Aerosol_Detect +make +cd /home/bandersen/iris-home +mkdir ecmwf_workspace +cd ecmwf_workspace +rm -f cloud_and_aerosol_detection_input.dat +##### Change to the date of interest +ln -s /home/bandersen/iris-home/data/ecmwf_cd_input_20200821_n20_0700-0800.txt cloud_and_aerosol_detection_input.dat +rm -f reference_output.dat +ln -s /home/bandersen/iris-home/data/ecmwf_cd.output reference_output.dat +ln -s /apollo/jung/bandersen/CloudDetection/namelist/CRIS_AERDET.NL . +ln -s /apollo/jung/bandersen/CloudDetection/namelist/CRIS_CLDDET.NL . +/apollo/jung/bandersen/CloudDetection/Cloud_and_Aerosol_Detect +rm -f cloud_and_aerosol_detection_input.dat +rm -f CRIS_AERDET.NL +rm -f CRIS_CLDDET.NL +rm -f reference_output.dat +rm -f result.txt +##### Change to the date of interest +mv cloud_and_aerosol_detection_output.dat /home/bandersen/iris-home/data/ecmwf_cd_output_20200821_0700_0800_n20.txt.newest +cd /home/bandersen/iris-home +rm -d ecmwf_workspace +exit + diff --git a/codes/ecmwf_cd_funcs.py b/codes/ecmwf_cd_funcs.py new file mode 100644 index 0000000000000000000000000000000000000000..df83cd17f88ee78d0ae8eda17d35e48fba25433e --- /dev/null +++ b/codes/ecmwf_cd_funcs.py @@ -0,0 +1,238 @@ +#Run before in terminal: module load license_intel intel hdf hdf5 netcdf4 miniconda + +### This code it is to take netcdf files with given cloud info and transform it into a formate which ### +### can be used in the ECMWF Cloud Detect Software using McNally & Watts work. ### + +import matplotlib +matplotlib.use("AGG") +import matplotlib.pyplot as plt +import numpy as np +#import h5py as h +import os +import sys +import cartopy +import cartopy.crs as ccrs +import matplotlib.colors as colors +import matplotlib.patches as patches +import matplotlib.ticker as mticker +from numpy import loadtxt +from cartopy.mpl.gridliner import LONGITUDE_FORMATTER, LATITUDE_FORMATTER +from datetime import date +from shutil import copyfile +import shutil +import netCDF4 as cdf +import sys +sys.path.insert(1,'/home/bandersen/iris-home/full_co2_slicing_2021_04/cs') +import functions_co2_slicing_h_diff as cs_func +today=date.today() + +#so for 2021-04-10 0000-0030 you would put ecmwf_full(00,00,00,30,10,10) +def ecmwf_full(st1,sp1,dt1,dp1,mon1,yer1): + f1=cdf.Dataset("/apollo/jung/snebuda/brianne/2021/cris.431.n20.20210410_000000.20210410_003000.bt.nc") + chan=f1['channum'][:] + wave=[] + for i in range(0,431): + z=chan[i] + if z<=713: + a=650+(.625*(z-1)) + wave.append(a) + elif z>=714 and z<=1578: + a=1210+(.625*(z-714)) + wave.append(a) + elif z>=1579: + a=2155+(.625*(z-1579)) + wave.append(a) + else: + pass + chan_size=np.size(chan) + b1=int(st1) + b2=int(sp1) + b3=int(dt1) + b4=int(dp1) + b5=int(mon1) + b6=int(yer1) + if b1>=0 and b1<=9: + c1="0"+str(b1) + else: + c1=str(b1) + if b2>=0 and b2<=9: + c2="0"+str(b2) + else: + c2=str(b2) + if b3>=0 and b3<=9: + c3="0"+str(b3) + else: + c3=str(b3) + if b4>=0 and b4<=9: + c4="0"+str(b4) + else: + c4=str(b4) + if b5>=0 and b5<=9: + c5="0"+str(b5) + else: + c5=str(b5) + c6=str(b6) + st=c1 + sp=c2 + dt=c3 + dp=c4 + mon=c5 + yer=c6 + fa1=cdf.Dataset("/apollo/jung/snebuda/brianne/2021/cris.431.n20."+yer+mon+dt+"_"+st+"0000."+yer+mon+dt+"_"+st+"3000.bt.nc") + fa2=cdf.Dataset("/apollo/jung/snebuda/brianne/2021/cris.431.n20."+yer+mon+dt+"_"+st+"0000."+yer+mon+dt+"_"+st+"3000.wf.nc") + fa3=cdf.Dataset("/apollo/jung/snebuda/brianne/2021/cris.431.n20."+yer+mon+dt+"_"+st+"0000."+yer+mon+dt+"_"+st+"3000.state.nc") + fb1=cdf.Dataset("/apollo/jung/snebuda/brianne/2021/cris.431.n20."+yer+mon+dt+"_"+st+"3000."+yer+mon+dp+"_"+sp+"0000.bt.nc") + fb2=cdf.Dataset("/apollo/jung/snebuda/brianne/2021/cris.431.n20."+yer+mon+dt+"_"+st+"3000."+yer+mon+dp+"_"+sp+"0000.wf.nc") + fb3=cdf.Dataset("/apollo/jung/snebuda/brianne/2021/cris.431.n20."+yer+mon+dt+"_"+st+"3000."+yer+mon+dp+"_"+sp+"0000.state.nc") + day=np.concatenate((fa1['date'][1:],fb1['date'][1:]),axis=0) + lat=np.concatenate((fa1['lat'][1:],fb1['lat'][1:]),axis=0) + lon=np.concatenate((fa1['lon'][1:],fb1['lon'][1:]),axis=0) + pres=np.concatenate((fa3['pmid'][1:],fb3['pmid'][1:]),axis=0) + tb_clear_a=np.add(fa1['tb_clear'][1:],fa1['bias_gfs'][:]) + tb_clear_b=np.add(fb1['tb_clear'][1:],fb1['bias_gfs'][:]) + tb_clear=np.concatenate((tb_clear_a,tb_clear_b),axis=0) + tb_obs=np.concatenate((fa1['tb_obs'][1:],fb1['tb_obs'][1:]),axis=0) + temp=np.concatenate((fa3['temp'][1:],fb3['temp'][1:]),axis=0) + wf=np.concatenate((fa2['wf'][1:],fb2['wf'][1:]),axis=0) + fov_size=np.size(lat) + chan_size=np.size(chan) + outfile=("/apollo/jung/bandersen/ecmwf_data_input_"+yer+"_"+mon+"_"+dt+"/ecmwf_cd_input_"+yer+mon+dt+"_n20_"+st+"00-"+sp+"00.txt") + heights=[] + for ii in range(0,fov_size): + for i in range(0,chan_size): + heights.append(pres[ii][np.where(wf[ii][i]==np.max(wf[ii][i]))[0]][0]) + heights=np.reshape(heights,(fov_size,chan_size)) + with open(outfile,'wb') as f: + np.savetxt(f,[27],fmt='%d',newline=" ") + np.savetxt(f,[-8888],fmt='%d',newline=" ") + np.savetxt(f,[int(chan_size)],fmt='%d',newline=" ") + np.savetxt(f,[-8888],fmt='%d',newline=" ") + np.savetxt(f,chan,fmt='%d',newline=" ") + np.savetxt(f,[-8888],fmt='%d',newline=" ") + np.savetxt(f,[int(fov_size)],fmt='%d',newline=" ") + for i in range(0,fov_size): + a=np.array([lon[i],lat[i]]) + b=np.array([pres[cs_func.trop(i,pres,temp,day,lat)],pres[cs_func.pbl(i,pres,temp)]]) + c=tb_obs[i][:] + d=tb_clear[i][:] + e=heights[i][:] + np.savetxt(f,[-8888],fmt='%d',newline=" ") + np.savetxt(f,a,fmt='%1.5f',newline=" ") + np.savetxt(f,[-8888],fmt='%d',newline=" ") + np.savetxt(f,b,fmt='%d',newline=" ") + np.savetxt(f,[-8888],fmt='%d',newline=" ") + np.savetxt(f,c,fmt='%1.5f',newline=" ") + np.savetxt(f,[-8888],fmt='%d',newline=" ") + np.savetxt(f,d,fmt='%1.5f',newline=" ") + np.savetxt(f,[-8888],fmt='%d',newline=" ") + np.savetxt(f,e,fmt='%1.5f',newline=" ") + f.close() + f=open(outfile,"rt") + r=f.read() + r=r.replace("-8888","\n") + f.close() + f=open(outfile,"wt") + f.write(r) + f.close() + return("done") + +def file_name(st1,sp1,dt1,mon1,yer1): + b1=int(st1) + b2=int(sp1) + b3=int(dt1) + b4=int(mon1) + b5=int(yer1) + if b1>=0 and b1<=9: + c1="0"+str(b1) + else: + c1=str(b1) + if b2>=0 and b2<=9: + c2="0"+str(b2) + else: + c2=str(b2) + if b3>=0 and b3<=9: + c3="0"+str(b3) + else: + c3=str(b3) + if b4>=0 and b4<=9: + c4="0"+str(b4) + else: + c4=str(b4) + c5=str(b5) + st=c1 + sp=c2 + dt=c3 + mon=c4 + yer=c5 + filer=("/home/bandersen/iris-home/all_algorithms/"+yer+"_"+mon+"_"+dt+"_ecmwf/"+st+"_"+sp+".sh") + fuller=(filer) + return(fuller) + +def last(st1,sp1,dt1,mon1,yer1): + b1=int(st1) + b2=int(sp1) + b3=int(dt1) + b4=int(mon1) + b5=int(yer1) + if b1>=0 and b1<=9: + c1="0"+str(b1) + else: + c1=str(b1) + if b2>=0 and b2<=9: + c2="0"+str(b2) + else: + c2=str(b2) + if b3>=0 and b3<=9: + c3="0"+str(b3) + else: + c3=str(b3) + if b4>=0 and b4<=9: + c4="0"+str(b4) + else: + c4=str(b4) + c5=str(b5) + st=c1 + sp=c2 + dt=c3 + mon=c4 + yer=c5 + original_1=('/apollo/jung/bandersen/ecmwf_data_output_raw_'+yer+'_'+mon+'_'+dt+'/ecmwf_cd_output_'+yer+mon+dt+'_'+st+'00_'+sp+'00_n20.txt.newest') + file2=('/apollo/jung/bandersen/ecmwf_data_output_txt_'+yer+'_'+mon+'_'+dt+'/ecmwf_cd_'+yer+mon+dt+'_'+st+'_'+sp+'_n20.txt') + filenames=[original_1] + with open(file2,'w') as outfile: + for fname in filenames: + with open(fname) as infile: + for line in infile: + outfile.write(line) + f=open(file2,"rt") + r=f.read() + r=r.replace("-----","-8888") + r=r.replace("\n"," ") + r=r.replace("Longitude Latitude ObNumber"," ") + r=r.replace("Cloud flags"," ") + r=r.replace("Aerosol flags"," ") + r=r.replace(" "," ") + r=r.replace(" "," ") + r=r.replace(" "," ") + r=r.replace(" "," ") + r=r.replace(" "," ") + r=r.replace(" "," ") + r=r.replace(" ",",") + r=r.replace(",-8888,","\n") + r=r.replace("-8888,","") + r=r.replace(","+"\n","\n") + f.close() + f=open(file2,"wt") + f.write(r) + f.close() + f=open(file2,"a") + f.write("-7777") + f.close() + f=open(file2,"rt") + r=f.read() + r=r.replace(",-7777"," ") + f.close() + f=open(file2,"wt") + f.write(r) + f.close() + return("thi") diff --git a/codes/ecmwf_example.py b/codes/ecmwf_example.py new file mode 100644 index 0000000000000000000000000000000000000000..e5c25661db79045941c35da4b0761cd5a9748d89 --- /dev/null +++ b/codes/ecmwf_example.py @@ -0,0 +1,26 @@ +#Run before in terminal: module load license_intel intel hdf hdf5 netcdf4 miniconda + +### This code runs the full CO2 slicing technique then outputs a txt file with the information. ### +### It also provides the colocated VIIRS data in the output file. ### + +from datetime import datetime +start_time=datetime.now() +import matplotlib +matplotlib.use("AGG") +import sys +sys.path.insert(1,'/home/bandersen/iris-home/all_algorithms/functions') +import ecmwf_cd_funcs as func +import subprocess +#so for 2021-04-11 0000-0030 you would put ecmwf_full(00,00,00,30,11,11) +a=0 +b=1 +c=30 +d=30 +e=7 +f=2021 +func.ecmwf_full(a,b,c,d,e,f) +end_time=datetime.now() + +print("done") +end_time=datetime.now() +print('Duration: {}'.format(end_time-start_time)) diff --git a/codes/example_co2_code.py b/codes/example_co2_code.py new file mode 100644 index 0000000000000000000000000000000000000000..0e5d4de3981b78663c06e370995018ff53103f53 --- /dev/null +++ b/codes/example_co2_code.py @@ -0,0 +1,30 @@ +#Run before in terminal: module load license_intel intel hdf hdf5 netcdf4 miniconda + +### This code runs the full CO2 slicing technique then outputs a txt file with the information. ### +### It also provides the colocated VIIRS data in the output file. ### + +from datetime import datetime +start_time=datetime.now() +import matplotlib +matplotlib.use("AGG") +import sys +sys.path.insert(1,'/home/bandersen/iris-home/all_algorithms/functions') +import comp_func as comp_func +import functions_co2_slicing_h_diff as cs_func +#so for 2021-04-11 0000-0030 you would put ecmwf_full(00,00,00,30,11,11) +a=0 +b=1 +c=10 +d=10 +e=10 +f=2020 + +cs_func.full_thing(a,0,a,30,c,c,e,f,0.5) +cs_func.full_thing(a,30,b,0,c,d,e,f,0.5) +comp_func.full_comps_parts(a,b,c,d,e,f) + +print("done") +end_time=datetime.now() +print('Duration: {}'.format(end_time-start_time)) + + diff --git a/codes/example_sbatch.sbatch b/codes/example_sbatch.sbatch new file mode 100644 index 0000000000000000000000000000000000000000..43a1d5dee3dc142f6d0c4d93fb5b62dd7cd867f6 --- /dev/null +++ b/codes/example_sbatch.sbatch @@ -0,0 +1,21 @@ +#!/bin/sh +#SBATCH --job-name=ncep_dr_cd_fov +#SBATCH --partition=all +#SBATCH --mem-per-cpu=60000 +#SBATCH --ntasks=1 +#SBATCH --time=05:00:00 +#SBATCH --output=/home/bandersen/iris-home/%j.out +# +#DONT FORGET +#the directory for the batch output (above) has to exist or the job won't run +cd /home/bandersen/iris-home +module load license_intel intel hdf hdf5 netcdf4 miniconda + +python all_algorithms/2020_10_10_co2/09_10.py + +#srun executable if it was set up for parallel processing +#otherwise just running the python like at the command line +#will have the resources of the batch job you requested +#at the top of the script + + diff --git a/codes/functions_co2_slicing_h_diff.py b/codes/functions_co2_slicing_h_diff.py new file mode 100644 index 0000000000000000000000000000000000000000..2cf8e677dbed87a5d054dbc5dc5f5dc64e78b935 --- /dev/null +++ b/codes/functions_co2_slicing_h_diff.py @@ -0,0 +1,3075 @@ +#Run before in terminal: module load license_intel intel hdf hdf5 netcdf4 miniconda + +### This code runs the full CO2 slicing technique then outputs a txt file with the information. ### +### It also provides the colocated VIIRS data in the output file. ### + +import matplotlib +matplotlib.use("AGG") +import matplotlib.pyplot as plt +import numpy as np +import sys +import cartopy +import cartopy.crs as ccrs +import matplotlib.colors as colors +import matplotlib.patches as patches +import matplotlib.ticker as mticker +from numpy import loadtxt +from cartopy.mpl.gridliner import LONGITUDE_FORMATTER, LATITUDE_FORMATTER +from datetime import date +from shutil import copyfile +from scipy import stats +import netCDF4 as cdf + +def find_nearest(array,value): + array=np.asarray(array) + idx=(np.abs(array-value)).argmin() + return array[idx] + +def find_nearest_index(array,value): + array=np.asarray(array) + idx=(np.abs(array-value)).argmin() + return(idx) + +def pbl(num,pr,te): + p=pr[num] + t=te[num] + a=p[np.where(np.diff(t)>=-0.5)[0]+1] + try: + b=int(np.max(a[np.where(a>=850)])) + c=find_nearest_index(p,b) + return(c) + except ValueError: + return(find_nearest_index(p,850)) + +def trop(num,pr,te,da,la): + p=pr[num][:] + t=te[num][:] + d=[int(i) for i in str(da[num])] + if (d[4]==1 and d[5]==1 and d[6]>=1) or (d[4]==1 and d[5]==2) or (d[4]==0 and d[5]==1) or (d[4]==0 and d[5]==2) or (d[4]==0 and d[5]==3 and d[6]<=1): + e=1 #NH Winter as Mid November to Mid March + elif (d[4]==0 and d[5]==5 and d[6]>=1) or (d[4]==0 and d[5]==6) or (d[4]==0 and d[5]==7) or (d[4]==0 and d[5]==8) or (d[4]==0 and d[5]==9 and d[6]<=1): + e=2 #NH Summer as Mid May to Mid September + else: + e=3 #Spring and Fall Mid March to Mid May and Mid September to Mid November + l=la[num] + if l>=60 and e==1: + a=p[np.where(np.diff(t)>=-1)[0]+1] + b=(np.max(a[np.where(a<=325)])) + c=find_nearest_index(p,b) + elif l<=-60 and e==1: + a=p[np.where(np.diff(t)>=-1)[0]+1] + b=(np.max(a[np.where(a<=350)])) + c=find_nearest_index(p,b) + elif l<=-60 and e==2: + a=p[np.where(np.diff(t)>=-1)[0]+1] + b=(np.max(a[np.where(a<=375)])) + c=find_nearest_index(p,b) + elif l>=60 and e==2: + a=p[np.where(np.diff(t)>=-1)[0]+1] + b=(np.max(a[np.where(a<=325)])) + c=find_nearest_index(p,b) + elif l>=60 and e==3: + a=p[np.where(np.diff(t)>=-1)[0]+1] + b=(np.max(a[np.where(a<=375)])) + c=find_nearest_index(p,b) + elif l<=-60 and e==3: + a=p[np.where(np.diff(t)>=-1)[0]+1] + b=(np.max(a[np.where(a<=325)])) + c=find_nearest_index(p,b) + else: + a=p[np.where(np.diff(t)>=-1)[0]+1] + b=(np.max(a[np.where(a<=250)])) + c=find_nearest_index(p,b) + return(c) + +def full_thing(st1,st2,sp1,sp2,dt1,dt2,mon1,ye1,hs): + h1=hs + def h2p(height): + if height<=44307: + return(round((1013.25)*((1-((2.25694436*(10**(-5)))*(height)))**(5.2553026)),1)) + else: + return(0) + f1=cdf.Dataset("/apollo/jung/snebuda/brianne/2021/cris.431.n20.20210410_000000.20210410_003000.bt.nc") + chan=f1['channum'][:] + wave=[] + for i in range(0,431): + z=chan[i] + if z<=713: + a=650+(.625*(z-1)) + wave.append(a) + elif z>=714 and z<=1578: + a=1210+(.625*(z-714)) + wave.append(a) + elif z>=1579: + a=2155+(.625*(z-1579)) + wave.append(a) + else: + pass + + def planck_wn(wn,bt): + c_1=1.191042*(10**-5) + c_2=1.4387752 + a=np.exp(c_2*wn/bt) + b=wn**3 + c=c_1*b/(a-1) + return(c) + + def find_nearest(array,value): + array=np.asarray(array) + idx=(np.abs(array-value)).argmin() + return array[idx] + + def find_nearest_index(array,value): + array=np.asarray(array) + idx=(np.abs(array-value)).argmin() + return(idx) + + def integrate_one(a,wave1,ob,cr,bi): + d=wave[wave1] + bbb=bi[wave1] + b1=ob[a,wave1] + c1=cr[a,wave1]+bbb + b2=planck_wn(d,b1) + c2=planck_wn(d,c1) + e=c2-b2 + return(e) + + def integrate_two(a,wave1,l1,l2,ta,te): + e=wave[wave1] + b1=ta[a,wave1,l1] + c1=te[a,l1] + d1=planck_wn(e,c1) + b2=ta[a,wave1,l2] + c2=te[a,l2] + d2=planck_wn(e,c2) + g=b2*d2-b1*d1 + return(g) + + def integrate_five(a,wave1,wave2,ob,cr,ta,te,pr,da,la,bi): #where wave1 is small + pc=trop(a,pr,te,da,la)-1 + ps=pbl(a,pr,te)+1 + arrayc1=[] + arrayc2=[] + b1=integrate_one(a,wave1,ob,cr,bi) + b2=integrate_one(a,wave2,ob,cr,bi) + b=b1/b2 +# for i in range(pc,ps,1): + for i in range(pc,ps,-1): + c1=integrate_two(a,wave1,i,i-1,ta,te) + c2=integrate_two(a,wave2,i,i-1,ta,te) + arrayc1.append(c1) + arrayc2.append(c2) + sum1=np.cumsum(arrayc1[::-1]) + sum2=np.cumsum(arrayc2[::-1]) + size=np.size(sum1) + c1=sum1[::-1] + c2=sum2[::-1] + results=[] + for ii in range(0,size): + c=(c1[ii]/c2[ii])-b + results.append(c) + return(results) + + def integrate_six(a,pr,te,da,la): + pc=trop(a,pr,te,da,la)+1 + ps=pbl(a,pr,te)-1 + array=[] + for i in range(pc,ps,-1): + c=pr[a,i] + array.append(c) + b=array[::-1] + d=b[::-1] + return(d) + + def co2(a,num,cr,ob,bi): + b=cr[a,num] + c=ob[a,num] + d=bi[num] + e=b-c+d + return(e) + + def trim_ave(a): + b=np.mean(a) + c=np.std(a) + d=abs(a-b) + e=np.where(d<c)[0][:] + g=np.size(e) + h=[] + for i in range(0,g): + j=e[i] + k=a[j] + h.append(k) + l=np.mean(h) + return(l) + + def optics(a,ob,cr,te,bi,pr,pres): + b=find_nearest_index(wave,960) + c=find_nearest_index(pr[a],pres) + d=ob[a,b] + e=cr[a,b] + g=te[a,c] + h=bi[b] + j=(d-e-h)/(g-e-h) + return(j) + + def optics_1(a,ob,cr,te,bi): + b=find_nearest_index(wave,960) + c=ob[a,b] + d=cr[a,b] + e=te[a,0] + g=bi[b] + h=(c-d-g)/(e-d-g) + return(h) + + def ir_test_ctp(a,ob,te,pr): + b=find_nearest_index(wave,960) + c=ob[a,b] + d=te[a][:] + e=find_nearest_index(d,c) + g=te[a][e] + h=np.abs(c-g) + if h<=0.5: + i=pr[a][e] + else: + i=-7777 + return(i) + + def level(a,cr,ob,bi,te): + hh=h1 + b1=co2(a,28,cr,ob,bi) #689.375 + b2=co2(a,30,cr,ob,bi) #690.625 + b3=co2(a,32,cr,ob,bi) #691.875 + b4=co2(a,34,cr,ob,bi) #693.125 + b5=co2(a,36,cr,ob,bi) #694.375 + if b1>=hh and b2>=hh and b3>=hh and b4>=hh and b5>=hh: + g=1 + elif b1>=hh and b2>=hh and b3>=hh and b4>=hh and b5<hh: + g=2 + elif b1>=hh and b2>=hh and b3>=hh and b4<hh and b5>=hh: + g=3 + elif b1>=hh and b2>=hh and b3<hh and b4>=hh and b5>=hh: + g=4 + elif b1>=hh and b2<hh and b3>=hh and b4>=hh and b5>=hh: + g=5 + elif b1<hh and b2>=hh and b3>=hh and b4>=hh and b5>=hh: + g=6 + elif b1>=hh and b2>=hh and b3>=hh and b4<hh and b5<hh: + g=7 + elif b1>=hh and b2>=hh and b3<hh and b4>=hh and b5<hh: + g=8 + elif b1>=hh and b2<hh and b3>=hh and b4>=hh and b5<hh: + g=9 + elif b1<hh and b2>=hh and b3>=hh and b4>=hh and b5<hh: + g=10 + elif b1>=hh and b2>=hh and b3<hh and b4<hh and b5>=hh: + g=11 + elif b1>=hh and b2<hh and b3>=hh and b4<hh and b5>=hh: + g=12 + elif b1<hh and b2>=hh and b3>=hh and b4<hh and b5>=hh: + g=13 + elif b1>=hh and b2<hh and b3<hh and b4>=hh and b5>=hh: + g=14 + elif b1<hh and b2>=hh and b3<hh and b4>=hh and b5>=hh: + g=15 + elif b1<hh and b2<hh and b3>=hh and b4>=hh and b5>=hh: + g=16 + elif b1>=hh and b2>=hh and b3<hh and b4<hh and b5<hh: + g=17 + elif b1>=hh and b2<hh and b3>=hh and b4<hh and b5<hh: + g=18 + elif b1>=hh and b2<hh and b3<hh and b4>=hh and b5<hh: + g=19 + elif b1>=hh and b2<hh and b3<hh and b4<hh and b5>=hh: + g=20 + elif b1<hh and b2>=hh and b3>=hh and b4<hh and b5<hh: + g=21 + elif b1<hh and b2>=hh and b3<hh and b4>=hh and b5<hh: + g=22 + elif b1<hh and b2>=hh and b3<hh and b4<hh and b5>=hh: + g=23 + elif b1<hh and b2<hh and b3>=hh and b4>=hh and b5<hh: + g=24 + elif b1<hh and b2<hh and b3>=hh and b4<hh and b5>=hh: + g=25 + elif b1<hh and b2<hh and b3<hh and b4>=hh and b5>=hh: + g=26 + elif b1>=hh and b2<hh and b3<hh and b4<hh and b5<hh: + g=27 + elif b1<hh and b2>=hh and b3<hh and b4<hh and b5<hh: + g=28 + elif b1<hh and b2<hh and b3>=hh and b4<hh and b5<hh: + g=29 + elif b1<hh and b2<hh and b3<hh and b4>=hh and b5<hh: + g=30 + elif b1<hh and b2<hh and b3<hh and b4<hh and b5>=hh: + g=31 + else: + c1=co2(a,49,cr,ob,bi) #702.5 + c2=co2(a,51,cr,ob,bi) #703.75 + c3=co2(a,53,cr,ob,bi) #705 + c4=co2(a,55,cr,ob,bi) #706.25 + c5=co2(a,57,cr,ob,bi) #707.5 + if c1>=hh and c2>=hh and c3>=hh and c4>=hh and c5>=hh: + g=32 + elif c1>=hh and c2>=hh and c3>=hh and c4>=hh and c5<hh: + g=33 + elif c1>=hh and c2>=hh and c3>=hh and c4<hh and c5>=hh: + g=34 + elif c1>=hh and c2>=hh and c3<hh and c4>=hh and c5>=hh: + g=35 + elif c1>=hh and c2<hh and c3>=hh and c4>=hh and c5>=hh: + g=36 + elif c1<hh and c2>=hh and c3>=hh and c4>=hh and c5>=hh: + g=37 + elif c1>=hh and c2>=hh and c3>=hh and c4<hh and c5<hh: + g=38 + elif c1>=hh and c2>=hh and c3<hh and c4>=hh and c5<hh: + g=39 + elif c1>=hh and c2<hh and c3>=hh and c4>=hh and c5<hh: + g=40 + elif c1<hh and c2>=hh and c3>=hh and c4>=hh and c5<hh: + g=41 + elif c1>=hh and c2>=hh and c3<hh and c4<hh and c5>=hh: + g=42 + elif c1>=hh and c2<hh and c3>=hh and c4<hh and c5>=hh: + g=43 + elif c1<hh and c2>=hh and c3>=hh and c4<hh and c5>=hh: + g=44 + elif c1>=hh and c2<hh and c3<hh and c4>=hh and c5>=hh: + g=45 + elif c1<hh and c2>=hh and c3<hh and c4>=hh and c5>=hh: + g=46 + elif c1<hh and c2<hh and c3>=hh and c4>=hh and c5>=hh: + g=47 + elif c1>=hh and c2>=hh and c3<hh and c4<hh and c5<hh: + g=48 + elif c1>=hh and c2<hh and c3>=hh and c4<hh and c5<hh: + g=49 + elif c1>=hh and c2<hh and c3<hh and c4>=hh and c5<hh: + g=50 + elif c1>=hh and c2<hh and c3<hh and c4<hh and c5>=hh: + g=51 + elif c1<hh and c2>=hh and c3>=hh and c4<hh and c5<hh: + g=52 + elif c1<hh and c2>=hh and c3<hh and c4>=hh and c5<hh: + g=53 + elif c1<hh and c2>=hh and c3<hh and c4<hh and c5>=hh: + g=54 + elif c1<hh and c2<hh and c3>=hh and c4>=hh and c5<hh: + g=55 + elif c1<hh and c2<hh and c3>=hh and c4<hh and c5>=hh: + g=56 + elif c1<hh and c2<hh and c3<hh and c4>=hh and c5>=hh: + g=57 + elif c1>=hh and c2<hh and c3<hh and c4<hh and c5<hh: + g=58 + elif c1<hh and c2>=hh and c3<hh and c4<hh and c5<hh: + g=59 + elif c1<hh and c2<hh and c3>=hh and c4<hh and c5<hh: + g=60 + elif c1<hh and c2<hh and c3<hh and c4>=hh and c5<hh: + g=61 + elif c1<hh and c2<hh and c3<hh and c4<hh and c5>=hh: + g=62 + else: + d1=co2(a,65,cr,ob,bi) #712.5 + d2=co2(a,67,cr,ob,bi) #713.75 + d3=co2(a,69,cr,ob,bi) #715 + d4=co2(a,71,cr,ob,bi) #716.25 + d5=co2(a,73,cr,ob,bi) #717.5 + if d1>=hh and d2>=hh and d3>=hh and d4>=hh and d5>=hh: + g=63 + elif d1>=hh and d2>=hh and d3>=hh and d4>=hh and d5<hh: + g=64 + elif d1>=hh and d2>=hh and d3>=hh and d4<hh and d5>=hh: + g=65 + elif d1>=hh and d2>=hh and d3<hh and d4>=hh and d5>=hh: + g=66 + elif d1>=hh and d2<hh and d3>=hh and d4>=hh and d5>=hh: + g=67 + elif d1<hh and d2>=hh and d3>=hh and d4>=hh and d5>=hh: + g=68 + elif d1>=hh and d2>=hh and d3>=hh and d4<hh and d5<hh: + g=69 + elif d1>=hh and d2>=hh and d3<hh and d4>=hh and d5<hh: + g=70 + elif d1>=hh and d2<hh and d3>=hh and d4>=hh and d5<hh: + g=71 + elif d1<hh and d2>=hh and d3>=hh and d4>=hh and d5<hh: + g=72 + elif d1>=hh and d2>=hh and d3<hh and d4<hh and d5>=hh: + g=73 + elif d1>=hh and d2<hh and d3>=hh and d4<hh and d5>=hh: + g=74 + elif d1<hh and d2>=hh and d3>=hh and d4<hh and d5>=hh: + g=75 + elif d1>=hh and d2<hh and d3<hh and d4>=hh and d5>=hh: + g=76 + elif d1<hh and d2>=hh and d3<hh and d4>=hh and d5>=hh: + g=77 + elif d1<hh and d2<hh and d3>=hh and d4>=hh and d5>=hh: + g=78 + elif d1>=hh and d2>=hh and d3<hh and d4<hh and d5<hh: + g=79 + elif d1>=hh and d2<hh and d3>=hh and d4<hh and d5<hh: + g=80 + elif d1>=hh and d2<hh and d3<hh and d4>=hh and d5<hh: + g=81 + elif d1>=hh and d2<hh and d3<hh and d4<hh and d5>=hh: + g=82 + elif d1<hh and d2>=hh and d3>=hh and d4<hh and d5<hh: + g=83 + elif d1<hh and d2>=hh and d3<hh and d4>=hh and d5<hh: + g=84 + elif d1<hh and d2>=hh and d3<hh and d4<hh and d5>=hh: + g=85 + elif d1<hh and d2<hh and d3>=hh and d4>=hh and d5<hh: + g=86 + elif d1<hh and d2<hh and d3>=hh and d4<hh and d5>=hh: + g=87 + elif d1<hh and d2<hh and d3<hh and d4>=hh and d5>=hh: + g=88 + elif d1>=hh and d2<hh and d3<hh and d4<hh and d5<hh: + g=89 + elif d1<hh and d2>=hh and d3<hh and d4<hh and d5<hh: + g=90 + elif d1<hh and d2<hh and d3>=hh and d4<hh and d5<hh: + g=91 + elif d1<hh and d2<hh and d3<hh and d4>=hh and d5<hh: + g=92 + elif d1<hh and d2<hh and d3<hh and d4<hh and d5>=hh: + g=93 + else: + e1=co2(a,94,cr,ob,bi) #730.625 + e2=co2(a,96,cr,ob,bi) #731.875 + e3=co2(a,98,cr,ob,bi) #733.125 + e4=co2(a,100,cr,ob,bi) #734.375 + e5=co2(a,102,cr,ob,bi) #735.625 + if e1>=hh and e2>=hh and e3>=hh and e4>=hh and e5>=hh: + g=94 + elif e1>=hh and e2>=hh and e3>=hh and e4>=hh and e5<hh: + g=95 + elif e1>=hh and e2>=hh and e3>=hh and e4<hh and e5>=hh: + g=96 + elif e1>=hh and e2>=hh and e3<hh and e4>=hh and e5>=hh: + g=97 + elif e1>=hh and e2<hh and e3>=hh and e4>=hh and e5>=hh: + g=98 + elif e1<hh and e2>=hh and e3>=hh and e4>=hh and e5>=hh: + g=99 + elif e1>=hh and e2>=hh and e3>=hh and e4<hh and e5<hh: + g=100 + elif e1>=hh and e2>=hh and e3<hh and e4>=hh and e5<hh: + g=101 + elif e1>=hh and e2<hh and e3>=hh and e4>=hh and e5<hh: + g=102 + elif e1<hh and e2>=hh and e3>=hh and e4>=hh and e5<hh: + g=103 + elif e1>=hh and e2>=hh and e3<hh and e4<hh and e5>=hh: + g=104 + elif e1>=hh and e2<hh and e3>=hh and e4<hh and e5>=hh: + g=105 + elif e1<hh and e2>=hh and e3>=hh and e4<hh and e5>=hh: + g=106 + elif e1>=hh and e2<hh and e3<hh and e4>=hh and e5>=hh: + g=107 + elif e1<hh and e2>=hh and e3<hh and e4>=hh and e5>=hh: + g=108 + elif e1<hh and e2<hh and e3>=hh and e4>=hh and e5>=hh: + g=109 + elif e1>=hh and e2>=hh and e3<hh and e4<hh and e5<hh: + g=110 + elif e1>=hh and e2<hh and e3>=hh and e4<hh and e5<hh: + g=111 + elif e1>=hh and e2<hh and e3<hh and e4>=hh and e5<hh: + g=112 + elif e1>=hh and e2<hh and e3<hh and e4<hh and e5>=hh: + g=113 + elif e1<hh and e2>=hh and e3>=hh and e4<hh and e5<hh: + g=114 + elif e1<hh and e2>=hh and e3<hh and e4>=hh and e5<hh: + g=115 + elif e1<hh and e2>=hh and e3<hh and e4<hh and e5>=hh: + g=116 + elif e1<hh and e2<hh and e3>=hh and e4>=hh and e5<hh: + g=117 + elif e1<hh and e2<hh and e3>=hh and e4<hh and e5>=hh: + g=118 + elif e1<hh and e2<hh and e3<hh and e4>=hh and e5>=hh: + g=119 + elif e1>=hh and e2<hh and e3<hh and e4<hh and e5<hh: + g=120 + elif e1<hh and e2>=hh and e3<hh and e4<hh and e5<hh: + g=121 + elif e1<hh and e2<hh and e3>=hh and e4<hh and e5<hh: + g=122 + elif e1<hh and e2<hh and e3<hh and e4>=hh and e5<hh: + g=123 + elif e1<hh and e2<hh and e3<hh and e4<hh and e5>=hh: + g=124 + else: + g=125 + return(g) + + def pressure_co2(a,bi,cr,da,la,ob,pr,ta,te,to): + b=level(a,cr,ob,bi,te) + c=np.asarray(integrate_six(a,pr,te,da,la)) + if b==1: + d1=find_nearest_index((integrate_five(a,28,53,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,30,53,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,32,53,ob,cr,ta,te,pr,da,la,bi)),0) + d4=find_nearest_index((integrate_five(a,34,53,ob,cr,ta,te,pr,da,la,bi)),0) + d5=find_nearest_index((integrate_five(a,36,53,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e4=c[d4] + e5=c[d5] + e6=[e1,e2,e3,e4,e5] + e=trim_ave(e6) + elif b==2: + d1=find_nearest_index((integrate_five(a,28,53,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,30,53,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,32,53,ob,cr,ta,te,pr,da,la,bi)),0) + d4=find_nearest_index((integrate_five(a,34,53,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e4=c[d4] + e6=[e1,e2,e3,e4] + e=trim_ave(e6) + elif b==3: + d1=find_nearest_index((integrate_five(a,28,53,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,30,53,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,32,53,ob,cr,ta,te,pr,da,la,bi)),0) + d4=find_nearest_index((integrate_five(a,36,53,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e4=c[d4] + e6=[e1,e2,e3,e4] + e=trim_ave(e6) + elif b==4: + d1=find_nearest_index((integrate_five(a,28,53,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,30,53,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,34,53,ob,cr,ta,te,pr,da,la,bi)),0) + d4=find_nearest_index((integrate_five(a,36,53,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e4=c[d4] + e6=[e1,e2,e3,e4] + e=trim_ave(e6) + elif b==5: + d1=find_nearest_index((integrate_five(a,28,53,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,32,53,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,34,53,ob,cr,ta,te,pr,da,la,bi)),0) + d4=find_nearest_index((integrate_five(a,36,53,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e4=c[d4] + e6=[e1,e2,e3,e4] + e=trim_ave(e6) + elif b==6: + d1=find_nearest_index((integrate_five(a,30,53,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,32,53,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,34,53,ob,cr,ta,te,pr,da,la,bi)),0) + d4=find_nearest_index((integrate_five(a,36,53,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e4=c[d4] + e6=[e1,e2,e3,e4] + e=trim_ave(e6) + elif b==7: + d1=find_nearest_index((integrate_five(a,28,53,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,30,53,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,32,53,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e6=[e1,e2,e3] + e=trim_ave(e6) + elif b==8: + d1=find_nearest_index((integrate_five(a,28,53,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,30,53,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,34,53,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e6=[e1,e2,e3] + e=trim_ave(e6) + elif b==9: + d1=find_nearest_index((integrate_five(a,28,53,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,32,53,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,34,53,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e6=[e1,e2,e3] + e=trim_ave(e6) + elif b==10: + d1=find_nearest_index((integrate_five(a,30,53,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,32,53,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,34,53,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e6=[e1,e2,e3] + e=trim_ave(e6) + elif b==11: + d1=find_nearest_index((integrate_five(a,28,53,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,30,53,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,36,53,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e6=[e1,e2,e3] + e=trim_ave(e6) + elif b==12: + d1=find_nearest_index((integrate_five(a,28,53,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,32,53,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,36,53,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e6=[e1,e2,e3] + e=trim_ave(e6) + elif b==13: + d1=find_nearest_index((integrate_five(a,30,53,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,32,53,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,36,53,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e6=[e1,e2,e3] + e=trim_ave(e6) + elif b==14: + d1=find_nearest_index((integrate_five(a,28,53,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,34,53,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,36,53,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e6=[e1,e2,e3] + e=trim_ave(e6) + elif b==15: + d1=find_nearest_index((integrate_five(a,30,53,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,34,53,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,36,53,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e6=[e1,e2,e3] + e=trim_ave(e6) + elif b==16: + d1=find_nearest_index((integrate_five(a,32,53,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,34,53,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,36,53,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e6=[e1,e2,e3] + e=trim_ave(e6) + elif b==17: + d1=find_nearest_index((integrate_five(a,28,53,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,30,53,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e=(e1+e2)/2 + elif b==18: + d1=find_nearest_index((integrate_five(a,28,53,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,32,53,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e3=c[d3] + e=(e1+e3)/2 + elif b==19: + d1=find_nearest_index((integrate_five(a,28,53,ob,cr,ta,te,pr,da,la,bi)),0) + d4=find_nearest_index((integrate_five(a,34,53,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e4=c[d4] + e=(e1+e4)/2 + elif b==20: + d1=find_nearest_index((integrate_five(a,28,53,ob,cr,ta,te,pr,da,la,bi)),0) + d5=find_nearest_index((integrate_five(a,36,53,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e5=c[d5] + e=(e1+e5)/2 + elif b==21: + d2=find_nearest_index((integrate_five(a,30,53,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,32,53,ob,cr,ta,te,pr,da,la,bi)),0) + e2=c[d2] + e3=c[d3] + e=(e2+e3)/2 + elif b==22: + d2=find_nearest_index((integrate_five(a,30,53,ob,cr,ta,te,pr,da,la,bi)),0) + d4=find_nearest_index((integrate_five(a,34,53,ob,cr,ta,te,pr,da,la,bi)),0) + e2=c[d2] + e4=c[d4] + e=(e2+e4)/2 + elif b==23: + d2=find_nearest_index((integrate_five(a,30,53,ob,cr,ta,te,pr,da,la,bi)),0) + d5=find_nearest_index((integrate_five(a,36,53,ob,cr,ta,te,pr,da,la,bi)),0) + e2=c[d2] + e5=c[d5] + e=(e2+e5)/2 + elif b==24: + d3=find_nearest_index((integrate_five(a,32,53,ob,cr,ta,te,pr,da,la,bi)),0) + d4=find_nearest_index((integrate_five(a,34,53,ob,cr,ta,te,pr,da,la,bi)),0) + e3=c[d3] + e4=c[d4] + e=(e3+e4)/2 + elif b==25: + d3=find_nearest_index((integrate_five(a,32,53,ob,cr,ta,te,pr,da,la,bi)),0) + d5=find_nearest_index((integrate_five(a,36,53,ob,cr,ta,te,pr,da,la,bi)),0) + e3=c[d3] + e5=c[d5] + e=(e3+e5)/2 + elif b==26: + d4=find_nearest_index((integrate_five(a,34,53,ob,cr,ta,te,pr,da,la,bi)),0) + d5=find_nearest_index((integrate_five(a,36,53,ob,cr,ta,te,pr,da,la,bi)),0) + e4=c[d4] + e5=c[d5] + e=(e4+e5)/2 + elif b==27: + d1=find_nearest_index((integrate_five(a,28,53,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e=e1 + elif b==28: + d2=find_nearest_index((integrate_five(a,30,53,ob,cr,ta,te,pr,da,la,bi)),0) + e2=c[d2] + e=e2 + elif b==29: + d3=find_nearest_index((integrate_five(a,32,53,ob,cr,ta,te,pr,da,la,bi)),0) + e3=c[d3] + e=e3 + elif b==30: + d4=find_nearest_index((integrate_five(a,34,53,ob,cr,ta,te,pr,da,la,bi)),0) + e4=c[d4] + e=e4 + elif b==31: + d5=find_nearest_index((integrate_five(a,36,53,ob,cr,ta,te,pr,da,la,bi)),0) + e5=c[d5] + e=e5 + elif b==32: + d1=find_nearest_index((integrate_five(a,49,69,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,51,69,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,53,69,ob,cr,ta,te,pr,da,la,bi)),0) + d4=find_nearest_index((integrate_five(a,55,69,ob,cr,ta,te,pr,da,la,bi)),0) + d5=find_nearest_index((integrate_five(a,57,69,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e4=c[d4] + e5=c[d5] + e6=[e1,e2,e3,e4,e5] + e=trim_ave(e6) + elif b==33: + d1=find_nearest_index((integrate_five(a,49,69,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,51,69,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,53,69,ob,cr,ta,te,pr,da,la,bi)),0) + d4=find_nearest_index((integrate_five(a,55,69,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e4=c[d4] + e6=[e1,e2,e3,e4] + e=trim_ave(e6) + elif b==34: + d1=find_nearest_index((integrate_five(a,49,69,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,51,69,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,53,69,ob,cr,ta,te,pr,da,la,bi)),0) + d4=find_nearest_index((integrate_five(a,57,69,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e4=c[d4] + e6=[e1,e2,e3,e4] + e=trim_ave(e6) + elif b==35: + d1=find_nearest_index((integrate_five(a,49,69,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,51,69,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,55,69,ob,cr,ta,te,pr,da,la,bi)),0) + d4=find_nearest_index((integrate_five(a,57,69,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e4=c[d4] + e6=[e1,e2,e3,e4] + e=trim_ave(e6) + elif b==36: + d1=find_nearest_index((integrate_five(a,49,69,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,53,69,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,55,69,ob,cr,ta,te,pr,da,la,bi)),0) + d4=find_nearest_index((integrate_five(a,57,69,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e4=c[d4] + e6=[e1,e2,e3,e4] + e=trim_ave(e6) + elif b==37: + d1=find_nearest_index((integrate_five(a,51,69,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,53,69,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,55,69,ob,cr,ta,te,pr,da,la,bi)),0) + d4=find_nearest_index((integrate_five(a,57,69,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e4=c[d4] + e6=[e1,e2,e3,e4] + e=trim_ave(e6) + elif b==38: + d1=find_nearest_index((integrate_five(a,49,69,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,51,69,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,53,69,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e6=[e1,e2,e3] + e=trim_ave(e6) + elif b==39: + d1=find_nearest_index((integrate_five(a,49,69,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,51,69,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,55,69,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e6=[e1,e2,e3] + e=trim_ave(e6) + elif b==40: + d1=find_nearest_index((integrate_five(a,49,69,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,53,69,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,55,69,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e6=[e1,e2,e3] + e=trim_ave(e6) + elif b==41: + d1=find_nearest_index((integrate_five(a,51,69,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,53,69,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,55,69,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e6=[e1,e2,e3] + e=trim_ave(e6) + elif b==42: + d1=find_nearest_index((integrate_five(a,49,69,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,51,69,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,57,69,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e6=[e1,e2,e3] + e=trim_ave(e6) + elif b==43: + d1=find_nearest_index((integrate_five(a,49,69,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,53,69,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,57,69,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e6=[e1,e2,e3] + e=trim_ave(e6) + elif b==44: + d1=find_nearest_index((integrate_five(a,51,69,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,53,69,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,57,69,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e6=[e1,e2,e3] + e=trim_ave(e6) + elif b==45: + d1=find_nearest_index((integrate_five(a,49,69,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,55,69,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,57,69,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e6=[e1,e2,e3] + e=trim_ave(e6) + elif b==46: + d1=find_nearest_index((integrate_five(a,51,69,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,55,69,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,57,69,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e6=[e1,e2,e3] + e=trim_ave(e6) + elif b==47: + d1=find_nearest_index((integrate_five(a,53,69,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,55,69,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,57,69,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e6=[e1,e2,e3] + e=trim_ave(e6) + elif b==48: + d1=find_nearest_index((integrate_five(a,49,69,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,51,69,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e=(e1+e2)/2 + elif b==49: + d1=find_nearest_index((integrate_five(a,49,69,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,53,69,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e3=c[d3] + e=(e1+e3)/2 + elif b==50: + d1=find_nearest_index((integrate_five(a,49,69,ob,cr,ta,te,pr,da,la,bi)),0) + d4=find_nearest_index((integrate_five(a,55,69,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e4=c[d4] + e=(e1+e4)/2 + elif b==51: + d1=find_nearest_index((integrate_five(a,49,69,ob,cr,ta,te,pr,da,la,bi)),0) + d5=find_nearest_index((integrate_five(a,57,69,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e5=c[d5] + e=(e1+e5)/2 + elif b==52: + d2=find_nearest_index((integrate_five(a,51,69,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,53,69,ob,cr,ta,te,pr,da,la,bi)),0) + e2=c[d2] + e3=c[d3] + e=(e2+e3)/2 + elif b==53: + d2=find_nearest_index((integrate_five(a,51,69,ob,cr,ta,te,pr,da,la,bi)),0) + d4=find_nearest_index((integrate_five(a,55,69,ob,cr,ta,te,pr,da,la,bi)),0) + e2=c[d2] + e4=c[d4] + e=(e2+e4)/2 + elif b==54: + d2=find_nearest_index((integrate_five(a,51,69,ob,cr,ta,te,pr,da,la,bi)),0) + d5=find_nearest_index((integrate_five(a,57,69,ob,cr,ta,te,pr,da,la,bi)),0) + e2=c[d2] + e5=c[d5] + e=(e2+e5)/2 + elif b==55: + d3=find_nearest_index((integrate_five(a,53,69,ob,cr,ta,te,pr,da,la,bi)),0) + d4=find_nearest_index((integrate_five(a,55,69,ob,cr,ta,te,pr,da,la,bi)),0) + e3=c[d3] + e4=c[d4] + e=(e3+e4)/2 + elif b==56: + d3=find_nearest_index((integrate_five(a,53,69,ob,cr,ta,te,pr,da,la,bi)),0) + d5=find_nearest_index((integrate_five(a,57,69,ob,cr,ta,te,pr,da,la,bi)),0) + e3=c[d3] + e5=c[d5] + e=(e3+e5)/2 + elif b==57: + d4=find_nearest_index((integrate_five(a,55,69,ob,cr,ta,te,pr,da,la,bi)),0) + d5=find_nearest_index((integrate_five(a,57,69,ob,cr,ta,te,pr,da,la,bi)),0) + e4=c[d4] + e5=c[d5] + e=(e4+e5)/2 + elif b==58: + d1=find_nearest_index((integrate_five(a,49,69,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e=e1 + elif b==59: + d2=find_nearest_index((integrate_five(a,51,69,ob,cr,ta,te,pr,da,la,bi)),0) + e2=c[d2] + e=e2 + elif b==60: + d3=find_nearest_index((integrate_five(a,53,69,ob,cr,ta,te,pr,da,la,bi)),0) + e3=c[d3] + e=e3 + elif b==61: + d4=find_nearest_index((integrate_five(a,55,69,ob,cr,ta,te,pr,da,la,bi)),0) + e4=c[d4] + e=e4 + elif b==62: + d5=find_nearest_index((integrate_five(a,57,69,ob,cr,ta,te,pr,da,la,bi)),0) + e5=c[d5] + e=e5 + elif b==63: + d1=find_nearest_index((integrate_five(a,65,98,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,67,98,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,69,98,ob,cr,ta,te,pr,da,la,bi)),0) + d4=find_nearest_index((integrate_five(a,71,98,ob,cr,ta,te,pr,da,la,bi)),0) + d5=find_nearest_index((integrate_five(a,73,98,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e4=c[d4] + e5=c[d5] + e6=[e1,e2,e3,e4,e5] + e=trim_ave(e6) + elif b==64: + d1=find_nearest_index((integrate_five(a,65,98,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,67,98,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,69,98,ob,cr,ta,te,pr,da,la,bi)),0) + d4=find_nearest_index((integrate_five(a,71,98,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e4=c[d4] + e6=[e1,e2,e3,e4] + e=trim_ave(e6) + elif b==65: + d1=find_nearest_index((integrate_five(a,65,98,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,67,98,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,69,98,ob,cr,ta,te,pr,da,la,bi)),0) + d4=find_nearest_index((integrate_five(a,73,98,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e4=c[d4] + e6=[e1,e2,e3,e4] + e=trim_ave(e6) + elif b==66: + d1=find_nearest_index((integrate_five(a,65,98,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,67,98,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,71,98,ob,cr,ta,te,pr,da,la,bi)),0) + d4=find_nearest_index((integrate_five(a,73,98,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e4=c[d4] + e6=[e1,e2,e3,e4] + e=trim_ave(e6) + elif b==67: + d1=find_nearest_index((integrate_five(a,65,98,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,69,98,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,71,98,ob,cr,ta,te,pr,da,la,bi)),0) + d4=find_nearest_index((integrate_five(a,73,98,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e4=c[d4] + e6=[e1,e2,e3,e4] + e=trim_ave(e6) + elif b==68: + d1=find_nearest_index((integrate_five(a,67,98,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,69,98,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,71,98,ob,cr,ta,te,pr,da,la,bi)),0) + d4=find_nearest_index((integrate_five(a,73,98,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e4=c[d4] + e6=[e1,e2,e3,e4] + e=trim_ave(e6) + elif b==69: + d1=find_nearest_index((integrate_five(a,65,98,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,67,98,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,69,98,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e6=[e1,e2,e3] + e=trim_ave(e6) + elif b==70: + d1=find_nearest_index((integrate_five(a,65,98,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,67,98,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,71,98,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e6=[e1,e2,e3] + e=trim_ave(e6) + elif b==71: + d1=find_nearest_index((integrate_five(a,65,98,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,69,98,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,71,98,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e6=[e1,e2,e3] + e=trim_ave(e6) + elif b==72: + d1=find_nearest_index((integrate_five(a,67,98,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,69,98,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,71,98,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e6=[e1,e2,e3] + e=trim_ave(e6) + elif b==73: + d1=find_nearest_index((integrate_five(a,65,98,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,67,98,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,73,98,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e6=[e1,e2,e3] + e=trim_ave(e6) + elif b==74: + d1=find_nearest_index((integrate_five(a,65,98,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,69,98,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,73,98,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e6=[e1,e2,e3] + e=trim_ave(e6) + elif b==75: + d1=find_nearest_index((integrate_five(a,67,98,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,69,98,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,73,98,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e6=[e1,e2,e3] + e=trim_ave(e6) + elif b==76: + d1=find_nearest_index((integrate_five(a,65,98,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,71,98,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,73,98,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e6=[e1,e2,e3] + e=trim_ave(e6) + elif b==77: + d1=find_nearest_index((integrate_five(a,67,98,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,71,98,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,73,98,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e6=[e1,e2,e3] + e=trim_ave(e6) + elif b==78: + d1=find_nearest_index((integrate_five(a,69,98,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,71,98,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,73,98,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e6=[e1,e2,e3] + e=trim_ave(e6) + elif b==79: + d1=find_nearest_index((integrate_five(a,65,98,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,67,98,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e=(e1+e2)/2 + elif b==80: + d1=find_nearest_index((integrate_five(a,65,98,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,69,98,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e3=c[d3] + e=(e1+e3)/2 + elif b==81: + d1=find_nearest_index((integrate_five(a,65,98,ob,cr,ta,te,pr,da,la,bi)),0) + d4=find_nearest_index((integrate_five(a,71,98,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e4=c[d4] + e=(e1+e4)/2 + elif b==82: + d1=find_nearest_index((integrate_five(a,65,98,ob,cr,ta,te,pr,da,la,bi)),0) + d5=find_nearest_index((integrate_five(a,73,98,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e5=c[d5] + e=(e1+e5)/2 + elif b==83: + d2=find_nearest_index((integrate_five(a,67,98,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,69,98,ob,cr,ta,te,pr,da,la,bi)),0) + e2=c[d2] + e3=c[d3] + e=(e2+e3)/2 + elif b==84: + d2=find_nearest_index((integrate_five(a,67,98,ob,cr,ta,te,pr,da,la,bi)),0) + d4=find_nearest_index((integrate_five(a,71,98,ob,cr,ta,te,pr,da,la,bi)),0) + e2=c[d2] + e4=c[d4] + e=(e2+e4)/2 + elif b==85: + d2=find_nearest_index((integrate_five(a,67,98,ob,cr,ta,te,pr,da,la,bi)),0) + d5=find_nearest_index((integrate_five(a,73,98,ob,cr,ta,te,pr,da,la,bi)),0) + e2=c[d2] + e5=c[d5] + e=(e2+e5)/2 + elif b==86: + d3=find_nearest_index((integrate_five(a,69,98,ob,cr,ta,te,pr,da,la,bi)),0) + d4=find_nearest_index((integrate_five(a,71,98,ob,cr,ta,te,pr,da,la,bi)),0) + e3=c[d3] + e4=c[d4] + e=(e3+e4)/2 + elif b==87: + d3=find_nearest_index((integrate_five(a,69,98,ob,cr,ta,te,pr,da,la,bi)),0) + d5=find_nearest_index((integrate_five(a,73,98,ob,cr,ta,te,pr,da,la,bi)),0) + e3=c[d3] + e5=c[d5] + e=(e3+e5)/2 + elif b==88: + d4=find_nearest_index((integrate_five(a,71,98,ob,cr,ta,te,pr,da,la,bi)),0) + d5=find_nearest_index((integrate_five(a,73,98,ob,cr,ta,te,pr,da,la,bi)),0) + e4=c[d4] + e5=c[d5] + e=(e4+e5)/2 + elif b==89: + d1=find_nearest_index((integrate_five(a,65,98,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e=e1 + elif b==90: + d2=find_nearest_index((integrate_five(a,67,98,ob,cr,ta,te,pr,da,la,bi)),0) + e2=c[d2] + e=e2 + elif b==91: + d3=find_nearest_index((integrate_five(a,69,98,ob,cr,ta,te,pr,da,la,bi)),0) + e3=c[d3] + e=e3 + elif b==92: + d4=find_nearest_index((integrate_five(a,71,98,ob,cr,ta,te,pr,da,la,bi)),0) + e4=c[d4] + e=e4 + elif b==93: + d5=find_nearest_index((integrate_five(a,73,98,ob,cr,ta,te,pr,da,la,bi)),0) + e5=c[d5] + e=e5 + elif b==94: + d1=find_nearest_index((integrate_five(a,94,122,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,96,122,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,98,122,ob,cr,ta,te,pr,da,la,bi)),0) + d4=find_nearest_index((integrate_five(a,100,122,ob,cr,ta,te,pr,da,la,bi)),0) + d5=find_nearest_index((integrate_five(a,102,122,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e4=c[d4] + e5=c[d5] + e6=[e1,e2,e3+e4+e5] + e=trim_ave(e6) + elif b==95: + d1=find_nearest_index((integrate_five(a,94,122,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,96,122,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,98,122,ob,cr,ta,te,pr,da,la,bi)),0) + d4=find_nearest_index((integrate_five(a,100,122,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e4=c[d4] + e6=[e1,e2,e3,e4] + e=trim_ave(e6) + elif b==96: + d1=find_nearest_index((integrate_five(a,94,122,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,96,122,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,98,122,ob,cr,ta,te,pr,da,la,bi)),0) + d4=find_nearest_index((integrate_five(a,102,122,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e4=c[d4] + e6=[e1,e2,e3,e4] + e=trim_ave(e6) + elif b==97: + d1=find_nearest_index((integrate_five(a,94,122,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,96,122,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,100,122,ob,cr,ta,te,pr,da,la,bi)),0) + d4=find_nearest_index((integrate_five(a,102,122,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e4=c[d4] + e6=[e1,e2,e3,e4] + e=trim_ave(e6) + elif b==98: + d1=find_nearest_index((integrate_five(a,94,122,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,98,122,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,100,122,ob,cr,ta,te,pr,da,la,bi)),0) + d4=find_nearest_index((integrate_five(a,102,122,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e4=c[d4] + e6=[e1,e2,e3,e4] + e=trim_ave(e6) + elif b==99: + d1=find_nearest_index((integrate_five(a,96,122,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,98,122,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,100,122,ob,cr,ta,te,pr,da,la,bi)),0) + d4=find_nearest_index((integrate_five(a,102,122,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e4=c[d4] + e6=[e1,e2,e3,e4] + e=trim_ave(e6) + elif b==100: + d1=find_nearest_index((integrate_five(a,94,122,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,96,122,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,98,122,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e6=[e1,e2,e3] + e=trim_ave(e6) + elif b==101: + d1=find_nearest_index((integrate_five(a,94,122,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,96,122,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,100,122,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e6=[e1,e2,e3] + e=trim_ave(e6) + elif b==102: + d1=find_nearest_index((integrate_five(a,94,122,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,98,122,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,100,122,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e6=[e1,e2,e3] + e=trim_ave(e6) + elif b==103: + d1=find_nearest_index((integrate_five(a,96,122,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,98,122,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,100,122,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d1] + e6=[e1,e2,e3] + e=trim_ave(e6) + elif b==104: + d1=find_nearest_index((integrate_five(a,94,122,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,96,122,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,102,122,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e6=[e1,e2,e3] + e=trim_ave(e6) + elif b==105: + d1=find_nearest_index((integrate_five(a,94,122,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,98,122,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,102,122,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e6=[e1,e2,e3] + e=trim_ave(e6) + elif b==106: + d1=find_nearest_index((integrate_five(a,96,122,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,98,122,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,102,122,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e6=[e1,e2,e3] + e=trim_ave(e6) + elif b==107: + d1=find_nearest_index((integrate_five(a,94,122,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,100,122,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,102,122,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e6=[e1,e2,e3] + e=trim_ave(e6) + elif b==108: + d1=find_nearest_index((integrate_five(a,96,122,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,100,122,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,102,122,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e6=[e1,e2,e3] + e=trim_ave(e6) + elif b==109: + d1=find_nearest_index((integrate_five(a,98,122,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,100,122,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,102,122,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e3=c[d3] + e6=[e1,e2,e3] + e=trim_ave(e6) + elif b==110: + d1=find_nearest_index((integrate_five(a,94,122,ob,cr,ta,te,pr,da,la,bi)),0) + d2=find_nearest_index((integrate_five(a,96,122,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e2=c[d2] + e=(e1+e2)/2 + elif b==111: + d1=find_nearest_index((integrate_five(a,94,122,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,98,122,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e3=c[d3] + e=(e1+e3)/2 + elif b==112: + d1=find_nearest_index((integrate_five(a,94,122,ob,cr,ta,te,pr,da,la,bi)),0) + d4=find_nearest_index((integrate_five(a,100,122,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e4=c[d4] + e=(e1+e4)/2 + elif b==113: + d1=find_nearest_index((integrate_five(a,94,122,ob,cr,ta,te,pr,da,la,bi)),0) + d5=find_nearest_index((integrate_five(a,102,122,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e5=c[d5] + e=(e1+e5)/2 + elif b==114: + d2=find_nearest_index((integrate_five(a,96,122,ob,cr,ta,te,pr,da,la,bi)),0) + d3=find_nearest_index((integrate_five(a,98,122,ob,cr,ta,te,pr,da,la,bi)),0) + e2=c[d2] + e3=c[d3] + e=(e2+e3)/2 + elif b==115: + d2=find_nearest_index((integrate_five(a,96,122,ob,cr,ta,te,pr,da,la,bi)),0) + d4=find_nearest_index((integrate_five(a,100,122,ob,cr,ta,te,pr,da,la,bi)),0) + e2=c[d2] + e4=c[d4] + e=(e2+e4)/2 + elif b==116: + d2=find_nearest_index((integrate_five(a,96,122,ob,cr,ta,te,pr,da,la,bi)),0) + d5=find_nearest_index((integrate_five(a,102,122,ob,cr,ta,te,pr,da,la,bi)),0) + e2=c[d2] + e5=c[d5] + e=(e2+e5)/2 + elif b==117: + d3=find_nearest_index((integrate_five(a,98,122,ob,cr,ta,te,pr,da,la,bi)),0) + d4=find_nearest_index((integrate_five(a,100,122,ob,cr,ta,te,pr,da,la,bi)),0) + e3=c[d3] + e4=c[d4] + e=(e3+e4)/2 + elif b==118: + d3=find_nearest_index((integrate_five(a,98,122,ob,cr,ta,te,pr,da,la,bi)),0) + d5=find_nearest_index((integrate_five(a,102,122,ob,cr,ta,te,pr,da,la,bi)),0) + e3=c[d3] + e5=c[d5] + e=(e3+e5)/2 + elif b==119: + d4=find_nearest_index((integrate_five(a,100,122,ob,cr,ta,te,pr,da,la,bi)),0) + d5=find_nearest_index((integrate_five(a,102,122,ob,cr,ta,te,pr,da,la,bi)),0) + e4=c[d4] + e5=c[d5] + e=(e4+e5)/2 + elif b==120: + d1=find_nearest_index((integrate_five(a,94,122,ob,cr,ta,te,pr,da,la,bi)),0) + e1=c[d1] + e=e1 + elif b==121: + d2=find_nearest_index((integrate_five(a,96,122,ob,cr,ta,te,pr,da,la,bi)),0) + e2=c[d2] + e=e2 + elif b==122: + d3=find_nearest_index((integrate_five(a,98,122,ob,cr,ta,te,pr,da,la,bi)),0) + e3=c[d3] + e=e3 + elif b==123: + d4=find_nearest_index((integrate_five(a,100,122,ob,cr,ta,te,pr,da,la,bi)),0) + e4=c[d4] + e=e4 + elif b==124: + d5=find_nearest_index((integrate_five(a,102,122,ob,cr,ta,te,pr,da,la,bi)),0) + e5=c[d5] + e=e5 + else: + e=-8888 + g1=ir_test_ctp(a,ob,te,pr) + g2=integrate_one(a,216,ob,cr,bi) + g3=to[a] + g4=optics(a,ob,cr,te,bi,pr,g1) + g5=optics(a,ob,cr,te,bi,pr,e) + if g1>=50 and g1<=950 and e<=660 and e>=50 and g1>=e and g5<=1.3: + h=e + elif g1>=50 and g1<=950 and e<=660 and e>=50 and g1<e and g2>=0.5 and g4<=1.3: + h=g1 + elif g1<50 and e>=50 and e<=660 and g5<=1.3: + h=e + elif g1>950 and e>=50 and e<=660 and g5<=1.3: + h=e + elif g1>=50 and g1<=950 and e<50 and g2>=0.5 and g4<=1.3: + h=g1 + elif g1>=50 and g1<=950 and e>660 and g2>=0.5 and g4<=1.3: + h=g1 + elif g1>950 and g2>=0.5: + h=2100 #low cloud + elif g2<=-0.33 and g3==1: + h=2000 #clr certain + elif g2<=0.5: + h=2050 #clr probable + else: + h=-7777 #inconclusive + if h==-7777: + j=h + elif h>1500: + j=h + else: + h1=pr[a][:] + h2=find_nearest_index(h1,h)+3 + if h2<=126: + j=pr[a][h2] + else: + j=pr[a][126] + return(j) + + #1=cloud but not used and not at nu_1 yet so "clear" + #2=cloud but not used and after nu_1 so "cloudy" + #3=cloud and used as nu_1 + #4=cloud and used as nu_2 + #5=cloud from ir test + #6=clear + #7=error code/inconclusive + + def chan_used(a,bi,cr,da,la,ob,pr,ta,te,to): + b=level(a,cr,ob,bi,te) + d=pressure_co2(a,bi,cr,da,la,ob,pr,ta,te,to) + if b==1 and d>=0 and d<=660: + c_28=3 + c_30=3 + c_32=3 + c_34=3 + c_36=3 + c_49,c_51,c_53,c_55,c_57=2,2,4,2,2 + c_65,c_67,c_69,c_71,c_73=2,2,2,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==2 and d>=0 and d<=660: + c_28=3 + c_30=3 + c_32=3 + c_34=3 + c_36=1 + c_49,c_51,c_53,c_55,c_57=2,2,4,2,2 + c_65,c_67,c_69,c_71,c_73=2,2,2,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==3 and d>=0 and d<=660: + c_28=3 + c_30=3 + c_32=3 + c_34=1 + c_36=3 + c_49,c_51,c_53,c_55,c_57=2,2,4,2,2 + c_65,c_67,c_69,c_71,c_73=2,2,2,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==4 and d>=0 and d<=660: + c_28=3 + c_30=3 + c_32=1 + c_34=3 + c_36=3 + c_49,c_51,c_53,c_55,c_57=2,2,4,2,2 + c_65,c_67,c_69,c_71,c_73=2,2,2,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==5 and d>=0 and d<=660: + c_28=3 + c_30=1 + c_32=3 + c_34=3 + c_36=3 + c_49,c_51,c_53,c_55,c_57=2,2,4,2,2 + c_65,c_67,c_69,c_71,c_73=2,2,2,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==6 and d>=0 and d<=660: + c_28=1 + c_30=3 + c_32=3 + c_34=3 + c_36=3 + c_49,c_51,c_53,c_55,c_57=2,2,4,2,2 + c_65,c_67,c_69,c_71,c_73=2,2,2,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==7 and d>=0 and d<=660: + c_28=3 + c_30=3 + c_32=3 + c_34=1 + c_36=1 + c_49,c_51,c_53,c_55,c_57=2,2,4,2,2 + c_65,c_67,c_69,c_71,c_73=2,2,2,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==8 and d>=0 and d<=660: + c_28=3 + c_30=3 + c_32=1 + c_34=3 + c_36=1 + c_49,c_51,c_53,c_55,c_57=2,2,4,2,2 + c_65,c_67,c_69,c_71,c_73=2,2,2,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==9 and d>=0 and d<=660: + c_28=3 + c_30=1 + c_32=3 + c_34=3 + c_36=1 + c_49,c_51,c_53,c_55,c_57=2,2,4,2,2 + c_65,c_67,c_69,c_71,c_73=2,2,2,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==10 and d>=0 and d<=660: + c_28=1 + c_30=3 + c_32=3 + c_34=3 + c_36=1 + c_49,c_51,c_53,c_55,c_57=2,2,4,2,2 + c_65,c_67,c_69,c_71,c_73=2,2,2,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==11 and d>=0 and d<=660: + c_28=3 + c_30=3 + c_32=1 + c_34=1 + c_36=3 + c_49,c_51,c_53,c_55,c_57=2,2,4,2,2 + c_65,c_67,c_69,c_71,c_73=2,2,2,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==12 and d>=0 and d<=660: + c_28=3 + c_30=1 + c_32=3 + c_34=1 + c_36=3 + c_49,c_51,c_53,c_55,c_57=2,2,4,2,2 + c_65,c_67,c_69,c_71,c_73=2,2,2,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==13 and d>=0 and d<=660: + c_28=1 + c_30=3 + c_32=3 + c_34=1 + c_36=3 + c_49,c_51,c_53,c_55,c_57=2,2,4,2,2 + c_65,c_67,c_69,c_71,c_73=2,2,2,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==14 and d>=0 and d<=660: + c_28=3 + c_30=1 + c_32=1 + c_34=3 + c_36=3 + c_49,c_51,c_53,c_55,c_57=2,2,4,2,2 + c_65,c_67,c_69,c_71,c_73=2,2,2,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==15 and d>=0 and d<=660: + c_28=1 + c_30=3 + c_32=1 + c_34=3 + c_36=3 + c_49,c_51,c_53,c_55,c_57=2,2,4,2,2 + c_65,c_67,c_69,c_71,c_73=2,2,2,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==16 and d>=0 and d<=660: + c_28=1 + c_30=1 + c_32=3 + c_34=3 + c_36=3 + c_49,c_51,c_53,c_55,c_57=2,2,4,2,2 + c_65,c_67,c_69,c_71,c_73=2,2,2,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==17 and d>=0 and d<=660: + c_28=3 + c_30=3 + c_32=1 + c_34=1 + c_36=1 + c_49,c_51,c_53,c_55,c_57=2,2,4,2,2 + c_65,c_67,c_69,c_71,c_73=2,2,2,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==18 and d>=0 and d<=660: + c_28=3 + c_30=1 + c_32=3 + c_34=1 + c_36=1 + c_49,c_51,c_53,c_55,c_57=2,2,4,2,2 + c_65,c_67,c_69,c_71,c_73=2,2,2,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==19 and d>=0 and d<=660: + c_28=3 + c_30=1 + c_32=1 + c_34=3 + c_36=1 + c_49,c_51,c_53,c_55,c_57=2,2,4,2,2 + c_65,c_67,c_69,c_71,c_73=2,2,2,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==20 and d>=0 and d<=660: + c_28=3 + c_30=1 + c_32=1 + c_34=1 + c_36=3 + c_49,c_51,c_53,c_55,c_57=2,2,4,2,2 + c_65,c_67,c_69,c_71,c_73=2,2,2,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==21 and d>=0 and d<=660: + c_28=1 + c_30=3 + c_32=3 + c_34=1 + c_36=1 + c_49,c_51,c_53,c_55,c_57=2,2,4,2,2 + c_65,c_67,c_69,c_71,c_73=2,2,2,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==22 and d>=0 and d<=660: + c_28=1 + c_30=3 + c_32=1 + c_34=3 + c_36=1 + c_49,c_51,c_53,c_55,c_57=2,2,4,2,2 + c_65,c_67,c_69,c_71,c_73=2,2,2,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==23 and d>=0 and d<=660: + c_28=1 + c_30=3 + c_32=1 + c_34=1 + c_36=3 + c_49,c_51,c_53,c_55,c_57=2,2,4,2,2 + c_65,c_67,c_69,c_71,c_73=2,2,2,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==24 and d>=0 and d<=660: + c_28=1 + c_30=1 + c_32=3 + c_34=3 + c_36=1 + c_49,c_51,c_53,c_55,c_57=2,2,4,2,2 + c_65,c_67,c_69,c_71,c_73=2,2,2,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==25 and d>=0 and d<=660: + c_28=1 + c_30=1 + c_32=3 + c_34=1 + c_36=3 + c_49,c_51,c_53,c_55,c_57=2,2,4,2,2 + c_65,c_67,c_69,c_71,c_73=2,2,2,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==26 and d>=0 and d<=660: + c_28=1 + c_30=1 + c_32=1 + c_34=3 + c_36=3 + c_49,c_51,c_53,c_55,c_57=2,2,4,2,2 + c_65,c_67,c_69,c_71,c_73=2,2,2,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==27 and d>=0 and d<=660: + c_28=3 + c_30=1 + c_32=1 + c_34=1 + c_36=1 + c_49,c_51,c_53,c_55,c_57=2,2,4,2,2 + c_65,c_67,c_69,c_71,c_73=2,2,2,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==28 and d>=0 and d<=660: + c_28=1 + c_30=3 + c_32=1 + c_34=1 + c_36=1 + c_49,c_51,c_53,c_55,c_57=2,2,4,2,2 + c_65,c_67,c_69,c_71,c_73=2,2,2,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==29 and d>=0 and d<=660: + c_28=1 + c_30=1 + c_32=3 + c_34=1 + c_36=1 + c_49,c_51,c_53,c_55,c_57=2,2,4,2,2 + c_65,c_67,c_69,c_71,c_73=2,2,2,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==30 and d>=0 and d<=660: + c_28=1 + c_30=1 + c_32=1 + c_34=3 + c_36=1 + c_49,c_51,c_53,c_55,c_57=2,2,4,2,2 + c_65,c_67,c_69,c_71,c_73=2,2,2,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==31 and d>=0 and d<=660: + c_28=1 + c_30=1 + c_32=1 + c_34=1 + c_36=3 + c_49,c_51,c_53,c_55,c_57=2,2,4,2,2 + c_65,c_67,c_69,c_71,c_73=2,2,2,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==32 and d>=0 and d<=660: + c_49=3 + c_51=3 + c_53=3 + c_55=3 + c_57=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=2,2,4,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==33 and d>=0 and d<=660: + c_49=3 + c_51=3 + c_53=3 + c_55=3 + c_57=1 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=2,2,4,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==34 and d>=0 and d<=660: + c_49=3 + c_51=3 + c_53=3 + c_55=1 + c_57=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=2,2,4,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==35 and d>=0 and d<=660: + c_49=3 + c_51=3 + c_53=1 + c_55=3 + c_57=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=2,2,4,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==36 and d>=0 and d<=660: + c_49=3 + c_51=1 + c_53=3 + c_55=3 + c_57=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=2,2,4,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==37 and d>=0 and d<=660: + c_49=1 + c_51=3 + c_53=3 + c_55=3 + c_57=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=2,2,4,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==38 and d>=0 and d<=660: + c_49=3 + c_51=3 + c_53=3 + c_55=1 + c_57=1 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=2,2,4,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==39 and d>=0 and d<=660: + c_49=3 + c_51=3 + c_53=1 + c_55=3 + c_57=1 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=2,2,4,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==40 and d>=0 and d<=660: + c_49=3 + c_51=1 + c_53=3 + c_55=3 + c_57=1 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=2,2,4,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==41 and d>=0 and d<=660: + c_49=1 + c_51=3 + c_53=3 + c_55=3 + c_57=1 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=2,2,4,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==42 and d>=0 and d<=660: + c_49=3 + c_51=3 + c_53=1 + c_55=1 + c_57=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=2,2,4,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==43 and d>=0 and d<=660: + c_49=3 + c_51=1 + c_53=3 + c_55=1 + c_57=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=2,2,4,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==44 and d>=0 and d<=660: + c_49=1 + c_51=3 + c_53=3 + c_55=1 + c_57=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=2,2,4,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==45 and d>=0 and d<=660: + c_49=3 + c_51=1 + c_53=1 + c_55=3 + c_57=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=2,2,4,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==46 and d>=0 and d<=660: + c_49=1 + c_51=3 + c_53=1 + c_55=3 + c_57=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=2,2,4,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==47 and d>=0 and d<=660: + c_49=1 + c_51=1 + c_53=3 + c_55=3 + c_57=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=2,2,4,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==48 and d>=0 and d<=660: + c_49=3 + c_51=3 + c_53=1 + c_55=1 + c_57=1 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=2,2,4,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==49 and d>=0 and d<=660: + c_49=3 + c_51=1 + c_53=3 + c_55=1 + c_57=1 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=2,2,4,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==50 and d>=0 and d<=660: + c_49=3 + c_51=1 + c_53=1 + c_55=3 + c_57=1 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=2,2,4,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==51 and d>=0 and d<=660: + c_49=3 + c_51=1 + c_53=1 + c_55=1 + c_57=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=2,2,4,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==52 and d>=0 and d<=660: + c_49=1 + c_51=3 + c_53=3 + c_55=1 + c_57=1 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=2,2,4,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==53 and d>=0 and d<=660: + c_49=1 + c_51=3 + c_53=1 + c_55=3 + c_57=1 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=2,2,4,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==54 and d>=0 and d<=660: + c_49=1 + c_51=3 + c_53=1 + c_55=1 + c_57=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=2,2,4,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==55 and d>=0 and d<=660: + c_49=1 + c_51=1 + c_53=3 + c_55=3 + c_57=1 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=2,2,4,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==56 and d>=0 and d<=660: + c_49=1 + c_51=1 + c_53=3 + c_55=1 + c_57=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=2,2,4,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==57 and d>=0 and d<=660: + c_49=1 + c_51=1 + c_53=1 + c_55=3 + c_57=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=2,2,4,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==58 and d>=0 and d<=660: + c_49=3 + c_51=1 + c_53=1 + c_55=1 + c_57=1 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=2,2,4,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==59 and d>=0 and d<=660: + c_49=1 + c_51=3 + c_53=1 + c_55=1 + c_57=1 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=2,2,4,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==60 and d>=0 and d<=660: + c_49=1 + c_51=1 + c_53=3 + c_55=1 + c_57=1 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=2,2,4,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==61 and d>=0 and d<=660: + c_49=1 + c_51=1 + c_53=1 + c_55=3 + c_57=1 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=2,2,4,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==62 and d>=0 and d<=660: + c_49=1 + c_51=1 + c_53=1 + c_55=1 + c_57=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=2,2,4,2,2 + c_94,c_96,c_98,c_100,c_102=2,2,2,2,2 + c_122=2 + elif b==63 and d>=0 and d<=660: + c_65=3 + c_67=3 + c_69=3 + c_71=3 + c_73=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_94,c_96,c_98,c_100,c_102=2,2,4,2,2 + c_122=2 + elif b==64 and d>=0 and d<=660: + c_65=3 + c_67=3 + c_69=3 + c_71=3 + c_73=1 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_94,c_96,c_98,c_100,c_102=2,2,4,2,2 + c_122=2 + elif b==65 and d>=0 and d<=660: + c_65=3 + c_67=3 + c_69=3 + c_71=1 + c_73=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_94,c_96,c_98,c_100,c_102=2,2,4,2,2 + c_122=2 + elif b==66 and d>=0 and d<=660: + c_65=3 + c_67=3 + c_69=1 + c_71=3 + c_73=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_94,c_96,c_98,c_100,c_102=2,2,4,2,2 + c_122=2 + elif b==67 and d>=0 and d<=660: + c_65=3 + c_67=1 + c_69=3 + c_71=3 + c_73=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_94,c_96,c_98,c_100,c_102=2,2,4,2,2 + c_122=2 + elif b==68 and d>=0 and d<=660: + c_65=1 + c_67=3 + c_69=3 + c_71=3 + c_73=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_94,c_96,c_98,c_100,c_102=2,2,4,2,2 + c_122=2 + elif b==69 and d>=0 and d<=660: + c_65=3 + c_67=3 + c_69=3 + c_71=1 + c_73=1 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_94,c_96,c_98,c_100,c_102=2,2,4,2,2 + c_122=2 + elif b==70 and d>=0 and d<=660: + c_65=3 + c_67=3 + c_69=1 + c_71=3 + c_73=1 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_94,c_96,c_98,c_100,c_102=2,2,4,2,2 + c_122=2 + elif b==71 and d>=0 and d<=660: + c_65=3 + c_67=1 + c_69=3 + c_71=3 + c_73=1 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_94,c_96,c_98,c_100,c_102=2,2,4,2,2 + c_122=2 + elif b==72 and d>=0 and d<=660: + c_65=1 + c_67=3 + c_69=3 + c_71=3 + c_73=1 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_94,c_96,c_98,c_100,c_102=2,2,4,2,2 + c_122=2 + elif b==73 and d>=0 and d<=660: + c_65=3 + c_67=3 + c_69=1 + c_71=1 + c_73=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_94,c_96,c_98,c_100,c_102=2,2,4,2,2 + c_122=2 + elif b==74 and d>=0 and d<=660: + c_65=3 + c_67=1 + c_69=3 + c_71=1 + c_73=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_94,c_96,c_98,c_100,c_102=2,2,4,2,2 + c_122=2 + elif b==75 and d>=0 and d<=660: + c_65=1 + c_67=3 + c_69=3 + c_71=1 + c_73=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_94,c_96,c_98,c_100,c_102=2,2,4,2,2 + c_122=2 + elif b==76 and d>=0 and d<=660: + c_65=3 + c_67=1 + c_69=1 + c_71=3 + c_73=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_94,c_96,c_98,c_100,c_102=2,2,4,2,2 + c_122=2 + elif b==77 and d>=0 and d<=660: + c_65=1 + c_67=3 + c_69=1 + c_71=3 + c_73=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_94,c_96,c_98,c_100,c_102=2,2,4,2,2 + c_122=2 + elif b==78 and d>=0 and d<=660: + c_65=1 + c_67=1 + c_69=3 + c_71=3 + c_73=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_94,c_96,c_98,c_100,c_102=2,2,4,2,2 + c_122=2 + elif b==79 and d>=0 and d<=660: + c_65=3 + c_67=3 + c_69=1 + c_71=1 + c_73=1 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_94,c_96,c_98,c_100,c_102=2,2,4,2,2 + c_122=2 + elif b==80 and d>=0 and d<=660: + c_65=3 + c_67=1 + c_69=3 + c_71=1 + c_73=1 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_94,c_96,c_98,c_100,c_102=2,2,4,2,2 + c_122=2 + elif b==81 and d>=0 and d<=660: + c_65=3 + c_67=1 + c_69=1 + c_71=3 + c_73=1 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_94,c_96,c_98,c_100,c_102=2,2,4,2,2 + c_122=2 + elif b==82 and d>=0 and d<=660: + c_65=3 + c_67=1 + c_69=1 + c_71=1 + c_73=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_94,c_96,c_98,c_100,c_102=2,2,4,2,2 + c_122=2 + elif b==83 and d>=0 and d<=660: + c_65=1 + c_67=3 + c_69=3 + c_71=1 + c_73=1 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_94,c_96,c_98,c_100,c_102=2,2,4,2,2 + c_122=2 + elif b==84 and d>=0 and d<=660: + c_65=1 + c_67=3 + c_69=1 + c_71=3 + c_73=1 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_94,c_96,c_98,c_100,c_102=2,2,4,2,2 + c_122=2 + elif b==85 and d>=0 and d<=660: + c_65=1 + c_67=3 + c_69=1 + c_71=1 + c_73=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_94,c_96,c_98,c_100,c_102=2,2,4,2,2 + c_122=2 + elif b==86 and d>=0 and d<=660: + c_65=1 + c_67=1 + c_69=3 + c_71=3 + c_73=1 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_94,c_96,c_98,c_100,c_102=2,2,4,2,2 + c_122=2 + elif b==87 and d>=0 and d<=660: + c_65=1 + c_67=1 + c_69=3 + c_71=1 + c_73=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_94,c_96,c_98,c_100,c_102=2,2,4,2,2 + c_122=2 + elif b==88 and d>=0 and d<=660: + c_65=1 + c_67=1 + c_69=1 + c_71=3 + c_73=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_94,c_96,c_98,c_100,c_102=2,2,4,2,2 + c_122=2 + elif b==89 and d>=0 and d<=660: + c_65=3 + c_67=1 + c_69=1 + c_71=1 + c_73=1 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_94,c_96,c_98,c_100,c_102=2,2,4,2,2 + c_122=2 + elif b==90 and d>=0 and d<=660: + c_65=1 + c_67=3 + c_69=1 + c_71=1 + c_73=1 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_94,c_96,c_98,c_100,c_102=2,2,4,2,2 + c_122=2 + elif b==91 and d>=0 and d<=660: + c_65=1 + c_67=1 + c_69=3 + c_71=1 + c_73=1 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_94,c_96,c_98,c_100,c_102=2,2,4,2,2 + c_122=2 + elif b==92 and d>=0 and d<=660: + c_65=1 + c_67=1 + c_69=1 + c_71=3 + c_73=1 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_94,c_96,c_98,c_100,c_102=2,2,4,2,2 + c_122=2 + elif b==93 and d>=0 and d<=660: + c_65=1 + c_67=1 + c_69=1 + c_71=1 + c_73=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_94,c_96,c_98,c_100,c_102=2,2,4,2,2 + c_122=2 + elif b==94 and d>=0 and d<=660: + c_94=3 + c_96=3 + c_98=3 + c_100=3 + c_102=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=1,1,1,1,1 + c_122=4 + elif b==95 and d>=0 and d<=660: + c_94=3 + c_96=3 + c_98=3 + c_100=3 + c_102=1 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=1,1,1,1,1 + c_122=4 + elif b==96 and d>=0 and d<=660: + c_94=3 + c_96=3 + c_98=3 + c_100=1 + c_102=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=1,1,1,1,1 + c_122=4 + elif b==97 and d>=0 and d<=660: + c_94=3 + c_96=3 + c_98=1 + c_100=3 + c_102=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=1,1,1,1,1 + c_122=4 + elif b==98 and d>=0 and d<=660: + c_94=3 + c_96=1 + c_98=3 + c_100=3 + c_102=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=1,1,1,1,1 + c_122=4 + elif b==99 and d>=0 and d<=660: + c_94=1 + c_96=3 + c_98=3 + c_100=3 + c_102=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=1,1,1,1,1 + c_122=4 + elif b==100 and d>=0 and d<=660: + c_94=3 + c_96=3 + c_98=3 + c_100=1 + c_102=1 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=1,1,1,1,1 + c_122=4 + elif b==101 and d>=0 and d<=660: + c_94=3 + c_96=3 + c_98=1 + c_100=3 + c_102=1 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=1,1,1,1,1 + c_122=4 + elif b==102 and d>=0 and d<=660: + c_94=3 + c_96=1 + c_98=3 + c_100=3 + c_102=1 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=1,1,1,1,1 + c_122=4 + elif b==103 and d>=0 and d<=660: + c_94=1 + c_96=3 + c_98=3 + c_100=3 + c_102=1 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=1,1,1,1,1 + c_122=4 + elif b==104 and d>=0 and d<=660: + c_94=3 + c_96=3 + c_98=1 + c_100=1 + c_102=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=1,1,1,1,1 + c_122=4 + elif b==105 and d>=0 and d<=660: + c_94=3 + c_96=1 + c_98=3 + c_100=1 + c_102=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=1,1,1,1,1 + c_122=4 + elif b==106 and d>=0 and d<=660: + c_94=1 + c_96=3 + c_98=3 + c_100=1 + c_102=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=1,1,1,1,1 + c_122=4 + elif b==107 and d>=0 and d<=660: + c_94=3 + c_96=1 + c_98=1 + c_100=3 + c_102=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=1,1,1,1,1 + c_122=4 + elif b==108 and d>=0 and d<=660: + c_94=1 + c_96=3 + c_98=1 + c_100=3 + c_102=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=1,1,1,1,1 + c_122=4 + elif b==109 and d>=0 and d<=660: + c_94=1 + c_96=1 + c_98=3 + c_100=3 + c_102=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=1,1,1,1,1 + c_122=4 + elif b==110 and d>=0 and d<=660: + c_94=3 + c_96=3 + c_98=1 + c_100=1 + c_102=1 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=1,1,1,1,1 + c_122=4 + elif b==111 and d>=0 and d<=660: + c_94=3 + c_96=1 + c_98=3 + c_100=1 + c_102=1 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=1,1,1,1,1 + c_122=4 + elif b==112 and d>=0 and d<=660: + c_94=3 + c_96=1 + c_98=1 + c_100=3 + c_102=1 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=1,1,1,1,1 + c_122=4 + elif b==113 and d>=0 and d<=660: + c_94=3 + c_96=1 + c_98=1 + c_100=1 + c_102=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=1,1,1,1,1 + c_122=4 + elif b==114 and d>=0 and d<=660: + c_94=1 + c_96=3 + c_98=3 + c_100=1 + c_102=1 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=1,1,1,1,1 + c_122=4 + elif b==115 and d>=0 and d<=660: + c_94=1 + c_96=3 + c_98=1 + c_100=3 + c_102=1 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=1,1,1,1,1 + c_122=4 + elif b==116 and d>=0 and d<=660: + c_94=1 + c_96=3 + c_98=1 + c_100=1 + c_102=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=1,1,1,1,1 + c_122=4 + elif b==117 and d>=0 and d<=660: + c_94=1 + c_96=1 + c_98=3 + c_100=3 + c_102=1 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=1,1,1,1,1 + c_122=4 + elif b==118 and d>=0 and d<=660: + c_94=1 + c_96=1 + c_98=3 + c_100=1 + c_102=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=1,1,1,1,1 + c_122=4 + elif b==119 and d>=0 and d<=660: + c_94=1 + c_96=1 + c_98=1 + c_100=3 + c_102=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=1,1,1,1,1 + c_122=4 + elif b==120 and d>=0 and d<=660: + c_94=3 + c_96=1 + c_98=1 + c_100=1 + c_102=1 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=1,1,1,1,1 + c_122=4 + elif b==121 and d>=0 and d<=660: + c_94=1 + c_96=3 + c_98=1 + c_100=1 + c_102=1 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=1,1,1,1,1 + c_122=4 + elif b==122 and d>=0 and d<=660: + c_94=1 + c_96=1 + c_98=3 + c_100=1 + c_102=1 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=1,1,1,1,1 + c_122=4 + elif b==123 and d>=0 and d<=660: + c_94=1 + c_96=1 + c_98=1 + c_100=3 + c_102=1 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=1,1,1,1,1 + c_122=4 + elif b==124 and d>=0 and d<=660: + c_94=1 + c_96=1 + c_98=1 + c_100=1 + c_102=3 + c_28,c_30,c_32,c_34,c_36=1,1,1,1,1 + c_49,c_51,c_53,c_55,c_57=1,1,1,1,1 + c_65,c_67,c_69,c_71,c_73=1,1,1,1,1 + c_122=4 + elif d>=0 and d<=1000: + c_28,c_30,c_32,c_34,c_36=5,5,5,5,5 + c_49,c_51,c_53,c_55,c_57=5,5,5,5,5 + c_65,c_67,c_69,c_71,c_73=5,5,5,5,5 + c_94,c_96,c_98,c_100,c_102=5,5,5,5,5 + c_122=5 + elif d>=2000: + c_28,c_30,c_32,c_34,c_36=6,6,6,6,6 + c_49,c_51,c_53,c_55,c_57=6,6,6,6,6 + c_65,c_67,c_69,c_71,c_73=6,6,6,6,6 + c_94,c_96,c_98,c_100,c_102=6,6,6,6,6 + c_122=6 + else: + c_28,c_30,c_32,c_34,c_36=7,7,7,7,7 + c_49,c_51,c_53,c_55,c_57=7,7,7,7,7 + c_65,c_67,c_69,c_71,c_73=7,7,7,7,7 + c_94,c_96,c_98,c_100,c_102=7,7,7,7,7 + c_122=7 + return([c_28,c_30,c_32,c_34,c_36,c_49,c_51,c_53,c_55,c_57,c_65,c_67,c_69,c_71,c_73,c_94,c_96,c_98,c_100,c_102,c_122]) + + b1=int(st1) + b2=int(st2) + b3=int(sp1) + b4=int(sp2) + b5=int(dt1) + b6=int(dt2) + b7=int(mon1) + b8=int(ye1) + if b1>=0 and b1<=9: + c1="0"+str(b1) + else: + c1=str(b1) + if b2==0: + c2="00" + else: + c2="30" + if b3>=0 and b3<=9: + c3="0"+str(b3) + else: + c3=str(b3) + if b4==0: + c4="00" + else: + c4="30" + if b5>=0 and b5<=9: + c5="0"+str(b5) + else: + c5=str(b5) + if b6>=0 and b6<=9: + c6="0"+str(b6) + else: + c6=str(b6) + if b7>=0 and b7<=9: + c7="0"+str(b7) + else: + c7=str(b7) + c8=str(b8) + st=c1+c2 + sp=c3+c4 + dt=c5 + dp=c6 + mon=c7 + yer=c8 + f1=cdf.Dataset("/apollo/jung/snebuda/brianne/2021/cris.431.n20."+yer+mon+dt+"_"+st+"00."+yer+mon+dp+"_"+sp+"00.bt.nc") + f2=cdf.Dataset("/apollo/jung/snebuda/brianne/2021/cris.431.n20."+yer+mon+dt+"_"+st+"00."+yer+mon+dp+"_"+sp+"00.wf.nc") + f3=cdf.Dataset("/apollo/jung/snebuda/brianne/2021/cris.431.n20."+yer+mon+dt+"_"+st+"00."+yer+mon+dp+"_"+sp+"00.state.nc") + f4=cdf.Dataset("/apollo/jung/snebuda/brianne/2021/cris.431.n20."+yer+mon+dt+"_"+st+"00."+yer+mon+dp+"_"+sp+"00.te.nc") + day_time=(yer+"_"+mon+"_"+dt+"_"+st+"_"+sp) + output=("/apollo/jung/bandersen/co2_slicing_full/"+yer+"_"+mon+"_"+dt+"/co2_slicing_output_"+day_time+".txt") + da=f1['date'][:] + la=f1['lat'][:] + lo=f1['lon'][:] + fo=f1['solzen'][:] + fv=f1['fovn'][:] + tc=f1['tocc'][:] + to=f1['lsql'][:] + lf=f1['alfr'][:] + pv=f1['hoct'][:] + bi=f1['bias_gfs'][:] + us=f1['useflag'][:] + ob=f1['tb_obs'][:] + cr=f1['tb_clear'][:] + wf=f2['wf'][:] + pr=f3['pmid'][:] + te=f3['temp'][:] + ta=f4['ptau5'][:] + si=np.size(la) + viirs_ctp=[] + viirs_cot=[] + co2_ctp=[] + co2_cot=[] + co2_level=[] + trop_all=[] + ir_test=[] + use_28=[] + use_30=[] + use_32=[] + use_34=[] + use_36=[] + use_49=[] + use_51=[] + use_53=[] + use_55=[] + use_57=[] + use_65=[] + use_67=[] + use_69=[] + use_71=[] + use_73=[] + use_94=[] + use_96=[] + use_98=[] + use_100=[] + use_102=[] + use_122=[] + obs_crtm_28=[] + obs_crtm_30=[] + obs_crtm_32=[] + obs_crtm_34=[] + obs_crtm_36=[] + obs_crtm_49=[] + obs_crtm_51=[] + obs_crtm_53=[] + obs_crtm_55=[] + obs_crtm_57=[] + obs_crtm_65=[] + obs_crtm_67=[] + obs_crtm_69=[] + obs_crtm_71=[] + obs_crtm_73=[] + obs_crtm_94=[] + obs_crtm_96=[] + obs_crtm_98=[] + obs_crtm_100=[] + obs_crtm_102=[] + obs_crtm_122=[] + obs_crtm_216=[] + obs_28=[] + obs_30=[] + obs_32=[] + obs_34=[] + obs_36=[] + obs_49=[] + obs_51=[] + obs_53=[] + obs_55=[] + obs_57=[] + obs_65=[] + obs_67=[] + obs_69=[] + obs_71=[] + obs_73=[] + obs_94=[] + obs_96=[] + obs_98=[] + obs_100=[] + obs_102=[] + obs_122=[] + obs_216=[] + for a in range(0,si): + b=h2p(pv[a]) + c=tc[a] + d=pressure_co2(a,bi,cr,da,la,ob,pr,ta,te,to) +# e=optics(a,ob,cr,te,bi) + e=optics(a,ob,cr,te,bi,pr,d) + g=level(a,cr,ob,bi,te) + h=pr[a][trop(a,pr,te,da,la)] + j=ir_test_ctp(a,ob,te,pr) + k1,k2,k3,k4,k5,k6,k7,k8,k9,k10,k11,k12,k13,k14,k15,k16,k17,k18,k19,k20,k21=chan_used(a,bi,cr,da,la,ob,pr,ta,te,to) + l1=co2(a,28,cr,ob,bi) + l2=co2(a,30,cr,ob,bi) + l3=co2(a,32,cr,ob,bi) + l4=co2(a,34,cr,ob,bi) + l5=co2(a,36,cr,ob,bi) + l6=co2(a,49,cr,ob,bi) + l7=co2(a,51,cr,ob,bi) + l8=co2(a,53,cr,ob,bi) + l9=co2(a,55,cr,ob,bi) + l10=co2(a,57,cr,ob,bi) + l11=co2(a,65,cr,ob,bi) + l12=co2(a,67,cr,ob,bi) + l13=co2(a,69,cr,ob,bi) + l14=co2(a,71,cr,ob,bi) + l15=co2(a,73,cr,ob,bi) + l16=co2(a,94,cr,ob,bi) + l17=co2(a,96,cr,ob,bi) + l18=co2(a,98,cr,ob,bi) + l19=co2(a,100,cr,ob,bi) + l20=co2(a,102,cr,ob,bi) + l21=co2(a,122,cr,ob,bi) + l22=co2(a,216,cr,ob,bi) + m1=ob[a][28] + m2=ob[a][30] + m3=ob[a][32] + m4=ob[a][34] + m5=ob[a][36] + m6=ob[a][49] + m7=ob[a][51] + m8=ob[a][53] + m9=ob[a][55] + m10=ob[a][57] + m11=ob[a][65] + m12=ob[a][67] + m13=ob[a][69] + m14=ob[a][71] + m15=ob[a][73] + m16=ob[a][94] + m17=ob[a][96] + m18=ob[a][98] + m19=ob[a][100] + m20=ob[a][102] + m21=ob[a][122] + m22=ob[a][216] + viirs_ctp.append(b) + viirs_cot.append(c) + co2_ctp.append(d) + co2_cot.append(e) + co2_level.append(g) + trop_all.append(h) + ir_test.append(j) + use_28.append(k1) + use_30.append(k2) + use_32.append(k3) + use_34.append(k4) + use_36.append(k5) + use_49.append(k6) + use_51.append(k7) + use_53.append(k8) + use_55.append(k9) + use_57.append(k10) + use_65.append(k11) + use_67.append(k12) + use_69.append(k13) + use_71.append(k14) + use_73.append(k15) + use_94.append(k16) + use_96.append(k17) + use_98.append(k18) + use_100.append(k19) + use_102.append(k20) + use_122.append(k21) + obs_crtm_28.append(l1) + obs_crtm_30.append(l2) + obs_crtm_32.append(l3) + obs_crtm_34.append(l4) + obs_crtm_36.append(l5) + obs_crtm_49.append(l6) + obs_crtm_51.append(l7) + obs_crtm_53.append(l8) + obs_crtm_55.append(l9) + obs_crtm_57.append(l10) + obs_crtm_65.append(l11) + obs_crtm_67.append(l12) + obs_crtm_69.append(l13) + obs_crtm_71.append(l14) + obs_crtm_73.append(l15) + obs_crtm_94.append(l16) + obs_crtm_96.append(l17) + obs_crtm_98.append(l18) + obs_crtm_100.append(l19) + obs_crtm_102.append(l20) + obs_crtm_122.append(l21) + obs_crtm_216.append(l22) + obs_28.append(m1) + obs_30.append(m2) + obs_32.append(m3) + obs_34.append(m4) + obs_36.append(m5) + obs_49.append(m6) + obs_51.append(m7) + obs_53.append(m8) + obs_55.append(m9) + obs_57.append(m10) + obs_65.append(m11) + obs_67.append(m12) + obs_69.append(m13) + obs_71.append(m14) + obs_73.append(m15) + obs_94.append(m16) + obs_96.append(m17) + obs_98.append(m18) + obs_100.append(m19) + obs_102.append(m20) + obs_122.append(m21) + obs_216.append(m22) + file=open(output,"w+") + with open(output,'wb') as f: + for a in range(0,si): + z=np.array([la[a],lo[a],to[a],fo[a],fv[a],viirs_ctp[a],viirs_cot[a],co2_ctp[a],co2_cot[a],co2_level[a],trop_all[a],ir_test[a],use_28[a],use_30[a],use_32[a],use_34[a],use_36[a],use_49[a],use_51[a],use_53[a],use_55[a],use_57[a],use_65[a],use_67[a],use_69[a],use_71[a],use_73[a],use_94[a],use_96[a],use_98[a],use_100[a],use_102[a],use_122[a],obs_crtm_28[a],obs_crtm_30[a],obs_crtm_32[a],obs_crtm_34[a],obs_crtm_36[a],obs_crtm_49[a],obs_crtm_51[a],obs_crtm_53[a],obs_crtm_55[a],obs_crtm_57[a],obs_crtm_65[a],obs_crtm_67[a],obs_crtm_69[a],obs_crtm_71[a],obs_crtm_73[a],obs_crtm_94[a],obs_crtm_96[a],obs_crtm_98[a],obs_crtm_100[a],obs_crtm_102[a],obs_crtm_122[a],obs_crtm_216[a],obs_28[a],obs_30[a],obs_32[a],obs_34[a],obs_36[a],obs_49[a],obs_51[a],obs_53[a],obs_55[a],obs_57[a],obs_65[a],obs_67[a],obs_69[a],obs_71[a],obs_73[a],obs_94[a],obs_96[a],obs_98[a],obs_100[a],obs_102[a],obs_122[a],obs_216[a]]) + np.savetxt(f,z,fmt=' 1.7f',newline=" ") + np.savetxt(f,[-8888],fmt=' d',newline=" ") + f.close() + f=open(output,"rt") + r=f.read() + r=r.replace("-8888","\n") + r=r.replace(" -","-") + r=r.replace("ift","888888") + r=r.replace("nan","-9999") + r=r.replace(" ",",") + r=r.replace(","+"\n","\n") + r=r.replace("\n"+",","\n") + r=r.replace("0-","0,-") + r=r.replace("1-","1,-") + r=r.replace("2-","2,-") + r=r.replace("3-","3,-") + r=r.replace("4-","4,-") + r=r.replace("5-","5,-") + r=r.replace("6-","6,-") + r=r.replace("7-","7,-") + r=r.replace("8-","8,-") + r=r.replace("9-","9,-") + f.close() + f=open(output,"wt") + f.write(r) + f.close() + return("doneer") diff --git a/codes/map_funcs.py b/codes/map_funcs.py new file mode 100644 index 0000000000000000000000000000000000000000..9b871891273bcc1f0eef28a783ffb2952215feb3 --- /dev/null +++ b/codes/map_funcs.py @@ -0,0 +1,1441 @@ +#Run before in terminal: module load license_intel intel hdf hdf5 netcdf4 miniconda + +### This code provided the functions used to make the map type plots shown in the thesis and ### +### analysis for Brianne Andersen's Master's work. ### + +from datetime import datetime +start_time=datetime.now() + +import matplotlib +matplotlib.use("AGG") +import matplotlib.pyplot as plt +import numpy as np +import h5py as h +import os +import sys +import cartopy +import cartopy.crs as ccrs +import matplotlib.colors as colors +import matplotlib.patches as patches +import matplotlib.ticker as mticker +from numpy import loadtxt +from cartopy.mpl.gridliner import LONGITUDE_FORMATTER, LATITUDE_FORMATTER +from datetime import date +from shutil import copyfile +import shutil +import netCDF4 as cdf + +extent=[-180,180,-90,90] +x_ticks1=[-180,-165,-150,-135,-120,-105,-90,-75,-60,-45,-30,-15,0,15,30,45,60,75,90,105,120,135,150,165,180] +y_ticks1=[-90,-75,-60,-45,-30,-15,0,15,30,45,60,75,90] +x_ticks2=[-180,-135,-90,-45,0,45,90,135,180] +y_ticks2=[-90,-60,-30,0,30,60,90] + +#Type codes are as follows: +#1=CO2 Slicing maps +#2=NCEP Algorithm +#3=DR +#this code can be modified to exclude or include certain boundaries (such as CTP above 300 hPa) by adding addtional +#np.where(ctpc<=50,2500,ctpc) phrases +def ctp_maps(yr,mn,dy,type): + b1=int(dy) + b2=int(mn) + b3=int(yr) + if b1>=0 and b1<=9: + c1="0"+str(b1) + else: + c1=str(b1) + if b2>=0 and b2<=9: + c2="0"+str(b2) + else: + c2=str(b2) + c3=str(b3) + day=c1 + mon=c2 + yer=c3 + day_time=(yer+'_'+mon+'_'+day) + if type==1: + file=("/apollo/jung/bandersen/compare_full_no_parts/co2_ncep_output_"+day_time+"_24hr.txt") + array=loadtxt(file,comments='#',delimiter=',',unpack=True) + filepath=("/home/bandersen/iris-home/all_algorithms/image_output") + day_label=(r+day_time+'\n') + lat=array[0][:] + lon=array[1][:] + ctpc=array[9][:] + ctpc=np.where(ctpc<=50,2500,ctpc) + ctpc[ctpc>=850]=np.nan + ctpc_cld=[] + for i in range(0,size): + a=ctpc[i] + ctpc_cld.append(a) + ctpc=array[9][:] + ctpc=np.where(ctpc<=1900,2200,ctpn) + ctpc[ctpc>=2050]=np.nan + ctpc_no_cld_co2=[] + for i in range(0,size): + a=ctpc[i] + ctpc_no_cld_co2.append(a) + ctpc=array[9][:] + ctpc=np.where(ctpc<=1999,0,ctpc) + ctpc[ctpc<=0]=np.nan + ctpc_error=[] + for i in range(0,size): + a=ctpc[i] + ctpc_error.append(a) + fig=plt.figure() + proj=ccrs.PlateCarree() + ax=plt.axes(projection=proj) + ax.add_feature(cartopy.feature.OCEAN,zorder=0,alpha=0.5,facecolor='lightskyblue') + ax.add_feature(cartopy.feature.BORDERS,edgecolor='slategray') + ax.add_feature(cartopy.feature.COASTLINE,edgecolor='black') + ax.add_feature(cartopy.feature.LAND,zorder=0,edgecolor='black',alpha=0.5,facecolor='beige') + ax.set_extent(extent,crs=proj) + gl=ax.gridlines(crs=proj,linewidth=2,color='grey',alpha=0.5,linestyle='--',draw_labels=True) + gl.xlocator=mticker.FixedLocator(x_ticks1) + gl.ylocator=mticker.FixedLocator(y_ticks1) + gl.xlabels_top=False + gl.xlabels_bottom=False + gl.ylabels_right=False + gl.ylabels_left=False + gl.xlines=True + gl.xformatter=LONGITUDE_FORMATTER + gl.yformatter=LATITUDE_FORMATTER + gl.xlabel_style={'color':'red','weight':'bold','size':'40'} + gl.ylabel_style={'color':'red','weight':'bold','size':'40'} + g2=ax.gridlines(crs=proj,linewidth=2,color='grey',alpha=0.5,linestyle='--',draw_labels=True) + g2.xlocator=mticker.FixedLocator(x_ticks2) + g2.ylocator=mticker.FixedLocator(y_ticks2) + g2.xlabels_bottom=False + g2.ylabels_right=False + g2.ylabels_left=True + g2.xlines=True + g2.xformatter=LONGITUDE_FORMATTER + g2.yformatter=LATITUDE_FORMATTER + g2.xlabel_style={'color':'black','weight':'bold','size':'14'} + g2.ylabel_style={'color':'black','weight':'bold','size':'14'} + plt.scatter(lon,lat,c=ctpc_no_cld_co2,cmap='gist_yarg',s=0.05,vmin=1999,vmax=5000) + data=plt.scatter(lon,lat,c=ctpc_cld,cmap='gist_rainbow',s=0.05,vmin=50,vmax=950) + plt.title('24-hour CO2 Slicing Cloud Top Pressure Calculation'+'\n'+day_label+'\n',fontsize=22,weight='bold') + cb=plt.colorbar(data,aspect=25,fraction=.025,pad=.04,orientation='horizontal') + cb.set_label(label='\nPressure [hPa]',fontsize=18) + cb.ax.tick_params(labelsize=16) + filepth=(filepath+"/ctp_co2_"+day_time+".png") + fig.set_size_inches(12,8.75) + plt.savefig(filepth,dpi=fig.dpi,bbox_inches='tight') + elif type==2: + file=("/apollo/jung/bandersen/compare_full_no_parts/co2_ncep_output_"+day_time+"_24hr.txt") + array=loadtxt(file,comments='#',delimiter=',',unpack=True) + filepath=("/home/bandersen/iris-home/all_algorithms/image_output") + day_label=(r+day_time+'\n') + lat=array[0][:] + lon=array[1][:] + ctpn=array[11][:] + ctpn=np.where(ctpn<=50,100,ctpn) + ctpn[ctpn>=850]=np.nan + ctpn_cld=[] + for i in range(0,size): + a=ctpn[i] + ctpn_cld.append(a) + ctpn=array[11][:] + ctpn=np.where(ctpn<=1900,2200,ctpn) + ctpn[ctpn>=2050]=np.nan + ctpn_no_cld_ncep=[] + for i in range(0,size): + a=ctpn[i] + ctpn_no_cld_ncep.append(a) + ctpn=array[11][:] + ctpn=np.where(ctpn<=1999,0,ctpn) + ctpn[ctpn<=0]=np.nan + ctpn_error=[] + for i in range(0,size): + a=ctpn[i] + ctpn_error.append(a) + fig=plt.figure() + proj=ccrs.PlateCarree() + ax=plt.axes(projection=proj) + ax.add_feature(cartopy.feature.OCEAN,zorder=0,alpha=0.5,facecolor='lightskyblue') + ax.add_feature(cartopy.feature.BORDERS,edgecolor='slategray') + ax.add_feature(cartopy.feature.COASTLINE,edgecolor='black') + ax.add_feature(cartopy.feature.LAND,zorder=0,edgecolor='black',alpha=0.5,facecolor='beige') + ax.set_extent(extent,crs=proj) + gl=ax.gridlines(crs=proj,linewidth=2,color='grey',alpha=0.5,linestyle='--',draw_labels=True) + gl.xlocator=mticker.FixedLocator(x_ticks1) + gl.ylocator=mticker.FixedLocator(y_ticks1) + gl.xlabels_top=False + gl.xlabels_bottom=False + gl.ylabels_right=False + gl.ylabels_left=False + gl.xlines=True + gl.xformatter=LONGITUDE_FORMATTER + gl.yformatter=LATITUDE_FORMATTER + gl.xlabel_style={'color':'red','weight':'bold','size':'40'} + gl.ylabel_style={'color':'red','weight':'bold','size':'40'} + g2=ax.gridlines(crs=proj,linewidth=2,color='grey',alpha=0.5,linestyle='--',draw_labels=True) + g2.xlocator=mticker.FixedLocator(x_ticks2) + g2.ylocator=mticker.FixedLocator(y_ticks2) + g2.xlabels_bottom=False + g2.ylabels_right=False + g2.ylabels_left=True + g2.xlines=True + g2.xformatter=LONGITUDE_FORMATTER + g2.yformatter=LATITUDE_FORMATTER + g2.xlabel_style={'color':'black','weight':'bold','size':'14'} + g2.ylabel_style={'color':'black','weight':'bold','size':'14'} + plt.scatter(lon,lat,c=ctpn_no_cld_ncep,cmap='gist_yarg',s=0.05,vmin=1999,vmax=5000) + data=plt.scatter(lon,lat,c=ctpn_cld,cmap='gist_rainbow',s=0.05,vmin=50,vmax=950) + plt.title('24-hour NCEP Algorithm Cloud Top Pressure Calculation'+'\n'+day_label+'\n',fontsize=22,weight='bold') + cb=plt.colorbar(data,aspect=25,fraction=.025,pad=.04,orientation='horizontal') + cb.set_label(label='\nPressure [hPa]',fontsize=18) + cb.ax.tick_params(labelsize=16) + filepth=(filepath+"/ctp_ncep_"+day_time+".png") + fig.set_size_inches(12,8.75) + plt.savefig(filepth,dpi=fig.dpi,bbox_inches='tight') + elif type==3: + file=("/apollo/jung/bandersen/compare_full_no_parts/co2_dr_ncep_ecmwf_output_"+day_time+"_24hr.txt") + array=loadtxt(file,comments='#',delimiter=',',unpack=True) + filepath=("/home/bandersen/iris-home/all_algorithms/image_output") + day_label=(r+day_time+'\n') + lat=array[0][:] + lon=array[1][:] + ctpd=array[10][:] + ctpd=np.where(ctpd<=50,100,ctpd) + ctpd[ctpd>=850]=np.nan + ctpd_cld=[] + for i in range(0,size): + a=ctpd[i] + ctpd_cld.append(a) + ctpd=array[10][:] + ctpd=np.where(ctpd<=1900,2200,ctpd) + ctpd[ctpd>=2050]=np.nan + ctpd_no_cld_dr=[] + for i in range(0,size): + a=ctpd[i] + ctpd_no_cld_co2.append(a) + ctpd=array[10][:] + ctpd=np.where(ctpd<=1999,0,ctpd) + ctpd[ctpd<=0]=np.nan + ctpd_error=[] + for i in range(0,size): + a=ctpd[i] + ctpd_error.append(a) + fig=plt.figure() + proj=ccrs.PlateCarree() + ax=plt.axes(projection=proj) + ax.add_feature(cartopy.feature.OCEAN,zorder=0,alpha=0.5,facecolor='lightskyblue') + ax.add_feature(cartopy.feature.BORDERS,edgecolor='slategray') + ax.add_feature(cartopy.feature.COASTLINE,edgecolor='black') + ax.add_feature(cartopy.feature.LAND,zorder=0,edgecolor='black',alpha=0.5,facecolor='beige') + ax.set_extent(extent,crs=proj) + gl=ax.gridlines(crs=proj,linewidth=2,color='grey',alpha=0.5,linestyle='--',draw_labels=True) + gl.xlocator=mticker.FixedLocator(x_ticks1) + gl.ylocator=mticker.FixedLocator(y_ticks1) + gl.xlabels_top=False + gl.xlabels_bottom=False + gl.ylabels_right=False + gl.ylabels_left=False + gl.xlines=True + gl.xformatter=LONGITUDE_FORMATTER + gl.yformatter=LATITUDE_FORMATTER + gl.xlabel_style={'color':'red','weight':'bold','size':'40'} + gl.ylabel_style={'color':'red','weight':'bold','size':'40'} + g2=ax.gridlines(crs=proj,linewidth=2,color='grey',alpha=0.5,linestyle='--',draw_labels=True) + g2.xlocator=mticker.FixedLocator(x_ticks2) + g2.ylocator=mticker.FixedLocator(y_ticks2) + g2.xlabels_bottom=False + g2.ylabels_right=False + g2.ylabels_left=True + g2.xlines=True + g2.xformatter=LONGITUDE_FORMATTER + g2.yformatter=LATITUDE_FORMATTER + g2.xlabel_style={'color':'black','weight':'bold','size':'14'} + g2.ylabel_style={'color':'black','weight':'bold','size':'14'} + plt.scatter(lon,lat,c=ctpd_no_cld_dr,cmap='gist_yarg',s=0.05,vmin=1999,vmax=5000) + data=plt.scatter(lon,lat,c=ctpd_cld,cmap='gist_rainbow',s=0.05,vmin=50,vmax=950) + plt.title('24-hour DR Cloud Top Pressure Calculation'+'\n'+day_label+'\n',fontsize=22,weight='bold') + cb=plt.colorbar(data,aspect=25,fraction=.025,pad=.04,orientation='horizontal') + cb.set_label(label='\nPressure [hPa]',fontsize=18) + cb.ax.tick_params(labelsize=16) + filepth=(filepath+"/ctp_dr_"+day_time+".png") + fig.set_size_inches(12,8.75) + plt.savefig(filepth,dpi=fig.dpi,bbox_inches='tight') + else: + p=2 + +#type 1 is for including dr and ecmwf files, type 2 is only ncep and co2 slicing +def ctp_ncep_co2_slicing_diff_plots(yr,mn,dy,type): + b1=int(dy) + b2=int(mn) + b3=int(yr) + if b1>=0 and b1<=9: + c1="0"+str(b1) + else: + c1=str(b1) + if b2>=0 and b2<=9: + c2="0"+str(b2) + else: + c2=str(b2) + c3=str(b3) + day=c1 + mon=c2 + yer=c3 + day_time=(yer+'_'+mon+'_'+day) + if type==1: + file=("/apollo/jung/bandersen/compare_full_no_parts/co2_dr_ncep_ecmwf_output_"+day_time+"_24hr.txt") + array=loadtxt(file,comments='#',delimiter=',',unpack=True) + filepath=("/home/bandersen/iris-home/all_algorithms/image_output") + day_label=(r+day_time+'\n') + lat=array[0][:] + lon=array[1][:] + ctpc=array[9][:] + ctpn=array[12][:] + ctp=ctpc-ctpn + ctp=np.where(ctp>=1000,-1000,ctp) + ctp[ctp<=-1000]=np.nan + fig=plt.figure() + plt.hist(ctp[~np.isnan(ctp)],bins=201,range=(-1000,1000)) + plt.title("CO2 Slicing and NCEP CTP Difference [CO2 - NCEP] Distribution"+'\n') + plt.xlabel("CTP Difference [hPa]") + plt.ylabel("Count") + filepth=(filepath+"/ctp_co2_ncep_diff_bar_"+day_time+".png") + fig.set_size_inches(12,8.75) + plt.savefig(filepth,dpi=fig.dpi,bbox_inches='tight') + fig=plt.figure() + proj=ccrs.PlateCarree() + ax=plt.axes(projection=proj) + ax.add_feature(cartopy.feature.OCEAN,zorder=0,alpha=0.5,facecolor='lightskyblue') + ax.add_feature(cartopy.feature.BORDERS,edgecolor='slategray') + ax.add_feature(cartopy.feature.COASTLINE,edgecolor='black') + ax.add_feature(cartopy.feature.LAND,zorder=0,edgecolor='black',alpha=0.5,facecolor='beige') + ax.set_extent(extent,crs=proj) + gl=ax.gridlines(crs=proj,linewidth=2,color='grey',alpha=0.5,linestyle='--',draw_labels=True) + gl.xlocator=mticker.FixedLocator(x_ticks1) + gl.ylocator=mticker.FixedLocator(y_ticks1) + gl.xlabels_top=False + gl.xlabels_bottom=False + gl.ylabels_right=False + gl.ylabels_left=False + gl.xlines=True + gl.xformatter=LONGITUDE_FORMATTER + gl.yformatter=LATITUDE_FORMATTER + gl.xlabel_style={'color':'red','weight':'bold','size':'40'} + gl.ylabel_style={'color':'red','weight':'bold','size':'40'} + g2=ax.gridlines(crs=proj,linewidth=2,color='grey',alpha=0.5,linestyle='--',draw_labels=True) + g2.xlocator=mticker.FixedLocator(x_ticks2) + g2.ylocator=mticker.FixedLocator(y_ticks2) + g2.xlabels_bottom=False + g2.ylabels_right=False + g2.ylabels_left=True + g2.xlines=True + g2.xformatter=LONGITUDE_FORMATTER + g2.yformatter=LATITUDE_FORMATTER + g2.xlabel_style={'color':'black','weight':'bold','size':'14'} + g2.ylabel_style={'color':'black','weight':'bold','size':'14'} + data=plt.scatter(lon[~np.isnan(ctp)],lat[~np.isnan(ctp)],c=ctp[~np.isnan(ctp)],cmap='seismic',s=0.05,vmin=-1000,vmax=1000) + plt.title('24-hour CO2 Slicing Minus NCEP Algorithm'+'\n'+'Cloud Top Pressure Calculation '+day_label+'\n',fontsize=22,weight='bold') + cb=plt.colorbar(data,aspect=25,fraction=.025,pad=.04,orientation='horizontal') + cb.set_label(label='\nPressure [hPa]',fontsize=18) + cb.ax.tick_params(labelsize=16) + filepth=(filepath+"/ctp_co2_ncep_diff_"+day_time+".png") + fig.set_size_inches(12,8.75) + plt.savefig(filepth,dpi=fig.dpi,bbox_inches='tight') + elif type==2: + file=("/apollo/jung/bandersen/compare_full_no_parts/co2_ncep_output_"+day_time+"_24hr.txt") + array=loadtxt(file,comments='#',delimiter=',',unpack=True) + filepath=("/home/bandersen/iris-home/all_algorithms/image_output") + day_label=(r+day_time+'\n') + lat=array[0][:] + lon=array[1][:] + ctpc=array[9][:] + ctpn=array[12][:] + ctp=ctpc-ctpn + ctp=np.where(ctp>=1000,-1000,ctp) + ctp[ctp<=-1000]=np.nan + fig=plt.figure() + plt.hist(ctp[~np.isnan(ctp)],bins=201,range=(-1000,1000)) + plt.title("CO2 Slicing and NCEP CTP Difference [CO2 - NCEP] Distribution"+'\n') + plt.xlabel("CTP Difference [hPa]") + plt.ylabel("Count") + filepth=(filepath+"/ctp_co2_ncep_diff_bar_"+day_time+".png") + fig.set_size_inches(12,8.75) + plt.savefig(filepth,dpi=fig.dpi,bbox_inches='tight') + fig=plt.figure() + proj=ccrs.PlateCarree() + ax=plt.axes(projection=proj) + ax.add_feature(cartopy.feature.OCEAN,zorder=0,alpha=0.5,facecolor='lightskyblue') + ax.add_feature(cartopy.feature.BORDERS,edgecolor='slategray') + ax.add_feature(cartopy.feature.COASTLINE,edgecolor='black') + ax.add_feature(cartopy.feature.LAND,zorder=0,edgecolor='black',alpha=0.5,facecolor='beige') + ax.set_extent(extent,crs=proj) + gl=ax.gridlines(crs=proj,linewidth=2,color='grey',alpha=0.5,linestyle='--',draw_labels=True) + gl.xlocator=mticker.FixedLocator(x_ticks1) + gl.ylocator=mticker.FixedLocator(y_ticks1) + gl.xlabels_top=False + gl.xlabels_bottom=False + gl.ylabels_right=False + gl.ylabels_left=False + gl.xlines=True + gl.xformatter=LONGITUDE_FORMATTER + gl.yformatter=LATITUDE_FORMATTER + gl.xlabel_style={'color':'red','weight':'bold','size':'40'} + gl.ylabel_style={'color':'red','weight':'bold','size':'40'} + g2=ax.gridlines(crs=proj,linewidth=2,color='grey',alpha=0.5,linestyle='--',draw_labels=True) + g2.xlocator=mticker.FixedLocator(x_ticks2) + g2.ylocator=mticker.FixedLocator(y_ticks2) + g2.xlabels_bottom=False + g2.ylabels_right=False + g2.ylabels_left=True + g2.xlines=True + g2.xformatter=LONGITUDE_FORMATTER + g2.yformatter=LATITUDE_FORMATTER + g2.xlabel_style={'color':'black','weight':'bold','size':'14'} + g2.ylabel_style={'color':'black','weight':'bold','size':'14'} + data=plt.scatter(lon[~np.isnan(ctp)],lat[~np.isnan(ctp)],c=ctp[~np.isnan(ctp)],cmap='seismic',s=0.05,vmin=-1000,vmax=1000) + plt.title('24-hour CO2 Slicing Minus NCEP Algorithm'+'\n'+'Cloud Top Pressure Calculation '+day_label+'\n',fontsize=22,weight='bold') + cb=plt.colorbar(data,aspect=25,fraction=.025,pad=.04,orientation='horizontal') + cb.set_label(label='\nPressure [hPa]',fontsize=18) + cb.ax.tick_params(labelsize=16) + filepth=(filepath+"/ctp_co2_ncep_diff_"+day_time+".png") + fig.set_size_inches(12,8.75) + plt.savefig(filepth,dpi=fig.dpi,bbox_inches='tight') + else: + p=2 + +#for the confusion matrix plots with input of which file type you have +#type 1 is for including dr and ecmwf files, type 2 is only ncep and co2 slicing +#also with a wavenumber specific qualifier of +#wn=1=691.875 +#wn=2=705 +#wn=3=715 +#wn=4=733.125 +#wn=5=748.125 +#wn=6=959.375 +#green c=1 co2 clear ncep clear +#blue c=2 co2 cloud ncep cloud +#red c=3 co2 clear ncep cloud +#purple c=4 co2 cloud ncep clear +def confusion_map_plots(yr,mn,dy,type,wn): + b1=int(dy) + b2=int(mn) + b3=int(yr) + if b1>=0 and b1<=9: + c1="0"+str(b1) + else: + c1=str(b1) + if b2>=0 and b2<=9: + c2="0"+str(b2) + else: + c2=str(b2) + c3=str(b3) + day=c1 + mon=c2 + yer=c3 + day_time=(yer+'_'+mon+'_'+day) + if type==1: + file=("/apollo/jung/bandersen/compare_full_no_parts/co2_dr_ncep_ecmwf_output_"+day_time+"_24hr.txt") + array=loadtxt(file,comments='#',delimiter=',',unpack=True) + filepath=("/home/bandersen/iris-home/all_algorithms/image_output") + day_label=(r+day_time+'\n') + lat=array[0][:] + lon=array[1][:] + size=np.size(lat) + if wn==1: + co2=array[19][:] + ncep=array[40][:] + waver="691.875" + coder="32" + elif wn==2: + co2=array[24][:] + ncep=array[45][:] + waver="705" + coder="53" + elif wn==3: + co2=array[29][:] + ncep=array[50][:] + waver="715" + coder="69" + elif wn==4: + co2=array[34][:] + ncep=array[55][:] + waver="733.125" + coder="98" + elif wn==5: + co2=array[37][:] + ncep=array[58][:] + waver="748.125" + coder="122" + elif wn==6: + co2=array[9][:] + ncep=array[12][:] + waver="Full" + coder="full" + else: + print(error) + lon1=[] + lat1=[] + lon2=[] + lat2=[] + lon3=[] + lat3=[] + lon4=[] + lat4=[] + if wn>=5: + co2=np.where(co2==1,6,co2) + co2=np.where(co2<=4,5,co2) + for i in range(0,size): + a=co2[i] + b=ncep[i] + if (a==6) and (b==0): + c=lon[i] + d=lat[i] + lon1.append(c) + lat1.append(d) + elif (a==5) and (b==7): + c=lon[i] + d=lat[i] + lon2.append(c) + lat2.append(d) + elif (a==6) and (b==7): + c=lon[i] + d=lat[i] + lon3.append(c) + lat3.append(d) + elif (a==5) and (b==0): + c=lon[i] + d=lat[i] + lon4.append(c) + lat4.append(d) + else: + c=0 + d=0 + elif wn==6: + co2=np.where(co2==2050,2000,co2) + co2=np.where(co2==2100,300,co2) + for i in range(0,size): + a=co2[i] + b=ncep[i] + if (a>=900) and (b>=900): + c=lon[i] + d=lat[i] + lon1.append(c) + lat1.append(d) + elif (a<900) and (b<900): + c=lon[i] + d=lat[i] + lon2.append(c) + lat2.append(d) + elif (a>=900) and (b<900): + c=lon[i] + d=lat[i] + lon3.append(c) + lat3.append(d) + elif (a<900) and (b>=900): + c=lon[i] + d=lat[i] + lon4.append(c) + lat4.append(d) + else: + c=0 + d=0 + else: + print("error") + elif type==2: + file=("/apollo/jung/bandersen/compare_full_no_parts/co2_ncep_output_"+day_time+"_24hr.txt") + array=loadtxt(file,comments='#',delimiter=',',unpack=True) + filepath=("/home/bandersen/iris-home/all_algorithms/image_output") + day_label=(r+day_time+'\n') + lat=array[0][:] + lon=array[1][:] + size=np.size(lat) + if wn==1: + co2=array[17][:] + ncep=array[37][:] + waver="691.875" + coder="32" + elif wn==2: + co2=array[22][:] + ncep=array[42][:] + waver="705" + coder="53" + elif wn==3: + co2=array[27][:] + ncep=array[47][:] + waver="715" + coder="69" + elif wn==4: + co2=array[32][:] + ncep=array[52][:] + waver="733.125" + coder="98" + elif wn==5: + co2=array[35][:] + ncep=array[57][:] + waver="748.125" + coder="122" + elif wn==6: + co2=array[9][:] + ncep=array[11][:] + waver="Full" + coder="full" + else: + print(error) + lon1=[] + lat1=[] + lon2=[] + lat2=[] + lon3=[] + lat3=[] + lon4=[] + lat4=[] + if wn>=5: + co2=np.where(co2==1,6,co2) + co2=np.where(co2<=4,5,co2) + for i in range(0,size): + a=co2[i] + b=ncep[i] + if (a==6) and (b==0): + c=lon[i] + d=lat[i] + lon1.append(c) + lat1.append(d) + elif (a==5) and (b==7): + c=lon[i] + d=lat[i] + lon2.append(c) + lat2.append(d) + elif (a==6) and (b==7): + c=lon[i] + d=lat[i] + lon3.append(c) + lat3.append(d) + elif (a==5) and (b==0): + c=lon[i] + d=lat[i] + lon4.append(c) + lat4.append(d) + else: + c=0 + d=0 + elif wn==6: + co2=np.where(co2==2050,2000,co2) + co2=np.where(co2==2100,300,co2) + for i in range(0,size): + a=co2[i] + b=ncep[i] + if (a>=900) and (b>=900): + c=lon[i] + d=lat[i] + lon1.append(c) + lat1.append(d) + elif (a<900) and (b<900): + c=lon[i] + d=lat[i] + lon2.append(c) + lat2.append(d) + elif (a>=900) and (b<900): + c=lon[i] + d=lat[i] + lon3.append(c) + lat3.append(d) + elif (a<900) and (b>=900): + c=lon[i] + d=lat[i] + lon4.append(c) + lat4.append(d) + else: + c=0 + d=0 + else: + print("error") + else: + print("error") + fig=plt.figure() + proj=ccrs.PlateCarree() + ax=plt.axes(projection=proj) + ax.add_feature(cartopy.feature.OCEAN,zorder=0,alpha=0.5,facecolor='lightskyblue') + ax.add_feature(cartopy.feature.BORDERS,edgecolor='slategray') + ax.add_feature(cartopy.feature.COASTLINE,edgecolor='black') + ax.add_feature(cartopy.feature.LAND,zorder=0,edgecolor='black',alpha=0.5,facecolor='beige') + ax.set_extent(extent,crs=proj) + gl=ax.gridlines(crs=proj,linewidth=2,color='grey',alpha=0.5,linestyle='--',draw_labels=True) + gl.xlocator=mticker.FixedLocator(x_ticks1) + gl.ylocator=mticker.FixedLocator(y_ticks1) + gl.xlabels_top=False + gl.xlabels_bottom=False + gl.ylabels_right=False + gl.ylabels_left=False + gl.xlines=True + gl.xformatter=LONGITUDE_FORMATTER + gl.yformatter=LATITUDE_FORMATTER + gl.xlabel_style={'color':'red','weight':'bold','size':'40'} + gl.ylabel_style={'color':'red','weight':'bold','size':'40'} + g2=ax.gridlines(crs=proj,linewidth=2,color='grey',alpha=0.5,linestyle='--',draw_labels=True) + g2.xlocator=mticker.FixedLocator(x_ticks2) + g2.ylocator=mticker.FixedLocator(y_ticks2) + g2.xlabels_bottom=False + g2.ylabels_right=False + g2.ylabels_left=True + g2.xlines=True + g2.xformatter=LONGITUDE_FORMATTER + g2.yformatter=LATITUDE_FORMATTER + g2.xlabel_style={'color':'black','weight':'bold','size':'14'} + g2.ylabel_style={'color':'black','weight':'bold','size':'14'} + plt.scatter(lon1,lat1,color='green',s=0.05) + plt.title('CO2 Slicing Clear and NCEP Algorithm Clear for Wavenumber '+waver+'\n',fontsize=22,weight='bold') + filepth=(filepath+"/confustion_co2_clr_ncep_clr_"+coder+'_'+day_time+".png") + fig.set_size_inches(12,8.75) + plt.savefig(filepth,dpi=fig.dpi,bbox_inches='tight') + fig=plt.figure() + proj=ccrs.PlateCarree() + ax=plt.axes(projection=proj) + ax.add_feature(cartopy.feature.OCEAN,zorder=0,alpha=0.5,facecolor='lightskyblue') + ax.add_feature(cartopy.feature.BORDERS,edgecolor='slategray') + ax.add_feature(cartopy.feature.COASTLINE,edgecolor='black') + ax.add_feature(cartopy.feature.LAND,zorder=0,edgecolor='black',alpha=0.5,facecolor='beige') + ax.set_extent(extent,crs=proj) + gl=ax.gridlines(crs=proj,linewidth=2,color='grey',alpha=0.5,linestyle='--',draw_labels=True) + gl.xlocator=mticker.FixedLocator(x_ticks1) + gl.ylocator=mticker.FixedLocator(y_ticks1) + gl.xlabels_top=False + gl.xlabels_bottom=False + gl.ylabels_right=False + gl.ylabels_left=False + gl.xlines=True + gl.xformatter=LONGITUDE_FORMATTER + gl.yformatter=LATITUDE_FORMATTER + gl.xlabel_style={'color':'red','weight':'bold','size':'40'} + gl.ylabel_style={'color':'red','weight':'bold','size':'40'} + g2=ax.gridlines(crs=proj,linewidth=2,color='grey',alpha=0.5,linestyle='--',draw_labels=True) + g2.xlocator=mticker.FixedLocator(x_ticks2) + g2.ylocator=mticker.FixedLocator(y_ticks2) + g2.xlabels_bottom=False + g2.ylabels_right=False + g2.ylabels_left=True + g2.xlines=True + g2.xformatter=LONGITUDE_FORMATTER + g2.yformatter=LATITUDE_FORMATTER + g2.xlabel_style={'color':'black','weight':'bold','size':'14'} + g2.ylabel_style={'color':'black','weight':'bold','size':'14'} + plt.scatter(lon2,lat2,color='blue',s=0.05) + plt.title('CO2 Slicing Cloud and NCEP Algorithm Cloud for Wavenumber '+waver+'\n',fontsize=22,weight='bold') + filepth=(filepath+"/confustion_co2_cld_ncep_cld_"+coder+'_'+day_time+".png") + fig.set_size_inches(12,8.75) + plt.savefig(filepth,dpi=fig.dpi,bbox_inches='tight') + fig=plt.figure() + proj=ccrs.PlateCarree() + ax=plt.axes(projection=proj) + ax.add_feature(cartopy.feature.OCEAN,zorder=0,alpha=0.5,facecolor='lightskyblue') + ax.add_feature(cartopy.feature.BORDERS,edgecolor='slategray') + ax.add_feature(cartopy.feature.COASTLINE,edgecolor='black') + ax.add_feature(cartopy.feature.LAND,zorder=0,edgecolor='black',alpha=0.5,facecolor='beige') + ax.set_extent(extent,crs=proj) + gl=ax.gridlines(crs=proj,linewidth=2,color='grey',alpha=0.5,linestyle='--',draw_labels=True) + gl.xlocator=mticker.FixedLocator(x_ticks1) + gl.ylocator=mticker.FixedLocator(y_ticks1) + gl.xlabels_top=False + gl.xlabels_bottom=False + gl.ylabels_right=False + gl.ylabels_left=False + gl.xlines=True + gl.xformatter=LONGITUDE_FORMATTER + gl.yformatter=LATITUDE_FORMATTER + gl.xlabel_style={'color':'red','weight':'bold','size':'40'} + gl.ylabel_style={'color':'red','weight':'bold','size':'40'} + g2=ax.gridlines(crs=proj,linewidth=2,color='grey',alpha=0.5,linestyle='--',draw_labels=True) + g2.xlocator=mticker.FixedLocator(x_ticks2) + g2.ylocator=mticker.FixedLocator(y_ticks2) + g2.xlabels_bottom=False + g2.ylabels_right=False + g2.ylabels_left=True + g2.xlines=True + g2.xformatter=LONGITUDE_FORMATTER + g2.yformatter=LATITUDE_FORMATTER + g2.xlabel_style={'color':'black','weight':'bold','size':'14'} + g2.ylabel_style={'color':'black','weight':'bold','size':'14'} + plt.scatter(lon3,lat3,color='red',s=0.05) + plt.title('CO2 Slicing Clear and NCEP Algorithm Cloud for Wavenumber '+waver+'\n',fontsize=22,weight='bold') + filepth=(filepath+"/confustion_co2_clr_ncep_cld_"+coder+'_'+day_time+".png") + fig.set_size_inches(12,8.75) + plt.savefig(filepth,dpi=fig.dpi,bbox_inches='tight') + fig=plt.figure() + proj=ccrs.PlateCarree() + ax=plt.axes(projection=proj) + ax.add_feature(cartopy.feature.OCEAN,zorder=0,alpha=0.5,facecolor='lightskyblue') + ax.add_feature(cartopy.feature.BORDERS,edgecolor='slategray') + ax.add_feature(cartopy.feature.COASTLINE,edgecolor='black') + ax.add_feature(cartopy.feature.LAND,zorder=0,edgecolor='black',alpha=0.5,facecolor='beige') + ax.set_extent(extent,crs=proj) + gl=ax.gridlines(crs=proj,linewidth=2,color='grey',alpha=0.5,linestyle='--',draw_labels=True) + gl.xlocator=mticker.FixedLocator(x_ticks1) + gl.ylocator=mticker.FixedLocator(y_ticks1) + gl.xlabels_top=False + gl.xlabels_bottom=False + gl.ylabels_right=False + gl.ylabels_left=False + gl.xlines=True + gl.xformatter=LONGITUDE_FORMATTER + gl.yformatter=LATITUDE_FORMATTER + gl.xlabel_style={'color':'red','weight':'bold','size':'40'} + gl.ylabel_style={'color':'red','weight':'bold','size':'40'} + g2=ax.gridlines(crs=proj,linewidth=2,color='grey',alpha=0.5,linestyle='--',draw_labels=True) + g2.xlocator=mticker.FixedLocator(x_ticks2) + g2.ylocator=mticker.FixedLocator(y_ticks2) + g2.xlabels_bottom=False + g2.ylabels_right=False + g2.ylabels_left=True + g2.xlines=True + g2.xformatter=LONGITUDE_FORMATTER + g2.yformatter=LATITUDE_FORMATTER + g2.xlabel_style={'color':'black','weight':'bold','size':'14'} + g2.ylabel_style={'color':'black','weight':'bold','size':'14'} + plt.scatter(lon4,lat4,color='purple',s=0.05) + plt.title('CO2 Slicing Cloud and NCEP Algorithm Clear for Wavenumber '+waver+'\n',fontsize=22,weight='bold') + filepth=(filepath+"/confustion_co2_cld_ncep_clr_"+coder+'_'+day_time+".png") + fig.set_size_inches(12,8.75) + plt.savefig(filepth,dpi=fig.dpi,bbox_inches='tight') + +def ecmwf_ncep_count_compares(yr,mn,dy): + b1=int(dy) + b2=int(mn) + b3=int(yr) + if b1>=0 and b1<=9: + c1="0"+str(b1) + else: + c1=str(b1) + if b2>=0 and b2<=9: + c2="0"+str(b2) + else: + c2=str(b2) + c3=str(b3) + day=c1 + mon=c2 + yer=c3 + day_time=(yer+'_'+mon+'_'+day) + f1=cdf.Dataset("/apollo/jung/snebuda/brianne/2021/cris.431.n20.20210410_000000.20210410_003000.bt.nc") + chan=f1['channum'][:] + wave=[] + for i in range(0,431): + z=chan[i] + if z<=713: + a=650+(.625*(z-1)) + wave.append(a) + elif z>=714 and z<=1578: + a=1210+(.625*(z-714)) + wave.append(a) + elif z>=1579: + a=2155+(.625*(z-1579)) + wave.append(a) + else: + pass + filepath=("/home/bandersen/iris-home/all_algorithms/image_output") + day_label=(r+day_time+'\n') + files_ecmwf=glob('/apollo/jung/bandersen/ecmwf_data_output_txt_'+day_time+'/*.txt')[:] + files_ncep=glob('/apollo/jung/bandersen/ncep_data_'+day_time+'/*.nc')[:] + sizer_e=np.size(files_ecmwf) + sizer_n=np.size(files_ncep) + counts_zeros_e=[] + counts_ones_e=[] + for i in range(0,sizer_e): + array_a1=loadtxt(files_ecmwf[i],comments='#',delimiter=',',unpack=True) + for ii in range(0,431): + a1=3+ii + zeros=np.size(np.where(array_a1[a1][:]==0)) + ones=np.size(np.where(array_a1[a1][:]==1)) + counts_zeros_e.append(zeros) + counts_ones_e.append(ones) + zeros_e=np.reshape(counts_zeros_e,(431,24)) + ones_e=np.reshape(counts_ones_e,(431,24)) + sum_zero_e=np.sum(zeros_e,axis=1) + sum_ones_e=np.sum(ones_e,axis=1) + counts_zeros_n=[] + counts_sevens_n=[] + for i in range(0,sizer_n): + array_a1=cdf.Dataset(files_ncep[i]) + for ii in range(0,431): + a1=ii + a2=array_a1['cld_impacted'][:,a1] + zeros=np.size(np.where(a2==0)) + sevens=np.size(np.where(a2==7)) + counts_zeros_n.append(zeros) + counts_sevens_n.append(sevens) + zeros_n=np.reshape(counts_zeros_n,(48,431)) + sevens_n=np.reshape(counts_sevens_n,(48,431)) + sum_zero_n=np.sum(zeros_n,axis=0) + sum_sevens_n=np.sum(sevens_n,axis=0) + fig,ax1=plt.subplots() + ax1.set_xlabel('CrIS Wavenumber',color='black',fontsize=16) + ax1.set_ylabel('FOV Count ECMWF-CAD',color='green',fontsize=16) + ax1.scatter(wave,sum_zero_e,color='green') + ax1.tick_params(axis='x',labelcolor='black',labelsize=16) + ax1.tick_params(axis='y',labelcolor='green',labelsize=16) + ax1.yaxis.set_major_formatter(mticker.FormatStrFormatter('%.1E')) + ax2=ax1.twinx() + ax2.set_ylabel('FOV Count NCEP Algorithm',color='red',fontsize=16) + ax2.scatter(wave,sum_zero_n,color='red') + ax2.tick_params(axis='y',labelcolor='red',labelsize=16) + ax2.yaxis.set_major_formatter(mticker.FormatStrFormatter('%.1E')) + plt.title('Count of Clear FOVs for NCEP Algorithm (red) and ECMWF-CAD (green) at all CrIS Wavenumbers'+'\n'+day_label,fontsize=22,fontweight='bold') + filepth=(filepath+"/ecmwf_ncep_count"+day_time+".png") + fig.set_size_inches(20,14) + plt.savefig(filepth,dpi=fig.dpi,bbox_inches='tight') + +#This produces all the observation minus analysis plots for a given day for all CO2 Slicing wavenumbers +def two_y_axis_o_a_plots(yr,mn,dy,type): + chan_wv=[689.375,690.625,691.875,693.125,694.375,702.500,703.750,705.000,706.250,707.500,712.500,713.750,715.000,716.250,717.500,730.625,731.875,733.125,734.375,735.625,748.125,959.375] + chan_num=[28,30,32,34,36,49,51,53,55,57,65,67,69,71,73,94,96,98,100,102,122,216] + def counter(array): + a=[] + arr=-1*array + for i in range(-300,300,1): + b1=i*0.01 + b2=b1+0.01 + c=np.size(np.where((arr>b1)&(arr<=b2))) + a.append(c) + return(a) + xs=np.arange(-3,3,0.01) + ylab_spec=(r"FOV Count in 0.01 [K] Bin") + def counter(array): + a=[] + arr=-1*array + for i in range(-30,30,1): + b1=i*0.1 + b2=b1+0.1 + c=np.size(np.where((arr>b1)&(arr<=b2))) + a.append(c) + return(a) + xs=np.arange(-3,3,0.1) + ylab_spec=(r"FOV Count in 0.1 [K] Bin") + b1=int(dy) + b2=int(mn) + b3=int(yr) + if b1>=0 and b1<=9: + c1="0"+str(b1) + else: + c1=str(b1) + if b2>=0 and b2<=9: + c2="0"+str(b2) + else: + c2=str(b2) + c3=str(b3) + day=c1 + mon=c2 + yer=c3 + day_time=(yer+'_'+mon+'_'+day) + if type==1: + file=("/apollo/jung/bandersen/compare_full_no_parts/co2_dr_ncep_ecmwf_output_"+day_time+"_24hr.txt") + array=loadtxt(file,comments='#',delimiter=',',unpack=True) + filepath=("/home/bandersen/iris-home/all_algorithms/image_output") + day_label=(r+day_time+'\n') + forr=array[3][:] + array=loadtxt(file,comments='#',delimiter=',',unpack=True) + for i in range (0,22,1): + if i<21: + a1=17+i + a2=38+i + a3=60+i + a4=82+i + co2=array[a1][:] + ncep=array[a2][:] + ecmwf=array[a3][:] + all_obs=array[a4][:] + topo=array[2][:] + lat=array[0][:] + co2=np.where(co2==1,6,co2) + co2=np.where(co2<=4,5,co2) + co2_cld=np.asarray(counter(all_obs[np.where((co2==5))][:])) + co2_clr=np.asarray(counter(all_obs[np.where((co2==6))][:])) + ncep_cld=np.asarray(counter(all_obs[np.where((ncep==7))][:])) + ncep_clr=np.asarray(counter(all_obs[np.where((ncep!=7))][:])) + ecmwf_cld=np.asarray(counter(all_obs[np.where((ecmwf==1))][:])) + ecmwf_clr=np.asarray(counter(all_obs[np.where((ecmwf!=1))][:])) + fig,ax1=plt.subplots() + ax1.set_xlabel('OBS - Analysis Brightness Temperature [K]',color='black',fontsize=10) + ax1.set_ylabel(ylab_spec+" CO2",color='blue',fontsize=10) + ax1.plot(xs,co2_cld,color='blue',linestyle='solid') + ax1.tick_params(axis='y',labelcolor='blue',labelsize=10) + ax1.tick_params(axis='x',labelcolor='black',labelsize=10) + ax1.yaxis.set_major_formatter(mtick.FormatStrFormatter('%.1E')) + ax2=ax1.twinx() + ax2.set_ylabel(ylab_spec+" NCEP",color='red',fontsize=10) + ax2.plot(xs,ncep_cld,color='red',linestyle='solid') + ax2.tick_params(axis='y',labelcolor='red',labelsize=10) + ax2.yaxis.set_major_formatter(mtick.FormatStrFormatter('%.1E')) + plt.xlim([-3,3]) + plt.suptitle('OBS - Analysis Brightness Temperature 0.1 Degree Bins for'+'\nCO2 Slicing and NCEP Cloud Points at Wavenumber '+str(chan_wv[i]),fontsize=14,fontweight='bold') + plt.title(day_label,fontsize=12) + filepth=(filepath+"/oa_plot_co2_ncep_cld_"+str(chan_num[i])+"_"+day_time+".png") + fig.set_size_inches(6.5,9) + plt.savefig(filepth,dpi=fig.dpi,bbox_inches='tight',facecolor=(0.8392156,0.8352941,0.6627451),edgecolor='#FF5657') + fig,ax1=plt.subplots() + ax1.set_xlabel('OBS - Analysis Brightness Temperature [K]',color='black',fontsize=10) + ax1.set_ylabel(ylab_spec+" CO2",color='blue',fontsize=10) + ax1.plot(xs,co2_cld,color='blue',linestyle='solid') + ax1.plot(xs,co2_cld,color='blue',linestyle='solid') + ax1.tick_params(axis='x',labelcolor='black',labelsize=10) + ax1.tick_params(axis='y',labelcolor='blue',labelsize=10) + ax1.yaxis.set_major_formatter(mtick.FormatStrFormatter('%.1E')) + ax2=ax1.twinx() + ax2.set_ylabel(ylab_spec+" ECMWF",color='red',fontsize=10) + ax2.plot(xs,ecmwf_cld,color='red',linestyle='solid') + ax2.tick_params(axis='y',labelcolor='red',labelsize=10) + ax2.yaxis.set_major_formatter(mtick.FormatStrFormatter('%.1E')) + plt.xlim([-3,3]) + plt.suptitle('OBS - Analysis Brightness Temperature 0.1 Degree Bins for'+'\nCO2 Slicing and ECMWF Cloud Points at Wavenumber '+str(chan_wv[i]),fontsize=14,fontweight='bold') + plt.title(day_label,fontsize=12) + filepth=(filepath+"/oa_plot_co2_ecmwf_cld_"+str(chan_num[i])+"_"+day_time+".png") + fig.set_size_inches(6.5,9) + plt.savefig(filepth,dpi=fig.dpi,bbox_inches='tight',facecolor=(0.8392156,0.8352941,0.6627451),edgecolor='#FF5657') + fig,ax1=plt.subplots() + ax1.set_xlabel('OBS - Analysis Brightness Temperature [K]',color='black',fontsize=10) + ax1.set_ylabel(ylab_spec+" ECMWF",color='red',fontsize=10) + ax1.plot(xs,co2_cld,color='red',linestyle='solid') + ax1.tick_params(axis='y',labelcolor='red',labelsize=10) + ax1.tick_params(axis='x',labelcolor='black',labelsize=10) + ax1.yaxis.set_major_formatter(mtick.FormatStrFormatter('%.1E')) + ax2=ax1.twinx() + ax2.set_ylabel(ylab_spec+" NCEP",color='red',fontsize=10) + ax2.plot(xs,ncep_cld,color='red',linestyle='solid') + ax2.tick_params(axis='y',labelcolor='red',labelsize=10) + ax2.yaxis.set_major_formatter(mtick.FormatStrFormatter('%.1E')) + plt.xlim([-3,3]) + plt.suptitle('OBS - Analysis Brightness Temperature 0.1 Degree Bins for'+'\nECMWF and NCEP Cloud Points at Wavenumber '+str(chan_wv[i]),fontsize=14,fontweight='bold') + plt.title(day_label,fontsize=12) + filepth=(filepath+"/oa_plot_ecmwf_ncep_cld_"+str(chan_num[i])+"_"+day_time+".png") + fig.set_size_inches(6.5,9) + plt.savefig(filepth,dpi=fig.dpi,bbox_inches='tight',facecolor=(0.8392156,0.8352941,0.6627451),edgecolor='#FF5657') + fig,ax1=plt.subplots() + ax1.set_xlabel('OBS - Analysis Brightness Temperature [K]',color='black',fontsize=10) + ax1.set_ylabel(ylab_spec+" CO2",color='blue',fontsize=10) + ax1.plot(xs,co2_clr,color='blue',linestyle='solid') + ax1.tick_params(axis='x',labelcolor='black',labelsize=10) + ax1.tick_params(axis='y',labelcolor='blue',labelsize=10) + ax1.yaxis.set_major_formatter(mtick.FormatStrFormatter('%.1E')) + ax2=ax1.twinx() + ax2.set_ylabel(ylab_spec+" NCEP",color='red',fontsize=10) + ax2.plot(xs,ncep_clr,color='red',linestyle='solid') + ax2.tick_params(axis='y',labelcolor='red',labelsize=10) + ax2.yaxis.set_major_formatter(mtick.FormatStrFormatter('%.1E')) + plt.xlim([-3,3]) + plt.suptitle('OBS - Analysis Brightness Temperature 0.1 Degree Bins for'+'\nCO2 Slicing and NCEP Clear Points at Wavenumber '+str(chan_wv[i]),fontsize=14,fontweight='bold') + plt.title(day_label,fontsize=12) + filepth=(filepath+"/oa_plot_co2_ncep_clr_"+str(chan_num[i])+"_"+day_time+".png") + fig.set_size_inches(6.5,9) + plt.savefig(filepth,dpi=fig.dpi,bbox_inches='tight',facecolor=(0.8392156,0.8352941,0.6627451),edgecolor='#FF5657') + fig,ax1=plt.subplots() + ax1.set_xlabel('OBS - Analysis Brightness Temperature [K]',color='black',fontsize=10) + ax1.set_ylabel(ylab_spec+" CO2",color='blue',fontsize=10) + ax1.plot(xs,co2_clr,color='blue',linestyle='solid') + ax1.tick_params(axis='y',labelcolor='blue',labelsize=10) + ax1.tick_params(axis='x',labelcolor='black',labelsize=10) + ax1.yaxis.set_major_formatter(mtick.FormatStrFormatter('%.1E')) + ax2=ax1.twinx() + ax2.set_ylabel(ylab_spec+" ECMWF",color='red',fontsize=10) + ax2.plot(xs,ecmwf_clr,color='red',linestyle='solid') + ax2.tick_params(axis='y',labelcolor='red',labelsize=10) + ax2.yaxis.set_major_formatter(mtick.FormatStrFormatter('%.1E')) + plt.xlim([-3,3]) + plt.suptitle('OBS - Analysis Brightness Temperature 0.1 Degree Bins for'+'\nCO2 Slicing and ECMWF Clear Points at Wavenumber '+str(chan_wv[i]),fontsize=14,fontweight='bold') + plt.title(day_label,fontsize=12) + filepth=(filepath+"/oa_plot_co2_ecmwf_clr_"+str(chan_num[i])+"_"+day_time+".png") + fig.set_size_inches(6.5,9) + plt.savefig(filepth,dpi=fig.dpi,bbox_inches='tight',facecolor=(0.8392156,0.8352941,0.6627451),edgecolor='#FF5657') + fig,ax1=plt.subplots() + ax1.set_xlabel('OBS - Analysis Brightness Temperature [K]',color='black',fontsize=10) + ax1.set_ylabel(ylab_spec+" ECMWF",color='red',fontsize=10) + ax1.plot(xs,co2_clr,color='red',linestyle='solid') + ax1.tick_params(axis='y',labelcolor='red',labelsize=10) + ax1.tick_params(axis='x',labelcolor='black',labelsize=10) + ax1.yaxis.set_major_formatter(mtick.FormatStrFormatter('%.1E')) + ax2=ax1.twinx() + ax2.set_ylabel(ylab_spec+" NCEP",color='red',fontsize=10) + ax2.plot(xs,ncep_clr,color='red',linestyle='solid') + ax2.tick_params(axis='y',labelcolor='red',labelsize=10) + ax2.yaxis.set_major_formatter(mtick.FormatStrFormatter('%.1E')) + plt.xlim([-3,3]) + plt.suptitle('OBS - Analysis Brightness Temperature 0.1 Degree Bins for'+'\n ECMWF and NCEP Clear Points at Wavenumber '+str(chan_wv[i]),fontsize=14,fontweight='bold') + plt.title(day_label,fontsize=12) + filepth=(filepath+"/oa_plot_ecmwf_ncep_clr_"+str(chan_num[i])+"_"+day_time+".png") + fig.set_size_inches(6.5,9) + plt.savefig(filepth,dpi=fig.dpi,bbox_inches='tight',facecolor=(0.8392156,0.8352941,0.6627451),edgecolor='#FF5657') + else: + a1=17+i-1 + a2=38+i + a3=60+i + a4=82+i + co2=array[a1][:] + ncep=array[a2][:] + ecmwf=array[a3][:] + all_obs=array[a4][:] + topo=array[2][:] + lat=array[0][:] + co2=np.where(co2==1,6,co2) + co2=np.where(co2<=4,5,co2) + co2_cld=np.asarray(counter(all_obs[np.where((co2==5))][:])) + co2_clr=np.asarray(counter(all_obs[np.where((co2==6))][:])) + ncep_cld=np.asarray(counter(all_obs[np.where((ncep==7))][:])) + ncep_clr=np.asarray(counter(all_obs[np.where((ncep!=7))][:])) + ecmwf_cld=np.asarray(counter(all_obs[np.where((ecmwf==1))][:])) + ecmwf_clr=np.asarray(counter(all_obs[np.where((ecmwf!=1))][:])) + fig,ax1=plt.subplots() + ax1.set_xlabel('OBS - Analysis Brightness Temperature [K]',color='black',fontsize=10) + ax1.set_ylabel(ylab_spec+" CO2",color='blue',fontsize=10) + ax1.plot(xs,co2_cld,color='blue',linestyle='solid') + ax1.tick_params(axis='y',labelcolor='blue',labelsize=10) + ax1.tick_params(axis='x',labelcolor='black',labelsize=10) + ax1.yaxis.set_major_formatter(mtick.FormatStrFormatter('%.1E')) + ax2=ax1.twinx() + ax2.set_ylabel(ylab_spec+" NCEP",color='red',fontsize=10) + ax2.plot(xs,ncep_cld,color='red',linestyle='solid') + ax2.tick_params(axis='y',labelcolor='red',labelsize=10) + ax2.yaxis.set_major_formatter(mtick.FormatStrFormatter('%.1E')) + plt.xlim([-3,3]) + plt.suptitle('OBS - Analysis Brightness Temperature 0.1 Degree Bins for'+'\nCO2 Slicing and NCEP Cloud Points at Wavenumber '+str(chan_wv[i]),fontsize=14,fontweight='bold') + plt.title(day_label,fontsize=12) + filepth=(filepath+"/oa_plot_co2_ncep_cld_"+str(chan_num[i])+"_"+day_time+".png") + fig.set_size_inches(6.5,9) + plt.savefig(filepth,dpi=fig.dpi,bbox_inches='tight',facecolor=(0.8392156,0.8352941,0.6627451),edgecolor='#FF5657') + fig,ax1=plt.subplots() + ax1.set_xlabel('OBS - Analysis Brightness Temperature [K]',color='black',fontsize=10) + ax1.set_ylabel(ylab_spec+" CO2",color='blue',fontsize=10) + ax1.plot(xs,co2_cld,color='blue',linestyle='solid') + ax1.tick_params(axis='y',labelcolor='blue',labelsize=10) + ax1.tick_params(axis='x',labelcolor='black',labelsize=10) + ax1.yaxis.set_major_formatter(mtick.FormatStrFormatter('%.1E')) + ax2=ax1.twinx() + ax2.set_ylabel(ylab_spec+" ECMWF",color='red',fontsize=10) + ax2.plot(xs,ecmwf_cld,color='red',linestyle='solid') + ax2.tick_params(axis='y',labelcolor='red',labelsize=10) + ax2.yaxis.set_major_formatter(mtick.FormatStrFormatter('%.1E')) + plt.xlim([-3,3]) + plt.suptitle('OBS - Analysis Brightness Temperature 0.1 Degree Bins for'+'\nCO2 Slicing and ECMWF Cloud Points at Wavenumber '+str(chan_wv[i]),fontsize=14,fontweight='bold') + plt.title(day_label,fontsize=12) + filepth=(filepath+"/oa_plot_co2_ecmwf_cld_"+str(chan_num[i])+"_"+day_time+".png") + fig.set_size_inches(6.5,9) + plt.savefig(filepth,dpi=fig.dpi,bbox_inches='tight',facecolor=(0.8392156,0.8352941,0.6627451),edgecolor='#FF5657') + fig,ax1=plt.subplots() + ax1.set_xlabel('OBS - Analysis Brightness Temperature [K]',color='black',fontsize=10) + ax1.set_ylabel(ylab_spec+" ECMWF",color='red',fontsize=10) + ax1.plot(xs,co2_cld,color='red',linestyle='solid') + ax1.tick_params(axis='y',labelcolor='red',labelsize=10) + ax1.tick_params(axis='x',labelcolor='black',labelsize=10) + ax1.yaxis.set_major_formatter(mtick.FormatStrFormatter('%.1E')) + ax2=ax1.twinx() + ax2.set_ylabel(ylab_spec+" NCEP",color='red',fontsize=10) + ax2.plot(xs,ncep_cld,color='red',linestyle='solid') + ax2.tick_params(axis='y',labelcolor='red',labelsize=10) + ax1.yaxis.set_major_formatter(mtick.FormatStrFormatter('%.1E')) + plt.xlim([-3,3]) + plt.suptitle('OBS - Analysis Brightness Temperature 0.1 Degree Bins for'+'\nECMWF and NCEP Cloud Points at Wavenumber '+str(chan_wv[i]),fontsize=14,fontweight='bold') + plt.title(day_label,fontsize=12) + filepth=(filepath+"/oa_plot_ecmwf_ncep_cld_"+str(chan_num[i])+"_"+day_time+".png") + fig.set_size_inches(6.5,9) + plt.savefig(filepth,dpi=fig.dpi,bbox_inches='tight',facecolor=(0.8392156,0.8352941,0.6627451),edgecolor='#FF5657') + fig,ax1=plt.subplots() + ax1.set_xlabel('OBS - Analysis Brightness Temperature [K]',color='black',fontsize=10) + ax1.set_ylabel(ylab_spec+" CO2",color='blue',fontsize=10) + ax1.plot(xs,co2_clr,color='blue',linestyle='solid') + ax1.tick_params(axis='y',labelcolor='blue',labelsize=10) + ax1.tick_params(axis='x',labelcolor='black',labelsize=10) + ax1.yaxis.set_major_formatter(mtick.FormatStrFormatter('%.1E')) + ax2=ax1.twinx() + ax2.set_ylabel(ylab_spec+" NCEP",color='red',fontsize=10) + ax2.plot(xs,ncep_clr,color='red',linestyle='solid') + ax2.tick_params(axis='y',labelcolor='red',labelsize=10) + ax2.yaxis.set_major_formatter(mtick.FormatStrFormatter('%.1E')) + plt.xlim([-3,3]) + plt.suptitle('OBS - Analysis Brightness Temperature 0.1 Degree Bins for'+'\nCO2 Slicing and NCEP Clear Points at Wavenumber '+str(chan_wv[i]),fontsize=14,fontweight='bold') + plt.title(day_label,fontsize=12) + filepth=(filepath+"/oa_plot_co2_ncep_clr_"+str(chan_num[i])+"_"+day_time+".png") + fig.set_size_inches(6.5,9) + plt.savefig(filepth,dpi=fig.dpi,bbox_inches='tight',facecolor=(0.8392156,0.8352941,0.6627451),edgecolor='#FF5657') + fig,ax1=plt.subplots() + ax1.set_xlabel('OBS - Analysis Brightness Temperature [K]',color='black',fontsize=10) + ax1.set_ylabel(ylab_spec+" CO2",color='blue',fontsize=10) + ax1.plot(xs,co2_clr,color='blue',linestyle='solid') + ax1.tick_params(axis='y',labelcolor='blue',labelsize=10) + ax1.tick_params(axis='x',labelcolor='black',labelsize=10) + ax1.yaxis.set_major_formatter(mtick.FormatStrFormatter('%.1E')) + ax2=ax1.twinx() + ax2.set_ylabel(ylab_spec+" ECMWF",color='red',fontsize=10) + ax2.plot(xs,ecmwf_clr,color='red',linestyle='solid') + ax2.tick_params(axis='y',labelcolor='red',labelsize=10) + ax1.yaxis.set_major_formatter(mtick.FormatStrFormatter('%.1E')) + plt.xlim([-3,3]) + plt.suptitle('OBS - Analysis Brightness Temperature 0.1 Degree Bins for'+'\nCO2 Slicing and ECMWF Clear Points at Wavenumber '+str(chan_wv[i]),fontsize=14,fontweight='bold') + plt.title(day_label,fontsize=12) + filepth=(filepath+"/oa_plot_co2_ecmwf_clr_"+str(chan_num[i])+"_"+day_time+".png") + fig.set_size_inches(6.5,9) + plt.savefig(filepth,dpi=fig.dpi,bbox_inches='tight',facecolor=(0.8392156,0.8352941,0.6627451),edgecolor='#FF5657') + fig,ax1=plt.subplots() + ax1.set_xlabel('OBS - Analysis Brightness Temperature [K]',color='black',fontsize=10) + ax1.set_ylabel(ylab_spec+" ECMWF",color='red',fontsize=10) + ax1.plot(xs,co2_clr,color='red',linestyle='solid') + ax1.tick_params(axis='y',labelcolor='red',labelsize=10) + ax1.tick_params(axis='x',labelcolor='black',labelsize=10) + ax1.yaxis.set_major_formatter(mtick.FormatStrFormatter('%.1E')) + ax2=ax1.twinx() + ax2.set_ylabel(ylab_spec+" NCEP",color='red',fontsize=10) + ax2.plot(xs,ncep_clr,color='red',linestyle='solid') + ax2.tick_params(axis='y',labelcolor='red',labelsize=10) + ax2.yaxis.set_major_formatter(mtick.FormatStrFormatter('%.1E')) + plt.xlim([-3,3]) + plt.suptitle('OBS - Analysis Brightness Temperature 0.1 Degree Bins for'+'\nECMWF and NCEP Clear Points at Wavenumber '+str(chan_wv[i]),fontsize=14,fontweight='bold') + plt.title(day_label,fontsize=12) + filepth=(filepath+"/oa_plot_ecmwf_ncep_clr_"+str(chan_num[i])+"_"+day_time+".png") + fig.set_size_inches(6.5,9) + plt.savefig(filepth,dpi=fig.dpi,bbox_inches='tight',facecolor=(0.8392156,0.8352941,0.6627451),edgecolor='#FF5657') + elif type==2: + file=("/apollo/jung/bandersen/compare_full_no_parts/co2_ncep_output_"+day_time+"_24hr.txt") + array=loadtxt(file,comments='#',delimiter=',',unpack=True) + filepath=("/home/bandersen/iris-home/all_algorithms/image_output") + day_label=(r+day_time+'\n') + forr=array[3][:] + array=loadtxt(file,comments='#',delimiter=',',unpack=True) + for i in range (0,22,1): + if i<21: + a1=15+i + a2=36+i + a3=58+i + co2=array[a1][:] + ncep=array[a2][:] + all_obs=array[a3][:] + topo=array[2][:] + lat=array[0][:] + co2=np.where(co2==1,6,co2) + co2=np.where(co2<=4,5,co2) + co2_cld=np.asarray(counter(all_obs[np.where((co2==5))][:])) + co2_clr=np.asarray(counter(all_obs[np.where((co2==6))][:])) + ncep_cld=np.asarray(counter(all_obs[np.where((ncep==7))][:])) + ncep_clr=np.asarray(counter(all_obs[np.where((ncep!=7))][:])) + fig,ax1=plt.subplots() + ax1.set_xlabel('OBS - Analysis Brightness Temperature [K]',color='black',fontsize=10) + ax1.set_ylabel(ylab_spec+" CO2",color='blue',fontsize=10) + ax1.plot(xs,co2_cld,color='blue',linestyle='solid') + ax1.tick_params(axis='y',labelcolor='blue',labelsize=10) + ax1.tick_params(axis='x',labelcolor='black',labelsize=10) + ax1.yaxis.set_major_formatter(mtick.FormatStrFormatter('%.1E')) + ax2=ax1.twinx() + ax2.set_ylabel(ylab_spec+" NCEP",color='red',fontsize=10) + ax2.plot(xs,ncep_cld,color='red',linestyle='solid') + ax2.tick_params(axis='y',labelcolor='red',labelsize=10) + ax2.yaxis.set_major_formatter(mtick.FormatStrFormatter('%.1E')) + plt.xlim([-3,3]) + plt.suptitle('OBS - Analysis Brightness Temperature 0.1 Degree Bins for'+'\nCO2 Slicing and NCEP Cloud Points at Wavenumber '+str(chan_wv[i]),fontsize=14,fontweight='bold') + plt.title(day_label,fontsize=12) + filepth=(filepath+"/oa_plot_co2_ncep_cld_"+str(chan_num[i])+"_"+day_time+".png") + fig.set_size_inches(6.5,9) + plt.savefig(filepth,dpi=fig.dpi,bbox_inches='tight',facecolor=(0.8392156,0.8352941,0.6627451),edgecolor='#FF5657') + fig,ax1=plt.subplots() + ax1.set_xlabel('OBS - Analysis Brightness Temperature [K]',color='black',fontsize=10) + ax1.set_ylabel(ylab_spec+" CO2",color='blue',fontsize=10) + ax1.plot(xs,co2_clr,color='blue',linestyle='solid') + ax1.tick_params(axis='x',labelcolor='black',labelsize=10) + ax1.tick_params(axis='y',labelcolor='blue',labelsize=10) + ax1.yaxis.set_major_formatter(mtick.FormatStrFormatter('%.1E')) + ax2=ax1.twinx() + ax2.set_ylabel(ylab_spec+" NCEP",color='red',fontsize=10) + ax2.plot(xs,ncep_clr,color='red',linestyle='solid') + ax2.tick_params(axis='y',labelcolor='red',labelsize=10) + ax2.yaxis.set_major_formatter(mtick.FormatStrFormatter('%.1E')) + plt.xlim([-3,3]) + plt.suptitle('OBS - Analysis Brightness Temperature 0.1 Degree Bins for'+'\nCO2 Slicing and NCEP Clear Points at Wavenumber '+str(chan_wv[i]),fontsize=14,fontweight='bold') + plt.title(day_label,fontsize=12) + filepth=(filepath+"/oa_plot_co2_ncep_clr_"+str(chan_num[i])+"_"+day_time+".png") + fig.set_size_inches(6.5,9) + plt.savefig(filepth,dpi=fig.dpi,bbox_inches='tight',facecolor=(0.8392156,0.8352941,0.6627451),edgecolor='#FF5657') + else: + a1=15+i-1 + a2=36+i + a3=58+i + co2=array[a1][:] + ncep=array[a2][:] + all_obs=array[a3][:] + topo=array[2][:] + lat=array[0][:] + co2=np.where(co2==1,6,co2) + co2=np.where(co2<=4,5,co2) + co2_cld=np.asarray(counter(all_obs[np.where((co2==5))][:])) + co2_clr=np.asarray(counter(all_obs[np.where((co2==6))][:])) + ncep_cld=np.asarray(counter(all_obs[np.where((ncep==7))][:])) + ncep_clr=np.asarray(counter(all_obs[np.where((ncep!=7))][:])) + fig,ax1=plt.subplots() + ax1.set_xlabel('OBS - Analysis Brightness Temperature [K]',color='black',fontsize=10) + ax1.set_ylabel(ylab_spec+" CO2",color='blue',fontsize=10) + ax1.plot(xs,co2_cld,color='blue',linestyle='solid') + ax1.tick_params(axis='y',labelcolor='blue',labelsize=10) + ax1.tick_params(axis='x',labelcolor='black',labelsize=10) + ax1.yaxis.set_major_formatter(mtick.FormatStrFormatter('%.1E')) + ax2=ax1.twinx() + ax2.set_ylabel(ylab_spec+" NCEP",color='red',fontsize=10) + ax2.plot(xs,ncep_cld,color='red',linestyle='solid') + ax2.tick_params(axis='y',labelcolor='red',labelsize=10) + ax2.yaxis.set_major_formatter(mtick.FormatStrFormatter('%.1E')) + plt.xlim([-3,3]) + plt.suptitle('OBS - Analysis Brightness Temperature 0.1 Degree Bins for'+'\nCO2 Slicing and NCEP Cloud Points at Wavenumber '+str(chan_wv[i]),fontsize=14,fontweight='bold') + plt.title(day_label,fontsize=12) + filepth=(filepath+"/oa_plot_co2_ncep_cld_"+str(chan_num[i])+"_"+day_time+".png") + fig.set_size_inches(6.5,9) + plt.savefig(filepth,dpi=fig.dpi,bbox_inches='tight',facecolor=(0.8392156,0.8352941,0.6627451),edgecolor='#FF5657') + fig,ax1=plt.subplots() + ax1.set_xlabel('OBS - Analysis Brightness Temperature [K]',color='black',fontsize=10) + ax1.set_ylabel(ylab_spec+" CO2",color='blue',fontsize=10) + ax1.plot(xs,co2_clr,color='blue',linestyle='solid') + ax1.tick_params(axis='y',labelcolor='blue',labelsize=10) + ax1.tick_params(axis='x',labelcolor='black',labelsize=10) + ax1.yaxis.set_major_formatter(mtick.FormatStrFormatter('%.1E')) + ax2=ax1.twinx() + ax2.set_ylabel(ylab_spec+" NCEP",color='red',fontsize=10) + ax2.plot(xs,ncep_clr,color='red',linestyle='solid') + ax2.tick_params(axis='y',labelcolor='red',labelsize=10) + ax2.yaxis.set_major_formatter(mtick.FormatStrFormatter('%.1E')) + plt.xlim([-3,3]) + plt.suptitle('OBS - Analysis Brightness Temperature 0.1 Degree Bins for'+'\nCO2 Slicing and NCEP Clear Points at Wavenumber '+str(chan_wv[i]),fontsize=14,fontweight='bold') + plt.title(day_label,fontsize=12) + filepth=(filepath+"/oa_plot_co2_ncep_clr_"+str(chan_num[i])+"_"+day_time+".png") + fig.set_size_inches(6.5,9) + plt.savefig(filepth,dpi=fig.dpi,bbox_inches='tight',facecolor=(0.8392156,0.8352941,0.6627451),edgecolor='#FF5657') + +def confusion_map_plots(yr,mn,dy,type,wn): + b1=int(dy) + b2=int(mn) + b3=int(yr) + if b1>=0 and b1<=9: + c1="0"+str(b1) + else: + c1=str(b1) + if b2>=0 and b2<=9: + c2="0"+str(b2) + else: + c2=str(b2) + c3=str(b3) + day=c1 + mon=c2 + yer=c3 + day_time=(yer+'_'+mon+'_'+day) + if type==1: + file=("/apollo/jung/bandersen/compare_full_no_parts/co2_dr_ncep_ecmwf_output_"+day_time+"_24hr.txt") + array=loadtxt(file,comments='#',delimiter=',',unpack=True) + filepath=("/home/bandersen/iris-home/all_algorithms/image_output") + day_label=(r+day_time+'\n') + lat=array[0][:] + topo=array[2][:] + forr=array[3][:] + ctpc=array[9][:] + ctpd=array[10][:] + ctpn=array[12][:] + cotc=array[13][:] + cotd=array[14][:] + cotn=array[16][:] + size=np.size(lat) + ctpc=np.where(ctpc==2050,2000,ctpc) + hig_opq_co2=np.size(np.where((ctpc>=0)&(ctpc<440)&(cotc>0.95))[:]) + hig_thk_co2=np.size(np.where((ctpc>=0)&(ctpc<440)&(cotc>=0.5)&(cotc<=0.95))[:]) + hig_thn_co2=np.size(np.where((ctpc>=0)&(ctpc<440)&(cotc<0.5))[:]) + mid_opq_co2=np.size(np.where((ctpc>=440)&(ctpc<660)&(cotc>0.95))[:]) + mid_thk_co2=np.size(np.where((ctpc>=440)&(ctpc<660)&(cotc>=0.5)&(cotc<=0.95))[:]) + mid_thn_co2=np.size(np.where((ctpc>=440)&(ctpc<660)&(cotc<0.5))[:]) + low_co2=np.size(np.where((ctpc>=660)&(ctpc<900))[:]) + clr_co2=np.size(np.where(ctpc==2000)[:]) + sfc_co2=np.size(np.where(ctpc==2100)[:]) + error_co2=np.size(np.where(ctpc==-7777)[:]) + hig_opq_nc=np.size(np.where((ctpn>=0)&(ctpn<440)&(cotn>0.95)&(cotn<1.01))[:]) + hig_thk_nc=np.size(np.where((ctpn>=0)&(ctpn<440)&(cotn>=0.5)&(cotn<=0.95))[:]) + hig_thn_nc=np.size(np.where((ctpn>=0)&(ctpn<440)&(cotn>=0)&(cotn<0.5))[:]) + mid_opq_nc=np.size(np.where((ctpn>=440)&(ctpn<660)&(cotn>0.95)&(cotn<1.01))[:]) + mid_thk_nc=np.size(np.where((ctpn>=440)&(ctpn<660)&(cotn>=0.5)&(cotn<=0.95))[:]) + mid_thn_nc=np.size(np.where((ctpn>=440)&(ctpn<660)&(cotn>=0)&(cotn<0.5))[:]) + low_nc=np.size(np.where((ctpn>=660)&(ctpn<900))[:]) + sfc_nc=np.size(np.where((ctpn>=900)&(ctpn<1010))[:]) + error_nc=np.size(np.where((ctpn<-2000))[:]) + clr_nc=int(size-hig_opq_nc-mid_opq_nc-hig_thk_nc-mid_thk_nc-hig_thn_nc-mid_thn_nc-low_nc-error_nc-sfc_nc) + hig_opq_dr=np.size(np.where((ctpd>=0)&(ctpd<440)&(cotd<=5)&(cotd>3.75))[:]) + hig_thk_dr=np.size(np.where((ctpd>=0)&(ctpd<440)&(cotd<=3.75)&(cotd>=1))[:]) + hig_thn_dr=np.size(np.where((ctpd>=0)&(ctpd<440)&(cotd<=1)&(cotd>=0))[:]) + mid_opq_dr=np.size(np.where((ctpd>=440)&(ctpd<660)&(cotd<=5)&(cotd>3.75))[:]) + mid_thk_dr=np.size(np.where((ctpd>=440)&(ctpd<660)&(cotd<=3.75)&(cotd>=1))[:]) + mid_thn_dr=np.size(np.where((ctpd>=440)&(ctpd<660)&(cotd<=1)&(cotd>=0))[:]) + low_dr=np.size(np.where((ctpd>=660)&(ctpd<900))[:]) + sfc_dr=np.size(np.where((ctpd>=900)&(ctpd<1010))[:]) + error_dr=np.size(np.where((ctpd<-2000))[:]) + clr_dr=int(size-hig_opq_dr-mid_opq_dr-hig_thk_dr-mid_thk_dr-hig_thn_dr-mid_thn_dr-low_dr-error_dr) + labels_co2=['High (<440 hPa)'+'\n'+r'Opaque ($ N \epsilon > 0.95$)','High (<440 hPa)'+'\n'+r'Thick ($0.5 \geq N \epsilon \geq 0.95$)','High (<440 hPa)'+'\n'+r'Thin ($ N \epsilon < 0.5$)','Middle (660-44$ + co2=np.array([hig_opq_co2,hig_thk_co2,hig_thn_co2,mid_opq_co2,mid_thk_co2,mid_thn_co2,low_co2,clr_co2,sfc_co2,error_co2]) + bcolors=['red','pink','orange','greenyellow','seagreen','darkgreen','blue','purple','black','grey'] + fig,ax=plt.subplots() + ax.pie(co2,labels=labels_co2,colors=bcolors,autopct='%1.1f%%',shadow=True,startangle=90,textprops={'fontsize':14}) + ax.axis('equal') + plt.title('Cloud Category for CO2 Slicing '+'\n'+day_label,fontsize=22,fontweight='bold') + filepth=(filepath+"/pie_chart_co2_"+day_time+".png") + fig.set_size_inches(10,10) + plt.savefig(filepth,dpi=fig.dpi,bbox_inches='tight') + ncep=np.array([hig_opq_nc,hig_thk_nc,hig_thn_nc,mid_opq_nc,mid_thk_nc,mid_thn_nc,low_nc,clr_nc,sfc_nc,error_nc]) + bcolors=['red','pink','orange','greenyellow','seagreen','darkgreen','blue','purple','black','grey'] + fig,ax=plt.subplots() + ax.pie(ncep,labels=labels_co2,colors=bcolors,autopct='%1.1f%%',shadow=True,startangle=90,textprops={'fontsize':14}) + ax.axis('equal') + plt.title('Cloud Category for NCEP Algorithm '+'\n'+day_label,fontsize=22,fontweight='bold') + filepth=(filepath+"/pie_chart_ncep_"+day_time+".png") + fig.set_size_inches(10,10) + plt.savefig(filepth,dpi=fig.dpi,bbox_inches='tight') + dr=np.array([hig_opq_dr,hig_thk_dr,hig_thn_dr,mid_opq_dr,mid_thk_dr,mid_thn_dr,low_dr,clr_dr,sfc_dr,error_dr]) + fig,ax=plt.subplots() + ax.pie(dr,labels=labels_co2,colors=bcolors,autopct='%1.1f%%',shadow=True,startangle=90,textprops={'fontsize':14}) + ax.axis('equal') + plt.title('Cloud Category for Dual Regression '+'\n'+day_label,fontsize=22,fontweight='bold') + filepth=(filepath+"/pie_chart_dr_"+day_time+".png") + fig.set_size_inches(10,10) + plt.savefig(filepth,dpi=fig.dpi,bbox_inches='tight') + elif type==2: + file=("/apollo/jung/bandersen/compare_full_no_parts/co2_ncep_output_"+day_time+"_24hr.txt") + array=loadtxt(file,comments='#',delimiter=',',unpack=True) + filepath=("/home/bandersen/iris-home/all_algorithms/image_output") + day_label=(r+day_time+'\n') + forr=array[3][:] + array=loadtxt(file,comments='#',delimiter=',',unpack=True) + lat=array[0][:] + topo=array[2][:] + forr=array[3][:] + ctpc=array[9][:] + ctpn=array[11][:] + cotc=array[12][:] + cotn=array[14][:] + size=np.size(lat) + ctpc=np.where(ctpc==2050,2000,ctpc) + hig_opq_co2=np.size(np.where((ctpc>=0)&(ctpc<440)&(cotc>0.95))[:]) + hig_thk_co2=np.size(np.where((ctpc>=0)&(ctpc<440)&(cotc>=0.5)&(cotc<=0.95))[:]) + hig_thn_co2=np.size(np.where((ctpc>=0)&(ctpc<440)&(cotc<0.5))[:]) + mid_opq_co2=np.size(np.where((ctpc>=440)&(ctpc<660)&(cotc>0.95))[:]) + mid_thk_co2=np.size(np.where((ctpc>=440)&(ctpc<660)&(cotc>=0.5)&(cotc<=0.95))[:]) + mid_thn_co2=np.size(np.where((ctpc>=440)&(ctpc<660)&(cotc<0.5))[:]) + low_co2=np.size(np.where((ctpc>=660)&(ctpc<900))[:]) + clr_co2=np.size(np.where(ctpc==2000)[:]) + sfc_co2=np.size(np.where(ctpc==2100)[:]) + error_co2=np.size(np.where(ctpc==-7777)[:]) + hig_opq_nc=np.size(np.where((ctpn>=0)&(ctpn<440)&(cotn>0.95)&(cotn<1.01))[:]) + hig_thk_nc=np.size(np.where((ctpn>=0)&(ctpn<440)&(cotn>=0.5)&(cotn<=0.95))[:]) + hig_thn_nc=np.size(np.where((ctpn>=0)&(ctpn<440)&(cotn>=0)&(cotn<0.5))[:]) + mid_opq_nc=np.size(np.where((ctpn>=440)&(ctpn<660)&(cotn>0.95)&(cotn<1.01))[:]) + mid_thk_nc=np.size(np.where((ctpn>=440)&(ctpn<660)&(cotn>=0.5)&(cotn<=0.95))[:]) + mid_thn_nc=np.size(np.where((ctpn>=440)&(ctpn<660)&(cotn>=0)&(cotn<0.5))[:]) + low_nc=np.size(np.where((ctpn>=660)&(ctpn<900))[:]) + sfc_nc=np.size(np.where((ctpn>=900)&(ctpn<1010))[:]) + error_nc=np.size(np.where((ctpn<-2000))[:]) + clr_nc=int(size-hig_opq_nc-mid_opq_nc-hig_thk_nc-mid_thk_nc-hig_thn_nc-mid_thn_nc-low_nc-error_nc-sfc_nc) + labels_co2=['High (<440 hPa)'+'\n'+r'Opaque ($ N \epsilon > 0.95$)','High (<440 hPa)'+'\n'+r'Thick ($0.5 \geq N \epsilon \geq 0.95$)','High (<440 hPa)'+'\n'+r'Thin ($ N \epsilon < 0.5$)','Middle (660-44$ + co2=np.array([hig_opq_co2,hig_thk_co2,hig_thn_co2,mid_opq_co2,mid_thk_co2,mid_thn_co2,low_co2,clr_co2,sfc_co2,error_co2]) + bcolors=['red','pink','orange','greenyellow','seagreen','darkgreen','blue','purple','black','grey'] + fig,ax=plt.subplots() + ax.pie(co2,labels=labels_co2,colors=bcolors,autopct='%1.1f%%',shadow=True,startangle=90,textprops={'fontsize':14}) + ax.axis('equal') + plt.title('Cloud Category for CO2 Slicing '+'\n'+day_label,fontsize=22,fontweight='bold') + filepth=(filepath+"/pie_chart_co2_"+day_time+".png") + fig.set_size_inches(10,10) + plt.savefig(filepth,dpi=fig.dpi,bbox_inches='tight') + ncep=np.array([hig_opq_nc,hig_thk_nc,hig_thn_nc,mid_opq_nc,mid_thk_nc,mid_thn_nc,low_nc,clr_nc,sfc_nc,error_nc]) + bcolors=['red','pink','orange','greenyellow','seagreen','darkgreen','blue','purple','black','grey'] + fig,ax=plt.subplots() + ax.pie(ncep,labels=labels_co2,colors=bcolors,autopct='%1.1f%%',shadow=True,startangle=90,textprops={'fontsize':14}) + ax.axis('equal') + plt.title('Cloud Category for NCEP Algorithm '+'\n'+day_label,fontsize=22,fontweight='bold') + filepth=(filepath+"/pie_chart_ncep_"+day_time+".png") + fig.set_size_inches(10,10) + plt.savefig(filepth,dpi=fig.dpi,bbox_inches='tight') diff --git a/codes/ncep_example.sh b/codes/ncep_example.sh new file mode 100644 index 0000000000000000000000000000000000000000..0369f3881c9451af02ad0885663ef4012e15e98c --- /dev/null +++ b/codes/ncep_example.sh @@ -0,0 +1,53 @@ +#!/bin/sh +#SBATCH -v +#SBATCH --job-name=ncep +#SBATCH --mem-per-cpu=7000 +#SBATCH --partition=all +#SBATCH --ntasks=1 +#SBATCH --cpus-per-task=2 +#SBATCH --time=0:30:00 +#SBATCH --output=/home/snebuda/cris/ncep_cloudtest/jobout/ncep.%j.out + +exe=/apollo/jung/bandersen/ncep_cloudtest/ncep.exe +file_satinfo=/apollo/jung/bandersen/ncep_cloudtest/global_satinfo.txt + +source /etc/bashrc +module purge +module load license_intel +module load intel +module load hdf +module load hdf5 +module load netcdf4 + +input_path=/apollo/jung/snebuda/brianne/2021 +output_path=/apollo/jung/bandersen/ncep_data_2021_07_30 + +cd ${input_path} + +#file_bt=cris.431.n20.20210410_000000.20210410_003000.bt.nc +file_bt=cris.431.n20.20210730_000000.20210730_003000.bt.nc # template substitution here + +froot=${file_bt:: -5} +#echo ${froot} + +file_state=${froot}state.nc +file_te=${froot}te.nc +file_sens=${froot}sens.nc +#file_out=${froot}ncep.nobias.nc + +file_out=${output_path}/${froot}ncep.nc + +echo file out is ${file_out} + +srun --cpu_bind=core --distribution=block:block ${exe} \ +${file_satinfo} \ +${file_bt} \ +${file_state} \ +${file_te} \ +${file_sens} \ +${file_out} + +sacct -j $SLURM_JOB_ID --format=JobID,JobName,Elapsed,CPUTime,MaxRSS,NodeList%30 + +exit +~ diff --git a/docs/CrIS_FSR_good_indices_1971.txt b/docs/CrIS_FSR_good_indices_1971.txt new file mode 100644 index 0000000000000000000000000000000000000000..8ae8f7a46fde0101c5faccef2093e43525dcc888 --- /dev/null +++ b/docs/CrIS_FSR_good_indices_1971.txt @@ -0,0 +1,2211 @@ + 1 650.0000 1 + 2 650.6250 1 + 3 651.2500 1 + 4 651.8750 1 + 5 652.5000 1 + 6 653.1250 1 + 7 653.7500 1 + 8 654.3750 1 + 9 655.0000 1 + 10 655.6250 1 + 11 656.2500 1 + 12 656.8750 1 + 13 657.5000 1 + 14 658.1250 1 + 15 658.7500 1 + 16 659.3750 1 + 17 660.0000 1 + 18 660.6250 1 + 19 661.2500 1 + 20 661.8750 1 + 21 662.5000 1 + 22 663.1250 1 + 23 663.7500 1 + 24 664.3750 1 + 25 665.0000 1 + 26 665.6250 1 + 27 666.2500 1 + 28 666.8750 1 + 29 667.5000 1 + 30 668.1250 1 + 31 668.7500 1 + 32 669.3750 1 + 33 670.0000 1 + 34 670.6250 1 + 35 671.2500 1 + 36 671.8750 1 + 37 672.5000 1 + 38 673.1250 1 + 39 673.7500 1 + 40 674.3750 1 + 41 675.0000 1 + 42 675.6250 1 + 43 676.2500 1 + 44 676.8750 1 + 45 677.5000 1 + 46 678.1250 1 + 47 678.7500 1 + 48 679.3750 1 + 49 680.0000 1 + 50 680.6250 1 + 51 681.2500 1 + 52 681.8750 1 + 53 682.5000 1 + 54 683.1250 1 + 55 683.7500 1 + 56 684.3750 1 + 57 685.0000 1 + 58 685.6250 1 + 59 686.2500 1 + 60 686.8750 1 + 61 687.5000 1 + 62 688.1250 1 + 63 688.7500 1 + 64 689.3750 1 + 65 690.0000 1 + 66 690.6250 1 + 67 691.2500 1 + 68 691.8750 1 + 69 692.5000 1 + 70 693.1250 1 + 71 693.7500 1 + 72 694.3750 1 + 73 695.0000 1 + 74 695.6250 1 + 75 696.2500 1 + 76 696.8750 1 + 77 697.5000 1 + 78 698.1250 1 + 79 698.7500 1 + 80 699.3750 1 + 81 700.0000 1 + 82 700.6250 1 + 83 701.2500 1 + 84 701.8750 1 + 85 702.5000 1 + 86 703.1250 1 + 87 703.7500 1 + 88 704.3750 1 + 89 705.0000 1 + 90 705.6250 1 + 91 706.2500 1 + 92 706.8750 1 + 93 707.5000 1 + 94 708.1250 1 + 95 708.7500 1 + 96 709.3750 1 + 97 710.0000 1 + 98 710.6250 1 + 99 711.2500 1 + 100 711.8750 1 + 101 712.5000 1 + 102 713.1250 1 + 103 713.7500 1 + 104 714.3750 1 + 105 715.0000 1 + 106 715.6250 1 + 107 716.2500 1 + 108 716.8750 1 + 109 717.5000 1 + 110 718.1250 1 + 111 718.7500 1 + 112 719.3750 1 + 113 720.0000 1 + 114 720.6250 1 + 115 721.2500 1 + 116 721.8750 1 + 117 722.5000 1 + 118 723.1250 1 + 119 723.7500 1 + 120 724.3750 1 + 121 725.0000 1 + 122 725.6250 1 + 123 726.2500 1 + 124 726.8750 1 + 125 727.5000 1 + 126 728.1250 1 + 127 728.7500 1 + 128 729.3750 1 + 129 730.0000 1 + 130 730.6250 1 + 131 731.2500 1 + 132 731.8750 1 + 133 732.5000 1 + 134 733.1250 1 + 135 733.7500 1 + 136 734.3750 1 + 137 735.0000 1 + 138 735.6250 1 + 139 736.2500 1 + 140 736.8750 1 + 141 737.5000 1 + 142 738.1250 1 + 143 738.7500 1 + 144 739.3750 1 + 145 740.0000 1 + 146 740.6250 1 + 147 741.2500 1 + 148 741.8750 1 + 149 742.5000 1 + 150 743.1250 1 + 151 743.7500 1 + 152 744.3750 1 + 153 745.0000 1 + 154 745.6250 1 + 155 746.2500 1 + 156 746.8750 1 + 157 747.5000 1 + 158 748.1250 1 + 159 748.7500 1 + 160 749.3750 1 + 161 750.0000 1 + 162 750.6250 1 + 163 751.2500 1 + 164 751.8750 1 + 165 752.5000 1 + 166 753.1250 1 + 167 753.7500 1 + 168 754.3750 1 + 169 755.0000 1 + 170 755.6250 1 + 171 756.2500 1 + 172 756.8750 1 + 173 757.5000 1 + 174 758.1250 1 + 175 758.7500 1 + 176 759.3750 1 + 177 760.0000 1 + 178 760.6250 1 + 179 761.2500 1 + 180 761.8750 1 + 181 762.5000 1 + 182 763.1250 1 + 183 763.7500 1 + 184 764.3750 1 + 185 765.0000 1 + 186 765.6250 1 + 187 766.2500 1 + 188 766.8750 1 + 189 767.5000 1 + 190 768.1250 1 + 191 768.7500 1 + 192 769.3750 1 + 193 770.0000 1 + 194 770.6250 1 + 195 771.2500 1 + 196 771.8750 1 + 197 772.5000 1 + 198 773.1250 1 + 199 773.7500 1 + 200 774.3750 1 + 201 775.0000 1 + 202 775.6250 1 + 203 776.2500 1 + 204 776.8750 1 + 205 777.5000 1 + 206 778.1250 1 + 207 778.7500 1 + 208 779.3750 1 + 209 780.0000 1 + 210 780.6250 1 + 211 781.2500 1 + 212 781.8750 1 + 213 782.5000 1 + 214 783.1250 1 + 215 783.7500 1 + 216 784.3750 1 + 217 785.0000 1 + 218 785.6250 1 + 219 786.2500 1 + 220 786.8750 1 + 221 787.5000 1 + 222 788.1250 1 + 223 788.7500 1 + 224 789.3750 1 + 225 790.0000 1 + 226 790.6250 1 + 227 791.2500 1 + 228 791.8750 1 + 229 792.5000 1 + 230 793.1250 1 + 231 793.7500 1 + 232 794.3750 1 + 233 795.0000 1 + 234 795.6250 1 + 235 796.2500 1 + 236 796.8750 1 + 237 797.5000 1 + 238 798.1250 1 + 239 798.7500 1 + 240 799.3750 1 + 241 800.0000 1 + 242 800.6250 1 + 243 801.2500 1 + 244 801.8750 1 + 245 802.5000 1 + 246 803.1250 1 + 247 803.7500 1 + 248 804.3750 1 + 249 805.0000 1 + 250 805.6250 1 + 251 806.2500 1 + 252 806.8750 1 + 253 807.5000 1 + 254 808.1250 1 + 255 808.7500 1 + 256 809.3750 1 + 257 810.0000 1 + 258 810.6250 1 + 259 811.2500 1 + 260 811.8750 1 + 261 812.5000 1 + 262 813.1250 1 + 263 813.7500 1 + 264 814.3750 1 + 265 815.0000 1 + 266 815.6250 1 + 267 816.2500 1 + 268 816.8750 1 + 269 817.5000 1 + 270 818.1250 1 + 271 818.7500 1 + 272 819.3750 1 + 273 820.0000 1 + 274 820.6250 1 + 275 821.2500 1 + 276 821.8750 1 + 277 822.5000 1 + 278 823.1250 1 + 279 823.7500 1 + 280 824.3750 1 + 281 825.0000 1 + 282 825.6250 1 + 283 826.2500 1 + 284 826.8750 1 + 285 827.5000 1 + 286 828.1250 1 + 287 828.7500 1 + 288 829.3750 1 + 289 830.0000 1 + 290 830.6250 1 + 291 831.2500 1 + 292 831.8750 1 + 293 832.5000 1 + 294 833.1250 1 + 295 833.7500 1 + 296 834.3750 1 + 297 835.0000 1 + 298 835.6250 1 + 299 836.2500 1 + 300 836.8750 1 + 301 837.5000 1 + 302 838.1250 1 + 303 838.7500 1 + 304 839.3750 1 + 305 840.0000 1 + 306 840.6250 1 + 307 841.2500 1 + 308 841.8750 1 + 309 842.5000 1 + 310 843.1250 1 + 311 843.7500 1 + 312 844.3750 1 + 313 845.0000 1 + 314 845.6250 1 + 315 846.2500 1 + 316 846.8750 1 + 317 847.5000 1 + 318 848.1250 1 + 319 848.7500 1 + 320 849.3750 1 + 321 850.0000 1 + 322 850.6250 1 + 323 851.2500 1 + 324 851.8750 1 + 325 852.5000 1 + 326 853.1250 1 + 327 853.7500 1 + 328 854.3750 1 + 329 855.0000 1 + 330 855.6250 1 + 331 856.2500 1 + 332 856.8750 1 + 333 857.5000 1 + 334 858.1250 1 + 335 858.7500 1 + 336 859.3750 1 + 337 860.0000 1 + 338 860.6250 1 + 339 861.2500 1 + 340 861.8750 1 + 341 862.5000 1 + 342 863.1250 1 + 343 863.7500 1 + 344 864.3750 1 + 345 865.0000 1 + 346 865.6250 1 + 347 866.2500 1 + 348 866.8750 1 + 349 867.5000 1 + 350 868.1250 1 + 351 868.7500 1 + 352 869.3750 1 + 353 870.0000 1 + 354 870.6250 1 + 355 871.2500 1 + 356 871.8750 1 + 357 872.5000 1 + 358 873.1250 1 + 359 873.7500 1 + 360 874.3750 1 + 361 875.0000 1 + 362 875.6250 1 + 363 876.2500 1 + 364 876.8750 1 + 365 877.5000 1 + 366 878.1250 1 + 367 878.7500 1 + 368 879.3750 1 + 369 880.0000 1 + 370 880.6250 1 + 371 881.2500 1 + 372 881.8750 1 + 373 882.5000 1 + 374 883.1250 1 + 375 883.7500 1 + 376 884.3750 1 + 377 885.0000 1 + 378 885.6250 1 + 379 886.2500 1 + 380 886.8750 1 + 381 887.5000 1 + 382 888.1250 1 + 383 888.7500 1 + 384 889.3750 1 + 385 890.0000 1 + 386 890.6250 1 + 387 891.2500 1 + 388 891.8750 1 + 389 892.5000 1 + 390 893.1250 1 + 391 893.7500 1 + 392 894.3750 1 + 393 895.0000 1 + 394 895.6250 1 + 395 896.2500 1 + 396 896.8750 1 + 397 897.5000 1 + 398 898.1250 1 + 399 898.7500 1 + 400 899.3750 1 + 401 900.0000 1 + 402 900.6250 1 + 403 901.2500 1 + 404 901.8750 1 + 405 902.5000 1 + 406 903.1250 1 + 407 903.7500 1 + 408 904.3750 1 + 409 905.0000 1 + 410 905.6250 1 + 411 906.2500 1 + 412 906.8750 1 + 413 907.5000 1 + 414 908.1250 1 + 415 908.7500 1 + 416 909.3750 1 + 417 910.0000 1 + 418 910.6250 1 + 419 911.2500 1 + 420 911.8750 1 + 421 912.5000 1 + 422 913.1250 1 + 423 913.7500 1 + 424 914.3750 1 + 425 915.0000 1 + 426 915.6250 1 + 427 916.2500 1 + 428 916.8750 1 + 429 917.5000 1 + 430 918.1250 1 + 431 918.7500 1 + 432 919.3750 1 + 433 920.0000 1 + 434 920.6250 1 + 435 921.2500 1 + 436 921.8750 1 + 437 922.5000 1 + 438 923.1250 1 + 439 923.7500 1 + 440 924.3750 1 + 441 925.0000 1 + 442 925.6250 1 + 443 926.2500 1 + 444 926.8750 1 + 445 927.5000 1 + 446 928.1250 1 + 447 928.7500 1 + 448 929.3750 1 + 449 930.0000 1 + 450 930.6250 1 + 451 931.2500 1 + 452 931.8750 1 + 453 932.5000 1 + 454 933.1250 1 + 455 933.7500 1 + 456 934.3750 1 + 457 935.0000 1 + 458 935.6250 1 + 459 936.2500 1 + 460 936.8750 1 + 461 937.5000 1 + 462 938.1250 1 + 463 938.7500 1 + 464 939.3750 1 + 465 940.0000 1 + 466 940.6250 1 + 467 941.2500 1 + 468 941.8750 1 + 469 942.5000 1 + 470 943.1250 1 + 471 943.7500 1 + 472 944.3750 1 + 473 945.0000 1 + 474 945.6250 1 + 475 946.2500 1 + 476 946.8750 1 + 477 947.5000 1 + 478 948.1250 1 + 479 948.7500 1 + 480 949.3750 1 + 481 950.0000 1 + 482 950.6250 1 + 483 951.2500 1 + 484 951.8750 1 + 485 952.5000 1 + 486 953.1250 1 + 487 953.7500 1 + 488 954.3750 1 + 489 955.0000 1 + 490 955.6250 1 + 491 956.2500 1 + 492 956.8750 1 + 493 957.5000 1 + 494 958.1250 1 + 495 958.7500 1 + 496 959.3750 1 + 497 960.0000 1 + 498 960.6250 1 + 499 961.2500 1 + 500 961.8750 1 + 501 962.5000 1 + 502 963.1250 1 + 503 963.7500 1 + 504 964.3750 1 + 505 965.0000 1 + 506 965.6250 1 + 507 966.2500 1 + 508 966.8750 1 + 509 967.5000 1 + 510 968.1250 1 + 511 968.7500 1 + 512 969.3750 1 + 513 970.0000 1 + 514 970.6250 1 + 515 971.2500 1 + 516 971.8750 1 + 517 972.5000 1 + 518 973.1250 1 + 519 973.7500 1 + 520 974.3750 1 + 521 975.0000 1 + 522 975.6250 1 + 523 976.2500 1 + 524 976.8750 1 + 525 977.5000 1 + 526 978.1250 1 + 527 978.7500 1 + 528 979.3750 1 + 529 980.0000 1 + 530 980.6250 1 + 531 981.2500 1 + 532 981.8750 1 + 533 982.5000 1 + 534 983.1250 1 + 535 983.7500 1 + 536 984.3750 1 + 537 985.0000 1 + 538 985.6250 1 + 539 986.2500 1 + 540 986.8750 1 + 541 987.5000 1 + 542 988.1250 1 + 543 988.7500 1 + 544 989.3750 1 + 545 990.0000 1 + 546 990.6250 1 + 547 991.2500 1 + 548 991.8750 1 + 549 992.5000 1 + 550 993.1250 1 + 551 993.7500 1 + 552 994.3750 1 + 553 995.0000 1 + 554 995.6250 1 + 555 996.2500 1 + 556 996.8750 1 + 557 997.5000 1 + 558 998.1250 1 + 559 998.7500 1 + 560 999.3750 1 + 561 1000.0000 1 + 562 1000.6250 1 + 563 1001.2500 1 + 564 1001.8750 1 + 565 1002.5000 1 + 566 1003.1250 1 + 567 1003.7500 1 + 568 1004.3750 1 + 569 1005.0000 1 + 570 1005.6250 1 + 571 1006.2500 1 + 572 1006.8750 1 + 573 1007.5000 1 + 574 1008.1250 1 + 575 1008.7500 1 + 576 1009.3750 1 + 577 1010.0000 1 + 578 1010.6250 1 + 579 1011.2500 1 + 580 1011.8750 1 + 581 1012.5000 1 + 582 1013.1250 1 + 583 1013.7500 1 + 584 1014.3750 1 + 585 1015.0000 1 + 586 1015.6250 1 + 587 1016.2500 1 + 588 1016.8750 1 + 589 1017.5000 1 + 590 1018.1250 1 + 591 1018.7500 1 + 592 1019.3750 1 + 593 1020.0000 1 + 594 1020.6250 1 + 595 1021.2500 1 + 596 1021.8750 1 + 597 1022.5000 1 + 598 1023.1250 1 + 599 1023.7500 1 + 600 1024.3750 1 + 601 1025.0000 1 + 602 1025.6250 1 + 603 1026.2500 1 + 604 1026.8750 1 + 605 1027.5000 1 + 606 1028.1250 1 + 607 1028.7500 1 + 608 1029.3750 1 + 609 1030.0000 1 + 610 1030.6250 1 + 611 1031.2500 1 + 612 1031.8750 1 + 613 1032.5000 1 + 614 1033.1250 1 + 615 1033.7500 1 + 616 1034.3750 1 + 617 1035.0000 1 + 618 1035.6250 1 + 619 1036.2500 1 + 620 1036.8750 1 + 621 1037.5000 1 + 622 1038.1250 1 + 623 1038.7500 1 + 624 1039.3750 1 + 625 1040.0000 1 + 626 1040.6250 1 + 627 1041.2500 1 + 628 1041.8750 1 + 629 1042.5000 1 + 630 1043.1250 1 + 631 1043.7500 1 + 632 1044.3750 1 + 633 1045.0000 1 + 634 1045.6250 1 + 635 1046.2500 1 + 636 1046.8750 1 + 637 1047.5000 1 + 638 1048.1250 1 + 639 1048.7500 1 + 640 1049.3750 1 + 641 1050.0000 1 + 642 1050.6250 1 + 643 1051.2500 1 + 644 1051.8750 1 + 645 1052.5000 1 + 646 1053.1250 1 + 647 1053.7500 1 + 648 1054.3750 1 + 649 1055.0000 1 + 650 1055.6250 1 + 651 1056.2500 1 + 652 1056.8750 1 + 653 1057.5000 1 + 654 1058.1250 1 + 655 1058.7500 1 + 656 1059.3750 1 + 657 1060.0000 1 + 658 1060.6250 1 + 659 1061.2500 1 + 660 1061.8750 1 + 661 1062.5000 1 + 662 1063.1250 1 + 663 1063.7500 1 + 664 1064.3750 1 + 665 1065.0000 1 + 666 1065.6250 1 + 667 1066.2500 1 + 668 1066.8750 1 + 669 1067.5000 1 + 670 1068.1250 1 + 671 1068.7500 1 + 672 1069.3750 1 + 673 1070.0000 1 + 674 1070.6250 1 + 675 1071.2500 1 + 676 1071.8750 1 + 677 1072.5000 1 + 678 1073.1250 1 + 679 1073.7500 1 + 680 1074.3750 1 + 681 1075.0000 1 + 682 1075.6250 1 + 683 1076.2500 1 + 684 1076.8750 1 + 685 1077.5000 1 + 686 1078.1250 1 + 687 1078.7500 1 + 688 1079.3750 1 + 689 1080.0000 1 + 690 1080.6250 1 + 691 1081.2500 1 + 692 1081.8750 1 + 693 1082.5000 1 + 694 1083.1250 1 + 695 1083.7500 1 + 696 1084.3750 1 + 697 1085.0000 1 + 698 1085.6250 1 + 699 1086.2500 1 + 700 1086.8750 1 + 701 1087.5000 1 + 702 1088.1250 1 + 703 1088.7500 1 + 704 1089.3750 1 + 705 1090.0000 1 + 706 1090.6250 1 + 707 1091.2500 1 + 708 1091.8750 1 + 709 1092.5000 1 + 710 1093.1250 1 + 711 1093.7500 1 + 712 1094.3750 1 + 713 1095.0000 1 + 714 1210.0000 1 + 715 1210.6250 1 + 716 1211.2500 1 + 717 1211.8750 1 + 718 1212.5000 1 + 719 1213.1250 1 + 720 1213.7500 1 + 721 1214.3750 1 + 722 1215.0000 1 + 723 1215.6250 1 + 724 1216.2500 1 + 725 1216.8750 1 + 726 1217.5000 1 + 727 1218.1250 1 + 728 1218.7500 1 + 729 1219.3750 1 + 730 1220.0000 1 + 731 1220.6250 1 + 732 1221.2500 1 + 733 1221.8750 1 + 734 1222.5000 1 + 735 1223.1250 1 + 736 1223.7500 1 + 737 1224.3750 1 + 738 1225.0000 1 + 739 1225.6250 1 + 740 1226.2500 1 + 741 1226.8750 1 + 742 1227.5000 1 + 743 1228.1250 1 + 744 1228.7500 1 + 745 1229.3750 1 + 746 1230.0000 1 + 747 1230.6250 1 + 748 1231.2500 1 + 749 1231.8750 1 + 750 1232.5000 1 + 751 1233.1250 1 + 752 1233.7500 1 + 753 1234.3750 1 + 754 1235.0000 1 + 755 1235.6250 1 + 756 1236.2500 1 + 757 1236.8750 1 + 758 1237.5000 1 + 759 1238.1250 1 + 760 1238.7500 1 + 761 1239.3750 1 + 762 1240.0000 1 + 763 1240.6250 1 + 764 1241.2500 1 + 765 1241.8750 1 + 766 1242.5000 1 + 767 1243.1250 1 + 768 1243.7500 1 + 769 1244.3750 1 + 770 1245.0000 1 + 771 1245.6250 1 + 772 1246.2500 1 + 773 1246.8750 1 + 774 1247.5000 1 + 775 1248.1250 1 + 776 1248.7500 1 + 777 1249.3750 1 + 778 1250.0000 1 + 779 1250.6250 1 + 780 1251.2500 1 + 781 1251.8750 1 + 782 1252.5000 1 + 783 1253.1250 1 + 784 1253.7500 1 + 785 1254.3750 1 + 786 1255.0000 1 + 787 1255.6250 1 + 788 1256.2500 1 + 789 1256.8750 1 + 790 1257.5000 1 + 791 1258.1250 1 + 792 1258.7500 1 + 793 1259.3750 1 + 794 1260.0000 1 + 795 1260.6250 1 + 796 1261.2500 1 + 797 1261.8750 1 + 798 1262.5000 1 + 799 1263.1250 1 + 800 1263.7500 1 + 801 1264.3750 1 + 802 1265.0000 1 + 803 1265.6250 1 + 804 1266.2500 1 + 805 1266.8750 1 + 806 1267.5000 1 + 807 1268.1250 1 + 808 1268.7500 1 + 809 1269.3750 1 + 810 1270.0000 1 + 811 1270.6250 1 + 812 1271.2500 1 + 813 1271.8750 1 + 814 1272.5000 1 + 815 1273.1250 1 + 816 1273.7500 1 + 817 1274.3750 1 + 818 1275.0000 1 + 819 1275.6250 1 + 820 1276.2500 1 + 821 1276.8750 1 + 822 1277.5000 1 + 823 1278.1250 1 + 824 1278.7500 1 + 825 1279.3750 1 + 826 1280.0000 1 + 827 1280.6250 1 + 828 1281.2500 1 + 829 1281.8750 1 + 830 1282.5000 1 + 831 1283.1250 1 + 832 1283.7500 1 + 833 1284.3750 1 + 834 1285.0000 1 + 835 1285.6250 1 + 836 1286.2500 1 + 837 1286.8750 1 + 838 1287.5000 1 + 839 1288.1250 1 + 840 1288.7500 1 + 841 1289.3750 1 + 842 1290.0000 1 + 843 1290.6250 1 + 844 1291.2500 1 + 845 1291.8750 1 + 846 1292.5000 1 + 847 1293.1250 1 + 848 1293.7500 1 + 849 1294.3750 1 + 850 1295.0000 1 + 851 1295.6250 1 + 852 1296.2500 1 + 853 1296.8750 1 + 854 1297.5000 1 + 855 1298.1250 1 + 856 1298.7500 1 + 857 1299.3750 1 + 858 1300.0000 1 + 859 1300.6250 1 + 860 1301.2500 1 + 861 1301.8750 1 + 862 1302.5000 1 + 863 1303.1250 1 + 864 1303.7500 1 + 865 1304.3750 1 + 866 1305.0000 1 + 867 1305.6250 1 + 868 1306.2500 1 + 869 1306.8750 1 + 870 1307.5000 1 + 871 1308.1250 1 + 872 1308.7500 1 + 873 1309.3750 1 + 874 1310.0000 1 + 875 1310.6250 1 + 876 1311.2500 1 + 877 1311.8750 1 + 878 1312.5000 1 + 879 1313.1250 1 + 880 1313.7500 1 + 881 1314.3750 1 + 882 1315.0000 1 + 883 1315.6250 1 + 884 1316.2500 1 + 885 1316.8750 1 + 886 1317.5000 1 + 887 1318.1250 1 + 888 1318.7500 1 + 889 1319.3750 1 + 890 1320.0000 1 + 891 1320.6250 1 + 892 1321.2500 1 + 893 1321.8750 1 + 894 1322.5000 1 + 895 1323.1250 1 + 896 1323.7500 1 + 897 1324.3750 1 + 898 1325.0000 1 + 899 1325.6250 1 + 900 1326.2500 1 + 901 1326.8750 1 + 902 1327.5000 1 + 903 1328.1250 1 + 904 1328.7500 1 + 905 1329.3750 1 + 906 1330.0000 1 + 907 1330.6250 1 + 908 1331.2500 1 + 909 1331.8750 1 + 910 1332.5000 1 + 911 1333.1250 1 + 912 1333.7500 1 + 913 1334.3750 1 + 914 1335.0000 1 + 915 1335.6250 1 + 916 1336.2500 1 + 917 1336.8750 1 + 918 1337.5000 1 + 919 1338.1250 1 + 920 1338.7500 1 + 921 1339.3750 1 + 922 1340.0000 1 + 923 1340.6250 1 + 924 1341.2500 1 + 925 1341.8750 1 + 926 1342.5000 1 + 927 1343.1250 1 + 928 1343.7500 1 + 929 1344.3750 1 + 930 1345.0000 1 + 931 1345.6250 1 + 932 1346.2500 1 + 933 1346.8750 1 + 934 1347.5000 1 + 935 1348.1250 1 + 936 1348.7500 1 + 937 1349.3750 1 + 938 1350.0000 1 + 939 1350.6250 1 + 940 1351.2500 1 + 941 1351.8750 1 + 942 1352.5000 1 + 943 1353.1250 1 + 944 1353.7500 1 + 945 1354.3750 1 + 946 1355.0000 1 + 947 1355.6250 1 + 948 1356.2500 1 + 949 1356.8750 1 + 950 1357.5000 1 + 951 1358.1250 1 + 952 1358.7500 1 + 953 1359.3750 1 + 954 1360.0000 1 + 955 1360.6250 1 + 956 1361.2500 1 + 957 1361.8750 1 + 958 1362.5000 1 + 959 1363.1250 1 + 960 1363.7500 1 + 961 1364.3750 1 + 962 1365.0000 1 + 963 1365.6250 1 + 964 1366.2500 1 + 965 1366.8750 1 + 966 1367.5000 1 + 967 1368.1250 1 + 968 1368.7500 1 + 969 1369.3750 1 + 970 1370.0000 1 + 971 1370.6250 1 + 972 1371.2500 1 + 973 1371.8750 1 + 974 1372.5000 1 + 975 1373.1250 1 + 976 1373.7500 1 + 977 1374.3750 1 + 978 1375.0000 1 + 979 1375.6250 1 + 980 1376.2500 1 + 981 1376.8750 1 + 982 1377.5000 1 + 983 1378.1250 1 + 984 1378.7500 1 + 985 1379.3750 1 + 986 1380.0000 1 + 987 1380.6250 1 + 988 1381.2500 1 + 989 1381.8750 1 + 990 1382.5000 1 + 991 1383.1250 1 + 992 1383.7500 1 + 993 1384.3750 1 + 994 1385.0000 1 + 995 1385.6250 1 + 996 1386.2500 1 + 997 1386.8750 1 + 998 1387.5000 1 + 999 1388.1250 1 +1000 1388.7500 1 +1001 1389.3750 1 +1002 1390.0000 1 +1003 1390.6250 1 +1004 1391.2500 1 +1005 1391.8750 1 +1006 1392.5000 1 +1007 1393.1250 1 +1008 1393.7500 1 +1009 1394.3750 1 +1010 1395.0000 1 +1011 1395.6250 1 +1012 1396.2500 1 +1013 1396.8750 1 +1014 1397.5000 1 +1015 1398.1250 1 +1016 1398.7500 1 +1017 1399.3750 1 +1018 1400.0000 1 +1019 1400.6250 1 +1020 1401.2500 1 +1021 1401.8750 1 +1022 1402.5000 1 +1023 1403.1250 1 +1024 1403.7500 1 +1025 1404.3750 1 +1026 1405.0000 1 +1027 1405.6250 1 +1028 1406.2500 1 +1029 1406.8750 1 +1030 1407.5000 1 +1031 1408.1250 1 +1032 1408.7500 1 +1033 1409.3750 1 +1034 1410.0000 1 +1035 1410.6250 1 +1036 1411.2500 1 +1037 1411.8750 1 +1038 1412.5000 1 +1039 1413.1250 1 +1040 1413.7500 1 +1041 1414.3750 1 +1042 1415.0000 1 +1043 1415.6250 1 +1044 1416.2500 1 +1045 1416.8750 1 +1046 1417.5000 1 +1047 1418.1250 1 +1048 1418.7500 1 +1049 1419.3750 1 +1050 1420.0000 1 +1051 1420.6250 1 +1052 1421.2500 1 +1053 1421.8750 1 +1054 1422.5000 1 +1055 1423.1250 1 +1056 1423.7500 1 +1057 1424.3750 1 +1058 1425.0000 1 +1059 1425.6250 1 +1060 1426.2500 1 +1061 1426.8750 1 +1062 1427.5000 1 +1063 1428.1250 1 +1064 1428.7500 1 +1065 1429.3750 1 +1066 1430.0000 1 +1067 1430.6250 1 +1068 1431.2500 1 +1069 1431.8750 1 +1070 1432.5000 1 +1071 1433.1250 1 +1072 1433.7500 1 +1073 1434.3750 1 +1074 1435.0000 1 +1075 1435.6250 1 +1076 1436.2500 1 +1077 1436.8750 1 +1078 1437.5000 1 +1079 1438.1250 1 +1080 1438.7500 1 +1081 1439.3750 1 +1082 1440.0000 1 +1083 1440.6250 1 +1084 1441.2500 1 +1085 1441.8750 1 +1086 1442.5000 1 +1087 1443.1250 1 +1088 1443.7500 1 +1089 1444.3750 1 +1090 1445.0000 1 +1091 1445.6250 1 +1092 1446.2500 1 +1093 1446.8750 1 +1094 1447.5000 1 +1095 1448.1250 1 +1096 1448.7500 1 +1097 1449.3750 1 +1098 1450.0000 1 +1099 1450.6250 1 +1100 1451.2500 1 +1101 1451.8750 1 +1102 1452.5000 1 +1103 1453.1250 1 +1104 1453.7500 1 +1105 1454.3750 1 +1106 1455.0000 1 +1107 1455.6250 1 +1108 1456.2500 1 +1109 1456.8750 1 +1110 1457.5000 1 +1111 1458.1250 1 +1112 1458.7500 1 +1113 1459.3750 1 +1114 1460.0000 1 +1115 1460.6250 1 +1116 1461.2500 1 +1117 1461.8750 1 +1118 1462.5000 1 +1119 1463.1250 1 +1120 1463.7500 1 +1121 1464.3750 1 +1122 1465.0000 1 +1123 1465.6250 1 +1124 1466.2500 1 +1125 1466.8750 1 +1126 1467.5000 1 +1127 1468.1250 1 +1128 1468.7500 1 +1129 1469.3750 1 +1130 1470.0000 1 +1131 1470.6250 1 +1132 1471.2500 1 +1133 1471.8750 1 +1134 1472.5000 1 +1135 1473.1250 1 +1136 1473.7500 1 +1137 1474.3750 1 +1138 1475.0000 1 +1139 1475.6250 1 +1140 1476.2500 1 +1141 1476.8750 1 +1142 1477.5000 1 +1143 1478.1250 1 +1144 1478.7500 1 +1145 1479.3750 1 +1146 1480.0000 1 +1147 1480.6250 1 +1148 1481.2500 1 +1149 1481.8750 1 +1150 1482.5000 1 +1151 1483.1250 1 +1152 1483.7500 1 +1153 1484.3750 1 +1154 1485.0000 1 +1155 1485.6250 1 +1156 1486.2500 1 +1157 1486.8750 1 +1158 1487.5000 1 +1159 1488.1250 1 +1160 1488.7500 1 +1161 1489.3750 1 +1162 1490.0000 1 +1163 1490.6250 1 +1164 1491.2500 1 +1165 1491.8750 1 +1166 1492.5000 1 +1167 1493.1250 1 +1168 1493.7500 1 +1169 1494.3750 1 +1170 1495.0000 1 +1171 1495.6250 1 +1172 1496.2500 1 +1173 1496.8750 1 +1174 1497.5000 1 +1175 1498.1250 1 +1176 1498.7500 1 +1177 1499.3750 1 +1178 1500.0000 1 +1179 1500.6250 1 +1180 1501.2500 1 +1181 1501.8750 1 +1182 1502.5000 1 +1183 1503.1250 1 +1184 1503.7500 1 +1185 1504.3750 1 +1186 1505.0000 1 +1187 1505.6250 1 +1188 1506.2500 1 +1189 1506.8750 1 +1190 1507.5000 1 +1191 1508.1250 1 +1192 1508.7500 1 +1193 1509.3750 1 +1194 1510.0000 1 +1195 1510.6250 1 +1196 1511.2500 1 +1197 1511.8750 1 +1198 1512.5000 1 +1199 1513.1250 1 +1200 1513.7500 1 +1201 1514.3750 1 +1202 1515.0000 1 +1203 1515.6250 1 +1204 1516.2500 1 +1205 1516.8750 1 +1206 1517.5000 1 +1207 1518.1250 1 +1208 1518.7500 1 +1209 1519.3750 1 +1210 1520.0000 1 +1211 1520.6250 1 +1212 1521.2500 1 +1213 1521.8750 1 +1214 1522.5000 1 +1215 1523.1250 1 +1216 1523.7500 1 +1217 1524.3750 1 +1218 1525.0000 1 +1219 1525.6250 1 +1220 1526.2500 1 +1221 1526.8750 1 +1222 1527.5000 1 +1223 1528.1250 1 +1224 1528.7500 1 +1225 1529.3750 1 +1226 1530.0000 1 +1227 1530.6250 1 +1228 1531.2500 1 +1229 1531.8750 1 +1230 1532.5000 1 +1231 1533.1250 1 +1232 1533.7500 1 +1233 1534.3750 1 +1234 1535.0000 1 +1235 1535.6250 1 +1236 1536.2500 1 +1237 1536.8750 1 +1238 1537.5000 1 +1239 1538.1250 1 +1240 1538.7500 1 +1241 1539.3750 1 +1242 1540.0000 1 +1243 1540.6250 1 +1244 1541.2500 1 +1245 1541.8750 1 +1246 1542.5000 1 +1247 1543.1250 1 +1248 1543.7500 1 +1249 1544.3750 1 +1250 1545.0000 1 +1251 1545.6250 1 +1252 1546.2500 1 +1253 1546.8750 1 +1254 1547.5000 1 +1255 1548.1250 1 +1256 1548.7500 1 +1257 1549.3750 1 +1258 1550.0000 1 +1259 1550.6250 1 +1260 1551.2500 1 +1261 1551.8750 1 +1262 1552.5000 1 +1263 1553.1250 1 +1264 1553.7500 1 +1265 1554.3750 1 +1266 1555.0000 1 +1267 1555.6250 1 +1268 1556.2500 1 +1269 1556.8750 1 +1270 1557.5000 1 +1271 1558.1250 1 +1272 1558.7500 1 +1273 1559.3750 1 +1274 1560.0000 1 +1275 1560.6250 1 +1276 1561.2500 1 +1277 1561.8750 1 +1278 1562.5000 1 +1279 1563.1250 1 +1280 1563.7500 1 +1281 1564.3750 1 +1282 1565.0000 1 +1283 1565.6250 1 +1284 1566.2500 1 +1285 1566.8750 1 +1286 1567.5000 1 +1287 1568.1250 1 +1288 1568.7500 1 +1289 1569.3750 1 +1290 1570.0000 1 +1291 1570.6250 1 +1292 1571.2500 1 +1293 1571.8750 1 +1294 1572.5000 1 +1295 1573.1250 1 +1296 1573.7500 1 +1297 1574.3750 1 +1298 1575.0000 1 +1299 1575.6250 1 +1300 1576.2500 1 +1301 1576.8750 1 +1302 1577.5000 1 +1303 1578.1250 1 +1304 1578.7500 1 +1305 1579.3750 1 +1306 1580.0000 1 +1307 1580.6250 1 +1308 1581.2500 1 +1309 1581.8750 1 +1310 1582.5000 1 +1311 1583.1250 1 +1312 1583.7500 1 +1313 1584.3750 1 +1314 1585.0000 1 +1315 1585.6250 1 +1316 1586.2500 1 +1317 1586.8750 1 +1318 1587.5000 1 +1319 1588.1250 1 +1320 1588.7500 1 +1321 1589.3750 1 +1322 1590.0000 1 +1323 1590.6250 1 +1324 1591.2500 1 +1325 1591.8750 1 +1326 1592.5000 1 +1327 1593.1250 1 +1328 1593.7500 1 +1329 1594.3750 1 +1330 1595.0000 1 +1331 1595.6250 1 +1332 1596.2500 1 +1333 1596.8750 1 +1334 1597.5000 1 +1335 1598.1250 1 +1336 1598.7500 1 +1337 1599.3750 1 +1338 1600.0000 1 +1339 1600.6250 1 +1340 1601.2500 1 +1341 1601.8750 1 +1342 1602.5000 1 +1343 1603.1250 1 +1344 1603.7500 1 +1345 1604.3750 1 +1346 1605.0000 1 +1347 1605.6250 1 +1348 1606.2500 1 +1349 1606.8750 1 +1350 1607.5000 1 +1351 1608.1250 1 +1352 1608.7500 1 +1353 1609.3750 1 +1354 1610.0000 1 +1355 1610.6250 1 +1356 1611.2500 1 +1357 1611.8750 1 +1358 1612.5000 1 +1359 1613.1250 1 +1360 1613.7500 1 +1361 1614.3750 1 +1362 1615.0000 1 +1363 1615.6250 1 +1364 1616.2500 1 +1365 1616.8750 1 +1366 1617.5000 1 +1367 1618.1250 1 +1368 1618.7500 1 +1369 1619.3750 1 +1370 1620.0000 1 +1371 1620.6250 1 +1372 1621.2500 1 +1373 1621.8750 1 +1374 1622.5000 1 +1375 1623.1250 1 +1376 1623.7500 1 +1377 1624.3750 1 +1378 1625.0000 1 +1379 1625.6250 1 +1380 1626.2500 1 +1381 1626.8750 1 +1382 1627.5000 1 +1383 1628.1250 1 +1384 1628.7500 1 +1385 1629.3750 1 +1386 1630.0000 1 +1387 1630.6250 1 +1388 1631.2500 1 +1389 1631.8750 1 +1390 1632.5000 1 +1391 1633.1250 1 +1392 1633.7500 1 +1393 1634.3750 1 +1394 1635.0000 1 +1395 1635.6250 1 +1396 1636.2500 1 +1397 1636.8750 1 +1398 1637.5000 1 +1399 1638.1250 1 +1400 1638.7500 1 +1401 1639.3750 1 +1402 1640.0000 1 +1403 1640.6250 1 +1404 1641.2500 1 +1405 1641.8750 1 +1406 1642.5000 1 +1407 1643.1250 1 +1408 1643.7500 1 +1409 1644.3750 1 +1410 1645.0000 1 +1411 1645.6250 1 +1412 1646.2500 1 +1413 1646.8750 1 +1414 1647.5000 1 +1415 1648.1250 1 +1416 1648.7500 1 +1417 1649.3750 1 +1418 1650.0000 1 +1419 1650.6250 1 +1420 1651.2500 1 +1421 1651.8750 1 +1422 1652.5000 1 +1423 1653.1250 1 +1424 1653.7500 1 +1425 1654.3750 1 +1426 1655.0000 1 +1427 1655.6250 1 +1428 1656.2500 1 +1429 1656.8750 1 +1430 1657.5000 1 +1431 1658.1250 1 +1432 1658.7500 1 +1433 1659.3750 1 +1434 1660.0000 1 +1435 1660.6250 1 +1436 1661.2500 1 +1437 1661.8750 1 +1438 1662.5000 1 +1439 1663.1250 1 +1440 1663.7500 1 +1441 1664.3750 1 +1442 1665.0000 1 +1443 1665.6250 1 +1444 1666.2500 1 +1445 1666.8750 1 +1446 1667.5000 1 +1447 1668.1250 1 +1448 1668.7500 1 +1449 1669.3750 1 +1450 1670.0000 1 +1451 1670.6250 1 +1452 1671.2500 1 +1453 1671.8750 1 +1454 1672.5000 1 +1455 1673.1250 1 +1456 1673.7500 1 +1457 1674.3750 1 +1458 1675.0000 1 +1459 1675.6250 1 +1460 1676.2500 1 +1461 1676.8750 1 +1462 1677.5000 1 +1463 1678.1250 1 +1464 1678.7500 1 +1465 1679.3750 1 +1466 1680.0000 1 +1467 1680.6250 1 +1468 1681.2500 1 +1469 1681.8750 1 +1470 1682.5000 1 +1471 1683.1250 1 +1472 1683.7500 1 +1473 1684.3750 1 +1474 1685.0000 1 +1475 1685.6250 1 +1476 1686.2500 1 +1477 1686.8750 1 +1478 1687.5000 1 +1479 1688.1250 1 +1480 1688.7500 1 +1481 1689.3750 1 +1482 1690.0000 1 +1483 1690.6250 1 +1484 1691.2500 1 +1485 1691.8750 1 +1486 1692.5000 1 +1487 1693.1250 1 +1488 1693.7500 1 +1489 1694.3750 1 +1490 1695.0000 1 +1491 1695.6250 1 +1492 1696.2500 1 +1493 1696.8750 1 +1494 1697.5000 1 +1495 1698.1250 1 +1496 1698.7500 1 +1497 1699.3750 1 +1498 1700.0000 1 +1499 1700.6250 1 +1500 1701.2500 1 +1501 1701.8750 1 +1502 1702.5000 1 +1503 1703.1250 1 +1504 1703.7500 1 +1505 1704.3750 1 +1506 1705.0000 1 +1507 1705.6250 1 +1508 1706.2500 1 +1509 1706.8750 1 +1510 1707.5000 1 +1511 1708.1250 1 +1512 1708.7500 1 +1513 1709.3750 1 +1514 1710.0000 1 +1515 1710.6250 1 +1516 1711.2500 1 +1517 1711.8750 1 +1518 1712.5000 1 +1519 1713.1250 1 +1520 1713.7500 1 +1521 1714.3750 1 +1522 1715.0000 1 +1523 1715.6250 1 +1524 1716.2500 1 +1525 1716.8750 1 +1526 1717.5000 1 +1527 1718.1250 1 +1528 1718.7500 1 +1529 1719.3750 1 +1530 1720.0000 1 +1531 1720.6250 1 +1532 1721.2500 1 +1533 1721.8750 1 +1534 1722.5000 1 +1535 1723.1250 1 +1536 1723.7500 1 +1537 1724.3750 1 +1538 1725.0000 1 +1539 1725.6250 1 +1540 1726.2500 1 +1541 1726.8750 1 +1542 1727.5000 1 +1543 1728.1250 1 +1544 1728.7500 1 +1545 1729.3750 1 +1546 1730.0000 1 +1547 1730.6250 1 +1548 1731.2500 1 +1549 1731.8750 1 +1550 1732.5000 1 +1551 1733.1250 1 +1552 1733.7500 1 +1553 1734.3750 1 +1554 1735.0000 1 +1555 1735.6250 1 +1556 1736.2500 1 +1557 1736.8750 1 +1558 1737.5000 1 +1559 1738.1250 1 +1560 1738.7500 1 +1561 1739.3750 1 +1562 1740.0000 1 +1563 1740.6250 1 +1564 1741.2500 1 +1565 1741.8750 1 +1566 1742.5000 1 +1567 1743.1250 1 +1568 1743.7500 1 +1569 1744.3750 1 +1570 1745.0000 1 +1571 1745.6250 1 +1572 1746.2500 1 +1573 1746.8750 1 +1574 1747.5000 1 +1575 1748.1250 1 +1576 1748.7500 1 +1577 1749.3750 1 +1578 1750.0000 1 +1579 2155.0000 1 +1580 2155.6250 1 +1581 2156.2500 1 +1582 2156.8750 1 +1583 2157.5000 1 +1584 2158.1250 1 +1585 2158.7500 1 +1586 2159.3750 1 +1587 2160.0000 1 +1588 2160.6250 1 +1589 2161.2500 1 +1590 2161.8750 1 +1591 2162.5000 1 +1592 2163.1250 1 +1593 2163.7500 1 +1594 2164.3750 1 +1595 2165.0000 1 +1596 2165.6250 1 +1597 2166.2500 1 +1598 2166.8750 1 +1599 2167.5000 1 +1600 2168.1250 1 +1601 2168.7500 1 +1602 2169.3750 1 +1603 2170.0000 1 +1604 2170.6250 1 +1605 2171.2500 1 +1606 2171.8750 1 +1607 2172.5000 1 +1608 2173.1250 1 +1609 2173.7500 1 +1610 2174.3750 1 +1611 2175.0000 1 +1612 2175.6250 1 +1613 2176.2500 1 +1614 2176.8750 1 +1615 2177.5000 1 +1616 2178.1250 1 +1617 2178.7500 1 +1618 2179.3750 1 +1619 2180.0000 1 +1620 2180.6250 1 +1621 2181.2500 1 +1622 2181.8750 1 +1623 2182.5000 1 +1624 2183.1250 1 +1625 2183.7500 1 +1626 2184.3750 1 +1627 2185.0000 1 +1628 2185.6250 1 +1629 2186.2500 1 +1630 2186.8750 1 +1631 2187.5000 1 +1632 2188.1250 1 +1633 2188.7500 1 +1634 2189.3750 1 +1635 2190.0000 1 +1636 2190.6250 1 +1637 2191.2500 1 +1638 2191.8750 1 +1639 2192.5000 1 +1640 2193.1250 1 +1641 2193.7500 1 +1642 2194.3750 1 +1643 2195.0000 1 +1644 2195.6250 1 +1645 2196.2500 1 +1646 2196.8750 1 +1647 2197.5000 1 +1648 2198.1250 1 +1649 2198.7500 1 +1650 2199.3750 1 +1651 2200.0000 1 +1652 2200.6250 1 +1653 2201.2500 1 +1654 2201.8750 1 +1655 2202.5000 1 +1656 2203.1250 1 +1657 2203.7500 1 +1658 2204.3750 1 +1659 2205.0000 1 +1660 2205.6250 1 +1661 2206.2500 1 +1662 2206.8750 1 +1663 2207.5000 1 +1664 2208.1250 1 +1665 2208.7500 1 +1666 2209.3750 1 +1667 2210.0000 1 +1668 2210.6250 1 +1669 2211.2500 1 +1670 2211.8750 1 +1671 2212.5000 1 +1672 2213.1250 1 +1673 2213.7500 1 +1674 2214.3750 1 +1675 2215.0000 1 +1676 2215.6250 1 +1677 2216.2500 1 +1678 2216.8750 1 +1679 2217.5000 1 +1680 2218.1250 1 +1681 2218.7500 1 +1682 2219.3750 1 +1683 2220.0000 1 +1684 2220.6250 1 +1685 2221.2500 1 +1686 2221.8750 1 +1687 2222.5000 1 +1688 2223.1250 1 +1689 2223.7500 1 +1690 2224.3750 1 +1691 2225.0000 1 +1692 2225.6250 1 +1693 2226.2500 1 +1694 2226.8750 1 +1695 2227.5000 1 +1696 2228.1250 1 +1697 2228.7500 1 +1698 2229.3750 1 +1699 2230.0000 1 +1700 2230.6250 1 +1701 2231.2500 1 +1702 2231.8750 1 +1703 2232.5000 1 +1704 2233.1250 1 +1705 2233.7500 1 +1706 2234.3750 1 +1707 2235.0000 1 +1708 2235.6250 1 +1709 2236.2500 1 +1710 2236.8750 1 +1711 2237.5000 1 +1712 2238.1250 1 +1713 2238.7500 1 +1714 2239.3750 1 +1715 2240.0000 1 +1716 2240.6250 1 +1717 2241.2500 1 +1718 2241.8750 1 +1719 2242.5000 1 +1720 2243.1250 1 +1721 2243.7500 1 +1722 2244.3750 1 +1723 2245.0000 1 +1724 2245.6250 1 +1725 2246.2500 1 +1726 2246.8750 1 +1727 2247.5000 1 +1728 2248.1250 1 +1729 2248.7500 1 +1730 2249.3750 1 +1731 2250.0000 1 +1732 2250.6250 1 +1733 2251.2500 1 +1734 2251.8750 1 +1735 2252.5000 1 +1736 2253.1250 1 +1737 2253.7500 1 +1738 2254.3750 1 +1739 2255.0000 1 +1740 2255.6250 1 +1741 2256.2500 1 +1742 2256.8750 1 +1743 2257.5000 1 +1744 2258.1250 1 +1745 2258.7500 1 +1746 2259.3750 1 +1747 2260.0000 1 +1748 2260.6250 1 +1749 2261.2500 1 +1750 2261.8750 1 +1751 2262.5000 1 +1752 2263.1250 1 +1753 2263.7500 1 +1754 2264.3750 1 +1755 2265.0000 1 +1756 2265.6250 1 +1757 2266.2500 1 +1758 2266.8750 1 +1759 2267.5000 1 +1760 2268.1250 1 +1761 2268.7500 1 +1762 2269.3750 1 +1763 2270.0000 1 +1764 2270.6250 1 +1765 2271.2500 1 +1766 2271.8750 1 +1767 2272.5000 1 +1768 2273.1250 1 +1769 2273.7500 1 +1770 2274.3750 1 +1771 2275.0000 1 +1772 2275.6250 1 +1773 2276.2500 1 +1774 2276.8750 1 +1775 2277.5000 1 +1776 2278.1250 1 +1777 2278.7500 1 +1778 2279.3750 1 +1779 2280.0000 1 +1780 2280.6250 1 +1781 2281.2500 1 +1782 2281.8750 1 +1783 2282.5000 1 +1784 2283.1250 1 +1785 2283.7500 1 +1786 2284.3750 1 +1787 2285.0000 1 +1788 2285.6250 1 +1789 2286.2500 1 +1790 2286.8750 1 +1791 2287.5000 1 +1792 2288.1250 1 +1793 2288.7500 1 +1794 2289.3750 1 +1795 2290.0000 1 +1796 2290.6250 1 +1797 2291.2500 1 +1798 2291.8750 1 +1799 2292.5000 1 +1800 2293.1250 1 +1801 2293.7500 1 +1802 2294.3750 1 +1803 2295.0000 1 +1804 2295.6250 1 +1805 2296.2500 1 +1806 2296.8750 1 +1807 2297.5000 1 +1808 2298.1250 1 +1809 2298.7500 1 +1810 2299.3750 1 +1811 2300.0000 1 +1812 2300.6250 1 +1813 2301.2500 1 +1814 2301.8750 1 +1815 2302.5000 1 +1816 2303.1250 1 +1817 2303.7500 1 +1818 2304.3750 1 +1819 2305.0000 1 +1820 2305.6250 1 +1821 2306.2500 1 +1822 2306.8750 1 +1823 2307.5000 1 +1824 2308.1250 1 +1825 2308.7500 1 +1826 2309.3750 1 +1827 2310.0000 1 +1828 2310.6250 1 +1829 2311.2500 1 +1830 2311.8750 1 +1831 2312.5000 1 +1832 2313.1250 1 +1833 2313.7500 1 +1834 2314.3750 1 +1835 2315.0000 1 +1836 2315.6250 1 +1837 2316.2500 1 +1838 2316.8750 1 +1839 2317.5000 1 +1840 2318.1250 1 +1841 2318.7500 1 +1842 2319.3750 1 +1843 2320.0000 1 +1844 2320.6250 1 +1845 2321.2500 1 +1846 2321.8750 1 +1847 2322.5000 1 +1848 2323.1250 1 +1849 2323.7500 1 +1850 2324.3750 1 +1851 2325.0000 1 +1852 2325.6250 1 +1853 2326.2500 1 +1854 2326.8750 1 +1855 2327.5000 1 +1856 2328.1250 1 +1857 2328.7500 1 +1858 2329.3750 1 +1859 2330.0000 1 +1860 2330.6250 1 +1861 2331.2500 1 +1862 2331.8750 1 +1863 2332.5000 1 +1864 2333.1250 1 +1865 2333.7500 1 +1866 2334.3750 1 +1867 2335.0000 1 +1868 2335.6250 1 +1869 2336.2500 1 +1870 2336.8750 1 +1871 2337.5000 1 +1872 2338.1250 1 +1873 2338.7500 1 +1874 2339.3750 1 +1875 2340.0000 1 +1876 2340.6250 1 +1877 2341.2500 1 +1878 2341.8750 1 +1879 2342.5000 1 +1880 2343.1250 1 +1881 2343.7500 1 +1882 2344.3750 1 +1883 2345.0000 1 +1884 2345.6250 1 +1885 2346.2500 1 +1886 2346.8750 1 +1887 2347.5000 1 +1888 2348.1250 1 +1889 2348.7500 1 +1890 2349.3750 1 +1891 2350.0000 1 +1892 2350.6250 1 +1893 2351.2500 1 +1894 2351.8750 1 +1895 2352.5000 1 +1896 2353.1250 1 +1897 2353.7500 1 +1898 2354.3750 1 +1899 2355.0000 1 +1900 2355.6250 1 +1901 2356.2500 1 +1902 2356.8750 1 +1903 2357.5000 1 +1904 2358.1250 1 +1905 2358.7500 1 +1906 2359.3750 1 +1907 2360.0000 1 +1908 2360.6250 1 +1909 2361.2500 1 +1910 2361.8750 1 +1911 2362.5000 1 +1912 2363.1250 1 +1913 2363.7500 1 +1914 2364.3750 1 +1915 2365.0000 1 +1916 2365.6250 1 +1917 2366.2500 1 +1918 2366.8750 1 +1919 2367.5000 1 +1920 2368.1250 1 +1921 2368.7500 1 +1922 2369.3750 1 +1923 2370.0000 1 +1924 2370.6250 1 +1925 2371.2500 1 +1926 2371.8750 1 +1927 2372.5000 1 +1928 2373.1250 1 +1929 2373.7500 1 +1930 2374.3750 1 +1931 2375.0000 1 +1932 2375.6250 1 +1933 2376.2500 1 +1934 2376.8750 1 +1935 2377.5000 1 +1936 2378.1250 1 +1937 2378.7500 1 +1938 2379.3750 1 +1939 2380.0000 1 +1940 2380.6250 1 +1941 2381.2500 1 +1942 2381.8750 1 +1943 2382.5000 1 +1944 2383.1250 1 +1945 2383.7500 1 +1946 2384.3750 1 +1947 2385.0000 1 +1948 2385.6250 1 +1949 2386.2500 1 +1950 2386.8750 1 +1951 2387.5000 1 +1952 2388.1250 1 +1953 2388.7500 1 +1954 2389.3750 1 +1955 2390.0000 1 +1956 2390.6250 1 +1957 2391.2500 1 +1958 2391.8750 1 +1959 2392.5000 1 +1960 2393.1250 1 +1961 2393.7500 1 +1962 2394.3750 1 +1963 2395.0000 1 +1964 2395.6250 1 +1965 2396.2500 1 +1966 2396.8750 1 +1967 2397.5000 1 +1968 2398.1250 1 +1969 2398.7500 1 +1970 2399.3750 1 +1971 2400.0000 1 +1972 2400.6250 0 +1973 2401.2500 0 +1974 2401.8750 0 +1975 2402.5000 0 +1976 2403.1250 0 +1977 2403.7500 0 +1978 2404.3750 0 +1979 2405.0000 0 +1980 2405.6250 0 +1981 2406.2500 0 +1982 2406.8750 0 +1983 2407.5000 0 +1984 2408.1250 0 +1985 2408.7500 0 +1986 2409.3750 0 +1987 2410.0000 0 +1988 2410.6250 0 +1989 2411.2500 0 +1990 2411.8750 0 +1991 2412.5000 0 +1992 2413.1250 0 +1993 2413.7500 0 +1994 2414.3750 0 +1995 2415.0000 0 +1996 2415.6250 0 +1997 2416.2500 0 +1998 2416.8750 0 +1999 2417.5000 0 +2000 2418.1250 0 +2001 2418.7500 0 +2002 2419.3750 0 +2003 2420.0000 0 +2004 2420.6250 0 +2005 2421.2500 0 +2006 2421.8750 0 +2007 2422.5000 0 +2008 2423.1250 0 +2009 2423.7500 0 +2010 2424.3750 0 +2011 2425.0000 0 +2012 2425.6250 0 +2013 2426.2500 0 +2014 2426.8750 0 +2015 2427.5000 0 +2016 2428.1250 0 +2017 2428.7500 0 +2018 2429.3750 0 +2019 2430.0000 0 +2020 2430.6250 0 +2021 2431.2500 0 +2022 2431.8750 0 +2023 2432.5000 0 +2024 2433.1250 0 +2025 2433.7500 0 +2026 2434.3750 0 +2027 2435.0000 0 +2028 2435.6250 0 +2029 2436.2500 0 +2030 2436.8750 0 +2031 2437.5000 0 +2032 2438.1250 0 +2033 2438.7500 0 +2034 2439.3750 0 +2035 2440.0000 0 +2036 2440.6250 0 +2037 2441.2500 0 +2038 2441.8750 0 +2039 2442.5000 0 +2040 2443.1250 0 +2041 2443.7500 0 +2042 2444.3750 0 +2043 2445.0000 0 +2044 2445.6250 0 +2045 2446.2500 0 +2046 2446.8750 0 +2047 2447.5000 0 +2048 2448.1250 0 +2049 2448.7500 0 +2050 2449.3750 0 +2051 2450.0000 0 +2052 2450.6250 0 +2053 2451.2500 0 +2054 2451.8750 0 +2055 2452.5000 0 +2056 2453.1250 0 +2057 2453.7500 0 +2058 2454.3750 0 +2059 2455.0000 0 +2060 2455.6250 0 +2061 2456.2500 0 +2062 2456.8750 0 +2063 2457.5000 0 +2064 2458.1250 0 +2065 2458.7500 0 +2066 2459.3750 0 +2067 2460.0000 0 +2068 2460.6250 0 +2069 2461.2500 0 +2070 2461.8750 0 +2071 2462.5000 0 +2072 2463.1250 0 +2073 2463.7500 0 +2074 2464.3750 0 +2075 2465.0000 0 +2076 2465.6250 0 +2077 2466.2500 0 +2078 2466.8750 0 +2079 2467.5000 0 +2080 2468.1250 0 +2081 2468.7500 0 +2082 2469.3750 0 +2083 2470.0000 0 +2084 2470.6250 0 +2085 2471.2500 0 +2086 2471.8750 0 +2087 2472.5000 0 +2088 2473.1250 0 +2089 2473.7500 0 +2090 2474.3750 0 +2091 2475.0000 0 +2092 2475.6250 0 +2093 2476.2500 0 +2094 2476.8750 0 +2095 2477.5000 0 +2096 2478.1250 0 +2097 2478.7500 0 +2098 2479.3750 0 +2099 2480.0000 0 +2100 2480.6250 0 +2101 2481.2500 0 +2102 2481.8750 0 +2103 2482.5000 0 +2104 2483.1250 0 +2105 2483.7500 0 +2106 2484.3750 0 +2107 2485.0000 0 +2108 2485.6250 0 +2109 2486.2500 0 +2110 2486.8750 0 +2111 2487.5000 0 +2112 2488.1250 0 +2113 2488.7500 0 +2114 2489.3750 0 +2115 2490.0000 0 +2116 2490.6250 0 +2117 2491.2500 0 +2118 2491.8750 0 +2119 2492.5000 0 +2120 2493.1250 0 +2121 2493.7500 0 +2122 2494.3750 0 +2123 2495.0000 0 +2124 2495.6250 0 +2125 2496.2500 0 +2126 2496.8750 0 +2127 2497.5000 0 +2128 2498.1250 0 +2129 2498.7500 0 +2130 2499.3750 0 +2131 2500.0000 0 +2132 2500.6250 0 +2133 2501.2500 0 +2134 2501.8750 0 +2135 2502.5000 0 +2136 2503.1250 0 +2137 2503.7500 0 +2138 2504.3750 0 +2139 2505.0000 0 +2140 2505.6250 0 +2141 2506.2500 0 +2142 2506.8750 0 +2143 2507.5000 0 +2144 2508.1250 0 +2145 2508.7500 0 +2146 2509.3750 0 +2147 2510.0000 0 +2148 2510.6250 0 +2149 2511.2500 0 +2150 2511.8750 0 +2151 2512.5000 0 +2152 2513.1250 0 +2153 2513.7500 0 +2154 2514.3750 0 +2155 2515.0000 0 +2156 2515.6250 0 +2157 2516.2500 0 +2158 2516.8750 0 +2159 2517.5000 0 +2160 2518.1250 0 +2161 2518.7500 0 +2162 2519.3750 0 +2163 2520.0000 0 +2164 2520.6250 0 +2165 2521.2500 0 +2166 2521.8750 0 +2167 2522.5000 0 +2168 2523.1250 0 +2169 2523.7500 0 +2170 2524.3750 0 +2171 2525.0000 0 +2172 2525.6250 0 +2173 2526.2500 0 +2174 2526.8750 0 +2175 2527.5000 0 +2176 2528.1250 0 +2177 2528.7500 0 +2178 2529.3750 0 +2179 2530.0000 0 +2180 2530.6250 0 +2181 2531.2500 0 +2182 2531.8750 0 +2183 2532.5000 0 +2184 2533.1250 0 +2185 2533.7500 0 +2186 2534.3750 0 +2187 2535.0000 0 +2188 2535.6250 0 +2189 2536.2500 0 +2190 2536.8750 0 +2191 2537.5000 0 +2192 2538.1250 0 +2193 2538.7500 0 +2194 2539.3750 0 +2195 2540.0000 0 +2196 2540.6250 0 +2197 2541.2500 0 +2198 2541.8750 0 +2199 2542.5000 0 +2200 2543.1250 0 +2201 2543.7500 0 +2202 2544.3750 0 +2203 2545.0000 0 +2204 2545.6250 0 +2205 2546.2500 0 +2206 2546.8750 0 +2207 2547.5000 0 +2208 2548.1250 0 +2209 2548.7500 0 +2210 2549.3750 0 +2211 2550.0000 0 diff --git a/docs/README b/docs/README new file mode 100644 index 0000000000000000000000000000000000000000..571b7282c539e5184f6fee214d8cb9ef0759530e --- /dev/null +++ b/docs/README @@ -0,0 +1,62 @@ + +If you like your prompt to be your path +export PS1="\u@\h \w> " + + +alias d='display' + +>d file.png will show the png file on your display + +alias loadmods='module load license_intel intel hdf hdf5 netcdf4 miniconda' +#alias loadmods='module load license_intel gcc hdf hdf5 netcdf4 miniconda' + +Useful Slurm commands +The q's are left over from the PBS qstat commands! +alias sq='squeue' +alias q='squeue -u snebuda -o "%.10i %.4P %.25j %.8u %.2t %.10M %.6D %R"' +alias qa='squeue -o "%.10i %.4P %.25j %.8u %.2t %.10M %.6D %R"' +alias qr='squeue -o "%.10i %.4P %.25j %.8u %.2t %.10M %.6D %R" | grep " R "' +alias qdel='scancel' + + +Logging in +ssh -Y bandersen@ash.ssec.wisc.edu +ssh -Y iris.ssec.wisc.edu + + +NOAA CLASS +https://www.avl.class.noaa.gov/saa/products/welcome + +hdf5 commands on iris + ls /opt/hdf5/1.8.17-intel-17/bin +-rwxr-xr-x 1 root root 288K Sep 7 2016 gif2h5 +-rwxr-xr-x 1 root root 284K Sep 7 2016 h52gif +-rwxr-xr-x 1 root root 13K Sep 7 2016 h5c++ +-rwxr-xr-x 1 root root 14K Sep 7 2016 h5cc +-rwxr-xr-x 1 root root 282K Sep 7 2016 h5copy +-rwxr-xr-x 1 root root 142K Sep 7 2016 h5debug +-rwxr-xr-x 1 root root 432K Sep 7 2016 h5diff +-rwxr-xr-x 1 root root 414K Sep 7 2016 h5dump +-rwxr-xr-x 1 root root 13K Sep 7 2016 h5fc +-rwxr-xr-x 1 root root 340K Sep 7 2016 h5import +-rwxr-xr-x 1 root root 286K Sep 7 2016 h5jam +-rwxr-xr-x 1 root root 325K Sep 7 2016 h5ls +-rwxr-xr-x 1 root root 278K Sep 7 2016 h5mkgrp +-rwxr-xr-x 1 root root 324K Sep 7 2016 h5perf_serial +-rwxr-xr-x 1 root root 6.0K Sep 7 2016 h5redeploy +-rwxr-xr-x 1 root root 350K Sep 7 2016 h5repack +-rwxr-xr-x 1 root root 137K Sep 7 2016 h5repart +-rwxr-xr-x 1 root root 296K Sep 7 2016 h5stat +-rwxr-xr-x 1 root root 281K Sep 7 2016 h5unjam + + +example data in /scratch/snebuda/cris hdf5 format +GCRSO-SCRIF_j01_d20190518_t2356479_e0004457_b07755_c20200303175012099750_noac_ops.h5 + +h5py +http://docs.h5py.org/en/latest/quick.html + + + + + diff --git a/docs/example_sbatch.sh b/docs/example_sbatch.sh new file mode 100755 index 0000000000000000000000000000000000000000..19140ca9afb584b23356fb996188e28632774945 --- /dev/null +++ b/docs/example_sbatch.sh @@ -0,0 +1,23 @@ +#!/bin/sh +#SBATCH --job-name=myjob +#SBATCH --partition=mars +#SBATCH --ntasks=1 +#SBATCH --time=00:10:00 +#SBATCH --output=/scratch/bandersen/data/myjob.%j.out +# +cd /scratch/bandersen/data + +#the directory for the batch output has to exist or the job won't run +#/scratch/bandersen/data/ is listed above in the output argument to SBATCH + +echo Hello! + +module load license_intel intel hdf hdf5 netcdf4 miniconda + +#srun executable + + + + + + diff --git a/docs/file_path.txt b/docs/file_path.txt new file mode 100644 index 0000000000000000000000000000000000000000..a8390a8cd37808224fb8cb73b59ce8efb151a649 --- /dev/null +++ b/docs/file_path.txt @@ -0,0 +1,114 @@ +From home/bandersen/iris-home/CrIS_FSR_j01_d20190519_t055647.atm_prof_rtv.h5 + +"CAPE": shape (180, 90) +"CO2_Amount": shape (180, 90) +"COT": shape (180, 90) +"CTP": shape (180, 90) +"CTT": shape (180, 90) +"Channel_Index": shape (1971,) +"CldEmis": shape (180, 90) +"Cmask": shape (180, 90) +"Dewpnt": shape (101, 180, 90) +"GDAS_2mRelHum": shape (180, 90) +"GDAS_2mTAir": shape (180, 90) +"GDAS_RelHum": shape (101, 180, 90) +"GDAS_TAir": shape (101, 180, 90) +"H2OMMR": shape (101, 180, 90) +"H2Ohigh": shape (180, 90) +"H2Olow": shape (180, 90) +"H2Omid": shape (180, 90) +"Latitude": shape (180, 90) +"Lifted_Index": shape (180, 90) +"Longitude": shape (180, 90) +"O3VMR": shape (101, 180, 90) +"Plevs": shape (101,) +"Qflag1": shape (180, 90) +"Qflag2": shape (180, 90) +"Qflag3": shape (180, 90) +"RelHum": shape (101, 180, 90) +"SurfEmis": shape (2211, 180, 90) +"SurfEmis_Wavenumbers": shape (2211,) +"SurfPres": shape (180, 90) +"TAir": shape (101, 180, 90) +"TSurf": shape (180, 90) +"totH2O": shape (180, 90) +"totO3": shape (180, 90) + +From /home/bandersen/iris-home/data/SCRIF_j01_d20190519_t0556479_e0604457_b07759_c20200303175129682159_noac_ops.h5 + + "/All_Data/CrIS-FS-SDR_All/DS_SpectralStability": shape (60, 2, 9, 3), type "<f8"> + "/All_Data/CrIS-FS-SDR_All/DS_Symmetry": shape (60, 9, 3), type "<f8"> + "/All_Data/CrIS-FS-SDR_All/DS_WindowSize": shape (60, 2, 9, 3), type "<u2"> + "/All_Data/CrIS-FS-SDR_All/ES_ImaginaryLW": shape (60, 30, 9, 717), type "<f4"> + "/All_Data/CrIS-FS-SDR_All/ES_ImaginaryMW": shape (60, 30, 9, 869), type "<f4"> + "/All_Data/CrIS-FS-SDR_All/ES_ImaginarySW": shape (60, 30, 9, 637), type "<f4"> + "/All_Data/CrIS-FS-SDR_All/ES_NEdNLW": shape (60, 30, 9, 717), type "<f4"> + "/All_Data/CrIS-FS-SDR_All/ES_NEdNMW": shape (60, 30, 9, 869), type "<f4"> + "/All_Data/CrIS-FS-SDR_All/ES_NEdNSW": shape (60, 30, 9, 637), type "<f4"> + "/All_Data/CrIS-FS-SDR_All/ES_RDRImpulseNoise": shape (60, 30, 9, 3), type "|u1"> + "/All_Data/CrIS-FS-SDR_All/ES_RealLW": shape (60, 30, 9, 717), type "<f4"> + "/All_Data/CrIS-FS-SDR_All/ES_RealMW": shape (60, 30, 9, 869), type "<f4"> + "/All_Data/CrIS-FS-SDR_All/ES_RealSW": shape (60, 30, 9, 637), type "<f4"> + "/All_Data/CrIS-FS-SDR_All/ES_ZPDAmplitude": shape (60, 30, 9, 3), type "<i2"> + "/All_Data/CrIS-FS-SDR_All/ES_ZPDFringeCount": shape (60, 30, 9, 3), type "<u2"> + "/All_Data/CrIS-FS-SDR_All/ICT_SpectralStability": shape (60, 2, 9, 3), type "<f8"> + "/All_Data/CrIS-FS-SDR_All/ICT_TemperatureConsistency": shape (60,), type "<f4"> + "/All_Data/CrIS-FS-SDR_All/ICT_TemperatureStability": shape (60, 2), type "<f4"> + "/All_Data/CrIS-FS-SDR_All/ICT_WindowSize": shape (60, 2, 9, 3), type "<u2"> + "/All_Data/CrIS-FS-SDR_All/MeasuredLaserWavelength": shape (60,), type "<f8"> + "/All_Data/CrIS-FS-SDR_All/MonitoredLaserWavelength": shape (60,), type "<f8"> + "/All_Data/CrIS-FS-SDR_All/NumberOfValidPRTTemps": shape (60, 2), type "|u1"> + "/All_Data/CrIS-FS-SDR_All/QF1_SCAN_CRISSDR": shape (60,), type "|u1"> + "/All_Data/CrIS-FS-SDR_All/QF2_CRISSDR": shape (60, 9, 3), type "|u1"> + "/All_Data/CrIS-FS-SDR_All/QF3_CRISSDR": shape (60, 30, 9, 3), type "|u1"> + "/All_Data/CrIS-FS-SDR_All/QF4_CRISSDR": shape (60, 30, 9, 3), type "|u1"> + "/All_Data/CrIS-FS-SDR_All/ResamplingLaserWavelength": shape (60,), type "<f8"> + "/All_Data/CrIS-FS-SDR_All/SDRFringeCount": shape (60, 30, 9, 3), type "<u2"> + "/All_Data/CrIS-SDR-GEO_All/FORTime": shape (60, 30), type "<i8"> + "/All_Data/CrIS-SDR-GEO_All/Height": shape (60, 30, 9), type "<f4"> + "/All_Data/CrIS-SDR-GEO_All/Latitude": shape (60, 30, 9), type "<f4"> + "/All_Data/CrIS-SDR-GEO_All/Longitude": shape (60, 30, 9), type "<f4"> + "/All_Data/CrIS-SDR-GEO_All/MidTime": shape (60,), type "<i8"> + "/All_Data/CrIS-SDR-GEO_All/PadByte1": shape (60,), type "|u1"> + "/All_Data/CrIS-SDR-GEO_All/QF1_CRISSDRGEO": shape (60,), type "|u1"> + "/All_Data/CrIS-SDR-GEO_All/SCAttitude": shape (60, 3), type "<f4"> + "/All_Data/CrIS-SDR-GEO_All/SCPosition": shape (60, 3), type "<f4"> + "/All_Data/CrIS-SDR-GEO_All/SCVelocity": shape (60, 3), type "<f4"> + "/All_Data/CrIS-SDR-GEO_All/SatelliteAzimuthAngle": shape (60, 30, 9), type "<f4"> + "/All_Data/CrIS-SDR-GEO_All/SatelliteRange": shape (60, 30, 9), type "<f4"> + "/All_Data/CrIS-SDR-GEO_All/SatelliteZenithAngle": shape (60, 30, 9), type "<f4"> + "/All_Data/CrIS-SDR-GEO_All/SolarAzimuthAngle": shape (60, 30, 9), type "<f4"> + "/All_Data/CrIS-SDR-GEO_All/SolarZenithAngle": shape (60, 30, 9), type "<f4"> + "/All_Data/CrIS-SDR-GEO_All/StartTime": shape (60,), type "<i8"> + "/Data_Products/CrIS-FS-SDR/CrIS-FS-SDR_Aggr": shape (28,), type "|O"> + "/Data_Products/CrIS-FS-SDR/CrIS-FS-SDR_Gran_0": shape (28,), type "|O"> + "/Data_Products/CrIS-FS-SDR/CrIS-FS-SDR_Gran_1": shape (28,), type "|O"> + "/Data_Products/CrIS-FS-SDR/CrIS-FS-SDR_Gran_10": shape (28,), type "|O"> + "/Data_Products/CrIS-FS-SDR/CrIS-FS-SDR_Gran_11": shape (28,), type "|O"> + "/Data_Products/CrIS-FS-SDR/CrIS-FS-SDR_Gran_12": shape (28,), type "|O"> + "/Data_Products/CrIS-FS-SDR/CrIS-FS-SDR_Gran_13": shape (28,), type "|O"> + "/Data_Products/CrIS-FS-SDR/CrIS-FS-SDR_Gran_14": shape (28,), type "|O"> + "/Data_Products/CrIS-FS-SDR/CrIS-FS-SDR_Gran_2": shape (28,), type "|O"> + "/Data_Products/CrIS-FS-SDR/CrIS-FS-SDR_Gran_3": shape (28,), type "|O"> + "/Data_Products/CrIS-FS-SDR/CrIS-FS-SDR_Gran_4": shape (28,), type "|O"> + "/Data_Products/CrIS-FS-SDR/CrIS-FS-SDR_Gran_5": shape (28,), type "|O"> + "/Data_Products/CrIS-FS-SDR/CrIS-FS-SDR_Gran_6": shape (28,), type "|O"> + "/Data_Products/CrIS-FS-SDR/CrIS-FS-SDR_Gran_7": shape (28,), type "|O"> + "/Data_Products/CrIS-FS-SDR/CrIS-FS-SDR_Gran_8": shape (28,), type "|O"> + "/Data_Products/CrIS-FS-SDR/CrIS-FS-SDR_Gran_9": shape (28,), type "|O"> + "/Data_Products/CrIS-SDR-GEO/CrIS-SDR-GEO_Aggr": shape (16,), type "|O"> + "/Data_Products/CrIS-SDR-GEO/CrIS-SDR-GEO_Gran_0": shape (16,), type "|O"> + "/Data_Products/CrIS-SDR-GEO/CrIS-SDR-GEO_Gran_1": shape (16,), type "|O"> + "/Data_Products/CrIS-SDR-GEO/CrIS-SDR-GEO_Gran_10": shape (16,), type "|O"> + "/Data_Products/CrIS-SDR-GEO/CrIS-SDR-GEO_Gran_11": shape (16,), type "|O"> + "/Data_Products/CrIS-SDR-GEO/CrIS-SDR-GEO_Gran_12": shape (16,), type "|O"> + "/Data_Products/CrIS-SDR-GEO/CrIS-SDR-GEO_Gran_13": shape (16,), type "|O"> + "/Data_Products/CrIS-SDR-GEO/CrIS-SDR-GEO_Gran_14": shape (16,), type "|O"> + "/Data_Products/CrIS-SDR-GEO/CrIS-SDR-GEO_Gran_2": shape (16,), type "|O"> + "/Data_Products/CrIS-SDR-GEO/CrIS-SDR-GEO_Gran_3": shape (16,), type "|O"> + "/Data_Products/CrIS-SDR-GEO/CrIS-SDR-GEO_Gran_4": shape (16,), type "|O"> + "/Data_Products/CrIS-SDR-GEO/CrIS-SDR-GEO_Gran_5": shape (16,), type "|O"> + "/Data_Products/CrIS-SDR-GEO/CrIS-SDR-GEO_Gran_6": shape (16,), type "|O"> + "/Data_Products/CrIS-SDR-GEO/CrIS-SDR-GEO_Gran_7": shape (16,), type "|O"> + "/Data_Products/CrIS-SDR-GEO/CrIS-SDR-GEO_Gran_8": shape (16,), type "|O"> + "/Data_Products/CrIS-SDR-GEO/CrIS-SDR-GEO_Gran_9": shape (16,), type "|O"> diff --git a/docs/hDf5_README b/docs/hDf5_README new file mode 100644 index 0000000000000000000000000000000000000000..571b7282c539e5184f6fee214d8cb9ef0759530e --- /dev/null +++ b/docs/hDf5_README @@ -0,0 +1,62 @@ + +If you like your prompt to be your path +export PS1="\u@\h \w> " + + +alias d='display' + +>d file.png will show the png file on your display + +alias loadmods='module load license_intel intel hdf hdf5 netcdf4 miniconda' +#alias loadmods='module load license_intel gcc hdf hdf5 netcdf4 miniconda' + +Useful Slurm commands +The q's are left over from the PBS qstat commands! +alias sq='squeue' +alias q='squeue -u snebuda -o "%.10i %.4P %.25j %.8u %.2t %.10M %.6D %R"' +alias qa='squeue -o "%.10i %.4P %.25j %.8u %.2t %.10M %.6D %R"' +alias qr='squeue -o "%.10i %.4P %.25j %.8u %.2t %.10M %.6D %R" | grep " R "' +alias qdel='scancel' + + +Logging in +ssh -Y bandersen@ash.ssec.wisc.edu +ssh -Y iris.ssec.wisc.edu + + +NOAA CLASS +https://www.avl.class.noaa.gov/saa/products/welcome + +hdf5 commands on iris + ls /opt/hdf5/1.8.17-intel-17/bin +-rwxr-xr-x 1 root root 288K Sep 7 2016 gif2h5 +-rwxr-xr-x 1 root root 284K Sep 7 2016 h52gif +-rwxr-xr-x 1 root root 13K Sep 7 2016 h5c++ +-rwxr-xr-x 1 root root 14K Sep 7 2016 h5cc +-rwxr-xr-x 1 root root 282K Sep 7 2016 h5copy +-rwxr-xr-x 1 root root 142K Sep 7 2016 h5debug +-rwxr-xr-x 1 root root 432K Sep 7 2016 h5diff +-rwxr-xr-x 1 root root 414K Sep 7 2016 h5dump +-rwxr-xr-x 1 root root 13K Sep 7 2016 h5fc +-rwxr-xr-x 1 root root 340K Sep 7 2016 h5import +-rwxr-xr-x 1 root root 286K Sep 7 2016 h5jam +-rwxr-xr-x 1 root root 325K Sep 7 2016 h5ls +-rwxr-xr-x 1 root root 278K Sep 7 2016 h5mkgrp +-rwxr-xr-x 1 root root 324K Sep 7 2016 h5perf_serial +-rwxr-xr-x 1 root root 6.0K Sep 7 2016 h5redeploy +-rwxr-xr-x 1 root root 350K Sep 7 2016 h5repack +-rwxr-xr-x 1 root root 137K Sep 7 2016 h5repart +-rwxr-xr-x 1 root root 296K Sep 7 2016 h5stat +-rwxr-xr-x 1 root root 281K Sep 7 2016 h5unjam + + +example data in /scratch/snebuda/cris hdf5 format +GCRSO-SCRIF_j01_d20190518_t2356479_e0004457_b07755_c20200303175012099750_noac_ops.h5 + +h5py +http://docs.h5py.org/en/latest/quick.html + + + + + diff --git a/docs/how_to_DR.txt b/docs/how_to_DR.txt new file mode 100644 index 0000000000000000000000000000000000000000..1d64eddc0f47c5ec28f5a4e12c7a6599ca24084b --- /dev/null +++ b/docs/how_to_DR.txt @@ -0,0 +1,45 @@ +DR or dual regression requires the use of HSRTV and is run through the following steps. + +1) The CrIS data file must be copied so that there are two files with the following similar file names: + + SCRIF_j01_d20190519_t0556479_e0604457_b07759_c20200303175129682159_noac_ops.h5 + GCRSO_j01_d20190519_t0556479_e0604457_b07759_c20200303175129682159_noac_ops.h5 + + Both files should be in the same directory by themselves. This can be done by using: + + mkdir temp_dr_directory + mv SCRIF_j01_d20190519_t0556479_e0604457_b07759_c20200303175129682159_noac_ops.h5 + temp_dr_directory/SCRIF_j01_d20190519_t0556479_e0604457_b07759_c20200303175129682159_noac_ops.h5 + mv GCRSO_j01_d20190519_t0556479_e0604457_b07759_c20200303175129682159_noac_ops.h5 + temp_dr_directory/GCRSO_j01_d20190519_t0556479_e0604457_b07759_c20200303175129682159_noac_ops.h5 + +2) The data is now ready to run HSRTV. First run the following in terminal: + + export HS_RET_DIR=${PWD}/CSPP_UW_HSRTV_2_0 + source $HS_RET_DIR/env/uw_hs_l2.bash_env + + Where ${PWD}=the pathway to the HSRTV software (for example /apollo/jung/bandersen/CSPP_UW_HSRTV_2_0). Then run: + + run_HSRTV.scr 3 temp_dr_directory + +3) The output should be placed in the directory. If not it will be in the software directory. The file should look something + like this: + + CrIS_FSR_j01_d20190519_t055647.atm_prof_rtv.h5 + + This new file can be used to plot whatever is needed such as: + + module load license_intel intel hdf hdf5 netcdf4 miniconda + python codes/ncep_dr_ctp_fov.py + + module load license_intel intel hdf hdf5 netcdf4 miniconda + python codes/ncep_dr_emis_fov.py + + module load license_intel intel hdf hdf5 netcdf4 miniconda + python codes/ncep_ecmwf-cd_fov.py + +4) For those above, it is helpful to run it through a bash script, like the one given in: + + sbatch codes/large_python.sbatch + + diff --git a/docs/how_to_ECMWF-CD.txt b/docs/how_to_ECMWF-CD.txt new file mode 100644 index 0000000000000000000000000000000000000000..7447186359290bca6fe589b6551c98d2506b63aa --- /dev/null +++ b/docs/how_to_ECMWF-CD.txt @@ -0,0 +1,51 @@ +CD or cloud detection requires the use of ECMWF Aerosol and Cloud Detection Software and is run through the following steps. + +1) Data must be run throuhg the follwing converter in order to work with ECMWF's software. + + module load license_intel intel hdf hdf5 netcdf4 miniconda + python codes/ecmwf-cd_step_1.py + +2) The data is now in the right formate. First run the following in terminal + + sh codes/ecmwf-cd.sh + + Remember to change the file path to the correct input and output folder. + +3) The output should be placed in the data directory, and will be named as given in the .sh file. To run the output + it must first be run through the following to get it into an agreeable format. + + module load license_intel intel hdf hdf5 netcdf4 miniconda + python codes/ecmwf-cd_step_2.py + +4) Now that everything is in the proper formate, scripts like the following can be run. + + module load license_intel intel hdf hdf5 netcdf4 miniconda + python codes/ncep_dr_ecmwf-cd_fov.py + + module load license_intel intel hdf hdf5 netcdf4 miniconda + python codes/ncep_ecmwf-cd_fov.py + +5) For those above, it is helpful to run it through a bash script, like the one given in: + + sbatch codes/large_python.sbatch + +6) Afterwards, in order to see the files on the computer, use the following to zip and copy files to + desktop. + + cd NCEP_ECMWF-CD + for f in *.pdf; do mv -- "$f" "${f%.pdf}.png"; done + cd .. + zip -r ncep_ecmwf-cd_fov.zip NCEP_ECMWF-CD + scp ncep_ecmwf-cd_fov.zip bandersen@ash.ssec.wisc.edu:/home/bandersen + + Then on desktop terminal + + scp bandersen@ash.ssec.wisc.edu:/home/bandersen/ncep_ecmwf-cd_fov.zip Documents/1ncep_ecmwf-cd_fov.zip + cd Documents + unzip 1ncep_ecmwf-cd_fov.zip + +cd ECMWF-CD_2020 +for f in *.pdf; do mv -- "$f" "${f%.pdf}.png"; done +cd .. +zip -r 2020_ecmwf-cd_fov.zip ECMWF-CD_2020 +scp 2020_ecmwf-cd_fov.zip bandersen@ash.ssec.wisc.edu:/home/bandersen diff --git a/docs/how_to_ECMWF-CD.txt.save b/docs/how_to_ECMWF-CD.txt.save new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/docs/how_to_ECMWF-CD.txt.save.1 b/docs/how_to_ECMWF-CD.txt.save.1 new file mode 100644 index 0000000000000000000000000000000000000000..897ceef2e0e352a70eb208b8225b80c1937e714e --- /dev/null +++ b/docs/how_to_ECMWF-CD.txt.save.1 @@ -0,0 +1,55 @@ +CD or cloud detection requires the use of ECMWF Aerosol and Cloud Detection Software and is run through the following steps. + +1) Data must be run throuhg the follwing converter in order to work with ECMWF's software. + + module load license_intel intel hdf hdf5 netcdf4 miniconda + python codes/ecmwf-cd_step_1.py + +2) The data is now in the right formate. First run the following in terminal + + sh codes/ecmwf-cd.sh + + Remember to change the file path to the correct input and output folder. + +3) The output should be placed in the data directory, and will be named as given in the .sh file. To run the output + it must first be run through the following to get it into an agreeable format. + + module load license_intel intel hdf hdf5 netcdf4 miniconda + python codes/ecmwf-cd_step_2.py + +4) Now that everything is in the proper formate, scripts like the following can be run. + + module load license_intel intel hdf hdf5 netcdf4 miniconda + python codes/ncep_dr_ecmwf-cd_fov.py + + module load license_intel intel hdf hdf5 netcdf4 miniconda + python codes/ncep_ecmwf-cd_fov.py + +5) For those above, it is helpful to run it through a bash script, like the one given in: + + sbatch codes/large_python.sbatch + +6) Afterwards, in order to see the files on the computer, use the following to zip and copy files to + desktop. + + cd NCEP_ECMWF-CD + for f in *.pdf; do mv -- "$f" "${f%.pdf}.png"; done + cd .. + zip -r ncep_ecmwf-cd_fov.zip NCEP_ECMWF-CD + scp ncep_ecmwf-cd_fov.zip bandersen@ash.ssec.wisc.edu:/home/bandersen + + Then on desktop terminal + + scp bandersen@ash.ssec.wisc.edu:/home/bandersen/ncep_ecmwf-cd_fov.zip Documents/1ncep_ecmwf-cd_fov.zip + cd Documents + unzip 1ncep_ecmwf-cd_fov.zip + +cd ECMWF-CD_2020 +for f in *.pdf; do mv -- "$f" "${f%.pdf}.png"; done +cd .. +zip -r 2020_ecmwf-cd_fov.zip ECMWF-CD_2020 +scp 2020_ecmwf-cd_fov.zip bandersen@ash.ssec.wisc.edu:/home/bandersen + +scp bandersen@ash.ssec.wisc.edu:/home/bandersen/2020_ecmwf-cd_fov.zip Documents/2020_ecmwf-cd_fov.zip +cd Documents +unzip 2020_ecmwf-cd_fov.zip diff --git a/docs/time_runs.txt b/docs/time_runs.txt new file mode 100644 index 0000000000000000000000000000000000000000..86c7e981bfdc96139fce172ed3d13fde9c78c761 --- /dev/null +++ b/docs/time_runs.txt @@ -0,0 +1,117 @@ +DR took approx 37 hours to complete the 03-18 run +CO2 Slicing took approx 7.75 hours to complete the 03-18 run + +for the 1X4 channels + +35:19 +34:50 +33:33 +28:30 +43:03 +37:43 +27:11 +33:23 + +average 34:34 + +for the 3X4 channels + +50:05 +37:57 +34:26 +53:27 +35:21 +41:05 + +average 42:03 + +for the 5X4 channels + +41:47 +63:23 +38:51 +35:02 +41:21 +60:40 +70:27 + +average 50:09 + +codes/co2_slicing_1_chan.py +Duration: 29:16 +Duration: 33:45 +Duration: 42:46 + +codes/co2_slicing_3_chan.py +Duration: 67:06 (2.3 from 1) +Duration: 42:26 (1.3 from 1) +Duration: 40:25 (0.9 from 1) + +codes/co2_slicing_5_chan.py +Duration: 73:58 (2.5 from 1 and 1.1 from 3) +Duration: 37:20 (1.2 from 1 and 0.9 from 3) +Duration: 60:59 (1.4 from 1 and 1.5 from 3) + +ECEMWF + +2:12:00 +2:45:00 +2:33:00 +2:38:00 +2:31:00 +2:29:00 +3:12:00 +2:26:00 +3:12:00 +2:57:00 +2:22:00 +1:47:00 +2:19:00 + +Average 2:39:44 +Total 29:17:00 + +From the full co2_slicing full time + +25:54 +28:24 +24:00 +27:03 +26:29 +27:46 +37:27 +25:58 +24:51 +26:19 +39:15 +38:02 +35:52 +36:25 +37:27 + +Average 30:45 +Total 07:41:12 + + +CO2_Slicing Compare + +Time Chans h= +49:40 1 1.0 +41:04 1 1.2 +45:58 1 1.4 +53:48 1 1.5 +52:19 1 1.6 +33:38 1 2.0 +69:20 3 1.0 +37:39 3 1.2 +27:20 3 1.4 +26:19 3 1.5 +25:38 3 1.6 +23:42 3 2.0 +41:37 5 1.0 +47:26 5 1.2 +44:06 5 1.4 +43:03 5 1.5 +34:10 5 1.6 +28:17 5 2.0 +