Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

conversion between ieeer8 and netcdf

Hello,    Can  Anyone kindly give me some advices about how to read ieeer8 formatted data with fortran or view it directly with some graphic software ?  Any subroutines or tools available to help completing the conversion between ieeer8 and netcdf ?
 
Hello.You can open a ieeer8 file with this piece of matlab code: clear all; fid = fopen('ts_PHC2_jan_ic_gx3v7_20100107.ieeer8');TS = fread(fid,'double'); %% read temperature and salinity from this file
fclose(fid); %%% Temperature variable is 100x116x60
%%% Salinity variable is also 100x116x60
 TS=swapbytes(TS);
TS1=reshape(TS,[100,116,120]); Temp = TS1(:,:,1:60);Salt = TS1(:,:,61:120);
imagesc(Temp(:,:,1))  %shows temperature on first level
imagesc(Salt(:,:,1)) %shows salinity on the first level

That's it. I do not know yet how to transform ieeer8 directly to netcdf, but I'll try to do it soon. Neither how to transform the data into a regular grid. If someone could help, it will be very appreciated!

 
Top