20 likes | 105 Views
Learn how to structure TM5 modules, manage file declarations, organize initialization routines, and adhere to PRISM CF conventions for streamlined programming. Utilize TM5 flow diagram for guidance, consolidate settings in an RC file, and maintain uniform code formatting.
E N D
Things and Thoughts on TM5 looks • Modules only (no subroutines, functions ‘hanging’); File-name = module-name.f90 • Declarations: explicit or by ‘use, only’ (statement use without only prohibited) • Output arrays of modules are declared globally in the module (or the exception is indicated) • Initialisation/reading routines are brought together with the processing routines in one module • Module flow diagram based on module functionality to guide programming • Settings (paths, names, project, namelist) brought together in one rc-file, incl. switches between compilers, platforms, libraries, (MPI, HDF/netCDF, …) • Uniform code formatting (e-macs(?) convention on indents, max line length, etc.) • PRISM CF conventions (naming variables for I/O, physical constants, metadata, …)
TM5 flow diagram (draft) 1 MAIN tracer / mainzoom 2 I/O, RUN CONTROL initexit / user output 3 PROCESSES sources_sinks / chemistry / advection / convection, dry_deposition / wet_deposition / mark 4 INIT PROCESSES photolysis / chem_rates 5 INIT METEO meteo 6 TOOLS toolbox / zoomtools / budget 7 GLOBAL DATA a) MPI comm / global / datetime b) dimension / chemistry-par 8 PARAMETERS const-ec-v / binas / reaction-data 9 LIBRARIES MPI-const / HDF