Re: reading binary

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Thu Sep 13 2012 - 06:28:46 MDT

Also, you can read in one step

rain
=fbindirread("/river/alim/forecast_verification/data/multi_sensor/4km/ml_WRF_080517_00z_24hr_resample",0,
(/624,357/) , "float")

On 9/12/12 11:21 PM, Andrew Mai wrote:
> On 09/12/2012 10:03 PM, Agnes Lim wrote:
>
>> I had a binary file generated using FORTRAN that contains
>> an array 357 by 624.
>> I had used NCL to read it with the following code, but
>> still a bit confuse whether I had place the dimension
>> order correctly as the order that is in the binary file.
>>
>>
>> The NCL code is as follows:
>> temp=fbindirread("/river/alim/forecast_verification/data/multi_sensor/4km/ml_WRF_080517_00z_24hr_resample",
>> 0, -1, "float")
>> rain = onedtond(temp,(/357,624/))
>
> If the array were dimensioned (357,624) in the Fortran program, you
> would need (/624,357/) here in your NCL program. The order of the
> dimensions (but NOT the order of the data in memory!) is opposite
> between Fortran and NCL.
>
> Andy
>
>
> _______________________________________________
> 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 Thu Sep 13 06:29:05 2012

This archive was generated by hypermail 2.1.8 : Thu Sep 13 2012 - 14:22:31 MDT