[ncl-talk] Temperature Advection Script Error

Dennis Shea shea at ucar.edu
Wed Jul 21 08:48:45 MDT 2021


There are multiple types of grids used in climate/weather models. See
Figure 6 in the following.

*https://cdn.intechopen.com/pdfs/43438/InTech-Grids_in_numerical_weather_and_climate_models.pdf*
<https://cdn.intechopen.com/pdfs/43438/InTech-Grids_in_numerical_weather_and_climate_models.pdf>

=====
NCL's *advect_variable
<https://www.ncl.ucar.edu/Document/Functions/Contributed/advect_variable.shtml>
*(which was written a long time ago) expects all quantities to be on the
same [Type A] grid.
To use the function, a user must interpolate each variable to a Type A
grid. IE: All variables must be on the same grid point locations.





On Tue, Jul 20, 2021 at 10:08 PM Jackson Wiles via ncl-talk <
ncl-talk at mailman.ucar.edu> wrote:

> Thank you very much, Rick, for the input.  Any other help would be greatly
> appreciated from anyone else.
>
> Thanks again,
>
> Jackson Wiles
>
> On Jul 20, 2021, at 5:04 PM, Rick Brownrigg <brownrig at ucar.edu> wrote:
>
> 
> Hi Jackson,
>
> Well, those are obviously of three different sizes. The docs for advect_var
> iable state they must be the same. (BTW: where did advect_var come from
> -- I don't see documentation for it, but it's there in the
> csm/contributed.ncl script???)
>
> I'm a bit surprised the 3 variables are different. I'm not very
> knowledgeable about WRF files, but I would have thought that at least U & V
> would be the same. I'm not sure what to suggest here, short of regridding
> (which sounds like a lot of trouble).
>
> Hopefully someone else can chime in.
>
> Rick
>
> On Tue, Jul 20, 2021 at 2:22 PM Jackson Wiles <jtwiles at aggies.ncat.edu>
> wrote:
>
>> Thank you for looking into my issue.
>>
>>
>>
>> Here is the output for u, v and T respectively along with the updated
>> script.
>>
>>
>>
>> (0)     25
>>
>> (1)     49
>>
>> (2)     185
>>
>> (3)     235
>>
>> (0)     25
>>
>> (1)     49
>>
>> (2)     186
>>
>> (3)     234
>>
>> (0)     25
>>
>> (1)     49
>>
>> (2)     185
>>
>> (3)     234
>>
>>
>>
>> Jackson Wiles
>>
>>
>>
>> *From: *Rick Brownrigg <brownrig at ucar.edu>
>> *Sent: *Tuesday, July 20, 2021 3:50 PM
>> *To: *Jackson Wiles <jtwiles at aggies.ncat.edu>
>> *Cc: *ncl-talk at mailman.ucar.edu
>> *Subject: *Re: [ncl-talk] Temperature Advection Script Error
>>
>>
>>
>> Hi,
>>
>>
>>
>> Looking at the code for advect_var, ier=100 corresponds to the warning
>> you are seeing. The code checks that the dimensions and sizes of the 3
>> input variables are all the same. I see in your script you printed
>> dimsizes(u) -- what are the sizes for variables "v" and "T"?
>>
>>
>>
>> Rick
>>
>>
>>
>>
>>
>> On Tue, Jul 20, 2021 at 1:12 PM Jackson Wiles via ncl-talk <
>> ncl-talk at mailman.ucar.edu> wrote:
>>
>> Hello,
>>
>>
>>
>> I am using ncl to try to plot temperature advection for a simulation
>> produced by the Weather Research and Forecasting model. I have attached the
>> temperature advection script to this email. However, I have been given an
>> error. The total output from running the script is listed below.
>>
>>
>>
>> Copyright (C) 1995-2015 - All Rights Reserved
>>
>> University Corporation for Atmospheric Research
>>
>> NCAR Command Language Version 6.3.0
>>
>> The use of this software is governed by a License Agreement.
>>
>> See http://www.ncl.ucar.edu/ for more details.
>>
>>
>>
>>
>>
>> Variable: times
>>
>> Type: string
>>
>> Total Size: 200 bytes
>>
>>             25 values
>>
>> Number of Dimensions: 1
>>
>> Dimensions and sizes:   [25]
>>
>> Coordinates:
>>
>> Number Of Attributes: 2
>>
>>   description : times in file
>>
>>   _FillValue :  missing
>>
>> (0)     2017-10-08_12:00:00
>>
>> (1)     2017-10-08_13:00:00
>>
>> (2)     2017-10-08_14:00:00
>>
>> (3)     2017-10-08_15:00:00
>>
>> (4)     2017-10-08_16:00:00
>>
>> (5)     2017-10-08_17:00:00
>>
>> (6)     2017-10-08_18:00:00
>>
>> (7)     2017-10-08_19:00:00
>>
>> (8)     2017-10-08_20:00:00
>>
>> (9)     2017-10-08_21:00:00
>>
>> (10)    2017-10-08_22:00:00
>>
>> (11)    2017-10-08_23:00:00
>>
>> (12)    2017-10-09_00:00:00
>>
>> (13)    2017-10-09_01:00:00
>>
>> (14)    2017-10-09_02:00:00
>>
>> (15)    2017-10-09_03:00:00
>>
>> (16)    2017-10-09_04:00:00
>>
>> (17)    2017-10-09_05:00:00
>>
>> (18)    2017-10-09_06:00:00
>>
>> (19)    2017-10-09_07:00:00
>>
>> (20)    2017-10-09_08:00:00
>>
>> (21)    2017-10-09_09:00:00
>>
>> (22)    2017-10-09_10:00:00
>>
>> (23)    2017-10-09_11:00:00
>>
>> (24)    2017-10-09_12:00:00
>>
>> (0)     Working on time: 2017-10-08_12:00:00
>>
>> (0)     25
>>
>> (1)     49
>>
>> (2)     185
>>
>> (3)     235
>>
>> (0)     The script can run this far
>>
>> (0)     advect_var: all input arguments must have the same dimension sizes
>>
>> (0)                 ranku=4
>>
>> (0)                 rankv=4
>>
>> (0)                 rankx=4
>>
>> (0)     advect_var: Warning: No named dimensions. Can not check grid
>> order.
>>
>> (0)     advect_var fatal error(s) encountered: ier=100
>>
>>
>>
>> I am not sure how to fix this issue. I have been trying to use the
>> advection variable function in ncl based off of the following link
>> https://www.ncl.ucar.edu/Document/Functions/Contributed/advect_variable.shtml.
>> Any information or help regarding this issue would be greatly appreciated.
>>
>>
>>
>> Thank you!
>>
>> Jackson
>>
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at mailman.ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at mailman.ucar.edu
> List instructions, subscriber options, unsubscribe:
> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20210721/a95b65c4/attachment.html>


More information about the ncl-talk mailing list