Transitioning from Vlab - ufs-community/ufs-weather-model GitHub Wiki

This page is focused on issues and procedures that are specific to developers who previously used the code now in ufs-weather-model when it was in the Vlab (Virtual Lab) development and collaboration environment.

About the Transition

The ufs-weather-model was moved from the Vlab gerrit NEMSfv3gfs repository to this GitHub repository on Oct 16, 2019. The development activities on the Vlab repository have been suspended since then, and all developers are expected to move their work to this GitHub repository. The Vlab gerrit git repository will keep a gold copy of the operational implementation code.

Transitioning Branches from Gerrit to GitHub

This section is for developers that would like to transition their NEMSfv3gfs/FV3 branches to GitHub.

The ufs-weather-model repository follows the forking workflow. A develop branch is used to integrate all the development work (equivalent to the master branch in VLab). Besides that only production and release branches will be maintained in the repository. All the development work will be at developers' personal forks and pull requests need to be made to commit the code changes into the authoritative ufs-weather-model repository. Therefore no personal branches in NEMSfv3gfs VLab repository have been moved to GitHub. If developers want to continue their development work and commit code to the ufs-weather-model authoritative GitHub repository, they need to transition their NEMSfv3gfs/FV3 branches to their personal fork of the ufs-weather-model/fv3atm on GitHub.

  1. Login to GitHub using a personal account (e.g.: FirstLast-NOAA). Then go to: https://github.com/ufs-community/ufs-weather-model, click on the "fork" button. If it asks for a GitHub account, choose the developer’s personal account. If an fv3 branch is associated with the NEMSfv3gfs branch, please go to: https://github.com/NOAA-EMC/fv3atm, click on the “fork” button to make a personal fork for fv3atm repository.

  2. Go to a machine that the development work is conducted on, checkout ufs-weather-model from developer’s personal account and set up git remote repository.

% git clone  https://github.com/FirstLast-NOAA/ufs-weather-model
% cd ufs-weather-model
% git remote -v
origin  https://github.com/FirstLast-NOAA/ufs-weather-model (fetch)
origin  https://github.com/FirstLast-NOAA/ufs-weather-model (push)
% git remote add upstream https://github.com/ufs-community/ufs-weather-model
% git remote -v
origin  https://github.com/FirstLast-NOAA/ufs-weather-model (fetch)
origin  https://github.com/FirstLast-NOAA/ufs-weather-model (push)
upstream        https://github.com/ufs-community/ufs-weather-model (fetch)
upstream        https://github.com/ufs-community/ufs-weather-model (push)
% git remote update
% git checkout upstream/develop
% git checkout -b ufs-weather-model_branch

Now developers have a ufs-weather-model branch created from the latest developer branch. If they have checked out their NEMSfv3gfs branch and merged it with the latest master. They can find a file list that were modified and they copy those files to their GitHub ufs-weather-model_branch.

% cd NEMSfv3gfs
% git diff master --name-only

Copy the file from the list above to the ufs-weather-model_branch.

Commit the code changes:

% cd ufs-weather-model
% git branch (should show your ufs-weather-model_branch)
% git commit -a -m”transition changes in NEMSfv3gfs branch to ufs-weather-model_branch”
% git push origin ufs-weather-model_branch

Now the ufs-weather-model_branch will be equivalent to the NEMSfv3gfs branch. If developers have an fv3 branch on the VLab gerrit repository and would like to transition it to the GitHub fv3atm branch, they need to do the same commands in fv3atm/FV3 directory.