[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDFJava #VCW-324829]: why do variable values change when I convert from grib2 to netcdf?



Cool!

> Thanks, John.
> 
> I had no idea that different versions of toolsUI would cause something like
> this.  I just updated to 4.5 and they agree now.
> 
> Larry
> 
> address@hidden> wrote:
> 
> > Hi Larry:
> >
> > 1) its a grib1 file.
> >
> > 2) its likely that you are seeing differences between netcdf-java version
> > 4.2 and 4.5. Hopefully the 4.5 version is correct.
> >
> > 3) The Originating Center is (200) Papua New Guinea, and we are using our
> > best guess as to what tables they are using. You might want to look closely
> > to see if they make sense, and let us know if they dont.
> >
> > Regards,
> > John
> >
> >
> > > Sure.  Here it is.
> > >
> > > I'm stumped.  I hope you have some idea what's going on!
> > >
> > > Thanks,
> > >
> > > Larry Mastin
> > >
> > > address@hidden> wrote:
> > >
> > > > that is a bit mysterious. can you send us the original grib file?
> > > >
> > > > > Dear Conduit support:
> > > > >
> > > > > I recently received some meteorological data files from Italian
> > > > colleagues
> > > > > that appear to be in Grib2 format.  I was able to convert them to
> > netcdf
> > > > > format by typing:
> > > > >
> > > > > java -Xmx2048m -classpath ~/ncj/netcdfAll-4.5.jar
> > > > > ucar.nc2.dataset.NetcdfDataset \
> > > > > -in 2015_02_01_000.meteo -out 2015_02_01_000.nc
> > > > >
> > > > > Surprisingly however, the declarations and values of some of the
> > > > variables
> > > > > seem to change when I convert to netcdf.
> > > > >
> > > > > For example, I can view the "y" variable in the grib file by opening
> > it
> > > > in
> > > > > ToolsUI-4.2.jar, right-clicking on variable y and choosing
> > "ncdump."  I
> > > > get:
> > > > >
> > > > >
> > > >
> > *****************************************************************************************************************************************************
> > > > >
> > > > > double y(y=101);
> > > > > :units = "degrees";
> > > > > :long_name = "y coordinate of projection";
> > > > > :standard_name = "projection_y_coordinate";
> > > > > :grid_spacing = "-9999.0 degrees";
> > > > > :_CoordinateAxisType = "GeoY";
> > > > >
> > > > > data:
> > > > >
> > > > > {-23.0, -10022.0, -20021.0, -30020.0, -40019.0, -50018.0, -60017.0,
> > > > > -70016.0, -80015.0, -90014.0, -100013.0, -110012.0, -120011.0,
> > -130010.0,
> > > > > -140009.0, -150008.0, -160007.0, -170006.0, -180005.0, -190004.0,
> > > > > -200003.0, -210002.0, -220001.0, -230000.0, -239999.0, -249998.0,
> > > > > -259997.0, -269996.0, -279995.0, -289994.0, -299993.0, -309992.0,
> > > > > -319991.0, -329990.0, -339989.0, -349988.0, -359987.0, -369986.0,
> > > > > -379985.0, -389984.0, -399983.0, -409982.0, -419981.0, -429980.0,
> > > > > -439979.0, -449978.0, -459977.0, -469976.0, -479975.0, -489974.0,
> > > > > -499973.0, -509972.0, -519971.0, -529970.0, -539969.0, -549968.0,
> > > > > -559967.0, -569966.0, -579965.0, -589964.0, -599963.0, -609962.0,
> > > > > -619961.0, -629960.0, -639959.0, -649958.0, -659957.0, -669956.0,
> > > > > -679955.0, -689954.0, -699953.0, -709952.0, -719951.0, -729950.0,
> > > > > -739949.0, -749948.0, -759947.0, -769946.0, -779945.0, -789944.0,
> > > > > -799943.0, -809942.0, -819941.0, -829940.0, -839939.0, -849938.0,
> > > > > -859937.0, -869936.0, -879935.0, -889934.0, -899933.0, -909932.0,
> > > > > -919931.0, -929930.0, -939929.0, -949928.0, -959927.0, -969926.0,
> > > > > -979925.0, -989924.0, -999923.0}
> > > > >
> > > > >
> > > >
> > *****************************************************************************************************************************************************
> > > > >
> > > > > In the netcdf file, I view the y variable by typing:
> > > > >
> > > > > $ncdump -v y 2015_02_01_000.nc
> > > > >
> > > > > When I do so, the y variable is declared as:
> > > > >
> > > > >
> > > >
> > *****************************************************************************************************************************************************
> > > > > . . .
> > > > > float y(y) ;
> > > > > y:standard_name = "projection_y_coordinate" ;
> > > > > y:units = "km" ;
> > > > > . . .
> > > > >
> > > >
> > *****************************************************************************************************************************************************
> > > > >
> > > > > And the values are given as:
> > > > >
> > > > >
> > > >
> > *****************************************************************************************************************************************************
> > > > > data:
> > > > >
> > > > > y = -23, -22.9375, -22.875, -22.8125, -22.75, -22.6875, -22.625,
> > > > -22.5625,
> > > > > -22.5, -22.4375, -22.375, -22.3125, -22.25, -22.1875, -22.125,
> > > > > -22.0625,
> > > > > -22, -21.9375, -21.875, -21.8125, -21.75, -21.6875, -21.625,
> > -21.5625,
> > > > > -21.5, -21.4375, -21.375, -21.3125, -21.25, -21.1875, -21.125,
> > > > > -21.0625,
> > > > > -21, -20.9375, -20.875, -20.8125, -20.75, -20.6875, -20.625,
> > -20.5625,
> > > > > -20.5, -20.4375, -20.375, -20.3125, -20.25, -20.1875, -20.125,
> > > > > -20.0625,
> > > > > -20, -19.9375, -19.875, -19.8125, -19.75, -19.6875, -19.625,
> > -19.5625,
> > > > > -19.5, -19.4375, -19.375, -19.3125, -19.25, -19.1875, -19.125,
> > > > > -19.0625,
> > > > > -19, -18.9375, -18.875, -18.8125, -18.75, -18.6875, -18.625,
> > -18.5625,
> > > > > -18.5, -18.4375, -18.375, -18.3125, -18.25, -18.1875, -18.125,
> > > > > -18.0625,
> > > > > -18, -17.9375, -17.875, -17.8125, -17.75, -17.6875, -17.625,
> > -17.5625,
> > > > > -17.5, -17.4375, -17.375, -17.3125, -17.25, -17.1875, -17.125,
> > > > > -17.0625,
> > > > > -17, -16.9375, -16.875, -16.8125, -16.75 ;
> > > > >
> > > > >
> > > >
> > *****************************************************************************************************************************************************
> > > > >
> > > > > These y values are clearly different from the ones in the grib file.
> > > > >
> > > > > Is there some automatic change that happens when I convert from grib
> > to
> > > > > netcdf using that java command?
> > > > >
> > > > > Thanks very much for your help.
> > > > >
> > > > > Sincerely,
> > > > >
> > > > > Larry Mastin
> > > > >
> > > > > --
> > > > > U.S. Geological Survey
> > > > > David A. Johnston Cascades Volcano Observatory
> > > > > 1300 SE Cardinal Court, Bldg. 10, Suite 100
> > > > > Vancouver, WA 98683 USA
> > > > > tel. (360) 993-8925
> > > > > fax (360) 993-8980
> > > > >
> > > > >
> > > >
> > > >
> > > > Ticket Details
> > > > ===================
> > > > Ticket ID: VCW-324829
> > > > Department: Support netCDF Java
> > > > Priority: Normal
> > > > Status: Open
> > > >
> > > >
> > >
> > >
> > > --
> > > U.S. Geological Survey
> > > David A. Johnston Cascades Volcano Observatory
> > > 1300 SE Cardinal Court, Bldg. 10, Suite 100
> > > Vancouver, WA 98683 USA
> > > tel. (360) 993-8925
> > > fax (360) 993-8980
> > >
> > >
> >
> >
> > Ticket Details
> > ===================
> > Ticket ID: VCW-324829
> > Department: Support netCDF Java
> > Priority: Normal
> > Status: Closed
> >
> >
> 
> 
> --
> U.S. Geological Survey
> David A. Johnston Cascades Volcano Observatory
> 1300 SE Cardinal Court, Bldg. 10, Suite 100
> Vancouver, WA 98683 USA
> tel. (360) 993-8925
> fax (360) 993-8980
> 
> 


Ticket Details
===================
Ticket ID: VCW-324829
Department: Support netCDF Java
Priority: Critical
Status: Closed