A California-based Navy officer is facing a court-martial trial for allegedly masturbating at his desk and “entering search terms indicative of child pornography" on his work computer, according to charge sheets.

Lt. Cmdr. Robert J. Cleary, a meteorology and oceanography officer stationed with the Navy Surface and Mine Warfighting Development Center’s Point Loma detachment, was arraigned in March and is not due back in court for another hearing until July, Navy officials said.

Prosecutors accuse Cleary of attempting to possess, receive and view child pornography on his work computer from about May 2016 to April 2017.

During that time, Cleary masturbated at his desk on several occasions, “which conduct was unbecoming an officer and gentleman,” his charge sheet allege.

Military prosecutors also charged Cleary with posting “a handwritten note containing child erotica search terms” at his cubicle desk in July 2017, a list that allegedly included the terms “Jail bait in bikinis, nn Tweenies” and “nipples pre teen girls."

Prosecutors also charged him with possessing child pornography after images allegedly were found on a laptop in July 2017.

A California native, Cleary also faces charges for wrongful use of government equipment and for bringing a non-military intranet laptop to his office space.

Cleary’s military attorney declined comment, according to Navy Region Southwest spokesman Kevin Dixon.

Cleary did not return messages seeking comment.

He reported to the development center in 2014 after a stint on board the aircraft carrier Ronald Reagan, according to service records.

Cleary enlisted in 1991 and served on board the fast-attack submarine Indianapolis for about six years. After about five years on inactive reserve status, he was commissioned in 2002.