FUNCTION ch_kadd2list(iobsnmb) 1 #if defined (DOC) * ***s/r ch_kadd2list - add new observation descriptors into list NVNUMB * *Author : Y. Yang June 2004 *Revision: * Y.J. Rochon ARQX/MSC May 2005 * - Indentation alignment * *Purpose: * * Check whether or not the obs descriptor read from the namelist is * already in NVNUMB. If not, add it to the end of nvnumb list * (the first place that has 0) * *Arguments * * input: * iobsnmb: desciptor to be added * output * ch_kadd2list: the position at which the descriptor is found or added * in NVNUMB * #endif C IMPLICIT NONE *implicits #include "comnumbr.cdk"
#include "comdim.cdk"
#include "comchem.cdk"
#include "comlun.cdk"
* INTEGER ch_kadd2list INTEGER iobsnmb, II, JJ C ch_kadd2list = 0 II = -1 C if (iobsnmb .ne. 0) then DO II = 1,jpnbrelem if (NVNUMB(II) .ne. 0 ) then if (iobsnmb .eq. NVNUMB(II)) go to 500 else NVNUMB(II) = iobsnmb go to 500 endif ENDDO 500 continue endif C ch_kadd2list = ii C RETURN END