How cnes/radiativetransfercode-osoaa works
Project type and purpose
• OSOAA is a scientific desktop application combining
• A Fortran core (radiative‐transfer engine)
• A Java Swing GUI (ihm/)
• Shell scripts for batch runs (exe/)
• Data files and configuration (fic/, ihm/conf/)
• Purpose: compute polarized radiative transfer in the coupled ocean‐atmosphere, offering both GUI and CLI.
File structure
• Top-level directories:
• doc/ → user manuals and tutorial PDFs
• gen/ → Makefile templates for building the Fortran engine
• src/ + inc/ → Fortran sources and headers (OSOAA_MAIN.F, OSOAA_*.F, OSOAA.h)
• ihm/ → Java UI project
• fic/ → static data files (optical coefficients, reference tables)
• exe/ → shell scripts to launch demos or batch runs
• log4j.properties → logging configuration for Java
README insights
• Confirms layered architecture (core engine + GUI)
• Emphasizes user‐friendly interface and scripting capabilities
• Indicates heavy reliance on configuration (.properties) and external data sets
Main components
A. User Interface (Java Swing)
– Package: ihm/src/osoaa/usl (forms, common/UI)
– Dependencies: forms-1.3.0.jar, miglayout, log4j
B. Business Logic Layer (Java BLL)
– ihm/src/osoaa/bll: command management, domain enums, preferences factory
C. Data Access Layer (Java DAL)
– ihm/src/osoaa/dal: reads/writes preferences, properties via PropertiesManager
D. Process Invocation Utilities
– Common code: ProcessBuilderUtils in common/process
– Shell scripts in exe/ (run_OSOAA_demo.csh, .ksh)
E. Fortran Computational Engine
– src/*.F files plus inc/OSOAA.h
– Built via Makefile_OSOAA.* in gen/
– Produces a native executable (osoaa.bin or similar)
F. Configuration & Data Files
– ihm/conf/*.properties: models, geometry, output specs
– fic/*.txt: optical coefficients, reference data
G. Build Tools
– Java: Ant script (ihm/gen/build.xml) → produces OSOAAUI.jar
– Fortran: Makefiles
H. Output & Logging
– Radiance results files (location depends on properties)
– Java logging via log4j
Relationships & data flows
1. User → interacts with Java UI (Swing)
2. UI → calls BLL CommandManager → resolves user actions
3. BLL → uses DAL to load/save preferences & .properties
4. BLL → uses ProcessBuilderUtils or shell scripts to launch the Fortran engine
5. Fortran engine reads input parameters + configuration files + data files → performs computation → writes output files
6. Java UI polls or reads output files → displays results (tables, plots)
7. Logging occurs at Java side (log4j) and Fortran side (console or files)
Architectural patterns & design principles
• Layered architecture: UI (usl) → BLL → DAL → Engine
• Factory pattern for preferences (PreferencesFactory)
• Command pattern (ICommandManager / DALCommandManager) for decoupling UI actions from execution
• Separation of concerns: Java handles all orchestration, Fortran focuses on numerics
• Configuration-driven: .properties files control models and output specifics