diff --git a/src/.gitignore b/.gitignore similarity index 100% rename from src/.gitignore rename to .gitignore diff --git a/src/example/pres_temp_4D_rd.cpp b/src/example/pres_temp_4D_rd.cpp index b4f327c..2d2d272 100644 --- a/src/example/pres_temp_4D_rd.cpp +++ b/src/example/pres_temp_4D_rd.cpp @@ -17,7 +17,7 @@ */ #include -#include +#include "../lib/netcdfcpp.h" using namespace std; diff --git a/src/example/pres_temp_4D_wr.cpp b/src/example/pres_temp_4D_wr.cpp index ce2e366..87efc3b 100644 --- a/src/example/pres_temp_4D_wr.cpp +++ b/src/example/pres_temp_4D_wr.cpp @@ -15,7 +15,7 @@ */ #include -#include +#include "../lib/netcdfcpp.h" using namespace std; @@ -69,14 +69,14 @@ int main() // handling to the calling program. In the case of this example, we // just exit with an NC_ERR error code. NcError err(NcError::verbose_nonfatal); - + // Create the file. NcFile dataFile("pres_temp_4D.nc", NcFile::Replace); // Check to see if the file was created. if(!dataFile.is_valid()) return NC_ERR; - + // Define the dimensions. NetCDF will hand back an ncDim object for // each. NcDim *lvlDim, *latDim, *lonDim, *recDim; @@ -87,16 +87,16 @@ int main() if (!(lonDim = dataFile.add_dim("longitude", NLON))) return NC_ERR; // Add an unlimited dimension... - if (!(recDim = dataFile.add_dim("time"))) + if (!(recDim = dataFile.add_dim("time", NREC))) return NC_ERR; - + // Define the coordinate variables. NcVar *latVar, *lonVar; if (!(latVar = dataFile.add_var("latitude", ncFloat, latDim))) return NC_ERR; if (!(lonVar = dataFile.add_var("longitude", ncFloat, lonDim))) return NC_ERR; - + // Define units attributes for coordinate vars. This attaches a // text attribute to each of the coordinate variables, containing // the units. @@ -104,7 +104,7 @@ int main() return NC_ERR; if (!lonVar->add_att("units", "degrees_east")) return NC_ERR; - + // Define the netCDF variables for the pressure and temperature // data. NcVar *presVar, *tempVar; @@ -114,19 +114,19 @@ int main() if (!(tempVar = dataFile.add_var("temperature", ncFloat, recDim, lvlDim, latDim, lonDim))) return NC_ERR; - + // Define units attributes for data variables. if (!presVar->add_att("units", "hPa")) return NC_ERR; if (!tempVar->add_att("units", "celsius")) return NC_ERR; - + // Write the coordinate variable data to the file. if (!latVar->put(lats, NLAT)) return NC_ERR; if (!lonVar->put(lons, NLON)) return NC_ERR; - + // Write the pretend data. This will write our surface pressure and // surface temperature data. The arrays only hold one timestep // worth of data. We will just rewrite the same data for each @@ -139,7 +139,7 @@ int main() if (!tempVar->put_rec(&temp_out[0][0][0], rec)) return NC_ERR; } - + // The file is automatically closed by the destructor. This frees // up any internal netCDF resources associated with the file, and // flushes any buffers. diff --git a/src/example/sfc_pres_temp_rd.cpp b/src/example/sfc_pres_temp_rd.cpp index 9439b2e..6e4ba88 100644 --- a/src/example/sfc_pres_temp_rd.cpp +++ b/src/example/sfc_pres_temp_rd.cpp @@ -18,7 +18,7 @@ #include #include -#include +#include "../lib/netcdfcpp.h" using namespace std; diff --git a/src/example/sfc_pres_temp_wr.cpp b/src/example/sfc_pres_temp_wr.cpp index a931915..22559e5 100644 --- a/src/example/sfc_pres_temp_wr.cpp +++ b/src/example/sfc_pres_temp_wr.cpp @@ -17,7 +17,7 @@ */ #include -#include +#include "../lib/netcdfcpp.h" using namespace std; diff --git a/src/example/simple_xy_rd.cpp b/src/example/simple_xy_rd.cpp index c1c0409..7a1be84 100644 --- a/src/example/simple_xy_rd.cpp +++ b/src/example/simple_xy_rd.cpp @@ -15,7 +15,7 @@ */ #include -#include +#include "../lib/netcdfcpp.h" using namespace std; diff --git a/src/example/simple_xy_wr.cpp b/src/example/simple_xy_wr.cpp index e959015..d81bb64 100644 --- a/src/example/simple_xy_wr.cpp +++ b/src/example/simple_xy_wr.cpp @@ -16,7 +16,7 @@ */ #include -#include +#include "../lib/netcdfcpp.h" using namespace std;