Issue Writing Temperature Slices in Estuary Test Case

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
bhayward
Posts: 7
Joined: Thu Aug 31, 2023 3:51 pm
Location: University of Maine

Issue Writing Temperature Slices in Estuary Test Case

#1 Unread post by bhayward »

Hello,

I've recently updated roms, and am having trouble with the estuary_test test case. I'm getting an error when the program tries to write to the history file:

Code: Select all

forrtl: severe (408): fort: (3): Subscript #1 of the array HOUT has value 0 which is less than the lower bound of 1

Image              PC                Routine            Line        Source
romsG              00000000027EB6DF  Unknown               Unknown  Unknown
romsG              00000000014B9806  def_his_mod_mp_de         713  def_his.f90
romsG              0000000001483AEF  def_his_mod_mp_de          58  def_his.f90
romsG              00000000004C779E  output_                   142  output.f90
romsG              0000000000416297  main3d_                   223  main3d.f90
romsG              000000000040D365  roms_kernel_mod_m         205  roms_kernel.f90
romsG              000000000040EED3  MAIN__                    106  master.f90
romsG              000000000040BD92  Unknown               Unknown  Unknown
libc-2.17.so       00007F1074383555  __libc_start_main     Unknown  Unknown
romsG              000000000040BCA9  Unknown               Unknown  Unknown
forrtl: severe (408): fort: (3): Subscript #1 of the array HOUT has value 0 which is less than the lower bound of 1

Image              PC                Routine            Line        Source
romsG              00000000027EB6DF  Unknown               Unknown  Unknown
romsG              00000000014B9806  def_his_mod_mp_de         713  def_his.f90
romsG              0000000001483AEF  def_his_mod_mp_de          58  def_his.f90
romsG              00000000004C779E  output_                   142  output.f90
romsG              0000000000416297  main3d_                   223  main3d.f90
romsG              000000000040D365  roms_kernel_mod_m         205  roms_kernel.f90
romsG              000000000040EED3  MAIN__                    106  master.f90
romsG              000000000040BD92  Unknown               Unknown  Unknown
libc-2.17.so       00007F1FE1008555  __libc_start_main     Unknown  Unknown
romsG              000000000040BCA9  Unknown               Unknown  Unknown
srun: error: node-104: tasks 0-1: Exited with exit code 152
=====================================================

I've gone to line 713 of def_his.f90, which is...

Code: Select all

!
!  Define tracer type variables at specified depth slices.
!
        DO itrc=1,NT(ng)
          IF (Hout(idzslT(itrc),ng).and.(Nslice.gt.0)) THEN     <----------------------------(this line)
 
... and found the variable in the varinfo.yaml ...

Code: Select all

  - variable:       temp_slice                                       # Output
    standard_name:  sea_water_potential_temperature
    long_name:      potential temperature
    units:          Celsius                                          # [Celsius]
    field:          temperature constant depth slices
    time:           ocean_time
    index_code:     idzslT(itemp)
    type:           r3dvar
    add_offset:     0.0d0
    scale:          1.0d0
Notably, I couldn't find this variable in the varinfo.yaml files I used previously. I'm guessing it's the temperature at depth slices rather than sigma layers? If so, is there an option in the input file or build script I need to enable so that the slices are calculated properly, or is there a way I can disable constant depth slices?

I've attached the appropriate build script, input file, and log file if those are needed/useful.

Thank you for your time.

-Ben
Attachments
2219451.log
(30.94 KiB) Downloaded 8 times
estuary_test.h
(1.15 KiB) Downloaded 7 times
roms_estuary_test.in
(170.45 KiB) Downloaded 10 times

robertson
Site Admin
Posts: 231
Joined: Wed Feb 26, 2003 3:12 pm
Location: IMCS, Rutgers University

Re: Issue Writing Temperature Slices in Estuary Test Case

#2 Unread post by robertson »

In your roms_estuary_test.in you have set Hout(idzslT) == T T but left NSLICE = 0. If you want to write out the three slices described in your .in, set NSLICE to 3. If not, set Hout(idzslT) back to "F F".

bhayward
Posts: 7
Joined: Thu Aug 31, 2023 3:51 pm
Location: University of Maine

Re: Issue Writing Temperature Slices in Estuary Test Case

#3 Unread post by bhayward »

Thank you

I think my issue was in the compilation process. It was definitely an error on my part.

When I changed Hout(idzslT) back to F F, I was still getting the same error.

I started from a fresh copy of the test case and got it working (including saving to a netcdf file). The issue I think was related to how I set up the build script with multiple processors.

What determines whether an executable will have the file endings {G|M|O|S} ? I feel like my single-threaded runs end in G, and the multi-threaded runs end in M, but I'm not sure that this is consistent, and I have no idea what O or S might be. The run that wasn't working ended in G, and I think that is an indicator of the issue.

-Ben

robertson
Site Admin
Posts: 231
Joined: Wed Feb 26, 2003 3:12 pm
Location: IMCS, Rutgers University

Re: Issue Writing Temperature Slices in Estuary Test Case

#4 Unread post by robertson »

Your executable will always be G any time you set USE_DEBUG in your build script, regardless of whether you build serial (S), MPI (M), or OpenMP (O). The fact that the run only errors when debugging is enabled is due to the fact that one of the debugging flags instructs the executable to check for out-of-bounds indexes (subscripts). When you create an optimized executable (romsS, romsM or romsO), the executable is not instructed to check indexes and happily continues running. In this case, Hout at an out-of-range index evaluates to FALSE instead of an error and the IF block is simply skipped.

bhayward
Posts: 7
Joined: Thu Aug 31, 2023 3:51 pm
Location: University of Maine

Re: Issue Writing Temperature Slices in Estuary Test Case

#5 Unread post by bhayward »

That makes good sense. Thank you.

-Ben

Post Reply