timestep_number needs to be PRIVATE and timestep_ref needs to be SHARED. Consider three timesteps per hour.
DO timestep_ref=1,total_timesteps,3 timestep_number=timestep_ref !$OMP PARALLEL !$OMP SECTION CALL rad_ctl(...) !$OMP END SECTION !$OMP SECTION CALL atm_step_4a(...) !$OMP END SECTION !$OMP END PARALLEL !$OMP PARALLEL !$OMP SECTION timestep_number=timestep_ref+1 call ukca_main_big_dt(...) !$OMP END SECTION !$OMP SECTION DO timestep_number=timestep_ref+1, & timestep_ref+2 CALL atm_step_4a(...) END DO !$OMP END SECTION !$OMP END PARALLEL ! Probably need to write output ! from ukca_main_big_dt to a central ! location CALL write_ukca_output_to_central_loc(...)