<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hello, <div class="">I have a quick question regarding returning of arrays from functions. </div><div class=""><br class=""></div><div class="">In my code, I have two arrays var0 and var01 that I want to return from my function. Their dimensionalities are as follows: </div><div class=""><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Courier; color: rgb(184, 45, 24); background-color: rgb(237, 234, 212);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Courier; color: rgb(184, 45, 24); background-color: rgb(237, 234, 212);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">var0      = new((/251/),float,1e+30</span></div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Courier; color: rgb(184, 45, 24); background-color: rgb(237, 234, 212);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">var01     = new((/251,73/),float,1e+30)</span></div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Courier; color: rgb(184, 45, 24); background-color: rgb(237, 234, 212);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> <span class="Apple-tab-span" style="white-space:pre"> </span></span></div></div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Courier; color: rgb(184, 45, 24); background-color: rgb(237, 234, 212);" class=""><br class=""></div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Courier; color: rgb(184, 45, 24); background-color: rgb(237, 234, 212);" class="">At present, I am trying to return this using the command : </div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Courier; color: rgb(184, 45, 24); background-color: rgb(237, 234, 212);" class=""><br class=""></div><div style="margin: 0px; font-size: 16px; line-height: normal; font-family: Courier; color: rgb(184, 45, 24); background-color: rgb(237, 234, 212);" class=""><div style="margin: 0px; line-height: normal; color: rgb(77, 47, 45);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">return([/var0,var01/]) ; Note that the dimensions of var0 and var1 are different. </span></div><div style="margin: 0px; line-height: normal; color: rgb(77, 47, 45);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; color: rgb(77, 47, 45);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">As a result, in my wrapper script, when I receive the variables, it is becoming a confusing task. </span></div><div style="margin: 0px; line-height: normal; color: rgb(77, 47, 45);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; color: rgb(77, 47, 45);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><div style="margin: 0px; line-height: normal; color: rgb(184, 45, 24);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> wnout        = wn01(latvals,lonvals,lat1,lon1,speed)   </span></div><div style="margin: 0px; line-height: normal; color: rgb(184, 45, 24);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> var0         = wnout[0] </span></div><div style="margin: 0px; line-height: normal; color: rgb(184, 45, 24);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> var1         = wnout[1]  </span></div><div style="margin: 0px; line-height: normal; color: rgb(184, 45, 24);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; color: rgb(184, 45, 24);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> The above return procedure is giving out an error since I don’t know how to define the dimensions of wnout. Is there any better way to return two arrays of varying dimensions in NCL? </span></div><div style="margin: 0px; line-height: normal; color: rgb(184, 45, 24);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; color: rgb(184, 45, 24);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Thank you, </span></div><div style="margin: 0px; line-height: normal; color: rgb(184, 45, 24);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Prashanth  </span></div></span></div></div></body></html>