Error 23 when spanning 31 Dec 0039 to 01 Jan 0040

Post Reply
khartig
Posts: 16
Joined: June 16th, 2020, 4:22 pm
Registered HYSPLIT User: Yes

Error 23 when spanning 31 Dec 0039 to 01 Jan 0040

Post by khartig »

I run HYSPLIT using output from the CAM component of CESM, converted into ARL-friendly format with MeteoInfo. 99% of my data files, which have output every 3 hours for up to ten days, can be read by HYSPLIT with no problem, but if I try to run the trajectory model or the Check File program on a file that spans from 31 Dec of the year 0039 to 01 Jan of the year 0040, which should be continuous, I get the following error and HYSPLIT exits with error code 23:

Code: Select all

		ERROR metset: meteorological data time interval varies. Check input meteo file.
		  Changed from          180  min to    -52595820  min
		  At day/hr            1           0
I don't get this error with the other 50 years' worth of data; for example, a file spanning 31 Dec to 01 Jan of year 0030-0031 does not give me problems, nor any other year between 0010 and 0060. Since I can't load my meteo file on HYSPLIT to look at the timestamps directly, I don't know of any way to check if the issue is with the timestamps in my meteo file or with how HYSPLIT interprets those timestamps. Any suggestions for getting a look at the timestamps on my meteo file, or ideas why HYSPLIT is having problems with the 0039-0040 rollover?
barbara.stunder
Posts: 451
Joined: November 9th, 2012, 4:23 pm
Registered HYSPLIT User: Yes

Re: Error 23 when spanning 31 Dec 0039 to 01 Jan 0040

Post by barbara.stunder »

That was a good idea to run chk_file. I'm not familiar with MeteoInfo, but is it possible you could have missed an error/warning message with the convert? Try the convert again. Also you could convert December 31 and January 1st separately, then run chk_file on each of those files to see the time invervals. (chk_file -t gives simplified output by time period).

On Linux, the date of the 1st record can be read by:
"head -c8 filename"
This gives the 1st 8 characters, YYMMDDHH, year, month, date, hour.
khartig
Posts: 16
Joined: June 16th, 2020, 4:22 pm
Registered HYSPLIT User: Yes

Re: Error 23 when spanning 31 Dec 0039 to 01 Jan 0040

Post by khartig »

I re-ran the conversion and didn't get any errors from MeteoInfo. I made two more files per your suggestion, one for 31 Dec 00:00:00 through 21:00:00 and one for 01 Jan 00:00:00 through 21:00:00 (output every 3 hours), and chk_file worked fine for each of them individually. I made another file with just two timestamps, 21:00:00 on Dec 31 and 00:00:00 on Jan 01, and that one also ran fine with chk_file (I attached the output), but if the error code is because the time difference changes then you wouldn't see that in a file with just two timestamps. The first timestamp for each of the three files from 'head' is below, but they look fine to me:

December 31 only: 39123100
Jan 01 only: 40010100
Dec at 21hrs thru Jan at 00hrs: 39123121

Any other ideas?
Attachments
chkfile_T6.txt
(24.17 KiB) Downloaded 1306 times
christopher.loughner
Posts: 81
Joined: August 15th, 2017, 3:59 pm
Registered HYSPLIT User: No

Re: Error 23 when spanning 31 Dec 0039 to 01 Jan 0040

Post by christopher.loughner »

Thanks for bringing this to our attention. HYSPLIT uses a two digit year and assumes dates between 1940-2039. We will work on a fix to this issue. In the meantime, you can trick HYSPLIT in simulating your time period by changing the dates in your ARL files using the edit_head utility program found in the exec subdirectory. You can execute ../exec/edit_head and follow the prompts to change the year or create a script to do this. An example csh script to change the year from 40 to 02 is as follows:

#!/bin/sh
cp CESM0040.ARL CESM0040_YY02.ARL
./edit_head -i << EOF
./
CESM_0040.ARL
40 -1 -1 -1 -1
02 -1 -1 -1 -1
EOF

Note that I think the CESM never simulates leap days, so you will have trouble simulating HYSPLIT on a leap day. You can use the same method above to change the year in your ARL file for leap years to non-leap years.

We recently created a converter for the CESM. It is attached. It will be a part of the next official HYSPLIT release located in the data2arl subdirectory. Within the attached zipped tarball you will find a Readme file that includes information about how to change the year in your ARL files.
Attachments
cesm2arl.tar.gz
(7.42 KiB) Downloaded 1318 times
khartig
Posts: 16
Joined: June 16th, 2020, 4:22 pm
Registered HYSPLIT User: Yes

Re: Error 23 when spanning 31 Dec 0039 to 01 Jan 0040

Post by khartig »

Thanks for the suggestions! Manual adjustment of the year sounded like it would work, but I wanted to make sure there weren't any deeper problems I was missing. And great to hear the next update will include a converter for CESM files, definitely looking forward to using that.
khartig
Posts: 16
Joined: June 16th, 2020, 4:22 pm
Registered HYSPLIT User: Yes

Re: Error 23 when spanning 31 Dec 0039 to 01 Jan 0040

Post by khartig »

cesm2arl relies on a Makefile.inc that wasn't included in the tarball and doesn't seem to come with the version of HYSPLIT that is currently available on the website. Do you have a sample Makefile.inc that I could take and modify? I'm not familiar enough with compiling Fortran to figure out which variables I need to define on my own.
Lmaoo
Posts: 1
Joined: March 10th, 2021, 1:28 am
Registered HYSPLIT User: No

Re: Error 23 when spanning 31 Dec 0039 to 01 Jan 0040

Post by Lmaoo »

Had a similar problem but it seems like the above people made a fix for it.
Post Reply

Return to “General questions on meteorological data needed for HYSPLIT”