运行PB2NC ========================== 1. 将 :code:`METplus/ush` 加入 :code:`PATH` 环境变量 .. code-block:: bash export PATH=/home/wrf/METplus-3.0.2/ush:$PATH #. 设置结果输出路径和MET系统路径 .. code-block:: bash $ cd /home/wrf/METplus-3.0.2 $ vi parm/metplus_config/metplus_system.conf ... # Location of METplus output files OUTPUT_BASE = /home/wrf/METout STAGING_DIR = {OUTPUT_BASE}/stage ## Commonly used base MET variables ## Met install location MET_INSTALL_DIR = /home/wrf/METplus-3.0.2/build_components MET_BASE = {MET_INSTALL_DIR}/share/met ## Output directories LOG_DIR = {OUTPUT_BASE}/logs TMP_DIR = {OUTPUT_BASE}/tmp ... #. 设置输入数据路径 .. code-block:: bash $ cd /home/wrf/METplus-3.0.2 $ vi parm/metplus_config/metplus_data.conf .... # Input data directories # This is the location of your input files for METplus INPUT_BASE = /home/wrf/com/prod .... 输入数据的目录结构为: .. code-block:: bash $ tree -L 2 -P "*prepbufr.tm00" /home/wrf/com/prod/ ├── rap.20200620 │   ├── nclprd │   ├── rap.t00z.prepbufr.tm00 │   ├── rap.t01z.prepbufr.tm00 │   ├── rap.t02z.prepbufr.tm00 │   ├── rap.t03z.prepbufr.tm00 │   ├── rap.t04z.prepbufr.tm00 │   ├── rap.t05z.prepbufr.tm00 │   ├── rap.t06z.prepbufr.tm00 │   ├── rap.t07z.prepbufr.tm00 │   ├── rap.t08z.prepbufr.tm00 │   ├── rap.t09z.prepbufr.tm00 │   ├── rap.t10z.prepbufr.tm00 │   ├── rap.t11z.prepbufr.tm00 │   ├── rap.t12z.prepbufr.tm00 │   ├── rap.t13z.prepbufr.tm00 │   ├── rap.t14z.prepbufr.tm00 │   ├── rap.t15z.prepbufr.tm00 │   ├── rap.t16z.prepbufr.tm00 │   ├── rap.t17z.prepbufr.tm00 │   ├── rap.t18z.prepbufr.tm00 │   ├── rap.t19z.prepbufr.tm00 │   ├── rap.t20z.prepbufr.tm00 │   ├── rap.t21z.prepbufr.tm00 │   ├── rap.t22z.prepbufr.tm00 │   ├── rap.t23z.prepbufr.tm00 │   └── wmo ├── rap.20200621 │   ├── nclprd │   ├── rap.t00z.prepbufr.tm00 │   ├── rap.t01z.prepbufr.tm00 │   ├── rap.t02z.prepbufr.tm00 │   ├── rap.t03z.prepbufr.tm00 │   ├── rap.t04z.prepbufr.tm00 │   ├── rap.t05z.prepbufr.tm00 │   ├── rap.t06z.prepbufr.tm00 │   ├── rap.t07z.prepbufr.tm00 │   ├── rap.t08z.prepbufr.tm00 │   ├── rap.t09z.prepbufr.tm00 │   ├── rap.t10z.prepbufr.tm00 │   ├── rap.t11z.prepbufr.tm00 │   ├── rap.t12z.prepbufr.tm00 │   ├── rap.t13z.prepbufr.tm00 │   ├── rap.t14z.prepbufr.tm00 │   ├── rap.t15z.prepbufr.tm00 │   ├── rap.t16z.prepbufr.tm00 │   ├── rap.t17z.prepbufr.tm00 │   ├── rap.t18z.prepbufr.tm00 │   ├── rap.t19z.prepbufr.tm00 │   ├── rap.t20z.prepbufr.tm00 │   ├── rap.t21z.prepbufr.tm00 │   ├── rap.t22z.prepbufr.tm00 │   ├── rap.t23z.prepbufr.tm00 │   └── wmo ├── rap.20200622 │   ├── rap.t00z.prepbufr.tm00 │   ├── rap.t01z.prepbufr.tm00 │   ├── rap.t02z.prepbufr.tm00 │   └── wmo #. 修改 :code:`PB2NC` 参数文件 .. code-block:: bash $ vi /home/wrf/METplus-3.0.2/parm/use_cases/met_tool_wrapper/PB2NC/PB2NC.conf - 起始时间和间隔 .. code-block:: bash ... # Start time for METplus run - must match VALID_TIME_FMT VALID_BEG = 2020062000 # End time for METplus run - must match VALID_TIME_FMT VALID_END = 2020062123 # Increment between METplus runs (in seconds if no units are specified) # Must be >= 60 seconds VALID_INCREMENT = 1H ... - 时间窗口 .. code-block:: bash ... # Time relative to each input file's valid time (in seconds if no units are specified) for data within the file to be # considered valid. Values are set in the 'obs_window' dictionary in the PB2NC config file PB2NC_WINDOW_BEGIN = -1800 PB2NC_WINDOW_END = 1800 ... - 区域和类型选择 .. code-block:: bash ... # Values to pass to pb2nc config file using environment variables of the same name. # See MET User's Guide for more information PB2NC_GRID = PB2NC_POLY = PB2NC_STATION_ID = PB2NC_MESSAGE_TYPE = ... - Offsets .. code-block:: bash ... # list of offsets in the prepBUFR input filenames to allow. List is in order of preference # i.e. if 12, 6 is listed, it will try to use a 12 offset file and then try to use a 6 offset # if the 12 does not exist PB2NC_OFFSETS = 0 ... - 输入和输出 .. code-block:: bash ... # directory containing input to PB2NC PB2NC_INPUT_DIR = {INPUT_BASE} # directory to write output from PB2NC PB2NC_OUTPUT_DIR = {OUTPUT_BASE}/pb2nc # End of [dir] section and start of [filename_templates] section [filename_templates] # Template to look for forecast input to PB2NC relative to PB2NC_INPUT_DIR PB2NC_INPUT_TEMPLATE = rap.{da_init?fmt=%Y%m%d}/rap.t{da_init?fmt=%2H}z.prepbufr.tm{offset?fmt=%2H} # Template to use to write output from PB2NC PB2NC_OUTPUT_TEMPLATE = rap.{da_init?fmt=%Y%m%d}/rap.t{da_init?fmt=%2H}z.prepbufr.tm{offset?fmt=%2H}.nc #. 运行 .. code-block:: bash $ master_metplus.py -c /home/wrf/METplus-3.0.2/parm/use_cases/met_tool_wrapper/PB2NC/PB2NC.conf #. 检查结果 .. code-block:: bash $ tree -L 2 /home/wrf/METout/pb2nc/ -h /home/wrf/METout/pb2nc/ ├── [4.0K] rap.20200620 │   ├── [ 26K] rap.t00z.prepbufr.tm00.nc │   ├── [111K] rap.t01z.prepbufr.tm00.nc │   ├── [140K] rap.t02z.prepbufr.tm00.nc │   ├── [ 92K] rap.t03z.prepbufr.tm00.nc │   ├── [126K] rap.t04z.prepbufr.tm00.nc │   ├── [111K] rap.t05z.prepbufr.tm00.nc │   ├── [129K] rap.t06z.prepbufr.tm00.nc │   ├── [134K] rap.t07z.prepbufr.tm00.nc │   ├── [125K] rap.t08z.prepbufr.tm00.nc │   ├── [116K] rap.t09z.prepbufr.tm00.nc │   ├── [112K] rap.t10z.prepbufr.tm00.nc │   ├── [110K] rap.t11z.prepbufr.tm00.nc │   ├── [113K] rap.t12z.prepbufr.tm00.nc │   ├── [ 95K] rap.t13z.prepbufr.tm00.nc │   ├── [ 72K] rap.t14z.prepbufr.tm00.nc │   ├── [ 76K] rap.t15z.prepbufr.tm00.nc │   ├── [ 45K] rap.t16z.prepbufr.tm00.nc │   ├── [ 32K] rap.t17z.prepbufr.tm00.nc │   ├── [ 40K] rap.t18z.prepbufr.tm00.nc │   ├── [ 31K] rap.t19z.prepbufr.tm00.nc │   ├── [ 31K] rap.t20z.prepbufr.tm00.nc │   ├── [ 32K] rap.t21z.prepbufr.tm00.nc │   ├── [ 38K] rap.t22z.prepbufr.tm00.nc │   └── [ 79K] rap.t23z.prepbufr.tm00.nc ├── [4.0K] rap.20200621 │   ├── [112K] rap.t00z.prepbufr.tm00.nc │   ├── [122K] rap.t01z.prepbufr.tm00.nc │   ├── [139K] rap.t02z.prepbufr.tm00.nc │   ├── [109K] rap.t03z.prepbufr.tm00.nc │   ├── [112K] rap.t04z.prepbufr.tm00.nc │   ├── [128K] rap.t05z.prepbufr.tm00.nc │   ├── [112K] rap.t06z.prepbufr.tm00.nc │   ├── [124K] rap.t07z.prepbufr.tm00.nc │   ├── [131K] rap.t08z.prepbufr.tm00.nc │   ├── [112K] rap.t09z.prepbufr.tm00.nc │   ├── [120K] rap.t10z.prepbufr.tm00.nc │   ├── [ 97K] rap.t11z.prepbufr.tm00.nc │   ├── [123K] rap.t12z.prepbufr.tm00.nc │   ├── [ 93K] rap.t13z.prepbufr.tm00.nc │   ├── [ 90K] rap.t14z.prepbufr.tm00.nc │   ├── [ 90K] rap.t15z.prepbufr.tm00.nc │   ├── [ 35K] rap.t16z.prepbufr.tm00.nc │   ├── [ 28K] rap.t17z.prepbufr.tm00.nc │   ├── [ 28K] rap.t18z.prepbufr.tm00.nc │   ├── [ 26K] rap.t19z.prepbufr.tm00.nc │   ├── [ 27K] rap.t20z.prepbufr.tm00.nc │   ├── [ 27K] rap.t21z.prepbufr.tm00.nc │   ├── [ 39K] rap.t22z.prepbufr.tm00.nc │   └── [ 81K] rap.t23z.prepbufr.tm00.nc #. 绘图 MET提供了 :code:`plot_point_obs` 绘制观测的分布情况 .. code-block:: bash $ ~/METplus-3.0.2/build_components/bin/plot_point_obs \ ./rap.20200622/rap.t00z.prepbufr.tm00.nc \ rap.t00z.prepbufr.tm00.nc.ps \ -data_file rap.t09z.wrfprsf00.grib2 \ -v 2 :code:`rap.t00z.prepbufr.tm00.nc.ps` 为观测分布的PS文件。