Package ucar.nc2.grib.grib2
Class Grib2Utils
- java.lang.Object
-
- ucar.nc2.grib.grib2.Grib2Utils
-
public class Grib2Utils extends Object
Static utilities for Grib-2- Since:
- 3/29/11
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Grib2Utils.LatLon2DCoord
static class
Grib2Utils.LatLonCoordType
-
Constructor Summary
Constructors Constructor Description Grib2Utils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
clean(String s)
static String
cleanupHeader(byte[] raw)
static CalendarPeriod
getCalendarPeriod(int timeUnit)
static Grib2Utils.LatLon2DCoord
getLatLon2DcoordType(int discipline, int category, int parameter)
static Grib2Utils.LatLonCoordType
getLatLon2DcoordType(String desc)
This looks for snippets in the variable name/desc as to whether it wants U, V, or P 2D coordinatesstatic String
getVariableName(Grib2Record gr)
static boolean
isCurvilinearOrthogonal(int gridTemplate, int center)
static boolean
isLatLon(int gridTemplate, int center)
static boolean
isLayer(Grib2Pds pds)
Check to see if this pds is a layer variable
-
-
-
Method Detail
-
cleanupHeader
public static String cleanupHeader(byte[] raw)
-
getVariableName
public static String getVariableName(Grib2Record gr)
-
getCalendarPeriod
@Nullable public static CalendarPeriod getCalendarPeriod(int timeUnit)
-
isLayer
public static boolean isLayer(Grib2Pds pds)
Check to see if this pds is a layer variable- Parameters:
pds
- record to check- Returns:
- true if a layer
-
isLatLon
public static boolean isLatLon(int gridTemplate, int center)
-
isCurvilinearOrthogonal
public static boolean isCurvilinearOrthogonal(int gridTemplate, int center)
-
getLatLon2DcoordType
@Nullable public static Grib2Utils.LatLon2DCoord getLatLon2DcoordType(int discipline, int category, int parameter)
-
getLatLon2DcoordType
public static Grib2Utils.LatLonCoordType getLatLon2DcoordType(String desc)
This looks for snippets in the variable name/desc as to whether it wants U, V, or P 2D coordinates- Parameters:
desc
- variable name/desc- Returns:
- U, V, or P for normal variables, null for the coordinates themselves
-
-