diff --git a/trc/restart_trcrd.F90 b/trc/restart_trcrd.F90 index aff3fba1..bbe636fe 100644 --- a/trc/restart_trcrd.F90 +++ b/trc/restart_trcrd.F90 @@ -32,12 +32,8 @@ subroutine restart_trcrd(rstfnm_ocn) logical :: error character(len=256) :: rstfnm_ocntrc - ! HAMOCC - character(len=256) :: rstfnm_hamocc #ifdef HAMOCC - logical :: use_hamocc = .true. -#else - logical :: use_hamocc = .false. + character(len=256) :: rstfnm_hamocc #endif ! ! --- ------------------------------------------------------------------ @@ -52,14 +48,14 @@ subroutine restart_trcrd(rstfnm_ocn) call xcstop('(restat_trcrd)') stop '(restart_trcrd)' endif - if (use_HAMOCC) then - call restart_getfile(rstfnm_ocn, 'rbgc', rstfnm_hamocc, error) - if (error) then - write(lp,*) 'restart_trcrd: could not generate rstfnm_hamocc file!' - call xcstop('(restat_trcrd)') - stop '(restart_trcrd)' - endif - end if +#ifdef HAMOCC + call restart_getfile(rstfnm_ocn, 'rbgc', rstfnm_hamocc, error) + if (error) then + write(lp,*) 'restart_trcrd: could not generate rstfnm_hamocc file!' + call xcstop('(restat_trcrd)') + stop '(restart_trcrd)' + endif +#endif else call restart_getfile(rstfnm_ocn, 'resttrc', rstfnm_ocntrc, error) if (error) then @@ -67,21 +63,21 @@ subroutine restart_trcrd(rstfnm_ocn) call xcstop('(restat_trcrd)') stop '(restart_trcrd)' endif - if (use_HAMOCC) then - call restart_getfile(rstfnm_ocn, 'restbgc', rstfnm_hamocc, error) - if (error) then - write(lp,*) 'restart_trcrd: could not generate rstfnm_hamocc file!' - call xcstop('(restat_trcrd)') - stop '(restart_trcrd)' - endif - end if +#ifdef HAMOCC + call restart_getfile(rstfnm_ocn, 'restbgc', rstfnm_hamocc, error) + if (error) then + write(lp,*) 'restart_trcrd: could not generate rstfnm_hamocc file!' + call xcstop('(restat_trcrd)') + stop '(restart_trcrd)' + endif +#endif endif endif call xcbcst(rstfnm_ocntrc) - if (use_HAMOCC) then - call xcbcst(rstfnm_hamocc) - end if +#ifdef HAMOCC + call xcbcst(rstfnm_hamocc) +#endif ! ! --- ------------------------------------------------------------------ @@ -90,9 +86,9 @@ subroutine restart_trcrd(rstfnm_ocn) ! call restart_ocntrcrd(rstfnm_ocntrc) - if (use_HAMOCC) then - call hamocc_init(1,rstfnm_hamocc) - end if +#ifdef HAMOCC + call hamocc_init(1,rstfnm_hamocc) +#endif return end subroutine restart_trcrd