Skip to content

Commit a4c0838

Browse files
author
Hailey Johnson
committed
more bug fixes
1 parent 507e65c commit a4c0838

3 files changed

Lines changed: 2 additions & 12 deletions

File tree

cdm-test/src/test/java/ucar/nc2/ft/point/writer/TestCFPointWriterCompare.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import java.util.ArrayList;
1212
import java.util.Formatter;
1313
import java.util.List;
14+
1415
import org.junit.Rule;
1516
import org.junit.Test;
1617
import org.junit.rules.TemporaryFolder;

cdm/core/src/main/java/ucar/nc2/ft/point/writer/CFPointWriter.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ private static int writeStationProfileFeatureCollection(FeatureDatasetPoint data
275275
for (StationProfileFeature station : (StationProfileFeatureCollection) dsgFeatures) {
276276
name_strlen = Math.max(name_strlen, station.getName().length());
277277
for (ProfileFeature fp : station) {
278-
countProfiles += Iterables.size((station));
278+
countProfiles++;
279279
}
280280
}
281281
}
@@ -287,10 +287,7 @@ private static int writeStationProfileFeatureCollection(FeatureDatasetPoint data
287287

288288
int count = 0;
289289
for (DsgFeatureCollection featureCollection : dataset.getPointFeatureCollectionList()) {
290-
cfWriter.resetObsIndex();
291290
for (StationProfileFeature station : (StationProfileFeatureCollection) featureCollection) {
292-
cfWriter.resetProfileIndex();
293-
station.resetIteration();
294291
for (ProfileFeature pf : station) {
295292
if (pf.getTime() == null)
296293
continue; // assume this means its an "incomplete multidimensional"

cdm/core/src/main/java/ucar/nc2/ft/point/writer/WriterCFStationProfileCollection.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -244,10 +244,6 @@ protected void makeMiddleVariables(List<StructureData> profileDataStructs, boole
244244

245245
private int profileRecno;
246246

247-
protected void resetProfileIndex() {
248-
profileRecno = 0;
249-
}
250-
251247
public void writeProfileData(int stnIndex, ProfileFeature profile, int nobs) throws IOException {
252248
trackBB(profile.getLatLon(), profile.getTime());
253249

@@ -271,10 +267,6 @@ public void writeProfileData(int stnIndex, ProfileFeature profile, int nobs) thr
271267

272268
private int obsRecno;
273269

274-
protected void resetObsIndex() {
275-
obsRecno = 0;
276-
}
277-
278270
public void writeObsData(PointFeature pf) throws IOException {
279271
StructureMembers.Builder smb = StructureMembers.builder().setName("Coords");
280272
smb.addMemberScalar(pf.getFeatureCollection().getTimeName(), null, null, DataType.DOUBLE, pf.getObservationTime());

0 commit comments

Comments
 (0)