-------------------------------------------------------------------------------- README - details of each .pro in the SIMBA column building framework - v1.6 -------------------------------------------------------------------------------- DEPENDENCY NOTES: - Code is written in IDL v8.4 (should also work with at least v8.2), and utilizes both RSL_in_IDL (v1.8) and Radx. - RSL_in_IDL is available at: http://trmm-fc.gsfc.nasa.gov/trmm_gv/software/rsl_in_idl/RSL_in_IDL.html - Radar data are gridded using UCAR's Radx software, Radx is available at: https://www.eol.ucar.edu/software/radx - GPM Core Observatory data are read in using utilities developed by Bob Morris. These tools are provided in the SIMBA package's /dependencies/ directory. - Ground-based scanning radar data (except from the D3R and DOW6 platforms) are the GPMGVDPQC output (.uf.gz) files available as part of the GPM GV Validation Network: ftp://hector.gsfc.nasa.gov See also: Marks et al. 2011 (JTECH) Pippitt et al 2013, 2015 (Radar Conf. papers) - Additional required utilities, outside the column building library, IDL, and RSL_in_IDL are noted below and at top of each .pro. These are included in the SIMBA package's /dependencies/ directory. -------------------------------------------------------------------------------- build_column.pro: ----------------- This is the top-level .pro for implementing each sub-task that is part of the task to build the atmospheric column .nc file. Need to set in here: main_plat: string identifier for the main platform. new .nc file timestamp is based on the main platform, all other platform timeoffsets in the new .nc file are centered on the main_plat's timestamp Current Options: any supported ground-based scanning radar: NPOL D3R DOW6 or any of the supported GPM GV VN 88D radars: KABR KCAE KEAX KICT KLIX KMRX KTLH KAKQ KCCX KEVX KILN KLOT KMVX KTLX KAMX KCLX KFSD KILX KLSX KNQA KTWX KAPX KCRP KFTG KINX KLTX KOKX KTYX KARX KDDC KFWS KIWX KLZK KPAH PAEC KBMX KDGX KGRK KJAX KMHX KRAX PAIH KBOX KDLH KGRR KJGX KMKX KSGF PGUA KBRO KDMX KGSP KJKL KMLB KSHV PHKI KBUF KDOX KHGX KLCH KMOB KSRX PHMO KBYX KDVN KHTX KLGX KMQT KTBW TJUA center_loc_name: name of the location to center the column grid on NOTE: this location must be defined in platform_location.pro column_grid_horiz_spacing: column grid horiz spacing in METERS - must evenly divide limit column_grid_horiz_limit: column grid horiz extent limit in METERS - must be evenly divisible by spacing column_grid_vert_spacing: column grid vert spacing in METERS - must evenly divide limit column_grid_vert_limit: column grid vert extent limit in METERS - must be evenly divisible by spacing halftime_interval: integer number of minutes before and after the main platform timestamp to define the time interval included in the column for data from gauges, disdrometers, and MRRs. file_NPOL: path to GPM-GV DPQC'd NPOL data file (.uf.gz) files_D3R_Ka: string array list of paths to D3R Ka-band data files (have one .nc for ea PPI or RHI scan in a "volume") files_D3R_Ku: string array list of paths to D3R Ku-band data files (have one .nc for ea PPI or RHI scan in a "volume") files_88D: string array list of paths to GPM-GV DPQC'd 88D data file (have one .uf.gz file for each available 88D radar, see list of supported VN 88Ds above) file_DOW6: (use for OLYMPEX cases, otherwise comment out) path to input DOW6 data file, single volume Cfradial .nc format, data available from GHRC DAAC OLYMPEX archive: https://ghrc.nsstc.nasa.gov/home/field-campaigns/olympex apu_dir: string path to dir containing APU files for the present case (files processed by Ali Tokay) two_dvd_dir: string path to dir containing 2DVD files, assuming the present case is included in the files - code will search for timestamp to verify this (files processed by Ali Toaky) pluvio_dir: string path to dir containing Pluvio files for present case (files processed by Ali Tokay) gauge_dir: string path to dir containing GMIN gauge data files with times that include the present case (files processed by Jerry Wang, availble at: http://gpm-gv.gsfc.nasa.gov/Gauge/index.html -or- on HECTOR: /gpmraid/gpmarchive/Gauge/) mrr_IDs: string array of MRR unit names, eg: 'MRR-01' files_mrr_ave: string array of paths to MRR .ave files - files set at each subscript must correspond to MRR unit set for same subscript in mrr_IDs file_gprof_gmi: string path to GPM Level 2 GPROF GMI data file - .HDF5 format these files available from the NASA PPS: https://pps.gsfc.nasa.gov/ppsindex.html file_lev1c_gmi: string path to GPM Level 1 C GMI data file - .HDF5 format these files available from the NASA PPS: https://pps.gsfc.nasa.gov/ppsindex.html file_dpr: string path to GPM Level 2 2ADPR data file - .HDF5 format these files available from the NASA PPS: https://pps.gsfc.nasa.gov/ppsindex.html file_2bcmb: string path to GPM Level 2 2BCMB data file - .HDF5 format these files available from the NASA PPS: https://pps.gsfc.nasa.gov/ppsindex.html mrms_dir: string path to dir containing MRMS Level 2 precipition products, available from: hydro.ou.edu/projects/MRMS_NASA/lev2/ sondes_dir: string path to dir containing OLYMPEX Level 4 processed netCDF sounding data, available w/ other OLYMPEX campaing data from the GHRC DAAC: https://ghrc.nsstc.nasa.gov/home/field-campaigns/olympex out_dir: path to directory where new .nc file will be placed params_dir: path to directory where SIMBA-made .params files will go -- these files are generated for sending to Radx for gridding scanning radar data (NPOL, 88D, etc) full_grid_dir: path to directory where full grid Radx output will go -- these are files from which the subset of data in the SIMBA column grid box will be extracted full_vol_dir: path to directory where D3R combined volume files will go -- after the volumn is stitched together from the individual PPI or RHI sweep files -------------------------------------------------------------------------------- platform_location.pro --------------------- Function that assigns DMS lat/lon values for the input location. **NOTE: Will need to update case statements if/when adding or changing ** locations for a data platform or center position useage: result = platform_location(platform_name) platform_name: Must be a string. Current valid options include: 'WFFpad', 'PocoGrid', 'AmandaPark' 'NPOL-Newark', 'NPOL-OLYMPEX' 'D3R-WFF' 'KDOX', 'KAKQ', 'KLGX', or any supoprted VN 88D siteID 'DOW6' 'MRR-0#: 1, 2 'apu##': 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12, 13, 15, 16, 17, 20, 21, 23, 25, 30 'apu##_pluvio': 04, 10, 30 'SN##': 25, 35, 36, 37, 38, 70 result: location structure with tags: result.lat_d result.lat_m result.lat_s result.lon_d result.lon_m result.lon_s -------------------------------------------------------------------------------- define_box.pro: --------------- Function to set up the column grid parameters based on input center, horiz & vertical spacing, and limits. usage: result = define_box(center_on, box_spacing, box_limit, vert_spacing, $ vert_limit) center_on: string identifier of location for column grid center point must be a valid site in platform_location.pro box_spacing: integer dist [m] horiz spacing for sub boxes in main grid, must evenly divide box_limit value box_limit: integer dist [m] of the full horiz extent of column grid must be evenly divisible by box_spacing value center at middle, don't have this dist to ea dir, but: -half this dist to E, half this dist to W -half this dist to N, half this dist to S -EG: if box_spacing = 500 m & box_limit = 2000 m the column box grid will have 2 sub boxes (1 km) extending in each N, S, E, W dir from center pt vert_spacing: integer dist [m] vertical spacing for sub boxes must even divide vert_limit vert_limit: integer dist [m] of full vertical extent of column grid must be evenly divisible by vert_spacing result: structure containing column box grid parameters, with tags: .center_name: string ID of center location point .n_col_horiz_grid_boxes: integer # of sub boxes in horiz direction .n_col_vert_grid_boxes: integer # of sub boxes in vertical direction .column_grid_lats: double array of column grid point latitudes [dec deg] .column_grid_lons: double array of column grid point longitudes[dec deg] .column_grid_alts: float array of column grid point altitudes (AGL, [m]) .column_grid_center_lat: double, lat of column box center [dec deg] .column_grid_center_lon: double, lon of column box center [dec deg] dependencies: This .pro requires/calls the following: dms2dd.pro utility to convert deg-min-sec to decimal degrees xy2ll.pro utility to convert grid points to lat/lon values -------------------------------------------------------------------------------- set_main_plat_values.pro: ------------------------- Function to read the main_plat data file into rsl and obtain header info to set up the main_plat timestamp and scan_type string fields. NOTE: main_plat is usually 'NPOL', but the function will also work for any ground-based scanning radar. If main_plat is 'D3R', then 1st D3R Ku-band file in list/array called "files_D3R_Ku" is used for setting these values usage: result = set_main_plat_values(main_plat_name, main_plat_data_file) main_plat_name: string ID of the main platform name Current Options: any supported ground-based scanning radar: NPOL D3R DOW6 or any of the supported GPM GV VN 88D radars: KABR KCAE KEAX KICT KLIX KMRX KTLH KAKQ KCCX KEVX KILN KLOT KMVX KTLX KAMX KCLX KFSD KILX KLSX KNQA KTWX KAPX KCRP KFTG KINX KLTX KOKX KTYX KARX KDDC KFWS KIWX KLZK KPAH PAEC KBMX KDGX KGRK KJAX KMHX KRAX PAIH KBOX KDLH KGRR KJGX KMKX KSGF PGUA KBRO KDMX KGSP KJKL KMLB KSHV PHKI KBUF KDOX KHGX KLCH KMOB KSRX PHMO KBYX KDVN KHTX KLGX KMQT KTBW TJUA main_plat_data_file: path to data file from the main platform for NPOL, path to .uf.gz file for D3R, path to either Ka or Ku .nc file for DOW6, path to Cfradial .nc file for 88D, path to the QC'd 88d file (call these "lev2" in var names) result: structure with tags for the the main_plat info: .name string ID name of the main_plat .timestamp 15 char string 'YYYYMMDD_HHMMSS' .lat_deg double, latitude of main_plat in decimal degrees .lon_deg double, longitude of main_plat in decimal degrees .scan_type 3 char string 'PPI' 'RHI' or 'UNK' (unknown) dependencies: This .pro requires/calls the following: rsl_d3r_to_radar.pro add-on to RSL_in_IDL for NASA D3R radar data rsl_cfradial_to_radar.pro add-on to RSL_in_IDL for cfradial radar data dms2dd.pro utility to convert deg-min-sec to decimal deg -------------------------------------------------------------------------------- set_plat_values.pro: -------------------- Function .pro reads any valid platform's data file and returns a structure of the info fields to include in the attributes of the new .nc file NOTES:for NPOL files, uses the volume scan .uf.gz file for D3R files, uses 1st D3R Ku-band file in list "files_D3R_Ku" for DOW6 files, uses the volume scan Cfradial .nc file for 88D QC'd lev2 files, if >1 radar input, each tag will be an array for APU files, uses Ali's "*_raimparameter_min_ter" file, assumes times in all "apu##_*" files are the same. If more than 1 APU in the column box, each tag will be an aray. for 2DVD files, uses Ali's _raindsd_ter* file or *_raindsd.* file, depending on which is available. Does NOT assume all files have same times. If more than one 2DVD unit in column box, each tag will be an array. for Pluvio files, uses Ali's *_preciprate.* file, does NOT assume all files have same times. If more than 1 Pluvio unit in column box, each tag will be an array. for MRR files, reutrns mrr_plat_info with tags for timestamp & offset, but these are actually set in get_mrr_for_column.pro after the data file is read in for Satellite Data Files: There are no lat/lon tags, and the timestamp tag corresponds to the time in scan when sensor overpasses the main_plat lat/lon location. Also, have additional timestamp tag for the time corresponding to column box center point instead of main_plat (.timestamp_cntr) usage: result = set_plat_values(plat_name, data_file, main_plat_info) plat_name: string ID of the platform data_file: data file for the platform. info will be pulled from this file's header/set up main_plat_info: info structure for the main platform, as returned by set_main_plat_info.pro - will use timestamp to get time offset for current platform result: structure with tags for info to include in attributes: The exact tag names/attributes depend on the platform type: Tags are arrays if >1 unit in column grid box (88D, APU, 2DVD, MRR, etc) Ground-based radars: NPOL, 88Ds, D3R, DOW6, MRRs .lat_d: int radar's lat degrees .lat_m: int radar's lat minutes .lat_s: int radar's lat seconds .lon_d: int radar's lon degrees .lon_m: int radar's lon minutes .lon_s: int radar's lon seconds .elev : float, radar's elev (altitude) ASL [m] .plat_name: string ID of radar's name .plat_type: string label for type of platform: 'radar' or 'MRR' .operation_mode: string ID for scan mode: 'PPI', 'RHI', 'UNK' .wavelength: float radar wavelength [m] -- array for D3R [Ku, Ka] .frequency: float radar frequency [GHz] -- array for D3R [Ku, Ka] .beam_width: float radar beam width [deg] -- array for D3R [Ku, Ka] .gate_size: float radar gate size [m] -- array for D3R [Ku, Ka] FOR NPOL, 88Ds, D3R, DOW6: .timestamp: 15 char 'YYYYMMDD_HHMMSS' timestamp (vol scan start time) .offset_vs_main: int/long # of seconds time offset vs main_plat POSITIVE OFFSET: plat LATER than main_plat NEGATIVE OFFSET: plat EARLIER than main_plat FOR MRRs: .timestamp: 15 char 'YYYYMMDD_HHMMSS' timestamp for center of time interval contained in the column file .offset_vs_main: int/long # of seconds time offset vs main_plat .time_interval_width: int # of mins before & after main_plat time included Ground-based disdrometers: APUs, 2DVDs .lat_d: int disdo's lat degrees .lat_m: int disdo's lat minutes .lat_s: int disdo's lat seconds .lon_d: int disdo's lon degrees .lon_m: int disdo's lon minutes .lon_s: int disdo's lon seconds .plat_name: string ID of unit's name .plat_type: string label for type of disdrometer: 'APU' or '2DVD' .operation_mode: string ID for op mode: 'APU' or '2DVD' .timestamp: 15 char 'YYYYMMDD_HHMMSS' timestamp for center of time interval contained in the column file .offset_vs_main: int/long # of seconds time offset vs main_plat POSITIVE OFFSET: plat LATER than main_plat NEGATIVE OFFSET: plat EARLIER than main_plat .time_interval_width:int # of mins before & after main_plat time included Ground-based rain gauges: Pluvios, gauges (tipping buckets) .lat_d: int gauge's lat degrees .lat_m: int gauge's lat minutes .lat_s: int gauge's lat seconds .lon_d: int gauge's lon degrees .lon_m: int gauge's lon minutes .lon_s: int gauge's lon seconds .plat_name: string ID of unit's name .plat_type: string label for type of gauge: 'pluvio' or 'gauge' .operation_mode: string ID for op mode: 'pluvio' or 'gmin_gauge' .timestamp: 15 char 'YYYYMMDD_HHMMSS' timestamp for center of time interval contained in the column file .offset_vs_main: int/long # of seconds time offset vs main_plat POSITIVE OFFSET: plat LATER than main_plat NEGATIVE OFFSET: plat EARLIER than main_plat .time_interval_width:int # of mins before & after main_plat time included Satellite-based sensors: GMI, DPR .plat_name: string ID of sensor's name .plat_type: string label for this sensor product: 'GMI' or 'DPR' .frequency: string stating operating frequencies for the instrument [GHz] .file_type: string ID of PPS file type, eg: '2A-CS-CONUS' .algorithm: string algorithm name as from PPS filename (immediately after data type in PPS name), eg: 'GPROF2014v2-0' .orbit_num: string GPM orbit number (after end time in PPS name) .data_version: string version nunber of the dataset (just before file extension in PPS name) .timestamp: 15 char 'YYYYMMDD_HHMMSS' timestamp for pixel that includes/is closest to main_plat's lat/lon location .offset_vs_main: int/long # of seconds time offset vs main_plat POSITIVE OFFSET: plat LATER than main_plat NEGATIVE OFFSET: plat EARLIER than main_plat .timestamp_cntr: 15 char timestamp for pixel including/closest to column box center pt (instead of main_plat) dependencies: This .pro requires/calls the following: rsl_d3r_to_radar.pro add-on to RSL_in_IDL for NASA D3R radar data rsl_cfradial_to_radar.pro add-on to RSL_in_IDL for cfradial radar data get_dpm.pro utility to return number of days in the month jd2time.pro IDL Coyote utility to convert from Julian day -------------------------------------------------------------------------------- setup_main_plat.pro: -------------------- Function.pro that calls set_main_plat_values.pro to perform "Step 2" in the main SIMBA procedure. -------------------------------------------------------------------------------- grid_npol_for_column.pro: ------------------------- Function.pro takes NPOL data file (.uf.gz after QC/processing), grids the data, saves full gridded output, then takes out subset of data that is within the column box grid and returns that data Gridding in Radx: the .params file passed to this .pro is generated by calling make_params_file.pro. Philosophy for the .params set up: set grid center, vertical & horizontal geometry/spacing values as same values set for the SIMBA column box grid. More info in description of make_params_file.pro (below). Pulls out subset of data in the column box grid set up -- works whether the column box grid center is a grid point edge or a grid box middle point (if latter is the case, runs bilinear interpolation bc Radx grid edges will be at the midpts of the column grid boxes) usage: result = grid_npol_for_column(npol_plat_info, orig_NPOL_file, $ params_file, column_box_params, full_grid_dir) npol_plat_info: plat_info structure retured by set_plat_values.pro orig_NPOL_file: path to .uf.gz NPOL data file params_file: path to the .params file for use in Radx column_box_params: column box grid parameters structure full_grid_dir: path to dir for full grid Radx output result: structure containing the NPOL data at each location in the column box grid (whether column grid points are along or in middle of Radx/radar grid in the horizontal) Tags: ** is 2 char field ID (as in RSL) .**name: string long name of ** data field, as recorded in the Radx gridded .nc file (may be an empty string) .**units: string telling the ** data field units, as recorded in the Radx gridded .nc file (may be an empty string) .**data: NPOL ** field value at locations in column box grid this array is 3-D: [X x Y x Z] dims, will match col box dims middle point of column box = middle point of this array IF EVEN # OF HORIZ COLUMN GRID SUBBOXES: middle point is along an edge IF ODD # OF HORIZ COLUMB GRID SUBBOXES: middle poit is at middle of a grid box Have 3 Tags for each NPOL field getting put into the column: .ZZname .CZname .DRname .RHname .PHname .KDname .SQname .ZZunits .CZunits .DRunits .RHunits .PHunits .KDunits .SQunits .ZZdata .CZdata .DRdata .RHdata .PHdata .KDdata .SQdata .SWname .VRname .RRname .RPname .RCname .D0name .NWname .SWunits .VRunits .RRunits .RPunits .RCunits .D0units .NWunits .SWdata .VRdata .RRdata .RPdata .RCdata .D0data .NWdata .FHname .N2name .DMname .FHunits .N2units .DMunits .FHdata .N2data .DMdata FH: hydrometeor ID field, classifications as from Dolan et al. 2013: -1: UN unclassified 1: DZ drizzle 2: RN rain 3: IC/CR ice crystals 4: AG/DS aggregates/dry snow 5: WS wet snow 6: VI vertically oriented ice 7: LDG low-density graupel 8: HDG high-density graupel 9: HA hail 10: BD big drop/melting hail dependencies: This .pro requires/calls the following: Radx software UCAR/NCAR software for working with radar data uncomp_file.pro utility to uncompress a .gz file bad2nan.pro utility to convert a flag value to NaNs -------------------------------------------------------------------------------- grid_d3r_for_column.pro: ------------------------ Function.pro takes D3R data files (one .nc for each swp in the vol), grids the data, saves full gridded output, then takes out subset of data that is within the column box grid and returns that data Gridding in Radx: - Set grid center, vertical & horizontal geometry/spacing values - Because of required steps for D3R data, have a few extra steps for D3R gridding that don't need for NPOL or NEXRAD radars: - PPI volumes: 1) orig .nc files for ea swp must be combined to a single volume .uf file 2) Grid volume .uf file via Radx, save full gridded .nc file - Must set the max range and azimuthal limits to have Radx ignore "placeholder" gates ammended to volume when converted to .uf (via RSL) - RHI volumes: 1) orig .nc files for ea swp converted to individual swp .uf files 2) Grid each swp .uf file via Radx: - Must set the max range and azimuthal limits to have Radx ignore "placeholder" gates ammended to volume when converted to .uf (via RSL) a) grid for "far" ranges (>12 km) b) grid for "near" ranges (<12 km) - So, have 2 .nc Radx output files for ea RHI swp 3) Combine Radx output .nc files for ea RHI swp to single, full gridded .nc file - Why is the near/far range gridding done? For far ranges, D3R RHI data are gridded exactly as is done for NPOL, NEXRAD radars. At closer ranges, the beam_width_fraction value used in the .params set up has been increased to allow for improved results - when using the 'far' range beam_width_fraction for RHIs, there are moderate to large radial gaps in the gridded data within about 11 km - this is why the threshold for near/far is set at 12 km. Pulls out subset of data in the column box grid set up -- works whether the column box grid center is a grid point edge or a grid box middle point (if latter is the case, runs bilinear interpolation bc Radx grid edges will be at the middles of the column grid boxes) usage: result = grid_d3r_for_column(d3r_ka_filelist, d3r_ku_filelist, $ d3r_plat_info, column_box_params, $ column_grid_horiz_spacing, $ column_grid_vert_spacing, col_grid_vert_limit,$ params_dir, full_grid_dir, full_vol_dir) files_D3R_Ka, files_D3R_Ku: string arrays of paths to each D3R sweep .nc file in the volume - this MUST be only ONE VOLUME of swps - these paths are set at top of build_column.pro d3r_plat_info: plat_info structure returned by set_plat_values.pro column_box_params: column box grid parameters structure column_grid_horiz_spacing: horiz spacing of column grid, as set at top of build_column.pro column_grid_vert_spacing: vert spacing of column grid, as set at top of build_column.pro column_grid_vert_limit: vertical extent of column grid, as set at top of build_column.pro params_dir: path to dir where SIMBA-created .params files, used to run Radx, are wrttien full_grid_dir: path to dir for full grid Radx output full_vol_dir: path to dir for holding D3R volume files result: structure containing the D3R data at each location in the column box grid (whether column grid points are along or in middle of Radx/radar grid in the horizontal) Tags: ** is 2 char field ID (as in RSL) .ka**name, ku**name: string long name of ** data fields, as recorded in the Radx gridded .nc file (occasionally, is an empty string) .ka**units, ku**units: string thelling the ** data field units, as recorded in the Radx gridded .nc file .ka**data, ku**data: D3R ka- and ku- ** field value at locations in column box grid. These arrays are 3-D [x,y,z] dims, will match col box dims. Middle pt of col box = middle pt of these data arrays, this means: IF EVEN # OF HORIZ COLUMN GRID SUBBOXES: middle point is along an edge IF ODD # OF HORIZ COLUMB GRID SUBBOXES: middle poit is at middle of a grid box Have 3 Tags for each D3R field getting put into the column: .kaDZname .kaVRname .kaSWname .kaDRname .kaDZunits .kaVRunits .kaSWunits .kaDRunits .kaDZdata .kaVRdata .kaSWdata .kaDRdata .kaPHname .kaRHname .kaSQname .kuDZname .kaPHunits .kaRHunits .kaSQunits .kuDZunits .kaPHdata .kaRHdata .kaSQdata .kuDZdata .kuVRname .kuSWname .kuDRname .kuPHname .kuVRunits .kuSWunits .kuDRunits .kuPHunits .kuVRdata .kuSWdata .kuDRdata .kuPHdata .kuRHname .kuSQname .kuCZname .kuCRname .kuRHunits .kuSQunits .kuCZunits .kuCRunits .kuRHdata .kuSQdata .kuCZdata .kuCRdata .kuKDname .kuKDunits .kuKDdata dependencies: This .pro requires/calls the following: d3r_sweeps_to_volscan.pro utility to combine D3R .nc swps file to single volume .uf files Radx software UCAR/NCAR software for working with radar data rsl_d3r_to_radar.pro add-on to RSL_in_IDL for NASA D3R radar data d3r_combine_gridded_rhis.pro function called to handle the step for RHIs to put gridded data for each swp all into a single (volume) gridded .nc file - see details below bad2nan.pro utility to convert a flag value to NaNs -------------------------------------------------------------------------------- d3r_combine_gridded_rhis.pro: ----------------------------- Function called from within grid_d3r_for_column.pro for RHI volumes - takes the individual RHI swp Radx output .nc files & creates a single grided .nc file for the volume usage: result = d3r_combine_fridded_rhis(ka_far_dir, ka_near_dir, $ ku_far_dir, ku_near_dir) ka_far_dir: path to directory containing Radx output gridded .nc files for each D3R-Ka RHI swp at "far" ranges ka_near_dir: path to directory containing Radx output gridded .nc files for each D3R-Ka RHI swp at "near" ranges ku_far_dir: path to directory containing Radx output gridded .nc files for each D3R-Ku RHI swp at "far" ranges ku_near_dir: path to directory containing Radx output gridded .nc files for each D3R-Ku RHI swp at "near" ranges out_dir: path to directory where full grid/combined RHI vol .nc files are to be placed result: paths to combined, full grid .nc files for the RHI volume: ['/path/to/ka_file.nc','/path/to/ku_file.nc'] dependencies: This .pro requires/calls the following: bad2nan.pro utility to convert a flag value to NaNs nan2bad.pro utility to convert NaNs to a flag value -------------------------------------------------------------------------------- d3r_check_scantype.pro: ----------------------- Function to verify that input .nc sweeps for D3R Ku- & Ka- filelists are all of same type of scan (all RHI or all PPI) - ASSUMES all input scans in these lists are from the same radar volume. usage: result = d3r_check_scantype(ku_filelist, ka_filelist) ku_filelist: array of string paths to each input D3R .nc sweepfile/scan (assumed to be from the same, single radar volume) ka_filelist: array of string paths to each input D3R .nc sweepfile/scan (assumed to be from the same, single radar volume) result: Returns 1 for TRUE: scan lists are OK Returns 0 for FALSE: scan lists NOT OK Will happen if: - files in input lists do not ALL have the same scan mode (all RHI or all PPI) Returns -1 for UNKNOWN: can not fully determine: Will happen if: - input filelists have different number of Ku- and Ka- sweeps - RSL radar header value for scan_mode is not exactly 'RHI' or 'PPI' dependencies: This .pro requires/calls the following: rsl_d3r_to_radar.pro add-on to RSL_in_IDL for NASA D3R radar data -------------------------------------------------------------------------------- grid_88d_for_column.pro: ------------------------ Function grids 88D data from GPMGV DP QC'd level II data, saves full gridded file, extracts data for placement at each point in the column box grid usage: result = grid_88d_for_column(lev2_file, params_file, $ column_box_params, full_grid_dir) lev2_file: GPM-GV QC'd level II 88D data file (.uf.gz) params_file: path to pre-made .params file for use in Radx column_box_params: column box grid parameters structure full_grid_dir: path to dir for full grid Radx output result: struture containing the 88D data at each location in the column box grid (whether coloumn grid points are along or in middle of Radx/radar grid in the horizontal) Tags: ** is 2 char field ID (as in RSL) .**name: string long name of ** data field, as recorded in the Radx gridded .nc file (may be an empty string) .**units: string telling the ** data field units, as recorded in the Radx gridded .nc file (may be an empty string) .**data: QC'd 88D ** field value at locations in column grid this array is 3-D: [X x Y x Z] dims, will match col box dims middle point of column box = middle point of this array IF EVEN # OF HORIZ COLUMN GRID SUBBOXES: middle point is along an edge IF ODD # OF HORIZ COLUMB GRID SUBBOXES: middle poit is at middle of a grid box Have 3 Tags for each 88D field getting put into the column: .ZZname .CZname .DRname .RHname .PHname .KDname .SWname .ZZunits .CZunits .DRunits .RHunits .PHunits .KDunits .SWunits .ZZdata .CZdata .DRdata .RHdata .PHdata .KDdata .SWdata .VRname .RRname .RPname .RCname .D0name .NWname .FHname .VRunits .RRunits .RPunits .RCunits .D0units .NWunits .FHunits .VRdata .RRdata .RPdata .RCdata .D0data .NWdata .FHdata .N2name .DMname .N2units .DMunits .N2data .DMdata FH: hydrometeor ID field, classifications as from Dolan et al. 2013: -1: UN unclassified 1: DZ drizzle 2: RN rain 3: IC/CR ice crystals 4: AG/DS aggregates/dry snow 5: WS wet snow 6: VI vertically oriented ice 7: LDG low-density graupel 8: HDG high-density graupel 9: HA hail 10: BD big drop/melting hail When a single 88D is available: Each tag of lev2_plat_info has only 1 element col_data_88d_all is a single element structure array: col_data_88d When multiple 88Ds are available: Each tag of lev2_plat_info is an array with 1 element per available 88D col_data_88d_all is an array of structures, 1 for each 88D: Can associate which radar each element of col_data_88d_all relates to: lev2_plat_info.plat_name[i] = string site ID for radar [i] col_data_88d_all[i] = col_data_88d structure for 88D radar [i] dependencies: This .pro requires/calls the following: Radx software UCAR/NCAR software for working with radar data uncomp_file.pro utility to uncompress a .gz file bad2nan.pro utility to convert a flag value to NaNs -------------------------------------------------------------------------------- grid_dow6_for_column.pro: ------------------------ Function grids DOW6 data from OLYMPEX GHRC archive (Cfradial .nc format), saves full gridded file, extracts data subset at ea pt in column box grid Gridding in Radx: Philosophy is to set grid center, vertical & horizontal spacing values as same for column box grid, see more details in make_params_file.pro & below. Pulls out subset of data in the column box grid set up -- works whether the column box grid center is a grid point edge or a grid box middle point (if latter is the case, runs bilinear interpolation bc Radx grid edges will be at the middles of the column grid boxes) There is a renaming that happens in either RSL or Radx (think RSL) durring DOW6 data processing...field names in the original/Cf .nc are not same as field names in Radx output, but they correspond to the same field nunmber/order, so are read back in appropriately and renamed (in this module) to be consistent with field name convention used in the original/Cf .nc data files. If want/need to update SIMBA to add multiple DOW platforms, probably best to rename this module "grid_dow_for_column.pro" and treat the mutliple DOWs similar to how multiple 88Ds are handeled (see grid_88d_for_column.pro & how build_column.pro processes 1st then any additional 88D files...) usage: result = grid_dow6_for_column(dow6_plat_info, dow6_file, $ params_file, column_box_params, full_grid_dir) dow6_plat_info: plat_info structure retured by set_plat_values.pro dow6_file: path to Cfradial .nc DOW6 data file (1 volume) params_file: path to the .params file for use in Radx column_box_params: column box grid parameters structure full_grid_dir: path to dir for full grid Radx output result: structure containing the DOW6 data at each location in the column box grid (whether column grid points are along or in middle of Radx/radar grid in the horizontal) Tags: ** is field name (DOW fields names NOT same as RSL field names) .**name: string long name of ** data field, as recorded in the Radx gridded .nc file (may be an empty string) .**units: string telling the ** data field units, as recorded in the Radx gridded .nc file (or forcibly set) .**data: DOW6 ** field value at locations in column box grid this array is 3-D: [X x Y x Z] dims, will match col box dims middle point of column box = middle point of this array IF EVEN # OF HORIZ COLUMN GRID SUBBOXES: middle point is along an edge IF ODD # OF HORIZ COLUMB GRID SUBBOXES: middle poit is at middle of a grid box Have 3 Tags for each DOW6 field getting put into the column: .DBZHCname .DBZHC_Fname .DBZVCname .DBZVC_Fname .DBZHCunits .DBZHC_Funits .DBZVCunits .DBZVC_Funits .DBZHCdata .DBZHC_Fdata .DBZVCdata .DBZVC_Fdata .VRname .VR_Fname .SWname .SW_Fname .VRunits .VR_Funits .SWunits .SW_Funits .VRdata .VR_Fdata .SWdata .SW_Fdata .ZDRMname .ZDRM_Fname .ZDRCname .ZDRMunits .ZDRM_Funits .ZDRCunits .ZDRMdata .ZDRM_Fdata .ZDRCdata .RHOHVname .RHOHV_Fname .PHIDPname .PHIDP_Fname .RHOHVunits .RHOHV_Funits .PHIDPunits .PHIDP_Funits .RHOHVdata .RHOHV_Fdata .PHIDPdata .PHIDP_Fdata .KDPname .KDP_Fname .KDPunits .KDP_Funits .KDPdata .KDP_Fdata *Generally: "HC" indicates horizontal channel "VC" indicates vertical channel "_F" indicates that clutter filtering has been applied dependencies: This .pro requires/calls the following: Radx software UCAR/NCAR software for working with radar data RSL in IDL NASA TRMM/PMM library/package rsl_cfradial_to_radar.pro add-on to RSL_in_IDL for cfradial radar data bad2nan.pro utility to convert a flag value to NaNs -------------------------------------------------------------------------------- get_apu_for_column.pro: ------------------------ Function reads all files in the APU dir set (apu_dir in build_column.pro) and for each available APU: determines if the unit is located within the column box, if it is, locate parameters recorded at the main_plat timestamp. Creates a 4-D array [time x X x Y x Z] dims to match col box dims, populates the APU parameters at the ground location of available APU(s) in the box. Time dimension determined by halftime_interval. NOTE: APU values are ALWAYS set at LOWEST vertical grid level in column grid to indicate values are at the surface - depending on topography of the observation domain, this may or may not actually be nearest the lowest vertical grid level. For example: An APU unit may make observations at a site elevation of 500 m. In the SIMBA column .nc file, the values from this unit will be placed at the lowest column grid level, even if there is a column grid vertical level above corresponding to 500 m. NOTE: MUST HAVE CORRECT APU LOCATIONS SET IN platform_location.pro -CURRENTLY: supports/assumes have input from Ali Tokay's files: apu##_raindsd_min.[olympex] apu##_raindsd_min_ter.[olympex] apu##_rainparameter_min.[olympex] apu##_rainparameter_min_ter.[wallops] apu##_reflectivity_ter.[wallops] apu##_attenuation_ter.[wallops] .[place] indicates location/campaign -Data are included in a time interval centered on the main_plat timestamp and extending hafltime_interval minutes both BEFORE & AFTER the main_plat time. The halftime_interval parameter is set in build_column.pro. Values are stored in lowest vertical grid level, with total of 4 dimensions: [ time in interval, column x-dir, column y-dir, column z-dir ] Time dimension: each element incremented by 1-min first element = main platform time - halftime_interval minutes middle-1 element = main platform time - 1 minute middle element = main platform time middle+1 element = main platform time + 1 minute last element = main platform time + halftime_interval minutes usage: result = get_apu_for_column(column_box_params, apu_dir, $ main_plat_info, halftime_interval) column_box_params: column box grid params, returned by define_box.pro apu_dir: string dir path to APU files for present case main_plat_info: main_plat_info returned by set_main_plat_values.pro halftime_interval: integer # of mins before & after the main platform time to include in column file result: one structure (apu_info_and_data) with structures: Tags: .apu_plat_info: this tag is itself a structure: Each tag will be an array with 1 element corresponding to each available APU located within the col box. Tags are as returned from set_plat_values.pro: .lat_d array of each APU's lat degrees .lat_m array of each APU's lat minutes .lat_s array of each APU's lat seconds .lon_d array of each APU's lon degrees .lon_m array of each APU's lon minutes .lon_s array of each APU's lon seconds .plat_name array APU names - will tell which ##, eg: apu11 .plat_type will be 'APU' for all elements .operation_mode will be 'APU' for all elements .timestamp 15 char string timestamp for center of time interval contained in the column file .offset_vs_main: int/long # of seconds time offset vs main_plat .time_interval_width: int # of mins before & after main_plat time included .col_data_apu_*: These tags are each either structures or = -1. If the data file type is available, then the tag will be a structure will the data from that file set into the column grid. If the data file type is not available, then the tag will be -1. Have one for each type of file from Ali Tokay. In each: Field Tags: 4-D dims, match time + column box dimensions Units Tags: strings describing units for ea field .col_data_apu_rain: fields from _rainparameter_min. files **These values are based on measured drop fall speeds.** .total_n_drops .total_concentration .liqwater_content .rainrate .ref_inRayleigh .massweightdiam .maximumdiam .units_n_drops .units_concentration .units_liqwatercontent .units_rainrate .units_ref_inRayleigh .units_massweight_diam .units_maximum_diam .col_data_apu_rain_ter: fields from _rainparameter_min_ter. files ****** These values are based on drop terminal fall speeds. ****** ** "tfs_" preceeding variable names means "terminal fall speed" ** .tfs_total_n_drops .tfs_total_concentration .tfs_liqwater_content .tfs_rainrate .tfs_ref_inRayleigh .tfs_massweightdiam .tfs_maximumdiam .units_n_drops .units_concentration .units_liqwatercontent .units_rainrate .units_ref_inRayleigh .units_massweight_diam .units_maximum_diam .col_data_apu_dsd: fields from _raindsd_min. files .bin_## for bins 01-32, drop concentration .diameter_bin## for bins 01-32, bin middle diameter .width_bin## for bins 01-32, bin widths .units_bin_drop_concen [drops m^-3 mm^-1] .units_binDiameter_andWidth [mm] .col_data_apu_dsd_ter: fields from _raindsd_min_ter. files ****** These values are based on drop terminal fall speeds. ****** ** "tfs_" preceeding variable names means "terminal fall speed" ** .tfs_bin_## for bins 01-32, drop concentration .diameter_bin## for bins 01-32, bin middle diameter .width_bin## for bins 01-32, bin widths .units_bin_drop_concen [drops m^-3 mm^-1] .units_binDiameter_andWidth [mm] .col_data_apu_reflectivity: fields from _reflectivity_ files .rainrate .ref_inRayleigh .ref_atS .ref_atC .ref_atX .ref_atKu .ref_atK .ref_atKa .ref_atW .units_rainrate .units_all_refs .col_data_apu_attenuation: fields from _attenuation_ files .rainrate .attenS .attenC .attenX .attenKu .attenK .attenKa .attenW .units_rainrate .units_all_attens dependencies: This .pro requires/calls the following: dms2dd.pro utility to convert deg-min-sec to decimal degrees jd2time.pro IDL Coyote utility to convert from Julian day closest.pro utility to locate value in an array nearest input value -------------------------------------------------------------------------------- get_2dvd_for_column.pro: ------------------------ Function reads in all files in the input 2DVD dir. For each available unit: Determines if the unit is located within the column box, if it is, locate parameters recorded at the main_plat timestamp. Creates 4-D arrays w/ dims to match column grid & time interval as set with halftime_interval, populates with the 2DVD fields at lowest vertical grid level in the column grid. NOTE: 2DVD values are ALWAYS set at LOWEST vertical level in column grid to indicate values are at the surface - depending on topography of the observation domain, this may or may not actually be nearest the lowest vertical grid level. For example: An 2DVD unit may make observations at a site elevation of 500 m. In the SIMBA column .nc file, the values from this unit will be placed at the lowest column grid level, even if there is a column grid vertical level above corresponding to 500 m. NOTE: MUST HAVE CORRECT 2DVD LOCATIONS SET IN platform_location.pro * Files/col_data structures with "_ter": these values are computed assuming the terminal fall speed, rather than observed fall speed * Files w/ "_50", or w/o "_50": these values are computed by first applying a fileter to elimiate drops with fall speeds beyond +/-50% the terminal fall speed (tfs) * Files w/ "_100%": these values are computed using all (100%) of the observed drops, no tfs filtering has been applied ** See Tokay et al. 2001 (JAM) article for more details on method Ali applies to create the 2DVD processed data files -CURRENTLY: supports/assumes have input in files from Ali Tokay's: *sn##_dropcount* 2dvd_sn##_raindsd.* OR 2dvd_sn##_raindsd_50* 2dvd_sn##_raindsd_ter* 2dvd_sn##_rainparameter.* OR 2dvd_sn##_rainparameter_50* 2dvd_sn##_rainparameter_ter* 2dvd_sn##_multifreq_attenuation_ter* 2dvd_sn##_multifreq_reflectivity_ter* also supports (for OLYMPEX campaign): 2dvd_sn##_raindsd_100%. 2dvd_sn##_raindsd_100%_ter. 2dvd_sn##_rainparameter_100%. 2dvd_sn##_rainparameter_100%_ter. -Data are included in a time interval centered on the main_plat timestamp and extending hafltime_interval minutes both BEFORE & AFTER the main_plat time. The halftime_interval parameter is set in build_column.pro. Values are stored in lowest vertical grid level, with total of 4 dimensions: [ time in interval, column x-dir, column y-dir, column z-dir ] Time dimension: each element incremented by 1-min first element = main platform time - halftime_interval minutes middle-1 element = main platform time - 1 minute middle element = main platform time middle+1 element = main platform time + 1 minute last element = main platform time + halftime_interval minutes usage: result = get_2dvd_for_column(column_box_params, two_dvd_dir, $ main_plat_info, halftime_interval) column_box_params: column box grid params, returned by define_box.pro two_dvd_dir: string dir path to 2DVD files for present case main_plat_info: main_plat_info returned by set_main_plat_values.pro halftime_interval: integer # of mins before & after the main plat time to include in column file result: one structure (two_dvd_info_and_data) with structures: Tags: .two_dvd_plat_info: this tag is itself a structure: Each tag will be an array with 1 element corresponding to each available 2DVD located within the col box. Tags are as returned from set_plat_values.pro: .lat_d array of each 2DVD's lat degrees .lat_m array of each 2DVD's lat minutes .lat_s array of each 2DVD's lat seconds .lon_d array of each 2DVD's lon degrees .lon_m array of each 2DVD's lon minutes .lon_s array of each 2DVD's lon seconds .plat_name array 2DVD names - will tell which ##, eg: sn25 .plat_type will be '2DVD' for all elements .operation_mode will be '2DVD' for all elements .timestamp 15 char string timestamp for center of time interval contained in the column file .offset_vs_main: int/long # of seconds time offset vs main_plat .time_interval_width: int # of mins before & after main_plat time included .col_data_2dvd_*: these tags are each themselves structures or =-1. If the data file type is available, then the tag will be a structure with the data from that file set in column grid. If the data file type is not available, then the tag will be set to -1, not a structure. Have one for each type of file from Ali Tokay. In each: Field Tags: 4-D dims, match time + column box dimensions Units Tags: strings describing units for ea field .col_data_2dvd_dropcounts: fields from Ali's *sn##_dropcount* files .dropcount_## for bin numbers 01-50 (50 tags) [number of drops] per 0.2 mm width diameter bin: bin01 D < 0.2mm bin02 0.2 mm < D < 0.4mm ... ... bin50 9.6mm < D < 10.0 mm .units_dropcount [number of drops] .col_data_2dvd_raindsd: fields from 2dvd_sn##_raindsd[_50].* files ****** Filtering for drops w/in +/-50% tfs has been applied ****** ****** These values are based on measured drop fall speeds. ****** .concen_## for bin numbers 01-50 (50 tags) drop concentration per 0.2 mm width bin: bin01 D < 0.2mm bin02 0.2 mm < D < 0.4mm ... ... bin50 9.6mm < D < 10.0 mm .units_concentration [drops m^-3 of air mm^-1 bin] .col_data_2dvd_raindsd_100: fields from 2dvd_sn##_raindsd_100%.* files ****** No filtering- all drops have been included in the file ****** ****** These values are based on measured drop fall speeds. ****** .concen_## for bin numbers 01-50 (50 tags) drop concentration per 0.2 mm width bin: bin01 D < 0.2mm bin02 0.2 mm < D < 0.4mm ... ... bin50 9.6mm < D < 10.0 mm .units_concentration [drops m^-3 of air mm^-1 bin] .col_data_2dvd_raindsd_ter: fields from 2dvd_sn##_raindsd_ter.* files ****** These values are based on drop terminal fall speeds. ****** **** "ter_" in the variable names means "terminal fall speed" **** .concen_ter_## for bin numbers 01-50 (50 tags) drop concentration per 0.2 mm width bin: bin01 D < 0.2mm bin02 0.2 mm < D < 0.4mm ... ... bin50 9.6mm < D < 10.0 mm .units_concentration [drops m^-3 of air mm^-1 bin] .col_data_2dvd_raindsd_100_ter: fields from 2dvd_sn##_raindsd_100%_ter.* files ****** No filtering- all drops have been included in the file ****** ****** These values are based on drop terminal fall speeds. ****** **** "ter_" in the variable names means "terminal fall speed" **** .concen_ter_## for bin numbers 01-50 (50 tags) drop concentration per 0.2 mm width bin: bin01 D < 0.2mm bin02 0.2 mm < D < 0.4mm ... ... bin50 9.6mm < D < 10.0 mm .units_concentration [drops m^-3 of air mm^-1 bin] .col_data_2dvd_rainparam: fields from 2dvd_sn##_rainparameter[_50].* ****** Filtering for drops w/in +/-50% tfs has been applied ****** ****** These values are based on measured drop fall speeds. ****** .tot_ndrops .units_ndrops [number of drops] .tot_concen .units_concen [drops m^-3 of air] .LWC .units_LWC [g m^-3] .rainrate .units_rainrate [mm h^-1] .refRayleigh .units_refRayleigh [dBZ] .Dm .units_Dm [mm] .Dmax .units_Dmax [mm] .Dmin .units_Dmin [mm] .stdevDm .stdevDm [mm] .col_data_2dvd_rainparam_100: from 2dvd_sn##_rainparameter_100%.* ****** No filtering- all drops have been included in the file ****** ****** These values are based on measured drop fall speeds. ****** .tot_ndrops .units_ndrops [number of drops] .tot_concen .units_concen [drops m^-3 of air] .LWC .units_LWC [g m^-3] .rainrate .units_rainrate [mm h^-1] .refRayleigh .units_refRayleigh [dBZ] .Dm .units_Dm [mm] .Dmax .units_Dmax [mm] .Dmin .units_Dmin [mm] .stdevDm .stdevDm [mm] .col_data_2dvd_rainparam_ter: from 2dvd_sn##_rainparameter[50]_ter.* ****** Filtering for drops w/in +/-50% tfs has been applied ****** ****** These values are based on drop terminal fall speeds. ****** **** "ter_" in the variable names means "terminal fall speed" **** .tot_ndrops .units_ndrops [number of drops] .tot_concen .units_concen [drops m^-3 of air] .LWC .units_LWC [g m^-3] .rainrate .units_rainrate [mm h^-1] .refRayleigh .units_refRayleigh [dBZ] .Dm .units_Dm [mm] .Dmax .units_Dmax [mm] .Dmin .units_Dmin [mm] .stdevDm .stdevDm [mm] .col_data_2dvd_rainparam_100_ter: from 2dvd_sn##_rainparameter_100%_ter.* ****** No filtering- all drops have been included in the file ****** ****** These values are based on drop terminal fall speeds. ****** **** "ter_" in the variable names means "terminal fall speed" **** .tot_ndrops .units_ndrops [number of drops] .tot_concen .units_concen [drops m^-3 of air] .LWC .units_LWC [g m^-3] .rainrate .units_rainrate [mm h^-1] .refRayleigh .units_refRayleigh [dBZ] .Dm .units_Dm [mm] .Dmax .units_Dmax [mm] .Dmin .units_Dmin [mm] .stdevDm .stdevDm [mm] .col_data_2dvd_atten: fields from 2dvd_sn##_multifreq_attenuation_ter* .rainrate .atten_S_band .units_rainrate [mm h^-1] .atten_C_band .units_all_attens [dB km^-1] .atten_X_band .atten_Ku_band .atten_K_band .atten_Ka_band .atten_W_band .col_data_2dvd_ref: fields from 2dvd_sn##_multifreq_reflectivity_ter* .rainrate .ref_S_band .units_rainrate [mm h^-1] .ref_C_band .units_all_refs [dB km^-1] .ref_X_band .ref_Ku_band .ref_K_band .ref_Ka_band .ref_W_band dependencies: This .pro requires/calls the following: dms2dd.pro utility to convert deg-min-sec to decimal degrees jd2time.pro IDL Coyote utility to convert from Julian day closest.pro utility to locate value in an array nearest input value -------------------------------------------------------------------------------- get_pluvio_for_column.pro: -------------------------- Function reads in pluvio data files (processed by Ali Tokay). If any pluvio units are located within the column box grid, and have data available at the time of interest, pulls the precipitation rate information. Creates 4-D arrays w/ dims to match column box grid and time dimension determined by halftime_interval, populates these new arrays with pluvio precipitaion rates NOTE: Pluvio values are ALWAYS set at LOWEST vertical level in column grid to indicate values are at the surface - depending on topography of the observation domain, this may or may not actually be nearest the lowest vertical grid level. For example: A Pluvio unit may make observations at a site elevation of 500 m. In the SIMBA column .nc file, the values from this unit will be placed at the lowest column grid level, even if there is a column grid vertical level above corresponding to 500 m. NOTE: MUST HAVE CORRECT PLUVIO LOCATIONS SET IN platform_location.pro -CURRENTLY: supports/assumes input is data files processed by Ali Tokay: *_pluvio*_MMYYYY_preciprate.* usage: result = get_pluvio_for_column(column_box_params, pluvio_dir, $ main_plat_info, halftime_interval) column_box_params: column box grid params, returned by define_box.pro pluvio_dir: string dir path to pluvio files w/ times for the present case main_plat_info: main_plat_info returned by set_main_plat_values.pro halftime_interval: integer # of mins before & after the main platform time to include in column file result: one structure if pluvio data is available, or -1 if it is not. pluvio_info_and_data: returned strucutre if pluvio data is available Tags: .pluvio_plat_info This tag is itself a structure: Each tag will be an array with 1 element corresponding to each available Pluvio unit located within the col box. Tags are as returned from set_plat_values.pro: .lat_d array of each Pluvio's lat degrees .lat_m array of each Pluvio's lat minutes .lat_s array of each Pluvio's lat seconds .lon_d array of each Pluvio's lon degrees .lon_m array of each Pluvio's lon minutes .lon_s array of each Pluvio's lon seconds .plat_name array Pluvio names - usually will be an APU loc .plat_type will be 'pluvio' for all elements .operation_mode will be 'pluvio' for all elements .timestamp 15 char string timestamp for center of time interval contained in the column file .offset_vs_main: int/long # of seconds time offset vs main_plat .time_interval_width: int # of mins before & after main_plat time included .col_data_pluvio: This tag is itself a structure: Tags are for the pluvio preciprate file fields: .pluvio_preciprate_mm_per_min: precipitation rates in [mm/min] 4-D (time + column grid dims) array of values for pluvio precipitation rate data, only populated at lowest vertical level [z dim: 0] .pluvio_preciprate_mm_per_hr: precipitation rates in [mm/h] 4-D (time + column grid dims) array of values for pluvio precipitation rate data, only populated at lowest vertical level [z dim: 0] dependencies: This .pro requires/calls the following: dms2dd.pro utility to convert deg-min-sec to decimal degrees jd2time.pro IDL Coyote utility to convert from Julian day closest.pro utility to locate value in an array nearest input value -------------------------------------------------------------------------------- get_gauges_for_column.pro: -------------------------- Function reads in .gmin gauge data files and for gauges located witin column box, pulls the rainrate information. Creates 4-D array with dims to match column grid and time dimension as determined by halftime_interval, populates with rainrates from gauges within the column box. -CURRENTLY: supports/assumes have input in the GMIN files from Jerry Wang (Wang et al. 2008, JTECH), available at: http://gpm-gv.gsfc.nasa.gov/Gauge/index.html - OR - on GSFC "Hector" machine at: /gpmraid/gpmarchive/Gauge/ usage: result = get_gauges_for_column(column_box_params, gauge_dir, $ main_plat_info, halftime_interval) column_box_params: column box grid params, returned by define_box.pro gauge_dir: string dir path to .gmin files w/ times for the present case main_plat_info: main_plat_info returned by set_main_plat_values.pro halftime_interval: integer # of mins before & after the main platform time to include in column file result: -1 if no gauges located within the column grid box, otherwise one structure (gauges_info_and_data) with sub-structures: Tags: .gauges_plat_info This tag is itself a structure: Each tag will be an array with 1 element corresponding to each available gauge located within the column box. Tags are as would be returned from set_plat_values.pro (though for this module, unlike unlike most of the others, that function is not actaully called). .lat_d array of each gauge's lat degrees .lat_m array of each gauge's lat minutes .lat_s array of each gauge's lat seconds .lon_d array of each gauge's lon degrees .lon_m array of each gauge's lon minutes .lon_s array of each gauge's lon seconds .plat_name array of each gauge name, eg: 'WFF-0002_PAD2' .plat_type will be 'gauge' for all elements .operation_mode will be 'gmin_gauge' for all elements .timestamp 15 char string timestamp for center of time interval contained in the column file .offset_vs_main: int/long # of seconds time offset vs main_plat .time_interval_width: int # of mins before & after main_plat time included .col_data_gauges This tag is itself a structure: .gauges_rainrate 4-D (time + column grid dims) array of values for gauge-based rain rate data, only populated at the surface [z dim: 0] .units_rainrate [mm h^-1] dependencies: This .pro requires/calls the following: dd2dms.pro utility to convert decimal degrees to deg-min-sec dms2dd.pro utility to convert deg-min-sec to decimal degrees closest.pro utility to locate value in an array nearest input value -------------------------------------------------------------------------------- get_mrr_for_column.pro: ------------------------ Function reads in MRR data file(s), extracts vertical profile of values at times matching the main_plat's timestamp and +/- the halftime_interval. Computes the Dm, Nw profile from MRR DSD size bins & drop densities for original MRR gates and returns the Dm & Nw profiles interpolated to match the column grid vertical levels. IMPORTANT! MRR location(s) must be maually set in platform_location.pro bc the instrument's data file contains NO LOCATION INFORMATION - thus, it is assumed that if a file_mrr_*** path is set, the MRR is within the column box grid. -CURRENTLY: reads in .ave data file(s) generated by MRR02 vendor provided processing software, assumed using typical NASA MRR avg interval (60 s) -Data are included in a time interval centered on the main_plat timestamp and extending hafltime_interval minutes both BEFORE & AFTER the main_plat time. The halftime_interval parameter is set in build_column.pro. Values are stored in lowest vertical grid level, with total of 4 dimensions: [ time in interval, column x-dir, column y-dir, column z-dir ] Time dimension: each element incremented by 1-min first element = main platform time - halftime_interval minutes middle-1 element = main platform time - 1 minute middle element = main platform time middle+1 element = main platform time + 1 minute last element = main platform time + halftime_interval minutes usage: result = get_mrr_for_column(column_box_params, mrr_IDs, files_mrr, $ main_plat_info, halftime_interval) column_box_params: column box grid params, returned by define_box.pro mrr_IDs: string array of MRR unit name(s), eg: 'MRR-01' files_mrr: string array of paths to input MRR .ave files, NOTE: the corresponding mrr_IDs & files_mrr MUST be for the same MRR UNIT!, ie: if mrr_IDs[1] = 'MRR-02' then files_mrr[1] = path to .ave for mrr2-02 main_plat_info: main_plat_info returned by set_main_plat_values.pro halftime_interval: integer # of mins before & after the main platform time to include in column file result: one structure (mrr_info_and_data) with substructures: Tags: .mrr_plat_info: this tag is itself a structure, and if > 1 MRR unit in the column grid box, each tag will be an array .lat_d MRR latitude degrees .lat_m MRR latitude minutes .lat_s MRR latitude seconds .lon_d MRR longitude degrees .lon_m MRR longitude minutes .lon_s MRR longitude seconds .elev MRR unit elevation [m] .plat_name ID name for the MRR, eg: 'MRR-01' .plat_type will be 'MRR' for MRR platform .operation_mode will be 'MRR' for MRR platform .wavelength MRR operating wavelength [m] .frequency MRR operating frequency [GHz] .beam_width MRR beam width [deg] .gate_size MRR original gate size [m] .timestamp: 15 char 'YYYYMMDD_HHMMSS' timestamp for center of time interval contained in the column file. Set in here, assumes year is AFTER 1990. .offset_vs_main int # of seconds time offset vs main_plat POSITIVE OFFSET: MRR time LATER than main_plat NEGATIVE OFFSET: MRR time EARLIER than main_plat Set in here - for MRR, time tags set after read in file, not in the set_plat_values.pro function .time_interval_width: int # of mins before & after main_plat time included .col_data_mrr: this tag is itself a structure: Field Tags: 4-D dims, match time + column box dimensions .PIA 2-way path integrated attenuation due to rain drop [dB] .aRef attenuated reflectivity factor [dBZ] .ref reflectivity factor, corrected for attenuation [dBZ] .RR rainrate [mm h^-1] .LWC liquid water content [g m^-3] .WVEL velocity (CAPITAL W) [m/s] .disdro_Dm Dm computed from drop densities in 64 size bins [mm] .disdro_Nw Nw computed from drop densities in 64 size bins [log(Nw)] .disdro_Z Z computed from drop densities in 64 size bins [dBZ] Units/Info Tags: 1-D, are strings or ints .name_PIA .name_aRef .name_ref .name_RR .name_LWC .name_WVEL .name_disdro_Z .name_disdro_Dm .name_disdro_Nw .units_PIA .units_aRef .units_ref .units_RR .units_LWC .units_WVEL .units_disdro_Z .units_disdro_Dm .units_disdro_Nw .data_quality dependencies: This .pro requires/calls the following: dms2dd.pro utility to convert deg-min-sec to decimal degrees closest.pro utility to locate values in an array nearest input value disdro_mrr_get_dsd_params.pro These functions by Partick Gatlin com- disdro_fit_dsd_norm_gamma.pro pute Dm, Nw, & Z from MRR DSD profiles -------------------------------------------------------------------------------- read_data_mrr.pro: ------------------ Function to read in data from an MRR .ave file and return it as a structure. This .pro file also includes the Function template_mrr_ave which defines the ASCII template for use with IDL's READ_ASCII to read in the MRR file. usage: result = read_data_mrr(file_mrr) file_mrr: path to an MRR .ave file result: structure containing the MRR data Tags: .timestamp: string array, 1 element per time, YYMMDDHHMMSS .avg_interval_sec: string, # of sec in the avg interval used for file .gate_size_m: string, [m] interval of gate sizes .radar_alt_mASL: string, [m] height of the MRR platform ASL .samp_rate_hz: float, sampling rate [Hz] .gate_hts_m: int array, list of gate heights in [m] .data_quality: int array, data quality values, 0-100, higher=better All of these tags have [TIME x HT] dimensions: .mrrD##: for D00-D63, median drop size of bin [mm] .mrrN##: for N00-N63, drop densities for ea bin [m^-3 mm^-1] .PIA: path integrated attenuation [dB] .attenRef: attenuated reflectivity [dBZ] .ref: reflectivity w/ attenuation correction applied [dBZ] .rainRate: rainrate [mm h^-1] .LWC: liquid water content [g m^-3] .velocity: falling velocity (really CAPITAL W) [m/s] NOTES: (1) see MRR documentation for caveats on data items, particularly the velocity field. (2) can take this a while to run for long .ave files. -------------------------------------------------------------------------------- get_gprofgmi_for_column.pro: ----------------------- Function to read in LEVEL 2 data from the GPM GMI and return subset of parameters located within the column grid box. IMPORTANT! this function is set up to use the Level 2 GPROF GMI (.HDF5) data available from the NASA Precipitation Processing System at: https://pps.gsfc.nasa.gov/ NOTE: While integrated GPROF product fields are supported in SIMBA, the recovery of values for each hydrometeor species for each GPROF layer has not been fully implemented yet. See the "profileScale" section in the lastest NASA PPS 2AGPROFGMI FileSpecifcation document for more information. usage: result = get_gprofgmi_for_column(column_box_params, 2AGPROFGMI_file, $ main_plat_info) column_box_params: column box grid params, returned by define_box.pro 2AGPROFGMI_file: path to Level 2 GPROF GMI file (.HDF5 format) main_plat_info: main_plat_info returned by set_main_plat_values.pro result: one structure (gmi_info_and_data) with substructures: Tags: .gmi_plat_info: this tag is itself a structure: .plat_name: string ID of platform: 'GMI' .plat_type: string label for plat type: 'GMI' .frequency: string of the GMI operating frequencies [GHz] .file_type: string ID of data level/file type, eg: '2A-CS-CONUS' .algortihm: algo name as from PPS filename, eg: 'GPROF2014v2-0' .orbit_num: orbit number as from PPS filename .data_version:version number of the dataset, follows PPS convention, eg: 'V04A' or 'V05A' .timestamp: 15 char timestamp of pixel including/closest to the main_plat's lat/lon location .offset_vs_main: int # of seconds time offset vs main_plat POSITIVE OFFSET: GMI OP time LATER than main_plat NEGATIVE OFFSET: GMI OP time EARLIER than main_plat .timestamp_cntr: 15 char timestamp of pixel including/closest to the column box center location .col_data_gmi: this tag is itself a structure: For each GPROF GMI field: .data_[field] tags: column grid dims, values at ea col grid point .name_[field] tags: string name describing the parameter .units_[field] tags: string describing units for the data values Fields are: qualityFlag generalized data quality indicator, from 2AGPROF file: 0: high - retrieval is good 1: medium - can use but with high caution 2: low - data is bad for quantitative use -99: missing sunGlintAnlge angle between the sun and instrument viewing direction as reflected off Earth sruface. When this is zero, instrument views center of the sun's reflection. ranges 0-127 deg [deg] -88: sun is below the horizon -99: missing value sfcTypeIndex surface type from catagories as: 1: ocean 2: sea ice 3: maximum vegetation 4: high vegetation 5: moderate vegetation 6: low vegetation 7: minimal vegetation 8: maximum snow 9: moderate snow 10: low snow 11: minimal snow 12: standing water & rivers 13: water/land coast boundary 14: water/ice boundary 15: land/ice boundary -99: missing value totalPWater total precipitable water [kg m^-2] (or [mm]) sfcPrecip surface precipiation rate [mm h^-1] POP propability of precipitation [0-100%] mostLikePrecip most likely surface precipitation rate, this is the precip rate w/ value nearest the Tb in the Bayesian retrieval [mm h^-1] precip1stTer surface precipitation rate at 1st tertiary of the precipitation distrubution [mm h^-1] precip2ndTer surface precipitation rate at 2nd tertiary of the precipitation distrubution [mm h^-1] rainWaterPath total integrated rain water [kg m^-2] (or [mm]) cloudWaterPath total integrated cloud liquid water [kg m^-2] (or [mm]) iceWaterPath total integrated cloud ice water [kg m^-2] (or [mm]) FIELDS SPECIFIC FOR V04A: sfcSkinTemp suface temperature [K] mixedWaterPath total integrated mixed phase water [kg m^-2] (or [mm]) liquidPrecipFrac fraction of surface precip that is liquid [value 0-1] convecPrecipFrac fraction of surface precip that is convective [value 0-1] FIELDS SPECIFIC FOR V05A: L1CqualityFlag pixel quality for GPROF input data [0 is best] CAPE_index model derived cape index (all set to missing in V05 as of 8 May 2017) [values 1-5] frozenPrecip instantaneous frozen precip rate at the sfc [mm h^-1] convectivePrecip instantaneous convective precip rate at sfc [mm h^-1] dependencies: This .pro requires/calls the following: read_2agprofgmi_hdf5.pro utility/lib to read GPM satellite products rsl_posn_to_azm_range.pro utility computes azimuth & distance in [m] between input lat/lon points bad2nan.pro utility to convert a flag value to NaNs -------------------------------------------------------------------------------- get_lev1cgmi_for_column.pro: ----------------------- Function to read in LEVEL 1C data from the GPM GMI and return subset of parameters located within the column grid box. IMPORTANT! this function is set up to use the Level 1C GMI (.HDF5) data available from the NASA Precipitation Processing System at: https://pps.gsfc.nasa.gov/ NOTE: currently, timestamps are set using the S1 swath (10-89 GHz channels) usage: result = get_lev1cgmi_for_column(column_box_params, lev1C-GMI_file,$ main_plat_info, column_grid_horiz_limit, $ column_grid_horiz_spacing) column_box_params: column box grid params, returned by define_box.pro lev1C-RGMI_file: path to Level 2 GPROF GMI file (.HDF5 format) main_plat_info: main_plat_info returned by set_main_plat_values.pro column_grid_horiz_limit: total horizontal extent of column grid in [m] column_grid_horiz_spacing: column grid spacing in horiz directions [m] result: one structure (gmi_info_and_data) with substructures: Tags: .gmi_plat_info: this tag is itself a structure: .plat_name: string ID of platform: 'GMI' .plat_type: string label for plat type: 'GMI' .frequency: string of the GMI operating frequencies [GHz] .file_type: string ID of data level/file type, eg: '2A-CS-CONUS' .algortihm: algo name as from PPS filename, eg: 'GPROF2014v2-0' .orbit_num: orbit number as from PPS filename .data_version:version number of the dataset, follows PPS convention, eg: 'V04A' .timestamp: 15 char timestamp of pixel including/closest to the main_plat's lat/lon location .offset_vs_main: int # of seconds time offset vs main_plat POSITIVE OFFSET: GMI OP time LATER than main_plat NEGATIVE OFFSET: GMI OP time EARLIER than main_plat .timestamp_cntr: 15 char timestamp of pixel including/closest to the column box center location .col_data_gmi: this tag is itself a structure: For each L1C GMI field: .name_quality: string name describing quality parameters .units_quality: string describing units for quality parameters .name_incAng: string name describing incidence angle parameters .units_incAng: string describing units for incidence angle parameters .name_sunGlint: string name describing sun glint angle parameters .units_sunGlint: string describing units for sun glint angle parameters .units_tc: string describing units for calibrated GMI brightness temperatures [K] additional tags for ea field: .data_[field] tags: column grid dims, values at ea col grid point .name_[field] tags: string name describing the parameter Fields are: quality_s1 quality flag for S1 swath (10-89 GHz channels) = 0: best quality > 0: caution < 0: major issues quality_s2 quality flag for S2 swath (166-183 GHz channels) = 0: best quality > 0: caution < 0: major issues incAng[_*_#] Earth incidence angle, for each channel at * frequency, # polarization sunGlint[_*_#] sun glint angle at * frequency, # polarization -88: sun is below horizon for incAng & sunGlint: [_*_#] will be: _107_V 10.7 GHz, vertical polarization channel _107_H 10.7 GHz, horizontal polarization channel _187_V 18.7 GHz, vertical polarization channel _187_H 18.7 GHz, horizontal polarization channel _238_V 23.8 GHz, vertical polarization channel _365_V 36.5 GHz, vertical polarization channel _365_H 36.5 GHz, horizontal polarization channel _890_V 89.0 GHz, vertical polarization channel _890_H 89.0 GHz, horizontal polarization channel _166_V 166.0 GHz, vertical polarization channel _166_H 166.0 GHz, horizontal polarization channel _183_3_V 183.3+/-3 GHz, vertical polarization channel _183_8_V 183.3+/-8 GHz, vertical polarization channel tc[*_*_#] calibrated GMI brightness temperatures [K] at column grid point locations. [*_*_#] will be: 10_7_V 10.7 GHz, vertical polarization channel 10_7_H 10.7 GHz, horizontal polarization channel 18_7_V 18.7 GHz, vertical polarization channel 18_7_H 18.7 GHz, horizontal polarization channel 23_8_V 23.8 GHz, vertical polarization channel 36_5_V 36.5 GHz, vertical polarization channel 36_5_H 36.5 GHz, horizontal polarization channel 89_0_V 89.0 GHz, vertical polarization channel 89_0_H 89.0 GHz, horizontal polarization channel 166_0_V 166.0 GHz, vertical polarization channel 166_0_H 166.0 GHz, horizontal polarization channel 183pm3_V 183.3+/-3 GHz, vertical polarization channel 183pm8_V 183.3+/-8 GHz, vertical polarization channel dependencies: This .pro requires/calls the following: read_1cgmi_hdf5.pro utility/lib to read GPM satellite products rsl_posn_to_azm_range.pro utility computes azimuth & distance in [m] between input lat/lon points bad2nan.pro utility to convert a flag value to NaNs -------------------------------------------------------------------------------- get_dpr_for_column.pro: ----------------------- Function to read in LEVEL 2 (2ADPR) data from the GPM DPR and return subset of parameters located within the column grid box. IMPORTANT! this function is set up to use the Level 2 "2ADPR" (.HDF5) data available from the NASA Precipitation Processing System at: https://pps.gsfc.nasa.gov/ usage: result = get_dpr_for_column(column_box_params, file_dpr, $ main_plat_info, column_grid_horiz_limit, $ column_grid_horiz_spacing) column_box_params: column box grid params, returned by define_box.pro file_dpr: path to Level 2 GPM DPR file (.HDF5 format) main_plat_info: main_plat_info returned by set_main_plat_values.pro result: one structure (dpr_info_and_data) with substructures: Tags: .dpr_plat_info: this tag is itself a structure: .plat_name: string ID of platform: 'DPR' .plat_type: string label for plat type: 'DPR' .frequency: string of the DPR operating frequencies [GHz] .file_type: string ID of data level/file type, eg: '2A-CS-CONUS' .algortihm: algo name as from PPS filename, eg: 'V6-20160118' .orbit_num: orbit number as from PPS filename .data_version:version number of the dataset, follows PPS convention, eg: 'V04A' .timestamp: 15 char timestamp of pixel including/closest to the main_plat's lat/lon location .offset_vs_main: int # of seconds time offset vs main_plat POSITIVE OFFSET: DPR OP time LATER than main_plat NEGATIVE OFFSET: DPR OP time EARLIER than main_plat .timestamp_cntr: 15 char timestamp of pixel including/closest to the column box center location .col_data_dpr: this tag is itself a structure: For each 2ADPR field have tags: [#S]: HS, NS, or MS scan swath [field]: which field the array is for .data_[#S]_[field]: column grid dims, values at ea col grid point .name_[#S]_[field]: string name describing the parameter .units_[#S]_[field]: string describing units for the data values Fields are: _[#S]_sfcType land surface type 0-99: ocean 100-199: land 200-299: coast 300-399: inland water _[#S]_flagPrecip precip vs no precip flag 0: no precip by either Ka & Ku 1: precip by Ka, not by Ku 10: precip by Ku, not by Ka 11: precip by both Ka & Ku _[#S]_htStormTop height of storm top [m] _[#S]_htZeroDeg height of freezing level (0 deg C) [m] _[#S]_flagBB flag for BB exists or not 0: no bright band 1: BB in Ku & DFRm 2: BB in Ku only 3: BB in DFRm only -1111: no rain/no BB _[#S]_htBB height of the bright band [m] _[#S]_widthBB width of bright band [m], but -1111.1 mean no precip _[#S]_qualtiyBB general quality of BB signature 1: clear BB 0: no BB detected in rain 2: "not so clear" BB 3: "smeared" BB _[#S]_typePrecip 8 character precip description abcdefgh a = typePrecip/10000000 1: stratiform 2: convective 3: other *see FileSpec documentation for more on the other (b-h) values _[#S]_qualityTypePrecip general quality of typePrecip value 1: good -1111: no rain _[#S]_PIAfinal final est of path int atten due to precip particles [dB] _[#S]_corZFacNearSfc atten cor reflectivity factor near sfc [dBZ] _[#S]_precipRateNearSfc precop rate near the surface [mm h^-1] _[#S]_precipRateAve24 precip rate average for 2-4 km ht [mm h^-1] _[#S]_phaseNearSfc precipitation phase state [as for DSD phase, see below] _[#S]_zFacMeas measured ref. factor (no atten cor) [dBZ] _[#S]_attenNoPrecip attenuation due to non-precip particles [dB] *only HS, NS _[#S]_corZFac atten corrected reflectivity factor [dBZ] _[#S]_precipRate precipitation rate [mm h^-1] *only HS, NS _[#S]_DSDphase Phase state of precip < 100: Temp in C = phase-100 > 200: Temp in C = phase-200 = 100: Top of BB = 200: Bottom of BB = 175: for range bins in BB value of phase/100: 0: solid 1: mixed phase 2: liquid *only HS, NS _[#S]_effPIA effective 2-way PIA [dB] _[#S]_PIA_cloudwater Cloud water component of path integrated atten due to non-precip particles [dB] _[#S]_PIA_cloudice Cloud ice component of path integrated atten due to non-precip particles [dB] _[#S]_PIA_watervapor Wate vapor component of path integrated atten due to non-precip particles [dB] _[#S]_PIA_oxygen Oxygen molecules component of path int. atten due to non-precip particles [dB] _[#S]_TPW_liquid column integrated precip. liquid water [g m^-2] _[#S]_TPW_ice column integrated precip. solid water [g m^-2] _[#S]_dBNw DSD normalized intercept parameter [dB] *only HS, NS _[#S]_Dm DSD mass weighted mean diameter [mm] *only HS, NS dependencies: This .pro requires/calls the following: read_2adpr_hdf5.pro utility/lib to read GPM satellite products rsl_posn_to_azm_range.pro utility computes azimuth & distance in [m] between input lat/lon points bad2nan.pro utility to convert a flag value to NaNs -------------------------------------------------------------------------------- get_lev2bcmb_for_column.pro: ---------------------------- Function to read in LEVEL 2 (2BCMB) data from the GPM Combined Algorithm and returm subset of parameters located within the column grid box. IMPORTANT! this function is set up to use the Level 2 "2BCMB" (.HDF5) data available from the NASA Precipitation Processing System at: https://pps.gsfc.nasa.gov/ usage: result = get_lev2bcmb_for_column(column_box_params, file_2bcmb, $ main_plat_info, column_grid_horiz_limit, $ column_grid_horiz_spacing) column_box_params: column box grid params, returned by define_box.pro file_2bcmb: path to Level 2BCMB GPM data file (.HDF5 format) main_plat_info: main_plat_info returned by set_main_plat_values.pro result: one structure (lev2bcmb_info_and_data) with substructures: Tags: .lev2bcmb_plat_info: this tag is itself a structure: .plat_name: string ID of platform: '2BCMB' .plat_type: string label for plat type: '2BCMB' .frequency: string of GMI AND DPR operating frequencies [GHz] .file_type: string ID of data level/file type, eg: '2B-CS-CONUS' .algortihm: algo name as from PPS filename, eg: 'CORRA2016' .orbit_num: orbit number as from PPS filename .data_version:version number of the dataset, follows PPS convention, eg: 'V05A' .timestamp: 15 char timestamp of pixel including/closest to the main_plat's lat/lon location .offset_vs_main: int # of seconds time offset vs main_plat POSITIVE OFFSET: DPR OP time LATER than main_plat NEGATIVE OFFSET: DPR OP time EARLIER than main_plat .timestamp_cntr: 15 char timestamp of pixel including/closest to the column box center location .col_data_lev2bcmb: this tag is itself a structure: For each 2BCMB field have tags: [#S]: NS or MS scan swath [field]: which field the array is for .data_[#S]_[field]: column grid dims, values at ea col grid point .name_[#S]_[field]: string name describing the parameter .units_[#S]_[field]: string describing units for the data values Fields are: _[#S]_dataFitError error of data fit ranges 20-350 [K] _[#S]_precipFlag precip flag from DPR 0: no precip 1: precip _[#S]_precipType 8 character precip description from DPR: abcdefgh a: precip type 1: stratiform 2: convective 3: other *see FileSpec documention for more on other (b-h) values _[#S]_precipTypeQual precip type quality from DPR (generally positive is good) _[#S]_htZeroDeg altitude of freezing level [m] _[#S]_PIA 2-way PIA from DPR [dB] _[#S]_precipRateSfc precip rate at surface [mm h^-1] _[#S]_precipRateSfcSigma uncertainty in sfc precip rate [mm h^-1] _[#S]_sfcPrecipRateLiqFrac sfc liquid precip rate fraction (fraction) _[#S]_GMIsim_107_V simulated Tb for 10.7 GHz V pol [K] _[#S]_GMIsim_107_H simulated Tb for 10.7 GHz H pol [K] _[#S]_GMIsim_187_V simulated Tb for 18.7 GHz V pol [K] _[#S]_GMIsim_187_H simulated Tb for 18.7 GHz H pol [K] _[#S]_GMIsim_238_V simulated Tb for 23.8 GHz V pol [K] _[#S]_GMIsim_365_V simulated Tb for 36.5 GHz V pol [K] _[#S]_GMIsim_365_H simulated Tb for 36.5 GHz H pol [K] _[#S]_GMIsim_890_V simulated Tb for 89.0 GHz V pol [K] _[#S]_GMIsim_890_H simulated Tb for 89.0 GHz H pol [K] _[#S]_GMIsim_166_V simulated Tb for 166 GHz V pol [K] _[#S]_GMIsim_166_H simulated Tb for 166 GHz H pol [K] _[#S]_GMIsim_183_3_V sim Tb for 183.3+/-3 GHz V pol [K] _[#S]_GMIsim_183_8_V sim Tb for 183.3+/-8 GHz V pol [K] _[#S]_cloudIWC cloud ice water content [g m^-3] _[#S]_cloudLWC cloud liquid water content [g m^-3] _[#S]_corZFac atten corrected reflectivity factor [dBZ] _[#S]_precipLWC precip liquid water content [g m^-3] _[#S]_precipLWCsigma uncertainty in precip LWC [g m^-3] _[#S]_precipRate precipitation rate [mm h^-1] _[#S]_precipRateSigma uncertainty in precip rate [mm h^-1] _[#S]_PSDparam_Dm DSD Dm - computed [mm] _[#S]_PSDparam_Nw DSD Nw - prescribed [log(Nw)] _[#S]_PSDparam_mu DSD mu - prescribed [unitless] _[#S]_liqMassFracInMP fraction of precip mass that is liquid within the mixed-phase region (fraction) _[#S]_liqRateFracInMP fraction of precip rate that is liquid within the mixed-phase region (fraction) dependencies: This .pro requires/calls the following: read_2bcmb_hdf5.pro utility/lib to read GPM satellite products rsl_posn_to_azm_range.pro utility computes azimuth & distance in [m] between input lat/lon points bad2nan.pro utility to convert a flag value to NaNs -------------------------------------------------------------------------------- get_mrms_for_column.pro: -------------------------- Function reads in MRMS Level 2 products, locates values at MRMS points and times nearest the column grid points and timestamp passed in via the send_timestamp, then passes the data back to build_column.pro. Generally, the GPM DPR timestamp for the SIMBA column grid center is used for the send_timestamp (dpr_plat_info.timestamp_cntr). If the DPR is not available, then the main platform's timestamp is used instead. NOTE: MRMS product values are set at the LOWEST vertical level in the column grid to indicate values in the products are for the surface. usage: result = get_mrms_for_column(column_box_params, mrms_dir, $ send_timestamp, column_grid_horiz_limit) column_box_params: column box grid params, returned by define_box.pro mrms_dir: string dir path to MRMS files - this dir will be searched for time nearest send_timestamp send_timestamp: 15 char string timestamp to search for in MRMS files - MRMS time closest to this time will be used column_grid_horiz_limit: total horizontal extent of column grid [m] result: one structure if MRMS products are available, or !NULL mrms_info_and_data: returned strucutre if MRMS is available Tags: .mrms_plat_info This tag is itself a structure: .timestamp_requested: 15 char string, timestamp searched for, this is passed in as send_timestamp .timestamp: 15 char string MRMS product timestamp that is actaully used for to populate the column grid .offset_vs_main: int (or long) # of seconds time offset for the MRMS timestamp vs the main_plat timestamp: POSITIVE OFFSET: MRMS LATER than main_plat NEGATIVE OFFSET: MRMS EARLIER than main_plat .products: string list of the MRMS Lev2 products that are available, may include: PRECIPRATE, PRECIPTYPE, RQI, and/or HRLYRGR .col_data_mrms: This tag is itself a structure: Tags are for the MRMS Level 2 product files/fields: Fields Tags: 3-D dims, match column box dimensions, but are only populated at the lowest vertical level [z dim:0]. .data_precip_rate: MRMS Lev2 precip rate [mm/ h] .data_precip_type: MRMS Lev2 precip type code, see below. .data_radarQuality: MRMS Lev2 RadarQualityIndex, see below. .data_HrlyRadarGaugeRatio: MRMS Lev2 RGR - see below. .data_mrms_to_grid_dist: distance from the column grid pt to the MRMS point used for its assignment [m] Units/Info Tags: These are all strings: .name_preip_rate MRMS Lev2 Precipitation Rate .units_precip_rate [mm h^-1] .name_precip_type MRMS Lev2 Precipitaion Type .units_precip_type type codes, categories are: -1: missing 0: no precipitation 1: warm startiform rain 2: warm stratiform rain at ground, but radar at 1.5 km or higher 3: snow 4: snow at ground, but radar at 1.5 km or higher 6: convective precipitaiton 7: hail 10: cool stratiform rain 91: tropical/stratiform rain mix 96: tropical/convective rain mix .name_radarQuality MRMS Radar Quality Index .units_radarQuality range 0-1, 1 is best quality .name_HrlyRadarGaugeRatio MRMS hourly gauge-adjusted radar & hourly radar only .units_HrlyRadarGaugeRatio ranges 0.1-10 .name_mrms_to_grid_dist distance from MRMS point to assigned column grid point .units_mrms_to_grid_dist [m] dependencies: This .pro requires/calls the following: uncomp_file.pro utility to uncompress a .gz file closest.pro utility to locate value in an array nearest input value rsl_posn_to_azm_range.pro utility computes azimuth & distance in [m] between input lat/lon points -------------------------------------------------------------------------------- get_olympex_sounds_for_column.pro: ---------------------------------- Function reads in processed L4 OLYMPEX sounding data, locates soundings launched from a site within the column box and on the same day as the main_platform timestamp. If there is more than one launch from a site on the day of interest, the launch with timestamp nearest the main_platform's time will be used. From the 5 hPa levels recorded in the L4 data files, values are interpolated to the vertical levels in the column grid. In the horizontal, sounding values are placed at the SIMBA column grid location nearest the launch location. Full-profile values (ie, CAPE, CIN, LCL, etc) are placed at the lowest column grid level (z dimension subscript = 0). -CURRENTLY: profiles are placed at the same SIMBA lat/lon cocation for every vertical level (assumes sonde travels directly upwards) -NEXT VERSION: will account for advection of the sonde as the balloon rises usage: result = get_olympex_sondes_for_column(column_box_params, $ main_plat_timestamp, sondes_dir) column_box_params: column box grid params, returned by define_box.pro main_plat_timestamp: 15 char string, main_platform's timestamp, as recorded in main_plat_info.timestamp sondes_dir: string path to dir with L4 OLYMPEX sondes .nc files result: one structure (sondes_info_and_data) with substructures: sondes_info_and_data: returned if a sonde launched in column box on the day of interest has been found. Tags: .sondes_plat_info This tag is itself a structure: .launch_site string name of sounding launch site .launch_latitude float latitude of launch site [dec deg] .launch_longitude float longitude of launch site [dec deg] .launch_elevation_MSL float elevation of launch site [m] MSL .launch_timestamp string timestamp of sonde launch as YYYYMMDD_HHMM .offset_vs_main int/long # of seconds time offset vs main_plat POSITIVE OFFSET: launch LATER than main_plat NEGATIVE OFFSET: launch EARLIER than main_plat .sonde_latitude* float array/structure - latitude of the sonde at each vertical level (5 hPa) in the input file .sonde_longitude* float array/structure - latitude of the sonde at each vertical level (5 hPa) in the input file .sonde_altitude* float array/structure - altitude [m] of the sonde at each vertical level (5 hPa) in the input file .QCflags_press* int array/structure - data processing QC flags for pressure field .QCflags_temp* int array/structure - data processing QC flags for temperature field .QCflags_dewpt* int array/structure - data processing QC flags for dew point field .QCflags_winds* int array/structure - data processing QC flags for wind speed & direction field .QCflags_altitude* int array/structure - data processing QC flags for altitude field *NOTE 1: For .sonde_* and .QCflags_* tags: If 1 sonde in column box: Each of these tags will be an array. Each element of this array is the value of the parameter at each vertical level (5 hPa)from the original file (Level 4 processed OLYMPEX soundings) If >1 sonde in column box: Each of these tags will be a structure of arrays, with one array present for each sonde/ launch site included in the column box. *NOTE 2: For the QCflags_ tags: int values indicate: 1 - good 6 - parameter interpolated 2 - objectively questionable 7 - parameter estimated 3 - visually questionable 8 - parameter unchecked 4 - objectively bad 9 - parameter missing 5 - visually bad .col_data_sondes This tag is itself a structure: Field tags for soundings data, .sondes_* tags all are 3D arrays matching the column box dimensions. Index/full profile fieds (CAPE, CIN, TPW, LCL, LFC, EQL, and CorsApplied) are only polulated at the lowest vertical grid level. Tags: .sondes_press pressure [hPa] .units_press .sondes_temp temperature [deg C] .units_temp .sondes_dewpt dew point temperature [deg C] .units_dewpt .sondes_wind_speed wind speed [m/s] .units_wind_speed .sondes_wind_dir wind direction [deg] .units_wind_dir .sondes_CAPE Convective Available Potential Energy .units_CAPE [J/kg] .sondes_CIN Convective Inhibition .units_CIN [J/kg] .sondes_TPW Total Precipitable Water .units_TPW [mm] .sondes_LCL Lifting Condensation Level .units_LCL [hPa] .sondes_LFC Level of Free Convection .units_LFC [hPa] .sondes_EQL Equilibrium Level .units_EQL [hPa] .sondes_CorsApplied corrections applied to the sounding during the QC process (these are NOT applied by SIMBA -- See OLYMPEX soundings QC documentation and/or Ciesielski et al. (2012). Values are: 0 - no corrections applied 1 - humiditiy corrected 2 - surface p corrected 3 - surface T & Td corrected 4 - low-evel T & Td corrected dependencies: This .pro requires/calls the following: bad2nan.pro utility to convert a flag value to NaNs rsl_posn_to_azm_range.pro utility computes azimuth & distance in [m] between input lat/lon points get_dpm.pro utility to return number of days in the month -------------------------------------------------------------------------------- make_params_file.pro: --------------------- Function to generate .params file needed for running Radx to grid gound- based scanning radar data. Several of the specific gridding specifications will be based on the type of radar, scan/operation mode, and column grid set up (spacing). usage: result = make_params_file(radar_type, radar_name, scan_mode, $ column_box_params, horiz_spacing, vert_spacing, $ vert_limit, params_dir, [range_type], [uf_file]) radar_type: string name of radar type, valid options: 'NPOL', '88D', 'D3R', 'DOW6' radar_name: string name of the radar scan_mode: string scan type, eg: 'PPI', 'RHI' column_box_params: column box grid parameters, structure returned by define_box.pro horiz_spacing: column grid horizontal spacing [m] vert_spacing: column grid vertical spacing [m] params_dir: string path to directory where SIMBA-made .params files are to be placed range_type: [optional] this input is mainly for D3R scans, valid options: 'norma' or 'near' 'normal' is the default uf_file: [optional] this input is mainly for D3R scans - either individual RHI .uf sweep file, or a PPI combined volume .uf file default is for this to not be set result: string path to .params file to send to Radx for gridding the radar data to line up in column grid Full gridded output will have these dimensions, with whatever the column grid horiz & vert spacing is: Grid Cetner: column ox grid center location NPOL x&y: +/-100 km z: 0-15 km 88D x&y: +/-100 km z: 0-15 km D3R x&y: +/- 40 km z: 0-15 km DOW6 x&y: +/- 60 km z: 0-15 km Other gridding parameters set as: interp_mode = INTERP_MODE_CART use_nearest_neighbor = FALSE (default) min_nvalid_for_interp = 3 (default) use_fixed_angle_for_interpolation = FALSE (default) use_fixed_angle_for_data_limits = FALSE NOTE: none of reorder_* parameters need to be set/changed beam_width_fracion_for_data_limit_extension: This is set based on the radar & scan type, values were determined by trials with multiple test cases/scans: NPOL PPI: 0.5 NPOL RHI: 1.9 88D PPI: 0.5 D3R PPI: 0.5 D3R RHI "near": 3.5 D3R RHI "far": 1.9 DOW6 PPI: 0.5 DOW6 RHI: 0.5 dependencies: This .pro requires/calls the following: timestamp_from_rsl.pro utility to pull timestamp string from an RSL radar structure bad2nan.pro utility to convert a flag value to NaNs -------------------------------------------------------------------------------- write_column_nc_file.pro: ------------------------- Procedure to create the new .nc file and populate it with all available data in the column box grid and record attributes for each platform/data field. This .pro also generates a .txt file with the column .nc header information. usage: write_column_nc_file, column_box_params, column_grid_horiz_spacing, $ out_dir, column_grid_vert_spacing, column_grid_vert_limit,$ column_grid_horiz_limit, main_plat_info, $ halftime_interval, $ npol_plat_info, col_data_npol, $ d3r_plat_info, col_data_d3r, $ lev2_plat_info, col_data_88d_all, $ dow6_plat_info, col_data_dow6, $ apu_info_and_data, $ two_dvd_info_and_data, $ pluvio_info_and_data, $ gauges_info_and_data, $ mrr_info_and_data, $ gmi_gprof_info_and_data, $ gmi_lev1c_info_and_data, $ dpr_info_and_data, $ lev2bcmb_info_and_data, $ mrms_info_and_data, $ sondes_info_and_data, $ version_string Each structure sent in to this procedure is created by the functions listed & detailed above. See also README_SIMBAv#.#_structs.txt for more details. Newly created column .nc files follow filename convention: column_[main]_[center]_YYYYMMDD_HHMM.nc [main]: string ID of the main_plat [center]: string ID of center location used for the column timestamp: the main_plat's timestamp, w/o seconds Newly created header .txt files follow filename convention: column_[main]_[center]_YYYYMMDD_HHMM_ncHeader.txt -------------------------------------------------------------------------------- list_column_inventory.pro ------------------------- Utility Procedure: Lists at terminal an inventory of available platforms in a column .nc file created by the column building library. Saves this list as a .txt file, and also generates a simplifed map plot of the column domain & nearby platforms Usage: list_column_inventory, column_nc_file column_nc_file: path to column .nc file generated by build_column.pro -file created by write_column_nc_file.pro Result: Will print out to IDL terminal: - column box parameters: - center name and location - horiz & vert spacing & extent - which platform is used as "main_plat" - whether each supported platform is availble: NPOL, D3R, WSR 88D, APU, 2DVD, Pluvio, Gauge, MRR, GMI, DPR, 2BCMB, MRMS, sonde - for each available platform: - location - timestamp & offset vs main - scanning mode (PPI/RHI) for radars Ouptuts Created: filenames similar to column .nc filename convention column_[main]_[center]_YYYYMMDD_HHMM_inventory.txt .txt file written saving the terminal output column_[main]_[center]_YYYYMMDD_HHMM_map.png saves a simplified map .png file, but note: ground platforms located beyond the range of the map window on the plot are not shown, however these platforms may still be available in the SIMBA-made column .nc file - check inventory .txt file and/or the .nc header -------------------------------------------------------------------------------- col_box_test_plots.pro ---------------------- Utility Procedure: Generates plots from 3 types of files to verify column box placement (This .pro is provided as-is and may require situation- specific tweaking to produce the best results) Example Use: Set the following within the top section blocked off by ;----- lines: in_file: path to DPQC'd radar file (.uf.gz) -these files used as input for NPOL, 88Ds in build_column.pro grid_file: path to full Radx-gridded file (.nc) -these files created by grid_[radar]_for_column.pro & saved prior to extraction of the column box data col_file: path to a column .nc file created by build_column.pro -file written by helper procedure write_column_nc_file.pro box_cntr_x, box_cntr_y: Cartesian (x,y) coordinates in [km] of location of column box center point in a grid centered on the in_file radar. Can easily comput this w/ trig, based on range & bearing from the radar to the column box center point: box_cntr_x = (RANGE)*sin(BEARING*!dtor) box_cntr_y = (RANGE)*cos(BEARING*!dtor) colgrid_space, colgrid_extent: column grid spacing & extent, use same values used in build_column.pro when generating the col_file plt_swp_sub: subscript for which sweep in the in_file volume to plot plt_ht_subs: int array of subscripts of grid heights to plot from the grid_file & col_file out_dir: path to directory where to place the test plots (.png files) plot_qcd, plot_grd, plot_col: 'Y' or 'N' strings to tell the .pro which plots you do or don't want it to create. Can set to 'N' and it will skip plotting for that type of plot, eg: if you already have the swp plot desired but are plotting from the column .nc file, can set plot_qcd & plot_grd both = 'N' and plot_col = 'Y' and only the section of code to plot from the column file will run. plot_field: 2-char string of the RSL-type field name for plotting, eg, 'CZ' When plotting from a column .nc file, the radar name and an underscore are appended at the start of this string so the correct field is obtained from the .nc file and plotted, eg: 'npol_CZ' or 'KDOX_CZ', as these would be named in the column .nc file. Output plots: *_testplot_01_radar.png Plot of original QC'd data centered on the column box location, at the sweep subscript set, extending +/-10 km in horizontal. Plus signs (+) mark the location of each (horiz) column box grid point. *_testplot_02_gridded_#.#.png Plot of gridded data centered on the column box location, at the height subscript set, extending +/-10 km in horizontal. #.# in filename tells what [km] AGL grid level is plotted. Plus signs (+) mark the location of each (horiz) column box grid point. *_testplot_03_column_#.#.png Plot of column data at the height subscript set. #.# in filename tells what [km] AGL column box grid level is plotted. Plus signs (+) mark the location of each (horiz) column box grid point, though the plot range extends slightly to allow for a margin of space. Original Purpose: This program was writtten as a simple way to verify that column data is extracted correctly and placed at the appropriate grid points in new file. Locations of grid points (+) on the various plots should correspond to same relative strcture in data fields through the column building process, ie: a feature aligned at a certain grid point (+) relative location in the qc'd data plot should be in same grid point (+) relative locat- ion on the gridded plot, baring any smoothing resulting from the gridding process, and only the data shown at/within the grid points (+) on these plots should be included on the column plot. -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- --------------------------------------------------------------------------------