WAM2layers / Moisture_tracking_intercomparison

Apache License 2.0
4 stars 0 forks source link

Update Functions.py to correct the calculation of regional_sources #86

Closed crespoalfredo closed 2 months ago

crespoalfredo commented 2 months ago

At the last meeting a problem was mentioned with the calculation of regional sources using the calc_regional_sources function. I think we were weighting the area of gridded evaporative sources twice, since in the calc_regional_sources function we were using as weights ‘np.cos(np.deg2rad(sources[lat_name]))’ to take into account the decrease in area with increasing latitude, but at the same time we are passing as argument to this function the already area-weighted results, srcs_frac. Replacing the weights in calc_regional_sources by 1 can solve this issue and still provide the regional sources as fractions, as in BeeswarmAndBoxPlots_AllCases.ipynb

iris-thu commented 2 months ago

Yes, great that you found this! I also think that the changes as suggested by Peter are good.