Output initialization branch:
driver |=> outpInit (output initialization driver) | |=> defOutVars (with isinit=.true.) (only storage allocation) | | |=> SetOutVar (set up storage for means)
Output branch:
driver |=> outpAll (write output driver) | |=> outTime (time for inst. output?) | |=> outpInst (instantaneous values output) | | |=> writeI (write one variable) | | | | | | | |\ <--- first call branch | | | | \ | | | | |=> ncInit (file initialization) | | | | | |=> nf_create (create netCDF file) | | | | | |=> nf_put_att_xxx (write attributes) | | | | | |=> nf_def_var (define variables) | | | | | | |=> defOutVars (isinit=.false.) (get output variables) | | | | | | | |=> defOutVar (one output variable) | | | | | | | | |=>nf_def_var (define the variable) | | | | | | | | |=>nf_put_att (write variable attributes) | | | | | | | | | |=> writeStype (write non-changing fields) | | | | | |=> nf_inq_varid (get variable netCDF ID) | | | | | |=> nf_put_var_real (write data to file) | | | | / | | | |/ | | | |=> nf_inq_varid (get variable netCDF ID) | | | |=> nf_Close (upon error) (close file on error) | | | |=> nf_put_vara_real (write variable) | | | |=> outTime (time for mean output?) | |=> outpMean (mean value output) | | |=> writeM (write time means of one variable) | | | | | | | |\ <--- first call branch (as for writeI; see above) | | | | \ | | | | |=> ncInit | | | | |=> writeStype | | | | / | | | |/ | | | |=> nf_inq_varid (get variable netCDF ID) | | | |=> geto (get variable mean values) | | | | |=> doMean (compute time mean values) | | | | | | | |=> nf_put_vara_real (write mean values to file) | |=> out_restart (write restart file)