/[MITgcm]/MITgcm_contrib/gael/matlab/myverticaldeform.m
ViewVC logotype

Annotation of /MITgcm_contrib/gael/matlab/myverticaldeform.m

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Mon Sep 3 22:11:25 2007 UTC (17 years, 10 months ago) by gforget
Branch: MAIN
CVS Tags: HEAD
various matlab scripts

1 gforget 1.1 function [varout]=myverticaldeform(varin)
2     %varin : profondeur en m (positif)
3     %varout : z correspondant (negatif), avec
4     % deformation selon le niveau
5    
6     %var de sortie :
7     varout=zeros(size(varin));
8     %valeurs limite :
9     %val_lim=500;fprintf('deform v:500m\n');
10     %val_lim=1000;
11     val_lim=250; fprintf('deform v:250m\n');
12     %val_lim=-0.0001;
13     val_lim2=5500;
14    
15     %valeurs inferieures a 500m :
16     tmp1=find(varin<=val_lim);
17     tmp2=-100*varin(tmp1)/val_lim;
18     varout(tmp1)=tmp2;
19    
20     %valeurs superieurs a 500m :
21     tmp1=find(varin>val_lim);
22     tmp2=-100-200*(varin(tmp1)-val_lim)./(val_lim2-val_lim);
23     varout(tmp1)=tmp2;
24    
25    
26    

  ViewVC Help
Powered by ViewVC 1.1.22