From 923adc043b8f00b19230864c5bf9fde9206889ce Mon Sep 17 00:00:00 2001 From: Pierre Cazenave Date: Mon, 8 Apr 2013 17:15:17 +0100 Subject: [PATCH] Transpose the river data arrays prior to dumping to NetCDF so the data is read correctly by FVCOM --- fvcom_prepro/write_FVCOM_river.m | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/fvcom_prepro/write_FVCOM_river.m b/fvcom_prepro/write_FVCOM_river.m index 9bf7f9a..5c3118f 100644 --- a/fvcom_prepro/write_FVCOM_river.m +++ b/fvcom_prepro/write_FVCOM_river.m @@ -39,6 +39,8 @@ function write_FVCOM_river(RiverFile,RiverName,time,flux,temp,salt,RiverInfo1,Ri % number of nodes). I removed the sediment stuff as the manual makes no % mention of this in the river input file. Also added support for writing % to NetCDF using MATLAB's native tools. +% 2013-03-21 Transpose the river data arrays to the correct shape for the +% NetCDF file. % %========================================================================== @@ -129,9 +131,9 @@ netcdf.putVar(nc, river_names_varid, rString); netcdf.putVar(nc, time_varid, 0, nTimes, time); netcdf.putVar(nc, itime_varid, 0, nTimes, floor(time)); netcdf.putVar(nc, itime2_varid, 0, nTimes, mod(time, 1)*24*3600*1000); -netcdf.putVar(nc, river_flux_varid, flux); -netcdf.putVar(nc, river_temp_varid, temp); -netcdf.putVar(nc, river_salt_varid, salt); +netcdf.putVar(nc, river_flux_varid, flux'); +netcdf.putVar(nc, river_temp_varid, temp'); +netcdf.putVar(nc, river_salt_varid, salt'); % build the time string and output to NetCDF. nStringOut = char(); -- GitLab