[ncl-talk] Issues With EP Flux Calculation

Dennis Shea shea at ucar.edu
Thu Dec 8 18:59:17 MST 2016


You are correct, there are issues for the ERA_Interim data. Another user
had issues with the JRA data set. Even though the original code was written
by a NOAA person,  I see no reason why the function should only work with
NCEP reanalysis data.

I cleaned up your code and used an updated 'epflux' function. Nothing
substantive was changed BUT I enabled much more printing. This enabled me
to do a 'side-by-side' with the NCEP results. Basically, all the variables
look somewhat consistent *except* the

Vertical divergence : min=-252582   max=249489

which was *MUCH* larger than the NCEP values.

That is the current status.



On Wed, Dec 7, 2016 at 7:24 AM, Rick Brownrigg <brownrig at ucar.edu> wrote:

> Hi Josh,
>
> I've not had a chance to look at your script, but that "Assignment type
> mismatch..." error message always means one thing:  the variable on the
> lefthand side (lhs) has been defined elsewhere prior to the assignment, and
> it has a certain type, shape, and dimensions. The righthand side variable
> or expression must match in all regards -- type, shape, dimension. In your
> case, it doesn't.
>
> If you simply want to reuse a variable name on the lhs, you can use the
> reassignment operator ":=", which is an explicit indication by you the
> programmer that you don't care that the lhs gets stomped on; eg.:
>
>      foo = (/ 1, 2, 3, 4 /)
>      foo = "A string, not an 1D integer array"     ; assignment YIELDS AN
> ERROR, not same type, shape, or dimension
>      foo := "A string, not an 1D integer array"    ; RE-assignment is OK.
>
> If simple reuse is not what you want, try putting in some print statements
> to make sure you know what lhs and rhs are/should-be.
>
> Hope that helps...
> Rick
>
> On Tue, Dec 6, 2016 at 1:13 PM, Joshua Walston <joshwalston at gmail.com>
> wrote:
>
>> Hi NCL Users,
>>
>> I am attempting to use the Eliassen-Palm flux function via the
>> ncl_contributed functions for the upcoming ncl_6.4 version. There seems to
>> be an error in my calculations as the output figures seem odd. My script is
>> running fine with no warnings, however the divergence and flux vectors seem
>> incorrect. Can anyone see what I am doing wrong?
>>
>> Additionally, I have a 6 hourly data set that I would like to calculate
>> the flux for (i.e. would prefer to not have a time average). Is it possible
>> to loop through the data and get a return value of type "list" for each
>> time, so I can plot the flux at each 6 hour time step. If so, how? When I
>> attempt I receive a warning that states:
>>
>> "fatal:Assignment type mismatch, right hand side can't be coerced to type
>> of left hand side"
>>
>> I have placed 3 figures (00z, 06z and the average over all times), my
>> script, and the data (ERA40 Interim) here:
>>
>> <http://goog_1241068196>
>> ftp://pubfiles.dri.edu/pub/jwalston/
>>
>> Thank you in advance for your help,
>> Josh
>>
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
> _______________________________________________
> 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/20161208/1840a770/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: epflux.ncl_640
Type: application/octet-stream
Size: 11710 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20161208/1840a770/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ERA_EPflux_analysis.ncl
Type: text/x-ncl
Size: 13146 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20161208/1840a770/attachment.bin 


More information about the ncl-talk mailing list