The Middle Courtyard[1] (also known as the Transfiguration Courtyard) is one of the cloisters in the inner part of Hogwarts Castle. This courtyard has grass in the open area, in which a big tree has grown over the centuries. There is one massive iron Armillary Sphere that stands in the centre of the courtyard.
In the first two movies, the scenes in this courtyard were filmed in the cloister of Durham Cathedral. However, in the fourth film, the location used was the New College (Oxford) and a big tree is shown in a corner. In the the video game adaptation of Harry Potter and the Prisoner of Azkaban, the courtyard is similar with the Courtyard from the first film, but with a large pond instead a fountain. The Oxford courtyard is also seen in the video game adaptation of Harry Potter and the Order of the Phoenix but with smaller tree and slightly different cloister windows. The courtyard shown in the sixth movie (and video game) was built in Leavesden studios, most likely to accomodate the addition of the Astronomy Tower. The set has now been renovated into the newly enlarged Entrance Courtyard for Deathly Hallows.
The courtyard from first two films is, interestingly, similar to the courtyard from the sixth movie and video game. Except the Astronomy tower.
In the film adaptation of Harry Potter and the Goblet of Fire, during the First Task of the Triwizard Tournament Harry appears to fly over the cloister of Durham Cathedral even though scenes of the First Task were filmed in the Oxford Courtyard. However, in the Hogwarts Castle replica of that film, a new courtyard is shown (see image on the left), closer to the Quad seen in the second film.
In 1998 The Ravenclaw corridor was located in the top-most floor of the building that surround the courtyard, because meanwhile Helena Ravenclaw was talking in the air, the grass is seen.
It is interesting to notice that the structure of the cloister with the towers surrounding it (except Astronomy Tower is similar to the the one from the cloister and towers from Durham Cathredal.