Skip to content

Commit

Permalink
Code cleaning nothing major but should be kept same
Browse files Browse the repository at this point in the history
  • Loading branch information
CyprienBosserelle committed May 21, 2017
1 parent d613fdd commit e0eff7e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions writenetcdf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1416,14 +1416,14 @@ void readSWANSPEC(XBGPUParam Param, std::vector<Wavebndparam> 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

//
}
Expand All @@ -1446,10 +1446,10 @@ void readSWANSPEC(XBGPUParam Param, std::vector<Wavebndparam> 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;

//
}
Expand Down

0 comments on commit e0eff7e

Please sign in to comment.