As said NDSolve needs g to be a number.
so define a function around your code that takes g as input.
Then run the code for various values of g ( using plot with long evaluating functions usually gives problems).
Then return your plots and plot the function as a function of g.
Attachments: