Friday, November 16, 2012
Evaporation Terminologies
http://en.wikipedia.org/wiki/Pan_evaporation
>=Free surface water evaporation (EVCAN in PRMS)
Lake Evaporation
Evaporation from a natural body of water is usually at a lower rate because the body of water does not have metal sides that get hot with the sun, and while light penetration in a pan is essentially uniform, light penetration in natural bodies of water will decrease as depth increases. Most textbooks suggest multiplying the pan evaporation by 0.75 to correct for this.
Potential Evaporation / Evaportranspiration (PET)
Potential Evaporation or Evaportranspiration with unlimited water supply (well-watered crop)
http://en.wikipedia.org/wiki/Potential_evaporation
Also famous Penman and Penman-Monteith
Penman equation (1948)
Penman-Monteith equation (1965)
In FAO webpage below, a definition for PET:
http://www.fao.org/docrep/W3094E/w3094e06.htm
Potential evapotranspiration (PET) has been defined as the volume of water per unit area of field evaporated and transpired by a dense stand of actively growing short grass that is well endowed with (never short of) water.
Different crops have their own PET
PET = Kc * RET
PET- Potential evapotranspiration (PET), is the evaporation and transpiration that potentially could occur if a field of the crop had an ideal unlimited water supply.
RET is the reference ET often denoted as ETo. RET usually represents the PET of the reference crops most active growth. Kc, then becomes a function or series of values, specific to the crop of interest through its growing season. These can be quite elaborate in the case of certain corn varieties, but tend to use a trapezoidal or a leaf area index (LAI) curve for common crop or vegetation canopies.
http://en.wikipedia.org/wiki/Crop_coefficient
Thursday, August 30, 2012
ArcGIS Advanced Labeling
Layer Properties, click Labels
In Label field, click Expression button.
In Label Expression window, in Fields, double click each field you need to use in the label expression.
In the Expression, check Advanced box. It will give you a piece of code. By editing this code, you can customize your own label.
Below is an example of the customized label. Where when [Sheet2$.N_GYearly1995] field is less than 0, using red font, when greater than 0, using blue font.
---------------------------------------------------------------
---------------------------------------------------------------
For other advanced VBScripting for labels, refer to:
http://63.227.83.34/files/ArcMap_VBScript_Labeling.pdf
This gives a good introduction on ArcMap VBScript labeling.
http://webhelp.esri.com/arcgisdesktop/9.2/index.cfm?TopicName=About_building_label_expressions
This is a good reference sheet for looking up Scripts.
Monday, May 7, 2012
Parallel Programming with Fortran 101 - continued 2
This is an application I built based on my day-to-day work. We were often required to run a model with different input parameters. This process if done in serial, cost a processor a very long processing time. In the past, I often use batch file to do this. Now all our computers are at least two cores, I would like to run these models in parallel.
My first attempt failed but the second successed with help from the OpenMP forum members. Failing is a frustrating and time consuming process of learning. This link contains my issues and solution.
http://www.openmp.org/forum/viewtopic.php?f=3&t=1418
The success program is copied below. Anyone may slightly alter it for your Monte Carlo Type of simulations.
program ompHelloWorld
use omp_lib
integer NTHREADS, TID, I, TID1
!$OMP PARALLEL PRIVATE(TID,TID1), SHARED(NTHREADS)
!$OMP MASTER
TID1 = OMP_GET_THREAD_NUM()
PRINT *, 'Master computer id is ', TID1
NTHREADS = OMP_GET_NUM_THREADS()
PRINT *, 'Number of threads = ', NTHREADS
!$OMP END MASTER
TID = OMP_GET_THREAD_NUM()
PRINT *, 'Hello World from thread = ', TID
! CALL POOH(TID)
CALL RUNMODEL(TID)
pause
!$OMP END PARALLEL
end program ompHelloWorld
!Run a model
!Note that under home directory there has to be a cdandrun.bat
!contains the following two lines
!cd %1
!MODHMS1 >lst
SUBROUTINE RUNMODEL(ID)
INTEGER ID
CHARACTER*200 CPATH, cpath2
write(*,*) 'Run model using thread#',ID
! Change current path
WRITE(CPATH,100) ID+1
100 FORMAT(I2)
CPATH='cdandrun.bat gvtest'//ADJUSTL(CPATH)
WRITE(*,*) TRIM(CPATH)
call getcwd(cpath2)
WRITE(*,*) 'The current path is ', TRIM(CPATH2)
CALL SYSTEM(cpath)
END SUBROUTINE RUNMODEL
Thursday, April 19, 2012
Exploring FORTRAN DLL
1. How to create a FORTRAN DLL in visual studio with INTEL FORTRAN compiler:
http://sukhbinder.wordpress.com/2011/04/14/how-to-create-fortran-dll-in-visual-studio-with-intel-fortran-compiler/
Simple to follow, worked.
2. How to call FORTRAN DLL in visual studio with INTEL FORTRAN compiler:
http://www.eng-tips.com/viewthread.cfm?qid=117348
Another method:
http://www.tek-tips.com/viewthread.cfm?qid=1572697
Calling DLL from C#
http://software.intel.com/en-us/articles/calling-fortran-function-or-subroutine-in-dll-from-c-code/
Parallel Programming 101 - Fortran OpenMP for dummies
1. Compiler Settings
Compaq Visual Fortran compiler does not support parallel programming feature.
If you are using Intel Visual Fortran to compile your parallel code, you have to do the following in order to have it run correctly:
Right click on project
2. To convert a serial code into a parallel code, you will need to use OpenMP directives
Basic format of OpenMP directives:
A typical OpenMP directive looks like this (Fortran is not case-sensitive):
!$OMP PARALLEL DO
OpenMP directives must start with a sentinel !$OMP
!$OMP can appear in any column, but must be preceded by white space only
Continuation lines must have an ampersand as the last non-blank character in a line.
!$OMP PARALLEL PRIVATE(TID)can be written as
!$OMP PARALLEL &
!$OMP PRIVATE (TID)
(Although directives start with an ! sign, it is not a comment, as in Fortran)
3. Parallel Region Construct
Parallel region: a block of code that will be executed by multiple threads.
When a thread reaches a parallel region, it creates a team of threads. The code within the parallel region is duplicated and all threads will execute the code.
The format of the parallel construct is
[Code Block]
!$OMP END PARALLEL
Example Code 1
PROGRAM Hello
!$OMP PARALLEL
print*, 'Hello World!'
END PROGRAM
If the above example is running on a duo core computer, then
the output will be:
Hello World!
Hello World!
(but this is not useful at all so far, as we do not want to repeat the same task on all threads)
#ifdef _OPENMP
include 'omp_lib.h' !needed for OMP_GET_NUM_THREADS()
#endif
integer TID
!$omp parallel
TID = OMP_GET_THREAD_NUM()
PRINT *, 'Hello World from thread = ', TID
!$omp end parallel
end program ompHelloWorld
#ifdef _OPENMP
include 'omp_lib.h' !needed for OMP_GET_NUM_THREADS()
#endif
integer nthr
integer NTHREADS, TID
TID=-999
NTHREADS=-999
!$omp parallel
TID = OMP_GET_THREAD_NUM()
PRINT *, 'Hello World from thread = ', TID
IF (TID .EQ. 0) THEN
NTHREADS = OMP_GET_NUM_THREADS()
PRINT *, 'Master computer report:'
PRINT *, 'Number of threads = ', NTHREADS
ELSE
PRINT *, 'Slave computer report:'
PRINT *, 'I am on vacation.'
END IF
!$omp end parallel
continue
end program ompHelloWorld
4. Work-Sharing Construct
A work-sharing construct does not create new threads. It divides the execution of the enclosed code among the existing threads.
Three types of work-sharing construct
- DO directive:
- SECTIONS directive
- SINGLE directive
(Now it is getting interesting!)
4.1 SINGLE Directive
The SINGLE directive speci es that the enclosed code is to be executed by only one thread in the team.
Useful when dealing with sections of code that are not thread safe (such as I/O)
Example
!$OMP PARALLEL
!$OMP SINGLE
!$OMP END SINGLE
!$OMP END PARALLEL
4.2 DO directives
The DO directive specifi es that the iterations of the loop immediately following it must be executed in parallel by the team.
The format of the DO directive is
!$OMP DO
[Code Block]
!$OMP END DO
Example Code
!$OMP PARALLEL
!$OMP DO
DO i = 1,n
z(i) = a*x(i) + y
END DO
!$OMP END DO
!$OMP END PARALLEL
For convenience, there is
PARALLEL DO
We can replace the above code with
!$OMP PARALLEL DO
DO i = 1,n
z(i) = a*x(i) + y
END DO
Note that PARALLEL DO does not need an END PARALLEL DO.
4.3 SECTION directives
The SECTIONS directive divides the enclosed sections of code among the existing threads.
The format of the SECTIONS directive is
!$OMP SECTIONS
!$OMP SECTION
[Code Block 1]
!$OMP SECTION
[Code Block 2]
!$OMP SECTION
[Code Block 3]
!$OMP END SECTIONS
Example Code
!$OMP PARALLEL SHARED(A,B,C,D), PRIVATE(I)
!$OMP SECTIONS
!$OMP SECTION
DO I = 1, N
C(I) = A(I) + B(I)
ENDDO
!$OMP SECTION
DO I = 1, N
D(I) = A(I) * B(I)
ENDDO
!$OMP END SECTIONS
!$OMP END PARALLEL
For convenience, there is
PARALLEL SECTIONS
We can replace the above code with
!$OMP PARALLEL SECTIONS
!$OMP SECTION
[Code Block 1]
!$OMP SECTION
[Code Block 2]
!$OMP END PARALLEL SECTIONS
With the above work-share construct, I can construct some simple yet useful program.
----------------------------------------------------------------------------
Trouble 1:
When I compile the program and sent my executable to a lab computer with 8 cores to run, it failed with an error message:
This is the most useful answer I found on the internet
Even when static libraries are selected, the OpenMP library is linked dynamically - this can be overridden by adding /Qopenmp-link:static under Fortran > Command Line > Additional Options.
Directives for Sychronization
CRITICAL contains the codes that will be executed in serial, no longer parallel, this is to avoid data comfliction
!$OMP CRITICAL
...
!$OMP END CRITICAL
Example (I did not test this, probably should)
! Look for the largest element in an array
currentMax = -1.E10
!$OMP PARALLEL DO
DO i = 1, n
IF( a(i) < currentMax) THEN
!$OMP CRITICAL
IF( a(i) < currentMax) THEN
currentMax = a(i)
ENDIF
!$OMP END CRITICAL
END IF
END DO
!$OMP END PARALLEL DO
--------------------------
I am running out of time for another project. This will be put on hold.
References:
- A comprehensive Book:
http://www.amazon.com/Parallel-Programming-OpenMP-Rohit-Chandra/dp/1558606718#reader_1558606718
- A simple to follow yet in-depth ppt (in C)
http://openmp.org/mp-documents/omp-hands-on-SC08.pdf
- Useful table summaries of directives
http://www.cita.utoronto.ca/MISC/computing_guide/docs/Intel_Fortran_v8.1/f_ug2/index.htm#par_dirs.htm
http://www.cita.utoronto.ca/MISC/computing_guide/docs/Intel_Fortran_v8.1/f_ug2/par_dirs.htm
- OpenMP training workshop of Llnl
https://computing.llnl.gov/tutorials/openMP/#RunTimeLibrary
https://computing.llnl.gov/tutorials/openMP/exercise.html
https://computing.llnl.gov/?set=training&page=index#training_materials
https://computing.llnl.gov/tutorials/openMP/exercise.html
Tuesday, April 17, 2012
Wednesday, April 27, 2011
Work with Path
For example, to prepend C:\Windows\Temp to the PATH:
PATH=C:\WINDOWS\Temp;%PATH%
Similarly, to append $(TargetDir)\DLLS to the PATH:PATH=%PATH%;$(TargetDir)\DLLS
Project | Properties | Select Configuration | Configuration Properties | Debugging | Working directoryRepeat for each project configuration.
Sunday, April 24, 2011
Software for contaminant transport
BIOSCREEN
http://www.epa.gov/ada/csmos/models/bioscrn.html
BIOSCREEN is a screening model that simulates remediation through natural attenuation of dissolved hydrocarbons at petroleum fuel release sites. The model is designed to simulate biodegradation by both aerobic and anaerobic reactions.
Keyword: Analytical model, natural attenuation process, Domenico-based Fate and Transport Models.
BIOPLUME
http://www.epa.gov/ada/csmos/models/bioplume3.html
HSSM
http://www.epa.gov/ada/csmos/models/hssmwin.html
Keyword: LNAPL
MT3D
http://hydro.geo.ua.edu/mt3d/
Keyword: numerical model, flow and transport
PHREEQC
http://www.xs4all.nl/~appt/
Keyword: Geochemical modeling
PHT3D
http://www.pht3d.org/pht3d_public.html
RT3D
Keyword: reactive modeling
http://bioprocess.pnnl.gov/rt3d_down.htm
Terms:
BTEX
http://en.wikipedia.org/wiki/BTEX
BTEX is an acronym that stands for benzene, toluene, ethylbenzene, and xylenes.[1] These compounds are some of the volatile organic compounds (VOCs) found in petroleum derivatives such as petrol (gasoline). Toluene, ethylbenzene, and xylenes have harmful effects on the central nervous system.
BTEX compounds are notorious due to the contamination of soil and groundwater with these compounds. This typically occurs near petroleum and natural gas production sites, and petrol stations and other areas with Underground Storage Tanks (USTs) or Above-ground Storage Tanks (ASTs) containing gasoline or other petroleum-related products.
The amount of 'Total BTEX', the sum of the concentrations of each of the constituents of BTEX, is sometimes used to aid in assessing the relative risk or seriousness at contaminated locations and the need of remediation of such sites. Naphthalene may also be included in Total BTEX analysis yielding results referred to as BTEXN. In the same way, styrene is sometimes added, making it BTEXS.
Wednesday, April 20, 2011
Development tools - optimization
Getting started:
http://msdn.microsoft.com/en-us/library/ff524512%28v=VS.93%29.aspx
Examples:
http://msdn.microsoft.com/en-us/library/ff524501%28VS.93%29.aspx
Download
http://archive.msdn.microsoft.com/solverfoundation/Release/ProjectReleases.aspx?ReleaseId=1799
SVM
http://msdnrss.thecoderblogs.com/2011/02/support-vector-machines-svms-in-f-using-microsoft-solver-foundation/
NLP
http://dandesousa.com/2010/07/15/microsoft-solver-foundation-for-quadratic-programming/
for convex programming
http://stackoverflow.com/questions/1978754/whats-a-good-convex-optimization-library
Open source
LPsolve
http://lpsolve.sourceforge.net/5.5/
Coin-or
http://www.coin-or.org/resources.html
GNU
http://www.gnu.org/software/glpk/
MATLAB
http://www.convexoptimization.com/wikimization/index.php/MATLAB_Programs_for_Optimization
benchmarks
http://plato.asu.edu/ftp/lpfree.html
http://scip.zib.de/
Format
mps
ftp://ftp.caam.rice.edu/pub/people/bixby/miplib/mps_format
Development tools - plotting
Demos show capabilities
http://gnuplot.sourceforge.net/demo_4.4/
Include in C
http://users.aims.ac.za/~kuzamunu/faq/page1.php
Include in C#
http://www.debugging.com/bug/17233
Octave using GNUPLOT
http://www.shogun-toolbox.org/media/images/OctaveDemo.png
MS Chart:
http://archive.msdn.microsoft.com/mschart
Tuesday, April 19, 2011
Shell Script Notes
I have a txt file aa.txt like below:
100 | 200
11 | 22 | 33 | 44
12 | 23 | 35 | 55
14 | 24 | 36 | 56
200 | 300
21 | 22 | 330 | 44
22 | 23 | 315 | 55
24 | 55 | 361 | 56
I like to choose all the lines with 4 fields and collect the second
field of the 4 fields
i.e., discard all lines only with 2 fields, and take the second field of
the remaining,
the output should be
22
23
24
22
23
55
Answer:
grep ".*|.*|.*|.*" aa.txt |awk '{print $3}'
grep "^[0-9]\+ | [0-9]\+ | [0-9]\+ | [0-9]\+$" a | awk '{print $3}'
awk '{if (NF>4) print $3}' temp
awk -F'|' 'NF>4{print $2}' temp
yours are wrong :) should be 'NF>3'
Dashagen's was correct coz awk's default separator is space/tab.
Do it in the Q way,
d[;1] @/: (til count d) except where max each null d: flip
("IIII";"|") 0: `:aa.txt
Perl version:
perl -anle 'print @F[2] if scalar @F>3' aa.txt
Think:
if we only are interested the lines with 2 fields and like to print their
2nd field, what can we do?
Live a healthy life for your loved ones
Before her death, she has written online dairies on her experiences of flighting cancer as well as her thoughts on reasons of her cancer. I have been following her dairy for several months, now she is gone.
These reasons, mainly about a person's life-style, even though lack of scientific basis, are quite common among young people living a professional or academic life (like me). For instance, we stayed up late at night, lacked sleep, ate irregular meals, did not exercise regularly, accumulated too much stresses before a due date, etc.
So stressed, tired, yet still indulging this feeling of exhaustion, like me right now, I feel it may be a time to change (hopefully not too late). May God bless her and everyone happened to cross this piece. Live a healthy life for yourself and for whoever loves you and you love. Life is too short to waste on non-senses, and also burn it recklessly.
Here is an address of her Blog, what a loss!
http://blog.sina.com.cn/u/1904273792
Sunday, September 19, 2010
100 days without Search Engine - Day 2 - the last day
I tried to install some windows updates, searching it on Microsoft's website. No way I can get to the information I need without search engine.
I tried to find a phone number of a company's local office, tried to look for it on their website, cannot. I have to google.
So my day proved that my idea of not using search engine is impossible.
I am setting up new rules:
(1) using search engine only after I can not figure it out with my brain after 5 minutes.
(2) blocking news and some discuss forums I often check during the day.
Saturday, September 18, 2010
100 days without Search Engines - day 1
Tired of the endless searching without using my memory, or spending 80% of time searching, without in-depth thinking, I've decided to try to live a hundred days without search engine, yes, no google, no bing, the only exception is specialized acadamic searching tools.
Rules:
When a question in work or research pops up, I am going to rely only on textbooks, electronic books, manuals, asking collegues or experts, then wikipedia. (Wiki is a great tool, but sometimes, it still provides 'too much' information than necessary, and leave me very little time to think or solve a problem myself. But for now I will have it on parole)
Day 1:
I need my bank's statement. OK, I usually type the name of the bank in search engine and search, no, I can not do that now. My bank is Chevy Chase Bank, so, is it 'www.chevychase.com'? I typed it, no (OMG, I have never memorized my bank's website name!!!), now try 'www.chevychasebank.com', 'Bingo!' To avoid forget it again, I created a folder called Person in my favorite menu, and bookmarked this page. I customize the bookmark, so I can use the hint to remember my ID and PW. Why? I usually use three different user names, and 5 different combination of PWs, which are 15 different combinations. (Do I want to do it, no. This is often because of the specific sign-in requirements of a website: the first must be a capital letter, it can not be your name, etc... So at the end of the book mark name, I typed A1, which means ID type A (from A, B, and C), PW type 1(from 1~5). Then I did the same for all the other personal website including credit cards, banks, youtube, etc. Wow, I am feeling organized!
I was able to handle most of the task without much struggling today. The only thing that cost me sometime was a USGS tool called Weasel GIS. I tried to find the tool from the USGS main page. But after about navigating on this site for 10 minutes, I had to give up and used the search tool on USGS main page (powered by google). I considered this half-cheating.
Well, still, I found myself quite focused and organized. The cons are that I may have spent a bit more time navigating on a certain website, or spent time on guessing a website name. But hopefully that guessing process will cut down when I orgnanize them into the favorite folder and getting familiar with my most visited sites.
Tuesday, June 1, 2010
Something from - Moon and Sixpence
Here is THE most famous quote:
"I have an idea that some men are born out of their due place. Accident has cast them amid certain surroundings, but they have always a nostalgia for a home they know not. They are strangers in their birthplace, and the leafy lanes they have known from childhood or the populous streets in which they have played, remain but a place of passage. They may spend their whole lives aliens among their kindred and remain aloof among the only scenes they have ever known. Perhaps it is this sense of strangeness that sends men far and wide in the search for something permanent, to which they may attach themselves. Perhaps some deep-rooted atavism urges the wanderer back to lands which his ancestors left in the dim beginnings of history. Sometimes a man hits upon a place to which he mysteriously feels that he belongs. Here is the home he sought, and he will settle amid scenes that he has never seen before, among men he has never known, as though they were familiar to him from his birth. Here at last he finds rest."
Here I am ... ... but where am I?
Wednesday, May 26, 2010
Groundwater Model - 1 Parameters
Vertical K - (L/T), also = K/Anisotropic ratio
Conductance = K * A / L (L^2/T)
A - Flow cross-section area, L - Flow distance
Vcont (Vertical conductance) = Vertical K / L (1/T) (Also called leakance)
L - vertical distance
Effective leakance = 1/[sum(1/Vcont_i)], i = 1, n effective leakance of n layers
Transmissivity = K * aquifer thickness (Top - Bot) (L^2/T)
About the recent suicides in Foxconn
So many theories and analyses exist about these death, some people called Foxconn a “Blood and Tear” factory; some say that Foxconn just has an extremely regulated management system - a semi-military system; some concluded that this is the unfortunate outcome of being at the end of the production chain; some blame it on the brittle nerve of the new generation of countryside workers, whose parents where the first generation workers; some say it is the unfairness in the society that brings no hope to the "poor second-generation;" some even say that the high death compensation (approximately 30K to 50K) to the family served as an incentive. There are more analyses, but the truth is still behind the scene. Maybe it is an outcome of all the above.
I am just feeling sad, not seeing the truth with my own eyes made me no better than another speculator, here I just want to provide a list of Facts
- the first known death of a Foxconn staff is Yonggang Sun, who was subject to internal investigation on lossing an Apple 4G sample phone, jumped out of a 12th floor window to prove his innocense, in September, 2009.
- Since 2010, in a short period of last 5 months, there were 11 suicides in Foxconn causing 9 death and 2 injuries. The youngest is only 19-year old, the oldest is 25-year old.
- For one iphone, Apple pays approximately 5 dollar to the manufacturer in China, For one ipad, Apple pays 11 dollars to the manufacturer in China
- Foxconn is a Taiwan company hires over 900-thousand employees. The owner Taiming Guo is currently the Richest man in Taiwan
- In Foxconn, a manufactory worker receives an average of $150 dollars per month, free lodging in a 8-person room, free food in the dining hall, and free laundry –better than the average conditions in many manufactories in China
- Foxconn worker works an average of 10~12 hours a day (8am ~5pm regular time, 6pm~8pm overtime), and also working over the weekend as overtime. The average pay for overtime is $1.1 per hour. You may choose to not work overtime, but few employee do, and they faces pressure from their supervisors.
- The investigation of the local labour department has concluded no-wrong-doing in Foxconn's conduct after the "10th jump"
Monday, May 24, 2010
Writing exercise - 1
Time, always time, it seems that there is plenty, but when I think of the tremendous task list I have, the time I have for developing other skills always seems so scarce. However, I can not really ignore the other developments because of this task list. There is a Chinese saying: "Read ten million books, and walk ten million miles," which is a requirement for the ancient intellectuals. I wish, in my limited life time, I can do something similar to it. Walk the miles, read the books, opening my eyes, and maybe finally opening the mind.
Can't write much now. I have been reading Russell lately (In Praise of Idleness), can not say I am completely agree with him, but he was such a good man.
Thursday, July 19, 2007
Runoff Coefficient
Area Description Runoff Coefficient C
Business
Downtown 0.70-0.95
Neighborhood 0.50-0.70
Residential
Single-Family 0.30-0.50
Multiunits, detached 0.40-0.60
Multiunits, attached 0.60-0.75
Residential (suburban) 0.25-0.40
Apartment 0.50-0.70
Industrial
Light 0.50-0.80
Heavy 0.60-0.90
Parks, cemeteries 0.10-0.25
Playgrounds 0.20-0.35
Railroad yard 0.20-0.35
Unimproved 0.10-0.30
Pavement
Asphaltic and concrete 0.70-0.95
Brick 0.70-0.85
Roofs 0.75-0.95
Lawns, sandy soil
Flat, 2 percent 0.05-0.10
Average, 2-7 percent 0.10-0.15
Steep, 7 percent 0.15-0.20
Lawns, heavy soil
Flat, 2 percent 0.13-0.17
Average, 2-7 percent 0.18-0.22
Steep, 7 percent 0.25-0.35
http://www.ems-i.com/wmshelp/Hydrologic_Models/Models/Rational/Equation/Runoff_Coefficient_Table.htm
Wednesday, July 18, 2007
TMDL and NPDEs
TMDL is a calculation of maximum amount of a pollutant that a waterbody can receive and still meet water quality standards, and an allocation of that amount ...

