Changeset 651 for trunk/src/calc_field_tps.m
- Timestamp:
- Jun 25, 2013, 12:48:10 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/calc_field_tps.m
r581 r651 2 2 %'calc_field_tps': defines fields (velocity, vort, div...) from civ data and calculate them with tps interpolation 3 3 %--------------------------------------------------------------------- 4 % [DataOut,VarAttribute,errormsg]=calc_field_tps(Coord_tps,Nb Sites,SubRange,FieldVar,FieldName,Coord_interp)4 % [DataOut,VarAttribute,errormsg]=calc_field_tps(Coord_tps,NbCentre,SubRange,FieldVar,FieldName,Coord_interp) 5 5 % 6 6 % OUTPUT: … … 8 8 % 9 9 % INPUT: 10 % Coord_tps: 11 % NbSites 12 % SubRange 13 % FieldVar 14 % FieldName: cell array representing the list of operations (eg div, rot..) 15 % Coord_interp: coordiantes of sites on which the fields need to be calculated 10 % Coord_tps: coordinates of the centres, of dimensions [nb_point,nb_coord,nb_subdomain], where 11 % nb_point is the max number of data point in a subdomain, 12 % nb_coord the space dimension, 13 % nb_subdomain the nbre of subdomains used for tps 14 % NbCentre: nbre of tps centres for each subdomain, of dimension nb_subdomain 15 % SubRange: coordinate range for each subdomain, of dimensions [nb_coord,2,nb_subdomain] 16 % FieldVar: cell array of list of variables needed to calculate the requested fields 17 % FieldName: cell array representing the list of operations (eg div(U,V), rot(U,V)) 18 % Coord_interp: coordinates of sites on which the fields need to be calculated of dimensions 19 % [nb_site,nb_coord] for an array of interpolation sites 20 % [nb_site_y,nb_site_x,nb_coord] for interpolation on a plane grid of size [nb_site_y,nb_site_x] 16 21 17 function [DataOut,VarAttribute,errormsg]=calc_field_tps(Coord_tps,Nb Sites,SubRange,FieldVar,FieldName,Coord_interp)22 function [DataOut,VarAttribute,errormsg]=calc_field_tps(Coord_tps,NbCentre,SubRange,FieldVar,FieldName,Coord_interp) 18 23 19 24 %list of defined scalars to display in menus (in addition to 'ima_cor'). … … 68 73 %% loop on subdomains 69 74 for isub=1:NbSubDomain 70 nbvec_sub=Nb Sites(isub);75 nbvec_sub=NbCentre(isub); 71 76 check_range=(Coord_interp >=ones(nb_sites,1)*SubRange(:,1,isub)' & Coord_interp<=ones(nb_sites,1)*SubRange(:,2,isub)'); 72 77 ind_sel=find(sum(check_range,2)==nb_coord);
Note: See TracChangeset
for help on using the changeset viewer.