OUTPUT - multi-file counter AVG(ng)%load = 3, is greater than Nfiles = 2 dimension 247058 in structure when c

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
backkom
Posts: 35
Joined: Wed Nov 07, 2007 5:03 pm
Location: Ocean University of China

OUTPUT - multi-file counter AVG(ng)%load = 3, is greater than Nfiles = 2 dimension 247058 in structure when c

#1 Unread post by backkom »

Hi all,

I got an abnormal stop of my ROMS application, with error prompt:
247057 OUTPUT - multi-file counter AVG(ng)%load = 3, is greater than Nfiles = 2 dimension
247058 in structure when creating next file: /lustre/home/yaozhigang/Projects/BYS/Out/roms_avg_0003.nc
247059 Incorrect OutFiles logic in 'read_phypar'.
The log file is attached.


My guess is something goes wrong with the variable Nfiles for average file, which should be 3 for my case ( ntimes = 87120, ndefAVG =37200, nAVG=1860 ).

After checking the codes, it seems that variable Nfiles is determined in Utility/read_PhyPar.F.
3727 ! If multiple output files, edit derived type structure to store the
3728 ! information about all multi-files.
3729 !
3730 DO ng=1,Ngrids
3731 IF ((nHIS(ng).gt.0).and.(ndefHIS(ng).gt.0)) THEN
3732 OutFiles=ntimes(ng)/ndefHIS(ng)
3733 IF (nHIS(ng).eq.ndefHIS(ng)) OutFiles=Outfiles+1 ! because IC
3734 CALL edit_file_struct (ng, OutFiles, HIS)
3735 END IF
3736 IF ((nQCK(ng).gt.0).and.(ndefQCK(ng).gt.0)) THEN
3737 OutFiles=ntimes(ng)/ndefQCK(ng)
3738 IF (nQCK(ng).eq.ndefQCK(ng)) OutFiles=Outfiles+1 ! because IC
3739 CALL edit_file_struct (ng, OutFiles, QCK)
3740 END IF
3741 #ifdef ADJOINT
3742 IF ((nADJ(ng).gt.0).and.(ndefADJ(ng).gt.0)) THEN
3743 OutFiles=ntimes(ng)/ndefADJ(ng)
3744 IF (nADJ(ng).eq.ndefADJ(ng)) OutFiles=Outfiles+1 ! because IC
3745 CALL edit_file_struct (ng, OutFiles, ADM)
3746 END IF
3747 #endif
3748 #ifdef AVERAGES
3749 IF ((nAVG(ng).gt.0).and.(ndefAVG(ng).gt.0)) THEN
3750 OutFiles=ntimes(ng)/ndefAVG(ng)
3751 CALL edit_file_struct (ng, OutFiles, AVG)
3752 AVG(ng)%load=0 ! because delayed creation of NetCDF file
3753 END IF ! due to time-aveeraging
3754 #endif

So my question is why operation similar to history file ( IF (nHIS(ng).eq.ndefHIS(ng)) OutFiles=Outfiles+1 ! because IC ) is absent for average case. It seems that OutFiles still need plus one if IF (nAVG(ng).eq.ndefAVG(ng)). Could someone help me about this?

Thanks in advance.

Best,

Zhigang
Attachments
log.run.tar.gz
(3.68 MiB) Downloaded 426 times

zhang
Posts: 27
Joined: Fri Mar 11, 2005 9:17 pm
Location: Woods Hole Oceanographic Institution

Re: OUTPUT - multi-file counter AVG(ng)%load = 3, is greater than Nfiles = 2 dimension 247058 in structure when c

#2 Unread post by zhang »

Hi, I am running into the same problem when I restart a simulation and ask the model to generate multiple average files. The problem occurs when it tries to create a new average file. The error message is:
OUTPUT - multi-file counter AVG(ng)%load = 2, is greater than Nfiles = 1 dimension
in structure when creating next file: out_a2N25_nam_tideunfnorth_K1af2.5_O1af2_M2S2N2p+30_uv3dCla_tsndg_visi1difi1_20210731_1dhis/stjohn_a2N25_avg_0004.nc
Incorrect OutFiles logic in 'read_phypar'.

The suggestion in the original post looks reasonable to me. Could someone please take a look? Thanks.

Gordon Zhang

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

Re: OUTPUT - multi-file counter AVG(ng)%load = 3, is greater than Nfiles = 2 dimension 247058 in structure when c

#3 Unread post by arango »

Thanks Gordon. I looked in the debugger yesterday and I didn't see anything wrong with it. However, you provided essential information that the problem occurs during restart. That piece of information was not provided before. I didn't check that. Let me see if I can reproduce the problem so I can find a solution. The logic is delicate since I need the reallocate the I/O structure with the correct number of multi-files. There are many combinations of parameters during restart. So it depends on how the user sets the restart.

zhang
Posts: 27
Joined: Fri Mar 11, 2005 9:17 pm
Location: Woods Hole Oceanographic Institution

Re: OUTPUT - multi-file counter AVG(ng)%load = 3, is greater than Nfiles = 2 dimension 247058 in structure when c

#4 Unread post by zhang »

Thanks, Hernan.

I am restarting a simulation from a perfect restart file and asking the model to output multiple history and average files. The problem occurs when the model tries to create a new average file during the middle of the simulation. But it has no problem with creating new history files or adding new records to existing average files.

Gordon

LuishBordin
Posts: 2
Joined: Sat Nov 25, 2023 2:34 am
Location: NGI & AOML - NOAA

Re: OUTPUT - multi-file counter AVG(ng)%load = 3, is greater than Nfiles = 2 dimension 247058 in structure when c

#5 Unread post by LuishBordin »

Hey there,

When running more than 1 year in the same job submission, I'm getting a similar error (in my case related to history file instead of average), but only when the fennel model is defined. When running (fennel) only 1 year, or the first and second years separately, I mean, not in the same job as a loop, submitting the first, and then the second year, informing the restart file on the 2nd.in file, I got no error and the history file is recorded normally.

Code: Select all

OUTPUT - multi-file counter HIS(ng)%load = 2, is greater than Nfiles = 1 dimension
          in structure when creating next file: /ROMSx/GoMBio/bgc_test_2/outputs/gomOA_his_0002.nc
          Incorrect OutFiles logic in 'read_phypar'.
 Found Error: 04   Line: 123      Source: ROMS/Nonlinear/output.F
 Found Error: 04   Line: 519      Source: ROMS/Nonlinear/main3d.F
 Found Error: 04   Line: 301      Source: ROMS/Drivers/nl_ocean.h
Please, could you share which solution did you get to solve the issue?
My ROMS version is 3.9.

Thank you very much in advance!
Luis Bordin

Post Reply