Compute entropy production
You can compute entropy production with the two functions described here below.
SUB patmo_computeEntropyProductionFlux(dt)
Computes entropy production in a time-step dt.
This subroutine sum the fluxes of all the rates in the given dt, but it doesn't actually compute the entropy production to avoid division by zero.
See patmo_getEntropyProduction function.
Pseudocode here below:
do loop on time with timestep dt
call patmo
time = time + dt
call patmo_computeEntropyProductionFlux(dt)
end do
print "entropy production:", patmo_getEntropyProduction(time)