Parent Directory
|
Revision Log
|
Revision Graph
- calc_barostream.m : add list_factors argument to accomodate e.g. tracer class transports. - calc_overturn.m : add doFlip,list_factors args to accomodate e.g. tracer class transports. - calc_barostream.m : introduce list_factors to allow use for e.g. tracer class transports. - layers_remap.m (new) : remap variables (e.g. transports) from depth to tracer classes. Uses regrid_dblres.m and regrid_sum.m and mimics pkg/layers. - regrid_dblres.m (new) : double the resolution (only along 3rd dimension for now) for a variable P (extensive or intensive) a number of times. - regrid_sum.m (new) : add 3rd dimension elements of extensive variable P, according to values of a tracer field collocated with P, to the tracer grid defined by trGrid (1D vector)
1 | function [trP]=regrid_sum(P,tracer,trGrid); |
2 | %object : add 3rd dimension elements of extensive variable P, |
3 | % according to values of a tracer field collocated with P, |
4 | % to the tracer grid defined by trGrid (1D vector) |
5 | %input : P is the extensive variable of interest |
6 | % tracer is the associated tracer field |
7 | % trGrid is the vector of tracer values at |
8 | % bins center of the tracer grid bins. |
9 | %output : trP is the counterpart to P on the tracer grid |
10 | |
11 | trP=NaN*repmat(P(:,:,1),[1 1 length(trGrid)-1]); |
12 | trBounds=[-Inf (trGrid(1:end-1)+trGrid(2:end))/2 Inf]; |
13 | for kk=1:length(trGrid); |
14 | tmp1=P.*(tracer>=trBounds(kk)).*(tracer<trBounds(kk+1)); |
15 | trP(:,:,kk)=nansum(tmp1,3); |
16 | end; |
ViewVC Help | |
Powered by ViewVC 1.1.22 |