Skip to content
Merged
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@
*.exe
*.o
*.mod
*.a
configure.wrf*
*.backup
*.f90
17 changes: 17 additions & 0 deletions external/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# This is the top-level .gitignore file for the "external" directory for the #
# WRF Model #
# #
# Filenames and wildcards added below will not be tracked by git anywhere in #
# this directory or any of its subdirectories. Note that these rules will be #
# supplemented by rules in the top-level .gitignore file #
# #
# Ignored file types should include executables, build-time temporary files, #
# and other files which should not ever be added to the code repository. #
# #
# USE CAUTION WHEN ADDING WILDCARDS, as some builds use different filename #
# conventions than others #
##############################################################################
*.f

# Exceptions to top-level .gitignore: many external/ source code files use .f90 extension
!*.f90
14 changes: 14 additions & 0 deletions inc/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# This is the top-level .gitignore file for the "inc" directory for the WRF #
# Model #
# #
# Filenames and wildcards added below will not be tracked by git anywhere in #
# this directory or any of its subdirectories. Note that these rules will be #
# supplemented by rules in the top-level .gitignore file #
# #
# Ignored file types should include executables, build-time temporary files, #
# and other files which should not ever be added to the code repository. #
# #
# USE CAUTION WHEN ADDING WILDCARDS, as some builds use different filename #
# conventions than others #
##############################################################################
*.inc
27 changes: 27 additions & 0 deletions test/em_real/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This is the top-level .gitignore file for the "test/em_real" directory #
# #
# Filenames and wildcards added below will not be tracked by git in this #
# directory. Note that these rules will be supplemented by rules in the #
# top-level .gitignore file #
# #
# The ignored files in this directory should include the files that are #
# linked in by the Makefile from the "run" directory at compile time. Thus, #
# this file may require ongoing maintenance as new capabilities are added. #
# #
# USE CAUTION WHEN ADDING WILDCARDS THAT YOU DO NOT IMPACT VERSIONED FILES #
##############################################################################
CAM*
CCN_ACTIVATE.BIN
CLM*
ETAMPNEW_DATA*
*.TBL
*DATA
aerosol*
*s_0_03_0_9
*.asc
grib2map.tbl
gribmap.txt
ozone*formatted
tr49t67
tr49t85
tr67t85
13 changes: 9 additions & 4 deletions tools/update_fork.pl
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@
my $username;
my $go_on = "";

# First off: check if we are on master, and quit if we are not. We want the branch switch to be transparent to users
my $curr_branch = `git rev-parse --abbrev-ref HEAD`;
chomp $curr_branch;
die "\nERROR ERROR ERROR:\nYou are currently on the branch $curr_branch\n\nThis script must be run from the master branch.\n\nCheck out the master branch, then run this script, then check out your working branch $curr_branch when the update is finished\n\n" unless $curr_branch eq "master";


# Prompt user for their username
print "Please enter your Github username:\n";
while ($go_on eq "") {
Expand All @@ -56,10 +62,9 @@
! system("git", "remote", "set-url", "--push", "upstream", $fork) or die "Can not add set push repository '$fork': $!\n";

# Checkout master, fetch "upstream" commits, and perform a fastforward merge
print "\nStep 3: Checking out master, fetching 'upstream' commits, and performing fastforward merge\n\n";
! system("git", "checkout", "master") or die "Can not checkout master: $!\nWhat on earth did you do??\n";
! system("git", "fetch", "upstream", "master") or die "Can not fetch upstream changes from : $!\nWhat on earth did you do??\n";
! system("git", "merge", "--no-commit", "upstream/master") or die "\nCan not perform fastforward merge from upstream/master: $!\n\nTroubleshooting info:\n\n 1. If you receive a message 'fatal: 'upstream/master' does not point to a commit', your git version may be too old. On yellowstone, try `module load git`\n 2. If you receive a different message, there may be intervening changes; if this is expected, issue the command 'git merge upstream/master'\n";
print "\nStep 3: Fetching 'upstream' commits, and performing fastforward merge\n\n";
! system("git", "fetch", "upstream", "master") or die "Can not fetch upstream changes from : $!\nSomething has gone seriously wrong! Perhaps you don't have internet access?\n";
! system("git", "merge", "--ff-only", "upstream/master") or die "\nCan not perform fastforward merge from upstream/master: $!\n\nTroubleshooting info:\n\n 1. If you receive a message 'fatal: 'upstream/master' does not point to a commit', your git version may be too old. On yellowstone, try `module load git`\n 2. If you receive a message' fatal: Not possible to fast-forward, aborting.', you have likely made local changes to the master branch of your fork. All work should be done on branches of your fork, not the master!\n";

# Finally, push updated master to the Github copy of your fork:
print "\nStep 4: Pushing updated master to fork\n\n";
Expand Down
18 changes: 18 additions & 0 deletions var/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# This is the top-level .gitignore file for the "var" directory for the #
# WRF Model, containing the code for WRFDA #
# #
# Filenames and wildcards added below will not be tracked by git anywhere in #
# this directory or any of its subdirectories. Note that these rules will be #
# supplemented by rules in the top-level .gitignore file #
# #
# Ignored file types should include executables, build-time temporary files, #
# and other files which should not ever be added to the code repository. #
# #
# USE CAUTION WHEN ADDING WILDCARDS, as some builds use different filename #
# conventions than others #
##############################################################################

# Ignore rules should be listed here (none yet)

# Exceptions to top-level .gitignore: var/ source code files use .f90 extension
!*.f90
17 changes: 17 additions & 0 deletions var/build/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# This is the .gitignore file for the WRFDA build directory #
# #
# Filenames and wildcards added below will not be tracked by git anywhere in #
# this directory or any of its subdirectories. Note that these rules will be #
# supplemented by rules in the top-level .gitignore file #
# #
# Ignored file types should include executables, build-time temporary files, #
# and other files which should not ever be added to the code repository. #
##############################################################################
*.f
*.f90
*.inc
*.c
*.h
*.m4
*.sed
*.int