@@ -981,38 +981,29 @@ SUBROUTINE W3INIT ( IMOD, IsMulti, FEXT, MDS, MTRACE, ODAT, FLGRD, FLGR2, FLGD,
981
981
VA(:,:) = 0 .
982
982
#ifdef W3_PIO
983
983
if (use_restartnc) then
984
- if (runtype == ' continue' )then
985
- call set_user_timestring(time,user_timestring)
984
+ call set_user_timestring(time,user_timestring)
985
+ if (restart_from_binary) then
986
+ fname = trim (user_restfname)// trim (user_timestring)
987
+ else
988
+ fname = trim (user_restfname)// trim (user_timestring)// ' .nc'
989
+ endif
990
+ inquire (file= trim (fname), exist= exists)
991
+ if (exists) then
986
992
if (restart_from_binary) then
987
- fname = trim (user_restfname)// trim (user_timestring)
988
- else
989
- fname = trim (user_restfname)// trim (user_timestring)// ' .nc'
990
- endif
991
- inquire (file= trim (fname), exist= exists)
992
- if (exists) then
993
- if (restart_from_binary) then
994
- call w3iors(' READ' , nds(6 ), sig(nk), imod, filename= trim (fname))
995
- else
996
- call read_restart(trim (fname), va= va, mapsta= mapsta, mapst2= mapst2)
997
- end if
993
+ call w3iors(' READ' , nds(6 ), sig(nk), imod, filename= trim (fname))
998
994
else
999
- call extcde ( 60 , msg = " required restart file " // trim (fname) // " does not exist " )
995
+ call read_restart( trim (fname), va = va, mapsta = mapsta, mapst2 = mapst2 )
1000
996
end if
1001
997
else
1002
- if (restart_from_binary) then
1003
- call set_user_timestring(time,user_timestring)
1004
- fname = trim (user_restfname)// trim (user_timestring)
1005
- inquire (file= trim (fname), exist= exists)
1006
- if (exists) then
1007
- call w3iors(' READ' , nds(6 ), sig(nk), imod, filename= trim (fname))
1008
- else
1009
- call extcde (60 , msg= " required restart file " // trim (fname) // " does not exist" )
1010
- end if
1011
- else
998
+ if (runtype == ' continue' ) then
999
+ call extcde (60 , msg= " required restart file " // trim (fname) // " does not exist" )
1000
+ elseif (restart_from_binary) then
1001
+ call extcde (60 , msg= " required restart file " // trim (fname) // " does not exist" )
1002
+ else
1012
1003
call read_restart(' none' )
1013
- ! mapst2 is module variable defined in read of mod_def; maptst is from 2.b above
1014
- flcold = .true.
1015
- end if
1004
+ ! mapst2 is module variable defined in read of mod_def; maptst is from 2.b above
1005
+ flcold = .true.
1006
+ endif
1016
1007
end if
1017
1008
else
1018
1009
#endif
0 commit comments