NREL / SOWFA-6

32 stars 35 forks source link

Enable UPrimeUPrimeMean temporalAveraging output #36

Closed ewquon closed 3 years ago

mchurchf commented 3 years ago

I think it is fine to add this capability, but isn't it already there in a different form through the prime2Mean option, at least in terms of getting <u'_i u'_j>. If the function object is run on the velocity field, then prime2Mean set to on should give <u'_i u'_j>, correct?

Has this capability been tested out? Is it working properly?

DriesAllaerts commented 3 years ago

I agree with Matt, I believe this functionality is already available through the prime2Mean option. I assume this option is working properly, I don't see any reason to doubt it.

If you still want to proceed with this pull request, let me know and I will review it.

ewquon commented 3 years ago

Okay. So two findings:

  1. I have verified that the original code works. UPrime2Mean gives results that match pd.DataFrame.resample(window, loffset=window-dt) # shift results to right edge to match temporalAveraging with
    periodicRestart true;
    restartPeriod   $window;

    @DriesAllaerts is this the expected behavior, or is there a better way to get better correspondence with pandas-like resampling?

  2. The new UprimeUprimeMean does not work as expected (all values are identically 0).