/**
 * Copyright 2019 DH
 * All right reserved.
 * 项目名称: 大恒泰山系统
 * 创建日期:2022/10/27
 */
package org.ts.ddcs.business.lkszy.controller;

import com.google.common.collect.ImmutableList;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.ts.ddcs.task.DataProcessHolder;
import ucar.nc2.NetcdfFile;
import ucar.nc2.NetcdfFiles;
import ucar.nc2.Variable;

import java.io.File;


/***
 * Date:2022/10/27
 * Title:文件所属模块（必须填写）
 * Description：对本文件的详细描述，原则上不能少于30字
 * @author dylan
 * @version 1.0
 * Remark：认为有必要的其他信息
 */
@RestController
public class LkszyController {
    @GetMapping(value = "lkszy/test")
    public String toTest() {
        try {
            String filename = "D:\\tmp\\test\\Z_SURF_C_BABJ_20230517112343_P_CMPA_RT_BEHT_0P01_HOR-PRE-2023051711.GRB2";


            NetcdfFile netcdfFile = NetcdfFiles.open(filename, null);
            ImmutableList<Variable> variables = netcdfFile.getVariables();

            //DataProcessHolder.newInstance().dataProcess.submitLkszyDataShareTast();
        }catch (Exception e){
            e.printStackTrace();
        }
        return "ok";
    }
}
