Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

MPAS Atmospheric In situ Analysis/Visualization


New member
I want to add VisIt or Paraview code to MPAS Atmospheric code for in situ visualization. I need to know the code location where output variables are populated in the code. Can you please point out the code location where it happens?
Firstly, I apologize for not replying long ago!

In a sense, there isn't a single location where output variables are populated; rather, different variables are computed at different points in each model time step, and when we write model output files, the memory that holds these variables is passed directly to the PIO library. The memory that is allocated to each model variable can be referenced through a data structure that we refer to as a "pool" in MPAS, and so I think it would ultimately be simplest to obtain pointers to variables from these pools at the point where we write output streams in the main time step loop. In the mpas_atm_core.F module, there's a call to mpas_stream_mgr_write that is responsible for writing model variables to output streams (files), and you could add code around that same point in the timestep.

In case it helps, there are lecture slides about MPAS software infrastructure that may be helpful in understanding how to access model variables through pools.