Re: ncl-talk post from siswanto@bmkg.go.id requires approval

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Wed Nov 09 2011 - 16:35:15 MST

[The original question had an attachment that was too large to post, so I removed it and am just including the question here.

Siswanto,

The problem is that you've misspelled several resources. Whenever you get a warning "xxxxxx is not a valid resource in yyyyy at this time,
it usually means you've misspelled a resource, or you are trying to set a resource for a plot that doesn't recognize it (for example, if
you try to set a vector resource when calling gsn_csm_contour).

To fix the global map problem, you need to correctly spell "mpCenterLonF", "mpMinLatF", "mpMaxLatF", "mpMinLonF" and "mpMaxLonF". Note the capital "L" in all of these.

You need to fix some other ones as well:
        
        "cnFillOn"
        "cnInfoLabelOn"

As for the log error messages, you didn't include this part of the code, so I'm not sure what the problem is. However, the error is telling you that your minimum Y axis value is negative, and that it can't take the log of this. You might try setting trYMinF to something positive, or make sure you don't have it set incorrectly.

--Mary

>
>
>
> Dear all,
>
> I have a problem in mapping the EOF of TRMM monthly data.The problem is that NCL doesn't creat a map with Lat, Lon I desired but always show the global one. The displayed message is shown below:
>
>
> warning:cnFillon is not a valid resource in PrecMonthly_JAVA_EOF_TRMM2_contour at this time
> warning:cnInfoLabelon is not a valid resource in PrecMonthly_JAVA_EOF_TRMM2_contour at this time
> warning:mpMinlatF is not a valid resource in map at this time
> warning:mpMaxlatF is not a valid resource in map at this time
> warning:mpCenterlonF is not a valid resource in map at this time
> warning:mpMinlonF is not a valid resource in map at this time
> warning:mpMaxlonF is not a valid resource in map at this time
> warning:XyPlotSetValues:xyYStyle is NhlLOG:trYMinF can't be <= 0.0:Setting xyComputeYMin to True
> warning:tiXAxiprecring is not a valid resource in PrecMonthly_JAVA_EOF_TRMM2_xy at this time
> warning:tiYAxiprecring is not a valid resource in PrecMonthly_JAVA_EOF_TRMM2_xy at this time
> warning:XyPlotSetValues:xyYStyle is NhlLOG:trYMinF can't be <= 0.0:Setting xyComputeYMin to True
>
> the data and map resources are :
>
> Variable: prec
> Type: float
> Total Size: 379008 bytes
> 94752 values
> Number of Dimensions: 3
> Dimensions and sizes: [time | 144] x [lat | 14] x [lon | 47]
> Coordinates:
> time: [8772..113220]
> lat: [-9.25..-2.75]
> lon: [105.25..128.25]
> Number Of Attributes: 3
> units : mm/hr
> long_name : precipitation
> _FillValue : -9999.9
>
> Variable: eof
> Type: float
> Total Size: 7896 bytes
> 1974 values
> Number of Dimensions: 3
> Dimensions and sizes: [3] x [lat | 14] x [lon | 47]
> Coordinates:
> lat: [-9.25..-2.75]
> lon: [105.25..128.25]
> Number Of Attributes: 6
> _FillValue : -9999.9
> method : transpose
> matrix : covariance
> pcvar : ( 33.22661, 10.52711, 6.99185 )
> eval : ( 2.261313, 0.7164465, 0.4758464 )
> eval_transpose : ( 0.5653282, 0.1791116, 0.1189616 )
> (0) 0.1126622
> (0) -0.09401913
>
>
> Variable: eof_ts
> Type: float
> Total Size: 1728 bytes
> 432 values
> Number of Dimensions: 2
> Dimensions and sizes: [3] x [144]
> Coordinates:
> Number Of Attributes: 3
> _FillValue : -9999.9
> matrix : covariance
> ts_mean : ( 1.061375e-09, -1.041282e-09, 1.593932e-09 )
>
> ;plotting EOF pattern
> res = True ; plot mods desired
> res@gsnDraw = False ; let gsn_panel do plotting
> res@gsnFrame = False
> res@gsnMaximize = True ; make ps/eps/pdf large
> res@gsnAddCyclic = False ; regional data
> res@cnLevelSelectionMode = "ExplicitLevels" ; manual contour levels
> res@cnFillOn = True ; turn on color fill
> res@cnLinesOn = False ; turn of contour lines
> ;res@cnFillMode = "CellFill" ; Cell Mode
> res@cnFillMode = "RasterFill" ; Raster Mode
> res@cnLineLabelsOn = False ; Turn off contour lines
> res@cnLevelSelectionMode = "ExplicitLevels"
> res@cnMissingValFillPattern = 0
> res@cnMissingValFillColor = "black"
>
> res@lbOrientation = "vertical" ; vertical label barb's
> res@lbLabelFontHeightF = 0.012 ; change font size
> res@pmLabelBarOrthogonalPosF = -0.01 ; move a bit to left
> res@pmLabelBarWidthF = 0.1
> res@mpMinlatF = -9.0 ; only plot ..S to ..N
> res@mpMaxlatF = -4.0
> res@mpCenterlonF = 115. ; center plot at 180
> res@mpMinlonF = 100.
> res@mpMaxlonF = 128.
> res@mpFillOn = False
> res@mpOutlineOn = True
> res@mpOutlineBoundarySets = "National" ; turn on country boundaries
> gsn_define_colormap(wks,"gui_default")
> res@cnFillon = False ; turn on color
> ;res@cnLevels = (/-.05,-.04,-.03,-.02,-.01,.0,.01,.02,.03,.04,.05/)
> ;res@cnLineDashPatterns=(/2,2,2,2,0,0,0,0,0/)
> res@cnLevels = (/-.09,-.08,-.07,-.06,-.05,-.04,-.03,-.02,-.01,.0,.01,.02,.03,.04,.05,.06,.07,.08,.09/)
> res@cnLineDashPatterns=(/2,2,2,2,2,2,2,2,2,0,0,0,0,0,0,0,0,0,0/)
> ;res@cnFillColors = (/-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,52,52,52,72,72,72,72,72,72,72/)
> ;res@tmXBOn = False ; eliminate bottom labels
> ;res@tmXTOn = False ; eliminate bottom labels
> ;res@tmYROn = False ; eliminate bottom labels
> ;res@cnLinesOn = True ; False = no contour lines
> ;res@cnMonoLineDashPattern = False
> res@cnLineLabelsOn = True
> res@gsnCenterString = "EOF1 %Var=" + sprintf("%4.1f", eof@pcvar(0))
> res@gsnStringFontHeightF = .03
> res@gsnLeftString = ""
> res@gsnRightString = ""
> res@mpLandFillColor= "black"
> res@mpOceanFillColor=-1
> res@cnInfoLabelon = False
> res@cnLineLabelPlacementMode = "computed"
> res@lbLabelBarOn = True
> res@pmLabelBarDisplayMode = False
> res@lbLabelStride = 2 ; label bar stride
> res@lbLabelFontHeightF = 0.01
> res@mpDataBaseVersion = "Ncarg4_1" ; Use the high-res database
> res@vpHeightF = 0.55
>
> plot1(1) = gsn_csm_contour_map(wks,eof(0,:,:), res)
>
> delete(res@gsnCenterString)
> res@gsnCenterString = "EOF2 %Var=" + sprintf("%4.1f", eof@pcvar(1))
> plot1(3) = gsn_csm_contour_map(wks,eof(1,:,:), res)
>
> delete(res@gsnCenterString)
> res@gsnCenterString = "EOF3 %Var=" + sprintf("%4.1f", eof@pcvar(2))
> plot1(5) = gsn_csm_contour_map(wks,eof(2,:,:), res)
>
>
> Thank you in advanced. Any help will be very apreciated
> Best regards,
>
> --
> Siswanto
> Meteorologist/Climatologist
> Marine Meteorology Division
> Agency for Meteorology, Climatology and Geophysics
> Republic of Indonesia
> Ph : +62-21-6546318
> Fax : +62-21-6546315
> e-mail : siswanto@bmkg.go.id
> http://www.climatestudies.unibe.ch/students/personalpage_en.html?id=36
> http://unibe.academia.edu/SiswantoSISWANTO
> (AMG'00 UI'06 UNIBE'10) <PrecMonthly_JAVA_EOF_TRMM2.ps><prec_JAVAmonthly_EOFwavelet_TRMM2.ps>
>
>
>
>
>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Nov 9 16:35:25 2011

This archive was generated by hypermail 2.1.8 : Mon Nov 14 2011 - 10:41:55 MST