Meridonal Temperature Gradient

From: <sbasu_at_nyahnyahspammersnyahnyah>
Date: Mon May 02 2011 - 11:58:00 MDT


I am trying to use canter_finite _difference_n function to calculate
meridional temperature gradient.
 But I am getting an error saying

"Invalid dimension index for calculating the center finite difference"

Here is the portion of my script where I am doing this:

  nlat = 128
  nlon =256
  dlon = (lon(2)-lon(1))*0.0174533 ; convert to radians
                                    ; pre-allocate space
  dLon = dble2flt(dlon)
  Lon = dble2flt(lon)

  dTdY = new((/124,15,nlat,nlon/),typeof(tempm))

   do nl =0,nlon-1 ; loop over each longitude
      dY = 6378388.*cos(0.0174533*Lon(nl))*dLon ; constant at this latitude
      dTdY(:,:,:,nl)= center_finite_diff_n (tempm(:,:,:,nl),dY,True,0,3)
  end do

  dtdy = flt2dble(dTdY)
  printMinMax(dtdy, True)
  printMinMax(dTdY, True)

Also in the example 6 of documentation of "center_finite_difference_n"
there are typeo in this line:

dTdX(:,:,nl,:) = center_finite_diff_n (T(:,:,nl;,:), dX , True,0,0)
it should be I think
dTdX(:,:,nl,:) = center_finite_diff_n (T(:,:,nl,:), dX , True,0,2)


Soumik Basu
Graduate Student, Research Assistant
International Arctic Research Center
University of Alaska Fairbanks
This email was sent using SquirrelMail.
   "Webmail for nuts!"
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
Received on Mon May 2 11:58:28 2011

This archive was generated by hypermail 2.1.8 : Tue May 03 2011 - 14:47:34 MDT