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