[ncl-talk] Issues adding variables to chart

Rick Brownrigg brownrig at ucar.edu
Thu May 7 09:16:41 MDT 2015


Hi Steven,

Yes a quick test indicates that the missing_values is the culprit (for
more, check out:


On Thu, May 7, 2015 at 8:13 AM, BLIUJUS, STEVEN D CTR USAF AFMC
AFLCMC/HBAW-OL <steven.bliujus.3.ctr at us.af.mil> wrote:

> I am trying to take two files and add the variables together. One variable
> has data over water while the other has missing values, when I try adding
> the values, nothing prints out for the areas over the ocean. I tried
> setting
> the variables to 0 instead of missing values but that did not work either.
> I
> have attached three images: var1, var2, and var. The variable var is the
> addition, and the addition gets done over land but not over water. Not sure
> why this is occurring, my only guess is the struggle with missing data.
> However, when I look at var, it doesn't look as though it is adding the
> variables properly either since the max for var is 2.49807, but the max for
> var2 is 2.544, so there is an obvious discrepancy. Here is my info:
>
> 1. I am using Version 6.1.2
> 2. My Script:
>
> load "/home/bliujuss/ncl/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> load "/home/bliujuss/ncl/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
> load "/home/bliujuss/ncl/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> begin
>
> a=addfile("/home/bliujuss/Plots/MYD08_D3.051.timeAverage.1.nc","r")
> b=addfile("/home/bliujuss/Plots/MOD08_D3.051.timeAverage.0.nc","r")
> wks = gsn_open_wks("x11","plt_aod")
> gsn_define_colormap(wks,"3gauss")
>
> var1 = a->Deep_Blue_Aerosol_Optical_Depth_550_Land_QA_Mean(:,:)
> var2 = b->Optical_Depth_Land_And_Ocean_Mean(:,:)
>
> printVarSummary(var1)
> printMinMax(var1, True)
> printVarSummary(var2)
> printMinMax(var2, True)
>
>
> var = var1
> var = 0.0
> var = var2+var1
>
> printVarSummary(var)
> printMinMax(var, True)
>
> pltres = True
> pltres at tiMainString = "AOD550"
> pltres at cnFillOn = True
> pltres at gsnSpreadColors = False
> pltres at gsnAddCyclic = False
>
> pltres at cnLineLabelsOn = False
> pltres at cnLineLabelBackgroundColor = "white"
> ;plot = gsn_csm_contour_map_ce(wks,var({-46.2:46.5},{-4.5:184.5}),pltres)
> ;plot = gsn_csm_contour_map_ce(wks,var1({-46.2:46.5},{-4.5:184.5}),pltres)
> ;plot = gsn_csm_contour_map_ce(wks,var2({-46.2:46.5},{-4.5:184.5}),pltres)
> End
>
> 3. Files are attached
>
> 4. Images attached
>
> 5. No error message
>
> 6. gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-44)
>
>
>
> Steven Bliujus, Contractor
> SEMS/16WS WXE
> 557th Weather Wing
> DNS: 232-7151
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150507/35531cc7/attachment.html 


More information about the ncl-talk mailing list