trouble with calculating the cosine of 2 dimensional latitude

From: Alexander Semenov <asemenov_at_nyahnyahspammersnyahnyah>
Date: Mon Apr 16 2012 - 11:13:32 MDT

Dear NCL-users.

I have a question about calculating the cosine of latitude.

The trouble is that the latitude I'm using is two-dimensional.

float g5_lat_0 ( g5_x_0, g5_y_1 ) - LATITUDE

Do, when I calculate the cosine, the whole domain gets strange. NCL still
plots it, but obviously something is going wrong. I attached 2 plots. The
parameter I'm trying to calculate should look like the plot "when I don't
devide U by cosine". Is there any way to fix that? Thanks

That's the part of my code:

i = 10 ;HEIGHT
  lat = f->g5_lat_0
  printVarSummary(lat)
  lon = f->g5_lon_1
  u = f->U_GRD_GDS5_ISBL_10(i,:,:)/cos(lat)*113000
  v = f->V_GRD_GDS5_ISBL_10(i,:,:)/113000

-- 
regards
*******************************************************
*Alexander Semenov*
*
*
PhD Student - Research Assistant
International Arctic Research Center
Department of atmospheric sciences
University of Alaska Fairbanks
930 Koyukuk dr, 408c3
Fairbanks, AK, USA, 99775
work phone +19074742672



_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

when_devide_U_by_cosine.png when_I_don_t_devide_U_by_cosine.png
Received on Mon Apr 16 11:13:46 2012

This archive was generated by hypermail 2.1.8 : Fri Apr 20 2012 - 16:21:18 MDT