Actions

Difference between revisions of "FRACTL"

From Lrose Wiki

 
(23 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= Overview =  
+
=== '''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.
 
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.
Line 14: Line 14:
  
  
= FRACTL Quickstart Guide =
+
=== '''FRACTL Quickstart Guide''' ===
  
 
<blockquote style="color: grey; border: solid thin gray;">
 
<blockquote style="color: grey; border: solid thin gray;">
Line 39: Line 39:
  
  
== Parameters ==
+
=== '''Parameter File''' ===
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 [http://wiki.lrose.net/index.php/FRACTL#The_FRACTL_parameter_file this section] of the page. For a full list of parameters and their descriptions, see the [http://wiki.lrose.net/index.php/Fractl_parameter_file FRACTL parameter file]:
+
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. For a full list of parameters and their descriptions, see the [http://wiki.lrose.net/index.php/Fractl_parameter_file FRACTL parameter file]:
  
  
=== Lat/Lon Origin ===
+
==== '''Minimum Values''' ====
 
 
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.
 
 
 
<code class="terminal">////////////// projLat0 /////////////////////////////
 
 
 
//
 
 
 
// For example: 16.5.
 
 
 
//
 
 
 
//
 
 
 
// Type: double
 
 
 
//
 
 
 
  
<span style=background:yellow>projLat0 = 40.4463;</span></code>
+
; <span style="color: #666666;">minDbz</span>
 +
: Any values below the minimum reflectivity value will be tossed out. Example: -20.
  
 +
; <span style="color: #666666;">minNcp</span>
 +
: any values below the minimum NCP will be tossed out. Note that NEXRAD WSR-88D and NOAA P-3 tail radars do not have this variable currently, so the NCP variable can be replaced by any other variable to perform a simple quality control. Both minDbz and minNcp are designed for the QC of a real-time analysis.
  
The default is 0. If unchanged the program will terminate and you will get the following error:
 
  
<code class="terminal">terminating with uncaught exception of type std::out_of_range:vector”</code>
+
==== '''Test Mode''' ====
  
 +
; <span style="color: #666666;">testMode</span>
 +
: The default test mode is MODE_ZETA. The testMode option is designed for the developers to test and debug.
  
<code class="terminal">////////////// projLon0 //////////////////////////////
 
  
//
+
==== '''Grid Spec''' ====
  
// For example: 148.0.
+
; <span style="color: #666666;">zGrid, yGrid, xGrid</span>
 +
: Specify the grid spacing “incr” or “min, max, incr” which represents the lowest level, the highest level, and constant spacing of the vertical level respectively. Specifying only "incr" will grab the min and max from the data. Units are km.
  
//
 
  
//
+
==== '''Projection''' ====
  
// Type: double
+
; <span style="color: #666666;">projLat0, projLon0</span>
 +
: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.
  
//
+
:The default is 0. If unchanged the program will terminate and you will get the following error:
  
 +
:<code class="terminal">terminating with uncaught exception of type std::out_of_range:vector”</code>
  
<span style=background:yellow>projLon0 = -104.6368;</span></code>
 
  
 +
==== '''File and Directories''' ====
  
The default is 0. If unchanged the program will terminate and you will get the following error:
+
Within the FILES AND DIRECTORIES section of the parameter file, you must edit <code class="terminal">inDir</code> and <code class="terminal">outTxt</code>.
  
<code class="terminal">terminating with uncaught exception of type std::out_of_range:vector”</code>
+
; <span style="color: #666666;">inDir</span>
 +
: inDir refers to the input directory where you have stored your radar data. 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:
  
 +
: <code class="terminal">Fractl: error: Must spec either -inDir or -fileList</code>
  
=== Input/Output ===
+
; <span style="color: #666666;">fileRegex</span>
Within the FILES AND DIRECTORIES section of the parameter file, you must edit <code class="terminal">inDir</code> and <code class="terminal">outTxt</code>. <code class="terminal">inDir</code> refers to the input directory where you have stored your radar data, and <code class="terminal">outTxt</code> refers to the the name of the text file that will contain the verification of grid results.
 
 
 
 
<blockquote style="color: grey; border: solid thin gray;">
 
<blockquote style="color: grey; border: solid thin gray;">
 
'''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.
 
'''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.
 
</blockquote>
 
</blockquote>
  
 +
; <span style="color: #666666;">outTxt</span>
 +
: outTxt refers to the the name of the text file that will contain the verification of grid results. 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:
  
<code class="terminal">
+
: <code class="terminal">Fractl: error: parameter not specified: -outTxt</code>
//==============================================================
 
 
 
//
 
 
 
// FILES AND DIRECTORIES.
 
 
 
//
 
 
 
// =============================================================
 
 
 
//
 
 
 
 
 
///////////// inDir /////////////////////////////
 
 
 
//
 
 
 
// Any radx supported format, or output of Rdx2Grid.
 
 
 
//
 
 
 
//
 
  
// Type: string
+
; <span style="color: #666666;">outNc</span>
 +
: Specify the directory of a output netCDF file which is the result of the analysis. If outNc ends in a slash we make a subdir and write to yyyymmdd/ncf_yyyymmdd_hhmmss.nc.
  
//
 
  
 
+
==== '''Fields''' ====
<span style=background:yellow>inDir = “input”;</span>
 
</code>
 
 
 
 
 
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:
 
 
 
<code class="terminal">Fractl: error:
 
 
 
Must spec either -inDir or -fileList</code>
 
 
 
 
 
<code class="terminal">
 
///////////// outTxt /////////////////////////////
 
 
 
//
 
 
 
// Has verification of grid results.
 
 
 
//
 
 
 
//
 
 
 
// Type: string
 
 
 
//
 
 
 
 
 
<span style=background:yellow>outTxt = “fractl_verif.txt”;</span>
 
</code>
 
 
 
 
 
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:
 
 
 
<code class="terminal">Fractl: error:
 
 
 
parameter not specified: -outTxt</code>
 
 
 
 
 
=== 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).
 
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).
  
 +
; <span style="color: #666666;">radialName</span>
 +
: Provide the name of the radial velocity field in the radar file.
 +
: The default is “not_set”. If unchanged or set improperly, the program will terminate and you will get the following error:
 +
: <code class="terminal">Fractl: throwerr: radialName not found</code>
  
==== Radial Velocity ====
+
; <span style="color: #666666;">dbzName</span>
<code class="terminal">
+
: Provide the name of the reflectivity field in the radar file.
//==============================================================
+
: The default is “not_set”. If unchanged or set improperly, the program will terminate and you will get the following error:
 +
: <code class="terminal">Fractl: throwerr: dbzName not found</code>
  
//
+
; <span style="color: #666666;">ncpName</span>
 +
: Provide the name of the NCP field in the radar file. 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 <code class="terminal">minNcp</code> for the QC threshold, accordingly.
 +
: The default is “not_set”.  If unchanged or set to a nonexistent field name, the program will terminate and you will get the following error:
 +
: <code class="terminal">Fractl: throwerr: ncpName not found</code>
  
// FIELDS.
+
<blockquote style="color: grey; border: solid thin gray;">
 +
'''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).
 +
</blockquote>
  
//
 
  
//==============================================================
+
==== '''Other parameters''' ====
  
 +
; <span style="color: #666666;">gridType</span>
 +
: 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.
  
 +
; <span style="color: #666666;">numNbrMax</span>
 +
: the maximum points for the nearest neighbor algorithm to consider at each grid point.
  
///////////// radialName //////////////////////////
+
; <span style="color: #666666;">uvInterp</span>
 +
: 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.
  
//
 
  
// VEL for NEXRAD, VG for Eldora, VE for CSU-CHILL.
+
Descriptions from the default parameter file can be found here: '''[http://wiki.lrose.net/index.php/fractl_parameter_file FRACTL parameter file]'''.
  
//
+
=== '''Running FRACTL''' ===
 
 
//
 
 
 
// Type: string
 
 
 
//
 
 
 
 
 
<span style=background:yellow>radialName = “VE”;</span></code>
 
 
 
 
 
The default is “not_set”. If unchanged or set improperly, the program will terminate and you will get the following error:
 
 
 
<code class="terminal">Fractl: throwerr: radialName not found</code>
 
 
 
 
 
==== Reflectivity ====
 
<code class="terminal">
 
///////////// dbzName //////////////////////////
 
 
 
//
 
 
 
// REF for NEXRAD, DBZ for Eldora, DZ for CSU-CHILL.
 
 
 
//
 
 
 
//
 
 
 
// Type: string
 
 
 
//
 
 
 
 
 
<span style=background:yellow>dbzName = “DZ”;</span></code>
 
 
 
 
 
The default is “not_set”. If unchanged or set improperly, the program will terminate and you will get the following error:
 
 
 
<code class="terminal">Fractl: throwerr: dbzName not found</code>
 
 
 
 
 
==== Normalized Coherent Power ====
 
<code class="terminal">
 
///////////// ncpName //////////////////////////
 
 
 
//
 
 
 
// Not available for NEXRAD, NCP for Eldora, NC for CSU-CHILL.
 
 
 
//
 
 
 
//
 
 
 
// Type: string
 
 
 
//
 
 
 
 
 
<span style=background:yellow>ncpName = “NC”;</span></code>
 
 
 
 
 
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 <code class="terminal">minNcp</code> 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:
 
 
 
<code class="terminal">Fractl: throwerr: ncpName not found</code>
 
 
 
 
 
<blockquote style="color: grey; border: solid thin gray;">
 
'''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).
 
</blockquote>
 
 
 
== 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:
 
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:
  
Line 270: Line 141:
  
  
== Output ==
+
=== '''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.
 
Your output data should be stored in a sub-directory named for the year, month, and day (yyyymmdd) and contained in a netCDF file.
  
  
= Tutorial =
+
== '''FRACTL Tutorial''' ==
  
 
This tutorial will look much like the [http://wiki.lrose.net/index.php/FRACTL#FRACTL_Quickstart_Guide Quickstart guide] above, but is designed for users to follow along with a very basic dataset and pre-configured parameter file.
 
This tutorial will look much like the [http://wiki.lrose.net/index.php/FRACTL#FRACTL_Quickstart_Guide Quickstart guide] above, but is designed for users to follow along with a very basic dataset and pre-configured parameter file.
 +
 +
<blockquote style="color: grey; border: solid thin gray;">
 +
'''Reminder:''' If using the Virtual Toolbox version of LROSE, “lrose -- ” must precede every LROSE command, e.g. “lrose -- fractl -h”
 +
</blockquote>
  
  
Line 318: Line 193:
 
<span style=color:lime>cfrad_analytic2.nc</span>
 
<span style=color:lime>cfrad_analytic2.nc</span>
 
</code></blockquote>
 
</code></blockquote>
 +
  
 
<code class=terminal>20172827.cen</code> is a file specific to SAMURAI operations and can be ignored for this tutorial. <code class=terminal>cfrad_analytic1.nc</code> and <code class=terminal>cfrad_analytic2.nc</code> 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.
 
<code class=terminal>20172827.cen</code> is a file specific to SAMURAI operations and can be ignored for this tutorial. <code class=terminal>cfrad_analytic1.nc</code> and <code class=terminal>cfrad_analytic2.nc</code> 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 parameter file that you extracted from the download has already been setup specifically for this dataset (<code class=terminal>cfrad_analytic1.nc</code> and <code class=terminal>cfrad_analytic2.nc</code>). However, in line with the Quickstart guide above, we will go through the parameters that were changed. Again, you can verify this by viewing the parameter file in VI or any other text editor.
+
As previously mentioned, the FRACTL parameter file that you extracted from the download has already been setup specifically for this dataset (<code class=terminal>cfrad_analytic1.nc</code> and <code class=terminal>cfrad_analytic2.nc</code>). 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 ==
+
=== Lat/Lon Origin ===
This dataset consists of data from two radars and the chosen origin for our output data is set as the midpoint of the straight-line distance between the two radars:
+
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:
  
  
Line 335: Line 211:
 
<code class=terminal>projLon = -94.8787;</code>
 
<code class=terminal>projLon = -94.8787;</code>
  
 +
=== 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 <code class=terminal>cfrad_analytic1.nc</code> and <code class=terminal>cfrad_analytic2.nc</code>, the input files:
  
== Input/Output ==
 
The input directory (the folder where your radar data is stored for ingest into FRACTL) for this tutorial is set to "input":
 
  
 
<code class=terminal>inDir = "input";</code>
 
<code class=terminal>inDir = "input";</code>
 +
  
 
Notice that this is set as a relative path. This means that we must invoke the FRACTL program in the directory just above the <code class=terminal>input</code> 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.
 
Notice that this is set as a relative path. This means that we must invoke the FRACTL program in the directory just above the <code class=terminal>input</code> 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:
 
The output verification text file that is created when FRACTL is invoked is called "fractl_verif.txt" for this tutorial:
 +
  
 
<code class=terminal>outTxt = "fractl_verif.txt";</code>
 
<code class=terminal>outTxt = "fractl_verif.txt";</code>
  
 
+
=== Variable Names ===
== 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:
 
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:
  
Line 363: Line 241:
  
  
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 variable of your choosing for basic quality control.
+
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.
  
  
Line 392: Line 270:
  
  
Navigate to the <code class=terminal>20170827</code> directory. There will be one netCDF file in here named <code class=terminal>ncf_20170827_140726.nc</code>. This is the output file that contains your FRACTL dual-Doppler analysis. An example of what you should see as viewed from ncViewer is below:
+
Navigate to the <code class=terminal>20170827</code> directory. There will be one netCDF file in here named <code class=terminal>ncf_20170827_140726.nc</code>. 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:
 
 
 
 
[[File:FRACTL_output.png|center]]
 
 
 
= 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.
+
[[File:FRACTL_output.png]]
* 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: '''[http://wiki.lrose.net/index.php/fractl_parameter_file FRACTL parameter file]'''.
+
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.

Latest revision as of 23:53, 26 January 2024

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


Parameter File

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. For a full list of parameters and their descriptions, see the FRACTL parameter file:


Minimum Values

minDbz
Any values below the minimum reflectivity value will be tossed out. Example: -20.
minNcp
any values below the minimum NCP will be tossed out. Note that NEXRAD WSR-88D and NOAA P-3 tail radars do not have this variable currently, so the NCP variable can be replaced by any other variable to perform a simple quality control. Both minDbz and minNcp are designed for the QC of a real-time analysis.


Test Mode

testMode
The default test mode is MODE_ZETA. The testMode option is designed for the developers to test and debug.


Grid Spec

zGrid, yGrid, xGrid
Specify the grid spacing “incr” or “min, max, incr” which represents the lowest level, the highest level, and constant spacing of the vertical level respectively. Specifying only "incr" will grab the min and max from the data. Units are km.


Projection

projLat0, projLon0
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.
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”


File and Directories

Within the FILES AND DIRECTORIES section of the parameter file, you must edit inDir and outTxt.

inDir
inDir refers to the input directory where you have stored your radar data. 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
fileRegex

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.

outTxt
outTxt refers to the the name of the text file that will contain the verification of grid results. 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
outNc
Specify the directory of a output netCDF file which is the result of the analysis. If outNc ends in a slash we make a subdir and write to yyyymmdd/ncf_yyyymmdd_hhmmss.nc.


Fields

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).

radialName
Provide the name of the radial velocity field in the radar file.
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
dbzName
Provide the name of the reflectivity field in the radar file.
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
ncpName
Provide the name of the NCP field in the radar file. 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.
The default is “not_set”. 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).


Other parameters

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.
numNbrMax
the maximum points for the nearest neighbor algorithm to consider at each grid point.
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 from the default parameter file can be found here: FRACTL parameter file.

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.