Re: Fatal error when looping through data

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Mon Sep 10 2012 - 16:59:51 MDT

Hi Derek,
I have been able to duplicate your problem. We will have it corrected for the 6.1.0 release.
 -dave

On Sep 7, 2012, at 6:23 PM, Derek Mallia wrote:

> Hello,
>
> I am in the process of writing a script that will loop through Carbon Tracker CO2 flux data over the course of a year which are in daily files in 3 dimensions which include latitude, longitude and time (every three hours). What I want the script to do is sum up the carbon flux data to a variable that I have designated as co2 sum as it reads through each file (and each 3 hours). Before summing the CO2 flux data, I convert it from moles to micro moles, and multiply it by 10800s to get the total co2 flux for 3 hours. To loop through the files, I use NCL's yyyymmdd_time function which I have set to a time array. I then use do loops to go through the array and pull the time that the loop is working on and incorporate that time stamp into my file name variable.
>
>
> When I run this script, it works great until it reaches September 4th 2007 where I get the following error:
>
> fatal:Requested file format is not supported, could not open (CT2011.flux1x1.20070905.nc)
>
>
> Of course, my initial reaction was that the file was either corrupt or it changed file formats mid-way through the year. So I ran the script so that it would skip this specific day. Instead of getting a fatal error on the 4th, I got it on the 5th instead.
>
> I did a ncl_file dump on both of these files, and they seemed ok. I then tried reading in a variable through interactive mode and it was fine (from the 2 data files in question). From this I concluded that file was fine if I could read in a variable with the same lines of code that I used within my script.
>
> I tried running my script backwards just for kicks, changing the following lines of code:
>
> d = d + 1 to d = d - 1
>
> and d was set at 364 instead of 0. Oddly enough the script ran from December 31 until April 30th where is finally balked. Oddly enough it ran through September 4th just fine when I ran it backwards...
>
> This verified to me that corrupt files along with files changing formats are not the issues. Considering that the script stops roughly 240 days in when ran from opposite end of 2007, I started wondering if I was having a memory issue (I am not really a computer guru so this could be a bad guess! ). I tried subscripting the data to focus on the US to see if this would fix anything and that didn't work as well.
>
>
> Attached to this email is the script I am using, and I also added the files to the following address (its about 1 gb of uncompressed data):
>
> http://home.chpc.utah.edu/~u0703457/ncl/
>
>
>
> I am using the following OS and NCL version:
>
> Mac OS 10.7.4 using:
>
> NCAR Command Language Version 6.1.0-beta
>
>
>
> Anyways, I am not sure what the issue could be, thus wondering if you guys had any ideas? In terms of the map making portion, that section works fine when I set the loop to end before September 4th 2007. So just ignore everything after the following comment "map making time".
>
> Thanks!
>
>
>
> Derek Mallia
> Graduate Student
> University of Utah
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> <carbon_tracker_totalyear.ncl>_______________________________________________
> 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 Sep 10 17:00:01 2012

This archive was generated by hypermail 2.1.8 : Tue Sep 11 2012 - 15:30:41 MDT