/home/ddwsgood/MathModelComp/MathorCup2026/2026_初步评估/B_DeepSeek试解/源码/audit_tpdc_increment.py:170: FutureWarning: ChainedAssignmentError: behaviour will change in pandas 3.0!
You are setting values through chained assignment. Currently this works in certain cases, but when using Copy-on-Write (which will become the default behaviour in pandas 3.0) this will never work to update the original DataFrame or Series, because the intermediate object on which we are setting values will behave as a copy.
A typical example is when you are setting values in a column of a DataFrame, like:

df["col"][row_indexer] = value

Use `df.loc[row_indexer, "col"] = values` instead, to perform the assignment in a single step and ensure this keeps updating the original `df`.

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy

  path["dist_to_river_km"] = res
======================================================================
1) GFS 灾前预报（起报 2026-08-25 00Z）
nc=吉隆县GFS_降水云与水成物_20260825T00Z_f000-f072.nc
起报=2026-08-25T00:00:00Z 时次=[0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72]
网格 lat28.250-29.250 lon84.500-86.250
  site  grid_lat  grid_lon  fh        valid_utc  precip_rate_mm_h  precip_6h_mm  precip_cum_mm  cloud_water_path  precipitable_water
source     28.25     85.50   0 2026-08-25T00:00              0.00          0.00           0.00              0.01               15.31
source     28.25     85.50   6 2026-08-25T06:00              0.51          0.56           0.56              0.29               16.71
source     28.25     85.50  12 2026-08-25T12:00              0.04          1.00           1.56              0.14               16.90
source     28.25     85.50  18 2026-08-25T18:00              0.01          0.12           1.75              0.06               17.48
source     28.25     85.50  24 2026-08-26T00:00              0.00          0.00           1.75              0.09               15.71
source     28.25     85.50  30 2026-08-26T06:00              0.67          0.56           2.31              0.38               16.89
source     28.25     85.50  36 2026-08-26T12:00              0.54          3.06           5.38              1.42               19.05
source     28.25     85.50  42 2026-08-26T18:00              1.29         11.00          16.31              0.62               18.60
source     28.25     85.50  48 2026-08-27T00:00              0.55          3.31          19.69              0.94               18.20
source     28.25     85.50  54 2026-08-27T06:00              0.10          1.69          21.38              0.39               18.43
source     28.25     85.50  60 2026-08-27T12:00              0.07          1.44          22.81              0.29               17.85
source     28.25     85.50  66 2026-08-27T18:00              0.00          0.06          22.88              0.03               17.49
source     28.25     85.50  72 2026-08-28T00:00              0.00          0.06          22.94              0.05               16.96
  port     28.25     85.50   0 2026-08-25T00:00              0.00          0.00           0.00              0.01               15.31
  port     28.25     85.50   6 2026-08-25T06:00              0.51          0.56           0.56              0.29               16.71
  port     28.25     85.50  12 2026-08-25T12:00              0.04          1.00           1.56              0.14               16.90
  port     28.25     85.50  18 2026-08-25T18:00              0.01          0.12           1.75              0.06               17.48
  port     28.25     85.50  24 2026-08-26T00:00              0.00          0.00           1.75              0.09               15.71
  port     28.25     85.50  30 2026-08-26T06:00              0.67          0.56           2.31              0.38               16.89
  port     28.25     85.50  36 2026-08-26T12:00              0.54          3.06           5.38              1.42               19.05
  port     28.25     85.50  42 2026-08-26T18:00              1.29         11.00          16.31              0.62               18.60
  port     28.25     85.50  48 2026-08-27T00:00              0.55          3.31          19.69              0.94               18.20
  port     28.25     85.50  54 2026-08-27T06:00              0.10          1.69          21.38              0.39               18.43
  port     28.25     85.50  60 2026-08-27T12:00              0.07          1.44          22.81              0.29               17.85
  port     28.25     85.50  66 2026-08-27T18:00              0.00          0.06          22.88              0.03               17.49
  port     28.25     85.50  72 2026-08-28T00:00              0.00          0.06          22.94              0.05               16.96

事件当日 00-12 UTC 预报（源区/口岸）：
  site  fh        valid_utc  precip_rate_mm_h  precip_6h_mm
source  24 2026-08-26T00:00           0.00288        0.0000
source  30 2026-08-26T06:00           0.67392        0.5625
source  36 2026-08-26T12:00           0.54144        3.0625
  port  24 2026-08-26T00:00           0.00288        0.0000
  port  30 2026-08-26T06:00           0.67392        0.5625
  port  36 2026-08-26T12:00           0.54144        3.0625
source: 2026-08-26 00-18UTC 的 6h 累计之和 = 14.6 mm（仅 6h 量求和）
port: 2026-08-26 00-18UTC 的 6h 累计之和 = 14.6 mm（仅 6h 量求和）

======================================================================
2) TPCSM 5 km 模拟
nc 文件数: 5
file: dpre_20260822-0827.nc
dims: {'XTIME': 120, 'west_east': 210, 'south_north': 180}
  XTIME                 ('XTIME',) (120,) float32 minutes since 2026-08-21 06:00:00
  XLONG                 ('south_north', 'west_east') (180, 210) float32 degree_east
  XLAT                  ('south_north', 'west_east') (180, 210) float32 degree_north
  RAINNC                ('XTIME', 'south_north', 'west_east') (120, 180, 210) float32 mm
attrs: {'CDI': 'Climate Data Interface version 1.9.5 (http://mpimet.mpg.de/cdi)', 'history': 'Sat Aug 29 14:43:07 2026: cdo -cat dpre_2026-08-22_01.nc dpre_2026-08-22_02.nc dpre_2026-08-22_03.nc dpre_2026-08-22_04.nc dpre_2026-08-22_05.nc dpre_2026-08-22_06.nc dpre_2026-08-22_07.nc dpre_2026-08-22_08.nc dpre_2026-08-22_09.nc dpre_2026-08-22_10.nc dpre_2026-08-22_11.nc dpre_2026-08-22_12.nc dpre_2026-08-22_13.nc dpre_2026-08-22_14.nc dpre_2026-08-22_15.nc dpre_2026-08-22_16.nc dpre_2026-08-22_17.nc dpre_2026-08-22_18.nc dpre_2026-08-22_19.nc dpre_2026-08-22_20.nc dpre_2026-08-22_21.nc dpre_2026-08-22_22.nc dpre_2026-08-22_23.nc dpre_2026-08-23_00.nc dpre_2026-08-23_01.nc dpre_2026-08-23_02.nc dpre_2026-08-23_03.nc dpre_2026-08-23_04.nc dpre_2026-08-23_05.nc dpre_2026-08-23_06.nc dpre_2026-08-23_07.nc dpre_2026-08-23_08.nc dpre_2026-08-23_09.nc dpre_2026-08-23_10.nc dpre_2026-08-23_11.nc dpre_2026-08-23_12.nc dpre_2026-08-23_13.nc dpre_2026-08-23_14.nc dpre_2026-08-23_15.nc dpre_2026-08-23_16.nc dpre_2026-08-23_17.nc dpre_2026-08-23_18.nc dpre_2026-08-23_19.nc dpre_2026-08-23_20.nc dpre_2026-08-23_21.nc dpre_2026-08-23_22.nc dpre_2026-08-23_23.nc dpre_2026-08-24_00.nc dpre_2026-08-24_01.nc dpre_2026-08-24_02.nc dpre_2026-08-24_03.nc dpre_2026-08-24_04.nc dpre_2026-08-24_05.nc dpre_2026-08-24_06.nc dpre_2026-08-24_07.nc dpre_2026-08-24_08.nc dpre_2026-08-24_09.nc dpre_2026-08-24_10.nc dpre_2026-08-24_11.nc dpre_2026-08-24_12.nc dpre_2026-08-24_13.nc dpre_2026-08-24_14.nc dpre_2026-08-24_15.nc dpre_2026-08-24_16.nc dpre_2026-08-24_17.nc dpre_2026-08-24_18.nc dpre_2026-08-24_19.nc dpre_2026-08-24_20.nc dpre_2026-08-24_21.nc dpre_2026-08-24_22.nc dpre_2026-08-24_23.nc dpre_2026-08-25_00.nc dpre_2026-08-25_01.nc dpre_2026-08-25_02.nc dpre_2026-08-25_03.nc dpre_2026-08-25_04.nc dpre_2026-08-25_05.nc dpre_2026-08-25_06.nc dpre_2026-08-25_07.nc dpre_2026-08-25_08.nc dpre_2026-08-25_09.nc dpre_2026-08-25_10.nc dpre_2026-08-25_11.nc dpre_2026-08-25_12.nc dpre_2026-08-25_13.nc dpre_2026-08-25_14.nc dpre_2026-08-25_15.nc dpre_2026-08-25_16.nc dpre_2026-08-25_17.nc dpre_2026-08-25_18.nc dpre_2026-08-25_19.nc dpre_2026-08-25_20.nc dpre_2026-08-25_21.nc dpre_2026-08-25_22.nc dpre_2026-08-25_23.nc dpre_2026-08-26_00.nc dpre_2026-08-26_01.nc dpre_2026-08-26_02.nc dpre_2026-08-26_03.nc dpre_2026-08-26_04.nc dpre_2026-08-26_05.nc dpre_2026-08-26_06.nc dpre_2026-08-26_07.nc dpre_2026-08-26_08.nc dpre_2026-08-26_09.nc dpre_2026-08-26_10.nc dpre_2026-08-26_11.nc dpre_2026-08-26_12.nc dpre_2026-08-26_13.nc dpre_2026-08-26_14.nc dpre_2026-08-26_15.nc dpre_2026-08-26_16.nc dpre_2026-08-26_17.nc dpre_2026-08-26_18.nc dpre_2026-08-26_19.nc dpre_2026-08-26_20.nc dpre_2026-08-26_21.nc dpre_2026-08-26_22.nc dpre_2026-08-26_23.nc dpre_2026-08-27_00.nc dpre_20260826-0827.nc\nSat Aug 29 14:00:16 2026: cdo -sub prec_22-26/rainnc_2026-08-22_01.nc prec_22-26/rainnc_2026-08-22_00.nc dpre_2026-08-22_01.nc\nFri Aug 28 19:05:40 2026: cdo -selname,RAINNC data/wrfout_d02_2026-08-22_01:00:00 rainnc_2026-08-22_01.nc', 'Conventions': 'CF-1.6', 'TITLE': ' OUTPUT FROM WRF V4.0 MODEL', 'START_DATE': '2026-08-21_06:00:00', 'SIMULATION_START_DATE': '2026-08-21_06:00:00', 'WEST-EAST_GRID_DIMENSION': np.int32(211), 'SOUTH-NORTH_GRID_DIMENSION': np.int32(181), 'BOTTOM-TOP_GRID_DIMENSION': np.int32(50), 'DX': np.float32(5558.875), 'DY': np.float32(5558.875), 'AERCU_OPT': np.int32(0), 'AERCU_FCT': np.float32(1.0), 'IDEAL_CASE': np.int32(0), 'DIFF_6TH_SLOPEOPT': np.int32(0), 'AUTO_LEVELS_OPT': np.int32(2), 'DIFF_6TH_THRESH': np.float32(0.1), 'DZBOT': np.float32(50.0), 'DZSTRETCH_S': np.float32(1.3), 'DZSTRETCH_U': np.float32(1.1), 'SKEBS_ON': np.int32(0), 'SPEC_BDY_FINAL_MU': np.int32(1), 'USE_Q_DIABATIC': np.int32(0), 'GRIDTYPE': 'C', 'DIFF_OPT': np.int32(1), 'KM_OPT': np.int32(4), 'DAMP_OPT': np.int32(1), 'DAMPCOEF': np.float32(0.2), 'KHDIF': np.float32(0.0), 'KVDIF': np.float32(0.0), 'MP_PHYSICS': np.int32(8), 'RA_LW_PHYSICS': np.int32(3), 'RA_SW_PHYSICS': np.int32(3), 'SF_SFCLAY_PHYSICS': np.int32(1), 'SF_SURFACE_PHYSICS': np.int32(4), 'BL_PBL_PHYSICS': np.int32(9), 'CU_PHYSICS': np.int32(0), 'SF_LAKE_PHYSICS': np.int32(0), 'SURFACE_INPUT_SOURCE': np.int32(1), 'SST_UPDATE': np.int32(1), 'GRID_FDDA': np.int32(0), 'GFDDA_INTERVAL_M': np.int32(0), 'GFDDA_END_H': np.int32(0), 'GRID_SFDDA': np.int32(0), 'SGFDDA_INTERVAL_M': np.int32(0), 'SGFDDA_END_H': np.int32(0), 'HYPSOMETRIC_OPT': np.int32(2), 'USE_THETA_M': np.int32(1), 'GWD_OPT': np.int32(0), 'SF_URBAN_PHYSICS': np.int32(0), 'SF_SURFACE_MOSAIC': np.int32(0), 'SF_OCEAN_PHYSICS': np.int32(0), 'SHCU_PHYSICS': np.int32(2), 'MFSHCONV': np.int32(0), 'FEEDBACK': np.int32(0), 'SMOOTH_OPTION': np.int32(0), 'SWRAD_SCAT': np.float32(1.0), 'W_DAMPING': np.int32(1), 'RADT': np.float32(20.0), 'BLDT': np.float32(0.0), 'CUDT': np.float32(0.0), 'AER_OPT': np.int32(0), 'SWINT_OPT': np.int32(0), 'AER_TYPE': np.int32(1), 'AER_AOD550_OPT': np.int32(1), 'AER_ANGEXP_OPT': np.int32(1), 'AER_SSA_OPT': np.int32(1), 'AER_ASY_OPT': np.int32(1), 'AER_AOD550_VAL': np.float32(0.12), 'AER_ANGEXP_VAL': np.float32(1.3), 'AER_SSA_VAL': np.float32(0.85), 'AER_ASY_VAL': np.float32(0.9), 'MOIST_ADV_OPT': np.int32(1), 'SCALAR_ADV_OPT': np.int32(1), 'TKE_ADV_OPT': np.int32(1), 'DIFF_6TH_OPT': np.int32(1), 'DIFF_6TH_FACTOR': np.float32(0.12), 'OBS_NUDGE_OPT': np.int32(0), 'BUCKET_MM': np.float32(-1.0), 'BUCKET_J': np.float32(-1.0), 'PREC_ACC_DT': np.float32(0.0), 'ISFTCFLX': np.int32(0), 'ISHALLOW': np.int32(0), 'ISFFLX': np.int32(1), 'ICLOUD': np.int32(4), 'ICLOUD_CU': np.int32(0), 'TRACER_PBLMIX': np.int32(1), 'SCALAR_PBLMIX': np.int32(0), 'YSU_TOPDOWN_PBLMIX': np.int32(0), 'GRAV_SETTLING': np.int32(0), 'OPT_SFC': np.int32(3), 'DVEG': np.int32(8), 'OPT_CRS': np.int32(1), 'OPT_BTR': np.int32(1), 'OPT_RUN': np.int32(3), 'OPT_FRZ': np.int32(1), 'OPT_INF': np.int32(1), 'OPT_RAD': np.int32(3), 'OPT_ALB': np.int32(3), 'OPT_SNF': np.int32(4), 'OPT_TBOT': np.int32(2), 'OPT_STC': np.int32(1), 'OPT_GLA': np.int32(1), 'OPT_RSF': np.int32(1), 'OPT_SOIL': np.int32(5), 'OPT_PEDO': np.int32(1), 'OPT_CROP': np.int32(0), 'DFI_OPT': np.int32(0), 'SIMULATION_INITIALIZATION_TYPE': 'REAL-DATA CASE', 'WEST-EAST_PATCH_START_UNSTAG': np.int32(1), 'WEST-EAST_PATCH_END_UNSTAG': np.int32(210), 'WEST-EAST_PATCH_START_STAG': np.int32(1), 'WEST-EAST_PATCH_END_STAG': np.int32(211), 'SOUTH-NORTH_PATCH_START_UNSTAG': np.int32(1), 'SOUTH-NORTH_PATCH_END_UNSTAG': np.int32(180), 'SOUTH-NORTH_PATCH_START_STAG': np.int32(1), 'SOUTH-NORTH_PATCH_END_STAG': np.int32(181), 'BOTTOM-TOP_PATCH_START_UNSTAG': np.int32(1), 'BOTTOM-TOP_PATCH_END_UNSTAG': np.int32(49), 'BOTTOM-TOP_PATCH_START_STAG': np.int32(1), 'BOTTOM-TOP_PATCH_END_STAG': np.int32(50), 'GRID_ID': np.int32(2), 'PARENT_ID': np.int32(1), 'I_PARENT_START': np.int32(50), 'J_PARENT_START': np.int32(25), 'PARENT_GRID_RATIO': np.int32(3), 'DT': np.float32(20.0), 'CEN_LAT': np.float32(27.974998), 'CEN_LON': np.float32(84.67502), 'TRUELAT1': np.float32(1e+20), 'TRUELAT2': np.float32(1e+20), 'MOAD_CEN_LAT': np.float32(28.8), 'STAND_LON': np.float32(0.0), 'POLE_LAT': np.float32(90.0), 'POLE_LON': np.float32(0.0), 'GMT': np.float32(6.0), 'JULYR': np.int32(2026), 'JULDAY': np.int32(233), 'MAP_PROJ': np.int32(6), 'MAP_PROJ_CHAR': 'Cylindrical Equidistant', 'MMINLU': 'MODIFIED_IGBP_MODIS_NOAH', 'NUM_LAND_CAT': np.int32(21), 'ISWATER': np.int32(17), 'ISLAKE': np.int32(21), 'ISICE': np.int32(15), 'ISURBAN': np.int32(13), 'ISOILWATER': np.int32(14), 'HYBRID_OPT': np.int32(0), 'ETAC': np.float32(0.0), 'CDO': 'Climate Data Operators version 1.9.5 (http://mpimet.mpg.de/cdo)'}

======================================================================
3) 受灾位置点 / 河网 vs 我们的路径
受灾点位 shp 类型 1 点数 1 坐标 [(85.37751083772079, 28.278553539886374)]
河网线 11 条，节点 2138，bbox 85.1898-85.6484E 28.2455-28.5481N
路径终点 (85.3842,28.2855) 高程 1913 m；受灾点 (85.3775,28.2786)；距离 1.01 km
路径到最近河网节点：中位 0.163 km，p90 4.138 km，最大 5.205 km
前 6 个路径点的最近河距 (km): [5.205, 5.12, 4.879, 4.679, 4.5, 4.203]
后 6 个路径点的最近河距 (km): [0.152, 0.037, 0.06, 0.195, 0.124, 0.22]
