运行PB2NC¶
RAP prepbufr的处理¶
将
METplus/ush加入PATH环境变量export PATH=/home/wrf/METplus-3.0.2/ush:$PATH
设置结果输出路径和MET系统路径
$ 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 ...
设置输入数据路径
$ 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 ....
输入数据的目录结构为:
$ 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
修改
PB2NC参数文件$ vi /home/wrf/METplus-3.0.2/parm/use_cases/met_tool_wrapper/PB2NC/PB2NC.conf
起始时间和间隔
... # 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 ...
时间窗口
... # 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 ...
区域和类型选择
... # 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
... # 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 ...
输入和输出
... # 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
运行
$ master_metplus.py -c /home/wrf/METplus-3.0.2/parm/use_cases/met_tool_wrapper/PB2NC/PB2NC.conf
检查结果
$ 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提供了
plot_point_obs绘制观测的分布情况$ ~/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
rap.t00z.prepbufr.tm00.nc.ps为观测分布的PS文件。
GDAS prepbufr的处理¶
GDAS prepbufr 资料:
[wrf@dqs gdas]$ tree -L 1 . ├── prepbufr.gdas.20200618.t00z.nr.48h ├── prepbufr.gdas.20200618.t06z.nr.48h ├── prepbufr.gdas.20200618.t12z.nr.48h ├── prepbufr.gdas.20200618.t18z.nr.48h ├── prepbufr.gdas.20200619.t00z.nr.48h ├── prepbufr.gdas.20200619.t06z.nr.48h ├── prepbufr.gdas.20200619.t12z.nr.48h ├── prepbufr.gdas.20200619.t18z.nr.48h ├── prepbufr.gdas.20200620.t00z.nr.48h ├── prepbufr.gdas.20200620.t06z.nr.48h ├── prepbufr.gdas.20200620.t12z.nr.48h ├── prepbufr.gdas.20200620.t18z.nr.48h ├── prepbufr.gdas.20200621.t00z.nr.48h ├── prepbufr.gdas.20200621.t06z.nr.48h ├── prepbufr.gdas.20200621.t12z.nr.48h ├── prepbufr.gdas.20200621.t18z.nr.48h ├── prepbufr.gdas.20200622.t00z.nr.48h ├── prepbufr.gdas.20200622.t06z.nr.48h ├── prepbufr.gdas.20200622.t12z.nr.48h ├── prepbufr.gdas.20200622.t18z.nr.48h ├── prepbufr.gdas.20200623.t00z.nr.48h ├── prepbufr.gdas.20200623.t06z.nr.48h处理GDAS prepbufr资料(valid at 00Z, 06Z, 12Z, 18Z, +/-3H window)为逐小时间隔NetCDF文件的设置:
警告
GDAS 时间窗口边界(3Z,9Z,15Z,21Z)的资料可能处理得不全,以下的设置没有包括-30m的资料
# section heading for [config] variables - all items below this line and # before the next section heading correspond to the [config] section [config] # List of applications to run - only PB2NC for this case PROCESS_LIST = PB2NC # time looping - options are INIT, VALID, RETRO, and REALTIME # If set to INIT or RETRO: # INIT_TIME_FMT, INIT_BEG, INIT_END, and INIT_INCREMENT must also be set # If set to VALID or REALTIME: # VALID_TIME_FMT, VALID_BEG, VALID_END, and VALID_INCREMENT must also be set LOOP_BY = VALID # Format of VALID_BEG and VALID_END using % items # %Y = 4 digit year, %m = 2 digit month, %d = 2 digit day, etc. # see www.strftime.org for more information # %Y%m%d%H expands to YYYYMMDDHH VALID_TIME_FMT = %Y%m%d%H%M # Start time for METplus run - must match VALID_TIME_FMT VALID_BEG = 2020061800 # End time for METplus run - must match VALID_TIME_FMT VALID_END = 2020071700 # Increment between METplus runs (in seconds if no units are specified) # Must be >= 60 seconds VALID_INCREMENT = 1H # List of forecast leads to process for each run time (init or valid) # In hours if units are not specified # If unset, defaults to 0 (don't loop through forecast leads) LEAD_SEQ = 0 # 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 # If set to True, skip run if the output file determined by the output directory and # filename template already exists PB2NC_SKIP_IF_OUTPUT_EXISTS = True # 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 # controls the window of time around the current run time to be considered to be valid for all # input files, not just relative to each input files valid time # if set, these values are substituted with the times from the current run time and passed to # PB2NC on the command line with -valid_beg and -valid_end arguments. # Not used if unset or set to an empty string PB2NC_VALID_BEGIN = {valid?fmt=%Y%m%d_%H%M%S?shift=-1800} PB2NC_VALID_END = {valid?fmt=%Y%m%d_%H%M%S?shift=1800} # 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 = # Leave empty to process all PB2NC_OBS_BUFR_VAR_LIST = QOB, TOB, ZOB, UOB, VOB, D_DPT, D_WIND, D_RH, D_MIXR [dir] # location of configuration files used by MET applications CONFIG_DIR = {PARM_BASE}/met_config # directory containing input to PB2NC PB2NC_INPUT_DIR = {INPUT_BASE}/gdas # 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 = prepbufr.gdas.{da_init?fmt=%Y%m%d?shift=10800}.t{da_init?fmt=%2H?shift=10800?truncate=21600}z.nr.48h # Template to use to write output from PB2NC PB2NC_OUTPUT_TEMPLATE = gdas.{da_init?fmt=%Y%m%d}/gdas.t{da_init?fmt=%2H}z.prepbufr.tm{offset?fmt=%2H}.nc