From e0eff7e68e52c1994eebbf13508477cd47d9c221 Mon Sep 17 00:00:00 2001 From: CyprienBosserelle Date: Mon, 22 May 2017 11:56:13 +1200 Subject: [PATCH] Code cleaning nothing major but should be kept same --- writenetcdf.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/writenetcdf.cpp b/writenetcdf.cpp index 63d7298..bd503fb 100644 --- a/writenetcdf.cpp +++ b/writenetcdf.cpp @@ -1416,14 +1416,14 @@ void readSWANSPEC(XBGPUParam Param, std::vector wavebnd, int step, freq = (double *)malloc(ny*sizeof(double)); for (int i = 0; i < nx; i++) { - dir[i] = (1.5*pi - Param.grdalpha) - xcoord[i] * pi / 180; + dir[i] = (1.5*pi - Param.grdalpha) - xcoord[i] * pi / 180.0; for (int j = 0; j < ny; j++) { if (i == 0) { freq[j] = ycoord[j]; } - Spec[i + j*nx] = zz[j + i*ny]*180/pi; // convert to m2/Hz/rad + Spec[i + j*nx] = zz[j + i*ny]*180.0/pi; // convert to m2/Hz/rad // } @@ -1446,10 +1446,10 @@ void readSWANSPEC(XBGPUParam Param, std::vector wavebnd, int step, { if (i == 0) { - dir[j] = (1.5*pi - Param.grdalpha) - ycoord[j] * pi / 180; + dir[j] = (1.5*pi - Param.grdalpha) - ycoord[j] * pi / 180.0; //(1.5*pi - XParam.grdalpha) - std::stod(lineelements[3])*pi / 180; } - Spec[i + j*nx] = zz[i + j*nx] * 180 / pi; + Spec[i + j*nx] = zz[i + j*nx] * 180.0 / pi; // }