Re: ncl_convert2nc w/ GRIB user-defined ptable

From: Jun Asanuma <asanuma_at_nyahnyahspammersnyahnyah>
Date: Fri, 21 Dec 2007 12:58:11 +0900

Hi Dave,

Thank you very much for your comments. I reorganized the file as follows
and fount the conversion works well.

I am feeling NCL is a nice analyzing platform.

---------------------------------------------
-1:-1:-1:-1
111:SWnet:W/m^2:Net Shortwave Radiation
112:LWnet:W/m^2:Net Longwave Radiation
121:Qle:W/m^2:Latent Heat Flux
122:Qh:W/m^2:Sensible Heat Flux
155:Qg:W/m^2:Ground Heat Flux
131:Snowf:kg/m^2/s:Snowfall rate
.......
----------------------------------------------

Cheers,

David Brown wrote:
> Hi Jun,
>
> Your parameter table is not in the format that NCL needs.
> The units need to be placed before the long descriptive name.
> Units and long name need to be separated using the separator character
> (':' in your case, as established by line beginning with -1).
>
> You can see from the listing of the dumAtts variable that the way you
> have the parameter tables set up confuses NCL regarding the units and
> long_name attributes:
>
> units : Surface incident longwave radiation W/m^2
> long_name : (null)
>
> You need to change all the entries in your table as follows:
>
> 001:PSurf:Surface pressure Pa
>
> to
>
> 001:PSurf: Pa : Surface pressure
>
>
> We will try to fix NCL so that it reports an error rather than seg
> faulting in this situation.
>
> -dave
>
>
>
>
> On Dec 20, 2007, at 5:42 PM, Jun Asanuma wrote:
>
>> Hi,
>>
>> I just installed NCL to convert GLDAS GRIB files into NetCDF by using
>> ncl_convert2nc, but the program terminated with "segmentation fault".
>> Can anyone give me a suggestion?
>>
>> OS: Linux v2.6.18-5-686 #1 SMP i686 GNU/Linux
>> NCL version: 5.0.0
>> I installed the binary for linux given in the NCL homepage.
>> Data: GLDAS data set (GRIB w/non-builtin p-table)
>>
>> Detail:
>>
>> Converting a file without specifying the p-table was succesfull, but,
>> of course, with some parameters named as unknown.
>>
>> --
>> %> ncl_convert2nc clm10_m/2007/GLDAS_CLM10_M.EB.A200705.001.grb
>> --
>>
>> When the external p-table is specified with NCL_GRIB_PTABLE, it fails
>> with segmentation fault.
>>
>> --
>> %> env NCL_GRIB_PTABLE_PATH=gribtab ./ncl_convert2nc \
>> clm10_m/2007/GLDAS_CLM10_M.EB.A200705.001.grb
>>
>> Processing file: GLDAS_CLM10_M.EB.A200705.001.grb...
>> Copyright (C) 1995-2007 - All Rights Reserved
>> University Corporation for Atmospheric Research
>> NCAR Command Language Version 5.0.0
>> The use of this software is governed by a License Agreement.
>> See http://www.ncl.ucar.edu/ for more details.
>> Segmentation fault
>> --
>>
>> The p-table I used is provided by the GLDAS team and is given at the
>> end of this mail. Closer look at the problem showed that it failed at
>> the line 903 of ncl_convert2nc as
>>
>> --------
>> filevarattdef(fnc, ncVarNames(i) , dumAtts)
>> --------
>>
>> Here ncVarNames(i) and dumAtts are displayed with print command as
>> follows.
>>
>> ------------------------------
>> Variable: ncVarNames (subsection)
>> Type: string
>> Total Size: 4 bytes
>> 1 values
>> Number of Dimensions: 1
>> Dimensions and sizes: [1]
>> Coordinates:
>> LWdown_0_SFC_ave3h
>>
>> Variable: dumAtts
>> Type: float
>> Total Size: 4 bytes
>> 1 values
>> Number of Dimensions: 1
>> Dimensions and sizes: [1]
>> Coordinates:
>> Number Of Attributes: 11
>> initial_time : 05/01/2007 (00:00)
>> forecast_time_units : hours
>> forecast_time : 3
>> parameter_number : 205
>> parameter_table_version : 1
>> gds_grid_type : 0
>> level_indicator : 1
>> _FillValue : -999
>> units : Surface incident longwave radiation W/m^2
>> long_name : (null)
>> center : Zagreb
>> -999
>> -----------------------------------
>>
>> I also tried a script given at
>>
>> http://www.ncl.ucar.edu/Applications/griball.shtml
>>
>> but it also gives segmentation fault as well. Would anyone give me a
>> suggestion?
>>
>> ---- contents of gribtab -----------------
>> -1:-1:-1:-1
>> 001:PSurf:Surface pressure Pa
>> 011:Tair:Near surface air temperature K
>> 032:Wind:Near surface wind magnitude m/s
>> 051:Qair:Near surface specific humidity kg/kg
>> 057:Evap:Total Evapotranspiration kg/m^2/s
>> 059:Rainfforc:Rainfall rate kg/m^2/s
>> 064:Snowfforc:Snowfall rate kg/m^2/s
>> 065:SWE:Snow Water Equivalent kg/m^2
>> 068:DelSoilMoist:Change in soil moisture kg/m^2
>> 070:RootMoist:Root zone soil moisture kg/m^2
>> 071:Canopint:Total canopy water storage kg/m^2
>> 078:DelSWE:Change in snow water equivalent kg/m^2
>> 084:Albedo:Surface Albedo, All Wavelengths -
>> 085:SoilTemp10:Average layer 10 soil temperature K
>> 085:SoilTemp1:Average layer 1 soil temperature K
>> 085:SoilTemp2:Average layer 2 soil temperature K
>> 085:SoilTemp3:Average layer 3 soil temperature K
>> 085:SoilTemp4:Average layer 4 soil temperature K
>> 085:SoilTemp5:Average layer 5 soil temperature K
>> 085:SoilTemp6:Average layer 6 soil temperature K
>> 085:SoilTemp7:Average layer 7 soil temperature K
>> 085:SoilTemp8:Average layer 8 soil temperature K
>> 085:SoilTemp9:Average layer 9 soil temperature K
>> 086:SoilMoist10:Average layer 10 soil moisture kg/m^2
>> 086:SoilMoist1:Average layer 1 soil moisture kg/m^2
>> 086:SoilMoist2:Average layer 2 soil moisture kg/m^2
>> 086:SoilMoist3:Average layer 3 soil moisture kg/m^2
>> 086:SoilMoist4:Average layer 4 soil moisture kg/m^2
>> 086:SoilMoist5:Average layer 5 soil moisture kg/m^2
>> 086:SoilMoist6:Average layer 6 soil moisture kg/m^2
>> 086:SoilMoist7:Average layer 7 soil moisture kg/m^2
>> 086:SoilMoist8:Average layer 8 soil moisture kg/m^2
>> 086:SoilMoist9:Average layer 9 soil moisture kg/m^2
>> 099:Qsm:Snowmelt kg/m^2/s
>> 111:SWnet:Net Shortwave Radiation W/m^2
>> 112:LWnet:Net Longwave Radiation W/m^2
>> 121:Qle:Latent Heat Flux W/m^2
>> 122:Qh:Sensible Heat Flux W/m^2
>> 131:Snowf:Snowfall rate kg/m^2/s
>> 132:Rainf:Rainfall rate kg/m^2/s
>> 135:SnowT:Snow Temperature K
>> 136:VegT:Vegetation Canopy Temperature K
>> 137:BaresoilT:Temperature of bare soil K
>> 138:AvgSurfT:Average Surface Temperature K
>> 139:RadT:Surface Radiative Temperature K
>> 155:Qg:Ground Heat Flux W/m^2
>> 174:ACond:Aerodynamic conductance m/s
>> 199:ESoil:Bare soil evaporation kg/m^2/s
>> 200:ECanop:Interception evaporation kg/m^2/s
>> 204:SWdown:Surface incident shortwave radiation W/m^2
>> 205:LWdown:Surface incident longwave radiation W/m^2
>> 207:SoilWet:Total Soil Wetness -
>> 210:TVeg:Vegetation transpiration kg/m^2/s
>> 234:Qsb:Subsurface Runoff kg/m^2/s
>> 235:Qs:Surface Runoff kg/m^2/s
>> -------- gribtab end -----------------
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk_at_ucar.edu
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>

-- 
=======================
??????????????
???
Jun Asanuma
Assoc. Professor
Terrestrial Environment Research Center
Tsukuba Univeristy
URL: http://alpine.suiri.tsukuba.ac.jp
mail: asanuma_at_suiri.tsukuba.ac.jp
Voice&Fax: 029-853-6704
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Dec 20 2007 - 20:58:11 MST

This archive was generated by hypermail 2.2.0 : Mon Dec 31 2007 - 09:18:02 MST