风云3E-黎明之星
哈哈哈,距离开坑已经快两个月了。嘿嘿。
1.数据下载(2022-7-11)
下载区间:2022年6月1日-6月30日。
数据名称 | 提交时间 | 订单号 | 下载时间 |
---|---|---|---|
FY-3E自主星历产品 | 7.1-7.31 | A202208030277265488 | |
7-1到7月31日,订单编号
2.数据介绍
2.1ERA-5数据介绍
2.2探空气球数据
---------------------------------
Variable Columns Type
---------------------------------
HEADREC 1- 1 Character
ID 2- 12 Character
YEAR 14- 17 Integer
MONTH 19- 20 Integer
DAY 22- 23 Integer
HOUR 25- 26 Integer
RELTIME 28- 31 Integer
NUMLEV 33- 36 Integer
P_SRC 38- 45 Character
NP_SRC 47- 54 Character
LAT 56- 62 Integer
LON 64- 71 Integer
---------------------------------
3.数据筛选
4.绘图
4.1三种轨道卫星分布图
很奇怪,没有GEO卫星的图
ReadAllNcDataUtils readAllNcDataUtils = new ReadAllNcDataUtils();
List<NetcdfFile> ncDataList = readAllNcDataUtils.getNcDataList("D:\\BaiduNetdiskWorkspace\\论文\\风云3E\\数据\\down06");
List<ncBean> ncBeans = new ArrayList<ncBean>();
for (NetcdfFile netcdfFile : ncDataList) {
ncBean latLonInfo = getLatLonInfo(netcdfFile);
ncBeans.add(latLonInfo);
}
createExcel(ncBeans,"type");
matlab画图
figure('color','white')
load coast;
%绘制全球海岸线
plot(long,lat,'color',[0,0,0],'LineWidth',1);hold on;
axis equal;axis tight;grid on;
%scatter(geolon,geolat,'filled','b')
hold on
x2=scatter(meolon,meolat,'filled','g');
hold on
x1=scatter(igsolon,igsolat,'filled','r');
legend([x1(1),x2(1)],'IGSO', 'MEO');
ylabel('纬度/°')
xlabel('经度/°')
set(gca, 'xTick', [-180, -150, -120,-90,-60,-30,0,30,60,90,120,150,180]);
set(gca,'xticklabel',{'180W','150W','120W','90W','60W','30W','0','30E','60E','90E','120E','150E','180E'});
set(gca, 'yTick', [-90, -60, -30,0,30,60,90]);
set(gca,'yticklabel',{'90S','60S','30S','0','30N','60N','90N'});
set(gca,'FontSize',15,'FontWeight','bold');
4.2最低探测高度
这个暂时不写了。似乎存在问题。
ReadAllNcDataUtils readAllNcDataUtils = new ReadAllNcDataUtils();
List<NetcdfFile> ncDataList = readAllNcDataUtils.getNcDataList("D:\\BaiduNetdiskWorkspace\\论文\\风云3E\\数据\\downl3");
List<ncBean> ncBeans = new ArrayList<ncBean>();
for (NetcdfFile netcdfFile : ncDataList) {
ncBean lowDetect = getLowDetect(netcdfFile);
ncBeans.add(lowDetect);
}
int[] ints = new int[648];
double[] sums = new double[648];
for (getInfo.ncBean ncBean : ncBeans) {
for (int i1 = 0; i1 < 648; i1++) {
if (ncBean.spaceIndex == i1) {
ints[i1]++;
sums[i1] = sums[i1] + ncBean.min_alt;
break;
}
}
}
HSSFWorkbook hssfWorkbook = new HSSFWorkbook();
//第二部,在workbook中创建一个sheet对应excel中的sheet
HSSFSheet sheet = hssfWorkbook.createSheet("用户表");
//第三部,在sheet表中添加表头第0行,老版本的poi对sheet的行列有限制
HSSFRow row = sheet.createRow(0);
HSSFCell cell;
cell = row.createCell(0);
cell.setCellValue("num");
cell = row.createCell(1);
cell.setCellValue("sum");
for (int i = 0; i < ints.length; i++) {
HSSFRow row1 = sheet.createRow(i);
row1.createCell(0).setCellValue(ints[i]);
row1.createCell(1).setCellValue(sums[i]);
}
String str = "/最低探测高度.xls";
makeExcel("D:\\BaiduNetdiskWorkspace\\论文\\风云3E\\数据", str, hssfWorkbook);
4.3平均偏差与标准偏差
int[] var = {1, 2, 3, 5, 7, 10, 20, 30, 50, 70, 100, 125, 150, 175, 200, 225, 250, 300, 350, 400, 450, 500};
String[] varDay = {"01", "02", "03", "04", "05", "06", "07", "08", "09", "10","11", "12", "13", "14", "15", "16", "17", "18", "19", "20"};
ReadAllNcDataUtils readAllNcDataUtils = new ReadAllNcDataUtils();
ArrayList<resultBean> resultBeans = new ArrayList<resultBean>();
for (String s : varDay) {
log.info("开始解析第" + s + "号的FY-3E掩星数据。");
//1.根据日期01,02,03,这种来找到针对的掩星数据和再分析数据
List<NetcdfFile> ncDataList = readAllNcDataUtils.getNcDataListByDay("D:\\BaiduNetdiskWorkspace\\论文\\风云3E\\数据\\downl3", s);
log.info("开始解析" + changeName(s) + ".nc");
NetcdfFile singleNcData = readAllNcDataUtils.getSingleNcData("D:\\BaiduNetdiskWorkspace\\ec\\ec" + changeName(s) + ".nc");
Array t = ReadAllNcDataUtils.getVariablesValue("t", singleNcData);
assert t != null;
short[][][][] o = (short[][][][]) t.copyToNDJavaArray();
//修改一下名字,区分01和11的区别
log.info(s + "号的FY-3E掩星数据数量为" + ncDataList.size() + "个。");
if (ncDataList.size() != 0) {
List<Integer> layers = new ArrayList<Integer>();
List<Double> difs = new ArrayList<Double>();
List<Double> alts = new ArrayList<Double>();
List<Double> r2s = new ArrayList<Double>();
//将再分析数据的每一层与每一个掩星数据进行比较
log.info("开始对" + s + "号的FY-3E掩星数据进行分层获取数据。");
for (NetcdfFile netcdfFile : ncDataList) {
for (int k : var) {
ncBean fy = getFy(k, netcdfFile, o);
if (fy != null) {
layers.add(k);
difs.add(fy.temp_dif);
r2s.add(fy.temp_r);
alts.add(fy.alt);
}
}
}
for (int k : var) {
log.info("数据分层处理完毕,开始对第" + k + "层进行统计计算。");
resultBean resultBean = new resultBean();
List<Integer> layers_layer_1 = new ArrayList<Integer>();
List<Double> layers_dif_1 = new ArrayList<Double>();
List<Double> layers_r_1 = new ArrayList<Double>();
List<Double> layers_alt_1 = new ArrayList<Double>();
for (int i1 = 0; i1 < layers.size(); i1++) {
if (layers.get(i1) == k) {
layers_layer_1.add(k);
layers_dif_1.add(difs.get(i1));
layers_r_1.add(r2s.get(i1));
layers_alt_1.add(alts.get(i1));
}
}
double dif_sum = 0.0;
double r_sum = 0.0;
double alt_sum = 0.0;
// 总共是层数,个数,平均偏差,标准偏差
for (int j = 0; j < layers_layer_1.size(); j++) {
dif_sum = dif_sum + layers_dif_1.get(j);
r_sum = r_sum + layers_r_1.get(j);
alt_sum = alt_sum + layers_alt_1.get(j);
}
if (layers_layer_1.size() != 0) {
resultBean.layerIndex = k;
resultBean.layerNumber = layers_layer_1.size();
resultBean.averDif = dif_sum;
resultBean.std = r_sum;
resultBean.alt = alt_sum / layers_layer_1.size();
resultBeans.add(resultBean);
} else {
break;
}
}
}
}
ArrayList<resultBean> result2Excel = new ArrayList<resultBean>();
for (int k : var) {
double dif_sum = 0.0;
double r_sum = 0.0;
double alt_sum = 0.0;
int number = 0;
int kk = 0;
resultBean midBean = new resultBean();
for (getInfo.resultBean resultBean : resultBeans) {
if (resultBean.getLayerIndex() == k) {
//TODO:这里的kk有可能有点问题,少了一个
kk = kk + 1;
dif_sum = dif_sum + resultBean.getAverDif();
r_sum = r_sum + resultBean.getStd();
alt_sum = alt_sum + resultBean.getAlt();
number = number + resultBean.getLayerNumber();
}
}
midBean.layerIndex = k;
midBean.layerNumber = kk;
midBean.setAverDif(dif_sum / number);
midBean.setStd(Math.sqrt(r_sum / number));
midBean.setAlt(alt_sum / kk);
result2Excel.add(midBean);
}
log.info("开始生成excel");
HSSFWorkbook hssfWorkbook = new HSSFWorkbook();
//第二部,在workbook中创建一个sheet对应excel中的sheet
HSSFSheet sheet = hssfWorkbook.createSheet("用户表");
//第三部,在sheet表中添加表头第0行,老版本的poi对sheet的行列有限制
HSSFRow row = sheet.createRow(0);
HSSFCell cell;
cell = row.createCell(0);
cell.setCellValue("layer");
cell = row.createCell(1);
cell.setCellValue("layerNumber");
cell = row.createCell(2);
cell.setCellValue("dif");
cell = row.createCell(3);
cell.setCellValue("r");
cell = row.createCell(4);
cell.setCellValue("alt");
for (int i = 0; i < result2Excel.size(); i++) {
HSSFRow row1 = sheet.createRow(i);
//0,层标识码;1,层的样本数量;2,平均偏差;3,标准偏差;4,探测高度
row1.createCell(0).setCellValue(result2Excel.get(i).layerIndex);
row1.createCell(1).setCellValue(result2Excel.get(i).layerNumber);
row1.createCell(2).setCellValue(result2Excel.get(i).averDif);
row1.createCell(3).setCellValue(result2Excel.get(i).std);
row1.createCell(4).setCellValue(result2Excel.get(i).alt);
}
String str = "/层数与误差.xls";
makeExcel("D:\\BaiduNetdiskWorkspace\\论文\\风云3E\\数据", str, hssfWorkbook);
4.4每天的廓线数量
4.5随机森林修正
在本小节当中,将开始使用python进行计算处理。
- 首先是将原始数据进行提取,生成适宜于进行机器学习的格式,即excel格式会好一点。
- 然后对生成的标准格式数据进行2,8原则分离,即训练集与测试集。
- 画一个经纬度信息图
- 平均偏差,标准偏差的折线图。
- 高中低纬度的一个整图
随机森林mse-------> 3.35972638340233 原始mse------> 4.545396470500042
版权属于: 依依东望