Skip to content

flowcharts

Ludovic Lepers edited this page Jan 16, 2025 · 1 revision

A round shape means several instruction, a square shape means subroutine/function

Main

flowchart TD
    A([Read command args]) --> AAB[parameters_reset]  
    AAB--> iJSON[read_input_json] 
    iJSON --> rng_init
    rng_init --> initialise_time
    initialise_time --> res_ose[reset_ose_params]
    res_ose --> check[check_ose_params]
    check --> ostart[oserit_start]
    ostart --> |no weathering|B[create_output_file]
    ostart --> |weathering|qtree_files(create and empty json folder)
    qtree_files --> B
    B --> C[create_name_states]
    C --> |oil/HNS|D[create_name_fractions]
    C --> |object| E[save_sim_state]
    D--> E[save_sim_state]
    E --> F{For every timestep}
    F --> |Forward| G[update_time]
    F --> |backtrack| H[update_time_back]
    G --> I(compute time)
    H --> I
    I --> J[new_release]
    J --> K[lagr_drift]
    K --> |No weathering|M[save_sim_state]
    K --> |Weathering| L[weathering]
    L --> M
    M --> F

    M --> deallocate_ose_arrays
    deallocate_ose_arrays --> rng_finalize
    rng_finalize --> print_ose_timer

Loading

Oserit Start

flowchart TD
    time([compute time since epoch]) --> ifor[init_forcings] 
    ifor --> acur[allocate_current_grid]   
    acur --> |wind| awind[allocate_wind_grids]
    awind --> abath[allocate_bathy_grids]
    acur --> |no wind| abath
    abath --> |waves| awave[allocate_wave_grids]
    awave --> compg[compute_grid_size]
    abath --> |no waves| compg
    compg --> |gen cloud|cldgen[cld_generator]
    compg --> |not gen cloud|read_cld[read_cld]
    cldgen --> particle_init
    read_cld --> particle_init
    particle_init --> new_release
    new_release --> out_of_domain
    out_of_domain --> stranding
    stranding --> test_land([stop if all beached])
    test_land --> set_drift_coef

Loading

lagr_drift

flowchart TD
    diffusion_h_part --> |3D, dispersant|chemical_dispersion
    diffusion_h_part --> |3D, no dispersant|vertical_processes
    chemical_dispersion --> vertical_processes
    vertical_processes --> |resuspension| resuspension
    resuspension --> advection_h_part
    vertical_processes-->|no resuspension|advection_h_part
    diffusion_h_part-->|no 3D|advection_h_part
    advection_h_part --> update_part_h_pos
    update_part_h_pos --> out_of_domain
    out_of_domain --> stranding
Loading
Clone this wiki locally