Skip to content

Commit

Permalink
Update global_latlon_map.py
Browse files Browse the repository at this point in the history
Removed 2 commented out percent change lines containing old code.
  • Loading branch information
shawnusaf authored Nov 12, 2024
1 parent 625f8a1 commit e0857aa
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions scripts/plotting/global_latlon_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@ def global_latlon_map(adfobj):
dseasons[s] = mseasons[s] - oseasons[s]

# percent change
#pseasons[s] = (abs(mseasons[s] - oseasons[s])/((mseasons[s] + oseasons[s])/2.0))*100.0
pseasons[s] = (mseasons[s] - oseasons[s]) / np.abs(oseasons[s]) * 100.0 #relative change

pf.plot_map_and_save(plot_name, case_nickname, adfobj.data.ref_nickname,
Expand Down Expand Up @@ -298,7 +297,6 @@ def global_latlon_map(adfobj):
dseasons[s] = mseasons[s] - oseasons[s]

# percent change
#pseasons[s] = (abs(mseasons[s] - oseasons[s])/((mseasons[s] + oseasons[s])/2.0))*100.0 #absolute
pseasons[s] = (mseasons[s] - oseasons[s]) / np.abs(oseasons[s]) * 100.0 #relative change

pf.plot_map_and_save(plot_name, case_nickname, adfobj.data.ref_nickname,
Expand Down Expand Up @@ -376,4 +374,4 @@ def plot_file_op(adfobj, plot_name, var, case_name, season, web_category, redo_p
return True

##############
#END OF SCRIPT
#END OF SCRIPT

0 comments on commit e0857aa

Please sign in to comment.