Re: wrapit77 and nhlf77 compiling problems

From: Eric D. Robinson <edrobins_at_nyahnyahspammersnyahnyah>
Date: Thu Apr 01 2010 - 18:47:19 MDT

Dennis,
  Thanks for the suggestion, but still no success. Here's the error I'm
getting:

----------------------------------------
WRAPIT Version: 091416
COMPILING binvarcount.f
binvarcount.f:2.72:

      subroutine varcount(var,varoccur,varoccur2,varoccur3,varoccur4,var
                                                                        1
Error: Unexpected junk in formal argument list at (1)
binvarcount.f:3.72:

      real var(nx,ny),varoccur(nx,ny),varoccur2(nx,ny),varoccur3(nx,ny),
                                                                        1
Error: Invalid character in name at (1)
------------------------------------------

I changed the script to only use the first few variables (so that I
didn't go past column 72 in the declaration, and WRAPIT worked fine.
I've attached the sample routine. Any other ideas?

Thanks!
-Eric

Dennis Shea wrote:
> Use
>
> %> WRAPIT foo.f
>
> possibly you may have to use
>
> %> WRAPIT -fPIC foo.f
>
> Good luck
>
>
>
> On 04/01/2010 03:05 PM, Eric D Robinson wrote:
>> All,
>> I am trying to use wrapit77 to incorporate a F77 routine into an ncl
>> script I have. When I use wrapit77, everything goes well until I get to
>> the fortran compiling step. When I type nhlf77 -c mycode.f the compile
>> fails. I noticed that if I limited my subroutine declaration between
>> the NCLFORTSTART and NCLEND flags to less than 72 columns, I don't
>> receive the same error. Another error results from declaring variables
>> on the next line, and the compiler once again indicates that is has
>> issues with the 72nd column.
>>
>> I have used this exact same F77 routine with wrapit77 and nhlf77
>> successfully before on a different machine, so I am really at a loss
>> here. Thanks for your help!
>>
>> -Eric
>>
>> *Eric D. Robinson*
>> Graduate Student
>> Earth and Atmospheric Sciences
>> Purdue University
>> 550 Stadium Mall Drive, West Lafayette, IN 47907-2051
>> Severe Weather Research Group - SWRG<http://www.purdue.edu/eas/severe>
>> edrobins@purdue.edu<mailto:edrobins@purdue.edu>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>

C NCLFORTSTART
        subroutine varcount(var,varoccur,varoccur2,varoccur3,varoccur4,varoccur5,thresh,thresh2,thresh3,thresh4,thresh5,nx,ny)
        real var(nx,ny),varoccur(nx,ny),varoccur2(nx,ny),varoccur3(nx,ny),varoccur4(nx,ny),varoccur5(nx,ny)
C NCLEND

        icheck = 0

        do j=6,ny-5
        do i=6,nx-5
           ie = i
           iw = i
           jn = j
           js = j

C look for single occurrence of the threshold within this window
           do jj = js,jn
           do ii = iw,ie
              if(var(ii,jj).ge.thresh5) then
                 varoccur5(i,j) = varoccur5(i,j) + 1.
c write(*,*) 'thresh5 at',i,j
c icheck = icheck +1
                 goto 104
               endif
              if(var(ii,jj).ge.thresh4.and.var(ii,jj).lt.thresh5) then
                 varoccur4(i,j) = varoccur4(i,j) + 1.
c write(*,*) 'thresh4 at',i,j
c icheck = icheck +1
                 goto 104
               endif
              if(var(ii,jj).ge.thresh3.and.var(ii,jj).lt.thresh4) then
                 varoccur3(i,j) = varoccur3(i,j) + 1.
c write(*,*) 'thresh3 at',i,j
c icheck = icheck +1
                 goto 104
               endif
              if(var(ii,jj).ge.thresh2.and.var(ii,jj).lt.thresh3) then
                 varoccur2(i,j) = varoccur2(i,j) + 1.
c write(*,*) 'thresh2 at',i,j
c icheck = icheck +1
                 goto 104
               endif
              if(var(ii,jj).ge.thresh.and.var(ii,jj).lt.thresh2) then
                 varoccur(i,j) = varoccur(i,j) + 1.
c write(*,*) 'thresh at',i,j
c icheck = icheck +1
                 goto 104
               endif

            enddo
            enddo

104 continue

        enddo
        enddo

C write(*,*) 'out of calc'
c write(*,*) 'icheck = ',icheck

        return
        end

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Apr 1 18:47:41 2010

This archive was generated by hypermail 2.1.8 : Wed Apr 07 2010 - 07:12:50 MDT