C C COMDECK: COMMIN C C Parameters associated with the control variable of the C variational analysis C C NI,NJ,NK: dimension of model/analysis grid C NVADIM : dimension of the control vector C NDATA : number of data values (observations) C NVAMAJ : number of updates of the Hessian matrix to be considered C . by the quasi-Newton algorithm C NMTRA : workspace needed by the minimization module C NIMPRES : parameter controlling the impression of the minimization C . module (see MODULOPT documentation) C NITERMAX: max. number of iterations (see MODULOPT documentation) C NSIMMAX : max. number of simulations (see MODULOPT documentation) C REPSG : precision of the stopping criterion (see MODULOPT documentation) C NGRTEST : used to trigger the gradient test (=1) C NGRANGE : range used for the gradient test C ------------ C NEVALJ : = 1 contribution of Jg and Jo are both considered C . = 2 only Jg is considered C . = 3 only Jo is considered C VAZX(NVADIM) : control variable used by the minimization C VAZG(NVADIM) : gradient of the functional C VATRA(NMTRA) : workspace used by the minimization subroutine C XMOD(NI,NJ) : model state (increment and workspace) C TRIAL(NI,NJ) : trial field C INNOV(NDATA) : innovation vector C OBS(NDATA) : observations (data) C NULOUT : unit number for listing file C INTEGER NMTRA,NVAMAJ,NIMPRES,NITERMAX,NSIMMAX & ,NEVALJ,NNEVALJ,NGRTEST,NGRANGE,NULOUT,NI,NJ,NK, & NDATA,NVADIM REAL*8 REPSG,RPRECIS C C Parameters related to trial field C parameter(NI = 760) parameter(NJ = 1120) parameter(NK = 63) parameter(NVADIM = NI*NJ*NK) C C Parameters related to data C c parameter(NDATA = NI*NJ) C C Parameters related to minimization C parameter(REPSG = 0.001) ! relative reduction in norm of ! gradient required for convergence parameter(RPRECIS = 1.D-12) ! precision of machine parameter(NITERMAX = 20) parameter(NSIMMAX = 20) parameter(NVAMAJ = 6) parameter(NGRTEST = 1) parameter(NGRANGE = 10) parameter(NNEVALJ = 1) parameter(NIMPRES = 5) parameter(NULOUT = 6) parameter(NMTRA = 4*NVADIM+NVAMAJ*(2*NVADIM+1)) C C Arrays C REAL*8 VAZX(NVADIM),VAZG(NVADIM),VATRA(NMTRA) REAL*8 XMOD(NI,NJ,NK),TRIAL(NI,NJ,NK) REAL*8 BSQRT(NK,NK) REAL*8, POINTER :: OBS(:), INNOV(:), SIGOBS(:) REAL, POINTER :: OBSLON(:), OBSLAT(:) INTEGER, POINTER :: IOBS(:),JOBS(:),KOBS(:) C COMMON /commin/VAZX,VAZG,VATRA,NDATA, + XMOD,TRIAL,OBS,INNOV,BSQRT,SIGOBS,IOBS,JOBS,KOBS, + NEVALJ, OBSLON, OBSLAT