  We present the photospheric energy density of magnetic fields in two solar
active regions inferred from observational vector magnetograms, and compare it
with the possible different defined energy parameters of magnetic fields in the
photosphere. We analyze the magnetic fields in active region NOAA
6580-6619-6659 and 11158. It is noticed that the quantity 1/4pi Bn.Bp is an
important energy parameter that reflects the contribution of magnetic shear on
the difference between the potential magnetic field (Bp) and non-potential one
(Bn), and also the contribution to the free magnetic energy near the magnetic
neutral lines in the active regions. It is found that the photospheric mean
magnetic energy density changes obviously before the powerful solar flares in
the active region NOAA 11158, it is consistent with the change of magnetic
fields in the lower atmosphere with flares.
