NOAA-EMC / WW3

WAVEWATCH III
Other
265 stars 533 forks source link

MINDIFF used before being defined in w3iogomd #163

Open ajhenrique opened 4 years ago

ajhenrique commented 4 years ago

The MINDIFF variable is used before being defined and redefined to a constant after being computed in conditional statement, see line: https://github.com/ajhenrique/WW3/blob/BF_omp_b4b/model/ftn/w3iogomd.ftn#L3770

CarstenHansen commented 4 years ago

Hi @ajhenrique. I speculated yesterday about this search for the spectral partition IB which contains each the spectral bins IK. It is the partition nearest to the zero-crossing of USSP_WN(IB)-WN(IK,ISEA). MINDIFF is initialized to a high value (https://github.com/ajhenrique/WW3/blob/47493104309428142889ca7b892c019ff1c5c0a7/model/ftn/w3iogomd.ftn#L3686). After IB is determined (for which MINDIFF = USSP_WN(IB)-WN(IK,ISEA) is minimum), MINDIFF is reset to the initial value, and the (Stokes drift) contribution of the spectrum A(ITH,IK,JSEA) is added to the partition.

MatthewMasarik-NOAA commented 6 months ago

@ajhenrique or @CarstenHansen, from Carsten's comment, can this issue be closed?