; ---------------------------------------------------------------------------------------------------- ; This code extracts/plots the timeseries of TEMPO true and derived tropospheric columns and ; WRF VMR and emissions of NO2 ; ;- Procedures Used - ; read_TEMPO_hourly.pro ; spl_trop_col_diff.pro ; This plots the spatial distribution ; con_lc.pro ; ; In this code there are multiple layers ; (1) Choice: TEMPO, WRF ; (2) Species (Columns for TEMPO and MR and emissions for WRF) ; (3) Difference time-series ; (3A) Difference -> 1 control/difference scenario (For TEMPO) ; Time series of Del[=(Diff. SCN - control SCN)] columns ; (3B) Difference -> 1 control/difference scenario (For WRF) ; ; (4) Date: Aug 10-12 ; (5) Hour: 12-23 hours ; ; Please note: emission timeseries have same dates as TEMPO data (12-23 hours each day) ; ---------------------------------------------------------------------------------------------------- @read_TEMPO_hourly.pro @spl_trop_col_diff.pro !quiet=1 ; ------------------------- Paths and relevant Info --------------------------- species = ['GLYX','H2O','HCHO','NO2','O3','SO2'] spc_ttl = ['GLYOXAL','H!I2!NO','HCHO','NO!I2!N','O!I3!N','SO!I2!N'] species1 = ['NOx', 'NO2', 'NO'] spc_ttl1 = ['NO!Ix!N','NO!I2!N','NO'] tmp_path = '/home/pfister/TEMPO/FRAPPE_TEMPO/' wrf_path = '/home/pfister/TEMPO/FRAPPE_WRFchem/TEMPO/' plot_path= '/home/pfister/TEMPO/Piyush/plots/' wrf_stup = ['WRFV4_S05_d02_MOZAIC_final_adj_EPA2014_newWRF_2xOG/', $ 'WRFV4_S05_d02_MOZAIC_final_adj_EPA2014_newWRF_phys/', $ 'WRFV4_S05_d02_MOZAIC_final_adj_EPA2014_newWRF_RAQMS/',$ 'WRFV4_S05_d02_MOZAIC_final_NEI2011adj_newWRF/', $ 'WRFV4_S05_d02_MOZAIC_final_S05_newWRF/' ] tem_prfx = 'l2_synth/TEMPO_201408' wrf_prfx = 'wrfout_d02_2014-08-' scenario = ['adj_EPA2014_newWRF_2xOG','adj_EPA2014_newWRF_phys', $ 'adj_EPA2014_newWRF_RAQMS','NEI2011adj_newWRF','S05_newWRF'] ; ----------------------------------------------------------------------------- ;goto, skip1 ; (1) Enter the which difference you need e.g., MODEL, TEMPO, BOTH; Enter one choice' choice = '' READ, choice, PROMPT='Enter the which difference you need e.g., WRF or TEMPO; Enter any one' print,' ' if choice eq 'TEMPO' then begin ; (2) Specify species, control scenarios, difference runs,for columns; Read input from the terminal: spc = '' READ, spc, PROMPT='Enter one species of interest e.g., [GLYX, H2O, HCHO, NO2, O3, SO2]: ' print,' ' ; (3A) Enter Control Scenario cont_scn = '' READ, cont_scn, PROMPT='Enter control scenario simulation prefix (5 options); '$ +'Enter 1-5 for "adj_EPA2014_newWRF_2xOG", "adj_EPA2014_newWRF_phys", '$ +'"adj_EPA2014_newWRF_RAQMS", "NEI2011adj_newWRF", "S05_newWRF" ' print,' ' ; (3A) Enter Diff Scenario diff_scn = '' READ, diff_scn, PROMPT='Difference Scenarios you can choose one of the scenarios'$ +' (other than control SCN) Enter 1-5 for "adj_EPA2014_newWRF_2xOG",'$ +' "adj_EPA2014_newWRF_phys", "adj_EPA2014_newWRF_RAQMS", "NEI2011adj_newWRF",'$ +' "S05_newWRF" ' print,' ' endif if choice eq 'WRF' then begin ; (2) Specify species, control scenarios, difference runs,for columns; Read input from the terminal: ;spc = 'NO2' spc = '' READ, spc, PROMPT='Enter one species of interest e.g., [NOx, NO2, NO]: ' print,' ' ; (3B) Enter Control Scenario cont_scn = '' READ, cont_scn, PROMPT='Enter control scenario simulation prefix (5 options); '$ +'Enter 1-5 for "adj_EPA2014_newWRF_2xOG", "adj_EPA2014_newWRF_phys", '$ +'"adj_EPA2014_newWRF_RAQMS", "NEI2011adj_newWRF", "S05_newWRF" ' print,' ' ; (3B) Enter Diff Scenario diff_scn = '' READ, diff_scn, PROMPT='Difference Scenarios you can choose one of the scenarios'$ +' (other than control SCN) Enter 1-5 for "adj_EPA2014_newWRF_2xOG",'$ +' "adj_EPA2014_newWRF_phys", "adj_EPA2014_newWRF_RAQMS", "NEI2011adj_newWRF",'$ +' "S05_newWRF" or use "all" for all at once' print,' ' endif ; (4) Date dd = '' READ, dd, PROMPT='Enter one date of interest (month is Aug) e.g., 11 or 12: ' print,' ' ; (5) Specify single or multiple hour input; Read input from the terminal: hh = '' READ, hh, PROMPT='Enter one hour between [12:23] e.g.,13 : ' print,' ' skip1: ; Used the section below for testing -- ; choice = 'WRF' ; spc = 'NOx' if choice eq 'WRF' then sp = uint(where(species1 eq spc))$ else sp = uint(where(species eq spc)) ;cont_scn = '5' ;diff_scn = '1' ; dd = '11' ; hh = 13 n = long(cont_scn)-1 m = long(diff_scn)-1 ; ====================================================================================================== ; Part-1 : TEMPO Columns ; -------------------------------------------------------------------------------------------------- if choice eq 'TEMPO' then begin ;- Reading TEMPO control scenario print, 'Reading TEMPO control scenario' filename = strcompress(tmp_path+wrf_stup[n]+tem_prfx+dd+'_'+string(hh)+'h_CO_'+species[sp] $ +'.nc',/remove_all) read_TEMPO_hourly, filename, output lat_all_c = output.lat lon_all_c = output.lon derv_trop_col_c = output.trop_column true_trop_col_c = output.true_trop_column derv_trop_col_c[where(derv_trop_col_c lt -1.0e29)] = !Values.F_NAN true_trop_col_c[where(true_trop_col_c lt -1.0e29)] = !Values.F_NAN ;- Reading TEMPO control scenario print, 'Reading TEMPO Difference scenario' filename = strcompress(tmp_path+wrf_stup[m]+tem_prfx+dd+'_'+string(hh)+'h_CO_'+species[sp] $ +'.nc',/remove_all) read_TEMPO_hourly, filename, output lat_all_d = output.lat lon_all_d = output.lon derv_trop_col_d = output.trop_column true_trop_col_d = output.true_trop_column derv_trop_col_d[where(derv_trop_col_d lt -1.0e29)] = !Values.F_NAN true_trop_col_d[where(true_trop_col_d lt -1.0e29)] = !Values.F_NAN ;- Difference Columns diff_lon_fnl = lon_all_d - lon_all_c diff_lat_fnl = lat_all_d - lat_all_c derv_trop_col_df = derv_trop_col_d - derv_trop_col_c true_trop_col_df = true_trop_col_d - true_trop_col_c ;- Plotting difference Column print, ' Plotting difference scenario ' outfl = strcompress(plot_path+'diff_TEMPO_trop_colum_'+species[sp]+'_'+scenario[n]+'-'+$ scenario[m]+'_'+dd+'aug_'+string(hh)+'UTC.eps' ,/remove_all) spl_trop_col_diff, outfl, derv_trop_col_df, true_trop_col_df, lat_all_d, lon_all_d, $ dd, string(hh), strcompress(scenario[n]+'-'+scenario[m],/remove_all), spc_ttl[sp], sp, choice endif ; choice is tempo ; ====================================================================================================== ; Part-2 : WRF Species ; -------------------------------------------------------------------------------------------------- if choice eq 'WRF' then begin ;- Reading WRF control scenario print, 'Reading WRF control scenario' filename = strcompress(wrf_path+wrf_stup[n]+wrf_prfx+dd+'_'+string(hh)+':00:00',/remove_all) id = ncdf_open(filename, /nowrite) if spc eq 'NO2' then begin ncdf_varget, id, 'E_NO2', emi_no2_c ncdf_varget, id, 'no2', vmr_no2_c wrf_vmr_c = reform(vmr_no2_c[*,*,0])*1e3 wrf_emi_c = reform(emi_no2_c[*,*,0]) endif if spc eq 'NOx' then begin ncdf_varget, id, 'E_NO2', emi_no2_c ncdf_varget, id, 'no2', vmr_no2_c ncdf_varget, id, 'E_NO', emi_no_c ncdf_varget, id, 'no', vmr_no_c wrf_vmr_c = (reform(vmr_no_c[*,*,0]) + reform(vmr_no2_c[*,*,0]))*1e3 wrf_emi_c = reform(emi_no_c[*,*,0]) + reform(emi_no2_c[*,*,0]) endif if spc eq 'NO' then begin ncdf_varget, id, 'E_NO', emi_no_c ncdf_varget, id, 'no', vmr_no_c wrf_vmr_c = reform(vmr_no_c[*,*,0])*1e3 wrf_emi_c = reform(emi_no_c[*,*,0]) endif ncdf_varget, id, 'XLONG', wlon_c ncdf_varget, id, 'XLAT', wlat_c ncdf_close, id ;- Reading WRF difference scenario print, 'Reading WRF Difference scenario' filename = strcompress(wrf_path+wrf_stup[m]+wrf_prfx+dd+'_'+string(hh)+':00:00',/remove_all) id = ncdf_open(filename, /nowrite) if spc eq 'NO2' then begin ncdf_varget, id, 'E_NO2', emi_no2_d ncdf_varget, id, 'no2', vmr_no2_d wrf_vmr_d = reform(vmr_no2_d[*,*,0])*1e3 wrf_emi_d = reform(emi_no2_d[*,*,0]) endif if spc eq 'NOx' then begin ncdf_varget, id, 'E_NO2', emi_no2_d ncdf_varget, id, 'no2', vmr_no2_d ncdf_varget, id, 'E_NO', emi_no_d ncdf_varget, id, 'no', vmr_no_d wrf_vmr_d = (reform(vmr_no_d[*,*,0]) + reform(vmr_no2_d[*,*,0]))*1e3 wrf_emi_d = reform(emi_no_d[*,*,0]) + reform(emi_no2_d[*,*,0]) endif if spc eq 'NO' then begin ncdf_varget, id, 'E_NO', emi_no_d ncdf_varget, id, 'no', vmr_no_d wrf_vmr_d = reform(vmr_no_d[*,*,0])*1e3 wrf_emi_d = reform(emi_no_d[*,*,0]) endif ncdf_varget, id, 'XLONG', wlon_d ncdf_varget, id, 'XLAT', wlat_d ncdf_close, id ;- Difference Columns wrf_vmr_df = wrf_vmr_d - wrf_vmr_c wrf_emi_df = wrf_emi_d - wrf_emi_c ;- Plotting difference Column print, ' Plotting difference scenario ' outfl = strcompress(plot_path+'diff_WRF_'+species1[sp]+'_'+scenario[n]+'-'+scenario[m]+ $ '_'+dd+'aug_'+string(hh)+'UTC.eps' ,/remove_all) spl_trop_col_diff, outfl, wrf_vmr_df, wrf_emi_df, wlat_d, wlon_d, dd, string(hh), $ strcompress(scenario[n]+'-'+scenario[m],/remove_all), spc_ttl1[sp], sp, choice endif ; choice is WRF/NO2 ; --------------------------------------------------------------------------------------------------- END