taking mean temp and pressure for the shared variables