Restarting with multi-files

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
k.alexander
Posts: 54
Joined: Tue Jun 28, 2016 2:08 pm
Location: CCRC (UNSW), ARCCSS, ACE CRC

Restarting with multi-files

#1 Unread post by k.alexander »

I am having exactly the same problem as this message: viewtopic.php?f=14&t=3835

but since I am not using COAWST the Utility code is all different, and I can't find the snippet of code that was the culprit in that message. (I am using ROMS 3.6 with a bunch of sea ice and ice shelf modifications).

Has anyone dealt with this error for the non-COAWST code? I'm digging through all the Utility code but not having much luck so far.

k.alexander
Posts: 54
Joined: Tue Jun 28, 2016 2:08 pm
Location: CCRC (UNSW), ARCCSS, ACE CRC

Re: Restarting with multi-files

#2 Unread post by k.alexander »

After some print statements it looks like FRC(ifile)%name is initialised to the first name in the multi-file list, and FRC(ifile)%Fcount is initialised to 1. Can't find the bit of code where they are updated...

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: Restarting with multi-files

#3 Unread post by kate »

I'm betting multifiles didn't work back in the days of 3.6. Even now I sent this patch to Hernan who didn't like it:

Code: Select all

diff --git a/ROMS/Utility/inquire.F b/ROMS/Utility/inquire.F
index 4692499..b573d35 100644
--- a/ROMS/Utility/inquire.F
+++ b/ROMS/Utility/inquire.F
@@ -149,6 +149,7 @@
 !
       foundit=.FALSE.
       QUERY: DO ifile=1,nfiles
+        Fcount=S(ifile)%Fcount
         Fname=S(ifile)%name
 !
 !  Inquire about the dimensions and check for consistency.

Otherwise, Fcount has the value from the first file, which may or may not match the value from the current file.
This story shows why all ROMS users who do non-trivial things really should learn to use source code control. It doesn't have to be git - git is just the current leader. Still, in git one would keep a copy of the trunk code on a branch - call it 'master' or call it 'untouched', whatever. Then put your stuff on another branch. Then you can always update the trunk branch whenever you want to and pull those changes into your branch. Keeping a tarball of the trunk code in your git repo is just wrong on so many levels (you know who you are).

Also, this way if you decide to switch trunk codes, you know what you've changed relative to the old trunk.

k.alexander
Posts: 54
Joined: Tue Jun 28, 2016 2:08 pm
Location: CCRC (UNSW), ARCCSS, ACE CRC

Re: Restarting with multi-files

#4 Unread post by k.alexander »

Thanks Kate, but unfortunately that patch doesn't make any difference. I will keep digging. Multifiles have worked fine for me in 3.6 otherwise, as long as you start with the first file it then switches between them just fine.

I definitely share your sentiment about version control, and I have used Git since I started working with ROMS. Unfortunately the master branch I am working from has never been the official release, but someone else's modifications - first Ben, now the team in Norway. It would take a fair bit of time to change this workflow and unfortunately I have more pressing jobs right now...

k.alexander
Posts: 54
Joined: Tue Jun 28, 2016 2:08 pm
Location: CCRC (UNSW), ARCCSS, ACE CRC

Re: Restarting with multi-files

#5 Unread post by k.alexander »

Ok I have found the routine check_multifile in ROMS 3.7. Looks like it wasn't in 3.6 at all. Working on getting it to fit now...

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: Restarting with multi-files

#6 Unread post by kate »

The git rant wasn't aimed at you, but if all the repos kept more or less the same structure, it's easier to use the power of git. COAWST and my github code share a lot of the structure of Hernan's trunk just because things are cleaner that way. I can make them each a remote of my main working code and cleanly compare things between them all through remote tracking branches.

k.alexander
Posts: 54
Joined: Tue Jun 28, 2016 2:08 pm
Location: CCRC (UNSW), ARCCSS, ACE CRC

Re: Restarting with multi-files

#7 Unread post by k.alexander »

Right now I'm tossing up whether to spend the time and effort fully updating to the newest ROMS trunk, which will be a fair bit of work. Or just fix this multifile issue and stick with 3.6 for simplicity. Given that my system is (hopefully) almost operational, I'm not sure what would be the best investment of time.

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: Restarting with multi-files

#8 Unread post by kate »

I'm in a similar boat, with metroms working using the 3.7 trunk code. I need changes from my branch which might best be gotten via COAWST, but it has other problems at the moment. Then there's a talk on NUOPC tomorrow - Hernan said that should be working for ROMS one of these weeks.

k.alexander
Posts: 54
Joined: Tue Jun 28, 2016 2:08 pm
Location: CCRC (UNSW), ARCCSS, ACE CRC

Re: Restarting with multi-files

#9 Unread post by k.alexander »

Adding check_multifile just isn't working. I've been at it all day and there are stubborn MPI errors. I think there is some deeply buried structural thing this routine depends on which isn't in ROMS 3.6.

I am just about to go to a conference in Melbourne but when I'm back I will update to the latest ROMS trunk. I see the master branch of MetROMS has done this so hopefully it will only take me a day or two to re-merge my ice shelves and miscellaneous updates. And that should fix this restart bug, as well as hopefully this one: viewtopic.php?f=19&t=3059

k.alexander
Posts: 54
Joined: Tue Jun 28, 2016 2:08 pm
Location: CCRC (UNSW), ARCCSS, ACE CRC

Re: Restarting with multi-files

#10 Unread post by k.alexander »

Fixed this by updating to 3.7 :-)

Post Reply