Work in progress!!!
Global physics fields
As you hopefully already know, GEM can run in parallel, using MPI and/or OpenMP. In the physics, when using MPI the model domain gets horizontally divided into tiles, or rather cubes. Each MPI process is taking care of one of these cubes.
The physics are called for one "slab" (ni*nk) at the time.
Physics fields that are used in different routines and also available for output are organized in so called "busses". These busses are veeeeery long 2-D arrays. filled with one field after the other.
If variable is in the rest of the physics
base/phyvar.hf : variable declaration in physics bus
surface/sfcbus_mod.F90 : copy variable from physics bus to surface bus
SFCVAR(name_in_surface_bus, 'name_in_physics_bus')
Explain what a bus is: slab with just land points etc.
in class_main:
declare variable as pointer with the correct dimension (1-D)
all usually 2-D fields are 1-D because we only get one row
all usually 3-D fields are 2-D because we only get one slab