Re: Help

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Wed Jul 13 2011 - 10:14:25 MDT

It looks like you are a new user. Welcome.

I suggest you read a bit more about NCL.
    http://www.ncl.ucar.edu/Document/Manuals/

Please peruse the Applications page:
   http://www.ncl.ucar.edu/Applications/

I modified one of the examples as follows.

   fname = "UCLM_PROMES_CTL_ERAIN_6H_1990_prc.nc"
   a = addfile(fname,"r")
   prp = a->prc(1,:,:)
   printVarSummary(prp)

   lat2d = f->lat
   lon2d = f->lon

   prp@lat2d = lat2d
   prp@lon2d = lon2d

   lc = f->Lambert_Conformal ; this has all the map info.

   dimll = dimsizes(lat2d)
   nlat = dimll(0)
   mlon = dimll(1)

   wks = gsn_open_wks ("x11", "Martins") ; open workstation
   gsn_define_colormap (wks,"prcp_1") ; choose color map

   res = True
   res@gsnAddCyclic = False ; regional data
   res@cnFillOn = True ; color fill
   res@cnLinesOn = False ; no contour lines
   res@cnLineLabelsOn = False ; no contour labels
   res@gsnSpreadColors = True ; use total colormap
  ;res@gsnSpreadColorStart = 4
  ;res@gsnSpreadColorEnd = -1
   res@cnInfoLabelOn = False ; no contour info

; method of zooming in on map.

   res@mpLimitMode = "Corners" ; choose range of map
   res@mpLeftCornerLatF = lat2d(0,0)
   res@mpLeftCornerLonF = lon2d(0,0)
   res@mpRightCornerLatF = lat2d(nlat-1,nlon-1)
   res@mpRightCornerLonF = lon2d(nlat-1,nlon-1)

   res@mpProjection = "LambertConformal"
   res@mpLambertParallel1F = lc@northern_parallel
   res@mpLambertParallel2F = lc@southern_parallel
   res@mpLambertMeridianF = lc@longitude_of_central_meridian

   res@tiMainString = fname

   plot = gsn_csm_contour_map(wks,prp,res)

On 7/13/11 9:47 AM, Guilherme Martins wrote:
> Hi users,
>
> I need help. I create the file in attach, but when I run I receive the
> error below:
>
> May anyone help?
>
> Thanks,
>
> Guilherme.
>
> Copyright (C) 1995-2011 - All Rights Reserved
> University Corporation for Atmospheric Research
> NCAR Command Language Version 6.0.0
> The use of this software is governed by a License Agreement.
> See http://www.ncl.ucar.edu/ for more details.
> (0) gsn_add_cyclic: Warning: The range of your longitude data is not 360.
> (0) You may want to set gsnAddCyclic to False to avoid a warning
> (0) message from the spline function.
> warning:_NhlCreateSplineCoordApprox: Attempt to create spline
> approximation for X axis failed: consider adjusting trXTensionF value
> warning:IrTransInitialize: error creating spline approximation for
> trXCoordPoints; defaulting to linea
>
> I send the result from ncl_filedump:
>
> Variable: f
> Type: file
> filename: UCLM_PROMES_CTL_ERAIN_6H_1990_prc
> path: UCLM_PROMES_CTL_ERAIN_6H_1990_prc.nc
> file global attributes:
> Conventions : CF-1.0
> production : Produced by PROMES 2007
> institution : UCLM
> source : PROMES model 2009
> project_id : CLARISLPB-ERAINTERIM
> experiment_id : ERA Interim 50
> forcing_id : ERA Interim
> dimensions:
> ncl_scalar = 1
> x = 130
> y = 148
> time = 1460 // unlimited
> variables:
> float lon ( y, x )
> long_name : Longitude
> units : degrees_east
> standard_name : longitude
>
> float lat ( y, x )
> long_name : Latitude
> units : degrees_north
> standard_name : latitude
>
> double time ( time )
> units : hours since 1990-01-01 00:00:00
> calendar : gregorian
> long_name : time
> actual_range : 1990-01-01 00:00:00 1990-12-31 00:00:00
> time_origin : 01-JAN-1990
> delta_t : 0000-00-00 06:00:00
>
> float prc ( time, y, x )
> long_name : Convective Precipitation
> units : kg/m2s
> coordinates : lon lat
> short_name : prc
> standard_name : Convective precipitation
>
> double x ( x )
> point_spacing : even
> axis : X
> long_name : x coordinate of projection
> standard_name : projection_x_coordinate
>
> double y ( y )
> point_spacing : even
> axis : Y
> long_name : y coordinate of projection
> standard_name : projection_y_coordinate
>
> float Lambert_Conformal ( ncl_scalar )
> grid_mapping_name : lambert_conformal_conic
> longitude_of_central_meridian : -65.5
> latitude_of_projection_origin : -20.5
> cone_type : secant
> northern_parallel : 0
> southern_parallel : -50
>
>
>
> --
> Guilherme Martins
>
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Jul 13 10:14:31 2011

This archive was generated by hypermail 2.1.8 : Mon Jul 18 2011 - 15:57:58 MDT