METplus学习 生成掩膜
MET是一款用于分析数值模式预报效果的工具,metplus是基于MET的python脚本。
创建掩膜需要用到GenVxMask这个函数
输入数据:GFS
MASK:CONUS边界文件
将GenVxMask.conf的基础上修改,复制过来
从以下目录将文件复制过来,parm/use_cases/met_tool_wrapper/GenVxMask/GenVxMask.conf
[config] # Documentation for this use case can be found at # https://metplus.readthedocs.io/en/latest/generated/met_tool_wrapper/GenVxMask/GenVxMask.html # For additional information, please see the METplus Users Guide. # https://metplus.readthedocs.io/en/latest/Users_Guide ### # Processes to run # https://metplus.readthedocs.io/en/latest/Users_Guide/systemconfiguration.html#process-list ### PROCESS_LIST = GenVxMask ### # Time Info # LOOP_BY 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 # LEAD_SEQ is the list of forecast leads to process # https://metplus.readthedocs.io/en/latest/Users_Guide/systemconfiguration.html#timing-control ### LOOP_BY = INIT INIT_TIME_FMT = %Y%m%d%H INIT_BEG = 2012040900 INIT_END = 2012040900 INIT_INCREMENT = 1M LEAD_SEQ = 12H ### # File I/O # https://metplus.readthedocs.io/en/latest/Users_Guide/systemconfiguration.html#directory-and-filename-template-info ### GEN_VX_MASK_INPUT_DIR = GEN_VX_MASK_INPUT_TEMPLATE = {INPUT_BASE}/met_test/new/gfs/gfs_{init?fmt=%Y%m%d%H}_F{lead?fmt=%3H}.grib GEN_VX_MASK_INPUT_MASK_DIR = GEN_VX_MASK_INPUT_MASK_TEMPLATE = {INPUT_BASE}/met_test/data/poly/CONUS.poly GEN_VX_MASK_OUTPUT_DIR = GEN_VX_MASK_OUTPUT_TEMPLATE = {OUTPUT_BASE}/met_tool_wrapper/GenVxMask/POLY_GFS_LATLON_CONUS_mask.nc GEN_VX_MASK_SKIP_IF_OUTPUT_EXISTS = False GEN_VX_MASK_FILE_WINDOW_BEGIN = 0 GEN_VX_MASK_FILE_WINDOW_END = 0 ### # GenVxMask Settings # https://metplus.readthedocs.io/en/latest/Users_Guide/wrappers.html#genvxmask ### #LOG_GEN_VX_MASK_VERBOSITY = 2 GEN_VX_MASK_OPTIONS = -type poly
下载样例数据
wget https://dtcenter.ucar.edu/dfiles/code/METplus/METplus_Data/v6.0/sample_data-met_tool_wrapper-6.0.tgz
边界文件格式
CONUS.poly
CONUS
35.81352 -122.33439 36.01565 -121.51420 35.35092 -121.27343 34.68935 -121.03940 35.81352 -122.33439
GFS文件:
gfs_2012040900_F006.grib
运行程序
run_metplus.py -c GenVxMask.conf -c user_system.conf
浙公网安备 33010602011771号