Quick Start Guide to GSMWAM IPE - NOAA-SWPC/GSMWAM-IPE GitHub Wiki
git clone --recursive https://github.com/NOAA-SWPC/GSMWAM-IPE.git
git clone -b my_feature --recursive https://github.com/NOAA-SWPC/GSMWAM-IPE.git
cd GSMWAM-IPE/NEMS
gmake -j app=coupledWAM_IPE build
gmake -j app=coupledWAM_IPE_SWIO build
gmake -j app=standaloneWAM build
For instructions on how to build standalone IPE please see the IPE Quick Start Guide.
gmake -j app=standaloneIPE clean
gmake -j app=standaloneIPE distclean
You may also clean/distclean individual components by adding the _<COMPONENT> suffix to the Makefile target.
For instance, to distclean WAM before rebuilding GSMWAM-IPE, you may type:
gmake -j app=coupledWAM_IPE distclean_WAM
Submodules are Git repositories nested inside (or linked to) a parent repository at a given commit (SHA).
When switching to a different GSMWAM-IPE branch with git checkout make sure to update all included submodules. For example:
cd GSMWAM-IPE
git checkout my_feature
git submodule update --recursive
Note that when cloning a repository that includes submodules, or checking out a given branch/revision, Git checks out each submodule in a 'detached HEAD' state. This is because a submodule points to a commit (not a branch), and such commit may belong to multiple branches. If you commit changes within a submodule in a 'detached HEAD' state and try to push them to the remote repository, you will get the following error message:
fatal: You are not currently on a branch.
To push the history leading to the current (detached HEAD)
state now, use
git push origin HEAD:<name-of-remote-branch>
Therefore, make sure to check the submodule's status using git status before starting to work in a submodule. If the submodule is in a 'detached HEAD' state, Git will output a message like the one reported below:
$ git status
* (HEAD detached at 4cc1840)
You should then checkout your corresponding work branch before proceeding. To find out which branch a given commit belongs to, you may use the following command:
git branch -a --contains 4cc1840
which returns a list of all branches containing the commit:
* (HEAD detached from 4cc1840)
master
remotes/origin/HEAD -> origin/master
remotes/origin/develop
remotes/origin/master
remotes/origin/netcdf_output
If you accidentally added a number of commits to your submodule repository before realizing it was in 'detached HEAD' state, you may either:
- create a temporary branch (e.g.
temp), then checkout your feature branch and merge the temporary branch into it:
git checkout -b temp (your commits are now saved in branch 'temp')
git checkout my_feature (checkout your proper work branch)
git merge temp (merge your commits into your work branch)
git branch -d temp (delete the temporary branch)
- or use
git cherry-pickto individually select those commits (e.g.17de781) you want to transfer to your feature branch (e.g.my_feature)
git log (list your latest commits)
git checkout my_feature
git cherry-pick 17de781 (add commit 17de781 to your work branch)
GSMWAM-IPE and its components can be built in debug mode by adding the following component-specific settings to the *.appBuilder files for NEMS, IPE, and WAM, respectively.
NEMS_BUILDOPT=DEBUG=Y
IPE_MAKEOPT=DEBUG=Y
WAM_MAKEOPT=DEBUG=Y
For instance, to build the coupled WAM-IPE system in debug mode, the coupledWAM_IPE.appBuilder file should look as follows:
# Coupled WAM-IPE
#
## NEMS Application Builder file
COMPONENTS=( WAM IPE )
NEMS_BUILDOPT=DEBUG=Y
IPE_MAKEOPT=DEBUG=Y
WAM_MAKEOPT=DEBUG=Y
The current WAM-IPE scripts can be used to run GSMWAM-IPE coupled and standalone WAM or IPE.
These scripts have been ported to GSMWAM-IPE branch wam-ipe_scripts, in the GSMWAM-IPE/scripts subdirectory.
NOTE: The SWPC mediator only supports ESMF coupling fields whose data is distributed over one Decomposition Element (DE) on the local Persistent Execution Thread (PET). This means that data associated with each imported and exported field should be distributed over the mediator's MPI tasks in a 1:1 fashion. This is ensured by setting NPROCMED at least equal to the maximum between NPROCIPE and NPROCWAM in your compset script before running a coupled simulation.