PIO conflicts with non-zero NDEFHIS

Bug reports, work arounds and fixes

Moderators: arango, robertson

Post Reply
Message
Author
chuning
Posts: 8
Joined: Thu Jan 21, 2016 6:06 pm
Location: Rutgers University

PIO conflicts with non-zero NDEFHIS

#1 Unread post by chuning »

When I compile with #PIO_LIB and run with a non-zero NDEFHIS value, ROMS reports the following runtime error

Run-Time Check Failure. The variable 'edit_file_struct_$NV' is being used in 'edit_multifile.f90(258,7)' without being defined

Upon a closer look it is the loop in line 424 of file ROMS/Utility/edit_multifile.F

Code: Select all

#if defined PIO_LIB && defined DISTRIBUTE
      S(ng)%pioFile%fh=-1                      ! closed file handler
      DO i=1,NV
        S(ng)%pioVar(i)%vd%varID=-1            ! variables IDs
        S(ng)%pioVar(i)%dkind=-1               ! variables data kind
        S(ng)%pioVar(i)%gtype=0                ! variables C-grid type
      END DO
      DO i=1,MT
        S(ng)%pioTrc(i)%vd%varID=-1            ! tracers IDs
        S(ng)%pioTrc(i)%dkind=-1               ! tracers data kind
        S(ng)%pioTrc(i)%gtype=0                ! tracers C-grid type
      END DO
#endif
The loop upper bound NV is defined in mod_ncparam but not loaded in this Subroutine. I temporarily fixed it by adding

USE mod_ncparam, ONLY : NV.

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

Re: PIO conflicts with non-zero NDEFHIS

#2 Unread post by arango »

Yes, thank you! Weird, my ifort compiler missed that one.

Post Reply