Last change
on this file since 327 was
327,
checked in by pinsard, 13 years ago
|
change svn properties
|
-
Property svn:keywords set to
URL
|
File size:
1.4 KB
|
Line | |
---|
1 | function [tpota tva]=tpot(ta,pa,r) |
---|
2 | |
---|
3 | %TPOT Calcul de la temperature potentielle et potentielle virtuelle |
---|
4 | |
---|
5 | %+ |
---|
6 | % |
---|
7 | % .. _tpot.m: |
---|
8 | % |
---|
9 | % ======= |
---|
10 | % tpot.m |
---|
11 | % ======= |
---|
12 | % |
---|
13 | % DESCRIPTION |
---|
14 | % =========== |
---|
15 | % |
---|
16 | % Calcul de la temperature potentielle et potentielle virtuelle en degres Celsius |
---|
17 | % |
---|
18 | % Entrees : |
---|
19 | % |
---|
20 | % ta |
---|
21 | % temperature en K ou degres C |
---|
22 | % pa |
---|
23 | % pression en hPa ou Pa |
---|
24 | % r |
---|
25 | % rapport de melange en g/kg ou kg/kg |
---|
26 | % |
---|
27 | % Sorties : |
---|
28 | % |
---|
29 | % tpota |
---|
30 | % temperature potentielle en degres C |
---|
31 | % tva |
---|
32 | % temperature potentielle virtuelle en degres C |
---|
33 | % |
---|
34 | % EXAMPLES |
---|
35 | % ======== |
---|
36 | % |
---|
37 | % voir :ref:`cal_hcl.m` pour exemple d'utilisation |
---|
38 | % |
---|
39 | % SEE ALSO |
---|
40 | % ======== |
---|
41 | % |
---|
42 | % |
---|
43 | % TODO |
---|
44 | % ==== |
---|
45 | % |
---|
46 | % isolatin ou traduction |
---|
47 | % |
---|
48 | % EVOLUTIONS |
---|
49 | % ========== |
---|
50 | % |
---|
51 | % $Id: tpot.m 325 2011-08-04 15:30:01Z pinsard $ |
---|
52 | % |
---|
53 | % $URL$ |
---|
54 | % |
---|
55 | %- |
---|
56 | |
---|
57 | %test si pa est en Pa ou hPa et attribut a pstandard cette meme unite |
---|
58 | ind_nan=find(~isnan(pa)); |
---|
59 | if pa(ind_nan(1)) < 2000 |
---|
60 | pstandard = 1000; |
---|
61 | else |
---|
62 | pstandard = 1000*100; |
---|
63 | end |
---|
64 | |
---|
65 | %test si r est en g/kg ou kg/kg |
---|
66 | ind_nan=find(~isnan(r)); |
---|
67 | if r(ind_nan(1))>1 |
---|
68 | r=r/1000; |
---|
69 | end |
---|
70 | |
---|
71 | %test si ta est en °C ou en K |
---|
72 | % et calcule la temperature potentielle en °C |
---|
73 | if ta(1) < 100 % il est peut probable d''avoir + de 100°C au niveau du sol |
---|
74 | tpota=((ta+273.15).*((pstandard./pa).^0.286))-273.15; % (exposant=R/Cp) |
---|
75 | else % ta déjà en K |
---|
76 | tpota=ta.*((pstandard./pa).^0.286)-273.15; % (exposant=R/Cp) |
---|
77 | end |
---|
78 | |
---|
79 | % calcul la temperature potentielle virtuelle |
---|
80 | tva=(tpota+273.15).*(1.+0.608*r)-273.15; |
---|
Note: See
TracBrowser
for help on using the repository browser.