【问题标题】:Problems when i convert Grib2 to Netcdf4将 Grib2 转换为 Netcdf4 时出现的问题
【发布时间】:2018-05-12 17:06:30
【问题描述】:

当我尝试从 CFSR 转换一些 grib 文件时遇到了一些问题。 当我在unix shell中使用ncl_convert2nc时,nc文件信息是这样的:

 netcdf flxf01.gdas.197901 {
dimensions:
        ygrid_0 = UNLIMITED ; // (0 currently)
        lv_DBLL0 = 4 ;

variables:

// global attributes:
                :creation_date = "Sun Nov 12 11:29:36 AEDT 2017" ;
                :NCL_Version = "6.3.0" ;
                :system = "Linux charcoalp-Lenovo-Erazer-Y50-70 4.10.0-38-generic #42-Ubuntu SMP Tue Oct 10 13:24:27 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux" ;
                :Conventions = "None" ;
                :grib_source = "flxf01.gdas.197901.grb2" ;
                :title = "NCL: convert-GRIB-to-netCDF" ;
}

只有在我转换 CFSR 数据 grib2 文件时才会发生这种情况。

这里是原始文件的部分信息:

Nio file:   flxf01.gdas.197901.grb2
   global attributes:
   dimensions:
      lat_0 = 576
      lon_0 = 1152
      lv_DBLL0 = 4
   variables:
      float TMP_P8_L1_GGA0_avg744h [ lat_0, lon_0 ]
         center :   US National Weather Service - NCEP (WMC)
         production_status :    Operational products
         long_name :    Temperature
         units :    K
         _FillValue :   1e+20
         grid_type :    Gaussian latitude/longitude
         parameter_discipline_and_category :    Meteorological products, Temperature
         parameter_template_discipline_category_number :    [8, 0, 0, 0]
         level_type :   Ground or water surface
         level :    0
         type_of_statistical_processing :   Average
         statistical_process_duration : 744 hours (ending at forecast time)
         forecast_time :    745
         forecast_time_units :  hours
         initial_time : 01/01/1979 (00:00)
      float TMP_P8_L103_GGA0_avg744h [ lat_0, lon_0 ]
         center :   US National Weather Service - NCEP (WMC)
         production_status :    Operational products
         long_name :    Temperature
         units :    K
         _FillValue :   1e+20
         grid_type :    Gaussian latitude/longitude
         parameter_discipline_and_category :    Meteorological products, Temperature
         parameter_template_discipline_category_number :    [8, 0, 0, 0]
         level_type :   Specified height level above ground (m)
         level :    2
         type_of_statistical_processing :   Average
         statistical_process_duration : 744 hours (ending at forecast time)
         forecast_time :    745
         forecast_time_units :  hours
         initial_time : 01/01/1979 (00:00)

如您所见,它能够从 grib 文件中找到变量。那么为什么nc文件是空的呢? ncl_convert2nc 为 JRA-55 再分析数据集的 Grib 文件工作。谁能帮我找出问题所在?

【问题讨论】:

    标签: python type-conversion netcdf grib ncl


    【解决方案1】:

    只是出于兴趣,您是否尝试过使用 CDO?我认为命令是:

    cdo -f nc4 copy in.grb out.nc  
    

    【讨论】:

    • 但是在使用 cdo 将 grib2 转换为 nc 时,转换后的 nc 文件中未定义时间轴,如何在使用 cdo -f 转换为 nc 文件时设置时间戳
    • 你好,没有文件很难说,你为什么不发布一个单独的问题并附上文件的链接?
    猜你喜欢
    • 2013-03-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-03-04
    相关资源
    最近更新 更多