import numpy as np


def get_features_marin_vis_retrieval(add_arounds=True):
    # 基础要素
    base_features = [
        'month', 'day', 'hour',
    ]

    # 污染物要素（原始+8个方向）
    pollutants = [
        'BC', 'CO', 'CO2', 'NOx', 'OC',
        'PM10', 'PM25', 'SO2', 'TSP'
    ]

    # 气象要素（原始+8个方向）
    meteos = [
        'UGRD', 'VGRD', 'PRES', 'PWAT', 'SPFH'
    ]

    # 地面观测要素（原始+8个方向）
    surface_obs = [
        'PM10_sfc', 'PM25_sfc'
    ]

    # 生成完整特征列表
    feature_list = base_features.copy()

    # # 添加污染物要素
    # for var in pollutants:
    #     feature_list.append(var)
    #     if add_arounds:
    #         feature_list.extend([f"{var}_{i}" for i in range(1, 9)])

    # 添加气象要素
    for var in meteos:
        feature_list.append(var)
        if add_arounds:
            feature_list.extend([f"{var}_{i}" for i in range(1, 9)])

    # 添加地面观测要素
    for var in surface_obs:
        feature_list.append(var)
        if add_arounds:
            feature_list.extend([f"{var}_{i}" for i in range(1, 9)])


    # 目标变量
    target_list = ['VIS_HOR']

    return feature_list, target_list



def get_features_asian_vis_retrieval(add_arounds=True):
    # 基础要素
    base_features = [
        'month', 'day', 'hour',
    ]

    # 污染物要素（原始+8个方向）
    pollutants = [
        'BC', 'CO', 'CO2', 'NOx', 'OC',
        'PM10', 'PM25', 'SO2', 'TSP'
    ]

    # 气象要素（原始+8个方向）
    meteos = [
        'UGRD', 'VGRD', 'PRES', 'PWAT', 'SPFH'
    ]

    # 地面观测要素（原始+8个方向）
    surface_obs = [
        'PM10_sfc', 'PM25_sfc'
    ]

    # 生成完整特征列表
    feature_list = base_features.copy()

    # 添加污染物要素
    for var in pollutants:
        feature_list.append(var)
        # if add_arounds:
        #     feature_list.extend([f"{var}_{i}" for i in range(1, 9)])

    # 添加气象要素
    for var in meteos:
        feature_list.append(var)
        if add_arounds:
            feature_list.extend([f"{var}_{i}" for i in range(1, 9)])

    # 添加地面观测要素
    for var in surface_obs:
        feature_list.append(var)
        if add_arounds:
            feature_list.extend([f"{var}_{i}" for i in range(1, 9)])


    # 目标变量
    target_list = ['VIS']

    return feature_list, target_list




def get_cra_lon_lat():

    lon = np.arange(0, 360, 0.1)
    lat = np.arange(-90, 90.1, 0.1)

    return lon, lat

def get_marin_vis_lon_lat():

    lon = np.arange(0, 180, 0.1)
    lat = np.arange(0, 90, 0.1)

    return lon, lat

def get_asian_lon_lat():

    lon_to = np.arange(72, 136.1, 0.1)
    lat_to = np.arange(16, 55.1, 0.1)

    return lon_to, lat_to






if __name__ == "__main__":

    features, target = get_features_marin_vis_retrieval()

    lon, lat = get_asian_lon_lat()

    print("debug")



