Wind profile program
Compile the wind profile program
Requirements
The requirements for compile the wind profile program are:
- a FORTRAN 90 compiler - the code is written in FORTRAN 90.
- the netCDF module and library. The MERRA re-analysis data is stored in netCDF and there's the options to output data in netCDF.
The netCDF package
If you using a computer system used by others, there's a good chance you'll already have the netCDF packages installed already. On Unix, you can try typing `which ncdump' and if this is present it's likely to be in <netcdf_directory>/bin, where <netcdf_directory> is the core directory for the netCDF installation. The include files and the libraries are likely to be in <netcdf_directory>/include and <netcdf_directory>/lib.
If you are using a Windows operation system, I'd recommend installing Cygwin which can come with netCDF, instructions for doing this can be found on the Cygwin installation page. It should be possible to run on Windows without Cygwin, but I'm not familiar with Windows, information can be found at the Unidata website.
The netCDF package can be downloaded from the Unidata website. To install on a unix system you generally just need to uncompress and untar, move into the main directory and type the following:
./configure --prefix=<netcdf_directory> make make installwhere <netcdf_directory> is the directory you want the netCDF package installing.
Compilation
To compile on a Unix system, a command like the following needs to be performed from the directory with the code:
f90 InputVariables.F90 WindVariables.F90 ReadInput.F90 DetermineDates.F90 ReadWindData.F90 WriteCsv.F90 WriteNetcdf.F90 DetermineWind.F90 -o DetermineWind -I<netcdf_directory>/include -L<netcdf_directory>/lib -lnetcdfwhere this should all be on one line and <netcdf_directory> should contain the main directory containing the netCDF files.
I am not familiar with compiling code on Microsoft Windows, but they will require the compiler flag -Dwindows adding to the arguments above. On Unix systems directories/folders are separated by a forward slash, but Microsoft Windows uses a backward slash. Using -Dwindows will ensure that when opening or creating files that the backward slash is used instead of the forward slash.
If the command above has created the executable DetermineWind or maybe DetermineWind.exe (on Windows), your compilation has been successful.