[ncl-talk] Contour over map - projection issue (corrected)

Michele Petrini mpetrini139 at yahoo.it
Mon Jun 29 04:26:35 MDT 2015


Dear helping desk,
I am a beginner with NCL and I have the following issue. I have a netcdf 
file (shelf011_class01_0.nc, uploaded in ftp.cgd.ucar.edu via wget) 
containing some data obtained from an ice sheet model run. The model 
transforms latitude-longitude coordinates into native Cartesian 
distances coordinates via the Lambert equal Area projection, using as a 
center of projection the North Pole (0,90). Hence my data in the netcdf 
file are geographically dependent on native Cartesian distances 
coordinates. I am trying now to plot a contour of the ice thickness over 
a stereographic map of the Northern Emisphere of one of the netcdf file 
variables (let's say the ice thickness). What I get when I run the 
script is wrong (I'm sure as, for instance, Greenland is ice free). 
Where I did wrong? I attach both the NCL script and the .ps file I get 
as I run the script.

Thank you for your help,

Michele

-- 

***
Michele Petrini

Ph.D. student in Earth Science and Fluid Mechanics

Università degli studi di Trieste,
Dipartimento di Matematica e Geoscienze
Palazzina C - via Weiss 1, 34128 Trieste, Italy

Email: mpetrini139 at yahoo.it
Skype: michele.petrins
Mobile: +39 3398367372

-------------- next part --------------

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"

begin
  
  cdf_file = addfile("/home/michele/Desktop/WORK_GRISLI/GRISLI/lgm_NH40/Netcdf-Resu/shelf011_class01_0.nc","r")
  
  lat = cdf_file->lat
  lon = cdf_file->lon
  Hice = cdf_file->H
  U  = cdf_file->Umag
  
  wks = gsn_open_wks("ps","test2")

  resources = True
  resources at cnFillOn              = True
  resources at cnLineLabelsOn        = False
  resources at cnInfoLabelOn         = False
  resources at sfXCStartV = min(lon)
  resources at sfXCEndV   = max(lon)
  resources at sfYCStartV = min(lat)
  resources at sfYCEndV   = max(lat)
  resources at mpPerimOn   = True  
  resources at gsnScale = True 
  resources at gsnPolar = "NH"
  resources at cnLevelSelectionMode = "ManualLevels"
  resources at cnMinLevelValF  = 1000
  resources at cnMaxLevelValF  = 5400
  resources at cnLevelSpacingF = 400  
 
  map=gsn_csm_contour_map_polar(wks,Hice(time|1,x|:,y|:),resources)
     
  delete(resources)
  resources  = True
  resources at tiMainString        = "velocity evolution"
  resources at xyLineColors = 119
  resources at xyLineThicknessF    = 2.0             
  resources at pmLegendDisplayMode    = "Always"     
  resources at pmLegendZone           = 0            
  resources at pmLegendOrthogonalPosF = 0.31         
  resources at lgJustification        = "BottomRight"
  resources at pmLegendWidthF         = 0.4          
  resources at pmLegendHeightF        = 0.12         
  resources at pmLegendSide           = "Top"        
  resources at lgPerimOn              = False      
  resources at xyExplicitLegendLabels = ("lat 62, lon 70")
  resources at vpYF      = 0.90  
  resources at vpXF      = 0.18
  resources at vpWidthF  = 0.74
  resources at vpHeightF = 0.74
  resources at trYMaxF = 3000 
  
  xy = gsn_xy(wks,U&time,U(:,70,62),resources)

end
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test2.ps
Type: application/postscript
Size: 1110964 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150629/1c3dce8b/attachment-0001.ps 


More information about the ncl-talk mailing list