From 8e676278822292a97b2b69da336444ec7d04c06b Mon Sep 17 00:00:00 2001 From: Jessica Meixner Date: Wed, 5 Feb 2025 09:28:26 -0500 Subject: [PATCH] Add reading of binary restart with PIO for runtype=initial (#1359) --- model/src/w3initmd.F90 | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/model/src/w3initmd.F90 b/model/src/w3initmd.F90 index 2389539f1..a49637653 100644 --- a/model/src/w3initmd.F90 +++ b/model/src/w3initmd.F90 @@ -985,9 +985,20 @@ SUBROUTINE W3INIT ( IMOD, IsMulti, FEXT, MDS, MTRACE, ODAT, FLGRD, FLGR2, FLGD, call extcde (60, msg="required restart file " // trim(fname) // " does not exist") end if else - call read_restart('none') - ! mapst2 is module variable defined in read of mod_def; maptst is from 2.b above - flcold = .true. + if (restart_from_binary) then + call set_user_timestring(time,user_timestring) + fname = trim(user_restfname)//trim(user_timestring) + inquire(file=trim(fname), exist=exists) + if (exists) then + call w3iors('READ', nds(6), sig(nk), imod, filename=trim(fname)) + else + call extcde (60, msg="required restart file " // trim(fname) // " does not exist") + end if + else + call read_restart('none') + ! mapst2 is module variable defined in read of mod_def; maptst is from 2.b above + flcold = .true. + end if end if else #endif