[ncl-talk] Number of dimensions in parameter (1) of (gsn_csm_vector_scalar_map) is (1), (2) dimensions were expected

reza tisa rezatisa1 at gmail.com
Sat Jan 4 19:13:22 MST 2020


Hello NCL User,
I am trying to plot mjoclivar_16 (
https://www.ncl.ucar.edu/Applications/Scripts/mjoclivar_16.ncl) with
amplitude equal to 0.5.
*I change from this :*
....
     if (nSeason.eq.1) then
         nt = ind((mjo_indx.gt.1.0   .and.                \
                 (imon.ge.5          .and. imon.le.10).and.    \
                  ang.ge.angBnd(0,n) .and. ang.lt.angBnd(1,n))
     else
         nt = ind(mjo_indx.gt.1.0    .and.                     \
                 (imon.ge.11         .or.  imon.le. 4).and.    \
                  ang.ge.angBnd(0,n) .and. ang.lt.angBnd(1,n))
     end if
........

*To this :*
.....
line 228 (on myscript)
     if (nSeason.eq.1) then
         nt = ind((mjo_indx.gt.0.49  .and.  mjo_indx.lt.0.51)   .and.
         \
                 (imon.ge.5          .and. imon.le.10).and.    \
                  ang.ge.angBnd(0,n) .and. ang.lt.angBnd(1,n))
     else
         nt = ind((mjo_indx.gt.0.49    .and.  mjo_indx.lt.0.51)   .and.   \
                 (imon.ge.11         .or.  imon.le. 4).and.    \
                  ang.ge.angBnd(0,n) .and. ang.lt.angBnd(1,n))
     end if
.......


*Then, i got this error*

fatal:Number of dimensions in parameter (1) of (gsn_csm_vector_scalar_map)
is (1), (2) dimensions were expected
fatal:["Execute.c":8635]:Execute: Error occurred at or near line 245
......
ncl 240>          if (n.eq.(nPhase-1)) then           ;
ncl 241>              res at tmXBLabelsOn     = True     ; draw lon labels
ncl 242>              res at tmXBOn           = True     ;          tickmarks
ncl 243>          end if
ncl 244> printVarSummary(na)
*ncl 245>          plot(na) =
gsn_csm_vector_scalar_map(wks,uAvg,vAvg,xAvg,res)*
ncl 246>      end if
ncl 247>      delete(nt)                  ; will change next iteration
ncl 248>   end do
.......

*This is my printVarSummary:*
*Variable: mjo_indx*
Type: float
Total Size: 3744 bytes
            936 values
Number of Dimensions: 1
Dimensions and sizes: [time | 936]
Coordinates:
            time: [1890960..1913400]
Number Of Attributes: 3
  info : (PC1^2 + PC2^2)
  long_name : MJO PC INDEX
  _FillValue : 32766

*Variable: na*
Type: integer
Total Size: 4 bytes
            1 values
Number of Dimensions: 1
Dimensions and sizes: [1]
Coordinates:

Any solution for this?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200105/76ec5e2c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MJO_PC_INDEX.nc
Type: application/x-netcdf
Size: 19520 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200105/76ec5e2c/attachment.nc>


More information about the ncl-talk mailing list