-
Notifications
You must be signed in to change notification settings - Fork 553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interpolation of input fields in ww3_prnc #314
Comments
ukmo-juan-castillo
assigned ukmo-ccbunney and JessicaMeixner-NOAA and unassigned JessicaMeixner-NOAA and ukmo-ccbunney
Feb 22, 2021
ukmo-ccbunney
pushed a commit
to ukmo-waves/WW3
that referenced
this issue
Mar 2, 2021
Fixes: NOAA-EMC#314 * Interpolation weights now correctly calculated on points next to land and BC locations. * Changes to improve the code: the possibility of reading zero values from the input is considered, and points that should not be taken into account in the interpolation are identified by the netcdf fill value; a subroutine is created to avoid code duplication
Merged
aliabdolali
pushed a commit
that referenced
this issue
Mar 19, 2021
* First set of changes intended to fix the bug (#19) Fixes: #314 * Interpolation weights now correctly calculated on points next to land and BC locations. * Changes to improve the code: the possibility of reading zero values from the input is considered, and points that should not be taken into account in the interpolation are identified by the netcdf fill value; a subroutine is created to avoid code duplication * Bug fix and small simplification/optimization change (#18) * Fixes #290 (ww3_multi hanging when generating restart with IOSTYP >= 2) * Also fixes out-of-bounds array access error. * Includes some MPI optimizations * Correction to the bug fix in branch bf_multi_hang to take into account the coupled configurations, that are also affected * Small correction to the multi_hang branch: revert changes to JSEA index in w3iorsmd Co-authored-by: Juan Manuel Castillo Sanchez <[email protected]> Co-authored-by: ukmo-juan.castillo <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While testing a development branch (see #285) we discovered some problems when reading from input an air density field. We checked the input file and it is OK, but in the model output some zeroes appear in the middle of the domain, and strange interpolation is made along the land/sea boundary. Two main problems were found:
For points in the input field adjacent to land, interpolation still takes place with land values, which are set to zero by default. In consequence, the grid interpolation that takes place in ww3_prnc generates non-physical values. This can be fixed by checking if there are adjacent land points and recalculating the normalization factors ignoring these land points. An improvement is possible by calculating weights in land points adjacent to ocean instead of setting them to zero, so that interpolation takes place with valid values. This could be useful for atmosphere fields where in principle there are valid values in the whole grid domain, but the modifications required are large.
When the boundary cells read from the nesting file are wrong and are not ocean grid points (as it is the case in the ww3_tp2.15 regtests), the weights are still used and are all zero, so the final interpolated value is zero. This can be avoided by just not interpolating this type of points and keeping the original value. It is not ideal but it will avoid having spurious values at the land/sea boundaries.
It is quite possible that this fix will change results of some tests, as it affects how the forcing fields are read.
The text was updated successfully, but these errors were encountered: