|
|
|
## Fitting method
|
|
|
|
|
|
|
|
Input: vectorem.csv
|
|
|
|
vectorod.csv
|
|
|
|
vectorwind.csv
|
|
|
|
|
|
|
|
Output: wthreshold_robust.csv
|
|
|
|
c_robust.csv
|
|
|
|
(which are vectors containing the two fitted constants at every grid cell)
|
|
|
|
|
|
|
|
The data is first filttered by a u* threshold that can be easly modified just changing the variable '**windtf**'. Then, in those grid cells where the remaining data is larger than 10 (for assure some statistical significance), the remaining points are fitted to a the proposed cubic function:
|
|
|
|
|
|
|
|
```Matlab
|
|
|
|
fun = @(x,winds)(winds.^3)*x(1)+(winds.^2)*x(1)*x(2)-x(1)*(x(2).^2)*winds-x(1)*(x(2).^3);
|
|
|
|
``` |