Error Restarting ROMS with additional forcing

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
robjenkinsiii
Posts: 34
Joined: Tue Jan 22, 2013 5:28 pm
Location: University of Delaware

Error Restarting ROMS with additional forcing

#1 Unread post by robjenkinsiii »

Good Evening, ROMS users,

I've had some success running cases with different individual forcing files. I've also been able to restart simulations in the past. This restart is the first time I've tried using more than 1 forcing file.

The original run only has a river forcing NetCDF file. The restart includes the river & an additional forcing file for wind stress.
Is it bad form or illegal to add a forcing file when doing a restart?

When I run the restart I get this information about the error:

Code: Select all

NETCDF_OPEN - unable to open existing NetCDF file:
call from:  inquire.F
ROMS/TOMS - Output error ............ exit_flag:   3
ERROR: Abnormal termination: NetCDF OUTPUT.
REASON: Invalid argument
Seems strange that it doesn't list the file it can't open.

For the curious, the nc_dump -h for my forcing files are below:
Wind-

Code: Select all

NetCDF-3 64bit wind_frc10.nc {

  dimensions:
    sms_time = 8640 ;
    eta_rho = 100 ;
    xi_rho = 81 ;
River -

Code: Select all

NetCDF-3 64bit riverdb_frc.nc {

  dimensions:
    xi_rho = 81 ;
    xi_u = 80 ;
    xi_v = 81 ;
    eta_rho = 100 ;
    eta_u = 100 ;
    eta_v = 99 ;
    s_rho = 16 ;
    river = 1 ;
    time = UNLIMITED ; (1 currently)
ocean_rst.nc -

Code: Select all

NetCDF-3 64bit ocean_rst4.nc {

  dimensions:
    xi_rho = 81 ;
    xi_u = 80 ;
    xi_v = 81 ;
    xi_psi = 80 ;
    eta_rho = 100 ;
    eta_u = 100 ;
    eta_v = 99 ;
    eta_psi = 99 ;
    N = 16 ;
    s_rho = 16 ;
    s_w = 17 ;
    tracer = 2 ;
    boundary = 4 ;
    ocean_time = UNLIMITED ; (2 currently)


A few other threads (namely this one: https://myroms.org/forum/viewtopic.php?f=19&t=2735)
Seem to face similar problems but none are quite the same with this call to inquire.F

it's my understanding that this utility function is meant to check the NetCDF files being used in a run but I have no idea what it doesn't like.

Any input is appreciated.
Thanks

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

Re: Error Restarting ROMS with additional forcing

#2 Unread post by kate »

It is not illegal to add a forcing file on restart. You would have to recompile ROMS, though, after changing something in the cppdefs file.

Perhaps your best clue is the "Invalid argument" error. Though if it failed to have a filename, that could be an invalid argument. Did you change your ocean.in to have NFFILES == 2 when you added the new file to FRCNAME?

For me, the best way to figure these things out is to run in a debugger. Your grid size is small enough that you should be able to run in serial mode in a debugger like gdb.

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

Re: Error Restarting ROMS with additional forcing

#3 Unread post by kate »

I got very nearly the same error when falling off the end of my forcing file:

Code: Select all

 NETCDF_OPEN - unable to open existing NetCDF file:
               ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@1^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@°^AG^B^@^@^@^@p^K^@^@h^K^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@A^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@à^AG^B^@^@^@^@^@^@^@^@â^^á@^@^@^@^@¢Lá@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@A^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ ^BG^B^@^@^@^@^@^@^@^@<9e>Lá@^@^@^@^@>zá@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^A^O^@^@^@^@^@^@^@^@^@^@^@^@^@^@`^BG^B^@^@^@^@ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
               call from:  inquire.F
 NetCDF: Invalid argument
 ROMS/TOMS - Output error ............ exit_flag:   3
I had given it:

Code: Select all

     NFFILES == 5                          ! number of forcing files

    FRCNAME == /center/w/kate/MERRA/MERRA_Uwind_3hours_1997.nc |
               /center/w/kate/MERRA/MERRA_Uwind_3hours_1998.nc \
               /center/w/kate/MERRA/MERRA_Qair_3hours_1997.nc |
               /center/w/kate/MERRA/MERRA_Qair_3hours_1998.nc \
               /center/w/kate/MERRA/MERRA_Tair_3hours_1997.nc |
               /center/w/kate/MERRA/MERRA_Tair_3hours_1998.nc \
               /center/w/kate/MERRA/MERRA_Pair_3hours_1997.nc |
               /center/w/kate/MERRA/MERRA_Pair_3hours_1998.nc \
               /center/w/kate/MERRA/MERRA_Vwind_3hours_1997.nc |
               /center/w/kate/MERRA/MERRA_Vwind_3hours_1998.nc
My run had started at the very end of 1997 and tried to go beyond the end of 1998. It knows to go beyond the end of the second files, but doesn't know that there are no third year files.

Anyway, check your ocean.in.

robjenkinsiii
Posts: 34
Joined: Tue Jan 22, 2013 5:28 pm
Location: University of Delaware

Re: Error Restarting ROMS with additional forcing

#4 Unread post by robjenkinsiii »

Update:
I combed through my ocean.in pretty carefully. I wasn't making that simple, silly mistake but I really wish I had.

Code: Select all

     NFFILES == 3                          ! number of unique forcing files
	
     FRCNAME == delbayfrc2006.nc\              ! forcing file 1, grid 1
		          delriv7_frc.nc\		
	 	         delwnd_frc9.nc
I am now getting a new error. By changing NRREC == 0 to NRREC == 1, a hopefully more telling error comes up.

Code: Select all

Fortran runtime error: Attempting to allocate already allocated array 'frc'
Attempting to allocate already allocated array 'frc'
At line 1067 of file read_phypar.f90
I open read_phypar.f90 and see that line 1067 is the near the start of a block that handles forcing files.

Code: Select all

 mFfiles=MAXVAL(nFfiles)
              allocate ( FRC(mFfiles,Ngrids) )  !!(line 1067)
              allocate ( FRCids(mFfiles,Ngrids) )
              allocate ( Ncount(mFfiles,Ngrids) )
              FRCids(1:mFfiles,1:Ngrids)=-1
              Ncount(1:mFfiles,1:Ngrids)=0
            CASE ('FRCNAME')
              label='FRC - forcing fields'
              Npts=load_s2d(Nval, Cval, line, label, ifile, igrid,      &
     &                      Ncount, mFfiles, FRC)
I'm trying it again now, with a print statement to check 'mFfiles' and 'nFfiles' in this script.
Is there any known reason why it would fail?

EDIT: Searching, the forum as well but not finding any references to this problem.

Post Reply