uv2dvF and uv2vrF NaN values

From: jonathan meyer <tallj03_at_nyahnyahspammersnyahnyah>
Date: Wed Feb 19 2014 - 15:50:04 MST

Good afternoon NCL-ers,
I am computing ageostrophic winds using actual winds and geostrophic winds. In order to convince myself the ageostrophic wind fields satisfy the mathematics of the atmosphere I am computing the divergence and vorticity of the ageostrophic winds which should equal zero everywhere.
Using the uv2dvF and uv2vrF functions to compute these two fields returns NaN values for the entire array. I've confirmed there are no missing data, and the dataset is on a global fixed grid with the latitude monotonically increasing (-90 to 90).

My question:
Is the return of NaN an artifact of the functions where divergence/vorticity is actually zero?
I've tested these functions using actual U and V winds and they return appropriate ranges of values, so something is unique to the ageostrophic winds.
Thanks in advance,Jon

My Code Snippet
begin ;================================================================== print("ESTABLISH CCSM FILES AND RETRIEVE DIMENSION INFO") ; ================================================================= f1_in = addfile(dir1 + "CCSM_REG_U_test1979.nc", "r") f2_in = addfile(dir2 + "CCSM_REG_V_test1979.nc", "r") lev = f1_in->lev lat = f1_in->lat2(::-1) lon = f1_in->lon2 n_lev = dimsizes(lev) ; ================================================================= print("READ IN CCSM DATA") ; ================================================================= Ug = f1_in->Ug(:,:,::-1,:) U = f1_in->U( :,:,::-1,:) Vg = f2_in->Vg(:,:,::-1,:) V = f2_in->V( :,:,::-1,:) ; ================================================================= print("COMPUTE AGEOSTROPHIC WINDS") ; ================================================================= Ua = U-Ug Va = V-Vg ; ================================================================= print("COMPUTE DIVERGENCE AND VORTICITY OF AGEOSTROPHIC WINDS") ; ================================================================= print(num(ismissing(Ua))) print(num(ismissing(Va))) div = uv2dvF(Ua,Va) vor = uv2vrF(Ua,Va)
****RESOURCE SETTING BLAH BLAH*******
do z = 0, n_lev-1 print("Plotting level " + lev(z)) resdiv@gsnCenterString = "Divergence" plot(0) = gsn_csm_contour_map_ce(wks, div(0,z,:,:), resdiv) resvor@gsnCenterString = "Vorticity" plot(1) = gsn_csm_contour_map_ce(wks, vor(0,z,:,:), resvor) resP@txString = "00Z 1 July 1979 "+ lev(z) + "-mb" gsn_panel(wks,plot, (/2,1/), resP) end do

end

When Running the code:
See http://www.ncl.ucar.edu/ for more details.(0) ESTABLISH CCSM FILES AND RETRIEVE DIMENSION INFO(0) READ IN CCSM DATA(0) COMPUTE AGEOSTROPHIC WINDS(0) COMPUTE DIVERGENCE AND VORTICITY OF AGEOSTROPHIC WINDS(0) 0(0) 0(0) Plotting level 30warning:ContourPlotInitialize: no valid values in scalar field; ContourPlot not possible:[errno=1101]warning:ContourPlotInitialize: no valid values in scalar field; ContourPlot not possible:[errno=1101](0) Plotting level 50warning:ContourPlotInitialize: no valid values in scalar field; ContourPlot not possible:[errno=1101]warning:ContourPlotInitialize: no valid values in scalar field; ContourPlot not possible:[errno=1101]

                                               

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Feb 19 15:50:16 2014

This archive was generated by hypermail 2.1.8 : Mon Mar 03 2014 - 14:26:18 MST