My Project
Main Page
Data Types List
Files
File List
File Members
All
Classes
Files
Functions
Variables
Macros
undefSTD.F
Go to the documentation of this file.
1
!
2
! $Id: undefSTD.F 1418 2010-07-19 15:11:24Z jghattas $
3
!
4
SUBROUTINE
undefstd
(itap,freq_calNMC, read_climoz)
5
USE
netcdf
6
USE
dimphy
7
USE
phys_state_var_mod
! Variables sauvegardees de la physique
8
IMPLICIT none
9
c
10
c====================================================================
11
c
12
c I. Musat : 09.2004
13
c
14
c Calcul * du nombre de pas de temps (FLOAT(ecrit_XXX)-tnondef))
15
c ou la variable tlevSTD est bien definie (.NE.missing_val),
16
c et
17
c * de la somme de tlevSTD => tsumSTD
18
c
19
c nout=1 !var. journaliere "day" moyenne sur tous les pas de temps
20
c ! de la physique
21
c nout=2 !var. mensuelle "mth" moyennee sur tous les pas de temps
22
c ! de la physique
23
c nout=3 !var. mensuelle "NMC" moyennee toutes les ecrit_hf
24
c
25
c
26
c NB: mettre "inst(X)" dans le write_hist*NMC.h !
27
c====================================================================
28
c
29
cym#include "dimensions.h"
30
cym integer jjmp1
31
cym parameter (jjmp1=jjm+1-1/jjm)
32
cym#include "dimphy.h"
33
c variables Input
34
c
35
c INTEGER nlevSTD, klevSTD, itap
36
c PARAMETER(klevSTD=17)
37
INTEGER
itap
38
c REAL dtime
39
c
40
c variables locales
41
c INTEGER i, k, nout, n
42
c PARAMETER(nout=3) !nout=1 : day; =2 : mth; =3 : NMC
43
INTEGER
i
,
k
,
n
44
REAL
freq_calnmc(nout)
45
INTEGER
read_climoz
46
c
47
c variables Output
48
c REAL tlevSTD(klon,klevSTD), tsumSTD(klon,klevSTD,nout)
49
c LOGICAL oknondef(klon,klevSTD,nout)
50
c REAL tnondef(klon,klevSTD,nout)
51
c
52
REAL
missing_val
53
c
54
missing_val
=nf90_fill_real
55
c
56
DO
n
=1, nout
57
c
58
c
59
c calcul variables tous les freq_calNMC(n)/dtime pas de temps
60
c de la physique
61
c
62
IF
(mod(itap,nint(freq_calnmc(
n
)/
dtime
)).EQ.0)
THEN
63
DO
k
=1, nlevstd
64
DO
i
=1, klon
65
IF
(tlevstd(
i
,
k
).EQ.
missing_val
)
THEN
66
c IF(oknondef(i,k,n)) THEN
67
tnondef(
i
,
k
,
n
)=tnondef(
i
,
k
,
n
)+1.
68
c ENDIF !oknondef(i,k)
69
c
70
ELSE
IF
(tlevstd(
i
,
k
).NE.
missing_val
)
THEN
71
tsumstd(
i
,
k
,
n
)=tsumstd(
i
,
k
,
n
)+tlevstd(
i
,
k
)
72
usumstd(
i
,
k
,
n
)=usumstd(
i
,
k
,
n
)+ulevstd(
i
,
k
)
73
vsumstd(
i
,
k
,
n
)=vsumstd(
i
,
k
,
n
)+vlevstd(
i
,
k
)
74
wsumstd(
i
,
k
,
n
)=wsumstd(
i
,
k
,
n
)+wlevstd(
i
,
k
)
75
phisumstd(
i
,
k
,
n
)=phisumstd(
i
,
k
,
n
)+philevstd(
i
,
k
)
76
qsumstd(
i
,
k
,
n
)=qsumstd(
i
,
k
,
n
)+qlevstd(
i
,
k
)
77
rhsumstd(
i
,
k
,
n
)=rhsumstd(
i
,
k
,
n
)+rhlevstd(
i
,
k
)
78
uvsumstd(
i
,
k
,
n
)=uvsumstd(
i
,
k
,
n
)+uvstd(
i
,
k
)
79
vqsumstd(
i
,
k
,
n
)=vqsumstd(
i
,
k
,
n
)+vqstd(
i
,
k
)
80
vtsumstd(
i
,
k
,
n
)=vtsumstd(
i
,
k
,
n
)+vtstd(
i
,
k
)
81
wqsumstd(
i
,
k
,
n
)=wqsumstd(
i
,
k
,
n
)+wqstd(
i
,
k
)
82
vphisumstd(
i
,
k
,
n
)=vphisumstd(
i
,
k
,
n
)+vphistd(
i
,
k
)
83
wtsumstd(
i
,
k
,
n
)=wtsumstd(
i
,
k
,
n
)+wtstd(
i
,
k
)
84
u2sumstd(
i
,
k
,
n
)=u2sumstd(
i
,
k
,
n
)+u2std(
i
,
k
)
85
v2sumstd(
i
,
k
,
n
)=v2sumstd(
i
,
k
,
n
)+v2std(
i
,
k
)
86
t2sumstd(
i
,
k
,
n
)=t2sumstd(
i
,
k
,
n
)+t2std(
i
,
k
)
87
o3sumstd(
i
,
k
,
n
)=o3sumstd(
i
,
k
,
n
)+o3std(
i
,
k
)
88
IF
(read_climoz==2)
89
& o3daysumstd(
i
,
k
,
n
)=o3daysumstd(
i
,
k
,
n
)+o3daystd(
i
,
k
)
90
91
ENDIF
92
ENDDO
!i
93
ENDDO
!k
94
c
95
ENDIF
!MOD(itap,NINT(freq_calNMC(n)/dtime)).EQ.0
96
c
97
ENDDO
!n
98
c
99
RETURN
100
END
libf
phylmd
undefSTD.F
Generated on Fri Jun 28 2013 16:00:08 for My Project by
1.8.1.2