FY4B_C_SPMS/main.py

69 lines
2.4 KiB
Python

# -*- coding: utf-8 -*-
"""
Created on Thu Feb 18 17:36:03 2022
@author: zhangqiankun
"""
import argparse
import glob
import utils
from options import parse
import giirscombine
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('--giirsopt','-opt', type=str,
default='./options/FY4B_girrs_options.yaml',
help='Path to option YAML file.')
# parser.add_argument('--file','-f', type=str,
# required = True,
# help='Path to L1 file.')
parser.add_argument('--agriopt','-Aopt', type=str,
default='./options/FY4B_AGRI_options.yaml',
help='Path to option YAML file.')
args = parser.parse_args()
giirsopt = parse(args.giirsopt)
# Giirscomobj = giirscombine.Giirscombine('2022041300',giirsopt)
# Giirscomfile = Giirscomobj.run()
Giirscomfile = '/fy4_ads_data/stss_v2.0/ProduceBackgroundData/combined_GIIRS/FY4B/2022/20220413/'+\
'FY4B-_GIIRS-_N_REGX_1330E_L1-_IRD-_MULT_NUL_20220413000000_20220413020000_012KM_C01V1.HDF'
# # Giirscomfile = '/fy4_ads_data/stss_v2.0/ProduceBackgroundData/combined_GIIRS/FY4A/2021/20210504/'+\
# # 'FY4A-_GIIRS-_N_REGX_1047E_L1-_IRD-_MULT_NUL_20210504000000_20210504020000_016KM_C01V1.HDF'
background = utils.bgbase(Giirscomfile,giirsopt)
if background.match_nwp():
# print('W')
# background.make_config()
# background.run('LW')
background.make_config()
background.run('MW')
# args = parser.parse_args()
# agriopt = parse(args.agriopt)
# satfile = '/FY4B_DATA/AGRI/L1/FDI/DISK/GEO/2022/20220415/'+\
# 'FY4B-_AGRI--_N_DISK_1330E_L1-_GEO-_MULT_NOM_20220415031500_20220415032959_4000M_V0001.HDF'
# # Giirscomfile = '/fy4_ads_data/stss_v2.0/ProduceBackgroundData/combined_GIIRS/FY4A/2021/20210504/'+\
# # 'FY4A-_GIIRS-_N_REGX_1047E_L1-_IRD-_MULT_NUL_20210504000000_20210504020000_016KM_C01V1.HDF'
# background = utils.bgbase(satfile,agriopt)
# print background.instrument
# print(background.match_nwp())
# if background.match_nwp():
# #
# # background.make_config()
# background.make_config()
# background.run()
# # background.del_config()
# simopt = parse(args.simopt)
# simulate = utils.simbase(args.file,simopt)
# simulate.make_config()
# simulate.run()