Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

Instruction needed to install WRF v4.3.3 on Mac with M1-Max chip and version 13.0.1 Ventura

ihaseeburrehman

New member
Hi WRF Support team .
We are team of more than 3 people having Mac. We need to have WRF on these. We tried to install WRF on these machines but unable and we have been struggling for more than two weeks. Although I posted thread on forum which, unfortunately , did not help. We have following specs of Mac
  • MAC with Apple M1-Max chip
  • GCC 12.1.0
  • Xcode 14.1
  • WRF v 4.3.3
After searching and trying different solutions from internet and WRF forum, we decide to post instruction request. It will highly appreciated.

thanks
 
Hi,
I see on this post that you were able to finally get WRF to install. I'm glad to hear that. If you don't mind, and if you have time, it could be helpful for users in the future if you could list the specific steps necessary for you to get it installed.
 
Yes for sure I am happy to post steps here.
First thing first : These instructions are for Apple MacBook Pro with M1-Max 2021 and it's running Ventura 13.0.1.
I followed online tutorial for WRF installation just the difference is I have Mac M1 and bash as shell.
I have following specs
  • MAC with Apple M1-Max chip 2021 Ventura 13.0.1
  • GCC 12.1.0 from Homebrew
  • Xcode 14.1
  • WRF v 4.3.3

Background

I was new to Mac terminal and this was my first time using WRF. I struggled for almost more than two weeks (devoting more than 8 hours a day) to install WRF and WPS. After exploring tons of websites and doings dozens of experiments I was able to install WRF v 4.3.3 on Mac M1-max. Also, You need to have tricky mind to play with Mac M1 as it is bit restricted in some cases. I hope below steps will help WRF users struggling with installation on Mac M1.

Steps/Instructions/Suggestions/Tricks
  1. I use bash as shell instead of tcsh. Although WRF forum suggest to use tcsh and that's why they are using "setenv" command but in bash this command is "export". you can use shell whatever you find convenient.
  2. Apple no longer supply compiler "gcc" with it you need to have Xcode and command line tools , which you can download from internet. Now the Xcode comes with compiler called "clang" which is not useful for the installation of WRF because it does not contain <bits/stdc++.h> header and unordered Map and much more. So, you need to install Homebrew.
  3. After installation you need to have gcc from Homebrew (brew install gcc).
  4. Now most important step, you have to instruct apple that it should use gcc from Homebrew instead of apple clang. This is bit tricky. This video can help you in doing so. Please make sure that you are using the right gcc by issuing the command 'gcc --version' it should output the version of gcc from Homebrew instead of apple clang.
  5. Now install required libraries (NECDF, Jasper, Mpich, Zlib etc). I want to mention, I was not successful in building netcdf 4.1.3 library then I install NETCDF-C and NETCDF-Fortran 4.5.4. It may be because of clang compiler, but if someone try with Homebrew gcc he/she can succeed (not sure).
  6. Below are my environments which I set in BASH shell.
#For WRF
export DIR=/path_to_directory/Build_WRF/LIBRARIES
export CC=gcc
export CXX=g++
export FC=gfortran
export FCFLAGS=-m64
export F77=gfortran
export FFLAGS=-m64
export JASPERLIB=$DIR/grib2/lib
export JASPERINC=$DIR/grib2/include
export LDFLAGS=-L$DIR/grib2/lib
export CPPFLAGS=-I$DIR/grib2/include
export PATH=$DIR/netcdf/bin:$PATH
export NETCDF=$DIR/netcdf
export PATH=$DIR/mpich/bin:$PATH
export NCDIR=/path_to_directory/Build_WRF/LIBRARIES/netcdf
export LD_LIBRARY_PATH=${NCDIR}/lib:${LD_LIBRARY_PATH}
export NFDIR=/path_to_directory/Build_WRF/LIBRARIES/netcdf

# for Homebrew
echo '# Set PATH, MANPATH, etc., for Homebrew.' >> /path_to_directory/.profile
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /path_to_directory/.profile
eval "$(/opt/homebrew/bin/brew shellenv)"
Please keep in mind Homebrew directory for M1 Mac/ventura is opt/homebrew/bin.
I will also suggest you to have iTerm as terminal as it give you option to split screen as you require to run different commands simultaneously.
Please install libraries (NETCDF, Jasper, Mpich, Zlib, hdf5 etc) manually and according to WRF tutorial. In this way, you have control on them. Although you can also install these from Homebrew but having libraries in Homebrew is bit complicated and messy.
Above are the tricks only (tested on Mac M1) which I found during following WRF online tutorial.
 
Here are the few addition
  • After setting up the WPS and WRF , I tried to run WPS, I got stuck on running the geogrid.exe, it always failed. I check my namelist.wps it seems fine. Then I noticed the error which is not related to namelist.wps it is something related to netcdf because it failed to initiate. I then realise that libraries are installed using apple clang not Homebrew gcc. Although it is mentioned in WRF online tutorial that "one should build libraries using same compiler as he is going to use for WRF and WPS". So, I then reinstall all libraries using Homebrew gcc and build & compile WPS and WRF.
  • Then I struggle with jasper during executing ungrib.exe. WRF tutorial suggested jasper version 1.9 whereas for Mac minimum version was 2.1. I tried with 2.1 and 3.0.6 but it was not helpful (not sure what's the exact problem). So I did a research to install jasper 1.9 , I found a solution in which it suggest to replace "config.guess & config.sub" file from jasper library with automake of Homebrew (config.guess & config.sub).
  • Doing above steps I am able to run WPS (georgid.exe. ungrib.exe and metgrib.exe) and WRF (real.exe and WRF .exe).
    I will now learn how to analyse this output.
Successfull WRF.png
 
Yes for sure I am happy to post steps here.
First thing first : These instructions are for Apple MacBook Pro with M1-Max 2021 and it's running Ventura 13.0.1.
I followed online tutorial for WRF installation just the difference is I have Mac M1 and bash as shell.
I have following specs
  • MAC with Apple M1-Max chip 2021 Ventura 13.0.1
  • GCC 12.1.0 from Homebrew
  • Xcode 14.1
  • WRF v 4.3.3

Background

I was new to Mac terminal and this was my first time using WRF. I struggled for almost more than two weeks (devoting more than 8 hours a day) to install WRF and WPS. After exploring tons of websites and doings dozens of experiments I was able to install WRF v 4.3.3 on Mac M1-max. Also, You need to have tricky mind to play with Mac M1 as it is bit restricted in some cases. I hope below steps will help WRF users struggling with installation on Mac M1.

Steps/Instructions/Suggestions/Tricks
  1. I use bash as shell instead of tcsh. Although WRF forum suggest to use tcsh and that's why they are using "setenv" command but in bash this command is "export". you can use shell whatever you find convenient.
  2. Apple no longer supply compiler "gcc" with it you need to have Xcode and command line tools , which you can download from internet. Now the Xcode comes with compiler called "clang" which is not useful for the installation of WRF because it does not contain <bits/stdc++.h> header and unordered Map and much more. So, you need to install Homebrew.
  3. After installation you need to have gcc from Homebrew (brew install gcc).
  4. Now most important step, you have to instruct apple that it should use gcc from Homebrew instead of apple clang. This is bit tricky. This video can help you in doing so. Please make sure that you are using the right gcc by issuing the command 'gcc --version' it should output the version of gcc from Homebrew instead of apple clang.
  5. Now install required libraries (NECDF, Jasper, Mpich, Zlib etc). I want to mention, I was not successful in building netcdf 4.1.3 library then I install NETCDF-C and NETCDF-Fortran 4.5.4. It may be because of clang compiler, but if someone try with Homebrew gcc he/she can succeed (not sure).
  6. Below are my environments which I set in BASH shell.
#For WRF
export DIR=/path_to_directory/Build_WRF/LIBRARIES
export CC=gcc
export CXX=g++
export FC=gfortran
export FCFLAGS=-m64
export F77=gfortran
export FFLAGS=-m64
export JASPERLIB=$DIR/grib2/lib
export JASPERINC=$DIR/grib2/include
export LDFLAGS=-L$DIR/grib2/lib
export CPPFLAGS=-I$DIR/grib2/include
export PATH=$DIR/netcdf/bin:$PATH
export NETCDF=$DIR/netcdf
export PATH=$DIR/mpich/bin:$PATH
export NCDIR=/path_to_directory/Build_WRF/LIBRARIES/netcdf
export LD_LIBRARY_PATH=${NCDIR}/lib:${LD_LIBRARY_PATH}
export NFDIR=/path_to_directory/Build_WRF/LIBRARIES/netcdf

# for Homebrew
echo '# Set PATH, MANPATH, etc., for Homebrew.' >> /path_to_directory/.profile
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /path_to_directory/.profile
eval "$(/opt/homebrew/bin/brew shellenv)"
Please keep in mind Homebrew directory for M1 Mac/ventura is opt/homebrew/bin.
I will also suggest you to have iTerm as terminal as it give you option to split screen as you require to run different commands simultaneously.
Please install libraries (NETCDF, Jasper, Mpich, Zlib, hdf5 etc) manually and according to WRF tutorial. In this way, you have control on them. Although you can also install these from Homebrew but having libraries in Homebrew is bit complicated and messy.
Above are the tricks only (tested on Mac M1) which I found during following WRF online tutorial.
This is very helpful. I'm working on an update to the mac scripts I have for WRF installation. Thank you so much!
 
Yes for sure I am happy to post steps here.
First thing first : These instructions are for Apple MacBook Pro with M1-Max 2021 and it's running Ventura 13.0.1.
I followed online tutorial for WRF installation just the difference is I have Mac M1 and bash as shell.
I have following specs
  • MAC with Apple M1-Max chip 2021 Ventura 13.0.1
  • GCC 12.1.0 from Homebrew
  • Xcode 14.1
  • WRF v 4.3.3

Background

I was new to Mac terminal and this was my first time using WRF. I struggled for almost more than two weeks (devoting more than 8 hours a day) to install WRF and WPS. After exploring tons of websites and doings dozens of experiments I was able to install WRF v 4.3.3 on Mac M1-max. Also, You need to have tricky mind to play with Mac M1 as it is bit restricted in some cases. I hope below steps will help WRF users struggling with installation on Mac M1.

Steps/Instructions/Suggestions/Tricks
  1. I use bash as shell instead of tcsh. Although WRF forum suggest to use tcsh and that's why they are using "setenv" command but in bash this command is "export". you can use shell whatever you find convenient.
  2. Apple no longer supply compiler "gcc" with it you need to have Xcode and command line tools , which you can download from internet. Now the Xcode comes with compiler called "clang" which is not useful for the installation of WRF because it does not contain <bits/stdc++.h> header and unordered Map and much more. So, you need to install Homebrew.
  3. After installation you need to have gcc from Homebrew (brew install gcc).
  4. Now most important step, you have to instruct apple that it should use gcc from Homebrew instead of apple clang. This is bit tricky. This video can help you in doing so. Please make sure that you are using the right gcc by issuing the command 'gcc --version' it should output the version of gcc from Homebrew instead of apple clang.
  5. Now install required libraries (NECDF, Jasper, Mpich, Zlib etc). I want to mention, I was not successful in building netcdf 4.1.3 library then I install NETCDF-C and NETCDF-Fortran 4.5.4. It may be because of clang compiler, but if someone try with Homebrew gcc he/she can succeed (not sure).
  6. Below are my environments which I set in BASH shell.
#For WRF
export DIR=/path_to_directory/Build_WRF/LIBRARIES
export CC=gcc
export CXX=g++
export FC=gfortran
export FCFLAGS=-m64
export F77=gfortran
export FFLAGS=-m64
export JASPERLIB=$DIR/grib2/lib
export JASPERINC=$DIR/grib2/include
export LDFLAGS=-L$DIR/grib2/lib
export CPPFLAGS=-I$DIR/grib2/include
export PATH=$DIR/netcdf/bin:$PATH
export NETCDF=$DIR/netcdf
export PATH=$DIR/mpich/bin:$PATH
export NCDIR=/path_to_directory/Build_WRF/LIBRARIES/netcdf
export LD_LIBRARY_PATH=${NCDIR}/lib:${LD_LIBRARY_PATH}
export NFDIR=/path_to_directory/Build_WRF/LIBRARIES/netcdf

# for Homebrew
echo '# Set PATH, MANPATH, etc., for Homebrew.' >> /path_to_directory/.profile
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /path_to_directory/.profile
eval "$(/opt/homebrew/bin/brew shellenv)"
Please keep in mind Homebrew directory for M1 Mac/ventura is opt/homebrew/bin.
I will also suggest you to have iTerm as terminal as it give you option to split screen as you require to run different commands simultaneously.
Please install libraries (NETCDF, Jasper, Mpich, Zlib, hdf5 etc) manually and according to WRF tutorial. In this way, you have control on them. Although you can also install these from Homebrew but having libraries in Homebrew is bit complicated and messy.
Above are the tricks only (tested on Mac M1) which I found during following WRF online tutorial.

can you give an example of your commands for this?
echo '# Set PATH, MANPATH, etc., for Homebrew.' >> /path_to_directory/.profile
 
I am not sure if I understand your question exactly ...
this command is for setting path of homebrew in your shell so that you do not need to call home brew before executing command related to brew.
e.g. if you call brew without setting path of homebrew in your shell it will always says "no brew-command found".
 
Yes for sure I am happy to post steps here.
First thing first : These instructions are for Apple MacBook Pro with M1-Max 2021 and it's running Ventura 13.0.1.
I followed online tutorial for WRF installation just the difference is I have Mac M1 and bash as shell.
I have following specs
  • MAC with Apple M1-Max chip 2021 Ventura 13.0.1
  • GCC 12.1.0 from Homebrew
  • Xcode 14.1
  • WRF v 4.3.3

Background

I was new to Mac terminal and this was my first time using WRF. I struggled for almost more than two weeks (devoting more than 8 hours a day) to install WRF and WPS. After exploring tons of websites and doings dozens of experiments I was able to install WRF v 4.3.3 on Mac M1-max. Also, You need to have tricky mind to play with Mac M1 as it is bit restricted in some cases. I hope below steps will help WRF users struggling with installation on Mac M1.

Steps/Instructions/Suggestions/Tricks
  1. I use bash as shell instead of tcsh. Although WRF forum suggest to use tcsh and that's why they are using "setenv" command but in bash this command is "export". you can use shell whatever you find convenient.
  2. Apple no longer supply compiler "gcc" with it you need to have Xcode and command line tools , which you can download from internet. Now the Xcode comes with compiler called "clang" which is not useful for the installation of WRF because it does not contain <bits/stdc++.h> header and unordered Map and much more. So, you need to install Homebrew.
  3. After installation you need to have gcc from Homebrew (brew install gcc).
  4. Now most important step, you have to instruct apple that it should use gcc from Homebrew instead of apple clang. This is bit tricky. This video can help you in doing so. Please make sure that you are using the right gcc by issuing the command 'gcc --version' it should output the version of gcc from Homebrew instead of apple clang.
  5. Now install required libraries (NECDF, Jasper, Mpich, Zlib etc). I want to mention, I was not successful in building netcdf 4.1.3 library then I install NETCDF-C and NETCDF-Fortran 4.5.4. It may be because of clang compiler, but if someone try with Homebrew gcc he/she can succeed (not sure).
  6. Below are my environments which I set in BASH shell.
#For WRF
export DIR=/path_to_directory/Build_WRF/LIBRARIES
export CC=gcc
export CXX=g++
export FC=gfortran
export FCFLAGS=-m64
export F77=gfortran
export FFLAGS=-m64
export JASPERLIB=$DIR/grib2/lib
export JASPERINC=$DIR/grib2/include
export LDFLAGS=-L$DIR/grib2/lib
export CPPFLAGS=-I$DIR/grib2/include
export PATH=$DIR/netcdf/bin:$PATH
export NETCDF=$DIR/netcdf
export PATH=$DIR/mpich/bin:$PATH
export NCDIR=/path_to_directory/Build_WRF/LIBRARIES/netcdf
export LD_LIBRARY_PATH=${NCDIR}/lib:${LD_LIBRARY_PATH}
export NFDIR=/path_to_directory/Build_WRF/LIBRARIES/netcdf

# for Homebrew
echo '# Set PATH, MANPATH, etc., for Homebrew.' >> /path_to_directory/.profile
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /path_to_directory/.profile
eval "$(/opt/homebrew/bin/brew shellenv)"
Please keep in mind Homebrew directory for M1 Mac/ventura is opt/homebrew/bin.
I will also suggest you to have iTerm as terminal as it give you option to split screen as you require to run different commands simultaneously.
Please install libraries (NETCDF, Jasper, Mpich, Zlib, hdf5 etc) manually and according to WRF tutorial. In this way, you have control on them. Although you can also install these from Homebrew but having libraries in Homebrew is bit complicated and messy.
Above are the tricks only (tested on Mac M1) which I found during following WRF online tutorial.
Did you install KPP as well or just the base WRF chem model?
 
Glad you figured it out. if I am not wrong you were working on automatic script for installation of WRF on Mac. If that is the case, then it will be really helpful for someone who is new to Mac and wrf installation.
good luck
 
Glad you figured it out. if I am not wrong you were working on automatic script for installation of WRF on Mac. If that is the case, then it will be really helpful for someone who is new to Mac and wrf installation.
good luck
Yep got an automated script for mac for all the different flavors of WRF and their libraries.
 
Yes for sure I am happy to post steps here.
First thing first : These instructions are for Apple MacBook Pro with M1-Max 2021 and it's running Ventura 13.0.1.
I followed online tutorial for WRF installation just the difference is I have Mac M1 and bash as shell.
I have following specs
  • MAC with Apple M1-Max chip 2021 Ventura 13.0.1
  • GCC 12.1.0 from Homebrew
  • Xcode 14.1
  • WRF v 4.3.3

Background

I was new to Mac terminal and this was my first time using WRF. I struggled for almost more than two weeks (devoting more than 8 hours a day) to install WRF and WPS. After exploring tons of websites and doings dozens of experiments I was able to install WRF v 4.3.3 on Mac M1-max. Also, You need to have tricky mind to play with Mac M1 as it is bit restricted in some cases. I hope below steps will help WRF users struggling with installation on Mac M1.

Steps/Instructions/Suggestions/Tricks
  1. I use bash as shell instead of tcsh. Although WRF forum suggest to use tcsh and that's why they are using "setenv" command but in bash this command is "export". you can use shell whatever you find convenient.
  2. Apple no longer supply compiler "gcc" with it you need to have Xcode and command line tools , which you can download from internet. Now the Xcode comes with compiler called "clang" which is not useful for the installation of WRF because it does not contain <bits/stdc++.h> header and unordered Map and much more. So, you need to install Homebrew.
  3. After installation you need to have gcc from Homebrew (brew install gcc).
  4. Now most important step, you have to instruct apple that it should use gcc from Homebrew instead of apple clang. This is bit tricky. This video can help you in doing so. Please make sure that you are using the right gcc by issuing the command 'gcc --version' it should output the version of gcc from Homebrew instead of apple clang.
  5. Now install required libraries (NECDF, Jasper, Mpich, Zlib etc). I want to mention, I was not successful in building netcdf 4.1.3 library then I install NETCDF-C and NETCDF-Fortran 4.5.4. It may be because of clang compiler, but if someone try with Homebrew gcc he/she can succeed (not sure).
  6. Below are my environments which I set in BASH shell.
#For WRF
export DIR=/path_to_directory/Build_WRF/LIBRARIES
export CC=gcc
export CXX=g++
export FC=gfortran
export FCFLAGS=-m64
export F77=gfortran
export FFLAGS=-m64
export JASPERLIB=$DIR/grib2/lib
export JASPERINC=$DIR/grib2/include
export LDFLAGS=-L$DIR/grib2/lib
export CPPFLAGS=-I$DIR/grib2/include
export PATH=$DIR/netcdf/bin:$PATH
export NETCDF=$DIR/netcdf
export PATH=$DIR/mpich/bin:$PATH
export NCDIR=/path_to_directory/Build_WRF/LIBRARIES/netcdf
export LD_LIBRARY_PATH=${NCDIR}/lib:${LD_LIBRARY_PATH}
export NFDIR=/path_to_directory/Build_WRF/LIBRARIES/netcdf

# for Homebrew
echo '# Set PATH, MANPATH, etc., for Homebrew.' >> /path_to_directory/.profile
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /path_to_directory/.profile
eval "$(/opt/homebrew/bin/brew shellenv)"
Please keep in mind Homebrew directory for M1 Mac/ventura is opt/homebrew/bin.
I will also suggest you to have iTerm as terminal as it give you option to split screen as you require to run different commands simultaneously.
Please install libraries (NETCDF, Jasper, Mpich, Zlib, hdf5 etc) manually and according to WRF tutorial. In this way, you have control on them. Although you can also install these from Homebrew but having libraries in Homebrew is bit complicated and messy.
Above are the tricks only (tested on Mac M1) which I found during following WRF online tutorial.
Hi there, can I ask why you need to set env variables for Homebrew?
And how to ensure using Homebrew GCC when installing libraries?

Many many thanks
 
Last edited:
Hi there, can I ask why you need to set env variables for Homebrew?
And how to ensure using Homebrew GCC when installing libraries?

Many many thanks
MacOS uses Clang. With the latest update it is having issues installing WRF and WPS.

So we use Homebrew to install GNU so that WRF and WPS can be compiled on it.
 
MacOS uses Clang. With the latest update it is having issues installing WRF and WPS.

So we use Homebrew to install GNU so that WRF and WPS can be compiled on it.
Hi.
Thanks for the useful thread. I'm capable of compiling everything but WPS. This is the list I get:
--

Please select from among the following supported platforms.





1. Darwin Intel PGI compiler (serial)


2. Darwin Intel PGI compiler (serial_NO_GRIB2)


3. Darwin Intel PGI compiler (dmpar)


4. Darwin Intel PGI compiler (dmpar_NO_GRIB2)


5. Darwin Intel PGI compiler; optional DM -f90=pgf90 (serial)


6. Darwin Intel PGI compiler; optional DM -f90=pgf90 (serial_NO_GRIB2)


7. Darwin Intel PGI compiler; optional DM -f90=pgf90 (dmpar)


8. Darwin Intel PGI compiler; optional DM -f90=pgf90 (dmpar_NO_GRIB2)


9. Darwin Intel Intel compiler (serial)


10. Darwin Intel Intel compiler (serial_NO_GRIB2)


11. Darwin Intel Intel compiler (dmpar)


12. Darwin Intel Intel compiler (dmpar_NO_GRIB2)


13. Darwin Intel g95 compiler (serial)


14. Darwin Intel g95 compiler (serial_NO_GRIB2)


15. Darwin Intel g95 compiler (dmpar)


16. Darwin Intel g95 compiler (dmpar_NO_GRIB2)


17. Darwin Intel gfortran/gcc (serial)


18. Darwin Intel gfortran/gcc (serial_NO_GRIB2)


19. Darwin Intel gfortran/gcc (dmpar)


20. Darwin Intel gfortran/gcc (dmpar_NO_GRIB2)


21. Darwin Intel gfortran/clang (serial)


22. Darwin Intel gfortran/clang (serial_NO_GRIB2)


23. Darwin Intel gfortran/clang (dmpar)


24. Darwin Intel gfortran/clang (dmpar_NO_GRIB2)


25. Darwin PPC xlf (serial)


26. Darwin PPC xlf (serial_NO_GRIB2)


27. Darwin PPC xlf gcc3.3 SystemStubs (serial)


28. Darwin PPC xlf gcc3.3 SystemStubs (serial_NO_GRIB2)


29. Darwin PPC g95 (serial)


30. Darwin PPC g95 (serial_NO_GRIB2)


31. Darwin PPC g95 (dmpar)


32. Darwin PPC g95 (dmpar_NO_GRIB2)
--
I select option 17 (or 19), but when I try to compile I only get ungrib.exe produced. There seems to be a problem with this line in the configure.wps file:

CPP = /usr/bin/cpp -P -traditional. <======HERE

CPPFLAGS = -D_UNDERSCORE -DBYTESWAP -DIO_NETCDF -DBIT32 -DMACOS -DNO_SIGNAL

Shouldn't it use g++ (the cpp Homebrew one?). If I try to change /user/bin/cpp to g++, I get even more errors.

Any help will be appreciated.

Thanks
 
Hi.
Thanks for the useful thread. I'm capable of compiling everything but WPS. This is the list I get:
--

Please select from among the following supported platforms.





1. Darwin Intel PGI compiler (serial)


2. Darwin Intel PGI compiler (serial_NO_GRIB2)


3. Darwin Intel PGI compiler (dmpar)


4. Darwin Intel PGI compiler (dmpar_NO_GRIB2)


5. Darwin Intel PGI compiler; optional DM -f90=pgf90 (serial)


6. Darwin Intel PGI compiler; optional DM -f90=pgf90 (serial_NO_GRIB2)


7. Darwin Intel PGI compiler; optional DM -f90=pgf90 (dmpar)


8. Darwin Intel PGI compiler; optional DM -f90=pgf90 (dmpar_NO_GRIB2)


9. Darwin Intel Intel compiler (serial)


10. Darwin Intel Intel compiler (serial_NO_GRIB2)


11. Darwin Intel Intel compiler (dmpar)


12. Darwin Intel Intel compiler (dmpar_NO_GRIB2)


13. Darwin Intel g95 compiler (serial)


14. Darwin Intel g95 compiler (serial_NO_GRIB2)


15. Darwin Intel g95 compiler (dmpar)


16. Darwin Intel g95 compiler (dmpar_NO_GRIB2)


17. Darwin Intel gfortran/gcc (serial)


18. Darwin Intel gfortran/gcc (serial_NO_GRIB2)


19. Darwin Intel gfortran/gcc (dmpar)


20. Darwin Intel gfortran/gcc (dmpar_NO_GRIB2)


21. Darwin Intel gfortran/clang (serial)


22. Darwin Intel gfortran/clang (serial_NO_GRIB2)


23. Darwin Intel gfortran/clang (dmpar)


24. Darwin Intel gfortran/clang (dmpar_NO_GRIB2)


25. Darwin PPC xlf (serial)


26. Darwin PPC xlf (serial_NO_GRIB2)


27. Darwin PPC xlf gcc3.3 SystemStubs (serial)


28. Darwin PPC xlf gcc3.3 SystemStubs (serial_NO_GRIB2)


29. Darwin PPC g95 (serial)


30. Darwin PPC g95 (serial_NO_GRIB2)


31. Darwin PPC g95 (dmpar)


32. Darwin PPC g95 (dmpar_NO_GRIB2)
--
I select option 17 (or 19), but when I try to compile I only get ungrib.exe produced. There seems to be a problem with this line in the configure.wps file:

CPP = /usr/bin/cpp -P -traditional. <======HERE

CPPFLAGS = -D_UNDERSCORE -DBYTESWAP -DIO_NETCDF -DBIT32 -DMACOS -DNO_SIGNAL

Shouldn't it use g++ (the cpp Homebrew one?). If I try to change /user/bin/cpp to g++, I get even more errors.

Any help will be appreciated.

Thanks
#############################Compilers############################


#Symlink to avoid clang conflicts with compilers
#default gcc path /usr/bin/gcc
#default homebrew path /usr/local/bin

echo "Please enter password for linking GNU libraries"
echo $PASSWD | sudo -S ln -sf /usr/local/bin/gcc-1* /usr/local/bin/gcc
echo $PASSWD | sudo -S ln -sf /usr/local/bin/g++-1* /usr/local/bin/g++
echo $PASSWD | sudo -S ln -sf /usr/local/bin/gfortran-1* /usr/local/bin/gfortran

export CC=gcc
export CXX=g++
export FC=gfortran
export F77=gfortran
export CFLAGS="-fPIC -fPIE -O3 -Wno-implicit-function-declaration"

echo " "
 
Hi.
Thanks for the useful thread. I'm capable of compiling everything but WPS. This is the list I get:
--

Please select from among the following supported platforms.





1. Darwin Intel PGI compiler (serial)


2. Darwin Intel PGI compiler (serial_NO_GRIB2)


3. Darwin Intel PGI compiler (dmpar)


4. Darwin Intel PGI compiler (dmpar_NO_GRIB2)


5. Darwin Intel PGI compiler; optional DM -f90=pgf90 (serial)


6. Darwin Intel PGI compiler; optional DM -f90=pgf90 (serial_NO_GRIB2)


7. Darwin Intel PGI compiler; optional DM -f90=pgf90 (dmpar)


8. Darwin Intel PGI compiler; optional DM -f90=pgf90 (dmpar_NO_GRIB2)


9. Darwin Intel Intel compiler (serial)


10. Darwin Intel Intel compiler (serial_NO_GRIB2)


11. Darwin Intel Intel compiler (dmpar)


12. Darwin Intel Intel compiler (dmpar_NO_GRIB2)


13. Darwin Intel g95 compiler (serial)


14. Darwin Intel g95 compiler (serial_NO_GRIB2)


15. Darwin Intel g95 compiler (dmpar)


16. Darwin Intel g95 compiler (dmpar_NO_GRIB2)


17. Darwin Intel gfortran/gcc (serial)


18. Darwin Intel gfortran/gcc (serial_NO_GRIB2)


19. Darwin Intel gfortran/gcc (dmpar)


20. Darwin Intel gfortran/gcc (dmpar_NO_GRIB2)


21. Darwin Intel gfortran/clang (serial)


22. Darwin Intel gfortran/clang (serial_NO_GRIB2)


23. Darwin Intel gfortran/clang (dmpar)


24. Darwin Intel gfortran/clang (dmpar_NO_GRIB2)


25. Darwin PPC xlf (serial)


26. Darwin PPC xlf (serial_NO_GRIB2)


27. Darwin PPC xlf gcc3.3 SystemStubs (serial)


28. Darwin PPC xlf gcc3.3 SystemStubs (serial_NO_GRIB2)


29. Darwin PPC g95 (serial)


30. Darwin PPC g95 (serial_NO_GRIB2)


31. Darwin PPC g95 (dmpar)


32. Darwin PPC g95 (dmpar_NO_GRIB2)
--
I select option 17 (or 19), but when I try to compile I only get ungrib.exe produced. There seems to be a problem with this line in the configure.wps file:

CPP = /usr/bin/cpp -P -traditional. <======HERE

CPPFLAGS = -D_UNDERSCORE -DBYTESWAP -DIO_NETCDF -DBIT32 -DMACOS -DNO_SIGNAL

Shouldn't it use g++ (the cpp Homebrew one?). If I try to change /user/bin/cpp to g++, I get even more errors.

Any help will be appreciated.

Thanks
you will need to recreate and recompile the libraries with the homebrew files.
 
Thanks @Whatheway . Do you mean recompile everything, not only WRF?
I tried your GitHub script, and I get:

./WRF_Master_Script.sh
Your system is not compatibile with this script.

Interesting...
 
Update: I just recompiled WRF after creating the symlinks suggested by @Whatheway , and now the WPS compilation works like a charm. Will run some real examples to confirm that everything is working as it should. Thanks a lot, everyone.
 
Top