Re: ncl_

From: Ping Huang <ph0007_at_nyahnyahspammersnyahnyah>
Date: Mon Oct 17 2011 - 06:20:25 MDT

The warning has shown the loop variable must be a scalar, but not a vector.
In your codes, however, the loop variable of first level loop, l, has been evaluated as a vector in advance, l = z(:, 0).
You should use another variable name.

在 2011-10-17,下午8:01, cnl88 写道:

> <截图1.png>
> the line 68 is end do
> the script is below
> I am not sure whether the red part of the script is true! hope for your help
>
>
> ;************************************************
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> load "/usr/local/ncl/lib/ncarg/nclscripts/wrf/WRF_contributed.ncl"
> load "/usr/local/ncl/lib/ncarg/nclscripts/csm/contributed.ncl"
> ;************************************************
> begin
>
> z= asciiread("./site-i-j.txt",(/6336,3/),"float")
> I = z(:,0) ;
> i = z(:,1);
> j = z(:,2);
> do I =1,6336
> i(I)=z(I,1);
> j(I)=z(I,1);
> m=j(I)
> n=i(I)
> do ntime = 1,29
> ifile = ntime
> mtime =ntime+10
> fn = "/storage/sdc1/nlcheng/cmaq/site/METCRO2D/04/"+ifile+".nc";
> a = addfile(fn,"r")
>
> fon = "201104-"+ ntime+"-"+I+"-"+n+"-"+m
>
> PBL = a->PBL(:,0,m,n)
> TEMP2= a->TEMP2(:,0,m,n)
>
> WSPD10 = a->WSPD10(:,0,m,n)
> WDIR10=a->WDIR10(:,0,m,n)
> print(PBL)
> I = 25 ; number of elements per variable
> K = 4 ; number of variables (1D arrays)
>
> p = new ( (/I,K/), typeof(PBL) )
> p(:,0) = (/ PBL /)
> p(:,1) = (/ TEMP2 /)
> p(:,2) = (/ WSPD10 /)
> p(:,3) = (/ WDIR10 /)
> fmtx = "4f11.5"
> opt = True
> opt@row = True
> opt@title = "T(世界时), PBL(m) ,TEMP2(K), WSPD10(m/s) ,WDIR10(DEGREES)"
>
> opt@fout = fon
> write_matrix (p,fmtx, opt)
>
> end do
> end do
> end
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Oct 17 06:19:48 2011

This archive was generated by hypermail 2.1.8 : Tue Oct 18 2011 - 09:42:15 MDT