Re: wrapit77 and nhlf77 compiling problems

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Thu Apr 01 2010 - 21:10:33 MDT

Hi Eric,

The problem is simply that your lines are longer than 72 characters. I
think you
said in a previous email that this worked before, but I'm not sure how
that's possible.
The code between NCLFORTSTART and NCLEND needs to be F77 code, and
hence 72 characters or fewer:

       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)

--Mary

On Apr 1, 2010, at 6:47 PM, Eric D. Robinson wrote:

> 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 21:10:38 2010

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