source: LMDZ5/trunk/libf/phymar/radozc.F90 @ 2929

Last change on this file since 2929 was 2089, checked in by Laurent Fairhead, 10 years ago

Inclusion de la physique de MAR


Integration of MAR physics

File size: 3.9 KB
Line 
1SUBROUTINE RADOZC ( KIDIA , KFDIA , KLON , KTDIA , KLEV &
2                  &, KRINT , KDLON , KSHIFT &
3                  &, PAPRS , PGEMU &
4                  &, POZON                 )
5
6!***********************************************************************
7! CAUTION: THIS ROUTINE WORKS ONLY ON A NON-ROTATED, UNSTRETCHED GRID
8!***********************************************************************
9
10!**** *RADOZC* - COMPUTES DISTRIBUTION OF OZONE FROM CLIMATOLOGY
11
12!     PURPOSE.
13!     --------
14
15!**   INTERFACE.
16!     ----------
17!        CALL *RADOZC* FROM *RADINT*
18
19!        EXPLICIT ARGUMENTS :
20!        --------------------
21!     ==== INPUTS ===
22!     ==== OUTPUTS ===
23
24!        IMPLICIT ARGUMENTS :   NONE
25!        --------------------
26
27!     METHOD.
28!     -------
29
30
31!     EXTERNALS.
32!     ----------
33
34!          NONE
35
36!     REFERENCE.
37!     ----------
38
39!        SEE RADIATION'S PART OF THE MODEL'S DOCUMENTATION AND
40!        ECMWF RESEARCH DEPARTMENT DOCUMENTATION OF THE "I.F.S"
41
42!     AUTHOR.
43!     -------
44!     J.-J. MORCRETTE  E.C.M.W.F.    95/01/25
45
46!     MODIFICATIONS.
47!     --------------
48!          D.SALMOND   ECMWF    99-06-14   Optimisation
49
50!-----------------------------------------------------------------------
51
52#include "tsmbkind.h"
53
54USE YOMCST   , ONLY : R
55USE YOEOZOC  , ONLY : RSINC    ,ROZT     ,RPROC
56
57
58IMPLICIT NONE
59
60
61!     DUMMY INTEGER SCALARS
62INTEGER_M :: KDLON
63INTEGER_M :: KFDIA
64INTEGER_M :: KIDIA
65INTEGER_M :: KLEV
66INTEGER_M :: KLON
67INTEGER_M :: KRINT
68INTEGER_M :: KSHIFT
69INTEGER_M :: KTDIA
70
71
72
73
74!     -----------------------------------------------------------------
75
76!*       0.1   ARGUMENTS.
77!              ----------
78
79REAL_B :: PAPRS(KLON,KLEV+1),PGEMU(KLON)
80
81REAL_B :: POZON(KDLON,KLEV)
82
83!     -----------------------------------------------------------------
84
85!*       0.2   LOCAL ARRAYS.
86!              -------------
87
88REAL_B :: ZOZLT(0:35) , ZOZON(KDLON,KLEV+1)
89REAL_B :: ZRRR(0:34)
90
91!     LOCAL INTEGER SCALARS
92INTEGER_M :: IL, INLA, JC, JK, JL
93
94!     LOCAL REAL SCALARS
95REAL_B :: ZPMR, ZSILAT, ZSIN
96
97!     ------------------------------------------------------------------
98!     ------------------------------------------------------------------
99!     ------------------------------------------------------------------
100
101!*         1.     LATITUDE INDEX WITHIN OZONE CLIMATOLOGY
102!                 ---------------------------------------
103
104
105
106ZSIN=PGEMU(KIDIA)
107INLA=0
108ZSILAT=-9999._JPRB
109DO JL=18,1,-1
110  IF (ZSIN <= RSINC(JL+1).AND.ZSIN >= RSINC(JL)) THEN
111    INLA=JL
112  ENDIF
113ENDDO
114IF (INLA == 0) THEN
115!  CALL ABOR1(' Problem with lat. interpolation in radozc!')
116  PRINT *,' Problem with lat. interpolation in radozc!'
117ENDIF
118ZSILAT=(ZSIN-RSINC(INLA))/(RSINC(INLA+1)-RSINC(INLA))
119
120!     ------------------------------------------------------------------
121
122
123!*         2.     LATITUDE INTERPOLATED FIELD
124!                 ---------------------------
125
126
127IF(INLA == 18.OR.INLA == 1) THEN
128  DO JC=0,35
129    ZOZLT(JC)=ROZT(INLA,JC)
130  ENDDO
131ELSE
132  DO JC=0,35
133    ZOZLT(JC)=ROZT(INLA,JC)+ZSILAT*(ROZT(INLA+1,JC)-ROZT(INLA,JC))
134  ENDDO
135ENDIF
136
137
138!     ------------------------------------------------------------------
139
140!*         3.     VERTICAL INTERPOLATION
141!                 ----------------------
142
143DO JC=0,34
144  ZRRR(JC)=(_ONE_/(RPROC(JC)-RPROC(JC+1)))*(ZOZLT(JC)-ZOZLT(JC+1))
145ENDDO
146
147
148IL=KSHIFT
149DO JL=KIDIA,KFDIA,KRINT
150  IL=IL+1
151  DO JC=0,34
152    DO JK=1,KLEV+1
153    ZPMR=PAPRS(JL,JK)
154      IF(ZPMR >= RPROC(JC).AND.ZPMR < RPROC(JC+1)) &
155&        ZOZON(IL,JK)=ZOZLT(JC+1)+(ZPMR-RPROC(JC+1))*ZRRR(JC)
156    ENDDO
157  ENDDO
158ENDDO
159
160IL=KSHIFT
161DO JL=KIDIA,KFDIA,KRINT
162  IL=IL+1
163  DO JK=1,KLEV+1
164    ZPMR=PAPRS(JL,JK)
165    ZPMR=PAPRS(JL,JK)
166    IF(ZPMR >= RPROC(35)) ZOZON(IL,JK)=ZOZLT(35)
167  ENDDO
168ENDDO
169
170! INTEGRATION IN THE VERTICAL:
171IL=KSHIFT
172DO JL=KIDIA,KFDIA,KRINT
173  IL=IL+1
174  DO JK=1,KLEV
175    POZON(IL,JK)=(PAPRS(JL,JK+1)-PAPRS(JL,JK))&
176     &*(ZOZON(IL,JK)+ZOZON(IL,JK+1))*_HALF_
177  ENDDO
178ENDDO
179
180!     -----------------------------------------------------------
181
182RETURN
183END SUBROUTINE RADOZC
Note: See TracBrowser for help on using the repository browser.