Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to install WRF and WPS on Apple ARM64 system #1

Open
sunt05 opened this issue Nov 18, 2023 · 2 comments
Open

how to install WRF and WPS on Apple ARM64 system #1

sunt05 opened this issue Nov 18, 2023 · 2 comments
Assignees

Comments

@sunt05
Copy link
Owner

sunt05 commented Nov 18, 2023

My major development platform is vscode on an Apple M1 Max - so it would be good for me to be able to run WRF and WPS locally on my laptop for more rapid testing.

The existing guideline (as of 18 Nov 2023) is less straightforward.
As such, here I document the steps to install WRF 4.5 on my laptop, which hopefully will also be useful to our further development ofWRF-SUEWS.

@sunt05
Copy link
Owner Author

sunt05 commented Nov 18, 2023

WRF

Codebase

https://github.com/sunt05/WRF/tree/release-v4.5.2

Dependencies

I utilise a more recent GCC and homebrew-ed NetCDF libraries:

brew install [email protected] netcdf-c netcdf-fortran

Next, set the NETCDF environment variable:

export NETCDF=/opt/homebrew/

Compilation

The compilation process is rather straightforward: simply select either serial or sm for the gfortran+gcc toolchain - both options are functional.

Note

For earlier versions of WRF - tested WRF v4.0 for WRF-SUEWS - the issue lies in the old code convention that is not working well with the default gfortran flags; one needs to modify this line in configure.wrf to:

FCBASEOPTS      =       $(FCBASEOPTS_NO_G) $(FCDEBUG) -fallow-invalid-boz -fallow-argument-mismatch

@sunt05
Copy link
Owner Author

sunt05 commented Nov 18, 2023

WPS

Codebase

https://github.com/wrf-model/WPS/tree/release-v4.5

Dependencies

This part proved a bit tricky - I initially thought it would be similar to the homebrew method, but that wasn't the case.

To resolve dependency issues, follow these steps:

Compilation

Once I've sorted out the above dependencies, compilation is straightforward.

@sunt05 sunt05 self-assigned this Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant