Closed russfiedler closed 2 years ago
Nice work @russfiedler.
You've tested it works in the absence of abs_max
or abs_min
. Looks difficult to test the positive case as you need to turn on neutral physics and wait/hope for a value that exceeds the hard-coded thresholds.
Seems ok to me. I'm happy to merge.
thanks @russfiedler - I saw a 6% speedup with the 0.1deg IAF cycle 4 old: Walltime Used: 00:49:35 new: Walltime Used: 00:46:45
I can also confirm that this code change does not alter the outputs https://nbviewer.org/github/aekiss/notebooks/blob/2065be9/check-MOM-PR352.ipynb
Nice. I think this means that going forward we should pay attention to a) The use of automatic arrays and b) The creation of (possibly unecessary) temporary arrays in arguments to functions/subroutines.
This commit reorganizes the masking logic in ocean_util.F90. The rarely used
threshold_mask
is made allocatable and its use is avoided if not required saving the creation of a 3D temporary array and unneeded multiplication. Savings of about 10% wall time have been observed in one particular OFAM configuration.