eguil / Density_bining

Density bining code
2 stars 5 forks source link

Review binning (consider TEOS-10 density implementations, and binning technique) #42

Open durack1 opened 9 years ago

durack1 commented 9 years ago

The new publication by Roquet et al. (2015) provides a circa TEOS-10 update to the McDougall & Jackett (2005) method of in-situ density calculation.

As part of this analysis we'll have to consider if the selection of method to calculate density is a sensitivity of the analysis - doubtful, but yet to be analysed.. They also appear to provide Boussinesq and Non-Boussinesq alternatives, which would be a more quantitative method..

@gleckler1 pinging you here..

eguil commented 7 years ago

I had a chat with Paul Barker at EGU 2017 who said we should rather call our “neutral” density “sigma-2-like”. I told him we are planning to upgrade our density calculation with TEOS-10. Defining neutral surface is still some time ahead he told me - he is workig on the code.

gleckler1 commented 7 years ago

I can understand why this distinction is important to Paul and other experts working on thermodynamic properties. But “neutral” can be interpreted but a much broader audience. Does it capture the essence of the analysis even if there are some important caveats? Or is it really misleading?

durack1 commented 7 years ago

@eguil @gleckler1 this will always be a sticking point with Trevor and Paul B. For a truly "neutral" surface, you should be able to traverse along an isopycnal from an origin and following that isopycnal return the extract same properties/location/coordinate.. Even the gamma_n, rather than the gamma_rf that we use doesn't provide that exactly, there is an offset.. For the multimodel analysis that we have begun with all the regridding and interpolation that we are doing this should be considered but is certainly not the major uncertainty

durack1 commented 7 years ago

We should think about other published methods, see: https://github.com/TEOS-10/GSW-Matlab/blob/master/Toolbox/library/gsw_rr68_interp_SA_CT.m https://github.com/TEOS-10/GSW-Matlab/blob/master/Toolbox/library/gsw_spline_interp_SA_CT.m And others

durack1 commented 7 years ago

From #60

@eguil: The current vertical interpolation approach chosen has some issues: performance as its parallelisation is proving hard and science issue such as not dealing with instable profiles (see issue #54). Other techniques are possible (cf Gurvan and Casimir) are require some exploration.

See discussion in https://github.com/eguil/Density_bining/issues/42#issue-99493528 and below, closing as a dupe

durack1 commented 7 years ago

@eguil the new vertical interpolation scheme of Barker and McDougall is now available too: https://doi.org/10.1175/JTECH-D-16-0111.1

This is a way for pre-processing with density inversions

eguil commented 6 years ago

Another way is to use the simple NPC scheme of NEMO. I wonder to what extent Paul Barker's code is taylored to observations vs. models ?

durack1 commented 6 years ago

All code examples are in matlab, so this would need to be refactored into python.. Once in python we could write it to execute across profiles (horizontal grid cells) in parallel

eguil commented 6 years ago

Bug found to day in the bottom interpolation - corrected after interpolation loop. Also the density range was not large enough is some cases and no density bin were being filled up. now corrected by extending the range of s_s[0] and s_s[N_s-1].

durack1 commented 6 years ago

@eguil thanks for the update. It'd be useful to me to get a heads up as to where this code now sits, I was hoping to tweak things to drag along tracers for a couple of models that have them - chat next week?

eguil commented 6 years ago

In addition to fixing these bugs. I have also corrected the half-level issue missing at the bottom. It is now ok and volume is pretty much conserved. We can now move to working on extensive fields, first with simple tests, and then with V*thickness to get the overturning stream function. Once this is running, we will come back to the parallelisation work (Nicolas is trying a few different routes).

eguil commented 6 years ago

Adding tracers should be straightforward - in the current version I've added a c3_s field which is a tracer of "1" to prepare the work for the integral of v. We could add c4_s for tracers.