converting between YYYYMMDD and Julian date and back

From: Joe Grim <grim_at_nyahnyahspammersnyahnyah>
Date: Mon, 09 Mar 2009 16:00:31 -0600


Would you be able to help me with an NCL problem?

I've been trying to figure out how to read in files using NCL for 12
consecutive days. The files have the date in their name following the
YYYYMMDD format. Since I need to make sure it works crossing months and
years, I know I need to convert it into Julian days and back to the
YYYYMMDD format. I have a simplified version of my program below,
showing the steps I used. Everything works right until I get to the
loop. "new_day" counts down just like I want it to, but when I ask it
to print out the dates within the loop, I get -999 (I assume "missing")
where I expect to see the date in YYYYMMDD format. Do you know how I
can get the date to come out in YYYYMMDD format?

Thank you very much!

Joe Grim
Associate Scientist II

---code starts below---


; Loop through past 12 days of data to get 12-day composite
  jul_day=ut_inv_calendar(year,month,dy,0,0,0,"days after 2000-01-01

  print("BEGIN LOOP")
  do comp_ctr=0,num_days-1
    ; Here is where I normally read in the file using the date
(YYYYMMDD) in the title
  end do
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
Received on Mon Mar 09 2009 - 16:00:31 MDT

This archive was generated by hypermail 2.2.0 : Mon Mar 09 2009 - 21:47:10 MDT