Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,7 @@ public static Set<String> getVariables(String path) {
if (isSelectableVariable(variable)) {
VariableDS variableDS = (VariableDS) variable;
List<CoordinateSystem> coordinateSystems = variableDS.getCoordinateSystems();

boolean isLatLon = ncd.findCoordinateAxis(AxisType.Lon) != null
&& ncd.findCoordinateAxis(AxisType.Lat) != null;

if (!coordinateSystems.isEmpty() || isLatLon) {
if (!coordinateSystems.isEmpty()) {
variableNames.add(variable.getFullName());
}
}
Expand Down Expand Up @@ -126,8 +122,10 @@ private static boolean isLatLon(NetcdfDataset ncd) {

private static boolean isSelectableVariable(Variable variable) {
boolean isVariableDS = variable instanceof VariableDS;
boolean isNotAxis = !(variable instanceof CoordinateAxis);
return isVariableDS && isNotAxis;
boolean isLatLon = variable.findDimensionIndex("latitude") >= 0
&& variable.findDimensionIndex("longitude") >= 0;

return isVariableDS || isLatLon;
}

static Grid scaleGrid(Grid grid, Unit<?> cellUnits, Unit<?> csUnits) {
Expand Down