SCALE-RM
scale_atmos_solarins.F90
Go to the documentation of this file.
1 !-------------------------------------------------------------------------------
12 !-------------------------------------------------------------------------------
13 #include "scalelib.h"
15  !-----------------------------------------------------------------------------
16  !
17  !++ used modules
18  !
19  use scale_precision
20  use scale_io
21  use scale_prof
22  !-----------------------------------------------------------------------------
23  implicit none
24  private
25  !-----------------------------------------------------------------------------
26  !
27  !++ Public procedure
28  !
29  public :: atmos_solarins_setup
30  public :: atmos_solarins_orbit
31  public :: atmos_solarins_insolation
33 
34  interface atmos_solarins_insolation
35  module procedure atmos_solarins_insolation_0d
36  module procedure atmos_solarins_insolation_2d
37  end interface atmos_solarins_insolation
38 
39  !-----------------------------------------------------------------------------
40  !
41  !++ Public parameters & variables
42  !
43  real(rp), public :: atmos_solarins_constant = 1360.250117_rp ! Solar constant [W/m2]
44 
45  logical, public :: atmos_solarins_set_ve = .false. ! Set vernal equinox condition?
46 
47  logical, public :: atmos_solarins_set_ideal = .false. ! Set obliquity and eccentricity?
48  real(rp), public :: atmos_solarins_obliquity = 23.44_rp ! Obliquity [deg] cf. https://nssdc.gsfc.nasa.gov/planetary/factsheet/earthfact.html
49  real(rp), public :: atmos_solarins_eccentricity = 0.0167_rp ! Eccentricity
50  real(rp), public :: atmos_solarins_perihelion_lon = 282.94719_rp ! Longitude of perihelion [deg].
51  integer, public :: atmos_solarins_ve_date(6) ! Date of first vernal equinox
52  data atmos_solarins_ve_date / 2000, 3, 20, 7, 35, 0 /
53  real(rp), public :: atmos_solarins_diurnal_sec ! Seconds of the diurnal period [sec]
54  real(rp), public :: atmos_solarins_annual_sec ! Seconds of the annual period [sec]
55 
56  logical, public :: atmos_solarins_fixedlatlon = .false. ! Latitude/Longitude is fixed?
57  real(rp), public :: atmos_solarins_lon ! Longitude for radiation [rad]
58  real(rp), public :: atmos_solarins_lat ! Latitude for radiation [rad]
59 
60  logical, public :: atmos_solarins_fixeddate = .false. ! Date is fixed?
61  integer, public :: atmos_solarins_date(6) ! Date for radiation [Y,M,D,H,M,S]
62 
63  !-----------------------------------------------------------------------------
64  !
65  !++ Private procedure
66  !
67  !-----------------------------------------------------------------------------
68  !
69  !++ Private parameters & variables
70  !
71  real(rp), private :: obliquity ! obliquity [rad]
72  real(rp), private :: e ! eccentricity
73  real(rp), private :: omega ! longitude of perihelion [rad]
74  real(rp), private :: lambda_m0 ! longitude at the vernal equinox associated with circle orbit [rad]
75 
76  integer, private, parameter :: year_ref = 1950 ! reference year [year]
77  integer, private :: ve_date(6) ! reference date of vernal equinox
78  data ve_date / 2000, 3, 20, 7, 35, 0 /
79 
80  real(rp), private, parameter :: obliquity_ref = 23.320556_rp ! initial condition of obliquity (epsilon_star)
81  real(rp), private, parameter :: psi_bar = 50.439273_rp ! parameter for general precession [second of arc]
82  real(rp), private, parameter :: zeta = 3.392506_rp ! parameter for general precession [degree]
83 
84  real(dp), private :: caldaysec ! seconds of a calendar day
85  real(dp), private :: calyearday ! days of a calendar year
86  real(dp), private :: soldaysec ! seconds of a solar day
87  real(dp), private :: solyearsec ! seconds of a solar year
88  logical, private :: day_calender_synced = .true. ! solar diurnal cycle is synced with calendar?
89  logical, private :: year_calender_synced = .true. ! solar annual cycle is synced with calendar?
90 
91 
92  !-----< Parameter tables from Berger(1978b) >-----
93  integer, private, parameter :: nobliq = 47 ! # of terms of the series expansion of epsilon
94  real(rp), private :: obliq_amp (nobliq) ! amplitude [second of arc]
95  real(rp), private :: obliq_rate (nobliq) ! mean rate [second of arc/year]
96  real(rp), private :: obliq_phase(nobliq) ! phase [degree of arc]
97 
98  data obliq_amp / &
99  -2462.2214466_rp, & ! 1
100  -857.3232075_rp, & ! 2
101  -629.3231835_rp, & ! 3
102  -414.2804924_rp, & ! 4
103  -311.7632587_rp, & ! 5
104  308.9408604_rp, & ! 6
105  -162.5533601_rp, & ! 7
106  -116.1077911_rp, & ! 8
107  101.1189923_rp, & ! 9
108  -67.6856209_rp, & ! 10
109  24.9079067_rp, & ! 11
110  22.5811241_rp, & ! 12
111  -21.1648355_rp, & ! 13
112  -15.6549876_rp, & ! 14
113  15.3936813_rp, & ! 15
114  14.6660938_rp, & ! 16
115  -11.7273029_rp, & ! 17
116  10.2742696_rp, & ! 18
117  6.4914588_rp, & ! 19
118  5.8539148_rp, & ! 20
119  -5.4872205_rp, & ! 21
120  -5.4290191_rp, & ! 22
121  5.1609570_rp, & ! 23
122  5.0786314_rp, & ! 24
123  -4.0735782_rp, & ! 25
124  3.7227167_rp, & ! 26
125  3.3971932_rp, & ! 27
126  -2.8347004_rp, & ! 28
127  -2.6550721_rp, & ! 29
128  -2.5717867_rp, & ! 30
129  -2.4712188_rp, & ! 31
130  2.4625410_rp, & ! 32
131  2.2464112_rp, & ! 33
132  -2.0755511_rp, & ! 34
133  -1.9713669_rp, & ! 35
134  -1.8813061_rp, & ! 36
135  -1.8468785_rp, & ! 37
136  1.8186742_rp, & ! 38
137  1.7601888_rp, & ! 39
138  -1.5428851_rp, & ! 40
139  1.4738838_rp, & ! 41
140  -1.4593669_rp, & ! 42
141  1.4192259_rp, & ! 43
142  -1.1818980_rp, & ! 44
143  1.1756474_rp, & ! 45
144  -1.1316126_rp, & ! 46
145  1.0896928_rp / ! 47
146 
147  data obliq_rate / &
148  31.609974_rp, & ! 1
149  32.620504_rp, & ! 2
150  24.172203_rp, & ! 3
151  31.983787_rp, & ! 4
152  44.828336_rp, & ! 5
153  30.973257_rp, & ! 6
154  43.668246_rp, & ! 7
155  32.246691_rp, & ! 8
156  30.599444_rp, & ! 9
157  42.681324_rp, & ! 10
158  43.836462_rp, & ! 11!
159  47.439436_rp, & ! 12
160  63.219948_rp, & ! 13
161  64.230478_rp, & ! 14
162  1.010530_rp, & ! 15
163  7.437771_rp, & ! 16
164  55.782177_rp, & ! 17
165  0.373813_rp, & ! 18
166  13.218362_rp, & ! 19
167  62.583231_rp, & ! 20
168  63.593761_rp, & ! 21
169  76.438310_rp, & ! 22
170  45.815258_rp, & ! 23
171  8.448301_rp, & ! 24
172  56.792707_rp, & ! 25
173  49.747842_rp, & ! 26
174  12.058272_rp, & ! 27
175  75.278220_rp, & ! 28
176  65.241008_rp, & ! 29
177  64.604291_rp, & ! 30
178  1.647247_rp, & ! 31
179  7.811584_rp, & ! 32
180  12.207832_rp, & ! 33
181  63.856665_rp, & ! 34
182  56.155990_rp, & ! 35
183  77.448840_rp, & ! 36
184  6.801054_rp, & ! 37
185  62.209418_rp, & ! 38
186  20.656133_rp, & ! 39
187  48.344406_rp, & ! 40
188  55.145460_rp, & ! 41
189  69.000539_rp, & ! 42
190  11.071350_rp, & ! 43
191  74.291298_rp, & ! 44
192  11.047742_rp, & ! 45
193  0.636717_rp, & ! 46
194  12.844549_rp / ! 47
195 
196  data obliq_phase / &
197  251.9025_rp, & ! 1
198  280.8325_rp, & ! 2
199  128.3057_rp, & ! 3
200  292.7252_rp, & ! 4
201  15.3747_rp, & ! 5
202  263.7951_rp, & ! 6
203  308.4258_rp, & ! 7
204  240.0099_rp, & ! 8
205  222.9725_rp, & ! 9
206  268.7809_rp, & ! 10
207  316.7998_rp, & ! 11
208  319.6024_rp, & ! 12
209  143.8050_rp, & ! 13
210  172.7351_rp, & ! 14
211  28.9300_rp, & ! 15
212  123.5968_rp, & ! 16
213  20.2082_rp, & ! 17
214  40.8226_rp, & ! 18
215  123.4722_rp, & ! 19
216  155.6977_rp, & ! 20
217  184.6277_rp, & ! 21
218  267.2772_rp, & ! 22
219  55.0196_rp, & ! 23
220  152.5268_rp, & ! 24
221  49.1382_rp, & ! 25
222  204.6609_rp, & ! 26
223  56.5233_rp, & ! 27
224  200.3284_rp, & ! 28
225  201.6651_rp, & ! 29
226  213.5577_rp, & ! 30
227  17.0374_rp, & ! 31
228  164.4194_rp, & ! 32
229  94.5422_rp, & ! 33
230  131.9124_rp, & ! 34
231  61.0309_rp, & ! 35
232  296.2073_rp, & ! 36
233  135.4894_rp, & ! 37
234  114.8750_rp, & ! 38
235  247.0691_rp, & ! 39
236  256.6114_rp, & ! 40
237  32.1008_rp, & ! 41
238  143.6804_rp, & ! 42
239  16.8784_rp, & ! 43
240  160.6835_rp, & ! 44
241  27.5932_rp, & ! 45
242  348.1074_rp, & ! 46
243  82.6496_rp / ! 47
244 
245  integer, private, parameter :: neclip = 19 ! # of terms of the series expansion of ecliptic
246  real(rp), private :: eclip_amp (neclip) ! amplitude
247  real(rp), private :: eclip_rate (neclip) ! mean rate [second of arc/year]
248  real(rp), private :: eclip_phase(neclip) ! phase [degree of arc]
249 
250  data eclip_amp / &
251  0.01860798_rp, & ! 1
252  0.01627522_rp, & ! 2
253  -0.01300660_rp, & ! 3
254  0.00988829_rp, & ! 4
255  -0.00336700_rp, & ! 5
256  0.00333077_rp, & ! 6
257  -0.00235400_rp, & ! 7
258  0.00140015_rp, & ! 8
259  0.00100700_rp, & ! 9
260  0.00085700_rp, & ! 10
261  0.00064990_rp, & ! 11
262  0.00059900_rp, & ! 12
263  0.00037800_rp, & ! 13
264  -0.00033700_rp, & ! 14
265  0.00027600_rp, & ! 15
266  0.00018200_rp, & ! 16
267  -0.00017400_rp, & ! 17
268  -0.00012400_rp, & ! 18
269  0.00001250_rp / ! 19
270 
271  data eclip_rate / &
272  4.2072050_rp, & ! 1
273  7.3460910_rp, & ! 2
274  17.8572630_rp, & ! 3
275  17.2205460_rp, & ! 4
276  16.8467330_rp, & ! 5
277  5.1990790_rp, & ! 6
278  18.2310760_rp, & ! 7
279  26.2167580_rp, & ! 8
280  6.3591690_rp, & ! 9
281  16.2100160_rp, & ! 10
282  3.0651810_rp, & ! 11
283  16.5838290_rp, & ! 12
284  18.4939800_rp, & ! 13
285  6.1909530_rp, & ! 14
286  18.8677930_rp, & ! 15
287  17.4255670_rp, & ! 16
288  6.1860010_rp, & ! 17
289  18.4174410_rp, & ! 18
290  0.6678630_rp / ! 19
291 
292  data eclip_phase / &
293  28.620089_rp, & ! 1
294  193.788772_rp, & ! 2
295  308.307024_rp, & ! 3
296  320.199637_rp, & ! 4
297  279.376984_rp, & ! 5
298  87.195000_rp, & ! 6
299  349.129677_rp, & ! 7
300  128.443387_rp, & ! 8
301  154.143880_rp, & ! 9
302  291.269597_rp, & ! 10
303  114.860583_rp, & ! 11
304  332.092251_rp, & ! 12
305  296.414411_rp, & ! 13
306  145.769910_rp, & ! 14
307  337.237063_rp, & ! 15
308  152.092288_rp, & ! 16
309  126.839891_rp, & ! 17
310  210.667199_rp, & ! 18
311  72.108838_rp / ! 19
312 
313  integer, private, parameter :: nprece = 78 ! # of terms of the series expansion of general precession
314  real(rp), private :: prece_amp (nprece) ! amplitude
315  real(rp), private :: prece_rate (nprece) ! mean rate [second of arc/year]
316  real(rp), private :: prece_phase(nprece) ! phase [degree of arc]
317 
318  data prece_amp / &
319  7391.0225890_rp, & ! 1
320  2555.1526947_rp, & ! 2
321  2022.7629188_rp, & ! 3
322  -1973.6517951_rp, & ! 4
323  1240.2321818_rp, & ! 5
324  953.8679112_rp, & ! 6
325  -931.7537108_rp, & ! 7
326  872.3795383_rp, & ! 8
327  606.3544732_rp, & ! 9
328  -496.0274038_rp, & ! 10
329  456.9608039_rp, & ! 11
330  346.9462320_rp, & ! 12
331  -305.8412902_rp, & ! 13
332  249.6173246_rp, & ! 14
333  -199.1027200_rp, & ! 15
334  191.0560889_rp, & ! 16
335  -175.2936572_rp, & ! 17
336  165.9068833_rp, & ! 18
337  161.1285917_rp, & ! 19
338  139.7878093_rp, & ! 20
339  -133.5228399_rp, & ! 21
340  117.0673811_rp, & ! 22
341  104.6907281_rp, & ! 23
342  95.3227476_rp, & ! 24
343  86.7824524_rp, & ! 25
344  86.0857729_rp, & ! 26
345  70.5893698_rp, & ! 27
346  -69.9719343_rp, & ! 28
347  -62.5817473_rp, & ! 29
348  61.5450059_rp, & ! 30
349  -57.9364011_rp, & ! 31
350  57.1899832_rp, & ! 32
351  -57.0236109_rp, & ! 33
352  -54.2119253_rp, & ! 34
353  53.2834147_rp, & ! 35
354  52.1223575_rp, & ! 36
355  -49.0059908_rp, & ! 37
356  -48.3118757_rp, & ! 38
357  -45.4191685_rp, & ! 39
358  -42.2357920_rp, & ! 40
359  -34.7971099_rp, & ! 41
360  34.4623613_rp, & ! 42
361  -33.8356643_rp, & ! 43
362  33.6689362_rp, & ! 44
363  -31.2521586_rp, & ! 45
364  -30.8798701_rp, & ! 46
365  28.4640769_rp, & ! 47
366  -27.1960802_rp, & ! 48
367  27.0860736_rp, & ! 49
368  -26.3437456_rp, & ! 50
369  24.7253740_rp, & ! 51
370  24.6732126_rp, & ! 52
371  24.4272733_rp, & ! 53
372  24.0127327_rp, & ! 54
373  21.7150294_rp, & ! 55
374  -21.5375347_rp, & ! 56
375  18.1148363_rp, & ! 57
376  -16.9603104_rp, & ! 58
377  -16.1765215_rp, & ! 59
378  15.5567653_rp, & ! 60
379  15.4846529_rp, & ! 61
380  15.2150632_rp, & ! 62
381  14.5047426_rp, & ! 63
382  -14.3873316_rp, & ! 64
383  13.1351419_rp, & ! 65
384  12.8776311_rp, & ! 66
385  11.9867234_rp, & ! 67
386  11.9385578_rp, & ! 68
387  11.7030822_rp, & ! 69
388  11.6018181_rp, & ! 70
389  -11.2617293_rp, & ! 71
390  -10.4664199_rp, & ! 72
391  10.4333970_rp, & ! 73
392  -10.2377466_rp, & ! 74
393  10.1934446_rp, & ! 75
394  -10.1280191_rp, & ! 76
395  10.0289441_rp, & ! 77
396  -10.0034259_rp / ! 78
397 
398  data prece_rate / &
399  31.609974_rp, & ! 1
400  32.620504_rp, & ! 2
401  24.172203_rp, & ! 3
402  0.636717_rp, & ! 4
403  31.983787_rp, & ! 5
404  3.138886_rp, & ! 6
405  30.973257_rp, & ! 7
406  44.828336_rp, & ! 8
407  0.991874_rp, & ! 9
408  0.373813_rp, & ! 10
409  43.668246_rp, & ! 11
410  32.246691_rp, & ! 12
411  30.599444_rp, & ! 13
412  2.147012_rp, & ! 14
413  10.511172_rp, & ! 15
414  42.681324_rp, & ! 16
415  13.650058_rp, & ! 17
416  0.986922_rp, & ! 18
417  9.874455_rp, & ! 19
418  13.013341_rp, & ! 20
419  0.262904_rp, & ! 21
420  0.004952_rp, & ! 22
421  1.142024_rp, & ! 23
422  63.219948_rp, & ! 24
423  0.205021_rp, & ! 25
424  2.151964_rp, & ! 26
425  64.230478_rp, & ! 27
426  43.836462_rp, & ! 28
427  47.439436_rp, & ! 29
428  1.384343_rp, & ! 30
429  7.437771_rp, & ! 31
430  18.829299_rp, & ! 32
431  9.500642_rp, & ! 33
432  0.431696_rp, & ! 34
433  1.160090_rp, & ! 35
434  55.782177_rp, & ! 36
435  12.639528_rp, & ! 37
436  1.155138_rp, & ! 38
437  0.168216_rp, & ! 39
438  1.647247_rp, & ! 40
439  10.884985_rp, & ! 41
440  5.610937_rp, & ! 42
441  12.658184_rp, & ! 43
442  1.010530_rp, & ! 44
443  1.983748_rp, & ! 45
444  14.023871_rp, & ! 46
445  0.560178_rp, & ! 47
446  1.273434_rp, & ! 48
447  12.021467_rp, & ! 49
448  62.583231_rp, & ! 50
449  63.593761_rp, & ! 51
450  76.438310_rp, & ! 52
451  4.280910_rp, & ! 53
452  13.218362_rp, & ! 54
453  17.818769_rp, & ! 55
454  8.359495_rp, & ! 56
455  56.792707_rp, & ! 57
456  8.448301_rp, & ! 58
457  1.978796_rp, & ! 59
458  8.863925_rp, & ! 60
459  0.186365_rp, & ! 61
460  8.996212_rp, & ! 62
461  6.771027_rp, & ! 63
462  45.815258_rp, & ! 64
463  12.002811_rp, & ! 65
464  75.278220_rp, & ! 66
465  65.241008_rp, & ! 67
466  18.870667_rp, & ! 68
467  22.009553_rp, & ! 69
468  64.604291_rp, & ! 70
469  11.498094_rp, & ! 71
470  0.578834_rp, & ! 72
471  9.237738_rp, & ! 73
472  49.747842_rp, & ! 74
473  2.147012_rp, & ! 75
474  1.196895_rp, & ! 76
475  2.133898_rp, & ! 77
476  0.173168_rp / ! 78
477 
478  data prece_phase / &
479  251.9025_rp, & ! 1
480  280.8325_rp, & ! 2
481  128.3057_rp, & ! 3
482  348.1074_rp, & ! 4
483  292.7252_rp, & ! 5
484  165.1686_rp, & ! 6
485  263.7951_rp, & ! 7
486  15.3747_rp, & ! 8
487  58.5749_rp, & ! 9
488  40.8226_rp, & ! 10
489  308.4258_rp, & ! 11
490  240.0099_rp, & ! 12
491  222.9725_rp, & ! 13
492  106.5937_rp, & ! 14
493  114.5182_rp, & ! 15
494  268.7809_rp, & ! 16
495  279.6869_rp, & ! 17
496  39.6448_rp, & ! 18
497  126.4108_rp, & ! 19
498  291.5795_rp, & ! 20
499  307.2848_rp, & ! 21
500  18.9300_rp, & ! 22
501  273.7596_rp, & ! 23
502  143.8050_rp, & ! 24
503  191.8927_rp, & ! 25
504  125.5237_rp, & ! 26
505  172.7351_rp, & ! 27
506  316.7998_rp, & ! 28
507  319.6024_rp, & ! 29
508  69.7526_rp, & ! 30
509  123.5968_rp, & ! 31
510  217.6432_rp, & ! 32
511  85.5882_rp, & ! 33
512  156.2147_rp, & ! 34
513  66.9489_rp, & ! 35
514  20.2082_rp, & ! 36
515  250.7568_rp, & ! 37
516  48.0188_rp, & ! 38
517  8.3739_rp, & ! 39
518  17.0374_rp, & ! 40
519  155.3409_rp, & ! 41
520  94.1709_rp, & ! 42
521  221.1120_rp, & ! 43
522  28.9300_rp, & ! 44
523  117.1498_rp, & ! 45
524  320.5095_rp, & ! 46
525  262.3602_rp, & ! 47
526  336.2148_rp, & ! 48
527  233.0046_rp, & ! 49
528  155.6977_rp, & ! 50
529  184.6277_rp, & ! 51
530  267.2772_rp, & ! 52
531  78.9281_rp, & ! 53
532  123.4722_rp, & ! 54
533  188.7132_rp, & ! 55
534  180.1364_rp, & ! 56
535  49.1382_rp, & ! 57
536  152.5268_rp, & ! 58
537  98.2198_rp, & ! 59
538  97.4808_rp, & ! 60
539  221.5376_rp, & ! 61
540  168.2438_rp, & ! 62
541  161.1199_rp, & ! 63
542  55.0196_rp, & ! 64
543  262.6495_rp, & ! 65
544  200.3284_rp, & ! 66
545  201.6651_rp, & ! 67
546  294.6547_rp, & ! 68
547  99.8233_rp, & ! 69
548  213.5577_rp, & ! 70
549  154.1631_rp, & ! 71
550  232.7153_rp, & ! 72
551  138.3034_rp, & ! 73
552  204.6609_rp, & ! 74
553  106.5938_rp, & ! 75
554  250.4676_rp, & ! 76
555  332.3345_rp, & ! 77
556  27.3039_rp / ! 78
557 
558  real(rp), private :: arcsec2d, arcsec2r ! unit converter
559 
560  logical, private :: debug = .false.
561 
562  !-----------------------------------------------------------------------------
563 contains
564  !-----------------------------------------------------------------------------
566  !-----------------------------------------------------------------------------
567  subroutine atmos_solarins_setup( &
568  basepoint_lon, basepoint_lat, &
569  iyear )
570  use scale_prc, only: &
571  prc_abort
572  use scale_const, only: &
573  const_d2r, &
575  use scale_calendar, only: &
576  calendar_doi, &
577  calendar_hour, &
578  calendar_min, &
579  calendar_sec, &
583  use scale_time, only: &
585  time_nowday, &
587  implicit none
588  integer, intent(in) :: iyear ! year at setup
589  real(rp), intent(in) :: basepoint_lon
590  real(rp), intent(in) :: basepoint_lat
591 
592  namelist / param_atmos_solarins / &
607  debug
608 
609  real(rp) :: dyear ! delta t [year]
610  integer :: year ! used year
611  integer :: d
612  integer :: date(6)
613  real(rp) :: re_factor, sindec, cosdec, hourangle
614  real(dp) :: lambda, subsec
615  character(len=27) :: datechar
616 
617  integer :: ierr
618  !---------------------------------------------------------------------------
619 
620  log_newline
621  log_info("ATMOS_SOLARINS_setup",*) 'Setup'
622 
623  atmos_solarins_lon = basepoint_lon
624  atmos_solarins_lat = basepoint_lat
625  atmos_solarins_date(:) = -1
628 
629  !--- read namelist
630  rewind(io_fid_conf)
631  read(io_fid_conf,nml=param_atmos_solarins,iostat=ierr)
632  if( ierr < 0 ) then !--- missing
633  log_info("ATMOS_SOLARINS_setup",*) 'Not found namelist. Default used.'
634  elseif( ierr > 0 ) then !--- fatal error
635  log_error("ATMOS_SOLARINS_setup",*) 'Not appropriate names in namelist PARAM_ATMOS_SOLARINS. Check!'
636  call prc_abort
637  endif
638  log_nml(param_atmos_solarins)
639 
640  if ( atmos_solarins_set_ve ) then
641  if ( .NOT. atmos_solarins_set_ideal ) then
642  atmos_solarins_set_ideal = .true.
643  atmos_solarins_obliquity = 0.0_rp
646  endif
647  if ( .NOT. atmos_solarins_fixedlatlon ) then
649  atmos_solarins_lon = 0.0_rp
650  atmos_solarins_lat = 0.0_rp
651  endif
652  if ( .NOT. atmos_solarins_fixeddate ) then
653  atmos_solarins_fixeddate = .true.
654  atmos_solarins_date(1) = ve_date(1)
655  atmos_solarins_date(2) = ve_date(2)
656  atmos_solarins_date(3) = ve_date(3)
657  atmos_solarins_date(4) = 12
658  atmos_solarins_date(5) = 0
659  atmos_solarins_date(6) = 0
660  endif
661  endif
662 
663  arcsec2d = 1.0_rp / (60.0_rp*60.0_rp)
664  arcsec2r = arcsec2d * const_d2r
665 
666  year = iyear
667 
668  if ( atmos_solarins_fixeddate ) then
669  if( atmos_solarins_date(1) >= 0 ) year = atmos_solarins_date(1)
670  endif
671 
672  if ( atmos_solarins_set_ideal ) then
673  ve_date = atmos_solarins_ve_date
674  calyearday = calendar_doi
676 
678  solyearsec = calyearday*caldaysec
679  atmos_solarins_annual_sec = solyearsec
680  else
681  solyearsec = atmos_solarins_annual_sec
682  year_calender_synced = .false.
683  endif
684 
686  soldaysec = caldaysec
687  atmos_solarins_diurnal_sec = soldaysec
688  else
689  soldaysec = atmos_solarins_diurnal_sec
690  day_calender_synced = .false.
691  endif
692 
693  else
694  calyearday = 365.2425_dp
696  solyearsec = calyearday*caldaysec
697  soldaysec = caldaysec
698  endif
699 
700  call atmos_solarins_orbit( year )
701 
702  dyear = real( year-year_ref, kind=rp )
703 
704  !----- report data -----
705  log_newline
706  log_info("ATMOS_SOLARINS_setup",'(1x,A)') 'Solar insolation parameters '
707  log_info("ATMOS_SOLARINS_setup",'(1x,A,I7)') 'Reference year : ', year_ref
708  log_info("ATMOS_SOLARINS_setup",'(1x,A,I7)') 'Current year : ', year
709  log_info("ATMOS_SOLARINS_setup",'(1x,A,I7)') 'Difference from ref. : ', int(dyear)
710  log_newline
711  log_info("ATMOS_SOLARINS_setup",'(1x,A,F12.7)') 'Solar constant [W/m2] : ', atmos_solarins_constant
712  log_info("ATMOS_SOLARINS_setup",'(1x,A,F12.7)') 'Obliquity [deg] : ', obliquity / const_d2r
713  log_info("ATMOS_SOLARINS_setup",'(1x,A,F12.7)') 'Eccentricity : ', e
714  log_info("ATMOS_SOLARINS_setup",'(1x,A,F12.7)') 'Longitude of perihelion [deg] : ', omega / const_d2r
715 ! LOG_INFO("ATMOS_SOLARINS_setup",'(1x,A,F12.7)') 'Longitude at the vernal equinox associated with circle orbit [deg] : ', lambda_m0 / CONST_D2R
716  log_newline
717  if ( year_calender_synced ) then
718  log_info("ATMOS_SOLARINS_setup",'(1x,A )') 'Solar annual cycle is synced with calendar'
719  else
720  log_info("ATMOS_SOLARINS_setup",'(1x,A )') 'Solar annual cycle is not synced with calendar'
721  endif
722  log_info("ATMOS_SOLARINS_setup",'(1x,A,F14.4)') 'Solar annual cycle [sec] : ', solyearsec
723  log_info("ATMOS_SOLARINS_setup",'(1x,A,F14.4)') 'Solar annual cycle [day] : ', solyearsec/caldaysec
724  if ( day_calender_synced ) then
725  log_info("ATMOS_SOLARINS_setup",'(1x,A )') 'Solar diurnal cycle is synced with calendar'
726  else
727  log_info("ATMOS_SOLARINS_setup",'(1x,A )') 'Solar diurnal cycle is not synced with calendar'
728  endif
729  log_info("ATMOS_SOLARINS_setup",'(1x,A,F14.4)') 'Solar diurnal cycle [sec] : ', soldaysec
730  log_newline
731  log_info("ATMOS_SOLARINS_setup",*) 'Latitude/Longitude is fixed? : ', atmos_solarins_fixedlatlon
732  if ( atmos_solarins_fixedlatlon ) then
733  log_info("ATMOS_SOLARINS_setup",*) 'Longitude [deg] : ', atmos_solarins_lon
734  log_info("ATMOS_SOLARINS_setup",*) 'Latitude [deg] : ', atmos_solarins_lat
737  endif
738 
739  log_info("ATMOS_SOLARINS_setup",*) 'Date is fixed? : ', atmos_solarins_fixeddate
740  if ( atmos_solarins_fixeddate ) then
741  log_info("ATMOS_SOLARINS_setup",*) 'Date : ', atmos_solarins_date
742  endif
743 
744  log_newline
745  log_info("ATMOS_SOLARINS_setup",*) 'Orbit info for next 1 solar year'
746  if (io_l) write(io_fid_log, '(A)') 'DATE SOLAR_CONST, Scaled dist from star, Longitude'
747  do d = time_nowday, time_nowday + int(solyearsec/caldaysec)
750  re_factor, & ![OUT]
751  sindec, & ![OUT]
752  cosdec, & ![OUT]
753  hourangle, & ![OUT]
754  date, & ![IN]
755  time_offset_year, & ![IN]
756  lambda_out = lambda & ![optional OUT]
757  )
758  call calendar_date2char(datechar, date, subsec)
759  if (lambda < 0.0_rp) then
760  lambda = lambda/const_d2r + 360.0_rp
761  else
762  lambda = lambda/const_d2r
763  endif
764  if (io_l) then
765  write(io_fid_log,'(2A,F11.4,F23.6,F11.4)') datechar, " ", re_factor*atmos_solarins_constant, 1.0_dp/sqrt(re_factor), lambda
766  endif
767  enddo
768 
769  return
770  end subroutine atmos_solarins_setup
771 
772  !-----------------------------------------------------------------------------
774  !-----------------------------------------------------------------------------
775  subroutine atmos_solarins_orbit( &
776  iyear )
777  use scale_const, only: &
778  pi => const_pi, &
779  d2r => const_d2r,&
781  implicit none
782 
783  integer, intent(in) :: iyear ! year at setup
784 
785  real(rp) :: dyear ! delta t [year]
786  real(rp) :: esinomg ! e * sin(w) : ecliptic parameter
787  real(rp) :: ecosomg ! e * cos(w) : ecliptic parameter
788  real(rp) :: perih_pi ! pi : longitude of fixed perihelion [rad]
789  real(rp) :: perih_psi ! psi : general precession [degree]
790  real(rp) :: perih_omega ! omega_bar : longitude of perihelion [degree]
791 
792  real(rp) :: temp, beta, ecosomg_mod
793  integer :: i
794  !---------------------------------------------------------------------------
795 
796  if ( .not. atmos_solarins_set_ideal ) then ! real Earth orbit
797  ! time from reference year(1950.0 AD)
798  dyear = real( iyear-year_ref, kind=rp )
799 
800  ! obliquity
801  temp = 0.0_rp
802  do i = 1, nobliq
803  temp = temp + obliq_amp(i)*arcsec2d * cos( obliq_rate(i)*arcsec2r*dyear + obliq_phase(i)*d2r )
804  enddo
805  obliquity = ( obliquity_ref + temp ) * d2r
806 
807  ! eccentricity
808  esinomg = 0.0_rp
809  ecosomg = 0.0_rp
810  do i = 1, neclip
811  esinomg = esinomg + eclip_amp(i) * sin( eclip_rate(i)*arcsec2r*dyear + eclip_phase(i)*d2r )
812  ecosomg = ecosomg + eclip_amp(i) * cos( eclip_rate(i)*arcsec2r*dyear + eclip_phase(i)*d2r )
813  enddo
814  e = sqrt( esinomg*esinomg + ecosomg*ecosomg )
815 
816  ! longitude of fixed perihelion
817  if ( ecosomg == 0.0_rp ) then
818  ecosomg_mod = 1.e-30_rp
819  else
820  ecosomg_mod = ecosomg
821  endif
822  perih_pi = atan(esinomg/ecosomg_mod) + pi * ( 0.5_rp - sign(0.5_rp, ecosomg) )
823 
824  ! if( abs(EcosOMG) < 1.E-8_RP ) then
825  ! if ( EsinOMG == 0.0_RP ) then
826  ! Perih_pi = 0.0_RP
827  ! elseif( EsinOMG < 0.0_RP ) then
828  ! Perih_pi = 1.5_RP * PI
829  ! elseif( EsinOMG > 0.0_RP ) then
830  ! Perih_pi = 0.5_RP * PI
831  ! endif
832 
833  ! elseif( EcosOMG < 0.0_RP ) then
834 
835  ! Perih_pi = atan(EsinOMG/EcosOMG) + PI
836 
837  ! elseif( EcosOMG > 0.0_RP ) then
838 
839  ! if ( EsinOMG < 0.0_RP ) then
840  ! Perih_pi = atan(EsinOMG/EcosOMG) + 2.0_RP * PI
841  ! else
842  ! Perih_pi = atan(EsinOMG/EcosOMG)
843  ! endif
844 
845  ! endif
846  perih_pi = perih_pi / d2r ! [rad]->[degree]
847 
848  ! general precession
849  temp = 0.0_rp
850  do i = 1, nprece
851  temp = temp + prece_amp(i)*arcsec2d * sin( prece_rate(i)*arcsec2r*dyear + prece_phase(i)*d2r )
852  enddo
853  perih_psi = psi_bar * arcsec2d * dyear + zeta + temp
854 
855  ! longitude of perihelion
856  perih_omega = perih_pi + perih_psi
857 
858  do i = 1, 1000
859  if ( perih_omega + 180.0_rp < 0.0_rp ) then
860  perih_omega = perih_omega + 360.0_rp
861  elseif( perih_omega + 180.0_rp >= 360.0_rp ) then
862  perih_omega = perih_omega - 360.0_rp
863  else
864  exit
865  endif
866  enddo
867 
868  ! longitude of perihelion (see berger et al.(1993))
869  omega = ( perih_omega + 180.0_rp ) * d2r
870 
872  atmos_solarins_obliquity = obliquity / d2r
873  atmos_solarins_perihelion_lon = omega / d2r
874 
875  else ! ideal orbit
876 
877  obliquity = atmos_solarins_obliquity * d2r
879  omega = atmos_solarins_perihelion_lon * d2r
880 
881  endif
882 
883  beta = sqrt( 1.0_rp - e*e )
884 
885  ! longitude at the vernal equinox associated with circle orbit
886  lambda_m0 = 2.0_rp * ( ( 1.0_rp/2.0_rp*e + 1.0_rp/8.0_rp*e*e*e ) * ( 1.0_rp + beta ) * sin( omega) &
887  - ( 1.0_rp/4.0_rp*e*e ) * ( 1.0_rp/2.0_rp + beta ) * sin(2.0_rp*omega) &
888  + ( 1.0_rp/8.0_rp*e*e*e ) * ( 1.0_rp/3.0_rp + beta ) * sin(3.0_rp*omega) )
889 
890  return
891  end subroutine atmos_solarins_orbit
892 
893  !-----------------------------------------------------------------------------
896  Re_factor, &
897  sinDEC, &
898  cosDEC, &
899  hourangle, &
900  now_date, &
901  offset_year,&
902  lambda_out &
903  )
904  use scale_const, only: &
905  pi => const_pi
906  use scale_calendar, only: &
909  i_year, i_month, i_day, &
910  i_hour, i_min, i_sec
911  implicit none
912 
913  real(rp), intent(out) :: re_factor ! factor of the distance of Earth from the sun (1/rho2)
914  real(rp), intent(out) :: sindec ! sin/cos(solar declination)
915  real(rp), intent(out) :: cosdec ! sin/cos(solar declination)
916  real(rp), intent(out) :: hourangle ! hour angle: relative longitude of subsolar point (noon=0deg)
917  integer, intent(in) :: now_date(6) ! date(yyyy,mm,dd,hh,mm,ss)
918  integer, intent(in) :: offset_year ! year offset
919  real(dp), intent(out), optional :: lambda_out ! actual longitude from vernal equinox (for output)
920 
921 
922  integer :: date(6)
923  integer :: oyear
924  integer :: absday, absday_ve
925  real(dp) :: abssec, abssec_ve
926  real(dp) :: diffday, diffyr, diffsec
927 
928  real(dp) :: lambda_m ! mean longitude from vernal equinox
929  real(dp) :: lambda ! actual longitude from vernal equinox
930  real(dp) :: nu
931 
932  !---------------------------------------------------------------------------
933 
934  date(:) = now_date(:)
935  oyear = offset_year
936 
937  if ( atmos_solarins_fixeddate ) then
938  if( atmos_solarins_date(1) >= 0 ) oyear = 0
939  if( atmos_solarins_date(1) >= 0 ) date(1) = atmos_solarins_date(1)
940  if( atmos_solarins_date(2) >= 1 ) date(2) = atmos_solarins_date(2)
941  if( atmos_solarins_date(3) >= 1 ) date(3) = atmos_solarins_date(3)
942  if( atmos_solarins_date(4) >= 0 ) date(4) = atmos_solarins_date(4)
943  if( atmos_solarins_date(5) >= 0 ) date(5) = atmos_solarins_date(5)
944  if( atmos_solarins_date(6) >= 0 ) date(6) = atmos_solarins_date(6)
945  endif
946 
947  call calendar_ymd2absday( absday, & ! [OUT]
948  date(i_year), & ! [IN]
949  date(i_month), & ! [IN]
950  date(i_day), & ! [IN]
951  oyear ) ! [IN]
952 
953  call calendar_hms2abssec( abssec, & ! [OUT]
954  date(i_hour), & ! [IN]
955  date(i_min), & ! [IN]
956  date(i_sec), & ! [IN]
957  0.0_dp ) ! [IN]
958 
959  call calendar_ymd2absday( absday_ve, & ! [OUT]
960  ve_date(i_year), & ! [IN]
961  ve_date(i_month), & ! [IN]
962  ve_date(i_day), & ! [IN]
963  oyear ) ! [IN]
964 
965  call calendar_hms2abssec( abssec_ve, & ! [OUT]
966  ve_date(i_hour), & ! [IN]
967  ve_date(i_min), & ! [IN]
968  ve_date(i_sec), & ! [IN]
969  0.0_dp ) ! [IN]
970 
971  if ( year_calender_synced ) then
972  diffday = real(absday-absday_ve,kind=dp) + (abssec-abssec_ve) / caldaysec
973  diffyr = diffday / calyearday - real( nint( diffday / calyearday ),kind=dp)
974  else
975  diffsec = real(absday-absday_ve,kind=dp)*caldaysec + (abssec-abssec_ve)
976  diffyr = diffsec / solyearsec - real( nint( diffsec / solyearsec ),kind=dp)
977  endif
978 
979  lambda_m = lambda_m0 + 2.0_rp * pi * diffyr
980 
981  nu = lambda_m - omega
982 
983  ! 1 / (rho*rho)
984  re_factor = 1.0_dp &
985  + 2.0_dp*e * cos( nu ) &
986  + 0.5_dp*e*e * cos( 2.0_dp*nu ) &
987  + 2.5_dp*e*e &
988  + 4.0_dp*e*e*e * cos( 3.0_dp*nu )
989 
990  ! actual longitude from vernal equinox
991  lambda = lambda_m &
992  + ( 2.0_dp*e - 1.0_dp/ 4.0_dp*e*e*e ) * sin( nu ) &
993  + ( 5.0_dp/ 4.0_dp*e*e ) * sin( 2.0_dp*nu ) &
994  + ( 13.0_dp/12.0_dp*e*e*e ) * sin( 3.0_dp*nu )
995 
996  ! solar declination
997  sindec = sin(lambda) * sin(obliquity)
998  cosdec = sqrt( 1.0_rp - sindec*sindec )
999 
1000  ! hour angle
1001  if ( day_calender_synced ) then
1002  hourangle = pi + 2.0_rp * pi * abssec / caldaysec
1003  else
1004  hourangle = pi + 2.0_rp * pi &
1005  * ( (absday*caldaysec + abssec) / atmos_solarins_diurnal_sec &
1006  - real( nint((absday*caldaysec + abssec)/ soldaysec ),kind=dp) )
1007  endif
1008 
1009  if ( debug ) then
1010  log_info("ATMOS_SOLARINS_ecliptic_longitude",*) lambda_m, nu, lambda, re_factor
1011  endif
1012 
1013  if ( present(lambda_out) ) lambda_out = lambda
1014 
1015  return
1016  end subroutine atmos_solarins_ecliptic_longitude
1017 
1018  !-----------------------------------------------------------------------------
1020  subroutine atmos_solarins_insolation_0d( &
1021  real_lon, real_lat, &
1022  now_date, offset_year, &
1023  solins, cosSZA, &
1024  Re_factor_out )
1025  use scale_const, only: &
1026  eps => const_eps
1027  implicit none
1028  real(RP), intent(in) :: real_lon ! longitude
1029  real(RP), intent(in) :: real_lat ! latitude
1030  integer, intent(in) :: now_date(6) ! date(yyyy,mm,dd,hh,mm,ss)
1031  integer, intent(in) :: offset_year ! year offset
1032 
1033  real(RP), intent(out) :: solins ! solar insolation
1034  real(RP), intent(out) :: cosSZA ! cos(Solar Zenith Angle)
1035  real(RP), intent(out), optional :: Re_factor_out ! factor of the distance of Earth from the sun (1/rho2) [for output]
1036 
1037  real(RP) :: Re_factor ! factor of the distance of Earth from the sun (1/rho2)
1038  real(RP) :: sinDEC, cosDEC ! sin/cos(solar declination)
1039  real(RP) :: hourangle ! hour angle: relative longitude of subsolar point (noon=0deg)
1040 
1041  real(RP) :: lon
1042  real(RP) :: lat
1043  !---------------------------------------------------------------------------
1044 
1045  call atmos_solarins_ecliptic_longitude( re_factor, & ! [OUT]
1046  sindec, & ! [OUT]
1047  cosdec, & ! [OUT]
1048  hourangle, & ! [OUT]
1049  now_date(:), & ! [IN]
1050  offset_year ) ! [IN]
1051 
1052  if ( atmos_solarins_fixedlatlon ) then
1053  lon = atmos_solarins_lon
1054  lat = atmos_solarins_lat
1055  else
1056  lon = real_lon
1057  lat = real_lat
1058  endif
1059 
1060  cossza = sin(lat)*sindec + cos(lat)*cosdec*cos(lon+hourangle)
1061  solins = atmos_solarins_constant * re_factor * ( 0.5_rp + sign(0.5_rp,cossza-eps) )
1062 
1063  if ( present( re_factor_out ) ) then
1064  re_factor_out = re_factor
1065  endif
1066 
1067  return
1068  end subroutine atmos_solarins_insolation_0d
1069 
1070  !-----------------------------------------------------------------------------
1072  subroutine atmos_solarins_insolation_2d( &
1073  IA, IS, IE, JA, JS, JE, &
1074  real_lon, real_lat, &
1075  now_date, offset_year, &
1076  solins, cosSZA )
1077  use scale_const, only: &
1078  eps => const_eps
1079  implicit none
1080  integer, intent(in) :: IA, IS, IE
1081  integer, intent(in) :: JA, JS, JE
1082 
1083  real(RP), intent(in) :: real_lon(IA,JA) ! longitude [rad]
1084  real(RP), intent(in) :: real_lat(IA,JA) ! latitude [rad]
1085  integer, intent(in) :: now_date(6) ! date(yyyy,mm,dd,hh,mm,ss)
1086  integer, intent(in) :: offset_year ! year offset
1087 
1088  real(RP), intent(out) :: solins (IA,JA) ! solar insolation
1089  real(RP), intent(out) :: cosSZA (IA,JA) ! cos(Solar Zenith Angle)
1090 
1091  real(RP) :: Re_factor ! factor of the distance of Earth from the sun (1/rho2)
1092  real(RP) :: sinDEC, cosDEC ! sin/cos(solar declination)
1093  real(RP) :: hourangle ! hour angle: relative longitude of subsolar point (noon=0deg)
1094 
1095  real(RP) :: lon(IA,JA)
1096  real(RP) :: lat(IA,JA)
1097 
1098  integer :: i, j
1099  !---------------------------------------------------------------------------
1100 
1101  call atmos_solarins_ecliptic_longitude( re_factor, & ! [OUT]
1102  sindec, & ! [OUT]
1103  cosdec, & ! [OUT]
1104  hourangle, & ! [OUT]
1105  now_date(:), & ! [IN]
1106  offset_year ) ! [IN]
1107 
1108  !$acc data create(lon, lat)
1109 
1110  if ( atmos_solarins_fixedlatlon ) then
1111  !$omp parallel do OMP_SCHEDULE_ collapse(2)
1112  !$acc kernels
1113  do j = js, je
1114  do i = is, ie
1115  lon(i,j) = atmos_solarins_lon
1116  lat(i,j) = atmos_solarins_lat
1117  enddo
1118  enddo
1119  !$acc end kernels
1120  else
1121  !$omp parallel do OMP_SCHEDULE_ collapse(2)
1122  !$acc kernels
1123  do j = js, je
1124  do i = is, ie
1125  lon(i,j) = real_lon(i,j)
1126  lat(i,j) = real_lat(i,j)
1127  enddo
1128  enddo
1129  !$acc end kernels
1130  endif
1131 
1132  !$omp parallel do OMP_SCHEDULE_ collapse(2)
1133  !$acc kernels
1134  do j = js, je
1135  do i = is, ie
1136  cossza(i,j) = sin(lat(i,j))*sindec + cos(lat(i,j))*cosdec*cos(lon(i,j)+hourangle)
1137  solins(i,j) = atmos_solarins_constant * re_factor * ( 0.5_rp + sign(0.5_rp,cossza(i,j)-eps) )
1138  enddo
1139  enddo
1140  !$acc end kernels
1141 
1142  !$acc end data
1143 
1144  return
1145  end subroutine atmos_solarins_insolation_2d
1146 
1147 end module scale_atmos_solarins
scale_atmos_solarins::atmos_solarins_orbit
subroutine, public atmos_solarins_orbit(iyear)
setup solar incidence module
Definition: scale_atmos_solarins.F90:777
scale_prc::prc_abort
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:350
scale_calendar::i_min
integer, parameter, public i_min
[index] minute
Definition: scale_calendar.F90:49
scale_calendar::calendar_daysec2date
subroutine, public calendar_daysec2date(ymdhms, subsec, absday, abssec, offset_year)
Convert from gregorian date to absolute day/second.
Definition: scale_calendar.F90:255
scale_precision
module PRECISION
Definition: scale_precision.F90:14
scale_atmos_solarins::atmos_solarins_fixedlatlon
logical, public atmos_solarins_fixedlatlon
Definition: scale_atmos_solarins.F90:56
scale_atmos_solarins::atmos_solarins_setup
subroutine, public atmos_solarins_setup(basepoint_lon, basepoint_lat, iyear)
setup solar incidence module
Definition: scale_atmos_solarins.F90:570
scale_atmos_solarins::atmos_solarins_constant
real(rp), public atmos_solarins_constant
Definition: scale_atmos_solarins.F90:43
scale_atmos_solarins::atmos_solarins_insolation_0d
subroutine atmos_solarins_insolation_0d(real_lon, real_lat, now_date, offset_year, solins, cosSZA, Re_factor_out)
calc factor of Earths solar insolation
Definition: scale_atmos_solarins.F90:1025
scale_atmos_solarins::atmos_solarins_set_ideal
logical, public atmos_solarins_set_ideal
Definition: scale_atmos_solarins.F90:47
scale_const::const_eps
real(rp), public const_eps
small number
Definition: scale_const.F90:35
scale_calendar::calendar_hms2abssec
subroutine, public calendar_hms2abssec(abssec, hour, minute, second, subsec)
Hour, minute, second, subsecond -> absolute second.
Definition: scale_calendar.F90:384
scale_calendar
module CALENDAR
Definition: scale_calendar.F90:13
scale_atmos_solarins
module atmosphere / SOLARINS
Definition: scale_atmos_solarins.F90:14
scale_prc
module PROCESS
Definition: scale_prc.F90:11
scale_time::time_nowsec
real(dp), public time_nowsec
subday part of current time [sec]
Definition: scale_time.F90:70
scale_precision::rp
integer, parameter, public rp
Definition: scale_precision.F90:41
scale_atmos_solarins::atmos_solarins_insolation_2d
subroutine atmos_solarins_insolation_2d(IA, IS, IE, JA, JS, JE, real_lon, real_lat, now_date, offset_year, solins, cosSZA)
calc factor of Earths solar insolation
Definition: scale_atmos_solarins.F90:1077
scale_io
module STDIO
Definition: scale_io.F90:10
scale_atmos_solarins::atmos_solarins_annual_sec
real(rp), public atmos_solarins_annual_sec
Definition: scale_atmos_solarins.F90:54
scale_const
module CONSTANT
Definition: scale_const.F90:11
scale_calendar::calendar_min
real(dp), public calendar_min
minutes of hour
Definition: scale_calendar.F90:54
scale_atmos_solarins::atmos_solarins_perihelion_lon
real(rp), public atmos_solarins_perihelion_lon
Definition: scale_atmos_solarins.F90:50
scale_calendar::calendar_ymd2absday
subroutine, public calendar_ymd2absday(absday, gyear, gmonth, gday, oyear)
Convert from gregorian date to absolute day, DAY 0 is AD1/1/1.
Definition: scale_calendar.F90:287
scale_calendar::i_hour
integer, parameter, public i_hour
[index] hour
Definition: scale_calendar.F90:48
scale_io::io_fid_log
integer, public io_fid_log
Log file ID.
Definition: scale_io.F90:58
scale_calendar::calendar_date2daysec
subroutine, public calendar_date2daysec(absday, abssec, ymdhms, subsec, offset_year)
Convert from gregorian date to absolute day/second.
Definition: scale_calendar.F90:192
scale_prof
module profiler
Definition: scale_prof.F90:11
scale_calendar::calendar_sec
real(dp), public calendar_sec
seconds of minute
Definition: scale_calendar.F90:55
scale_atmos_solarins::atmos_solarins_lat
real(rp), public atmos_solarins_lat
Definition: scale_atmos_solarins.F90:58
scale_atmos_solarins::atmos_solarins_set_ve
logical, public atmos_solarins_set_ve
Definition: scale_atmos_solarins.F90:45
scale_precision::dp
integer, parameter, public dp
Definition: scale_precision.F90:32
scale_time
module TIME
Definition: scale_time.F90:11
scale_const::const_pi
real(rp), parameter, public const_pi
pi
Definition: scale_const.F90:32
scale_calendar::i_month
integer, parameter, public i_month
[index] month
Definition: scale_calendar.F90:46
scale_atmos_solarins::atmos_solarins_lon
real(rp), public atmos_solarins_lon
Definition: scale_atmos_solarins.F90:57
scale_atmos_solarins::atmos_solarins_diurnal_sec
real(rp), public atmos_solarins_diurnal_sec
Definition: scale_atmos_solarins.F90:53
scale_atmos_solarins::atmos_solarins_ecliptic_longitude
subroutine, public atmos_solarins_ecliptic_longitude(Re_factor, sinDEC, cosDEC, hourangle, now_date, offset_year, lambda_out)
calc factor of Earths solar insolation
Definition: scale_atmos_solarins.F90:904
scale_atmos_solarins::atmos_solarins_obliquity
real(rp), public atmos_solarins_obliquity
Definition: scale_atmos_solarins.F90:48
scale_calendar::calendar_hour
real(dp), public calendar_hour
hours of day
Definition: scale_calendar.F90:53
scale_io::io_l
logical, public io_l
output log or not? (this process)
Definition: scale_io.F90:63
scale_atmos_solarins::atmos_solarins_ve_date
integer, dimension(6), public atmos_solarins_ve_date
Definition: scale_atmos_solarins.F90:51
scale_const::const_d2r
real(rp), public const_d2r
degree to radian
Definition: scale_const.F90:33
scale_calendar::i_year
integer, parameter, public i_year
[index] year
Definition: scale_calendar.F90:45
scale_calendar::i_day
integer, parameter, public i_day
[index] day
Definition: scale_calendar.F90:47
scale_atmos_solarins::atmos_solarins_eccentricity
real(rp), public atmos_solarins_eccentricity
Definition: scale_atmos_solarins.F90:49
scale_const::const_undef
real(rp), public const_undef
Definition: scale_const.F90:43
scale_atmos_solarins::atmos_solarins_date
integer, dimension(6), public atmos_solarins_date
Definition: scale_atmos_solarins.F90:61
scale_calendar::calendar_doi
real(dp), public calendar_doi
days of year
Definition: scale_calendar.F90:52
scale_io::io_fid_conf
integer, public io_fid_conf
Config file ID.
Definition: scale_io.F90:57
scale_time::time_offset_year
integer, public time_offset_year
time offset [year]
Definition: scale_time.F90:76
scale_time::time_nowday
integer, public time_nowday
absolute day of current time [day]
Definition: scale_time.F90:69
scale_calendar::calendar_date2char
subroutine, public calendar_date2char(chardate, ymdhms, subsec)
Convert from gregorian date to absolute day/second.
Definition: scale_calendar.F90:665
scale_calendar::i_sec
integer, parameter, public i_sec
[index] second
Definition: scale_calendar.F90:50
scale_atmos_solarins::atmos_solarins_fixeddate
logical, public atmos_solarins_fixeddate
Definition: scale_atmos_solarins.F90:60