[ncl-talk] Strange output with vinth2p when P0>1000hPa

Wade Wei wadew at pku.edu.cn
Mon May 18 10:27:04 MDT 2015


Hello,

The netCDF file (bbS866C200000CPfb8.cam2.h0.1901-1999.avg.nc) has been uploaded to ftp.cgd.ucar.edu/incoming 

Thank you.


Regards,
Wade
 


 
From: Dennis Shea
Date: 2015-05-18 23:36
To: Wade Qiang Wei
CC: ncl-talk
Subject: Re: [ncl-talk] Strange output with vinth2p when P0>1000hPa
Hello,

There is nothing in the internal code that precludes interpolation to values > 1000hPa.

Please make the file available.

ftp ftp.cgd.ucar.edu
anonymous
email
cd incoming
prompt
put bbS866C200000CPfb8.cam2.h0.1901-1999.avg.nc
quit

Send an email to ncl-talk after the file has been successfully uploaded,

Cheers

On Sun, May 17, 2015 at 10:23 PM, Wade Qiang Wei <wadew at pku.edu.cn> wrote:
Hi all,

I am trying to analyze cam model results in a CCSM3.0 simulation of an exoplanet with P0=1379hPa. It kept giving me weird data after converting from hybrid coordinates to pressure coordinates with vinth2p. So I turned off extrapolation and noticed every output with pnew>=1000hPa is filled with missing values. The original data has levels across 3hpa to 1379hpa and therefore extrapolation should not be necessary from my point of view.

Could vinth2p deal with P0 greater than 1000hPa? Has anyone encountered similar problems?

Thanks a lot.


Best Rards,
Wade

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

begin

  cam4="~/GI581g/bbS866C200000CPfb8.cam2.h0.1901-1999.avg.nc"
;---Read data
  a   = addfile(cam4,"r")
  T   = a->T

;original T&lev=xxxxxxxxxxxx, 960, 1086., 1195, 1281, 1338, 1368

  pnew = (/3,10,20,30,50,70,100,150,200,250,300,400,500,600,700,850,1000,1150,1250,1330,1379/)
  pnew at units     = "hPa" 
  P0mb = 1379 ;mb
  K = 0.286
  g=13.5


;===============================================
 hyam = a->hyam                           ; get a coefficiants
 hybm = a->hybm                             ; get b coefficiants
 PS   = a->PS                     ; get pressure in Pa

;************************************************
   interp = 2 
; is extrapolation desired if data is outside the range of PS
   extrap = False
;************************************************
 T2 = vinth2p(T,hyam,hybm,pnew,PS,interp,P0mb,1,extrap)

 Tout=dim_avg_n_Wrap(T2 (0,:, :,:), 2)

  wks_type="x11"
  wks = gsn_open_wks(wks_type,"Zonal_Mean_T_Slice"+"_top")

; -- set resources
  res = True
  res at cnFillOn = True ; -- turn on color fill
  res at cnLineLabelsOn = False ; -- turns off contour line labels
  res at cnInfoLabelOn = False ; -- turns off contour info label
  res at cnLinesOn = False
  res at tiYAxisString = "Pressure"+" [hPa]" ; -- append units to y-axis label
  res at trYReverse = True ; -- reverses y-axis
  res at gsnMaximize=True

  plot = gsn_csm_contour(wks,Tout,res)

end 

_______________________________________________
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/20150519/9d1cb1c8/attachment.html 


More information about the ncl-talk mailing list