Compilando Fortran con NETCDF en Ubuntu
Fortran es un super lenguaje y bueno... vamos directamente. Necesitaba compilar un programa
Fortran con las librerias NetCDF y me pase la tardeentera investigando. Yo no tengo mucho conocimiento con los flags, pero encontre esta respuesta en StackOverFlow
FORTRAN 77
FORTRAN 90
Fortran con las librerias NetCDF y me pase la tardeentera investigando. Yo no tengo mucho conocimiento con los flags, pero encontre esta respuesta en StackOverFlow
FORTRAN 77
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$cat test_nc.f | |
PROGRAM TEST_NC | |
IMPLICIT NONE | |
include 'netcdf.inc' | |
INTEGER ncid, nc_err | |
nc_err = nf_open('test.nc', nf_nowrite, ncid) | |
nc_err = nf_close(ncid) | |
END PROGRAM TEST_NC | |
$gfortran test_nc.f -o test_nc `nf-config --fflags --flibs` |
FORTRAN 90
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat test_nc.f90 | |
program test_nc | |
use netcdf | |
implicit none | |
integer :: ncid, nc_err | |
nc_err = nf90_open('test.nc', nf90_nowrite, ncid) | |
nc_err = nf90_close(ncid) | |
end program test_nc | |
$ gfortran test_nc.f90 -o test_nc `nf-config --fflags --flibs` |
Comentarios
Publicar un comentario