diff --git a/.gitignore b/.gitignore index 7265b564..321b0241 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,8 @@ gridpp gridpp_debug gridpp_train gridpp_train_debug +gridpp_kf +gridpp_kf_debug *.nc gmon.out tags diff --git a/makefile b/makefile index ba3bdce0..8e8c94a9 100644 --- a/makefile +++ b/makefile @@ -69,7 +69,7 @@ $(BUILDDIR_D)/%.E : src/%.cpp $(INCS) gridpp: $(OBJ_O) $(DRVOBJ_O) makefile $(CC) $(CFLAGS_O) $(LFLAGS) $(OBJ_O) $(DRVOBJ_O) $(LIBS_O) -o $@ -kalmanFilter: $(OBJ_O) $(KFOBJ_O) makefile +gridpp_kf: $(OBJ_O) $(KFOBJ_O) makefile $(CC) $(CFLAGS_O) $(LFLAGS) $(OBJ_O) $(KFOBJ_O) $(LIBS_O) -o $@ gridpp_train: $(OBJ_O) $(TRAINOBJ_O) makefile @@ -78,7 +78,7 @@ gridpp_train: $(OBJ_O) $(TRAINOBJ_O) makefile gridpp_debug: $(OBJ_D) $(DRVOBJ_D) makefile gtest $(CC) $(CFLAGS_D) $(LFLAGS) $(OBJ_D) $(DRVOBJ_D) $(LIBS_D) -o $@ -kalmanFilter_debug: $(OBJ_D) $(KFOBJ_D) makefile gtest +gridpp_kf_debug: $(OBJ_D) $(KFOBJ_D) makefile gtest $(CC) $(CFLAGS_D) $(LFLAGS) $(OBJ_D) $(KFOBJ_D) $(LIBS_D) -o $@ gridpp_train_debug: $(OBJ_D) $(TRAINOBJ_D) makefile gtest diff --git a/src/Driver/Kf.cpp b/src/Driver/Kf.cpp index fbb9ad55..6fe62f6d 100644 --- a/src/Driver/Kf.cpp +++ b/src/Driver/Kf.cpp @@ -50,10 +50,10 @@ int main(int argc, const char *argv[]) { options.getValue("output", outputFilename); KalmanFilter kf(Variable::T, 0.1); - ParameterFileSpatial dataFile = ParameterFileSpatial(dataFilename); - ParameterFileSpatial currFile = ParameterFileSpatial(currentFilename); - ParameterFileSpatial newFile = ParameterFileSpatial(newFilename); - ParameterFileSpatial outputFile = ParameterFileSpatial(outputFilename); + ParameterFileText dataFile(Options("file=" + dataFilename + " spatial=1")); + ParameterFileText currFile(Options("file=" + currentFilename + " spatial=1")); + ParameterFileText newFile(Options("file=" + newFilename + " spatial=1")); + ParameterFileText outputFile(Options("file=" + outputFilename + " spatial=1")); std::vector times = Util::combine(dataFile.getTimes(), currFile.getTimes()); std::vector locations = Util::combine(dataFile.getLocations(), currFile.getLocations()); diff --git a/src/ParameterFile/Netcdf.cpp b/src/ParameterFile/Netcdf.cpp index 93aed4a3..e3caea7b 100644 --- a/src/ParameterFile/Netcdf.cpp +++ b/src/ParameterFile/Netcdf.cpp @@ -136,5 +136,6 @@ std::string ParameterFileNetcdf::description() { ss << Util::formatDescription("-p netcdf", "Parameters stored in a Netcdf file. File must have contain: dimensions time, lat (or y), lon (or x), coeff; variables with dims: time[time], latitude[lat,lon], longitude[lat,lon], coefficients[time,lat,lon,coeff]. The number of parameters in a set must be constant and equals the size of the 'coeff' dimension.") << std::endl; ss << Util::formatDescription(" dimName=coefficient", "What is the name of the dimension representing different coefficients?") << std::endl; ss << Util::formatDescription(" varName=coeff", "What is the name of the variable containing the coefficients?") << std::endl; + ss << Util::formatDescription(" file=required", "Filename of file.") << std::endl; return ss.str(); }