plotting contours using natgrids and cprect over a base map

From: Nancy Westcott (nan@XXXXXX)
Date: Wed Aug 07 2002 - 14:52:15 MDT

  • Next message: Dave Kennison: "Re: plotting contours using natgrids and cprect over a base map"

    I am having trouble plotting contours onto a base map.

    I plot the state outlines.
    Then, I use NATGRIDS to grid the data and CPRECT to contour the
     data.
    The contours span the x range of the plot, but are only in the bottom
     inch of the plot.
    When I plot the "stations", the stations are in the correct location
     and the values in SET do not change before and after the calls to
    NATGRIDS and CPRECT.
    The xmin, xmax, ymin, ymax, xinc and yinc seem to be correct...
    I am using "implicit none" so I think I have initialized everything...

    Any suggestions?
    Thanks.

    c -- get station data
         do 50 i=1,nsno
          call maptrn(slat(i),slong(i),su,sv)
          call plchhq(su, sv, sbuf(i), 0.012, 0.0, 0.0)
            if (i .lt. 20) then
            print *,slat(i),slong(i),su,sv,sbuf(i)
            endif
       50 continue
    c --- CONVERT THE TWO CORNERS SPECIFIED IN MAP TO X,Y COORDINATES
          lat1 = 34.5
          lat2 = 49.0
          lon1 = -80.0
          lon2 = -100.0
          call maptrn(lat1,lon1,xmin,ymax)
          call maptrn(lat2,lon2,xmax,ymin)

    c define intepolated output grid
            xinc=(xmax-xmin)/(numxout-1.)
            print *, xmin,xmax,' xinc = ',xinc
            do i=1,numxout
             xi(i)=xmin+real(i-1)*xinc
            enddo
            yinc=(ymax-ymin)/(numyout-1.)
            print *, ymin,ymax,' yinc = ',yinc
            do j=1,numyout
             yi(j)=ymin+real(j-1)*yinc
            enddo
    c set the flag for using estimated gradients
    cc makes no difference if igr is 1 or 0...
            call nnseti('igr',1)
    c regrid
            call natgrids(nsno,su,sv,z,numxout,numyout,xi,yi,zi,ier)
            call cprect(zi,numxout,numxout,numyout, rwrk, 2500,
         ! iwrk, 1000)

    __________________________________________________________
    Nancy Westcott email: nan@uiuc.edu
    Research Meteorologist phone: 217/244-0884
    Midwest Regional Climate Center fax: 217/244-0220
    Atmospheric Environment Section
    Illinois State Water Survey
    2204 Griffith Drive
    Champaign, Illinois 61820
    _______________________________________________
    ncarg-talk mailing list
    ncarg-talk@ucar.edu
    http://mailman.ucar.edu/mailman/listinfo/ncarg-talk



    This archive was generated by hypermail 2b29 : Wed Aug 07 2002 - 17:17:31 MDT