Skip to content

3. Post processing

Douglas Lowe edited this page Jan 29, 2018 · 3 revisions

For post-processing you will need NCL (https://www.ncl.ucar.edu/) and python installed.

The scripts in analysis_scripts/NCL_extraction_package are used for extracting the radiative forcings data from the wrfout files, and are run using NCL. The main script is EXTRACT_domain_averages.ncl:

  • Edit the directory strings to match your own setup, and scenarios_list to match the scenario directory names in which you are storing the wrfout files.
  • This script is currently set up to extract statistics for the whole model domain (minus 5 grid cells around the edge, to remove the relaxation zone). To extract these for a sub-set of the domain instead you should set region_select = True, modify the list of regions region_select@regions, and set the maximum and minimum latitude and longitude values of each region that you are interested in, as attributes for the minlon, minlat, maxlon, and maxlat variables.
  • To process data from all your wrfout files set plot_selected_times = False. Leaving this switch as true enables you to select the files you wish to process using the day, hour, month and year arrays (these will be used to create masks for selecting the data files to process, leaving an array as (/"*"/) will mean you'll select all values of that variable).

The scripts in analysis_scripts/RadDecomp_analysis_package are used to process the plain text output files produced by the above scripts, and are run using python. The main script is RadDecomp_DiurnalAvg_timeplot.py:

  • Edit the COMPDir, DATADir, and scen_list strings to match your scenario names and the location of the stats data that the above scripts produced (also edit dom_list if you've altered the domain region that you analyzed). The OUTDir string controls the location in which the file plots are saved, and the scen_names and dom_name strings are used to produce more human-readable labels on your plots.
  • The x-axis (time) can be altered using the x_lim and x_ticks variables, while the y-axes of each plot can be set with the sw_ylim and lw_ylim variables.
Clone this wiki locally