One of the NCL core developers was going to put the REMO
GRIB table which you provided into NCL's soon-to-be-released v6.2.0
but he responded as follows:
----
It is not going to be possible to support the REMO GRIB table as
long as they are putting out 0 for the center id. 0 is not a
recognized center id, so there is no valid way to identify where the
GRIB file is coming from.
---- For you, this means that you will manually have to add the attribute information. On 3/28/14, 8:33 AM, Mark Chan wrote: > Dear Dennis, > > Thanks so so much! > I am so moved for the kindly help. I will try to work on it following your suggestion. > > With my best regards, > Mark > > > > On Friday, March 28, 2014 3:21 PM, Dennis Shea <shea@ucar.edu> wrote: > > [1] NCL's functions expect the hybrid coefficients to be > of the form > > p = a(k)*p0 + b(k)*ps > > [2] The REMO coefficients which you sent as an ascii file are > of the form > > p = ap(k) + b(k)*ps > > where ap(k) => =a(k)*p0 > > Hence, to use NCL's functions you must convert. This is trivial. > > ; Read hybrid coefficients; make REMO coefficients like CAM coefficients > > dir_coef = "./" > fil_coef = "REMO2.coeficients" > coef = readAsciiTable(dir_coef+fil_coef, 3, "float", 2) > hyam = coef(:,1) > hybm = coef(:,2) > > P0 = 100000. ; make like CAM > hyam = hyam/P0 > > print("---") > print(sprintf("%9.6f", hyam)+" "+sprintf("%9.6f", hybm)) > > [3] The REMO GRIB tables are not fully contained with NCL's > built-in suite of GRIB lookup tables. > > Complete info on NCL's GRIB is at: > > http://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/NclFormatSupport.shtml#GRIB > > This can be a bit overwhelming so no need to read it. > > However, the section: "User-defined GRIB1 parameter tables" > > would allow you to input the appropriate GRIB table form > expected by NCL. The table you sent would have to be reformatted. > > The attached added the meta data. > > It creates a netCDF file. > > Good luck > > > > On 3/21/14, 8:53 PM, Dennis Shea wrote: >> The file contains no hybrid coefficients. It contains >> numbers for each hybrid level. These are useless for >> interpolation to constant ressure levels.. >> >> ncl-talk has no REMO files available to examine. >> If you send a REMO files (grib or netCDF) include >> another file with the actualy hybrid coefficients on it. >> >> --- >> >> ftp ftp.cgd.ucar.edu >> anonymous >> email >> cd incoming >> put REMO.{grb,nc} >> put REMO_hybrid,{grb,nc} >> quit >> >> Then send email to ncl-talk@ucar.edu stating the names >> of the files. Please do not reply or cc me. >> >> Cheers >> >> >> On 3/21/14, 3:41 PM, Mark Chan wrote: >>> Dear NCL users, >>> >>> From the link below I found an example for interpolation from hybrid coordinates to pressure levels, but as it said that it only works for CSM data. I have REMO data and wonder how to do the interpolation. Expecially I am not sure how to define variables such as "PS", "hyam", "hybm" as shown in the below: >>> T = in->T ; select variable to ave >>> P0mb =1000. >>> hyam = in->hyam ; get a coefficiants >>> hybm = in->hybm ; get b coefficiants >>> PS = in->PS ; get pressure >>> https://www.ncl.ucar.edu/Applications/Scripts/vert_1.ncl >>> >>> >>> ---my data info from ncdump is as:------------ >>> >>> netcdf CC_var131 { >>> dimensions: >>> initial_time0_hours = 21 ; >>> lv_HYBY1 = 27 ; >>> g0_lat_2 = 300 ; >>> g0_lon_3 = 400 ; >>> ncl_strlen_0 = 18 ; >>> variables: >>> float VAR_131_GDS0_HYBY(initial_time0_hours, lv_HYBY1, g0_lat_2, g0_lon_3) ; >>> VAR_131_GDS0_HYBY:forecast_time_units = "hours" ; >>> VAR_131_GDS0_HYBY:forecast_time = 0 ; >>> VAR_131_GDS0_HYBY:parameter_number = 131 ; >>> VAR_131_GDS0_HYBY:parameter_table_version = 128 ; >>> VAR_131_GDS0_HYBY:gds_grid_type = 0 ; >>> VAR_131_GDS0_HYBY:level_indicator = 110 ; >>> VAR_131_GDS0_HYBY:_FillValue = 1.e+20f ; >>> VAR_131_GDS0_HYBY:units = "unknown" ; >>> VAR_131_GDS0_HYBY:long_name = "Unknown Variable Name" ; >>> double initial_time0_hours(initial_time0_hours) ; >>> initial_time0_hours:units = "hours since 1800-01-01 00:00" ; >>> initial_time0_hours:long_name = "initial time" ; >>> double initial_time0_encoded(initial_time0_hours) ; >>> initial_time0_encoded:units = "yyyymmddhh.hh_frac" ; >>> initial_time0_encoded:long_name = "initial time encoded as double" ; >>> float g0_lat_2(g0_lat_2) ; >>> g0_lat_2:La1 = 28.f ; >>> g0_lat_2:Lo1 = -10.f ; >>> g0_lat_2:La2 = 60.89f ; >>> g0_lat_2:Lo2 = 33.89f ; >>> g0_lat_2:Di = 0.11f ; >>> g0_lat_2:Dj = 0.11f ; >>> g0_lat_2:units = "degrees_north" ; >>> g0_lat_2:GridType = "Cylindrical Equidistant Projection Grid" ; >>> g0_lat_2:long_name = "latitude" ; >>> float g0_lon_3(g0_lon_3) ; >>> g0_lon_3:La1 = 28.f ; >>> g0_lon_3:Lo1 = -10.f ; >>> g0_lon_3:La2 = 60.89f ; >>> g0_lon_3:Lo2 = 33.89f ; >>> g0_lon_3:Di = 0.11f ; >>> g0_lon_3:Dj = 0.11f ; >>> g0_lon_3:units = "degrees_east" ; >>> g0_lon_3:GridType = "Cylindrical Equidistant Projection Grid" ; >>> g0_lon_3:long_name = "longitude" ; >>> int lv_HYBY1_l1(lv_HYBY1) ; >>> lv_HYBY1_l1:units = "number" ; >>> lv_HYBY1_l1:long_name = "layer between two hybrid levels" ; >>> int lv_HYBY1_l0(lv_HYBY1) ; >>> lv_HYBY1_l0:units = "number" ; >>> lv_HYBY1_l0:long_name = "layer between two hybrid levels" ; >>> char initial_time0(initial_time0_hours, ncl_strlen_0) ; >>> initial_time0:NCL_converted_from_type = "string" ; >>> initial_time0:units = "mm/dd/yyyy (hh:mm)" ; >>> initial_time0:long_name = "Initial time of first record" ; >>> // global attributes: >>> :creation_date = "Fri Mar 21 16:00:34 CET 2014" ; >>> :NCL_Version = "6.1.2" ; >>> :system = "Linux hexagon-1 2.6.32.59-0.7.1_1.0402.7200-cray_gem_s #1 SMP Wed May 1 03:59:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux" ; >>> :Conventions = "None" ; >>> :grib_source = "CC_var131.grb" ; >>> :title = "NCL: convert-GRIB-to-netCDF" ; >>> >>> >>> Thanks so much in advance! >>> Mark >>> >>> >>> >>> _______________________________________________ >>> ncl-talk mailing list >>> List instructions, subscriber options, unsubscribe: >>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk > >>> >> _______________________________________________ >> ncl-talk mailing list >> List instructions, subscriber options, unsubscribe: >> http://mailman.ucar.edu/mailman/listinfo/ncl-talk >> _______________________________________________ ncl-talk mailing list List instructions, subscriber options, unsubscribe: http://mailman.ucar.edu/mailman/listinfo/ncl-talkReceived on Fri Mar 28 11:53:08 2014
This archive was generated by hypermail 2.1.8 : Mon Mar 31 2014 - 11:47:09 MDT