You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 29 Next »

1.  The current state

1.1.  Class structure


NamelistClassRelationship2

  • 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)

2.  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 

3.  Development

3.1.  GUI


  • NewExtraNamelistPanel class, replacing ExtraNamelistPanel - designed and developed

  • Integration of NewExtraNamelistPanel  class:

    • Integrated: 
      • Jetto
      • Sanco
      • Mishka
      • Helena
      • Elite
    • Not integrated 
      • Grid2D
      • Edge2D
  • Additional dialog to present variable data and metadata and to edit value


3.2. Data handling


4.  Open points

4.1. Config files

4.1.1.  YAML file format

YAML file format to be finally accepted.

 # 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'

4.1.2.  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?

4.2. Settings

4.2.1.  File format


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?

4.2.2. A role of user settings vs group (owner) settings

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!!!

4.3. Namelist


  • Can updateNamelist  method be unified somehow? Lots of IFs....

5.  Tests

5.1. Installation


PREPARE ENVIRONMENT

module use /pfs/work/g2fjc/jintrac/default/modules
module load jintrac

mkdir -p $HOME/cmg/jams
cd $HOME/cmg/jams


CLONING

git clone git@git.ccfe.ac.uk:jintrac/jams.git jams-test


BUILDING

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

cd java/lib/jet/misc/
git checkout JETTONamelistGUI
make


5.2. Launching


module use /pfs/work/g2fkoech/jintrac/v210321_gateway_v5/modules
module load jintrac/gateway.gfortran

cd ~/work/cmg/jams

jams-test/java/sh/jams







NamelistClassRelationship2







  • No labels