@@ -966,38 +966,29 @@ SUBROUTINE W3INIT ( IMOD, IsMulti, FEXT, MDS, MTRACE, ODAT, FLGRD, FLGR2, FLGD,
966
966
VA(:,:) = 0 .
967
967
#ifdef W3_PIO
968
968
if (use_restartnc) then
969
- if (runtype == ' continue' )then
970
- call set_user_timestring(time,user_timestring)
969
+ call set_user_timestring(time,user_timestring)
970
+ if (restart_from_binary) then
971
+ fname = trim (user_restfname)// trim (user_timestring)
972
+ else
973
+ fname = trim (user_restfname)// trim (user_timestring)// ' .nc'
974
+ endif
975
+ inquire (file= trim (fname), exist= exists)
976
+ if (exists) then
971
977
if (restart_from_binary) then
972
- fname = trim (user_restfname)// trim (user_timestring)
973
- else
974
- fname = trim (user_restfname)// trim (user_timestring)// ' .nc'
975
- endif
976
- inquire (file= trim (fname), exist= exists)
977
- if (exists) then
978
- if (restart_from_binary) then
979
- call w3iors(' READ' , nds(6 ), sig(nk), imod, filename= trim (fname))
980
- else
981
- call read_restart(trim (fname), va= va, mapsta= mapsta, mapst2= mapst2)
982
- end if
978
+ call w3iors(' READ' , nds(6 ), sig(nk), imod, filename= trim (fname))
983
979
else
984
- call extcde ( 60 , msg = " required restart file " // trim (fname) // " does not exist " )
980
+ call read_restart( trim (fname), va = va, mapsta = mapsta, mapst2 = mapst2 )
985
981
end if
986
982
else
987
- if (restart_from_binary) then
988
- call set_user_timestring(time,user_timestring)
989
- fname = trim (user_restfname)// trim (user_timestring)
990
- inquire (file= trim (fname), exist= exists)
991
- if (exists) then
992
- call w3iors(' READ' , nds(6 ), sig(nk), imod, filename= trim (fname))
993
- else
994
- call extcde (60 , msg= " required restart file " // trim (fname) // " does not exist" )
995
- end if
996
- else
983
+ if (runtype == ' continue' ) then
984
+ call extcde (60 , msg= " required restart file " // trim (fname) // " does not exist" )
985
+ elseif (restart_from_binary) then
986
+ call extcde (60 , msg= " required restart file " // trim (fname) // " does not exist" )
987
+ else
997
988
call read_restart(' none' )
998
- ! mapst2 is module variable defined in read of mod_def; maptst is from 2.b above
999
- flcold = .true.
1000
- end if
989
+ ! mapst2 is module variable defined in read of mod_def; maptst is from 2.b above
990
+ flcold = .true.
991
+ endif
1001
992
end if
1002
993
else
1003
994
#endif
0 commit comments