Is my subpanel wiring safe and correct?
If the barn has its own main service

If the power company is supplying an electric meter that powers only this structure, then you're sympatico.  This panel is a main service and this is the normal way to wire that. 

However since this is the home improvement forum, I assume a home is involved. 



If the barn is fed off a main panel in another building

Like the windmill said to the small child: "I'm not a huge fan." 

You're in a no-win situation with your grounding.  

The principles

Grounding serves at least two purposes: To dissipate ESD and lightning strikes back to the earth, and to return hot-ground fault currents back to source with enough current to trip the breaker (50-100 amps).  If the latter doesn't happen, the fault will try to "light up" the grounding system and shock people (0.1 amps kills). 

A grounding rod was never even imagined to return fault currents.  It just can't.  Dirt is an unreliable conductor, which is why they don't use it for wire. Dirt can flow 0.1 amps, but 50 amps is not gonna happen.  It's good for grounding ESD and lightning, and for pegging neutral to earth potential to make a non-isolated system. 

Second, if the neutral wire breaks, you have a classic "open neutral" problem: the 120V loads are not equal, and they pull neutral toward one pole or the other... the effect of this is to make neutral hot.  

Here are your choices, Sophie 

One choice is to tie neutral to ground. This will assure that a hot-ground fault trips your local breaker.  However, an "open neutral" electrifies all your grounds. Every bit of conduit, all the switch plate cover screws, all equipment chassis, even the subpanel door!  The grounding rod will valiantly try to return this current via the dirt, but it can't win.  

The other choice is to wire it as an isolated system and intentionally isolate ground from neutral.  Except it's not an isolated system, is it?  Neutral is pegged to ground back at the main house, and by the power company on the pole.  Yes, now an open neutral will not shock you.  But hot-ground fault will! It will pull the grounding system back up toward 120V without flowing enough current for a breaker trip... so you're getting shocked again!  You can't win.  

The right way

It's perfectly safe and legal to retrofit a ground.  Hit the hardware store and get some copper (can't be aluminum) and run it back to the house and tie it to the main panel there.  It doesn't need to follow the same path, just needs to use a legal wiring method.  

I note that #2 ground wire costs nearly a buck a foot and needs to be buried 12".  So does Rigid conduit, which can be buried only 6" deep.  I also note that the metal shell of rigid conduit is itself a legal grounding path.