Commit 83a52189 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Merge declaration and initialization.

parent 38f3e5fc
...@@ -85,14 +85,16 @@ void genind(int *nx, const double *restrict plev, const double *restrict fullp, ...@@ -85,14 +85,16 @@ void genind(int *nx, const double *restrict plev, const double *restrict fullp,
#endif #endif
for ( long lp = 0; lp < nplev; lp++ ) for ( long lp = 0; lp < nplev; lp++ )
{ {
long i, lh;
const double pres = plev[lp]; const double pres = plev[lp];
int *restrict nxl = nx + lp*ngp; int *restrict nxl = nx + lp*ngp;
for ( lh = 0; lh < nhlev; lh++ ) for ( long lh = 0; lh < nhlev; lh++ )
for ( i = 0; i < ngp ; i++ ) {
{ const double *restrict fullpx = fullp + lh*ngp;
if ( pres > fullp[lh*ngp+i] ) nxl[i] = lh; for ( long i = 0; i < ngp ; i++ )
} {
if ( pres > fullpx[i] ) nxl[i] = lh;
}
}
} }
} /* genind */ } /* genind */
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment