爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 2092|回复: 10

ERA5转ARL问题

[复制链接]

新浪微博达人勋

发表于 2022-1-23 15:12:27 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册 新浪微博登陆

x
我使用王老师在Meteoinfo官网上给出的ERA5转ARL的例子,程序运行并没有报错,也顺利出来了ARL文件,但是我再用Meteoinfo打开却无法正常打开,一直报错。请问这是什么问题呢?代码如下,仅改动文件路径:

#---- Set data folder
datadir = r'D:/lunwen'
#---- Set output data file
outfn = os.path.join(datadir, 'test_era5_grib_diff.arl')
#---- Read a GRIB data file
infn3d = addfile('{}/3D.grib'.format(datadir))
infn2d = addfile('{}/2D.grib  '.format(datadir))

print 'GRIB data file has been opened...'
#---- Set output ARL data file
arlf = addfile(outfn, 'c', dtype='arl')

#---- Set variable and level list
#---- Variable names in ERA5 data file
gvar2d = ['Surface_pressure_surface','2_metre_temperature_surface','10_metre_U_wind_component_surface',\
    '10_metre_V_wind_component_surface','Boundary_layer_height_surface','Convective_available_potential_energy_surface',\
    'Instantaneous_eastward_turbulent_surface_stress_surface','Instantaneous_northward_turbulent_surface_stress_surface']

gvar3d = ['Geopotential_isobaric','Temperature_isobaric','Vertical_velocity_isobaric',\
    'U_component_of_wind_isobaric','V_component_of_wind_isobaric','Relative_humidity_isobaric']

#---- Corresponding variable names in ARL data file
avar2d = ['PRSS','T02M','U10M','V10M','PBLH','CAPE','UMOF','VMOF']
avar3d = ['HGTS','TEMP','WWND','UWND','VWND','RELH']
#--- Add DIFF fields - difference between the original data and the packed data
avar3d_diff = list(avar3d)
avar3d_diff.append('DIFW')

#---- Set parameters of ARL data file
gv = infn3d['Geopotential_isobaric']
nx = gv.dimlen(gv.ndim - 1)
ny = gv.dimlen(gv.ndim - 2)
levels = gv.dimvalue(gv.ndim - 3)[::-1]
nz = len(levels)
arlf.setlevels(levels)
arlf.set2dvar(avar2d)
for l in levels:
    arlf.set3dvar(avar3d_diff)
arlf.setx(gv.dimvalue(gv.ndim - 1))
arlf.sety(gv.dimvalue(gv.ndim - 2))

#---- Write ARL data file
tNum = infn3d.timenum()
fhour = 0
for t in range(0, tNum):
    print 'Time index: ' + str(t)
    atime = infn3d.gettime(t)
    print atime.strftime('%Y-%m-%d %H:00')
    dhead = arlf.getdatahead(infn3d.proj, 'RSMC', 2, fhour)
    #Pre-write index record without checksum - will be over-write latter
    arlf.writeindexrec(atime, dhead)
    #Checksum list
    ksumlist = []
    # Write 2d variables
    ksums = []
    for avname,gvname in zip(avar2d, gvar2d):
        gdata = infn2d[gvname][t,:,:]
        if avname == 'PRSS':
            gdata = gdata * 0.01
        ksum = arlf.writedatarec(atime, 0, avname, fhour, 99, gdata)
        ksums.append(ksum)
    ksumlist.append(ksums)
    # Write 3d variables
    for lidx in range(0, nz):
        ksums = []
        llidx = nz - lidx - 1
        print(lidx,llidx)
        for avname,gvname in zip(avar3d, gvar3d):
            gdata = infn3d[gvname][t,llidx,:,:]
            if avname == 'WWND':
                gdata = gdata * 0.01
                difw = arlf.diff_origin_pack(gdata)
            elif avname == 'SPHU':
                gdata = gdata * 1000.
            elif avname == 'HGTS':
                gdata = gdata / 9.80665
            ksum = arlf.writedatarec(atime, lidx + 1, avname, fhour, 99, gdata)
            ksums.append(ksum)
        ksum = arlf.writedatarec(atime, lidx + 1, 'DIFW', fhour, 99, difw)
        ksums.append(ksum)
        ksumlist.append(ksums)
    #Re-write index record with checksum
    arlf.writeindexrec(atime, dhead, ksumlist)
    fhour += 1
arlf.close()
print 'Finished!'


密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2022-1-23 15:17:09 | 显示全部楼层
File Name: D:\lunwen\3D.grib
File type: GRIB1 Collection (GRIB-1)
Dimensions: 4
        lon = 401;
        lat = 241;
        time = 4;
        isobaric = 37;
X Dimension: Xmin = 50.000003814697266; Xmax = 150.0; Xsize = 401; Xdelta = 0.25
Y Dimension: Ymin = 60.000003814697266; Ymax = 3.814697265625E-6; Ysize = 241; Ydelta = -0.25
Global Attributes:
        : :Originating_or_generating_Center = "European Centre for Medium Range Weather Forecasts (ECMWF) (RSMC)"
        : :Originating_or_generating_Subcenter = "0"
        : :GRIB_table_version = "0,128"
        : :file_format = "GRIB-1"
        : :Conventions = "CF-1.6"
        : :history = "Read using CDM IOSP GribCollection v3"
        : :featureType = "GRID"
Variations: 12
        int LatLon_Projection);
                LatLon_Projection: :grid_mapping_name = "latitude_longitude"
                LatLon_Projection: :earth_radius = 6367470.0
        float lat(lat);
                lat: :units = "degrees_north"
        float lon(lon);
                lon: :units = "degrees_east"
        double time(time);
                time: :units = "Hour since 2018-06-24T00:00:00Z"
                time: :standard_name = "time"
                time: :long_name = "GRIB forecast or observation time"
                time: :calendar = "proleptic_gregorian"
        double reftime(time);
                reftime: :standard_name = "forecast_reference_time"
                reftime: :long_name = "GRIB reference time"
                reftime: :calendar = "proleptic_gregorian"
                reftime: :units = "Hour since 2018-06-24T00:00:00Z"
        float isobaric(isobaric);
                isobaric: :units = "hPa"
                isobaric: :long_name = "Isobaric surface"
                isobaric: :positive = "down"
                isobaric: :Grib_level_type = 100
        float Geopotential_isobaric(time,isobaric,lat,lon);
                Geopotential_isobaric: :long_name = "Geopotential @ Isobaric surface"
                Geopotential_isobaric: :units = "m**2 s**-2"
                Geopotential_isobaric: :missing_value = NaNf
                Geopotential_isobaric: :grid_mapping = "LatLon_Projection"
                Geopotential_isobaric: :coordinates = "reftime time isobaric lat lon "
                Geopotential_isobaric: :Grib_Variable_Id = "VAR_98-0-128-129_L100"
                Geopotential_isobaric: :Grib1_Center = 98
                Geopotential_isobaric: :Grib1_Subcenter = 0
                Geopotential_isobaric: :Grib1_TableVersion = 128
                Geopotential_isobaric: :Grib1_Parameter = 129
                Geopotential_isobaric: :Grib1_Parameter_Name = "z"
                Geopotential_isobaric: :Grib1_Level_Type = 100
                Geopotential_isobaric: :Grib1_Level_Desc = "Isobaric surface"
                Geopotential_isobaric: :Grib1_Interval_Type = -1
                Geopotential_isobaric: :Grib1_Interval_Name = "Unknown Time Range Indicator -1"
        float Temperature_isobaric(time,isobaric,lat,lon);
                Temperature_isobaric: :long_name = "Temperature @ Isobaric surface"
                Temperature_isobaric: :units = "K"
                Temperature_isobaric: :missing_value = NaNf
                Temperature_isobaric: :grid_mapping = "LatLon_Projection"
                Temperature_isobaric: :coordinates = "reftime time isobaric lat lon "
                Temperature_isobaric: :Grib_Variable_Id = "VAR_98-0-128-130_L100"
                Temperature_isobaric: :Grib1_Center = 98
                Temperature_isobaric: :Grib1_Subcenter = 0
                Temperature_isobaric: :Grib1_TableVersion = 128
                Temperature_isobaric: :Grib1_Parameter = 130
                Temperature_isobaric: :Grib1_Parameter_Name = "t"
                Temperature_isobaric: :Grib1_Level_Type = 100
                Temperature_isobaric: :Grib1_Level_Desc = "Isobaric surface"
                Temperature_isobaric: :Grib1_Interval_Type = -1
                Temperature_isobaric: :Grib1_Interval_Name = "Unknown Time Range Indicator -1"
        float U_component_of_wind_isobaric(time,isobaric,lat,lon);
                U_component_of_wind_isobaric: :long_name = "U component of wind @ Isobaric surface"
                U_component_of_wind_isobaric: :units = "m s**-1"
                U_component_of_wind_isobaric: :missing_value = NaNf
                U_component_of_wind_isobaric: :grid_mapping = "LatLon_Projection"
                U_component_of_wind_isobaric: :coordinates = "reftime time isobaric lat lon "
                U_component_of_wind_isobaric: :Grib_Variable_Id = "VAR_98-0-128-131_L100"
                U_component_of_wind_isobaric: :Grib1_Center = 98
                U_component_of_wind_isobaric: :Grib1_Subcenter = 0
                U_component_of_wind_isobaric: :Grib1_TableVersion = 128
                U_component_of_wind_isobaric: :Grib1_Parameter = 131
                U_component_of_wind_isobaric: :Grib1_Parameter_Name = "u"
                U_component_of_wind_isobaric: :Grib1_Level_Type = 100
                U_component_of_wind_isobaric: :Grib1_Level_Desc = "Isobaric surface"
                U_component_of_wind_isobaric: :Grib1_Interval_Type = -1
                U_component_of_wind_isobaric: :Grib1_Interval_Name = "Unknown Time Range Indicator -1"
        float V_component_of_wind_isobaric(time,isobaric,lat,lon);
                V_component_of_wind_isobaric: :long_name = "V component of wind @ Isobaric surface"
                V_component_of_wind_isobaric: :units = "m s**-1"
                V_component_of_wind_isobaric: :missing_value = NaNf
                V_component_of_wind_isobaric: :grid_mapping = "LatLon_Projection"
                V_component_of_wind_isobaric: :coordinates = "reftime time isobaric lat lon "
                V_component_of_wind_isobaric: :Grib_Variable_Id = "VAR_98-0-128-132_L100"
                V_component_of_wind_isobaric: :Grib1_Center = 98
                V_component_of_wind_isobaric: :Grib1_Subcenter = 0
                V_component_of_wind_isobaric: :Grib1_TableVersion = 128
                V_component_of_wind_isobaric: :Grib1_Parameter = 132
                V_component_of_wind_isobaric: :Grib1_Parameter_Name = "v"
                V_component_of_wind_isobaric: :Grib1_Level_Type = 100
                V_component_of_wind_isobaric: :Grib1_Level_Desc = "Isobaric surface"
                V_component_of_wind_isobaric: :Grib1_Interval_Type = -1
                V_component_of_wind_isobaric: :Grib1_Interval_Name = "Unknown Time Range Indicator -1"
        float Vertical_velocity_isobaric(time,isobaric,lat,lon);
                Vertical_velocity_isobaric: :long_name = "Vertical velocity @ Isobaric surface"
                Vertical_velocity_isobaric: :units = "Pa s**-1"
                Vertical_velocity_isobaric: :missing_value = NaNf
                Vertical_velocity_isobaric: :grid_mapping = "LatLon_Projection"
                Vertical_velocity_isobaric: :coordinates = "reftime time isobaric lat lon "
                Vertical_velocity_isobaric: :Grib_Variable_Id = "VAR_98-0-128-135_L100"
                Vertical_velocity_isobaric: :Grib1_Center = 98
                Vertical_velocity_isobaric: :Grib1_Subcenter = 0
                Vertical_velocity_isobaric: :Grib1_TableVersion = 128
                Vertical_velocity_isobaric: :Grib1_Parameter = 135
                Vertical_velocity_isobaric: :Grib1_Parameter_Name = "w"
                Vertical_velocity_isobaric: :Grib1_Level_Type = 100
                Vertical_velocity_isobaric: :Grib1_Level_Desc = "Isobaric surface"
                Vertical_velocity_isobaric: :Grib1_Interval_Type = -1
                Vertical_velocity_isobaric: :Grib1_Interval_Name = "Unknown Time Range Indicator -1"
        float Relative_humidity_isobaric(time,isobaric,lat,lon);
                Relative_humidity_isobaric: :long_name = "Relative humidity @ Isobaric surface"
                Relative_humidity_isobaric: :units = "%"
                Relative_humidity_isobaric: :missing_value = NaNf
                Relative_humidity_isobaric: :grid_mapping = "LatLon_Projection"
                Relative_humidity_isobaric: :coordinates = "reftime time isobaric lat lon "
                Relative_humidity_isobaric: :Grib_Variable_Id = "VAR_98-0-128-157_L100"
                Relative_humidity_isobaric: :Grib1_Center = 98
                Relative_humidity_isobaric: :Grib1_Subcenter = 0
                Relative_humidity_isobaric: :Grib1_TableVersion = 128
                Relative_humidity_isobaric: :Grib1_Parameter = 157
                Relative_humidity_isobaric: :Grib1_Parameter_Name = "r"
                Relative_humidity_isobaric: :Grib1_Level_Type = 100
                Relative_humidity_isobaric: :Grib1_Level_Desc = "Isobaric surface"
                Relative_humidity_isobaric: :Grib1_Interval_Type = -1
                Relative_humidity_isobaric: :Grib1_Interval_Name = "Unknown Time Range Indicator -1"
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

 楼主| 发表于 2022-1-23 15:24:09 | 显示全部楼层
File Name: D:\lunwen\2D.grib
File type: GRIB1 Collection (GRIB-1)
Dimensions: 3
        lon = 1440;
        lat = 721;
        time = 4;
X Dimension: Xmin = 0.0; Xmax = 359.75; Xsize = 1440; Xdelta = 0.25
Y Dimension: Ymin = 90.00000762939453; Ymax = -89.99999237060547; Ysize = 721; Ydelta = -0.25
Global Attributes:
        : :Originating_or_generating_Center = "European Centre for Medium Range Weather Forecasts (ECMWF) (RSMC)"
        : :Originating_or_generating_Subcenter = "0"
        : :GRIB_table_version = "0,128"
        : :file_format = "GRIB-1"
        : :Conventions = "CF-1.6"
        : :history = "Read using CDM IOSP GribCollection v3"
        : :featureType = "GRID"
Variations: 13
        int LatLon_Projection);
                LatLon_Projection: :grid_mapping_name = "latitude_longitude"
                LatLon_Projection: :earth_radius = 6367470.0
        float lat(lat);
                lat: :units = "degrees_north"
        float lon(lon);
                lon: :units = "degrees_east"
        double time(time);
                time: :units = "Hour since 2016-06-24T00:00:00Z"
                time: :standard_name = "time"
                time: :long_name = "GRIB forecast or observation time"
                time: :calendar = "proleptic_gregorian"
        double reftime(time);
                reftime: :standard_name = "forecast_reference_time"
                reftime: :long_name = "GRIB reference time"
                reftime: :calendar = "proleptic_gregorian"
                reftime: :units = "Hour since 2016-06-24T00:00:00Z"
        float Surface_pressure_surface(time,lat,lon);
                Surface_pressure_surface: :long_name = "Surface pressure @ Ground or water surface"
                Surface_pressure_surface: :units = "Pa"
                Surface_pressure_surface: :missing_value = NaNf
                Surface_pressure_surface: :grid_mapping = "LatLon_Projection"
                Surface_pressure_surface: :coordinates = "reftime time lat lon "
                Surface_pressure_surface: :Grib_Variable_Id = "VAR_98-0-128-134_L1"
                Surface_pressure_surface: :Grib1_Center = 98
                Surface_pressure_surface: :Grib1_Subcenter = 0
                Surface_pressure_surface: :Grib1_TableVersion = 128
                Surface_pressure_surface: :Grib1_Parameter = 134
                Surface_pressure_surface: :Grib1_Parameter_Name = "sp"
                Surface_pressure_surface: :Grib1_Level_Type = 1
                Surface_pressure_surface: :Grib1_Level_Desc = "Ground or water surface"
                Surface_pressure_surface: :Grib1_Interval_Type = -1
                Surface_pressure_surface: :Grib1_Interval_Name = "Unknown Time Range Indicator -1"
        float Boundary_layer_height_surface(time,lat,lon);
                Boundary_layer_height_surface: :long_name = "Boundary layer height @ Ground or water surface"
                Boundary_layer_height_surface: :units = "m"
                Boundary_layer_height_surface: :missing_value = NaNf
                Boundary_layer_height_surface: :grid_mapping = "LatLon_Projection"
                Boundary_layer_height_surface: :coordinates = "reftime time lat lon "
                Boundary_layer_height_surface: :Grib_Variable_Id = "VAR_98-0-128-159_L1"
                Boundary_layer_height_surface: :Grib1_Center = 98
                Boundary_layer_height_surface: :Grib1_Subcenter = 0
                Boundary_layer_height_surface: :Grib1_TableVersion = 128
                Boundary_layer_height_surface: :Grib1_Parameter = 159
                Boundary_layer_height_surface: :Grib1_Parameter_Name = "blh"
                Boundary_layer_height_surface: :Grib1_Level_Type = 1
                Boundary_layer_height_surface: :Grib1_Level_Desc = "Ground or water surface"
                Boundary_layer_height_surface: :Grib1_Interval_Type = -1
                Boundary_layer_height_surface: :Grib1_Interval_Name = "Unknown Time Range Indicator -1"
        float 10_metre_U_wind_component_surface(time,lat,lon);
                10_metre_U_wind_component_surface: :long_name = "10 metre U wind component @ Ground or water surface"
                10_metre_U_wind_component_surface: :units = "m s**-1"
                10_metre_U_wind_component_surface: :missing_value = NaNf
                10_metre_U_wind_component_surface: :grid_mapping = "LatLon_Projection"
                10_metre_U_wind_component_surface: :coordinates = "reftime time lat lon "
                10_metre_U_wind_component_surface: :Grib_Variable_Id = "VAR_98-0-128-165_L1"
                10_metre_U_wind_component_surface: :Grib1_Center = 98
                10_metre_U_wind_component_surface: :Grib1_Subcenter = 0
                10_metre_U_wind_component_surface: :Grib1_TableVersion = 128
                10_metre_U_wind_component_surface: :Grib1_Parameter = 165
                10_metre_U_wind_component_surface: :Grib1_Parameter_Name = "10u"
                10_metre_U_wind_component_surface: :Grib1_Level_Type = 1
                10_metre_U_wind_component_surface: :Grib1_Level_Desc = "Ground or water surface"
                10_metre_U_wind_component_surface: :Grib1_Interval_Type = -1
                10_metre_U_wind_component_surface: :Grib1_Interval_Name = "Unknown Time Range Indicator -1"
        float 10_metre_V_wind_component_surface(time,lat,lon);
                10_metre_V_wind_component_surface: :long_name = "10 metre V wind component @ Ground or water surface"
                10_metre_V_wind_component_surface: :units = "m s**-1"
                10_metre_V_wind_component_surface: :missing_value = NaNf
                10_metre_V_wind_component_surface: :grid_mapping = "LatLon_Projection"
                10_metre_V_wind_component_surface: :coordinates = "reftime time lat lon "
                10_metre_V_wind_component_surface: :Grib_Variable_Id = "VAR_98-0-128-166_L1"
                10_metre_V_wind_component_surface: :Grib1_Center = 98
                10_metre_V_wind_component_surface: :Grib1_Subcenter = 0
                10_metre_V_wind_component_surface: :Grib1_TableVersion = 128
                10_metre_V_wind_component_surface: :Grib1_Parameter = 166
                10_metre_V_wind_component_surface: :Grib1_Parameter_Name = "10v"
                10_metre_V_wind_component_surface: :Grib1_Level_Type = 1
                10_metre_V_wind_component_surface: :Grib1_Level_Desc = "Ground or water surface"
                10_metre_V_wind_component_surface: :Grib1_Interval_Type = -1
                10_metre_V_wind_component_surface: :Grib1_Interval_Name = "Unknown Time Range Indicator -1"
        float 2_metre_temperature_surface(time,lat,lon);
                2_metre_temperature_surface: :long_name = "2 metre temperature @ Ground or water surface"
                2_metre_temperature_surface: :units = "K"
                2_metre_temperature_surface: :missing_value = NaNf
                2_metre_temperature_surface: :grid_mapping = "LatLon_Projection"
                2_metre_temperature_surface: :coordinates = "reftime time lat lon "
                2_metre_temperature_surface: :Grib_Variable_Id = "VAR_98-0-128-167_L1"
                2_metre_temperature_surface: :Grib1_Center = 98
                2_metre_temperature_surface: :Grib1_Subcenter = 0
                2_metre_temperature_surface: :Grib1_TableVersion = 128
                2_metre_temperature_surface: :Grib1_Parameter = 167
                2_metre_temperature_surface: :Grib1_Parameter_Name = "2t"
                2_metre_temperature_surface: :Grib1_Level_Type = 1
                2_metre_temperature_surface: :Grib1_Level_Desc = "Ground or water surface"
                2_metre_temperature_surface: :Grib1_Interval_Type = -1
                2_metre_temperature_surface: :Grib1_Interval_Name = "Unknown Time Range Indicator -1"
        float Instantaneous_eastward_turbulent_surface_stress_surface(time,lat,lon);
                Instantaneous_eastward_turbulent_surface_stress_surface: :long_name = "Instantaneous eastward turbulent surface stress @ Ground or water surface"
                Instantaneous_eastward_turbulent_surface_stress_surface: :units = "N m**-2"
                Instantaneous_eastward_turbulent_surface_stress_surface: :missing_value = NaNf
                Instantaneous_eastward_turbulent_surface_stress_surface: :grid_mapping = "LatLon_Projection"
                Instantaneous_eastward_turbulent_surface_stress_surface: :coordinates = "reftime time lat lon "
                Instantaneous_eastward_turbulent_surface_stress_surface: :Grib_Variable_Id = "VAR_98-0-128-229_L1"
                Instantaneous_eastward_turbulent_surface_stress_surface: :Grib1_Center = 98
                Instantaneous_eastward_turbulent_surface_stress_surface: :Grib1_Subcenter = 0
                Instantaneous_eastward_turbulent_surface_stress_surface: :Grib1_TableVersion = 128
                Instantaneous_eastward_turbulent_surface_stress_surface: :Grib1_Parameter = 229
                Instantaneous_eastward_turbulent_surface_stress_surface: :Grib1_Parameter_Name = "iews"
                Instantaneous_eastward_turbulent_surface_stress_surface: :Grib1_Level_Type = 1
                Instantaneous_eastward_turbulent_surface_stress_surface: :Grib1_Level_Desc = "Ground or water surface"
                Instantaneous_eastward_turbulent_surface_stress_surface: :Grib1_Interval_Type = -1
                Instantaneous_eastward_turbulent_surface_stress_surface: :Grib1_Interval_Name = "Unknown Time Range Indicator -1"
        float Instantaneous_northward_turbulent_surface_stress_surface(time,lat,lon);
                Instantaneous_northward_turbulent_surface_stress_surface: :long_name = "Instantaneous northward turbulent surface stress @ Ground or water surface"
                Instantaneous_northward_turbulent_surface_stress_surface: :units = "N m**-2"
                Instantaneous_northward_turbulent_surface_stress_surface: :missing_value = NaNf
                Instantaneous_northward_turbulent_surface_stress_surface: :grid_mapping = "LatLon_Projection"
                Instantaneous_northward_turbulent_surface_stress_surface: :coordinates = "reftime time lat lon "
                Instantaneous_northward_turbulent_surface_stress_surface: :Grib_Variable_Id = "VAR_98-0-128-230_L1"
                Instantaneous_northward_turbulent_surface_stress_surface: :Grib1_Center = 98
                Instantaneous_northward_turbulent_surface_stress_surface: :Grib1_Subcenter = 0
                Instantaneous_northward_turbulent_surface_stress_surface: :Grib1_TableVersion = 128
                Instantaneous_northward_turbulent_surface_stress_surface: :Grib1_Parameter = 230
                Instantaneous_northward_turbulent_surface_stress_surface: :Grib1_Parameter_Name = "inss"
                Instantaneous_northward_turbulent_surface_stress_surface: :Grib1_Level_Type = 1
                Instantaneous_northward_turbulent_surface_stress_surface: :Grib1_Level_Desc = "Ground or water surface"
                Instantaneous_northward_turbulent_surface_stress_surface: :Grib1_Interval_Type = -1
                Instantaneous_northward_turbulent_surface_stress_surface: :Grib1_Interval_Name = "Unknown Time Range Indicator -1"
        float Convective_available_potential_energy_surface(time,lat,lon);
                Convective_available_potential_energy_surface: :long_name = "Convective available potential energy @ Ground or water surface"
                Convective_available_potential_energy_surface: :units = "J kg**-1"
                Convective_available_potential_energy_surface: :description = "Precipitation rate"
                Convective_available_potential_energy_surface: :missing_value = NaNf
                Convective_available_potential_energy_surface: :grid_mapping = "LatLon_Projection"
                Convective_available_potential_energy_surface: :coordinates = "reftime time lat lon "
                Convective_available_potential_energy_surface: :Grib_Variable_Id = "VAR_98-0-128-59_L1"
                Convective_available_potential_energy_surface: :Grib1_Center = 98
                Convective_available_potential_energy_surface: :Grib1_Subcenter = 0
                Convective_available_potential_energy_surface: :Grib1_TableVersion = 128
                Convective_available_potential_energy_surface: :Grib1_Parameter = 59
                Convective_available_potential_energy_surface: :Grib1_Parameter_Name = "cape"
                Convective_available_potential_energy_surface: :Grib1_Level_Type = 1
                Convective_available_potential_energy_surface: :Grib1_Level_Desc = "Ground or water surface"
                Convective_available_potential_energy_surface: :Grib1_Interval_Type = -1
                Convective_available_potential_energy_surface: :Grib1_Interval_Name = "Unknown Time Range Indicator -1"
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

发表于 2022-1-24 08:51:01 | 显示全部楼层
rolemodel 发表于 2022-1-23 15:24
File Name: D:\lunwen\2D.grib
File type: GRIB1 Collection (GRIB-1)
Dimensions: 3

有什么错误信息?
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

 楼主| 发表于 2022-1-30 12:25:22 | 显示全部楼层
MeteoInfo 发表于 2022-1-24 08:51
有什么错误信息?

王老师没有报错,这是运行时的提示:
Jython 2.7.2 (v2.7.2:925a3cc3b49d, Mar 21 2020, 10:03:58)
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java17.0.2
>>> run script...
GRIB data file has been opened...
Time index: 0
2018-06-24 00:00
(0, 36)
(1, 35)
(2, 34)
(3, 33)
(4, 32)
(5, 31)
(6, 30)
(7, 29)
(8, 28)
(9, 27)
(10, 26)
(11, 25)
(12, 24)
(13, 23)
(14, 22)
(15, 21)
(16, 20)
(17, 19)
(18, 18)
(19, 17)
(20, 16)
(21, 15)
(22, 14)
(23, 13)
(24, 12)
(25, 11)
(26, 10)
(27, 9)
(28, 8)
(29, 7)
(30, 6)
(31, 5)
(32, 4)
(33, 3)
(34, 2)
(35, 1)
(36, 0)
Time index: 1
2018-06-24 06:00
(0, 36)
(1, 35)
(2, 34)
(3, 33)
(4, 32)
(5, 31)
(6, 30)
(7, 29)
(8, 28)
(9, 27)
(10, 26)
(11, 25)
(12, 24)
(13, 23)
(14, 22)
(15, 21)
(16, 20)
(17, 19)
(18, 18)
(19, 17)
(20, 16)
(21, 15)
(22, 14)
(23, 13)
(24, 12)
(25, 11)
(26, 10)
(27, 9)
(28, 8)
(29, 7)
(30, 6)
(31, 5)
(32, 4)
(33, 3)
(34, 2)
(35, 1)
(36, 0)
Time index: 2
2018-06-24 12:00
(0, 36)
(1, 35)
(2, 34)
(3, 33)
(4, 32)
(5, 31)
(6, 30)
(7, 29)
(8, 28)
(9, 27)
(10, 26)
(11, 25)
(12, 24)
(13, 23)
(14, 22)
(15, 21)
(16, 20)
(17, 19)
(18, 18)
(19, 17)
(20, 16)
(21, 15)
(22, 14)
(23, 13)
(24, 12)
(25, 11)
(26, 10)
(27, 9)
(28, 8)
(29, 7)
(30, 6)
(31, 5)
(32, 4)
(33, 3)
(34, 2)
(35, 1)
(36, 0)
Time index: 3
2018-06-24 18:00
(0, 36)
(1, 35)
(2, 34)
(3, 33)
(4, 32)
(5, 31)
(6, 30)
(7, 29)
(8, 28)
(9, 27)
(10, 26)
(11, 25)
(12, 24)
(13, 23)
(14, 22)
(15, 21)
(16, 20)
(17, 19)
(18, 18)
(19, 17)
(20, 16)
(21, 15)
(22, 14)
(23, 13)
(24, 12)
(25, 11)
(26, 10)
(27, 9)
(28, 8)
(29, 7)
(30, 6)
(31, 5)
(32, 4)
(33, 3)
(34, 2)
(35, 1)
(36, 0)
Finished!
>>>
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

发表于 2022-1-30 15:49:17 | 显示全部楼层
rolemodel 发表于 2022-1-30 12:25
王老师没有报错,这是运行时的提示:
Jython 2.7.2 (v2.7.2:925a3cc3b49d, Mar 21 2020, 10:03:58)
[Ja ...

把之前生成的文件删除重新运行一下试试,如果输出文件已经存在的话可能会对结果产生影响
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

发表于 2023-9-22 00:48:52 | 显示全部楼层
MeteoInfo 发表于 2022-1-30 15:49
把之前生成的文件删除重新运行一下试试,如果输出文件已经存在的话可能会对结果产生影响

老师,请问一下运行hysplit需要用到所有pressure level的数据嘛?
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

发表于 2023-9-22 16:14:40 | 显示全部楼层
Airy佐 发表于 2023-9-22 00:48
老师,请问一下运行hysplit需要用到所有pressure level的数据嘛?

层数多一些总是好的
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

发表于 2023-9-26 20:48:01 | 显示全部楼层
MeteoInfo 发表于 2023-9-22 16:14
层数多一些总是好的

嗯嗯,已经成功运行了,谢谢老师~
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

发表于 2023-9-27 17:38:24 | 显示全部楼层
MeteoInfo 发表于 2023-9-22 16:14
层数多一些总是好的

老师,我还想请教一下,数据运行的时候是要将所有小时的数据都下载吗?
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表