![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Oct 2005
Posts: 1
Rep Power: 0
![]() |
Problem with porting of Linux code to Windows, FORTRAN/C.
Hello,
There is a Linux console tool (written in FORTRAN/C) which I want to port under Windows. It can be started with one parameter: $gribprint gfs1.grib Example output on the console: -------------------------------------------------- rec GRIB Lvl Lvl Lvl Time Fcst Num Code Code one two hour -------------------------------------------------- 1 11 1 0 0 2005-10-11_00:00 +00 I have success with the compilation of the program under Windows. If I run it without argument it works fine and displays a help message. But if I run it with an argument (gfs1.grib) it starts to read the file and then it gives error message (it says that error log is created but I can't find it, W2K). The file is ok. I'm wondering where is the problem and I guess that it's in the file: /regrid/pregrid/util/cio.c where are the I/O (read & write) functions. Here are the original sources for UNIX/Linux: ftp://ftp.ucar.edu/mesouser/MM5V3/REGRID.TAR.gz Thanks for any ideas! Best Regards, Angel |
|
|
|
|
|
#2 |
|
Programming Guru
![]() Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,223
Rep Power: 5
![]() |
On a quick look at the code, it appears your Fortran functions are doing unformatted I/O. The problem with that is that the structure files created using unformatted I/O are (Fortran) compiler dependent. The cio.c file is also doing binary I/O, and the mapping of data read from such a file into actual data structures (in C) is also compiler dependent.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|