[ncl-talk] Seasonal Variation of Hodogragh

Dennis Shea shea at ucar.edu
Mon Sep 29 14:11:09 MDT 2014


If you have NCL Version 6.1.1 (February 4, 2013) you could replace the


    time_index(..) = ...

          :

    delete(time_index)


==============

with the reassignment operator

   time_index(..) := ...


*New reassignment operator*

There's a new operator, ":=", that allows you to reassign variables without
having to delete them first.
For example:

   x = fspan(-10.5,20.8,0.1)    ; array of floats
;  x = "This is a string"       ; this won't work
   x *:=* "This is a string"      ; single string

 This operator works for attributes as well, but not for coordinate arrays.




On Mon, Sep 29, 2014 at 1:46 PM, Yuqiang Zhang <yuqiangzhang.thu at gmail.com>
wrote:

> Hi Amadou,
>
>
>
> Delete the variable of “timeindex” (not able to see your script, but
> should be in line 159 and 234) in the end of each loop by type
> “delete(timeindex)”. The reason you have this error message is that after
> the first loop, your data sizes of “timeindex” will be different for month
> “Feb” and “Mar”, as they have different days for a month.
>
>
>
> Hope that works.
>
>
>
> Regards,
>
> Yuqiang
>
>
>
> *From:* ncl-talk-bounces at ucar.edu [mailto:ncl-talk-bounces at ucar.edu] *On
> Behalf Of *Amadou Coulibaly
> *Sent:* Monday, September 29, 2014 2:28 PM
> *To:* ncl-talk at ucar.edu
> *Subject:* [ncl-talk] Seasonal Variation of Hodogragh
>
>
>
> Hi NCL Users
>
>
>
> I still have some errors messages after applying the modifications
> suggested by Dennis Shea. Now I'm able to read the "timeindex" after
> applying this command below:
>
>
>
>  iconv -f UTF-8 -t ascii//TRANSLIT panel_plot_mod0.ncl > test.ncl
>
>
>
> But it's till showing the following error messages:
>
>
>
> fatal:Dimension sizes of left hand side and right hand side of assignment
> do not match
>
>
>
> fatal:["Execute.c":7743]:Execute: Error occurred at or near line 5660 in
> file $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl
>
>
>
> fatal:["Execute.c":7743]:Execute: Error occurred at or near line 159 in
> file test1.ncl
>
>
>
> fatal:["Execute.c":7743]:Execute: Error occurred at or near line 234 in
> file test1.ncl
>
>
>
> Please, who can help me to solve this issue?
>
>
>
> Find attached the ncl script corresponding.
>
>
>
> NB: My idea is to plot the Hodogragh for February, March, and April
> (Seasonal Hodogragh) like asked by Dennis Shea in one of her comment below:
>
>
>
>  Based on your written words, maybe the following is what you want
>
>
>     timeindex = ind(times(:,0).eq.2010 .and. \
>                              (times(:,1) .ge. 2 .and. times(:,1).le.4)
> .and. times(:,2) .eq. 12)
>
>     print(timeindex)
>
> But this time, I just want the indices for February, March and April 2010
> like this: without 12Z
>
>
>
> timeindex = ind(times(:,0).eq.2010 .and. \
>                              (times(:,1) .ge. 2 .and. times(:,1).le.4)
>
>
>
> Best
>
>
>
> --
>
> * COULIBALY   AMADOU   *
> PhD  Student  on  West  African  Climate  System (WACS)
> FUTA - Federal  University  of  Technology of Akure, Nigeria
>
>
>
> *Visiting Student - *
> *University of Cologne, Germany**Institute of Geophysics and Meteorology*
>
> Pohligstr. 3 / Office 3.102
>
> D-50969 Köln
>
>
>
> *Project*: WASCAL (West African Science Service Centre on Climate Change
> and Adapted Land Use)
> Phone:(+234) 810 795 2836 /(+223) 65 67 27 57 /(+226) 64 57 37 27 /+49
> 15218352574
>
> E-mail: mpapin24 at gmail.com / coulibalya68 at yahoo.com
>
> "*The time is always right to do right": Nelson Mandela*
>
> *"Character is like a tree and reputation like a shadow.  The shadow is
> what we think of it; the tree is the real thing" : Abraham Lincoln*
>
> *"Do what you can, with what you have, where you are" Theodore Roosevelt*
>
>
>
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> 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/20140929/9cdfe6c0/attachment.html 


More information about the ncl-talk mailing list