Skip to content

Commit

Permalink
fix: add COSIPY_DIR environment variable for COSIPY configuration hook
Browse files Browse the repository at this point in the history
  • Loading branch information
gampnico committed Nov 29, 2024
1 parent a7b6bfc commit 98e0618
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 11 deletions.
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,20 @@ module load perl/5.36 perl-path-tiny perl-time-piece
bash patch_wrfxcspy.sh --install-all -i ./foo/bar/
```

2. Install WRF's dependencies and edit ``build_wrf.sh`` to point to the right paths for COSIPY_API, NETCDF, HDF5, and DIR. Make sure WRF's dependencies are correctly installed.
2. Install WRF's dependencies and edit ``build_wrf.sh`` or ``build_wrf_full.sh`` to point to the right paths for COSIPY_API, COSIPY_DIR, NETCDF, HDF5, and DIR. Alternatively, you can load your own build file, and export COSIPY_API and COSIPY_DIR to your LD_LIBRARY_PATH.

3. Load environment variables, configure and patch WRF:
3. Load environment variables:
```console
bash patch_wrfxcspy -e -c -p -i ./foo/bar/WRF/
bash patch_wrfxcspy -e
source build_wrf.sh # if the previous command fails
```

Depending on your system and access permissions, you may need to run ``build_wrf.sh`` separately.
4. Configure and patch WRF:
```console
bash patch_wrfxcspy -c -p -i ./foo/bar/WRF/
```

4. Build WRF: ``./compile em_real >& log.compile``
5. Build WRF: ``./compile em_real >& log.compile``

**Arguments:**

Expand Down
14 changes: 9 additions & 5 deletions src/patch_wrfxcspy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,20 @@ module load perl/5.36 perl-path-tiny perl-time-piece
bash patch_wrfxcspy.sh --install-all -i ./foo/bar/
```

2. Install WRF's dependencies and edit ``build_wrf.sh`` to point to the right paths for COSIPY_API, NETCDF, HDF5, and DIR. Make sure WRF's dependencies are correctly installed.
2. Install WRF's dependencies and edit ``build_wrf.sh`` or ``build_wrf_full.sh`` to point to the right paths for COSIPY_API, COSIPY_DIR, NETCDF, HDF5, and DIR. Alternatively, you can load your own build file, and export COSIPY_API and COSIPY_DIR to your LD_LIBRARY_PATH.

3. Load environment variables, configure and patch WRF:
3. Load environment variables:
```console
bash patch_wrfxcspy -e -c -p -i ./foo/bar/WRF/
bash patch_wrfxcspy -e
source build_wrf.sh # if the previous command fails
```

Depending on your system and access permissions, you may need to run ``build_wrf.sh`` separately.
4. Configure and patch WRF:
```console
bash patch_wrfxcspy -c -p -i ./foo/bar/WRF/
```

4. Build WRF: ``./compile em_real >& log.compile``
5. Build WRF: ``./compile em_real >& log.compile``

**Arguments:**

Expand Down
3 changes: 2 additions & 1 deletion src/patch_wrfxcspy/build_wrf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ module load user-spack
module load time

# Coupler
export COSIPY_API="${USER_PATH}/WRF/COUPLER"
export COSIPY_API="${USER_PATH}/path/to/WRF/COUPLER"
export COSIPY_DIR="${USER_PATH}/path/to/WRF/cosipy"
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${COSIPY_API}
export LIBRARY_PATH=${LIBRARY_PATH}:${COSIPY_API}
export PATH=${PATH}:${COSIPY_API}
Expand Down

0 comments on commit 98e0618

Please sign in to comment.