<div dir="ltr">hello all<div><br></div><div>i have a script to extract variables from WRF file at a certain pressure level</div><div>there are around 20 variables that i need to extract , but it takes really long to run the scrip,i am sending the code for 1 variable please if any one can help me to optimise it</div><div><br></div><div>this scripy tries to extract point data for a wrf file generated every 3 hours and total duration is a year.</div><div><br></div><div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"</div><div> load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"</div><div><br></div><div> files = systemfunc("ls -1 /home/cee1/Music/Build_WRF_and_WPS.V351/WRF_and_WPS_src/WRFV3/test/ em_real/2k/wrfout_d01_2000*") + ".nc"</div><div> a = addfiles(files,"r")</div><div><div> ;extraction of variables</div><div> time = -1</div><div> p = wrf_user_getvar(a,"pressure",time) ; total pressure<br></div><div><br></div><div> rh = wrf_user_getvar(a,"rh",time) ; calculate RH</div></div><div> rh850 =wrf_user_intrp3d( rh,p,"h",850,0.,False)</div><div> rh500 =wrf_user_intrp3d( rh,p,"h",500,0.,False)</div><div> rh1000 =wrf_user_intrp3d( rh,p,"h",1000,0.,False)</div><div><br></div><div><div> rhpoint500 = rh500(:,60,41) </div><div> rhpoint850 = rh850(:,60,41) </div><div> rhpoint1000 = rh1000(:,60,41) </div><div> </div></div><div><div> asciiwrite("rh0.txt",rhpoint500)</div><div> asciiwrite("rh8.txt",rhpoint850)</div><div> asciiwrite("rh13.txt",rhpoint1000)</div><div> </div></div><div>i have the similar code inside for 19 other variables,please help me to optimize this script and i just need my output at a single station and 3 pressure levels i.e 500.850 and 1000</div><div><br></div>-- <br><div dir="ltr"><font style="color:rgb(0,0,0);font-family:arial,helvetica,sans-serif"><span>With regards</span><span></span></font><font style="font-family:arial,helvetica,sans-serif"><span style="color:rgb(0,0,0)"><span><br></span></span></font><font style="font-family:arial,helvetica,sans-serif"><span style="color:rgb(0,0,0)"><span>Saurabh Kumar singh</span><span></span> </span></font><br style="color:rgb(51,204,0)"><br><font style="color:rgb(102,102,102)" size="1"> <b><i><span style="font-family:Webdings" lang="EN-GB">P</span></i></b><b><i><span style="font-family:Tahoma,sans-serif" lang="EN-GB"> : </span></i></b><b><i><span style="font-family:Arial,sans-serif" lang="EN-GB"> </span></i></b><b><i><span style="font-family:Tahoma,sans-serif" lang="EN-GB">Please consider the environment before printing this e-mail</span></i></b> </font><br style="color:rgb(102,102,102)"><br><br><br></div>
</div></div>