source: trunk/LMDZ.COMMON/libf/evolution/display.F90 @ 4075

Last change on this file since 4075 was 4075, checked in by jbclement, 11 days ago

PEM:
Addition of runs ID for the current cycle in "pem_workflow.sts".
JBC

File size: 25.4 KB
Line 
1MODULE display
2!-----------------------------------------------------------------------
3! NAME
4!     display
5!
6! DESCRIPTION
7!     Contains wrappers to print information.
8!
9! AUTHORS & DATE
10!     JB Clement, 12/2025
11!
12! NOTES
13!
14!-----------------------------------------------------------------------
15
16! DEPENDENCIES
17! ------------
18use, intrinsic :: iso_fortran_env, only: stdout => output_unit
19use, intrinsic :: iso_fortran_env, only: stderr => error_unit
20use, intrinsic :: iso_fortran_env, only: stdin => input_unit
21use numerics,                      only: dp, di, li, k4, minieps
22
23! DECLARATION
24! -----------
25implicit none
26
27! VARIABLES
28! ---------
29character(128) :: dir = ' '      ! Current directory
30character(32)  :: logname = ' '  ! User name
31character(32)  :: hostname = ' ' ! Machine/station name
32
33contains
34!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
35
36!=======================================================================
37SUBROUTINE print_ini()
38!-----------------------------------------------------------------------
39! NAME
40!     print_ini
41!
42! DESCRIPTION
43!     Print the initial display for the PEM.
44!
45! AUTHORS & DATE
46!     JB Clement, 12/2025
47!
48! NOTES
49!
50!-----------------------------------------------------------------------
51
52! DECLARATION
53! -----------
54implicit none
55
56! LOCAL VARIABLES
57! ---------------
58character(8)              :: date
59character(10)             :: time
60character(5)              :: zone
61integer(di), dimension(8) :: values
62
63! CODE
64! ----
65write(stdout,*) '  *    .          .   +     .    *        .  +      .    .       .      '
66write(stdout,*) '           +         _______  ________  ____    ____      *           + '
67write(stdout,*) ' +   .        *     |_   __ \|_   __  ||_   \  /   _|          .       *'
68write(stdout,*) '          .     .     | |__) | | |_ \_|  |   \/   |  *        *      .  '
69write(stdout,*) '       .              |  ___/  |  _| _   | |\  /| |      .        .     '
70write(stdout,*) '.  *          *      _| |_    _| |__/ | _| |_\/_| |_                  * '
71write(stdout,*) '            +       |_____|  |________||_____||_____|   +     .         '
72write(stdout,*) '  .      *          .   *       .   +       *          .        +      .'
73
74! Some user info
75call date_and_time(date,time,zone,values)
76call getcwd(dir)
77call getlog(logname)
78call hostnm(hostname)
79write(stdout,*)
80write(stdout,*) '********* PEM information *********'
81write(stdout,*)                     '+ User     : '//trim(logname)
82write(stdout,*)                     '+ Machine  : '//trim(hostname)
83write(stdout,*)                     '+ Directory: '//trim(dir)
84write(stdout,'(a,i2,a,i2,a,i4)')   ' + Date     : ',values(3),'/',values(2),'/',values(1)
85write(stdout,'(a,i2,a,i2,a,i2,a)') ' + Time     : ',values(5),':',values(6),':',values(7)
86write(stdout,*)
87write(stdout,*) '********* Initialization *********'
88
89END SUBROUTINE print_ini
90!=======================================================================
91
92!=======================================================================
93SUBROUTINE print_end(n_yr_run,dur_secs,r_plnt2earth_yr,pem_ini_date,n_yr_sim)
94!-----------------------------------------------------------------------
95! NAME
96!     print_end
97!
98! DESCRIPTION
99!     Print the ending display for the PEM.
100!
101! AUTHORS & DATE
102!     JB Clement, 01/2026
103!
104! NOTES
105!
106!-----------------------------------------------------------------------
107
108! DEPENDENCIES
109! ------------
110use utility,         only: format_duration, int2str
111use workflow_status, only: i_pem_run
112
113! DECLARATION
114! -----------
115implicit none
116
117! ARGUMENTS
118! ---------
119real(dp), intent(in) :: r_plnt2earth_yr, pem_ini_date, n_yr_sim, n_yr_run, dur_secs
120
121! CODE
122! ----
123write(stdout,*)
124write(stdout,*) '****** PEM final information *******'
125write(*,'(a,f16.4,a)')         ' + The run PEM #'//int2str(i_pem_run)//' achieved ', n_yr_run, ' Planetary years, completed in '//format_duration(dur_secs)//'.'
126write(*,'(a,f16.4,a,f16.4,a)') ' + The workflow has achieved ', n_yr_sim, ' Planetary years =', n_yr_sim*r_plnt2earth_yr, ' Earth years.'
127write(*,'(a,f16.4,a)')         ' + The reached date is now ', (pem_ini_date + n_yr_sim)*r_plnt2earth_yr, ' Earth years.'
128write(*,*)                      '+ PEM: so far, so good!'
129write(stdout,*) '************************************'
130call but_why(n_yr_run)
131
132END SUBROUTINE print_end
133!=======================================================================
134
135!=======================================================================
136SUBROUTINE print_msg(message,frmt)
137!-----------------------------------------------------------------------
138! NAME
139!     print_msg
140!
141! DESCRIPTION
142!     Print a simple message (string).
143!
144! AUTHORS & DATE
145!     JB Clement, 02/2026
146!
147! NOTES
148!
149!-----------------------------------------------------------------------
150
151! DECLARATION
152! -----------
153implicit none
154
155! ARGUMENTS
156! ---------
157character(*), intent(in)           :: message
158character(*), intent(in), optional :: frmt
159
160! CODE
161! ----
162if (present(frmt)) then
163    write(stdout,frmt) message
164else
165    write(stdout,*) message
166end if
167
168END SUBROUTINE print_msg
169!=======================================================================
170
171!=======================================================================
172SUBROUTINE print_err(message,frmt)
173!-----------------------------------------------------------------------
174! NAME
175!     print_err
176!
177! DESCRIPTION
178!     Print a simple message (string).
179!
180! AUTHORS & DATE
181!     JB Clement, 02/2026
182!
183! NOTES
184!
185!-----------------------------------------------------------------------
186
187! DECLARATION
188! -----------
189implicit none
190
191! ARGUMENTS
192! ---------
193character(*), intent(in)           :: message
194character(*), intent(in), optional :: frmt
195
196! CODE
197! ----
198if (present(frmt)) then
199    write(stderr,frmt) message
200else
201    write(stderr,*) message
202end if
203
204END SUBROUTINE print_err
205!=======================================================================
206
207!=======================================================================
208SUBROUTINE but_why(n_yr_run)
209!-----------------------------------------------------------------------
210! NAME
211!     but_why
212!
213! DESCRIPTION
214!     Print a cool surprise.
215!
216! AUTHORS & DATE
217!     JB Clement, 02/2026
218!
219! NOTES
220!     \(^o^)/
221!     A rare egg may be hidden somewhere in this module... True trainers
222!     will know better than to consult an AI to hatch it.
223!-----------------------------------------------------------------------
224
225! DECLARATION
226! -----------
227implicit none
228
229! ARGUMENTS
230! ---------
231real(dp), intent(in) :: n_yr_run
232
233! LOCAL VARIABLES
234! ---------------
235integer(di), dimension(5,50), parameter  :: exeggcute = transpose(reshape([ &
236                                                        87,104,97,116,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, &
237                                                        68,69,65,68,66,69,65,84,45,80,76,65,78,69,84,32,105,115,32,101,118,111,108,118,105,110,103,33,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, &
238                                                        84,97,45,100,97,32,46,46,46,32,84,97,45,100,97,32,46,46,46,32,84,97,45,100,97,32,46,46,46,32,84,97,32,116,97,45,100,97,32,116,97,45,100,97,33,0,0,0,0,0,0, &
239                                                        67,111,110,103,114,97,116,117,108,97,116,105,111,110,115,33,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, &
240                                                        89,111,117,114,32,68,69,65,68,66,69,65,84,45,80,76,65,78,69,84,32,101,118,111,108,118,101,100,32,105,110,116,111,32,70,65,66,85,76,79,85,83,45,80,76,65,78,69,84,33 &
241                                                        ],[50,5]))
242integer(di), dimension(20,42), parameter :: exeggutor = transpose(reshape([ &
243                                                        73,32,119,97,110,110,97,32,98,101,32,116,104,101,32,118,101,114,121,32,98,101,115,116,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, &
244                                                        76,105,107,101,32,110,111,32,109,111,100,101,108,32,101,118,101,114,32,119,97,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, &
245                                                        84,111,32,98,117,105,108,100,32,116,104,101,109,32,114,105,103,104,116,44,32,116,104,97,116,226,128,153,115,32,109,121,32,114,101,97,108,32,116,101,115,116,0,0, &
246                                                        84,111,32,115,105,109,117,108,97,116,101,32,116,104,101,109,32,105,115,32,109,121,32,99,97,117,115,101,0,0,0,0,0,0,0,0,0,0,0,0,0,0, &
247                                                        0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, &
248                                                        73,32,119,105,108,108,32,116,114,97,118,101,108,32,103,114,105,100,115,32,97,110,100,32,108,97,110,100,115,0,0,0,0,0,0,0,0,0,0,0,0,0, &
249                                                        70,114,111,109,32,99,111,114,101,32,116,111,32,115,107,121,32,115,111,32,119,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, &
250                                                        84,101,97,99,104,32,112,108,97,110,101,116,115,32,104,111,119,32,116,111,32,117,110,100,101,114,115,116,97,110,100,0,0,0,0,0,0,0,0,0,0,0, &
251                                                        84,104,101,32,112,104,121,115,105,99,115,32,100,101,101,112,32,105,110,115,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, &
252                                                        0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, &
253                                                        80,76,65,78,69,84,83,33,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, &
254                                                        71,111,116,116,97,32,109,111,100,101,108,32,116,104,101,109,32,97,108,108,33,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, &
255                                                        73,116,226,128,153,115,32,115,99,105,101,110,99,101,32,97,110,100,32,99,111,100,101,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, &
256                                                        73,32,107,110,111,119,32,105,116,226,128,153,115,32,109,121,32,99,97,108,108,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, &
257                                                        0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, &
258                                                        80,76,65,78,69,84,83,33,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, &
259                                                        70,114,111,109,32,100,117,115,116,32,116,111,32,103,108,111,119,105,110,103,32,115,112,104,101,114,101,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0, &
260                                                        87,105,116,104,32,116,105,109,101,32,97,110,100,32,114,101,115,111,108,118,101,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, &
261                                                        73,226,128,153,108,108,32,101,118,111,108,118,101,32,116,104,101,109,32,116,104,114,111,117,103,104,32,121,101,97,114,115,0,0,0,0,0,0,0,0,0,0, &
262                                                        32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,226,128,148,32,74,66,67,0,0,0,0 &
263                                                        ],[42,20]))
264real(dp),                      parameter :: first_gen = 151._dp
265character(256), dimension(59)            :: why_not
266character(256), dimension(11)            :: surprise
267integer(di)                              :: i
268
269! CODE
270! ----
271why_not(37) = '⠀⠀⠀⠀⠈⢧⣭⠡⣤⢿⣿⣟⣷⡀⠀⢧⣻⡇⠘⣿⣟⡇⠀⠀⠀⠀⠀⠀⠀⠙⢿⣿⢿⣿⣿⣷⣤⣈⠙⠿⠿⣿⣿⣿⣥⣯⣤⣾⡿⠚⠁⠀⢻⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀'
272why_not(12) = '⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠹⡀⠀⠀⠀⠀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣻⣽⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀'
273why_not(55) = '⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⠓⠦⣤⣀⠀⠉⠉⠉⠀⠀⠉⠉⠉⠍⠀⠀⣀⣤⠴⠀⠉⠛⠂⢿⣷⣦⣌⣙⠛⠻⠿⠿⠿⠷⠙⠛⢁⣴⣿⣷⡇⠀'
274why_not(4)  = '⠀⠀⠀⠀⢀⡴⠚⡉⠍⢉⣉⣉⡁⠒⢂⠄⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀'
275why_not(29) = '⠀⠀⢀⣠⣶⠶⣶⣶⣶⣶⣤⣄⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀'
276why_not(46) = '⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⡎⢇⢻⣿⣇⠘⠆⠱⢄⠀⠙⢿⣦⣈⠻⣿⣮⣛⣷⣄⠑⠶⣶⣦⣐⣮⣽⣿⣿⣿⣯⣶⣾⠻⡿⢟⡹⠃⠀⢁⠀⠀⠀⣠⣶⠇⡀⠀⠀⠀⠀⠀⠀⠀⠀'
277why_not(8)  = '⠀⠀⠀⠀⠀⠱⡠⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀'
278why_not(21) = '⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠁⠉⠛⠋⠛⢟⡚⠍⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠴⡀⠀⠀⠀⠀'
279why_not(3)  = ' '
280why_not(41) = '⠀⠀⠀⠀⠀⠀⠀⠀⠀⢰⡄⠻⣿⣄⠙⣿⣷⡹⣦⡈⠻⣿⣷⡌⠙⢿⣷⣦⣀⠂⢄⣀⡀⠀⠀⠀⡉⠲⠶⠶⠟⠻⠿⣷⣾⣿⣿⣱⠟⠉⠉⠐⢀⣴⢯⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀'
281why_not(18) = '⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠺⣑⠮⡝⢷⡞⡘⢎⠼⡙⢬⠓⡬⠣⢄⠩⢐⠡⡘⡰⢭⣞⡿⠋⠀⠀⠀⠀⠀⠀⠀⠢⠀⠀⠀⠀⠀⠀⠀⠀'
282why_not(52) = '⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠳⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⠂⠀⠀⠀⠀⠀⠀⠛⢿⣿⣷⡽⡢⠙⢿⣿⣿⣿⣶⣤⣀⠀⠬⢄⣀⣀⣠⠔⢁⣾⣿⠇⣰⡄⢿⢀⡏⡇'
283why_not(9)  = '⠀⠀⠀⠀⠀⠀⠳⡡⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀'
284why_not(33) = '⠀⠸⡏⣾⣿⡄⢻⣿⣿⢱⣿⠁⡔⠋⠉⠉⠐⠀⣩⡴⠋⢹⠁⢸⣿⣜⢿⡌⢻⣦⣿⣷⣄⠙⠦⣽⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢦⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀'
285why_not(1)  = trim(confusion(exeggcute(1,:)))
286why_not(58) = trim(confusion(exeggcute(4,:)))
287why_not(26) = ' '
288why_not(14) = '⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⢄⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣟⢿⣻⣿⡿⣿⣾⢷⣯⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀'
289why_not(47) = '⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⠈⠢⡙⢿⢷⣤⣄⡀⠑⠠⡀⠛⢿⣷⣌⠛⢿⣷⣝⢿⣦⡈⠙⠛⠛⠛⠒⠒⠂⠀⠀⠈⠛⠛⠉⡠⠒⡉⠉⣦⣴⡴⠋⡾⣀⢿⣄⠀⠀⠀⠀⠀⠀⠀'
290why_not(6)  = '⠀⠀⠀⠀⢹⢸⠘⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⠰⠠⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀'
291why_not(40) = '⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣧⡈⢿⣿⣝⢷⣄⠙⢧⡀⣈⠻⣿⣿⣵⠀⠈⠛⠦⡀⠀⠀⠀⠀⠈⠉⠉⠀⠀⠀⣠⢤⣦⣄⣸⣿⡿⣫⣽⣿⣯⠟⠀⣸⣾⡆⠀⠀⠀⠀⠀⠀⠀⠀'
292why_not(24) = '⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠓⠢⢖⡠⠄⢀⠠⠤⠤⠤⠀⢂⠤⢁⡞⠀⠀⠀⠀'
293why_not(35) = '⠀⠀⠘⣇⢻⣿⣇⠸⣿⣿⣿⡀⠇⠀⠀⡼⣿⣿⡇⠀⠀⠀⡀⠀⠻⣟⢿⣿⣿⣤⡀⠘⢿⣿⣿⣿⣿⣤⣄⣀⠀⠀⠀⠠⠄⠀⣀⣠⣿⣿⣿⣇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀'
294why_not(10) = '⠀⠀⠀⠀⠀⠀⠀⠱⡁⡂⠀⠀⠀⠀⠀⠀⠀⢀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀'
295why_not(59) = trim(confusion(exeggcute(5,:)))
296why_not(16) = '⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⣟⣾⡁⡧⣧⢵⣮⣵⣥⣼⣧⣥⢯⡾⣥⣤⡟⣯⢤⡛⢤⢎⣙⡽⣯⣿⠇⠀⠐⠠⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀'
297why_not(44) = '⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣦⡀⠀⠀⠀⠙⢛⣦⡈⠻⣷⣎⡻⣦⡈⠻⣿⣿⣶⣯⣝⣿⣿⣿⣖⣲⣶⣤⣤⣤⣄⣤⣤⣴⣶⣶⣶⠻⣉⣠⡴⠟⠁⡰⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀'
298why_not(2)  = trim(confusion(exeggcute(2,:)))
299why_not(31) = '⠀⣼⣿⣼⣿⠏⢠⣾⣿⣿⣿⣿⣿⣷⣶⣬⣝⡛⢷⣦⣄⠀⠀⠀⠀⣀⣤⢤⣴⣶⡶⠛⣛⢫⣿⣶⣾⣶⣦⣤⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀'
300why_not(49) = '⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣯⠀⠀⢀⠰⣤⠙⣿⣷⣤⣀⠀⠀⠀⠀⠉⢳⣶⣌⠻⢿⣷⣽⡿⣦⣄⠀⠀⠀⣀⣠⣤⣤⣥⡴⣾⠿⠒⠁⣠⣾⠃⢂⢻⣿⣧⡙⣿⣧⠀⠀⠀⠀'
301why_not(19) = '⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⠶⣩⠖⣭⠻⣷⣨⡑⣢⢉⠔⡡⢊⢄⡃⣖⣡⢗⡯⠞⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⡀⠀⠀⠀⠀⠀⠀'
302why_not(27) = trim(confusion(exeggcute(3,:)))
303why_not(53) = '⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠳⣄⡈⠐⠠⣑⠢⢤⣄⣀⠁⠒⠒⠲⠦⠄⠀⠀⠀⠈⠛⢿⣷⣦⣌⠛⢿⣾⣿⣻⣿⣿⣿⣶⣦⡤⠤⠒⣐⣴⣿⡏⣿⡇⢸⣿⡆⠀'
304why_not(7)  = '⠀⠀⠀⠀⠸⡄⡜⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣥⣤⣶⣶⣶⣶⣶⣶⣦⣤⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀'
305why_not(42) = '⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⠱⠀⠈⠻⣷⣌⠻⣿⣮⡻⣦⡈⠻⣿⣦⡈⠻⢿⣿⣿⣶⣍⣙⠷⠾⣿⣿⣷⣶⣶⣾⣿⠿⠿⠋⡩⠽⠛⠒⠁⠀⢀⣨⣴⢏⣻⠀⠀⠀⠀⠀⠀⠀⠀⠀'
306why_not(25) = '⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠓⠒⠳⠬⠭⡥⠴⠞⠋⠀⠀⠀⠀⠀'
307why_not(57) = '⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠙⠛⠛⠛⠉⠉⠁⠀⠀⠀'
308why_not(11) = '⠀⠀⠀⠀⠀⠀⠀⠀⠘⢆⠀⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀'
309why_not(34) = '⠀⠀⢻⡸⣿⣷⠈⣿⣿⣟⣿⠀⠀⠀⠀⠀⣠⣾⣇⠀⠀⠈⠀⠸⣿⣿⣿⣾⡢⠙⠻⣿⣿⣿⣦⣈⠙⠛⠿⢶⣭⣍⠉⠯⠭⠔⠃⠈⣻⣧⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀'
310why_not(20) = '⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⠶⣋⢮⣓⢷⡴⡍⢾⣔⣫⢦⣽⡶⠟⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠒⡀⠀⠀⠀⠀⠀'
311why_not(45) = '⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⢷⠻⣯⢦⠀⠀⠀⠀⠙⢿⣦⡈⠻⣿⣮⡻⣦⣀⠙⠪⠝⠛⠿⢿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢟⣻⣿⣿⣷⠿⢛⠉⠀⠀⠈⠀⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀'
312why_not(5)  = '⠀⠀⠀⠀⣼⢁⠎⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠈⠒⠠⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀'
313why_not(50) = '⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢧⠀⠈⠢⣙⢷⡜⢧⡉⠛⠿⣦⡀⠀⢄⠈⠛⢧⡷⢆⡙⠻⣿⣿⣿⣿⣦⣄⡉⠉⠉⠉⠀⠈⠀⣠⠴⠋⡴⠁⠀⠀⡄⣿⣿⣧⠘⣿⡄⠀⠀⠀'
314why_not(28) = ' '
315why_not(17) = '⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢻⡽⣹⣷⢮⡓⠮⣝⢾⣹⠽⣞⢧⡝⢶⣡⠛⡤⢃⠎⡱⢊⢶⣹⣿⠟⠀⠀⠀⠀⠐⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀'
316why_not(39) = '⠀⠀⠀⠀⠀⠀⠀⠹⣿⡄⣒⠈⣿⣯⡻⣦⡈⢻⣎⠈⠻⣿⣿⣦⣄⠈⠢⣤⡀⠀⠀⠀⠀⠀⢌⡙⠒⠀⠈⠙⠛⠛⠛⠛⠛⠉⣠⣤⣦⣤⣤⣿⠟⠀⢿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀'
317why_not(13) = '⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⢆⠄⠀⢠⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣽⣿⡽⣾⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀'
318why_not(56) = '⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠙⠛⠒⠲⠒⠶⠒⠒⠛⠋⠉⠁⠀⠀⠀⠀⠀⠀⠀⠈⠙⠻⠿⢿⣿⣶⣶⣶⣶⣶⡿⠿⣿⡿⠋⠀⠀'
319why_not(22) = '⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠚⢴⡠⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⢠⢃⠀⠀⠀⠀'
320why_not(32) = '⠀⢹⢻⢻⣿⠀⣿⣿⣿⡿⣭⣶⠾⠟⠺⠿⢿⣿⣷⣦⠝⣫⡴⢺⣿⢿⡇⢻⣿⢿⣧⠀⢿⣮⡿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀'
321why_not(54) = '⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⠦⣄⡀⠉⠓⠢⣭⣿⣷⣶⣾⣿⣟⣛⣓⣀⣀⣀⣠⡌⠙⠻⣿⣦⣤⠙⠛⠿⣶⣭⣿⣛⡿⠿⠿⠿⠟⣫⣾⡿⠁⣼⡿⡇⠀'
322why_not(15) = '⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⣷⡟⢿⣏⡟⡿⣻⢿⡫⡟⣿⣯⡟⣿⢭⣯⡏⣦⡛⣽⢝⡻⣝⣿⣷⣿⣿⡧⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀'
323why_not(36) = '⠀⠀⠀⠘⣇⠻⣿⣄⠻⣿⣿⣷⡈⠀⠞⡁⣿⡜⣿⣶⢦⠀⠐⠀⠀⠙⢮⡛⢿⣿⣿⣷⣦⣌⡙⠻⢿⣿⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⡿⡩⢷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀'
324why_not(48) = '⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣷⡀⠹⡀⠙⠲⣬⣛⢦⡀⠀⠀⠀⠈⠻⣷⣄⠙⠻⣿⣮⡻⣶⣄⡉⠀⠈⠃⠀⠀⠀⠀⠀⠀⠀⠰⠏⢂⣼⠟⠋⠀⣼⢡⣿⣦⠻⣮⣳⡀⠀⠀⠀⠀'
325why_not(23) = '⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠑⠣⣄⡄⡀⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡈⠰⢸⠀⠀⠀⠀'
326why_not(38) = '⠀⠀⠀⠀⠀⠈⢻⣷⡉⣤⠻⣿⣿⣿⣄⠈⣿⡿⡌⢾⣿⣧⡀⠀⠀⡀⠀⠀⠀⠀⠀⠙⠷⣮⣙⠛⠿⣿⣿⣿⣿⣿⣿⣿⠿⠟⣋⡀⠀⠀⠁⣠⣾⣿⣇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀'
327why_not(30) = '⠀⢠⣿⢟⣵⣿⡿⠛⠛⠛⠛⠛⠻⠿⣷⣦⣤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀'
328why_not(43) = '⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣄⠁⠀⠀⠉⢿⣧⡈⠻⣿⣮⡻⣦⡈⠻⣿⣦⣕⡿⢿⣶⣭⣉⡛⠒⠦⠄⠉⠉⠑⠛⠻⠗⠒⠀⢀⣤⠶⢀⣴⡾⣿⠟⣡⠏⣸⠀⠀⠀⠀⠀⠀⠀⠀⠀'
329why_not(51) = '⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣷⡄⠀⠀⠉⠁⠀⠙⣦⠀⠂⡍⠑⠀⠉⠀⠀⠉⢻⠓⣶⡄⠈⠹⣿⣿⣿⣿⣶⣤⠀⠀⠐⠉⠀⢠⡞⠁⠀⠀⠀⡇⢸⣿⡟⣧⢱⢸⣿⡆⠀'
330
331surprise(10) = '⠀⠀⠀⠘⣿⣿⣿⣿⣿⣿⣿⣷⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡆⠀'
332surprise(9)  = '⠀⠀⠀⢿⣶⣿⣿⣿⣿⣿⡻⣿⡿⣿⣿⣿⣿⣶⣶⣾⣿⣿⠀⠀'
333surprise(3)  = '⠀⠘⢿⣿⣿⣿⣿⣦⣀⣀⣀⣄⣀⣀⣠⣀⣤⣶⣿⣿⣿⣿⣿⠇'
334surprise(11) = '⠀⠀⠀⠀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀'
335surprise(5)  = '⠀⠀⠀⠀⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣟⠋⠀⠀⠀'
336surprise(8)  = '⠀⠀⠀⡁⠀⠈⣿⣿⣿⣿⢟⣛⡻⣿⣿⣿⣟⠀⠀⠈⣿⡇⠀⠀'
337surprise(6)  = '⠀⠀⠀⢠⣿⣿⡏⠆⢹⣿⣿⣿⣿⣿⣿⠒⠈⣿⣿⣿⣇⠀⠀⠀'
338surprise(4)  = '⠀⠀⠈⠻⣿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠋⠀'
339surprise(7)  = '⠀⠀⠀⣼⣿⣿⣷⣶⣿⣿⣛⣻⣿⣿⣿⣶⣾⣿⣿⣿⣿⡀⠀⠀'
340surprise(2)  = '⠀⣿⣿⣿⣷⣤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⣶⣾⣿'
341surprise(1)  = '⢰⣶⣤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀'
342
343if (gottacatch_emall_()) then
344    write(stdout,*)
345    if (abs(n_yr_run - first_gen) < minieps) then
346        do i = 1,size(surprise)
347            write(stdout,*) trim(surprise(i))
348        end do
349        write(stdout,*) ' '
350        do i = 1,size(exeggutor,1)
351            write(stdout,*) trim(confusion(exeggutor(i,:)))
352        end do
353    else
354        do i = 1,size(why_not)
355            write(stdout,*) trim(why_not(i))
356        end do
357    end if
358end if
359
360END SUBROUTINE but_why
361!=======================================================================
362
363!=======================================================================
364FUNCTION gottacatch_emall_() RESULT(flag)
365!-----------------------------------------------------------------------
366! NAME
367!     gottacatch_emall_
368!
369! DESCRIPTION
370!     Find the egg.
371!
372! AUTHORS & DATE
373!     JB Clement, 02/2026
374!
375! NOTES
376!     Oh? An egg is about to hatch!
377!-----------------------------------------------------------------------
378
379! DECLARATION
380! -----------
381implicit none
382
383! LOCAL VARIABLES
384! ---------------
385integer(di), dimension(13), parameter :: egg = [80,82,79,70,69,83,83,79,82,95,79,65,75]
386integer(di), dimension(43), parameter :: who = [79,104,63,32,73,116,32,115,101,101,109,115,32,121,111,117,39,114,101,32,110,111,116,32,116,104,101,32,114,105,103,104,116,32,112,101,114,115,111,110,46,46,46]
387character(20)                         :: why_yes
388integer(di)                           :: ierr
389logical(k4)                           :: flag
390
391! CODE
392! ----
393flag = .false.
394call get_environment_variable(trim(confusion(egg)),why_yes,status = ierr)
395if (ierr == 0) then
396    flag = trim(why_yes) == 'yes'
397    if (.not. flag) then
398        write(stdout,*)
399        write(stdout,*) trim(confusion(who))
400    end if
401end if
402
403END FUNCTION gottacatch_emall_
404!=======================================================================
405
406!=======================================================================
407FUNCTION confusion(code) RESULT(msg)
408!-----------------------------------------------------------------------
409! NAME
410!     confusion
411!
412! DESCRIPTION
413!     PEM used confusion!
414!
415! AUTHORS & DATE
416!     JB Clement, 02/2026
417!
418! NOTES
419!     USER is confused! It hurt itself in its confusion!
420!-----------------------------------------------------------------------
421
422! DECLARATION
423! -----------
424implicit none
425
426! ARGUMENTS
427! ---------
428integer(di), dimension(:), intent(in) :: code
429
430! LOCAL VARIABLES
431! ---------------
432integer(di)               :: i
433character(:), allocatable :: msg
434
435! CODE
436! ----
437msg = ''
438do i = 1,size(code)
439    if (code(i) /= 0) msg = msg//achar(code(i))
440end do
441
442END FUNCTION confusion
443!=======================================================================
444
445END MODULE display
Note: See TracBrowser for help on using the repository browser.