Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
+(*)Fix a scaling bug in MOM_horizontal_regridding
Avoids using hard-coded dimensional tolerances in horizontal_regridding and improves the documentation of the variables and their units in this file. Without this change, calls to horiz_interp_and_extrap_tracer with a non-unity conversion factor will exhibit unexpected changes in answers, and may have wildly inappropriate amounts of smoothing of the interpolated values in arrays that are initialized from z-space file. However, the defaults are carefully chosen to avoid changing answers in any cases that do not use rescaling of tracer concentrations. The specific changes include: - Add a new optional argument tr_iter_tol to the horiz_interp_and_extrap_tracer routines to set an appropriate dimensional threshold for when the post-fill smoothing of tracers should be considered to be adequate. - Make the dimensional crit argument to fill_miss_2d non-optional, and fill it with appropriate values in calls from the horiz_interp_and_extrap_tracer routines when tr_iter_tol is not present. There should never be a hard-coded non-zero default for a dimensional variable! - Add a new optional scale argument to myStats - Eliminate the unused and unnecessary smooth logical argument to fill_miss_2d; the same functionality is obtained by setting the num_pass argument to 0. - Added to comments to document the units or unitlessness of the real variables in MOM_horizontal_regridding.F90. - Made minor changes to make the duplicated portions of the two horiz_interp_and_extrap_tracer similar. By default, all answers are bitwise identical, but this corrects a subtle bug with the use of the conversion factor argument in horiz_interp_and_extrap_tracer calls. There are new optional arguments to publicly visible routines.
- Loading branch information