|
|
@@ -29,8 +29,8 @@ import com.ufo.project.weather.mapper.DataWeatherLocalMapper;
|
|
|
/**
|
|
|
* 功率与气象mock数据生成任务
|
|
|
*
|
|
|
- * 在 project.profile 目录下生成 超短期/短期/中期 功率预测mock文件(生产环境即 /home/power/upload/power/MOCK/BHWP01 下)
|
|
|
- * 及短期气象mock文件(生产环境即 /home/power/upload/weather/MOCK/BHWP01 下),
|
|
|
+ * 在 project.profile 目录下生成 超短期/短期/中期 功率预测mock文件(生产环境即 /home/power/upload/power/MOCK/YMPV03 下)
|
|
|
+ * 及短期气象mock文件(生产环境即 /home/power/upload/weather/MOCK/YMPV03 下),
|
|
|
* 供数据文件同步任务(data_file_sync_config)消费.
|
|
|
* 文件命名与init_time均使用UTC时间; time列为UTC, time_shanghai列为UTC+8.
|
|
|
* 文件格式:
|
|
|
@@ -44,10 +44,10 @@ import com.ufo.project.weather.mapper.DataWeatherLocalMapper;
|
|
|
*
|
|
|
* 短期气象mock为SYSU格式38列CSV, 自起报时间(含)起961点(10天), 间隔15分钟,
|
|
|
* 文件名时间为UTC, date_time列为GMT+8(即文件名时间+8h);
|
|
|
- * t2m/rh2/sp/云量/风/ghi/dni/dhi尽量符合物理规律, 按北纬38.9度定标, 同样按起报时间可复现.
|
|
|
+ * t2m/rh2/sp/云量/风/ghi/dni/dhi尽量符合物理规律, 按北纬35.1度定标, 同样按起报时间可复现.
|
|
|
*
|
|
|
* 另含采集数据mock任务(generateCollectedData): 每5分钟向 data_weather_local 与
|
|
|
- * data_electricity_local 各插1行, tm取当前最近5分钟整北京时间, config_station_id固定为2,
|
|
|
+ * data_electricity_local 各插1行, tm取当前最近5分钟整北京时间, config_station_id固定为4,
|
|
|
* 两行共享同一时刻物理状态(云量/钟形/季节), 数据尽量接近真实, 按北京日期可复现.
|
|
|
*
|
|
|
* @author ufo
|
|
|
@@ -97,14 +97,14 @@ public class MockDataTask
|
|
|
/** 中期数据点数(自起报时间(含)起960点) */
|
|
|
private static final int MEDIUM_POINTS = 960;
|
|
|
|
|
|
- /** 出力上限(kW, 与采集数据mock一致, 按150000kW装机容量定标) */
|
|
|
- private static final double POWER_CAP = 150000.0;
|
|
|
+ /** 出力上限(kW, 与采集数据mock一致, 按80000kW装机容量定标) */
|
|
|
+ private static final double POWER_CAP = 80000.0;
|
|
|
|
|
|
/** 采集数据mock固定场站ID(config_station_id) */
|
|
|
- private static final long COLLECT_STATION_ID = 2L;
|
|
|
+ private static final long COLLECT_STATION_ID = 4L;
|
|
|
|
|
|
/** 采集数据mock装机容量(kW) */
|
|
|
- private static final double COLLECT_CAPACITY_KW = 150000.0;
|
|
|
+ private static final double COLLECT_CAPACITY_KW = 80000.0;
|
|
|
|
|
|
/** 采集数据mock理论出力定标的晴空峰值辐照度(W/m², 夏季正午晴空) */
|
|
|
private static final double CLEAR_PEAK_REF = 850.0;
|
|
|
@@ -113,13 +113,13 @@ public class MockDataTask
|
|
|
private static final int WEATHER_POINTS = 961;
|
|
|
|
|
|
/** 气象mock场站编号(farm_id, 同时是文件名的场站段) */
|
|
|
- private static final String WEATHER_FARM_ID = "BHWP01";
|
|
|
+ private static final String WEATHER_FARM_ID = "YMPV03";
|
|
|
|
|
|
/** 气象mock固定经度(文件名按经度-纬度顺序) */
|
|
|
- private static final double WEATHER_LON = 121.4737;
|
|
|
+ private static final double WEATHER_LON = 118.3262;
|
|
|
|
|
|
/** 气象mock固定纬度 */
|
|
|
- private static final double WEATHER_LAT = 38.9087;
|
|
|
+ private static final double WEATHER_LAT = 35.0654;
|
|
|
|
|
|
/** 气象文件名日期格式(yyyyMMdd, UTC即北京日期) */
|
|
|
private static final DateTimeFormatter WEATHER_FILE_DATE_FMT = DateTimeFormatter.ofPattern("yyyyMMdd");
|
|
|
@@ -217,7 +217,7 @@ public class MockDataTask
|
|
|
|
|
|
/**
|
|
|
* 短期气象: 每天凌晨2点执行一次, 生成当日(北京日期)12:00 UTC起报的一个预报文件,
|
|
|
- * 自起报时间(含)起961点, 间隔15分钟, 输出到 weather/MOCK/BHWP01/;
|
|
|
+ * 自起报时间(含)起961点, 间隔15分钟, 输出到 weather/MOCK/YMPV03/;
|
|
|
* 文件名时间为UTC, date_time列为GMT+8(即文件名时间+8h)
|
|
|
*/
|
|
|
@Scheduled(cron = "0 0 2 * * ?")
|
|
|
@@ -238,8 +238,8 @@ public class MockDataTask
|
|
|
/**
|
|
|
* 采集数据: 每5分钟执行一次, 向 data_weather_local 与 data_electricity_local 各插1行,
|
|
|
* tm为当前时间就近取整到最近5分钟整北京时间(如00:05:34→00:05:00, 00:09:12→00:10:00),
|
|
|
- * config_station_id固定为2; 两行共享同一时刻的物理状态(云量/钟形/季节), 功率与气象描述同一天气;
|
|
|
- * 理论出力为按150000kW装机容量定标的晴空钟形(夏峰~150000/冬峰~112500, 夜间0),
|
|
|
+ * config_station_id固定为4; 两行共享同一时刻的物理状态(云量/钟形/季节), 功率与气象描述同一天气;
|
|
|
+ * 理论出力为按80000kW装机容量定标的晴空钟形(夏峰~80000/冬峰~61800, 夜间0),
|
|
|
* 实发功率=理论×慢快云量衰减×可用率(恒≤理论), 随机参数按北京日期派生, 当日数据稳定可复现
|
|
|
*/
|
|
|
@Scheduled(cron = "0 0/5 * * * ?")
|
|
|
@@ -476,7 +476,7 @@ public class MockDataTask
|
|
|
private Path generateFile(String type, ZonedDateTime init, DateTimeFormatter fileFmt,
|
|
|
DateTimeFormatter initFmt, int firstOffsetMin, int points) throws IOException
|
|
|
{
|
|
|
- Path dir = Paths.get(ProjectConfig.getProfile(), "power", "MOCK", "BHWP01", type,
|
|
|
+ Path dir = Paths.get(ProjectConfig.getProfile(), "power", "MOCK", "YMPV03", type,
|
|
|
String.format(Locale.ROOT, "%04d", init.getYear()),
|
|
|
String.format(Locale.ROOT, "%02d", init.getMonthValue()),
|
|
|
String.format(Locale.ROOT, "%02d", init.getDayOfMonth()));
|
|
|
@@ -512,7 +512,7 @@ public class MockDataTask
|
|
|
|
|
|
/**
|
|
|
* 计算mock光伏出力: 夜间为0, 白天钟形曲线, 峰值与日照时长随季节变化, 叠加缓慢云量波动;
|
|
|
- * 峰值按150000kW装机容量对晴空辐照定标(与采集数据mock同量纲, 夏峰~150000/冬峰~112500),
|
|
|
+ * 峰值按80000kW装机容量对晴空辐照定标(与采集数据mock同量纲, 夏峰~80000/冬峰~61800),
|
|
|
* 与采集数据在相近时刻的数值接近
|
|
|
*
|
|
|
* @param tUtc 数据时刻(UTC)
|