Additional Tools
Additional Tools griggs Thu, 04/25/2019 - 16:08Shift-Data-Plane
Shift-Data-Plane griggs Thu, 04/25/2019 - 16:06This tool may be run to perform a rigged shift of the entire grid based on user-defined specifications and write the field(s) out in NetCDF format. This tool was originally designed to account for track error when comparing fields associated with tropical cyclones. The user specifies the latitude and longitude of the source and destination points to define the shift. Both points must fall within the domain and are used to define the X and Y direction grid unit shift. The rigid is then applied to all grid points. The user may specify the method of interpolation and the field to be shifted. The effects of topography and land/water masks are ignored.
Shift-Data-Plane Usage
View the usage statement for Shift-Data-Plane by simply typing the following:
At a minimum, the following five arguments must be passed: the gridded data file (input_filename), the output NetCDF file (output_filename), the data to be shifted from the input file (field_string), the starting location to define the shift (-from lat lon), and the ending location to define the shift (-to lat lon).
Run
Run griggs Thu, 04/25/2019 - 16:10Next, we'll run Shift-Data-Plane on the command line using the following command:
$MET_TUTORIAL_DATA/input/sample_fcst/2005080700/wrfprs_ruc13_12.tm00_G212 \
$MET_TUTORIAL_DATA/output/shift_data_plane/shift_pres.nc \
'name="PRES"; level="Z0";' \
-from 39.74 -105.00 \
-to 41.88 -87.63
This command shifts the surface pressure field from Denver, CO to Chicago, IL and is meant to simply illustrate the functionality of this tool. On the next page we'll plot the result.
Output
Output griggs Thu, 04/25/2019 - 16:11Run the following commands to plot the input and output of Shift-Data-Plane:
$MET_TUTORIAL_DATA/input/sample_fcst/2005080700/wrfprs_ruc13_12.tm00_G212 \
$MET_TUTORIAL_DATA/output/shift_data_plane/shift_input.ps \
'name="PRES"; level="Z0";'
plot_data_plane \
$MET_TUTORIAL_DATA/output/shift_data_plane/shift_pres.nc \
$MET_TUTORIAL_DATA/output/shift_data_plane/shift_output.ps \
'name="PRES_Z0"; level="(*,*)";'
Display the output images by running the following commands:
gv $MET_TUTORIAL_DATA/output/shift_data_plane/shift_output.ps &
Notice the rigid shift that has been applied. Why would anyone want to shift data in this way? This tool has been applied when doing feature-relative verification. For example when evaluating hurricane forecasts, select the forecast storm track location and the corresponding location of the BEST track. Prior to computing grid-to-grid statistics, first shift the data from the forecast track location to the BEST track location. Then compute statistics near the storm. This is a simple way of removing the effect of track error when evaluating hurricane forecasts.
MODIS-Regrid
MODIS-Regrid griggs Thu, 04/25/2019 - 16:14MODIS-Regrid Functionality
The MODIS-Regrid tool reformats gridded MODIS data from HDF into a gridded NetCDF format that MET can read. MODIS-Regrid requires the HDF and HDF-EOS libraries.
MODIS-Regrid Usage
View the usage statement for MODIS-Regrid by simply typing the following:
At a minimum, the -data_file path specifying the data files used to get the grid information, the -field name specifying the name of the field to use in the modis data file, the -out path specifying the name of the output netcdf file, the -scale value specifying the scale factor to be used on the raw modis values, and the -offset value specifying the offset value to be used on the raw modis values, the -fill value specifying the bad data value in the modis data, and the modis_file specifying the name of the MODIS input file, must be passed in on the command line. Optionally, -units text may be given to specify the global attributes section of the output file and -compress level may be given to specify the compression level of the output NetCDF variable.
Run
Run griggs Thu, 04/25/2019 - 16:15Since MODIS-Regrid simply performs a reformatting step, no configuration file is needed.
Run MODIS-Regrid on the command line using the following command:
-data_file $MET_TUTORIAL_DATA/input/sample_fcst/2005080712/wrfprs_ruc13_00.tm00_G212 \
-field Surface_Temperature \
-out $MET_TUTORIAL_DATA/output/modis_regrid/m_sfc_temp.nc \
-units K \
-scale 0.01 \
-offset -15000 \
-fill -32768 \
$MET_TUTORIAL_DATA/input/sample_obs/modis/MYD06_L2.A2013032.0630.051.2013032185634.hdf
MODIS-Regrid is now processing the input field from modis_file into NetCDF format and writing it to the output m_sfc_temp.nc file on the grid specified with -data_file option using the appropriate scale, offset, and fill values.
Output
Output griggs Thu, 04/25/2019 - 16:16Open up and examine the following output files we just generated:
- Conventional MPR data:
- Radiance MPR data:
- Conventional ORANK data:
- Radiance ORANK data:
Look at the header lines for the GSI2MPR output files and notice that the conventional and radiance headers are the same through the OBS_QC column. However, the remaining columns differ and are specific to the data type. The GSIDENS2ORANK output files include the standard ORANK header columns followed by extra columns specific to the data type. Next, we'll run STAT-Analysis aggregate_stat jobs to derive statistics from this data.
GSID2MPR Statistics
Run the following STAT-Analysis jobs to compute statistics using the GSID2MPR output:
- Read MPR lines and compute continuous statistics for each variable present. Write the output to the specified .stat file:
-lookin $MET_TUTORIAL_DATA/output/gsid2mpr/diag_conv_ges.mem001.stat \
-job aggregate_stat -line_type MPR -out_line_type CNT \
-by FCST_VAR -out_stat $MET_TUTORIAL_DATA/output/gsid2mpr/conv.mem001_CNT.stat
- Open up $MET_TUTORIAL_DATA/output/gsid2mpr/conv.mem001_CNT.stat and notice that multiple observation type values are written as a comma-separated list in the OBTYPE. Rerun this command by use the -set_hdr option to define the output for that column:
-lookin $MET_TUTORIAL_DATA/output/gsid2mpr/diag_conv_ges.mem001.stat \
-job aggregate_stat -line_type MPR -out_line_type CNT \
-by FCST_VAR -out_stat $MET_TUTORIAL_DATA/output/gsid2mpr/conv.mem001_CNT.stat \
-set_hdr OBTYPE ALL
- The OBTYPE column in the output should now be set to ALL. With the right set of options, STAT-Analysis may be used to filter this data in any way you would like and derive many different types of statistics. For example, process only temperature data (-fcst_var t), using only the pairs that were actually assimilated (-column_thresh ANLY_USE eq1), and threshold them to define a contingency table (-out_line_type CTC -out_thresh ge273):
-lookin $MET_TUTORIAL_DATA/output/gsid2mpr/diag_conv_ges.mem001.stat \
-job aggregate_stat -line_type MPR -out_line_type CTC \
-fcst_var t -out_thresh ge273 -column_thresh ANLY_USE eq1 \
-out_stat $MET_TUTORIAL_DATA/output/gsid2mpr/conv.mem001_TMP_CTC.stat \
-set_hdr OBTYPE ALL
GSIDENS2ORANK Statistics
As we saw above, STAT-Analysis can read MPR lines and derive a variety of output line types, such as SL1L2, CNT, CTC, CTS, MCTC, MCTS, and so on). Similarly, STAT-Analysis can read the ORANK lines generated by GSIDENS2ORANK and derive ensemble output line types, such as RHIST, PHIST, and SSVAR. Run the following STAT-Analysis jobs to compute statistics using the GSIDENS2ORNK output:
- Read radiance ORANK lines and compute ranked histograms for each variable present and write the output to the screen:
-lookin $MET_TUTORIAL_DATA/output/gsidens2orank/diag_amsua_ORANK.stat \
-job aggregate_stat -line_type ORANK -out_line_type RHIST \
-by FCST_VAR
- Now process conventional ORANK lines and derive PHIST output with a 0.10 bin size for each unique combination of FCST_VAR and N_USE column:
-lookin $MET_TUTORIAL_DATA/output/gsidens2orank/diag_conv_ORANK.stat \
-job aggregate_stat -line_type ORANK -out_line_type PHIST -out_bin_size 0.10 \
-by FCST_VAR,N_USE
GSI Tools
GSI Tools griggs Thu, 04/25/2019 - 16:18GSI Tools Functionality
The Gridpoint Statistical Interpolation (GSI) system is a variational data assimilation system often run with the WRF model. GSI processes several observation data types and matches them to the model grid. GSI has the option of generating binary diagnostic files which contain information about that paired data. The GSI Tools in MET were designed to read those binary diagnostic files and dump their contents to ASCII files formatted so they can be further processed by the STAT-Analysis tool.
The GSI Tools are able to read conventional and radiance diagnostic files. Support for additional data types will be added in future releases. There are two GSI Tools: GSID2MPR and GSIDENS2ORANK. The GSID2MPR tool reads one or more GSI diagnostic file(s) and writes output in the MET matched pair (MPR) line type. It writes several extra columns of data to the end of the MPR lines based on input data type. Run this tool to create MPR data and pass it to the STAT-Analysis tool to compute additional statistics.
The GSIDENS2ORANK tool reads an ensemble of GSI diagnostic files and writes output in the MET observation rank (ORANK) line type. It writes several extra columns of data to the end of the ORANK lines based on input data type. Run this tool to create ensemble ORANK data and pass it to the STAT-Analysis tool to compute additional statistics.
GSI Tools Usage
View the usage statement for GSI Tools by simply typing the following:
You must pass one or more GSI diagnostic file names to GSID2MPR. For each input file, it writes an output file to the -outdir directory using the .stat suffix or the string specified by the -suffix option.
You must pass the GSI diagnostic file names for all ensemble members to GSIDENS2ORANK and the output file name using the -out option. Use -ens_mean to specify the ensemble mean data or the mean for each observation location will be computed on the fly from the member values.
Run
Run griggs Thu, 04/25/2019 - 16:20Next, we'll run GSID2MPR on the command line using the following command:
input/gsi_data/diag_conv_ges.mem* \
-outdir $MET_TUTORIAL_DATA/output/gsid2mpr \
-swap
Here, we've reformatted five conventional GSI diagnostic files. The -swap option indicates that the Endianness of the data must be switched. For each input file, a .stat output file is written to the directory specified by the -outdir option. Notice in the log messages that it checks for and skips duplicate entries in the data. The -no_check_dup option disables the checking for duplicate data. Next, run a similar command but for satellite radiance data:
input/gsi_data/diag_amsua_n18_ges.mem* \
-outdir $MET_TUTORIAL_DATA/output/gsid2mpr \
-swap
Next, run very similar commands using the GSIDENS2ORANK tool to process the conventional and satellite radiance data as a 5-member ensemble, rather than as indivual files. This generates ORANK output lines instead of MPR lines:
input/gsi_data/diag_conv_ges.mem* \
-out $MET_TUTORIAL_DATA/output/gsidens2orank/diag_conv_ORANK.stat \
-swap
input/gsi_data/diag_amsua_n18_ges.mem* \
-out $MET_TUTORIAL_DATA/output/gsidens2orank/diag_amsua_ORANK.stat \
Output
Output griggs Thu, 04/25/2019 - 16:22Open up and examine the following output files we just generated:
- Conventional MPR data:
- Radiance MPR data:
- Conventional ORANK data:
- Radiance ORANK data:
Look at the header lines for the GSI2MPR output files and notice that the conventional and radiance headers are the same through the OBS_QC column. However, the remaining columns differ and are specific to the data type. The GSIDENS2ORANK output files include the standard ORANK header columns followed by extra columns specific to the data type. Next, we'll run STAT-Analysis aggregate_stat jobs to derive statistics from this data.
GSID2MPR Statistics
Run the following STAT-Analysis jobs to compute statistics using the GSID2MPR output:
- Read MPR lines and compute continuous statistics for each variable present. Write the output to the specified .stat file:
-lookin $MET_TUTORIAL_DATA/output/gsid2mpr/diag_conv_ges.mem001.stat \
-job aggregate_stat -line_type MPR -out_line_type CNT \
-by FCST_VAR -out_stat $MET_TUTORIAL_DATA/output/gsid2mpr/conv.mem001_CNT.stat
- Open up $MET_TUTORIAL_DATA/output/gsid2mpr/conv.mem001_CNT.stat and notice that multiple observation type values are written as a comma-separated list in the OBTYPE. Rerun this command by use the -set_hdr option to define the output for that column:
-lookin $MET_TUTORIAL_DATA/output/gsid2mpr/diag_conv_ges.mem001.stat \
-job aggregate_stat -line_type MPR -out_line_type CNT \
-by FCST_VAR -out_stat $MET_TUTORIAL_DATA/output/gsid2mpr/conv.mem001_CNT.stat \
-set_hdr OBTYPE ALL
- The OBTYPE column in the output should now be set to ALL. With the right set of options, STAT-Analysis may be used to filter this data in any way you would like and derive many different types of statistics. For example, process only temperature data (-fcst_var t), using only the pairs that were actually assimilated (-column_thresh ANLY_USE eq1), and threshold them to define a contingency table (-out_line_type CTC -out_thresh ge273):
-lookin $MET_TUTORIAL_DATA/output/gsid2mpr/diag_conv_ges.mem001.stat \
-job aggregate_stat -line_type MPR -out_line_type CTC \
-fcst_var t -out_thresh ge273 -column_thresh ANLY_USE eq1 \
-out_stat $MET_TUTORIAL_DATA/output/gsid2mpr/conv.mem001_TMP_CTC.stat \
-set_hdr OBTYPE ALL
GSIDENS2ORANK Statistics
As we saw above, STAT-Analysis can read MPR lines and derive a variety of output line types, such as SL1L2, CNT, CTC, CTS, MCTC, MCTS, and so on). Similarly, STAT-Analysis can read the ORANK lines generated by GSIDENS2ORANK and derive ensemble output line types, such as RHIST, PHIST, and SSVAR. Run the following STAT-Analysis jobs to compute statistics using the GSIDENS2ORNK output:
- Read radiance ORANK lines and compute ranked histograms for each variable present and write the output to the screen:
-lookin $MET_TUTORIAL_DATA/output/gsidens2orank/diag_amsua_ORANK.stat \
-job aggregate_stat -line_type ORANK -out_line_type RHIST \
-by FCST_VAR
- Now process conventional ORANK lines and derive PHIST output with a 0.10 bin size for each unique combination of FCST_VAR and N_USE column:
-lookin $MET_TUTORIAL_DATA/output/gsidens2orank/diag_conv_ORANK.stat \
-job aggregate_stat -line_type ORANK -out_line_type PHIST -out_bin_size 0.10 \
-by FCST_VAR,N_USE