[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[IDV #RMI-290185]: Problems of grads ctl file time?



Jian,

Sorry about that. I gave you a Java 8 program instead of a Java 7 program which
is why my little test failed to run, and therefore revealed no useful diagnostic
information.

But at any rate, you were able to solve the date problem with the instructions
below. Is that true??

Are there any outstanding issues?

Best,

Unidata IDV Support

> 
> oh forget to report the first question,
> here it is:
> 
> C:\Program Files\IDV_5.1u2\jre\bin>"C:\Program Files\IDV_5.1u2\jre\bin\java" 
> LocaleTest
> Exception in thread "main" java.lang.UnsupportedClassVersionError: LocaleTest 
> :
> Unsupported major.minor version 52.0
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(Unknown Source)
> at java.security.SecureClassLoader.defineClass(Unknown Source)
> at java.net.URLClassLoader.defineClass(Unknown Source)
> at java.net.URLClassLoader.access$100(Unknown Source)
> at java.net.URLClassLoader$1.run(Unknown Source)
> at java.net.URLClassLoader$1.run(Unknown Source)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
> 
> > -----Original Messages-----
> > From: "Unidata IDV Support" <address@hidden>
> > Sent Time: 2015-05-23 00:36:09 (Saturday)
> > To: address@hidden
> > Cc: address@hidden, address@hidden, address@hidden, address@hidden
> > Subject: [IDV #RMI-290185]: Problems of grads ctl file time?
> >
> > Hello everyone,
> >
> > The fact that we are seeing differences in Linux versus Windows is an 
> > important clue.
> >
> > This *may* have something to do with the default locale of the JVM on the 
> > Windows machine.
> >
> > We occasionally see these sorts of problems especially for dates on 
> > international machines.
> >
> > I have attached a very simple Java program that may help us solve this.
> >
> > Please run this command:
> >
> > C:\Program Files\IDV_5.1u3\jre\bin\java LocaleTest
> >
> > What is the result?
> >
> > You can change the default locale on the Windows machine by editing the 
> > C:\Program Files\IDV_5.1u3\runIDV.bat script.
> >
> > At the bottom of the file, there should be something like this:
> >
> > jre\bin\java -Xmx%idv_memory%m -XX:PermSize=%idv_maxpermgensize%m 
> > -XX:MaxPermSize=%idv_maxpermgensize%m -XX:+DisableExplicitGC 
> > -Didv.enableStereo=false -jar idv.jar %*
> >
> > After is says "jre\bin\java", please add
> >
> > -Duser.country=US -Duser.language=en
> >
> > What happens?
> >
> > Best,
> >
> > Unidata IDV Support
> >
> >
> > > HI
> > >
> > > also, it show error like
> > > couldn't parse at 5
> > > couldn't parse at 2
> > > couldn't parse at 0...
> > >
> > > Seems when using GradsTimeDimension.class
> > >
> > > Line 172
> > > -------------------------------------------------------------------------------------------
> > > SimpleDateFormat sdf = new SimpleDateFormat(pattern);
> > >
> > > sdf.setTimeZone(TimeZone.getTimeZone("GMT"));
> > > ParsePosition p = new ParsePosition(0);
> > > Date d = sdf.parse(tstart, p);
> > > if (d == null)
> > > {
> > > System.out.println("couldn't parse at " + p.getErrorIndex());
> > > d = new Date(0L);
> > > }
> > > sdf.applyPattern("yyyy-MM-dd HH:mm:ss Z");
> > > setUnit("hours since " + sdf.format(d, new StringBuffer(), new 
> > > FieldPosition(0)));
> > > -------------------------------------------------------------------------------------------
> > >
> > > it cannot get tstart, so it pass 0L to d which lead to 1970-01-01-00
> > >
> > > I am not familiar with JAVA.
> > > Hope this could help you guys to get a start.
> > >
> > > I also thought it could be a unicode difference between windows and linux.
> > > but after I use tool to swich unicode of the ctl file from unix to 
> > > windows, nothing happenes.
> > >
> > > Best
> > > Jian
> > >
> > >
> > > > -----Original Messages-----
> > > > From: "Unidata IDV Support" <address@hidden>
> > > > Sent Time: 2015-05-22 01:09:07 (Friday)
> > > > To: address@hidden
> > > > Cc: address@hidden, address@hidden, address@hidden
> > > > Subject: [IDV #RMI-290185]: Problems of grads ctl file time?
> > > >
> > > > > Full Name: Dr. Jian Tang
> > > > > Email Address: address@hidden
> > > > > Organization: China Meteorological Administration
> > > > > Package Version: 5.0u2,5.1u2
> > > > > Operating System: win7 x64
> > > > > Hardware:
> > > > > Description of problem: hi there,
> > > > >
> > > > > I don't know how to comment on [IDV #RMI-290185]: Problems of grads 
> > > > > ctl file time?
> > > > > So I just make a new post... Sorry for the trouble. I sent a email to 
> > > > > idv user mail list, after second thought, probably i should not have 
> > > > > done that...
> > > > >
> > > > > we are using IDV 5.0u2 and 5.1u2 try to read GrADs binary grid files 
> > > > > through control file (CTL File).
> > > > > The Ctl looks like this and it works fine using Grads to open it.
> > > > >
> > > > > both 5.0 and 5.1 can open ctl file fine and plot fine.
> > > > > only issue remain is the time dimension
> > > > > no matter how I change the tdef line, "12z20MAY2015"
> > > > > it always show starting from 1970-01-01-08 CST in IDV
> > > > > in this case:
> > > > > 1970-01-01-08 CST
> > > > > 1970-01-01-09 CST
> > > > > 1970-01-01-10 CST...
> > > > >
> > > > > If I change "60mn" to "1dy", it will appear like
> > > > > 1970-01-01-08 CST
> > > > > 1970-01-02-08 CST
> > > > > 1970-01-03-08 CST...
> > > > >
> > > > > If I change "49", IDV will report error.
> > > > >
> > > > > Seems to me that the IDV does not get any infomation from 
> > > > > "12z20MAY2015" in the line TDEF in  CTL file.
> > > > >
> > > > > If anyone has any experience please do not hestitate to share with 
> > > > > me. Many thanks.
> > > >
> > > >
> > > > Again, there is nothing wrong with the syntax of time definition. I am 
> > > > not GrADS expert, you need to find someone to help you figure out the 
> > > > other part of this ctl file. I used the attached file from
> > > > DaiKan, and change the time definition to "12z20MAY2015", the result in 
> > > > the IDV is exactly what I expected.
> > > >
> > > > DaiKan, the attached file works correctly in the IDV 5.1u2.
> > > >
> > > > Yuan
> > > > >
> > > > > -------------------------------------------
> > > > > dset ^postvar2015052012
> > > > > options sequential big_endian
> > > > > title post output from grapes
> > > > > undef 9.999E+20
> > > > > xdef   831  linear   102.0000    0.0300
> > > > > ydef   661  linear    17.0000    0.0300
> > > > > zdef   26 levels
> > > > > 1000.000000
> > > > > 975.0000000
> > > > > ...... to save space here
> > > > > 20.00000000
> > > > > 10.00000000
> > > > > tdef   49 linear 12z20MAY2015    60mn
> > > > > vars 30
> > > > > u 26 0 u_wind
> > > > > v 26 0 v_wind
> > > > > ...... to save space here
> > > > > tslb  4 0 tslb
> > > > > mslb  4 0 mslb
> > > > > endvars
> > > > > ------------------------------------------
> > > > > please see to the attachments for more details.
> > > > >
> > > > > https://www.unidata.ucar.edu/mailing_lists/archives/idvusers/2011/msg00042.html
> > > > >
> > > > >
> > > >
> > > > Ticket Details
> > > > ===================
> > > > Ticket ID: RMI-290185
> > > > Department: Support IDV
> > > > Priority: Normal
> > > > Status: Closed
> > > >
> > >
> > >
> > > --
> > > Dr. Jian TANG
> > > Central Meteorological Office
> > > National Meteorological Center of CMA
> > >
> > > No. 46, Zhongguancun South Street, Haidian District, Beijing
> > > P. R. China, 100081
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> > Ticket Details
> > ===================
> > Ticket ID: RMI-290185
> > Department: Support IDV
> > Priority: Normal
> > Status: Open
> 
> 
> --
> Dr. Jian TANG
> Central Meteorological Office
> National Meteorological Center of CMA
> 
> No. 46, Zhongguancun South Street, Haidian District, Beijing
> P. R. China, 100081
> 
> 
> 
> 
> 
> 


Ticket Details
===================
Ticket ID: RMI-290185
Department: Support IDV
Priority: Normal
Status: Closed