NCAR / wrf-python

A collection of diagnostic and interpolation routines for use with output from the Weather Research and Forecasting (WRF-ARW) Model.
https://wrf-python.readthedocs.io
Apache License 2.0
410 stars 155 forks source link

Wrong bounds of nested domain file #114

Closed zxdawn closed 4 years ago

zxdawn commented 4 years ago

I tried to get the bounds of the nested wrfout* file named wrfout_d03_2019-07-24_18-00-00.

Here's the info of that file read by Dataset:

<class 'netCDF4._netCDF4.Dataset'>
root group (NETCDF4 data model, file format HDF5):
    TITLE:  OUTPUT FROM *             PROGRAM:WRF-Chem V4.1.4 MODEL
    START_DATE: 2019-07-24_18:00:00
    SIMULATION_START_DATE: 2019-07-24_18:00:00
    WEST-EAST_GRID_DIMENSION: 331
    SOUTH-NORTH_GRID_DIMENSION: 331
    BOTTOM-TOP_GRID_DIMENSION: 75
    DX: 600.0
    DY: 600.0
    AERCU_OPT: 0
    AERCU_FCT: 1.0
    IDEAL_CASE: 0
    DIFF_6TH_SLOPEOPT: 0
    AUTO_LEVELS_OPT: 2
    DIFF_6TH_THRESH: 0.1
    DZBOT: 50.0
    DZSTRETCH_S: 1.3
    DZSTRETCH_U: 1.1
    SKEBS_ON: 0
    SPEC_BDY_FINAL_MU: 1
    USE_Q_DIABATIC: 0
    GRIDTYPE: C
    DIFF_OPT: 1
    KM_OPT: 4
    DAMP_OPT: 3
    DAMPCOEF: 0.2
    KHDIF: 0.0
    KVDIF: 0.0
    MP_PHYSICS: 6
    RA_LW_PHYSICS: 4
    RA_SW_PHYSICS: 4
    SF_SFCLAY_PHYSICS: 1
    SF_SURFACE_PHYSICS: 2
    BL_PBL_PHYSICS: 1
    CU_PHYSICS: 0
    SF_LAKE_PHYSICS: 0
    SURFACE_INPUT_SOURCE: 1
    SST_UPDATE: 0
    GRID_FDDA: 0
    GFDDA_INTERVAL_M: 0
    GFDDA_END_H: 0
    GRID_SFDDA: 0
    SGFDDA_INTERVAL_M: 0
    SGFDDA_END_H: 0
    HYPSOMETRIC_OPT: 2
    USE_THETA_M: 1
    GWD_OPT: 1
    SF_URBAN_PHYSICS: 0
    SF_SURFACE_MOSAIC: 0
    SF_OCEAN_PHYSICS: 0
    SHCU_PHYSICS: 0
    MFSHCONV: 0
    FEEDBACK: 1
    SMOOTH_OPTION: 0
    SWRAD_SCAT: 1.0
    W_DAMPING: 0
    RADT: 3.0
    BLDT: 0.0
    CUDT: 0.0
    AER_OPT: 0
    SWINT_OPT: 0
    AER_TYPE: 1
    AER_AOD550_OPT: 1
    AER_ANGEXP_OPT: 1
    AER_SSA_OPT: 1
    AER_ASY_OPT: 1
    AER_AOD550_VAL: 0.12
    AER_ANGEXP_VAL: 1.3
    AER_SSA_VAL: 0.85
    AER_ASY_VAL: 0.9
    MOIST_ADV_OPT: 1
    SCALAR_ADV_OPT: 1
    TKE_ADV_OPT: 1
    DIFF_6TH_OPT: 0
    DIFF_6TH_FACTOR: 0.12
    OBS_NUDGE_OPT: 0
    BUCKET_MM: -1.0
    BUCKET_J: -1.0
    PREC_ACC_DT: 0.0
    ISFTCFLX: 0
    ISHALLOW: 0
    ISFFLX: 1
    ICLOUD: 1
    ICLOUD_CU: 0
    TRACER_PBLMIX: 1
    SCALAR_PBLMIX: 0
    YSU_TOPDOWN_PBLMIX: 0
    GRAV_SETTLING: 0
    DFI_OPT: 0
    SIMULATION_INITIALIZATION_TYPE: REAL-DATA CASE
    WEST-EAST_PATCH_START_UNSTAG: 1
    WEST-EAST_PATCH_END_UNSTAG: 330
    WEST-EAST_PATCH_START_STAG: 1
    WEST-EAST_PATCH_END_STAG: 331
    SOUTH-NORTH_PATCH_START_UNSTAG: 1
    SOUTH-NORTH_PATCH_END_UNSTAG: 330
    SOUTH-NORTH_PATCH_START_STAG: 1
    SOUTH-NORTH_PATCH_END_STAG: 331
    BOTTOM-TOP_PATCH_START_UNSTAG: 1
    BOTTOM-TOP_PATCH_END_UNSTAG: 74
    BOTTOM-TOP_PATCH_START_STAG: 1
    BOTTOM-TOP_PATCH_END_STAG: 75
    GRID_ID: 3
    PARENT_ID: 2
    I_PARENT_START: 40
    J_PARENT_START: 50
    PARENT_GRID_RATIO: 5
    DT: 2.0
    CEN_LAT: 32.12231
    CEN_LON: 118.82324
    TRUELAT1: 30.0
    TRUELAT2: 60.0
    MOAD_CEN_LAT: 32.00001
    STAND_LON: 119.0
    POLE_LAT: 90.0
    POLE_LON: 0.0
    GMT: 18.0
    JULYR: 2019
    JULDAY: 205
    MAP_PROJ: 1
    MAP_PROJ_CHAR: Lambert Conformal
    MMINLU: MODIFIED_IGBP_MODIS_NOAH
    NUM_LAND_CAT: 21
    ISWATER: 17
    ISLAKE: 21
    ISICE: 15
    ISURBAN: 13
    ISOILWATER: 14
    HYBRID_OPT: 2
    ETAC: 0.2

However, the output of geo_bounds(wrfin=ds) is wrong:

GeoBounds(CoordPair(lat=0.0, lon=0.0), CoordPair(lat=0.0, lon=0.0))
zxdawn commented 4 years ago

Sorry, this is caused by the broken file. Close now.