Bluekenue
Bluekenue
This publication could be one of several versions: author’s original, accepted manuscript or the publisher’s version. /
La version de cette publication peut être l’une des suivantes : la version prépublication de l’auteur, la version
acceptée du manuscrit ou la version de l’éditeur.
NRC Publications Archive Record / Notice des Archives des publications du CNRC :
https://nrc-publications.canada.ca/eng/view/object/?id=885508c7-344d-4f77-b805-0f92809a3878
https://publications-cnrc.canada.ca/fra/voir/objet/?id=885508c7-344d-4f77-b805-0f92809a3878
Access and use of this website and the material on it are subject to the Terms and Conditions set forth at
https://nrc-publications.canada.ca/eng/copyright
READ THESE TERMS AND CONDITIONS CAREFULLY BEFORE USING THIS WEBSITE.
L’accès à ce site Web et l’utilisation de son contenu sont assujettis aux conditions présentées dans le site
https://publications-cnrc.canada.ca/fra/droits
LISEZ CES CONDITIONS ATTENTIVEMENT AVANT D’UTILISER CE SITE WEB.
Vous avez des questions? Nous pouvons vous aider. Pour communiquer directement avec un auteur, consultez la
première page de la revue dans laquelle son article a été publié afin de trouver ses coordonnées. Si vous n’arrivez
pas à les repérer, communiquez avec nous à [email protected].
Blue Kenue enhancements from 2014 to 2019
Alan J. Barton
Ocean, Coastal and River Engineering (NRC-OCRE)
National Research Council Canada (NRC)
Ottawa, Ontario, Canada
[email protected]
assigned, backlogged, accepted, waiting, under review) or A more careful analysis would need to be carried out to
completed (closed – fixed, duplicate, will not fix, etc). improve the accuracy of that year’s 32 bit and 64 bit counts
(top 2 rows values). In any case, the general trend, as would
For example, from the table we can see that 48 tickets are be expected, is that 32 bit versions of Blue Kenue are not being
open in the reactive maintenance work direction. In other downloaded as often as their 64 bit counterparts. What is
words, there are 48 (smallish) things that people have noticed surprising, however, is the fact that the 32 bit versions are not
about Blue Kenue (or its technological relatives) that would be zero; there are still a couple of hundred downloads.
good to fix and/or modify. There are a total of 270 possible
open work items to consider during the decision process of V. TECHNOLOGY OVERVIEW
asking the question “What should be worked on now?” and a
further 124 work items have been completed that do not need Blue Kenue is built on top of a number of libraries; similar
to be considered. In addition, a residual has been computed to Green Kenue, ECDE and others. The technology is mainly
and placed in parenthesis in the table. For the reactive written in the C++ language (some parts are in Fortran and,
maintenance work direction, the residual is 19.5, meaning that exceptionally, pyEnSim allows the underlying technology to
this work direction has about 20 fewer tickets than the average be exposed via the python language). This means that Blue
work direction (there are 4 work directions in the table). In Kenue needs to be fully compiled. Alternative language design
other words, all tickets having the same weight implies that approaches include, among others, interpreted languages, such
this work direction is performing well as compared to the other as python, perl, or scripting languages such as bat, bash,
work directions. Carrying the analysis of the residuals further, bourne, etc., or interpret-compile hybrids, such as javascript.
since we do not (yet) have trend information, we can see that The underlying technology relies on the OpenGL library to
the difference between the open and closed residuals may provide all rendering functionality while application
provide a sense of how each work direction has grown under framework, menus, dialogs etc. are implemented via the
the assumption that a ticket may belong to any of the 4 work Microsoft Foundation Class (MFC) library.
directions with equal probability. A quick calculation may then Creating an installer for Blue Kenue means that over
provide an answer to the aforementioned question; and in our 300,000 lines of code are selectively combined together in a
case, following the logic to its conclusion means that we meaningful way via a number of automatic and manual steps.
should focus on the proactive work direction in order to lower Compilation means that one C++ source code file (*.cpp) is
the work in that area. used to create one object file (*.o) and a set of object files are
The flaw in this type of numerical analysis (automated or combined to make a static (*.lib) or dynamic (*.dll) library.
not), of course, is that all tickets are not equal weight for users Some object files and some of the static libraries are then
of Blue Kenue and some users place more importance on some linked together to make an executable (*.exe). The dlls are
things than other users; depending on which task they are loaded into memory only when they are used at runtime. In
working. Some types of observed faults should certainly be other words, for example, when a menu item in Blue Kenue is
resolved much more quickly compared against others. And
some types of new features should not wait forever to get
implemented. All of this to posit that funding, available
developer time, developer expertise and shared user needs all
jointly play a large role in the future success of Blue Kenue.
So, let’s all do our best to continue Blue Kenue’s success.
One measure of success for Blue Kenue is whether the
installer is continuing to be downloaded. The following table
shows the download counts in the last 5 years and more. From
the table, it seems like 2018 was a very prolific year; however,
there may be some data error due various internal changes [6].
used then the underlying implementing (if from a dll) means of functionality to directly save to a *.pt2 file was added. A
that the dll would be loaded into memory and then invoked. number of related issues were also identified; some of which
The executable for Blue Kenue uses about 8 static and 12 were resolved.
dynamic libraries. The installer (*.msi) is then made by
combining the executable, the appropriate dynamic link Ticket #82 – Add double precision SELAFIN file support.
libraries, the documentation, the changelogs with a description A large effort was undertaken to add the required support. This
of new features, fixed bugs, experimental features, etc., and included, among many other things, modifying display
any required data files, such as base maps, databases, capabilities such as to add a “center of domain offset” and how
configuration files, etc. The resulting installer is also manually the mouse interacts with it.
edited after construction in order to allow installation within C. Examples created 2016 and now complete (5)
NRC’s new, and stricter, security environment. The installer is Ticket #103 – add “cell” drawing style to CRect2DScalar.
then placed onto CHyMS in the Public Download Area for A developer working on another application relying on parts
sharing. of Blue Kenue’s underlying technology submitted a patch file
VI. BLUE KENUE EXAMPLES to add a new small feature. The patch was applied, reviewed,
approved and committed to CHyMS. Subsequent Blue Kenue
Blue Kenue enhancements occur when a project funds releases have included the submitted patch with the new
development effort. One such project is called the EnSim display capability. In other words, a new drawing style has
Developer Stewardship Project and is hosted by CHyMS [3]. been added to Blue Kenue.
This NRC-OCRE internally funded project has almost 400
tickets in total; of which about 100 are related to completed D. Examples created 2017 and now complete (4)
work. The following subsections describe an assortment of the Ticket #106 – invalid y location for time series extraction.
tickets that were created in each of the years succeeding 2014 When extracting a time series at a point from a 2D spatial
until the year 2019 and for which the associated work is now object (Rect 2D Scalar), the resulting metadata for the point’s
(mid 2019) complete. CHyMS was instrumental in helping to y location was incorrect. In addition, the same fix was made
determine these examples through the creation of a wiki page for 3D spatial object (Rect 3D Scalar) time series extraction.
grouping tickets by year.
Ticket #114 – *.ts1 not properly displayed in 1D view. Blue
A. Examples created in 2014 and now complete (9) Kenue version 3.3.4 did not display the Time Series Type I file
Ticket #48 – AVI recording fails on 64 bit. One comment correctly. However, Blue Kenue version 3.9.5-beta displayed
on the ticket notes that the default encoder was Cinepak (that the time series as expected. In the future, the reporter of this
was not functioning properly) but that the other encoders do fault will check the most recent version of Blue Kenue and
behave correctly. The fix was to generalize the existing code only report a fault if it has not been fixed. Of course, this
so that only those encoders that are installed on a user’s assumes that a person is aware of where to find the most recent
machine (and for which Blue Kenue has implementations) will version (Available in the CHyMS Public Download Area [3]).
be presented within Blue Kenue for selection. This should stop E. Examples created 2018 and now complete (58)
situations where someone selects an encoder that they do not
have installed and therefore for which they cannot record The approval of a new NRC-OCRE internal project has
video. In other words, Blue Kenue has 4 implemented allowed almost 10 times as many tickets to be created during
encoders and only a subset of those will be able to be selected 2018. The resolution of which may have also occurred during
from within the Recording tab of the 2D View properties. For 2019 along with other tickets that had been created in previous
example, on one development machine there are 7 unusable years. A few of the 58 tickets created in 2018 include:
(by Blue Kenue) installed codecs and 3 usable (by Blue Ticket #180 – Create AAttributeSet. Pull out the attribute
Kenue) installed codecs. related functionality from the class hierarchy and localize it.
Ticket #65 – Time series tools not respecting missing data. The reason is to provide more consistency in dealing with
In particular, computation of flow duration curves, cumulative multiple attributes; including robustness improvements and in
sums, and integrals were reported to be not respecting the the long term, easing introduction of attribute-related new
missing data value. Also of note, was the computation of functionality along with some performance gains due to
distributions and performance statistics. The fix was to use a localized memory. Historically, this ticket was motivated by
recently generalized CAttributeSet class which was used in observed faults in a different application that, upon inspection
many more places that described in this ticket. In other words, resulting in the EnSim Developer Stewardship project being
a lot of proactive maintenance was also involved in the proposed to and funded by NRC-OCRE. In addition,
resolution. The full and complete resolution touches many historically, Blue Kenue only had one attribute and over time
aspects of the 900 classes and is still a work in progress. multiple attributes were slowly added on an as-needed basis to
the various data related classes. The work involved in this
B. Examples created 2015 and now complete (5) ticket was very detail oriented and involved reviewing
Ticket #78 – Cannot save points as (*.pt2). In other words, hundreds of lines of C++ code located in tens to hundreds of
creating a new XYZ point set using Blue Kenue resulted in classes depending on the specific aspect of the refactoring
creation of a new object in the workspace that could not be involved. As of mid-2019, the new AAttributeSet class has
directly saved as *.pt2. During the investigation, it was stabilized and the use of it by the subclasses in the hierarchy is
determined that there is a work around; however, the addition a work in progress; with, perhaps, 80% to 90% coverage. Of
XXVIth Telemac & Mascaret User Club Toulouse, FR, 16-17 October, 2019
particular note is the use of 2 distinct types of attributes by one in order to reduce future maintenance costs in terms of writing
particular class in the hierarchy that will require a future new code and also for easing understanding existing code by
change to this new class in order to support that functionality. new developers.
For now, the specific customization is localized to the subclass
and has become a TODO note for future consideration. Ticket #209 – pull AEnSimWorkspaceObject out of
CEnSimObject. The work in this ticket will make it easier for
Ticket #218 – pull current attribute information out of developers to understand the coupling between the two
EnSimDrawableObject. With the newly created AAttributeSet aspects; now separated into two distinct classes. In the best
class, it became easier to localize current attribute selection case if the work was done well, a Blue Kenue user would not
information; further aiding developers and lowering future even know that something has changed with respect to how
maintenance costs due to reducing the number of touch points data objects interact with the work space. Further future
required to understand how current attributes are maintained. enhancements in this area are planned.
Ticket #214 – pull *m_TimeAttribute out of CTableObject. Ticket #210 – pull AEnSimContextMenu out of
With the new AAttributeSet class implemented, it was fairly CEnSimObject, CDecoObject, CStationsTableView and
straightforward to remove the no-longer needed code from this CEnSimView. Similar to #209, a Blue Kenue user would not
class. For this work, a search of the 1,545 files revealed 32 be able to notice that this deep internal work had occurred.
possible locations that needed to be reviewed and adjusted From a development point of view, this ticket removed
appropriately. redundant code in order to ease future maintenance and
understanding.
The new colour scale showing both category and value. Ticket #259 – popup does not align numbers. When
clicking on a point, line, cell, etc, the popup did not align the
Ticket #197 – CColourScale should display “oneof" values in a column. This was resolved in multiple places.
category and not value. After improvements to multiple
attributes a number of “ripple-effects” occurred; one of which Ticket #263 – attribute properties should also display
was the incorrect display of a “oneof” value instead of its attribute type in properties dialogs. 13 dialogs were modified
associated category. in order to display each attribute’s type (e.g. double) and to
display both the category value and index (e.g. ABC=123).
Ticket #236 – CColourScale dialog should display See also #236.
ABC=123 for “oneof" attributes. After improvements to
multiple attributes it also became much easier to add the new Ticket #275 – duplicated metadata is quietly overwritten.
feature of displaying both the category and the associated Metadata handling improvements are slowly starting to be
value; making Blue Kenue slightly easier to use operationally. made now that multiple attribute improvements have
stabilized. In this case, when the same metadata is used more
Ticket #249 – default colour scale does not work for than once in a data file then a warning is displayed and the
ATR_INTEGER. For example, if an integer attribute had ability to select which value to use is presented.
values 1 to 6 then 10 intervals could not be created; causing a
fault. This ticket resolved that issue.
Ticket #186 – Modernize code that starts a thread. This
work is related to making the source code easier for developers
to use and enhance with new features. Historically, the set of
lines of code to start a thread were all copy and pasted
including the associated switch statement on all possible
return states. Now a new function at the root of the class
hierarchy has been added in order to localize the functionality
XXVIth Telemac & Mascaret User Club Toulouse, FR, 16-17 October, 2019
XYZ file has been loaded into the Workspace and inspected
within a 2D View. Note that Blue Kenue has many types of
point set files; here we added functionality specifically for the
XYZ Point Set object containing 1 frame of data. General
Point Sets or Parcel Sets possibly containing multiple data
frames may be considered in the future. Also note that Blue
Kenue has its own native XYZ Point Set file format that differs
from other XYZ formats due to the addition of a more detailed
header section before the data section of the file.
A. Additional Reductions for Map File(s)… D. Tool(s) to Ease Preparation of Environmental Inputs
More reduction methods are certainly possible, either as An ongoing new addition to TELEMAC2D is a river ice
additions to the current set of reductions for the 2 previously module named KHIONE. This module is to simulate main
mentioned objects, or as reductions on new objects depending river ice processes including frazil ice formation and transport,
on the needs of the Blue Kenue users. For example, merging border and dynamic ice and ice jam and its impact on river
multiple *.slf files (containing a single frame or multiple surface elevation and potential flooding. Main inputs to
frames) may be of interest for some users. This may include KHIONE in addition to usual inputs to open water version of
preserving part of a model mesh and modifying another part TELEMAC2D are air and sky conditions as well as initial
and then merging them back together; or merging channel river temperature and frazil concentration. Blue Kenue can
meshes with regular meshes, among other things. This would currently visualize outputs of the existing version of KHIONE.
be a more direct methodology than the existing approach. It is, however, worth exploring how and if Blue Kenue can be
further developed to facilitate pre- and post-processing for
B. Blue Kenue Reference Manual Migration and Update TELEMAC2D river ice simulations.
The current manual [1] was last modified about 8 years ago For example, one possibility could be the development of
and used software call FrameMaker [4] for its production. The tools to ease the preparation of format compatible
last portion of 2019 will be used to migrate the existing environmental inputs. This includes automatic conversion of
information in this system to a new documentation preparation main data formats of climate models providing data such as
XXVIth Telemac & Mascaret User Club Toulouse, FR, 16-17 October, 2019