Query about FRCNAME Limitation in .in Files

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
Dan_chan
Posts: 38
Joined: Wed Apr 17, 2019 2:37 am
Location: IAP, UCAS

Query about FRCNAME Limitation in .in Files

#1 Unread post by Dan_chan »

Hi everyone,

I've encountered an issue with the FRCNAME parameter in my roms.in and I'm seeking some guidance. It seems that when the number of FRCNAME entries exceeds 204, for example 210 (though NFFILES == 7, 7*30years=210), I encounter an error. Unfortunately, there is no specific "Error" in output. Instead, I see error messages like "Caught signal 11 (Segmentation fault: Sent by the kernel at address (nil))."

I'm curious if there is a known limitation on the number of FRCNAME entries in the .in files. Additionally, I would appreciate any insights or suggestions on how to resolve this issue and successfully run my simulations with more than 204 FRCNAME entries.

Looking forward to any advice. Thank you in advance! :)

User avatar
arango
Site Admin
Posts: 1361
Joined: Wed Feb 26, 2003 4:41 pm
Location: DMCS, Rutgers University
Contact:

Re: Query about FRCNAME Limitation in .in Files

#2 Unread post by arango »

Nope, there is no limitation. The filename is limited to 256 characters, and the number of files in the sequence files(:) is allocated internally to the number of files that it finds. This is the first time we have heard of a user providing files for 30 years. If I want to do such a long simulation, I will do restarts. Anyway, It seems that there is a problem with the specific syntax for these entries in your roms.in file.

With a bit of curiosity, you would discover that the answers to your question can be found easily in ROMS/Modules/mod_iounits.F. The code is well documented internally for users to explore its complexity:

Code: Select all

      TYPE T_IO
        integer :: IOtype                        ! file IO type
        integer :: Nfiles                        ! number of multi-files
        integer :: Fcount                        ! multi-file counter
        integer :: load                          ! filename load counter
        integer :: Rindex                        ! NetCDF record index
        integer :: ncid                          ! NetCDF file ID
        integer,  pointer :: Nrec(:)             ! NetCDF record size
        integer,  pointer :: Vid(:)              ! NetCDF variables IDs
        integer,  pointer :: Tid(:)              ! NetCDF tracers IDs
        real(dp), pointer :: time_min(:)         ! starting time
        real(dp), pointer :: time_max(:)         ! ending time
        character (len=50 ) :: label             ! structure label
        character (len=256) :: head              ! head filename
        character (len=256) :: base              ! base filename
        character (len=256) :: name              ! current name
        character (len=256), pointer :: files(:) ! multi-file names
#if defined PIO_LIB && defined DISTRIBUTE
        TYPE (File_desc_t) :: pioFile            ! file descriptor
        TYPE (My_VarDesc), pointer :: pioVar(:)  ! variable descriptor
        TYPE (My_VarDesc), pointer :: pioTrc(:)  ! tracer descriptor
#endif
      END TYPE T_IO

Dan_chan
Posts: 38
Joined: Wed Apr 17, 2019 2:37 am
Location: IAP, UCAS

Re: Query about FRCNAME Limitation in .in Files

#3 Unread post by Dan_chan »

Thank you,

I am currently using rst to implement long-time simulation, it works. ROMS/Modules/mod_iounits.F helps me steer clear of potential issues related to character lengths in the future, I would continue to familiarize myself with the ROMS source code. :D

Post Reply