0

I'm working with an old Fortran code to generate an atmospheric drag model using the NRLMSISE-00 model for an undergraduate research project. I have no experience with Fortran so I'm with a code in MATLAB that will run the Fortran executable file for various different input cases. However, when trying to create the executable file, I run into several errors, shown in the image below alongside the segment of code in error. I realize I probably need to redefine some of the parameters or equations in the lines of code in error but I'm unsure of how to do so.

I'm trying to build the executable file using gfortran on Cygwin on a 64-bit Windows 10 system. Any and all help would be greatly appreciated. Thanks!

Error Image

If the image doesn't work here are the error messages from Cygwin:

Charles@DESKTOP-0CKR2M1 ~
$ gfortran -std=legacy -o nrlmsise00matlabtoformain04 nrlmsise00matlabtoformain04.for nrlmsise00_sub_mlp.for
nrlmsise00_sub_mlp.for:1671:10:

   DATA NAME/'MSIS','E-00'/
      1
Error: Incompatible types in DATA statement at (1); attempted conversion of CHARACTER(1) to INTEGER(4)
nrlmsise00_sub_mlp.for:1670:40:

   DATA ISDATE/'01-F','EB-0','2   '/,ISTIME/'15:4','9:27'/
                                    1
Error: Incompatible types in DATA statement at (1); attempted conversion of CHARACTER(1) to INTEGER(4)
nrlmsise00_sub_mlp.for:1670:10:

   DATA ISDATE/'01-F','EB-0','2   '/,ISTIME/'15:4','9:27'/
      1
Error: Incompatible types in DATA statement at (1); attempted conversion of CHARACTER(1) to INTEGER(4)
nrlmsise00_sub_mlp.for:592:49:

   V2=VTST7(IYD,SEC,GLAT,GLONG,STL,F107A,F107,AP,2)
                                             1
Warning: Actual argument contains too few elements for dummy argument ‘ap’ (1/7) at (1) [-Wargument-mismatch]
chw21
  • 7,970
  • 1
  • 16
  • 31
  • 1
    What's the declared variable type of the variables `NAME`, `ISDATE`, and `ISTIME`? – chw21 Nov 17 '19 at 03:23
  • 1
    You really should show your code. See [mcve] and [ask]. The code needs to be in the question itself, not in a picture. People must be able to test it and copy and paste it to their computer. – Vladimir F Героям слава Nov 17 '19 at 10:06
  • 1
    See https://stackoverflow.com/questions/5703952/ – rtoijala Nov 17 '19 at 11:22
  • 1
    If you can lay your hands on the Intel Fortran compiler do so. It is probably the current compiler most tolerant of all the quirky historical and, often, vendor-dependent, odds and ends one finds in old Fortran codes. It's probably easier to create a MEX file with too, for tighter integration with Matlab. – High Performance Mark Nov 18 '19 at 11:33

0 Answers0