"There is a flower vase on the desk."
When you want to talk about the object that is above another object, you use 上の, because の is possessive, and it's like saying, "the thing that belongs to the other thing," so, saying, "Could you close that window on the bookshelf?" is like saying, "Could you close the bookshelf's above's window," which I know is really bad English grammar, but that's how I think of the way the の particle is used. 上に is used when you want to talk about putting something above something else, or if you want to talk about something existing on top of something else, such as in the example sentence you gave, which translates to "There is a vase on the desk."
Firstly thanks for your answer and secondly I had the same thought than yours. One day I asked that question to a Japanese and this was his answer:
「本棚の上の、あの窓を閉めてもらえる？」 Would you mind closing that window above the bookshelf for me?
「机の上の本を取ってください。」 Please take a book on the desk.
「机の上に花瓶があります。」 There is a vase on the table.
「わたしの上に空があります。」 There is a sky above me. or There is a sky over me.
Basically, the word 「上」 in Japanese has no distinction between “above”, “on”, and “over”. Judgment by context.
Why is it necessary to include 上 when the English sentence does not say above the desk, but on the desk?
Ok. I'll answer my own question. It's because whenever anyone places something on a desk, they are placing it above the desk.