The current state
Class structure
Gliffy Diagram |
---|
| |
---|
size | 600 |
---|
displayName | NamelistClassRelationship2 |
---|
name | NamelistClassRelationship2 |
---|
pagePin | 14 |
---|
|
- Three classes displaying similarly looking (but not the same!) extra namelist panels:
- Grid2DExtraInputPanel
- Used by Grid2D application
- A member of Grid2DNamelistPanel that extends CenterPanel
- ENamelistPanel
- Used by Edge2D application
- A member of EGoNamelistPanel that extends CenterPanelCheck (that extends CenterPanel)
- ExtraNamelistPanel
- Used by Jetto, Sanco, Mishka, Helena, Elite
- A member of OutputExtraNamelistPanel that extends CenterPanelCheck (that extends CenterPanel)
Challenges
- Complex legacy code
- The current implementation violates Model-View-Controller principia:
- No clear separation of data and GUI that makes both 'tightly coupled'
- Some data are kept in table 'model'
- GUI influences the way data are storing
- Arrays specified as a set of entries: (variable name, index, value)
- Quite a lot of time spent on 'reverse engineering' essential to understand dependencies and internal mechanisms working 'under the hood'
- How / from data are being read?
- How / where data are being saved?
- Necessity to kept backward compatibility in terms of produced output files
Development
GUI
Image Added
NewExtraNamelistPanel
class, replacing ExtraNamelistPanel -
designed and developed
- package jet.misc.extranamelist.gui;
Integration of NewExtraNamelistPanel
class:
- Integrated:
- Jetto
- Sanco
- Mishka
- Helena
- Elite
- Not integrated
- Additional dialog to present variable data and metadata and to edit value
Image Added
Data handling
- A Variable class:
- name
- overview
- obsolete
- Specification class
- Data class
- Info class
Open points
Config files
YAML file format
YAML file format to be finally accepted.
Code Block |
---|
|
# any comments can be put here (manually!!!) .... e.g.:
###############################################
### ITRFASTIONS. ###
###############################################
-
name: ITRFASTIONS
overview: Short description of variable
obsolete: false
specification:
name_list: NLIST3
model: ""
tab: ""
data: !<array>
meta_type: array
type: integer
default_value: ""
info:
link: http://documentation.server/link/to/documentation/page
description: ' Weiland model switches' |
Conversions of config files
- Working ('dirty') mechanism for conversion of configs prepared (can be extracted)
- Every time 'old' config file is read, the new one is saved
- Files saved to
"jams/v210321_gateway_v5/java/lib/jet/misc/extranamelist/resources/" + config_name + ".yaml"
- What should be an 'final' destination for them?
Settings
File format
Code Block |
---|
OutputExtraNamelist.selItems.cell[0][0] : EUP
OutputExtraNamelist.selItems.cell[0][1] : 1
OutputExtraNamelist.selItems.cell[0][2] : 2.5
...
OutputExtraNamelist.selItems.columns : 3
OutputExtraNamelist.selItems.rows : 17
OutputExtraNamelist.select : true |
- always 3 columns? Any use cases for more/less columns?
A role of user settings vs group (owner) settings
Code Block |
---|
Read SETTINGS from: /pfs/work/g2fkoech/cmg/jams/v210321_gateway_v5/java/data/group_data/settings/startup.set
Read SETTINGS from: /pfs/work/g2bpalak/cmg/jams/data/settings/startup.set
Read SETTINGS from: /pfs/work/g2fkoech/cmg/jams/v210321_gateway_v5/java/data/group_data/settings/startup.jset
Read SETTINGS from: /pfs/work/g2bpalak/cmg/jams/data/settings/startup.jset |
- Group settings being read
- User settings being added
- overwrites group settings (especially
OutputExtraNamelist.selItems.rows
) - not shown anywhere (??)
- Incorrect management of file - artefacts remain!!!
Namelist
- Can
updateNamelist
method be unified somehow? Lots of IFs....
Tests
Installation
PREPARE ENVIRONMENT
Code Block |
---|
module use /pfs/work/g2fjc/jintrac/default/modules
module load jintrac
mkdir -p $HOME/cmg/jams
cd $HOME/cmg/jams
|
CLONING
Code Block |
---|
git clone git@git.ccfe.ac.uk:jintrac/jams.git jams-test |
BUILDING
Code Block |
---|
cd jams-test
module unload jams
module use $HOME/cmg/jams/jams-test/modules/
module load jams
make clone MODULE=all
make |
SWITCH TO TEST VERSION
Code Block |
---|
|
cd java/lib/jet/misc/
git checkout JETTONamelistGUI
make
|
Launching
Code Block |
---|
|
module use /pfs/work/g2fkoech/jintrac/v210321_gateway_v5/modules
module load jintrac/gateway.gfortran
cd ~/work/cmg/jams
jams-test/java/sh/jams |
Gliffy Diagram |
---|
size | 1200 |
---|
displayName | NamelistClassRelationship2 |
---|
name | NamelistClassRelationship2 |
---|
pagePin | 148 |
---|
|
Image Added
Image Added