[ncl-talk] dpres_hybrid_ccm

Buzan, Jonathan jbuzan at purdue.edu
Tue Jan 21 06:34:14 MST 2020


Hello NCL-Talk,

I am attempting to use the following function:
dpres_hybrid_ccm
https://www.ncl.ucar.edu/Document/Functions/Built-in/dpres_hybrid_ccm.shtml

Example 3 says to:

f = addfile
("....", "r")
  hyai = f->hyai
  hybi = f->hybi
  p0   = f->P0
  ps   = f->PS

  dp   =  dpres_hybrid_ccm
 (ps,p0,hyai,hybi)  ; Pa [kg/(m s2)]   

  T    = f->T                                ; K  (time,lev,lat,lon)
  cp   = 1004.                               ; J/(K kg)     [ m2/(K s2) ]
  g    = 9.81                                ; m/s

  Tdp  = T*dp                                ; [K kg/(m s2)]   (temporary variable)


fatal:Mul: Dimension size, for dimension number 1, of operands does not match, can't continue

fatal:["Execute.c":8638]:Execute: Error occurred at or near line 105

However, T and dp have different sized dimensions for the levels (dp is one less than T). I am not sure if this is correct for the example.

Thanks,
-Jonathan




More information about the ncl-talk mailing list