Hi Joel,
The general definition is:
DC - AC Ratio = Array DC Nameplate Capacity (kWdc) / Inverter AC Nameplate Capacity (kWac)
To calculate the ratio, assuming you are using the Sandia Inverter model and CEC Module Model with Database Paramters model, you could write Python code based on this pseudocode:
pdc = get( cec_imp_ref ) * get( cec_v_mp_ref)
pac = get( inv_snl_paco )
dc_ac_ratio = pdc / pac
Where get() is whatever function you are using to read the values of SSC input variables. Those values should all be in kW,.
Thanks,
Paul.