Actions

FRACTL

From Lrose Wiki

Overview

FRACTL is a fast traditional solver with integrated interpolation using LROSE infrastructure, and it is able to perform both gridding and multi-Doppler synthesis for airborne radars and multiple ground-based radars. This is different than Radx2Grid which is only capable of gridding data for a single ground-based radar. FRACTL adopts both REORDER and CEDRIC programs. REORDER transforms radar data from its native coordinate system to cartesian space and the data can then be ingested into CEDRIC for synthesis. FRACTL currently accepts either CfRadial or DORADE file format. Different than Radx2Grid, FRACTL doesn’t require the CfRadial file with an aggregation of the sweeps.


The main features of FRACTL are:

  • “Traditional” multi-Doppler solver written from the ground up in C++
  • Quasi-horizontal 2-radar assumption (U,V) with mass-continuity for W, or full 3D solution (U, V, W)
  • Nearest neighbor algorithm adds Doppler gates directly to matrix solver at each grid point, no interpolation or averaging of velocity required
  • Solve normal equations using Singular Value Decomposition (preferred) or Cramer’s method
  • Subset of CEDRIC diagnostics implemented, more on the way
  • Fast computation. It takes less than 5 minutes for dual-Doppler synthesis (~3M gates)
  • Doppler data only


FRACTL Quickstart Guide

Note: If using the Virtual Toolbox version of LROSE, “lrose -- ” must precede every LROSE command, e.g. “lrose -- fractl -h”


To check all command line options for FRACTL, including debugging options and file paths, the typical ‘-h’ flag can be invoked:


fractl -h


Likewise, to print a listing of the default parameter file contents, use the following command:


fractl -print_params


To create a copy of the default parameter file for use and editing, use the above command followed by the right-pointing angle bracket (i.e. greater-than symbol), and a name of your choosing for the file with the file extension “.params”:


fractl -print_params > my_fractl_parameters.params


Parameters

There are several key parameters to look for and modify and they are listed below in the relative order they appear in the parameter file. To see more parameter options, go to this section of the page. For a full list of parameters and their descriptions, see the FRACTL parameter file:


Lat/Lon Origin

The origin is an arbitrarily chosen point, but should be relevant for your objective. For example, it can be the geographical center of your multi-radar domain, the physical location of a radar for a single-radar domain, or the location of a feature of interest within your dataset. The latitude and longitude of your chosen origin should be given in decimal degrees.

////////////// projLat0 /////////////////////////////

//

// For example: 16.5.

//

//

// Type: double

//


projLat0 = 40.4463;


The default is 0. If unchanged the program will terminate and you will get the following error:

terminating with uncaught exception of type std::out_of_range:vector”


////////////// projLon0 //////////////////////////////

//

// For example: 148.0.

//

//

// Type: double

//


projLon0 = -104.6368;


The default is 0. If unchanged the program will terminate and you will get the following error:

terminating with uncaught exception of type std::out_of_range:vector”


Input/Output

Within the FILES AND DIRECTORIES section of the parameter file, you must edit inDir and outTxt. inDir refers to the input directory where you have stored your radar data, and outTxt refers to the the name of the text file that will contain the verification of grid results.

Recommendation: though not required, we recommend using the CfRadial file format for FRACTL. If using DORADE files, "fileRegex" must be changed to "^swp". "fileRegex" refers to the data format of your radar data and is set to "^cfrad" for CfRadial by default.


//==============================================================

//

// FILES AND DIRECTORIES.

//

// =============================================================

//


///////////// inDir /////////////////////////////

//

// Any radx supported format, or output of Rdx2Grid.

//

//

// Type: string

//


inDir = “input”;


We recommend using absolute file paths here. The default is “not_set”. If unchanged, the program will terminate and you will get the following error:

Fractl: error:

Must spec either -inDir or -fileList


///////////// outTxt /////////////////////////////

//

// Has verification of grid results.

//

//

// Type: string

//


outTxt = “fractl_verif.txt”;


This file is created in the same directory that the FRACTL program was invoked. The default is “not_set”. If unchanged, the program will terminate and you will get the following error:

Fractl: error:

parameter not specified: -outTxt


Variable Names

You must specify the names of the following fields as they are named in the radar files: reflectivity factor, radial velocity, and normalized coherent power (NCP).


Radial Velocity

//==============================================================

//

// FIELDS.

//

//==============================================================


///////////// radialName //////////////////////////

//

// VEL for NEXRAD, VG for Eldora, VE for CSU-CHILL.

//

//

// Type: string

//


radialName = “VE”;


The default is “not_set”. If unchanged or set improperly, the program will terminate and you will get the following error:

Fractl: throwerr: radialName not found


Reflectivity

///////////// dbzName //////////////////////////

//

// REF for NEXRAD, DBZ for Eldora, DZ for CSU-CHILL.

//

//

// Type: string

//


dbzName = “DZ”;


The default is “not_set”. If unchanged or set improperly, the program will terminate and you will get the following error:

Fractl: throwerr: dbzName not found


Normalized Coherent Power

///////////// ncpName //////////////////////////

//

// Not available for NEXRAD, NCP for Eldora, NC for CSU-CHILL.

//

//

// Type: string

//


ncpName = “NC”;


The default is “not_set”. If there is no NCP field, set this to any other existing field to do some basic, automatic quality control. You will then need to set minNcp for the QC threshold, accordingly. If unchanged or set to a nonexistent field name, the program will terminate and you will get the following error:

Fractl: throwerr: ncpName not found


Note: even if you set the ncpName to a different field (e.g. "ZDR"), it will still be labeled as "NCP" in the output file(s).

Running FRACTL

After modifying the parameter file to your desired output analysis, type the following command to the terminal to invoke the program, calling your edited parameter file in the process:


fractl -params my_fractl_paramters.params


Output

Your output data should be stored in a sub-directory named for the year, month, and day (yyyymmdd) and contained in a netCDF file.


FRACTL Tutorial

This tutorial will look much like the Quickstart guide above, but is designed for users to follow along with a very basic dataset and pre-configured parameter file.

Reminder: If using the Virtual Toolbox version of LROSE, “lrose -- ” must precede every LROSE command, e.g. “lrose -- fractl -h”


To begin, download the set of inputs. Then, open a terminal window, navigate to your destination folder that contains the download, and extract the file contents:


tar -xvf LROSE-Cyclone-Wind-tutorial_20200112_inputs.tar.gz


If you print a listing of your destination folder contents, you will now see two additional files and a directory:


computer:destination_folder user$ ls

LROSE-Cyclone-Wind-tutorial_20200112_inputs.tar.gz

fractl_analytic_test.params

input

samurai_analytic_test.params


fractl_analytic_test.params is the FRACTL parameter file. You can view the contents using VI or any other text editor. All parameters have been set for you so there is no need to edit this. samurai_analytic_test.params is the SAMURAI parameter file and can be ignored for the remainder of this tutorial.


If you navigate to the input directory and print a listing, you will see three files:


computer:input user$ ls

20170827.cen

cfrad_analytic1.nc

cfrad_analytic2.nc


20172827.cen is a file specific to SAMURAI operations and can be ignored for this tutorial. cfrad_analytic1.nc and cfrad_analytic2.nc are the input files for FRACTL. They contain NEXRAD level II data from one radar each. These data consist of a uniform 10 m/s wind field for simplicity.


As previously mentioned, the FRACTL parameter file that you extracted from the download has already been setup specifically for this dataset (cfrad_analytic1.nc and cfrad_analytic2.nc). However, in line with the Quickstart guide above, we will list the parameters that were changed. Again, you can verify this by viewing the parameter file in VI or any other text editor. Each line provided below is taken directly from the edited FRACTL parameter file.


Lat/Lon Origin

This dataset consists of data from two radars and the chosen origin for the output data is set as the midpoint of the straight-line distance between the two radars:


projLat = 29.4719;

---------------

projLon = -94.8787;

Input/Output

The input directory (the folder where your radar data are stored for ingest into FRACTL) for this tutorial is set to "input". Remember, this is the name of the existing directory that contains cfrad_analytic1.nc and cfrad_analytic2.nc, the input files:


inDir = "input";


Notice that this is set as a relative path. This means that we must invoke the FRACTL program in the directory just above the input directory. It is this very reason that in the Quickstart guide, we recommend using absolute file paths when specifying the input directory. For this tutorial, however, we will leave it as is.


The output verification text file that is created when FRACTL is invoked is called "fractl_verif.txt" for this tutorial:


outTxt = "fractl_verif.txt";

Variable Names

Given that NEXRAD radar data is being used, the names for reflectivity, radial velocity, and normalized coherent power as they are called within NEXRAD data are specified for the following parameters:


radialName = "VEL";

---------------

dbzName = "REF";

---------------

ncpName = "SW";


Since NEXRAD data does not have a normalized coherent power (NCP) variable, we set it to "SW" for spectrum width, but it can be set to any existing variable of your choosing for basic quality control.


Navigate once again to your destination folder (the one that contains the input directory and parameter files). While in the destination folder, start FRACTL with the parameter file by typing the following command:


fractl -params fractl_analytic_test.params


The program should complete in just under 2 minutes. Once you see the terminal prompt again, print a listing of the destination folder contents and you will now see the output verification text file (outTxt = fractl_verif.txt) and a new directory named 20170827:


computer:destination_folder user$ ls

20170827

LROSE-Cyclone-Wind-tutorial_20200112_inputs.tar.gz

fractl_analytic_test.params

fractl_verif.txt

input

samurai_analytic_test.params


Navigate to the 20170827 directory. There will be one netCDF file in here named ncf_20170827_140726.nc. This is the output file that contains your FRACTL dual-Doppler analysis. An example of what you should see as viewed from NC Viewer is below:


FRACTL output.png


The left image is that of the U-component of the wind, the center image is that of the V-component of the wind, the left image is the condition number. Notice that the analytic solution is 10 m/s for U and V, and the retrieved solution is within 1-2 m/s where the condition number is small.

The FRACTL parameter file

To control FRACTL’s operation, there are several key parameters to be modified in order to obtain the desired output:

  • minDbz: any values below the minimum reflectivity will be tossed out.
  • minNcp: any values below the minimum NCP will be tossed out. Note that both NEXRAD WSR88D and NOAA P-3 tail radars do not have this variable currently, so the NCP variable can be replaced by any other variables to perform the simple quality control (QC). Both minDbz and minNcp are designed for the QC of a real-time analysis.
  • testMode: the default test mode is MODE_ZETA. The testMode option is designed for the developers to test and debug.
  • zGrid: specify vertical grid spacing “incr” or “min, max, incr” which represents the lowest level, the highest level, and constant spacing of the vertical level respectively.
  • yGrid: similar as zGrid. It specifies the grid parameters in y.
  • xGrid: similar as zGrid. It specifies the grid parameters in x.
  • gridType: mesh is for stand-alone analysis, while mish is as a background field for SAMURAI input. For the current release, we recommend the users to use mesh for the analysis. The mish gridType is experimental and still under development.
  • projLat0: the latitude of the reference point (0,0).
  • projLon0: the longitude of the reference point (0,0).
  • numNbrMax: the maximum points for the nearest neighbor algorithm to consider at each grid point.
  • inDir: input directory for searching for files. Files will be searched for in this directory.
  • fileRegex: regular expression to select files in inDir. If input file format is CfRadial (DORADE), specify it as “^cfrad (^swp)”.
  • outTxt: specify the directory of a output summary file which contains verification of grid results.
  • outNc: specify the directory of a output netCDF file which is the result of the analysis.
  • radialName: specify the variable name of radial velocity.
  • dbzName: specify the variable name of reflectivity.
  • ncpName: specify the variable name of NCP. If there is no NCP variable, you can specify any other variable to perform the QC. This variable corresponds to minNcp for the threshold.
  • uvInterp: set the wind interpolation method for u and v. The specified interpolation method will be applied before calculating the vertical velocity. The default mode is INTERP_NONE.


Descriptions of the default parameter file can be found here: FRACTL parameter file.