>From: Craig Motell <address@hidden> >Organization: University of Hawaii >Keywords: 199904222333.RAA00684 McIDAS email lists Craig, >Dear Tom: The following is for your information, no need to reply! No problem. I see my mistake. >You showed me previously that I entered time incorrectly into the >parameter list to acquire satellite angles from GVAR. You also, >noted that even with the correct time we didn't get the correct >satellite angles. > >I found that your time was off a little to, but the correct form >doesn't change the satellite angles either! So this is just for future >reference. OK, thanks for alerting me. >> o xin(1) is the Julian date as you have specified >> >> o xin(2) needs to be a time in hours and fractional hours. >> The reason I say this is that the code in nvxgvar calls M0ITIME >> to convert this real number into a "packed integer" of the >> form HHMMSS. You are passing a time that is already in >> HHMMSS. You should, therefore, change your code: >> >> xin(2) = jtime >> >> to: >> >> xin(2) = jtime/10000. + MOD(jtime/100,100)/60. + >> & MOD(jtime,100)/3600. >> > >Tom, I think that the correct way to write the above expression should >be something like: > > xin(2) = int(jtime/10000) + mod(jtime/100,100)/60. + > & real(mod(jtime,100)/3600.) My mistake was the decimal point on the 10000! jtime/10000. is, of course a real number. What I should have said was jtime/10000; this is an integer. >It ends up that I don't think you can say "jtime/10000." and get >the correct answer -- at least not according to my test. Right you are. >Also, I had to add "real" type cast to "mod(jtime,100)/3600." I don't think so. Each term is evaluated individually and promoted as needed. mod(jtime,100) is an integer, but mod(time,100)/3600. gets promoted to a real. >I'm more a c programmer than fortran so the last one doesnt' make since >to me. Me either. >I thought in fortran if you say real = int/real you get real=real, Right. >but without this cast I didn't get fractional seconds correctly. This is very strange. The Fortran standard says that your first inclination was correct. >Thanks for your help. Sorry for my error. It was just one little '.', however ;-) By the way, how about them Spurs! Crushed LA. Also, I have been really enjoying the Blazers/Jazz series. Portland is for real! Also, what happened to the Knicks... they finally woke up for the playoffs. Tom
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.