Map Projection for Finite Volume Grid

From: Cece Borries <cjborries_at_nyahnyahspammersnyahnyah>
Date: Wed Feb 29 2012 - 14:07:27 MST

Hello.

I am trying to calculate the transient eddy moisture transport flux from
CAM5 model output (finite volume grid, 0.9 x 1.25 degrees). I am fairly
certain that my calculations are correct; however, the plots from NCL are
not.

I am wondering if I need to use a certain map projection for finite volume
grids.

My script is really long, so I include snippets below. I have also
attached the plot which NCL creates.

Thanks for any help!

-------------------------------------------------------------------------------------------------------------------------------------------------------
(I read in the data and create arrays of dimensions: year, month, level,
lat, lon.)

 flux_v(i-1,j-1,:,:,:) =(jja_v(i-1,j-1,:,:,:) -
v_year_avg)*(jja_q(i-1,j-1,:,:,:)- q_year_avg) ; v component of flux
 flux_u(i-1,j-1,:,:,:) =(jja_u(i-1,j-1,:,:,:) -
u_year_avg)*(jja_q(i-1,j-1,:,:,:)- q_year_avg) ; u component of flux

v_flux_mon_avg = dim_avg_n_Wrap(flux_v,1)
                    ; calculate monthly and yearly averages
v_flux_year_avg = dim_avg_n_Wrap(v_flux_mon_avg,0)
copy_VarCoords(z,v_flux_year_avg)

u_flux_mon_avg = dim_avg_n_Wrap(flux_u,1)
u_flux_year_avg = dim_avg_n_Wrap(u_flux_mon_avg,0)
copy_VarCoords(z,u_flux_year_avg)

; take a vertical integral over the levels
hyai = in->hyai
hybi = in->hybi
ps = in->PS
p0 = 100000

dp = dpres_hybrid_ccm(ps,p0,hyai,hybi)
dp_avg = dim_avg_n_Wrap(dp,0)
g = 9.81
a = new((/15, nlat, mlon/), "double", getFillValue(z)) ; only want
the first 15 levels
b = new((/15, nlat, mlon/), "double", getFillValue(z))

 do o = 1,15
  a(o-1,:,:) = (v_flux_year_avg(o-1,:,:)*dp_avg(30-o,:,:)) ; transient
eddy moisture flux = (integral(v'q' dp))/g
  b(o-1,:,:) = (u_flux_year_avg(o-1,:,:)*dp_avg(30-o,:,:))
 end do

 v_flux = (dim_sum_n_Wrap(a,0)/g)
 u_flux = (dim_sum_n_Wrap(b,0)/g)

; plot TE flux
  res = True
  res@tiMainString = "" ; Title for the
plot
  res@gsnMaximize = True
  res@gsnSpreadColors = True
  res@lbOrientation = "vertical"
 ;vertical label bar

  res@gsnAddCyclic = False
  res@mpLimitMode = "LatLon"
  res@mpMinLatF = 15 ; range
to zoom in on
  res@mpMaxLatF = 75.
  res@mpMinLonF = 140
  res@mpMaxLonF = 250.
  res@mpRelativeCenterLon = True
  res@mpRelativeCenterLat = True

  res@tfDoNDCOverlay = True
  res@mpOutlineOn = True

  res@gsnDraw = False
  res@gsnFrame = False
  res@vcGlyphStyle = "LineArrow" ; use
arrow vectors instead of wind barbs
  res@vcRefAnnoOn = True
  res@vcRefLengthF = 0.025
  res@vcRefMagnitudeF = 6
  res@vcMinDistanceF = 0.025
  res@pmTickMarkDisplayMode = "Never"
  res@gsnDraw = False
  res@gsnFrame = False

 res@vcMonoLineArrowColor = False

 plot=gsn_csm_vector_map(wks,u_flux({15:75},{140:250}),v_flux({15:75},{140:250}),res)
 draw(plot)
 frame(wks)

-- 
Cecilia Borries
Graduate Student
International Arctic Research Center
Department of Atmospheric Sciences
Teaching Assistant
Department of Physics
University of Alaska Fairbanks


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

Received on Wed Feb 29 14:07:41 2012

This archive was generated by hypermail 2.1.8 : Mon Mar 05 2012 - 14:12:07 MST