loop error ??? WRF

From: Erik Noble <enoble_at_nyahnyahspammersnyahnyah>
Date: Wed, 26 Nov 2008 01:38:50 -0500

Hi. May I have some help? Why am I getting this error in this simple script?
It is not clear to me.

fatal:Loop end must be scalar, can't execute loop
fatal:Execute: Error occurred at or near line 28 in file
wrf_test_precip_to_nc.ncl

I am just trying to read in WRF accumulated rain for many timesteps.

10 squall:noble% ncl wrf_test_precip_to_nc.ncl
 Copyright (C) 1995-2007 - All Rights Reserved
 University Corporation for Atmospheric Research
 NCAR Command Language Version 5.0.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: 136 bytes
            17 values
Number of Dimensions: 1
Dimensions and sizes: [17]
Coordinates:
Number Of Attributes: 2
  description : times in file
  _FillValue : missing
(0) 2006-09-01_00:00:00
(1) 2006-09-01_03:00:00
(2) 2006-09-01_06:00:00
(3) 2006-09-01_09:00:00
(4) 2006-09-01_12:00:00
(5) 2006-09-01_15:00:00
(6) 2006-09-01_18:00:00
(7) 2006-09-01_21:00:00
(8) 2006-09-02_00:00:00
(9) 2006-09-02_03:00:00
(10) 2006-09-02_06:00:00
(11) 2006-09-02_09:00:00
(12) 2006-09-02_12:00:00
(13) 2006-09-02_15:00:00
(14) 2006-09-02_18:00:00
(15) 2006-09-02_21:00:00
(16) 2006-09-03_00:00:00

Variable: maxt
Type: integer
Total Size: 12 bytes
            3 values
Number of Dimensions: 1
Dimensions and sizes: [3]
Coordinates:
(0) 17
(1) 110
(2) 140
fatal:Loop end must be scalar, can't execute loop
fatal:Execute: Error occurred at or near line 28 in file
wrf_test_precip_to_nc.ncl
11 squall:noble% cat wrf_test_precip_to_nc.ncl
; script to produce accumualted rain from WRF real-data run,
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
begin
; The WRF ARW input file.
diri1
="/gpfs/ptmp/noble/Output-WRF/GFS_Study/SOP3_48_forecast/WRF_Output_gfs_3_20060901/"
ifile1 ="wrfout_d01_2006-09-01_00:00:00.nc"
title = "WRF-SOP3_R2_Accum_Precip_00UT-GFS"
a=addfile(diri1+ifile1,"r")
; What times and how many time steps are in the data set?
  FirstTime = True
  times = wrf_user_list_times(a) ; get times in the file
  ntimes = dimsizes(times) ; number of times in the file
; rain variables
 nc = a->RAINNC
 cc = a->RAINC
 rainfall = nc + cc ; this is rainfall summed retaining lat,lon,time
dimensions
 maxt = dimsizes(rainfall) ; result should return 3 values (time, lat,lon
lenth of dimensions)
print(maxt)
do it=0,maxt-9 ; store each time step rather than accumulate
rain = rainfall(t+8,:,:)-rainfall(t,:,:)
end do
end

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Nov 25 2008 - 23:38:50 MST

This archive was generated by hypermail 2.2.0 : Sun Nov 30 2008 - 08:25:42 MST