Re: writing lat in the file

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Wed Feb 22 2012 - 11:44:31 MST

Without running your code, it looks to me like the loop that defines the "lat" variable never gets executed. Your do loop begins:

do j = 0, dimsizes(files)-143

Are you sure that 'dimsizes(files)-143' produces a non-negative integer?

Also if there are indeed more than a single file (that use the same coordinate grid) then it is not very efficient to read the lat and lon variables each time through the loop. You could read these from a single file prior to starting the loop.
 -dave

On Feb 22, 2012, at 11:11 AM, Alexander Semenov wrote:

> hi
>
> I have a problem with writing lat to the file. I don't know why
>
> Here's an error message:
>
>
> pacman3 2277% ncl brunt-vaisala.ncl
> Copyright (C) 1995-2011 - All Rights Reserved
> University Corporation for Atmospheric Research
> NCAR Command Language Version 6.0.0
> The use of this software is governed by a License Agreement.
> See http://www.ncl.ucar.edu/ for more details.
>
> Variable: n
> Type: float
> Total Size: 26017992 bytes
> 6504498 values
> Number of Dimensions: 4
> Coordinates:
> Number Of Attributes: 3
> units : s-1
> long_name : brunt-vaisala frequency
> _FillValue : -99999
> (0) Writing to file...
> fatal:Variable (lat) is undefined
> fatal:Execute: Error occurred at or near line 202 in file brunt-vaisala.ncl
>
> --
> regards
>
> *******************************************************
> Alexander Semenov
>
> PhD Student - Research Assistant
> International Arctic Research Center
> Department of atmospheric sciences
> University of Alaska Fairbanks
>
> 930 Koyukuk dr, 408c3
> Fairbanks, AK, USA, 99775
> work phone +19074742672
>
> <code.txt>_______________________________________________
> 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 Wed Feb 22 11:44:39 2012

This archive was generated by hypermail 2.1.8 : Thu Feb 23 2012 - 10:01:53 MST