Thanks drzed.
I substituted a good bonnet sensor from another Z4- alas the alarm still sounds within a minute or so, also I had a look at the owners handbook which mentions that if the alarm ecu thinks somthing has been left open a sequence of rapid flashing reports this from the LED under the mirror. I should have checked this before taking apart the bonnet sensor!
I suspect that the car battery may be discharged or on the way out, or possibly the rechargable cells in the alarm module. The car is a March 2004 reg with a build date of oct 2003 and has only covered 21,000 miles so the batteries have taken a bit of a hammering, particularly in the last six months with very short drives every couple of days. It seems odd though that the battery can start the car but drop its voltage quickly enough to trigger the alarm after being parked.
Luckily I've found that if I lock the car with the key the alarm (and LED) aren't activated, so at least the car can be locked even if there is no alarm protection. I don't know what the score is with regard to the immobiliser in this situation though.
With regard to Z4-forum and the tech. log I imagine it will take quite some time to develop a resource as comprehensive as the old Z4um. A lot of us here proberbly know the answers to a lot of the common problems and are au fait with the popular modifications applied to the Z4 through the old Z4um. As new blood finds this superb site the questions will be asked and answered by us and in the fullness of time I'm sure there will be a huge database of info. here.