[ncl-talk] Troubles in NCL 6.4.0

SARA CORNEJO BUENO sarcorne at ucm.es
Sun Apr 15 10:17:08 MDT 2018


Hi! I run my NCL script, and

*I got an error:
*>>* Troubles finding level  100 above ground.
*>* Problems first occur at (   1,   1)
*>* Surface pressure =    0.0 hPa.
*>* STOP Error_in_finding_100_hPa_up*


*And this is the start of the script:*


*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/wrf/WRFUserARW.ncl"

load "/Volumes/DiscoSara/ncl-6.4.0/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "/Volumes/DiscoSara/ncl-6.4.0/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "/Volumes/DiscoSara/ncl-6.4.0/lib/ncarg/nclscripts/csm/contributed.ncl"
load "/Volumes/DiscoSara/ncl-6.4.0/lib/ncarg/nclscripts/csm/shea_util.ncl"
load "/Volumes/DiscoSara/ncl-6.4.0/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"*


*begin*

*diri= "/Volumes/DiscoSara/"
 files = systemfunc("ls " + diri + "wrfout_d02_2010*") ;para llamar a
todas las salidas de golpe
 a = addfiles(files,"r")
 times =  wrf_user_getvar(a,"times",-1) ; get all times in the files


 ntimes = dimsizes(times)       ;number of times in the files
 do it = 0,ntimes-1,6           ; TIME LOOP



;;;;; Get the variables

;;;Presión, Latitud y Longitud

  lat = wrf_user_getvar(a,"XLAT",it)
  lon = wrf_user_getvar(a,"XLONG",it) ;it va de 0 a ntimes-1 cada 6 horas
  slp = wrf_user_getvar(a,"slp",it)

  min_slp = min(slp) ;mín de presión

  SLP = ndtooned(slp)    ;ndtooned: Convierte una matriz multi-D en una 1D
  LAT = ndtooned(lat)    ;
  LON = ndtooned(lon)

  ij = ind(min_slp .eq. SLP)  ;ij: calcula la posición dentro del
vector SLP en la que la presión es mínima (min_slp)
        ;ind se usa para vectores en una dimensión.


  min_LAT = LAT(ij)  ;
  min_LON = LON(ij)  ;
*



I think the problem is on "slp", but I don't know how to solve it

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180415/fc5148b9/attachment.html>


More information about the ncl-talk mailing list