ROMS runtime setting problem

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
jc_Sun
Posts: 27
Joined: Fri Aug 19, 2022 12:24 pm
Location: Institute of Oceanology of the Chinese Academy

ROMS runtime setting problem

#1 Unread post by jc_Sun »

Hello, everyone
I'm having 2 problems running roms, hope someone can help me out. The first is whether the time step of the drive field file and the boundary file are inconsistent, which will lead to an error in the calculation result. The second is whether nan in temperature and salinity in the initial field file will cause the operation to crash. Below is my operation log file, the reason for the error is

Code: Select all

TIME-STEP YYYY-MM-DD hh:mm:ss.ss  KINETIC_ENRG   POTEN_ENRG    TOTAL_ENRG    NET_VOLUME
                     C => (i,j,k)       Cu            Cv            Cw         Max Speed

   1051776 2019-08-01 00:00:00.00           NaN           NaN           NaN           NaN
                       (00,00,00)  0.000000E+00  0.000000E+00  0.000000E+00  0.000000E+00
 Found Error: 01   Line: 321      Source: ROMS/Nonlinear/main3d.F
 Found Error: 01   Line: 298      Source: ROMS/Drivers/nl_roms.h, ROMS_run
Thinks!
Attachments
output..txt
(60.39 KiB) Downloaded 232 times

User avatar
wilkin
Posts: 922
Joined: Mon Apr 28, 2003 5:44 pm
Location: Rutgers University
Contact:

Re: ROMS runtime setting problem

#2 Unread post by wilkin »

You can't have NaNa in any input fields, not even in the area masked as land. ROMS computes on all points and then applies the 0/1 land mask afterward. Zero times NaN is NaN, so they won't go away.

Your log reports that both forcing and boundary data were read for initial time 2019-08-01 00:00:00.00, so it looks like it worked.
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

jc_Sun
Posts: 27
Joined: Fri Aug 19, 2022 12:24 pm
Location: Institute of Oceanology of the Chinese Academy

Re: ROMS runtime setting problem

#3 Unread post by jc_Sun »

wilkin wrote: Sun Oct 09, 2022 1:42 pm You can't have NaNa in any input fields, not even in the area masked as land. ROMS computes on all points and then applies the 0/1 land mask afterward. Zero times NaN is NaN, so they won't go away.

Your log reports that both forcing and boundary data were read for initial time 2019-08-01 00:00:00.00, so it looks like it worked.
Hi,Wilkin
Thank you for your reply. Is it possible if I replace nan with 0 in the file? And will roms do the screening operation based on mask? Another question is that my initial time of both drive and boundary field is 2019-08-01 00:00:00.00, but the time step of drive field is 1 hour and boundary field is 24 hours. Is this error related to this?Or is it related to nan?

Code: Select all

 TIME-STEP YYYY-MM-DD hh:mm:ss.ss  KINETIC_ENRG   POTEN_ENRG    TOTAL_ENRG    NET_VOLUME
                     C => (i,j,k)       Cu            Cv            Cw         Max Speed

   1051776 2019-08-01 00:00:00.00           NaN  4.137749E+02           NaN  8.885688E+12
                       (00,00,00)  0.000000E+00  0.000000E+00  0.000000E+00  0.000000E+00
 Found Error: 01   Line: 321      Source: ROMS/Nonlinear/main3d.F
 Found Error: 01   Line: 298      Source: ROMS/Drivers/nl_roms.h, ROMS_run

User avatar
wilkin
Posts: 922
Joined: Mon Apr 28, 2003 5:44 pm
Location: Rutgers University
Contact:

Re: ROMS runtime setting problem

#4 Unread post by wilkin »

Thank you for your reply. Is it possible if I replace nan with 0 in the file? And will roms do the screening operation based on mask?
Yes, zero values (any finite value) in the land should solve your initialization problem. Then the masks will be applied - zero times anything finite is zero.

ROMS reads the times from the boundary and forcing input files and acts accordingly, but you will know for sure when the model runs because ROMS reports which time records it reads from all the inputs as the run proceeds.
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

jc_Sun
Posts: 27
Joined: Fri Aug 19, 2022 12:24 pm
Location: Institute of Oceanology of the Chinese Academy

Re: ROMS runtime setting problem

#5 Unread post by jc_Sun »

wilkin wrote: Mon Oct 10, 2022 2:09 pm
Thank you for your reply. Is it possible if I replace nan with 0 in the file? And will roms do the screening operation based on mask?
Yes, zero values (any finite value) in the land should solve your initialization problem. Then the masks will be applied - zero times anything finite is zero.

ROMS reads the times from the boundary and forcing input files and acts accordingly, but you will know for sure when the model runs because ROMS reports which time records it reads from all the inputs as the run proceeds.
Hi, wilkin
Thank you for your answer. I modified the initial file, and as you said, the time record appeared during the operation, but still the same error was reported. I am not sure why there is a nan, neither the boundary file nor the driver file has a nan, how is this to be solved? I attach the log file of the new operation.

Code: Select all

   1051776 2019-08-01 00:00:00.00           NaN           NaN           NaN           NaN
                       (00,00,00)  0.000000E+00  0.000000E+00  0.000000E+00  0.000000E+00
 Found Error: 01   Line: 321      Source: ROMS/Nonlinear/main3d.F
 Found Error: 01   Line: 298      Source: ROMS/Drivers/nl_roms.h, ROMS_run
Attachments
new_output.txt
(60.38 KiB) Downloaded 231 times

User avatar
wilkin
Posts: 922
Joined: Mon Apr 28, 2003 5:44 pm
Location: Rutgers University
Contact:

Re: ROMS runtime setting problem

#6 Unread post by wilkin »

You haven't #define MASKING
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

jc_Sun
Posts: 27
Joined: Fri Aug 19, 2022 12:24 pm
Location: Institute of Oceanology of the Chinese Academy

Re: ROMS runtime setting problem

#7 Unread post by jc_Sun »

wilkin wrote: Mon Oct 10, 2022 3:15 pm You haven't #define MASKING
Dear, wilkin
Thank you for your reply. I modified the h-file section and compiled it, but I still get the same error. I don't understand why the error section TIME-STEP in the output file is so huge. And I don't have NAN in all input files, but KINETIC_ENRG and TOTAL_ENRG come up with NAN, is this calculated? I have attached the new calculation log and h-file.
Attachments
output11.txt
(62.56 KiB) Downloaded 218 times
upwelling.h
(4.06 KiB) Downloaded 234 times

jc_Sun
Posts: 27
Joined: Fri Aug 19, 2022 12:24 pm
Location: Institute of Oceanology of the Chinese Academy

Re: ROMS runtime setting problem

#8 Unread post by jc_Sun »

Dear Dr Wilkin,
Thank you very much for your help. I have solved this error. Referring to this post, after I modified the boundary file and dt, it works fine. viewtopic.php?t=4455

Post Reply