source: LMDZ6/branches/LMDZ_ECRad/libf/phylmd/ecrad/ifs/yoerad.F90 @ 4771

Last change on this file since 4771 was 4728, checked in by idelkadi, 13 months ago

Update of ecrad in the LMDZ_ECRad branch of LMDZ:

  • version 1.6.1 of ecrad
  • files are no longer grouped in the same ecrad directory.
  • the structure of ecrad offline is preserved to facilitate updating in LMDZ
  • cfg.bld modified to take into account the new added subdirectories.
  • the interface routines and those added in ecrad are moved to the phylmd directory
File size: 18.1 KB
Line 
1MODULE YOERAD
2
3USE PARKIND1,            ONLY : JPIM, JPRB
4USE YOE_SPECTRAL_PLANCK, ONLY : TSPECTRALPLANCK
5
6IMPLICIT NONE
7
8SAVE
9
10!     ------------------------------------------------------------------
11!*    ** *YOERAD* - CONTROL OPTIONS FOR RADIATION CONFIGURATION
12!     ------------------------------------------------------------------
13
14! Here we have hard-coded the options that configure the radiation
15! scheme; in the IFS they are set in suecrad.F90 with the option to
16! override them using the NAERAD namelist
17TYPE :: TERAD
18  INTEGER(KIND=JPIM) :: NSW = 6
19  INTEGER(KIND=JPIM) :: NLWEMISS = 2
20  INTEGER(KIND=JPIM) :: NICEOPT = 3
21  INTEGER(KIND=JPIM) :: NLIQOPT = 4
22  INTEGER(KIND=JPIM) :: NRADIP = 3
23  INTEGER(KIND=JPIM) :: NRADLP = 2
24  INTEGER(KIND=JPIM) :: NLWOUT = 1
25  INTEGER(KIND=JPIM) :: NDECOLAT = 2
26  INTEGER(KIND=JPIM) :: NMINICE = 1
27  INTEGER(KIND=JPIM) :: NAERMACC = 1
28  INTEGER(KIND=JPIM) :: NMCVAR = 12
29  INTEGER(KIND=JPIM) :: NLWSCATTERING = 1
30  INTEGER(KIND=JPIM) :: NSWSOLVER = 3 ! Tripleclouds
31  INTEGER(KIND=JPIM) :: NLWSOLVER = 3 ! Tripleclouds
32  INTEGER(KIND=JPIM) :: NSOLARSPECTRUM = 0
33  INTEGER(KIND=JPIM) :: NDUMPBADINPUTS = 0
34  INTEGER(KIND=JPIM) :: NDUMPINPUTS = 0
35  INTEGER(KIND=JPIM) :: NCLOUDOVERLAP = 3
36  REAL(KIND=JPRB)    :: RCLOUD_FRAC_STD = 1.0_JPRB
37  REAL(KIND=JPRB)    :: RCLOUD_SEPARATION_SCALE_TOA = 14000.0_JPRB
38  REAL(KIND=JPRB)    :: RCLOUD_SEPARATION_SCALE_SURF = 2500.0_JPRB
39  LOGICAL :: LFU_LW_ICE_OPTICS_BUG = .FALSE.
40  LOGICAL :: LDIAGFORCING = .FALSE.
41  LOGICAL :: LAPPROXLWUPDATE = .TRUE.
42  LOGICAL :: LAPPROXSWUPDATE = .FALSE.
43  LOGICAL :: LCCNL = .TRUE.
44  LOGICAL :: LCCNO = .TRUE.
45  REAL(KIND=JPRB) :: RCCNLND = 900.0_JPRB
46  REAL(KIND=JPRB) :: RCCNSEA = 50.0_JPRB
47  REAL(KIND=JPRB) :: RRE2DE = 0.64952_JPRB
48  REAL(KIND=JPRB) :: RMINICE = 60.0_JPRB
49
50  ! Look-up table for Planck function in emissivity intervals
51  TYPE(TSPECTRALPLANCK) :: YSPECTPLANCK
52
53END TYPE TERAD
54!============================================================================
55
56TYPE(TERAD), POINTER :: YRERAD => NULL()
57
58
59!        * E.C.M.W.F. PHYSICS PACKAGE *
60
61!     J.-J. MORCRETTE       E.C.M.W.F.      89/07/14
62! Modifications
63!    R J Hogan 20 May  2014: Added LApproxLwUpdate
64!    R J Hogan 19 June 2014: Added LApproxSwUpdate
65!    R J Hogan 19 Nov  2014: Added LCentredTimeSZA
66!    R J Hogan 15 Apr  2015: Added LMannersSwUpdate
67!    R J Hogan 24 Apr  2015: Added LAverageSZA
68!    R J Hogan 18 Sept 2015: Added LUsePre2017Rad (was LUsePre2015Rad)
69!    R J Hogan 1  Mar  2016: Added NLwSolver, NSwSolver, NLwScattering
70!    A Bozzo      Feb  2017: Added logical to enable 3D aerosol climatology
71!    R J Hogan 9  Mar  2018: Added NDUMPBADINPUTS
72!    R J Hogan 22 Jan  2019: Added NLWEMISS, NCLOUDOVERLAP, NDUMPINPUTS
73!    R J Hogan 4  Feb  2019: Added NLWOUT
74!    R J Hogan 5  Feb  2019: Added YSPECTPLANCK
75!    R J Hogan 11 Mar  2019: Added CGHG*FILE, CSOLARIRRADIANCEFILE
76
77!  NAME     TYPE     PURPOSE
78!  ----  :  ----   : ---------------------------------------------------
79! LERAD1H: LOGICAL : .T. TO ALLOW MORE FREQUENT RADIATION CALCULATIONS
80!                  : DURING FIRST N HOURS OF FORECAST
81! NLNGR1H: INTEGER : NUMBER FORECAST HOURS DURING WHICH MORE FREQUENT
82!                    RADIATION CALCULATIONS ARE REQUIRED
83! LEPO3RA: LOGICAL : .T. IF PROGNOSTIC OZONE (EC) IS PASSED TO RADIATION
84! NAER   : INTEGER : CONFIGURATION INDEX FOR AEROSOLS
85! NMODE  : INTEGER : CONFIGURATION FOR RADIATION CODE: FLUX VS. RADIANCE
86! NOZOCL : INTEGER : CHOICE OF OZONE CLIMATOLOGY (0 old, 1 new)
87! NRADFR : INTEGER : FREQUENCY OF FULL RADIATION COMPUTATIONS
88!                    IF(NRADFR.GT.0): RAD EVERY 'NRADFR' TIME-STEPS
89!                    IF(NRADFR.LT.0): RAD EVERY '-NRADFR' HOURS
90! NRADPFR: INTEGER : PRINT FREQUENCY FOR RAD.STATISTICS (in RAD.T.STEPS)
91! NRADPLA: INTEGER : PRINT RAD.STATISTICS EVERY 'NRADPLA' ROWS
92! NRADINT: INTEGER : RADIATION INTERPOLATION METHOD
93!                  : 1 = SPECTRAL TRANSFORM INTERPOLATION
94!                  : 2 =  4 POINT HORIZONTAL INTERPOLATION
95!                  : 3 = 12 POINT HORIZONTAL INTERPOLATION
96! NRADRES: INTEGER : RADIATION GRID SPECTRAL RESOLUTION
97! NRADNFR: INTEGER : NORMAL   FREQUENCY OF RADIATION STEPS
98! NRADSFR: INTEGER : START-UP FREQUENCY OF RADIATION STEPS
99! NRADE1H: INTEGER : START-UP FREQUENCY OF RADIATION STEPS FOR EPS
100! NRADE3H: INTEGER : SUBSEQUENT FREQUENCY OF RADIATION STEPS FOR EPS
101! NRADELG: INTEGER : LENGTH IN HOURS DURING WHICH THE FREQUENCY OF RADIATION IS INCREASED FOR EPS
102! NOVLP  : INTEGER : CLOUD OVERLAP CONFIGURATION IN PRE-MCRAD/ECRAD SCHEME
103!                  : 1 = Max-rand (Geleyn & Hollingsworth)
104!                  : 2 = Maximum
105!                  : 3 = Random
106! NRPROMA: INTEGER : VECTOR LENGTH FOR RADIATION CALCULATIONS
107! NSW    : INTEGER : NUMBER OF SHORTWAVE SPECTRAL INTERVALS
108! NSWNL  : INTEGER : NUMBER OF SHORTWAVE SPECTRAL INTERVALS IN NL MODEL
109! NSWTL  : INTEGER : NUMBER OF SHORTWAVE SPECTRAL INTERVALS IN TL MODEL
110! NTSW   : INTEGER : MAXIMUM POSSIBLE NUMBER OF SW SPECTRAL INTERVALS
111! NUV    : INTEGER : NUMBER OF UV SPECTRAL INTERVALS FOR THE UV PROCESSOR   
112! LOPTRPROMA:LOGICAL: .T. NRPROMA will be optimised
113!                   : .F. NRPROMA will not be optimised (forced
114!                   :         by negative NRPROMA in namelist)
115
116! NRADIP : INTEGER : INDEX FOR DIAGNOSIS OF ICE CLOUD EFFECTIVE RADIUS
117!          0 = fixed at 40 microns
118!          1 = Liou & Ou (1994) capped between 40-130 microns
119!          2 = Liou & Ou but capped between 30 and 60 microns
120!          3 = Sun & Rikus (1999) revised by Sun (2001)
121! NRADLP : INTEGER : INDEX FOR DIAGNOSIS OF LIQ. CLOUD EFFECTIVE RADIUS
122!          0 = ERA-15 function of pressure
123!          1 = 10 microns over land, 13 microns over sea
124!          2 = Martin_et_al (1994) in terms of land-sea number conc
125!          3 = Linked to prognostic aerosols
126! NICEOPT: INTEGER : INDEX FOR ICE CLOUD OPTICAL PROPERTIES
127!          0 = SW Ebert-Curry, LW Smith & Shi (1992)
128!          1 = SW Ebert-Curry, LW Ebert-Curry (1992)
129!          2 = SW & LW Fu-Liou (1993)
130!          3 = SW Fu (1996) LW Fu et al. (1998) + Chou et al. (1999) LW scatt approx
131!   the following only available in newer modular radiation scheme:
132!          4 = SW/LW Baran data fitted versus ice mixing ratio
133! NLIQOPT: INTEGER : INDEX FOR LIQUID WATER CLOUD OPTICAL PROPERTIES
134!          0 = SW Fouquart (1991) LW Smith-Shi (1992) YF/SmSh
135!          1 = SW Slingo (1989) LW Savijarvi (1997)
136!          2 = SW Slingo (1989) LW Lindner-Li (2000)
137!   the following only available in RADLSW, not RADLSWR:
138!          3 = SW Nielsen       LW Smith-Shi
139!   the following only available in newer modular radiation scheme:
140!          4 = SW/LW SOCRATES scheme
141!
142! LONEWSW: LOGICAL : .T. IF NEW SW CODE IS ACTIVE
143! LECSRAD: LOGICAL : .T. IF CLEAR-SKY RADIATION IS ARCHIVED AS PEXTR2
144! NCSRADF: INTEGER : 1 IF ACCUMULATED, 2 IF INSTANTANEOUS
145! LRRTM  : LOGICAL : .T. IF RRTM140MR IS USED FOR LW RADIATION TRANSFER
146
147! LHVOLCA: LOGICAL : .T. IF USING HISTORICAL VOLCANIC AEROSOLS
148! LNEWAER: LOGICAL : .T. IF AEROSOL MONTHLY DISTRIBUTIONS ARE USED
149! LNOTROAER:LOGICAL: .T. IF NO TROPOSPHERIC AEROSOLS
150! CRTABLEDIR: CHAR : IF NRADINT > 0 SPECIFIES DIRECTORY PATH FOR RADIATION
151!                  : GRID RTABLE NAMELIST
152! CRTABLEFIL: CHAR : IF NRADINT > 0 SPECIFIES FILE NAME OF RADIATION
153!                  : GRID RTABLE NAMELIST
154! LRAYL  : LOGICAL : .T. NEW RAYLEIGH FOR SW-6 VERSION
155
156! RAOVLP : REAL    : COEFFICIENTS FOR ALPHA1 FACTOR IN HOGAN &
157! RBOVLP : REAL    : ILLINGWORTH's PARAMETRIZATION
158
159! LCCNL  : LOGICAL : .T. IF CCN CONCENTRATION OVER LAND IS DIAGNOSED
160! LCCNO  : LOGICAL : .T. IF CCN CONCENTRATION OVER OCEAN IS DIAGNOSED
161! RCCNLND: REAL    : NUMBER CONCENTRATION (CM-3) OF CCNs OVER LAND
162! RCCNSEA: REAL    : NUMBER CONCENTRATION (CM-3) OF CCNs OVER SEA
163
164! LDIFFC : LOGICAL : .T. IF SAVIJARVI'S DIFFUSIVITY CORRECTION IS ON
165
166! NINHOM : INTEGER : 0 IF NO INHOMOGENEITY SCALING EFFECT
167!                    1 IF SIMPLE 0.7 SCALING
168!                    2 IF BARKER, 3 IF CAIRNS ET AL.
169! RLWINHF: REAL    : INHOMOG. SCALING FACTOR FOR CLOUD LW OPTICAL THICKNESS
170! RSWINHF: REAL    : INHOMOG. SCALING FACTOR FOR CLOUD SW OPTICAL THICKNESS
171
172! NPERTAER : INTERGER : PERCENTAGE OF PERTURBATION FOR AEROSOL   
173! NPERTOZONE : INTEGER : PERCENTAGE OF PERTURBATION FOR OZONE
174! NHINCSOL : INTEGER :  0: Total Solar Irradiance (TSI) fixed at 1366.0 W m-2
175!                       1: Deprecated - use default
176!                       2: Deprecated - use default
177!                       3: Deprecated (was CMIP5) - use default
178!                       4: TSI from CMIP6 NetCDF (default), or override with CSOLARIRRADIANCEFILE
179! NSWWVCONTINUUM : INTEGER : 0 MT_CKD2.5 (SRTM default WV continuum)
180!                            1 CAVIAR continuum (Shine et al. 2016)
181! LECO2VAR: LOGICAL: .T. IF ERA-40/AMIP2 VARIABILITY OF GHG IS ON (ignored)
182! LHGHG  : LOGICAL : .T. IF VARIABILITY OF GREENHOUSE GASES (INCLUDING CO2) IS ON
183! N.B.: LHGHG supersedes LECO2VAR and allows using better specification of trace gases
184! NSCEN  : INTEGER : 21st CENTURY SCENARIO FOR GHG (1=A1B, 2=A2, 3=B1)
185! RRe2De : REAL    : CONVERSION FACTOR BETWWEN EFFECTIVE RADIUS AND PARTICLE SIZE
186! RMINICE: REAL    : MINIMUM SIZE FOR ICE PARTICLES (um)
187!                    FOR ICE
188! NMINICE: INTEGER : 1-6 MINIMUM ICE PARTICLE SIZE DEPENDS ON LATITUDE, 0=INDEPENDENT OF LATITUDE
189! NDECOLAT:INTEGER : DECORRELATION LENGTH FOR CF AND CW
190!                     0: SPECIFIED INDEPENDENT OF LATITUDE, 1: SHONK-HOGAN, 2: IMPROVED
191! NMCICA : INTEGER :  0: NO McICA
192!                     1: McICA w maximum-random in cloud generator
193!                     2: McICA w generalized overlap in cloud generator
194! LESO4HIS: LOGICAL:.T.: Use historical/projected SO4 data per decade and month
195! NGHGRAD: INTEGER : configuration of 3D GHG climatologies accounted for in radiation
196!                     0: global values
197!                     1: CO2       2: CH4    3: N2O    4: NO2    5:CFC11   6:CFC12
198!                    12: CO2+CH4  13: CO2+CH4+N2O     
199!                    16: CO2+CH4+N2O+CFC11+CFC12
200! LETRACGMS: LOGICAL : F=Cariolle climatol. T=GEMS-derived clim for CO2, CH4, O3
201! LAERCLIM : LOGICAL : .T. for output of the climatological aerosol optical depth at 550 nm
202! LAERVISI : LOGICAL : .T. for output of the visibility (from diagnsotic or prognostic aerosols)
203! NVOLCVERT: INTEGER : Vertical distribution of volcanic aerosol
204!                       0: original profile, diagnosed from T
205!                       1: original profile, but upper boundary at 10hPa
206!                       2: lower boundary diagnosed from ozone, upper boundary at 10hPa
207! LVOLCSPEC: LOGICAL : T for specified volcanic aerosol
208! LVOLCDAMP: LOGICAL : T for damping of specified volcanic aerosol from initial value
209! RVOLCSPEC: REAL    : Specified volcanic aerosol (total optical depth) in NH/Tropics/SH
210! RNs                : derived from Avogadro
211! RSIGAIR: invariant terms in expression of Rayleigh scattering cross-section
212! NREDGSW  : INTEGER : 0 full resolution for RRTM_SW (224)
213!                      1 ECMWF High resolution model configuration (_SW: 112)
214!                      2 ECMWF EPS configuration (_SW: 56)
215! NREDGLW  : INTEGER : 0 full resolution for RRTM_LW (256)
216!                      1 ECMWF High resolution model configuration (_LW: 140)
217!                      2 ECMWF EPS configuration (_LW: 70)
218! LDIAGFORCING : LOGICAL : T Write input ozone, ghg and aerosol forcing to 3D fields
219!                            To be used for diagnostics only; do not use in production runs
220! NAERMACC : INTEGER : MACC-derived aerosol climatology on a NMCLAT x NMCLON grid
221! RAESHxx  : REAL    : parameters related to scale height of MACC-derived aerosol climatology
222! CVDAExx  : REAL    : scale heights of MACC-derived aerosol climatology
223! LAERADJDU: LOGICAL : T adjust MACC-derived DU climatology
224! LAERADCLI: LOGICAL : T if radiation uses the MACC-derived aerosol climatology
225! LApproxLwUpdate : LOGICAL : Update the longwave upwelling flux every
226!                             timestep/gridpoint using the stored rate
227!                             of change of the fluxes with respect to
228!                             the surface upwelling longwave flux
229! LApproxSwUpdate : LOGICAL : Update the shortwave upwelling flux
230!                             every gridpoint to account for the local
231!                             value of surface albedo
232! LMannersSwUpdate: LOGICAL : Update the shortwave flux every timestep
233!                             using Manners et al. (2009) correction
234!                             for solar zenith angle change
235! LCentredTimeSZA : LOGICAL : Compute solar zenith angle in radiation
236!                             scheme half way between calls to
237!                             radiation scheme (rather than previous
238!                             behaviour, which is half way between
239!                             calls plus half a model timestep)
240! LAverageSZA     : LOGICAL : Compute an averaged solar zenith angle
241!                             across the time interval required
242!                             (either a model timestep or a radiation
243!                             timestep). Should be used with
244!                             LCentredTimeSZA=TRUE.
245! LUsePre2017Rad  : LOGICAL : Use the pre-2017 radiation scheme, rather
246!                             than the modular scheme contained in the
247!                             separate "radiation" library.  Note that
248!                             the radiation library may make use of the
249!                             pre-2017 RRTM-G gas optics.
250! RCloud_Frac_Std : REAL    : Cloud water content horizontal fractional
251!                             standard deviation in a gridbox
252! LInterpInCloudMean : LOGICAL : When interpolating model fields to
253!                             radiation grid, interpolate in-cloud
254!                             mean water contents?  Better
255!                             conservation achieved by interpolating
256!                             gridbox-means.
257! CGHGCLIMFILE : STRING :     Location of greenhouse gas climatology file,
258!                             or empty if the default is to be used. If it
259!                             starts with "." or "/" then a relative path
260!                             is assumed, otherwise the default directory.
261! CGHGTIMESERIESFILE:STRING : Location of greenhouse gas timeseries
262!                             file, or empty if it is to be worked out
263!                             from the NSCEN, YOECMIP%NGHGCMIP and
264!                             YOECMIP%NRCP variables. If it starts
265!                             with "." or "/" then a relative path is
266!                             assumed, otherwise the default
267!                             directory.
268! CSOLARIRRADIANCEFILE:STRING:Location of Total Solar Irradiance file,
269!                             or empty if the default is to be
270!                             used. If it starts with "." or "/" then
271!                             a relative path is assumed, otherwise
272!                             the default directory.
273! NLWEMISS      : INTEGER :   Number of emissivity spectral intervals, set
274!                             according to the value of NEMISSSCHEME; traditionally
275!                             this has always been 2: outside the IR window and within
276! NLWOUT        : INTEGER :   Number of spectral intervals to pass LW downwelling flux
277!                             to RADHEATN; traditionally this was 1, but this led
278!                             to errors with LAPPROXLWUPDATE=TRUE, which updated
279!                             fluxes using a single broadband emissivity. Now we can
280!                             do approximate updates using full spectral emissivity.
281! ------------------------------------------------------------------
282! THE FOLLOWING ARE ONLY USED FOR THE ECRAD SCHEME (LUsePre2017Rad = .FALSE.)
283! NLwScattering   : INTEGER : 0: No longwave scattering
284!                             1: Longwave scattering by clouds only
285!                             2: Longwave scattering by clouds and aerosols
286! NSwSolver       : INTEGER :
287! NLwSolver       : INTEGER : 0: McICA
288!                             1: SPARTACUS 1D
289!                             2: SPARTACUS 3D
290!                             3: TripleClouds
291! LFU_LW_ICE_OPTICS_BUG : LOGICAL : Continue to use bug in Fu LW ice
292!                             optics whereby single scattering albedo is
293!                             one minus what it should be
294! NSOLARSPECTRUM : INTEGER :  0: Kurucz
295!                             1: Coddington et al. (BAMS 2016)
296! NDUMPBADINPUTS : INTEGER :  0: Warn only if fluxes out of physical bounds
297!                             n: Write netcdf file of bad inputs up to n times per task
298!                            -n: Abort if fluxes ever out of physical bounds
299! NDUMPINPUTS    : INTEGER :  0: Do nothing
300!                             n: Write netcdf file of all inputs up to n times per task
301! NCLOUDOVERLAP  : INTEGER :  Cloud overlap scheme
302!                             1: Maximum-random
303!                             2: Exponential-exponential (the actual behaviour of McRad)
304!                             3: Exponential-random (only option for Tripleclouds and SPARTACUS)
305! RCLOUD_SEPARATION_SCALE_TOA, RCLOUD_SEPARATION_SCALE_SURF : REAL
306!                 Cloud horizontal length scale, in metres, used to
307!                 compute rate of horizontal exchange of radiation
308!                 between clouds and clear skies in SPARTACUS solver
309! ------------------------------------------------------------------
310! KMODTS : INTEGER   : (A Bozzo) switch for different radiative transfer schemes for UV
311!                       = 0 Fouquart&Bonnel adapted by Morcrette and Arola
312!                       = 1 eddington (joseph et al., 1976)
313!                       = 2 pifm (zdunkowski et al., 1980)
314!                       = 3 discrete ordinates (liou, 1973)
315!     ------------------------------------------------------------------
316! TRBKG : REAL tropospheric background OD@550nm for aerosol climatology.
317!                  default for Tegen climatology was 0.03
318! STBKG : REAL stratospheric background OD@550nm for aerosol climatology.
319!     ------------------------------------------------------------------
320! LDUSEASON : LOGICAL enables a monthly-varying scale height for the
321!                     dust aerosol climatology
322! LAER3D : LOGICAL : to enable aerosol climatology in 3D
323
324
325END MODULE YOERAD
Note: See TracBrowser for help on using the repository browser.