<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hello everyone.</div><div><br></div><div>When executing the scipt when I look for the slp variable through wrf_user_getvar I get an error. I have tried with many more variables, and everything works correctly, it is only with that one. The mistake is:</div><div><br></div><div><p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures"> Copyright (C) 1995-2019 - All Rights Reserved</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures"> University Corporation for Atmospheric Research</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures"> NCAR Command Language Version 6.6.2</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures"> The use of this software is governed by a License Agreement.</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures"> See <a href="http://www.ncl.ucar.edu/">http://www.ncl.ucar.edu/</a> for more details.</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">fatal:NclMalloc Failed:[errno=12]</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">Violación de segmento</span></p></div><div><br></div><div>El script es:</div><div><br></div><div><p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">begin</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41);min-height:16px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">; Abrir archivo</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">files = systemfunc("ls /home/ssd/chile/WRF/test/em_real/wrfout_d03_2017-12-31_00:00:00") + ".nc"</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">a = addfiles(files,"r")</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41);min-height:16px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">; Definir latitud y longitud</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">lat = -22.056923</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">lon = -68.573862</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41);min-height:16px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">; Localización del punto más próximo</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">opt = True </span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">loc = wrf_user_ll_to_xy(a,lon,lat,opt)</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">loc2 = wrf_user_xy_to_ll(a,loc(0),loc(1),opt) </span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41);min-height:16px"><span style="font-variant-ligatures:no-common-ligatures">  </span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">lat2 = loc(1) ; Latitud para las variables</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">lon2 = loc(0) ; Longitud para las variables</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41);min-height:16px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41);min-height:16px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">; Temperatura a 2m en ºC</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">;tk2 = wrf_user_getvar(a,"T2",-1)</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">;tk2 = tk2 - 273.15</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">;tk2 = decimalPlaces(tk2,2,True)</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41);min-height:16px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">; Viento a 10 m en m/s</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">;u10 =  wrf_user_getvar(a,"U10",-1)</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">;v10 =  wrf_user_getvar(a,"V10",-1)</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">;wspd = wind_speed(u10,v10)</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">;wspd = decimalPlaces(wspd,2,True)</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41);min-height:16px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">; Presión en superficie</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">psfc = wrf_user_getvar(a,"slp",-1)</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">psfc = decimalPlaces(psfc,2,True)</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41);min-height:16px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">; Humedad relativa a 2 m</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">;rh2 = wrf_user_getvar(a,"rh2",-1)</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">;rh2 = decimalPlaces(rh2,2,True)</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41);min-height:16px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">; Opciones del encabezado</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">csv_filename = "data.csv"</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">system("rm -f " + csv_filename)</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">fields = (/"TIME, TEMPERATURE (ºC), PRESSURE (hPa), RH (%)"/)</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41);min-height:16px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">; Crear encabezado</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">dq = str_get_dq()</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">fields = dq + fields + dq </span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">header = [/str_join(fields,",")/] </span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41);min-height:16px"><span style="font-variant-ligatures:no-common-ligatures">                                  </span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">; Formato de escritura de las variables</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">;format = "%s,%g,%g,%g;%g" </span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">format = "%s,%8.2f,%6.2f,%6.2f,%6.2f"</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41);min-height:16px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">; Crea el archivo con el encabezado</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">write_table(csv_filename, "w", header, "%s")</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41);min-height:16px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">; Loop temporal</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">times = wrf_user_getvar(a,"times",-1)</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">ntimes = dimsizes(times)</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">do it = 0,ntimes-1</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41);min-height:16px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">; Crea el archivo con las variables</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">alist = [/times(it),psfc(it,lon2,lat2)/]</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">write_table(csv_filename, "a", alist, format)</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41);min-height:16px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">end do</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41);min-height:16px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Monaco;color:rgb(255,255,255);background-color:rgb(30,31,41)"><span style="font-variant-ligatures:no-common-ligatures">end</span></p></div>-- <br><div dir="ltr" class="gmail_signature">Borja Sas González</div></div></div></div></div>