source: LMDZ6/trunk/libf/phylmd/ecrad/ifs/yomrip.F90 @ 5209

Last change on this file since 5209 was 4773, checked in by idelkadi, 11 months ago
  • Update of Ecrad in LMDZ The same organization of the Ecrad offline version is retained in order to facilitate the updating of Ecrad in LMDZ and the comparison between online and offline results. version 1.6.1 of Ecrad (https://github.com/lguez/ecrad.git)
  • Implementation of the double call of Ecrad in LMDZ


File size: 9.1 KB
Line 
1! (C) Copyright 1989- ECMWF.
2! (C) Copyright 1989- Meteo-France.
3!
4! This software is licensed under the terms of the Apache Licence Version 2.0
5! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
6!
7! In applying this licence, ECMWF does not waive the privileges and immunities
8! granted to it by virtue of its status as an intergovernmental organisation
9! nor does it submit to any jurisdiction.
10
11MODULE YOMRIP
12
13USE PARKIND1 , ONLY : JPIM     ,JPRB
14!USE YOEOZOC  , ONLY : TEOZOC
15!USE YOECMIP  , ONLY : TECMIP
16!USE YOERADGHG, ONLY : TRADGHG
17!USE YOEAERC  , ONLY : TEAERC_TEGEN, TEAERC_MACC
18!USE REGLATLON_FIELD_MIX, ONLY : REGLATLON_FIELD
19
20IMPLICIT NONE
21
22SAVE
23
24!     --------------------------------------------------------------------------------
25!     Date and timestep related variables.
26!     Values may be different for the different models run under the OOPS layer.
27!     In particuliar, we find there all date and timestep variables updated in UPDTIM.
28!     --------------------------------------------------------------------------------
29
30TYPE :: TRIP
31
32!*    Numbering of timesteps
33
34!     NSTART : first timestep of model
35!     NSTOP  : last timestep of model
36!     CSTOP  : character string defining stopping criteria for run
37
38!     NFOST  : NUMBER OF FIRST-ORDER TIME STEPS AT THE START OF THE RUN
39!              IN ORDER TO AVOID TRAJECTORIES GOING OUT OF THE ATMOSPHERE.
40
41!     ------------------------------------------------------------------
42
43!*    Real time related variables (updated in UPDTIM)
44
45!     NSTADD : NUMBER OF DAYS SINCE START OF THE MODEL
46!     NSTASS : NUMBER OF SECONDS since start of model modulo(86400)
47!     RSTATI : NUMBER OF SECONDS SINCE START OF THE MODEL
48!     RTIMTR : ABSOLUTE TIME OF THE MODEL
49
50!     RHGMT  : GMT TIME OF THE MODEL  (BETWEEN 0 AND 86400)
51!     REQTIM : EQUATION OF TIME
52
53!     ------------------------------------------------------------------
54
55!*    Sun related variables (updated in UPDTIM)
56!     RSOVR  : TRUE SOLAR TIME (GMT+EQUATION OF TIME)
57
58!     RDEASO : DISTANCE EARTH-SUN
59!     RDECLI : DECLINATION
60!     RWSOVR : IN RADIANS, TRUE SOLAR TIME (GMT+EQUATION OF TIME)
61!              THIS ANGLE IS ALSO PI - (LONGITUDE OF THE POINT
62!              WHERE THE SUN IS AT ZENITH)
63!     RIP0   : I0 WEIGHTED BY THE DISTANCE EARTH-SUN
64
65!     RCODEC : COSINE OF THE DECLINATION
66!     RSIDEC :   SINE OF THE DECLINATION
67
68!     RCOVSR : COSINE OF TRUE SOLAR TIME
69!     RSIVSR :   SINE OF TRUE SOLAR TIME
70
71!     NEW VARIABLES FOR LMSE
72!     RCODECN : COSINE OF THE DECLINATION FOR NEXT TIME STEP
73!     RSIDECN :   SINE OF THE DECLINATION FOR NEXT TIME STEP
74
75!     RCOVSRN : COSINE OF TRUE SOLAR TIME FOR NEXT TIME STEP
76!     RSIVSRN :   SINE OF TRUE SOLAR TIME FOR NEXT TIME STEP
77
78!     RCODECF : COSINE OF THE DECLINATION at the end of radiation step
79!     RSIDECF :   SINE OF THE DECLINATION at the end of radiation step
80!     RCOVSRF : COSINE OF TRUE SOLAR TIME at the end of radiation step
81!     RSIVSRF :   SINE OF TRUE SOLAR TIME at the end of radiation step
82
83!     ------------------------------------------------------------------
84
85!*    Moon related variables (updated in UPDTIM)
86
87!     RDECLU : LUNAR DECLINATION
88!     RTMOLT : IN RADIANS, TRUE LUNAR TIME (GMT+EQUATION OF TIME)
89!              THIS ANGLE IS ALSO PI - (LONGITUDE OF THE POINT
90!              WHERE THE MOON IS AT ZENITH)
91!     RIP0LU : LUNAR I0 (DOWNWARD TOA LUNAR FLUX)
92
93!     RCODECLU : COSINE OF THE LUNAR DECLINATION
94!     RSIDECLU :   SINE OF THE LUNAR DECLINATION
95
96!     RCOVSRLU : COSINE OF TRUE LUNAR TIME
97!     RSIVSRLU :   SINE OF TRUE LUNAR TIME
98
99!     ------------------------------------------------------------------
100
101!*    Time step related variables
102
103!     TSTEP  : length of the timestep in seconds
104!     TDT    : For leap-frog scheme: 2*TSTEP except at the first time step where it is TSTEP
105!              For a two-time level scheme (semi-Lagrangian), TDT is always TSTEP.
106
107!     RDTSA  : TDT  /RA
108!     RDTSA2 : RDTSA**2
109!     RDTS62 : RDTSA**2/6
110!     RDTS22 : RDTSA**2/2
111
112!     RTDT   : TDT
113
114!     ------------------------------------------------------------------
115
116!*   Time-variable climatological distributions of gases / aerosols
117!    YREOZOC : spectral distribution of ozone
118
119! INTEGER(KIND=JPIM) :: NSTART
120! INTEGER(KIND=JPIM) :: NSTOP
121! CHARACTER(LEN=8)   :: CSTOP !! added olivier
122! INTEGER(KIND=JPIM) :: NSTADD
123! INTEGER(KIND=JPIM) :: NSTASS
124! INTEGER(KIND=JPIM) :: NFOST
125! REAL(KIND=JPRB) :: RSTATI
126! REAL(KIND=JPRB) :: RTIMTR
127! REAL(KIND=JPRB) :: RHGMT
128! REAL(KIND=JPRB) :: REQTIM
129! REAL(KIND=JPRB) :: RSOVR
130! REAL(KIND=JPRB) :: RDEASO
131! REAL(KIND=JPRB) :: RDECLI
132! REAL(KIND=JPRB) :: RWSOVR
133! REAL(KIND=JPRB) :: RIP0
134! REAL(KIND=JPRB) :: RCODEC
135! REAL(KIND=JPRB) :: RSIDEC
136! REAL(KIND=JPRB) :: RCOVSR
137! REAL(KIND=JPRB) :: RSIVSR
138! REAL(KIND=JPRB) :: RCODECN
139! REAL(KIND=JPRB) :: RSIDECN
140! REAL(KIND=JPRB) :: RCOVSRN
141! REAL(KIND=JPRB) :: RSIVSRN
142! REAL(KIND=JPRB) :: RCODECF
143! REAL(KIND=JPRB) :: RSIDECF
144! REAL(KIND=JPRB) :: RCOVSRF
145! REAL(KIND=JPRB) :: RSIVSRF
146REAL(KIND=JPRB) :: TSTEP
147! REAL(KIND=JPRB) :: TDT
148! REAL(KIND=JPRB) :: RDTSA
149! REAL(KIND=JPRB) :: RDTSA2
150! REAL(KIND=JPRB) :: RDTS62
151! REAL(KIND=JPRB) :: RDTS22
152! REAL(KIND=JPRB) :: RTDT
153! REAL(KIND=JPRB) :: RDECLU
154! REAL(KIND=JPRB) :: RTMOLT
155! REAL(KIND=JPRB) :: RIP0LU
156! REAL(KIND=JPRB) :: RCODECLU
157! REAL(KIND=JPRB) :: RSIDECLU
158! REAL(KIND=JPRB) :: RCOVSRLU
159! REAL(KIND=JPRB) :: RSIVSRLU
160!
161! !! things put here because their values are time-interpolated, i.e. non-constant
162! ! defined in YOEOZOC
163! TYPE(TEOZOC)    :: YREOZOC
164! ! defined in YOECMIP
165! TYPE(TECMIP)    :: YRECMIP
166! ! defined in YOERADGHG
167! TYPE(TRADGHG)  :: YRERADGHG
168! ! defined in YOEAERC
169! TYPE(TEAERC_TEGEN)    :: YREAERC_TEGEN
170! TYPE(TEAERC_MACC)     :: YREAERC_MACC
171! TYPE(REGLATLON_FIELD) :: RAERSO4
172
173CONTAINS
174
175  PROCEDURE, PASS :: PRINT => PRINT_CONFIGURATION
176
177END TYPE TRIP
178
179!     --------------------------------------------------------------------------------
180CONTAINS
181
182SUBROUTINE PRINT_CONFIGURATION(SELF, KDEPTH, KOUTNO)
183  IMPLICIT NONE
184  CLASS(TRIP), INTENT(IN) :: SELF
185  INTEGER    , INTENT(IN) :: KDEPTH
186  INTEGER    , INTENT(IN) :: KOUTNO
187
188  INTEGER :: IDEPTHLOC
189
190  IDEPTHLOC = KDEPTH+2
191
192  WRITE(KOUTNO,*) REPEAT(' ',KDEPTH   ) // 'model%yrml_gconf%yrrip : '
193!   WRITE(KOUTNO,*) REPEAT(' ',IDEPTHLOC) // 'NSTART = ', SELF%NSTART
194!   WRITE(KOUTNO,*) REPEAT(' ',IDEPTHLOC) // 'NSTOP = ', SELF%NSTOP
195!   WRITE(KOUTNO,*) REPEAT(' ',IDEPTHLOC) // 'NSTADD = ', SELF%NSTADD
196!   WRITE(KOUTNO,*) REPEAT(' ',IDEPTHLOC) // 'NSTASS = ', SELF%NSTASS
197!   WRITE(KOUTNO,*) REPEAT(' ',IDEPTHLOC) // 'NFOST = ', SELF%NFOST
198!   WRITE(KOUTNO,*) REPEAT(' ',IDEPTHLOC) // 'RSTATI = ', SELF%RSTATI
199!   WRITE(KOUTNO,*) REPEAT(' ',IDEPTHLOC) // 'RTIMTR = ', SELF%RTIMTR
200!   WRITE(KOUTNO,*) REPEAT(' ',IDEPTHLOC) // 'RHGMT = ', SELF%RHGMT
201!   WRITE(KOUTNO,*) REPEAT(' ',IDEPTHLOC) // 'REQTIM = ', SELF%REQTIM
202!   WRITE(KOUTNO,*) REPEAT(' ',IDEPTHLOC) // 'RSOVR = ', SELF%RSOVR
203!   WRITE(KOUTNO,*) REPEAT(' ',IDEPTHLOC) // 'RDEASO = ', SELF%RDEASO
204!   WRITE(KOUTNO,*) REPEAT(' ',IDEPTHLOC) // 'RDECLI = ', SELF%RDECLI
205!   WRITE(KOUTNO,*) REPEAT(' ',IDEPTHLOC) // 'RWSOVR = ', SELF%RWSOVR
206!   WRITE(KOUTNO,*) REPEAT(' ',IDEPTHLOC) // 'RIP0 = ',  SELF%RIP0
207!   WRITE(KOUTNO,*) REPEAT(' ',IDEPTHLOC) // 'RCODEC = ', SELF%RCODEC
208!   WRITE(KOUTNO,*) REPEAT(' ',IDEPTHLOC) // 'RSIDEC = ', SELF%RSIDEC
209!   WRITE(KOUTNO,*) REPEAT(' ',IDEPTHLOC) // 'RCOVSR = ', SELF%RCOVSR
210!   WRITE(KOUTNO,*) REPEAT(' ',IDEPTHLOC) // 'RSIVSR = ', SELF%RSIVSR
211!   WRITE(KOUTNO,*) REPEAT(' ',IDEPTHLOC) // 'RCODECN = ', SELF%RCODECN
212!   WRITE(KOUTNO,*) REPEAT(' ',IDEPTHLOC) // 'RSIDECN = ', SELF%RSIDECN
213!   WRITE(KOUTNO,*) REPEAT(' ',IDEPTHLOC) // 'RCOVSRN = ', SELF%RCOVSRN
214!   WRITE(KOUTNO,*) REPEAT(' ',IDEPTHLOC) // 'RSIVSRN = ', SELF%RSIVSRN
215!   WRITE(KOUTNO,*) REPEAT(' ',IDEPTHLOC) // 'RCODECF = ', SELF%RCODECF
216!   WRITE(KOUTNO,*) REPEAT(' ',IDEPTHLOC) // 'RSIDECF = ', SELF%RSIDECF
217!   WRITE(KOUTNO,*) REPEAT(' ',IDEPTHLOC) // 'RCOVSRF = ', SELF%RCOVSRF
218!   WRITE(KOUTNO,*) REPEAT(' ',IDEPTHLOC) // 'RSIVSRF = ', SELF%RSIVSRF
219  WRITE(KOUTNO,*) REPEAT(' ',IDEPTHLOC) // 'TSTEP = ', SELF%TSTEP
220!   WRITE(KOUTNO,*) REPEAT(' ',IDEPTHLOC) // 'TDT = ', SELF%TDT
221!   WRITE(KOUTNO,*) REPEAT(' ',IDEPTHLOC) // 'RDTSA = ', SELF%RDTSA
222!   WRITE(KOUTNO,*) REPEAT(' ',IDEPTHLOC) // 'RDTSA2 = ', SELF%RDTSA2
223!   WRITE(KOUTNO,*) REPEAT(' ',IDEPTHLOC) // 'RDTS62 = ', SELF%RDTS62
224!   WRITE(KOUTNO,*) REPEAT(' ',IDEPTHLOC) // 'RDTS22 = ', SELF%RDTS22
225!   WRITE(KOUTNO,*) REPEAT(' ',IDEPTHLOC) // 'RTDT = ', SELF%RTDT
226!   WRITE(KOUTNO,*) REPEAT(' ',IDEPTHLOC) // 'RDECLU = ', SELF%RDECLU
227!   WRITE(KOUTNO,*) REPEAT(' ',IDEPTHLOC) // 'RTMOLT = ', SELF%RTMOLT
228!   WRITE(KOUTNO,*) REPEAT(' ',IDEPTHLOC) // 'RIP0LU = ', SELF%RIP0LU
229!   WRITE(KOUTNO,*) REPEAT(' ',IDEPTHLOC) // 'RCODECLU = ', SELF%RCODECLU
230!   WRITE(KOUTNO,*) REPEAT(' ',IDEPTHLOC) // 'RSIDECLU = ', SELF%RSIDECLU
231!   WRITE(KOUTNO,*) REPEAT(' ',IDEPTHLOC) // 'RCOVSRLU = ', SELF%RCOVSRLU
232!   WRITE(KOUTNO,*) REPEAT(' ',IDEPTHLOC) // 'RSIVSRLU = ', SELF%RSIVSRLU
233!   WRITE(KOUTNO,*) ''
234
235END SUBROUTINE PRINT_CONFIGURATION
236
237!!TYPE(TRIP), POINTER :: YRRIP => NULL()
238
239!     --------------------------------------------------------------------------------
240
241END MODULE YOMRIP
Note: See TracBrowser for help on using the repository browser.