For some Pressurized Water Reactors (PWR) operated on automobiles, boats or deep sea vessels, system characteristics is important for understanding their safety during severe accidents. The development of an analysis code and the transient thermal beaviors of a floating nuclear reactor under heaing motion are described in this paper. By modifying the control equations based on the mathematical models of ocean conditions, an ocean condition available system analysis code named RELAP5/GR was developed from RELAP5 MOD3.2 to simulate the transient thermal-hydraulic response of the nuclear reactor systems to the motion conditions in accidents, which is an advanced and independent node programming code. Using the code, the analysis model was established for a small 200MW offshore floating nuclear plants (OFNP). The transient thermal beaviors of the whole system were analyzed in the cases of the station blackout accident under heaving motion conditons. The analysis shows that all the results can be reasonably explained and the code development is successful at this stage.