[ncl-talk] Troubles in NCL 6.4.0
Bill Ladwig
ladwig at ucar.edu
Mon Apr 16 10:54:03 MDT 2018
Hi Sara,
It's throwing an error because your value for pressure at Fortran index
(1,1,1) is 0 hPa. This is an unrealistic value for surface pressure. There
appears to be a problem with your data.
In NCL, do a wrf_user_getvar(your_file, "pressure", 0) and check that the
value returned for index (0,0,0) is something close to ~1000 hPa (or less
if it's in the mountains). If not, something is wrong with your data,
because WRF generally does not produce bogus or missing values unless
something went wrong during the run (also check error logs for your WRF
run). Also make sure you do this check for each of the files and times in
your data set.
Hope this helps,
Bill
On Sun, Apr 15, 2018 at 10:17 AM, SARA CORNEJO BUENO <sarcorne at ucm.es>
wrote:
> 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
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> 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/20180416/4287adb4/attachment.html>
More information about the ncl-talk
mailing list