CC COMDECK: COMMINCC Parameters associated with the control variable of theC variational analysisCC NI,NJ,NK: dimension of model/analysis gridC NVADIM : dimension of the control vectorC NDATA : number of data values (observations)C NVAMAJ : number of updates of the Hessian matrix to be consideredC . by the quasi-Newton algorithmC NMTRA : workspace needed by the minimization moduleC NIMPRES : parameter controlling the impression of the minimizationC . 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 testC ------------C NEVALJ : = 1 contribution of Jg and Jo are both consideredC . = 2 only Jg is consideredC . = 3 only Jo is consideredC VAZX(NVADIM) : control variable used by the minimizationC VAZG(NVADIM) : gradient of the functionalC VATRA(NMTRA) : workspace used by the minimization subroutineC XMOD(NI,NJ) : model state (increment and workspace)C TRIAL(NI,NJ) : trial fieldC INNOV(NDATA) : innovation vectorC OBS(NDATA) : observations (data)C NULOUT : unit number for listing fileC INTEGER NMTRA,NVAMAJ,NIMPRES,NITERMAX,NSIMMAX & ,NEVALJ,NNEVALJ,NGRTEST,NGRANGE,NULOUT,NI,NJ,NK, & NDATA,NVADIM REAL*8 REPSG,RPRECISCC Parameters related to trial fieldC parameter(NI = 760) parameter(NJ = 1120) parameter(NK = 63) parameter(NVADIM = NI*NJ*NK)CC Parameters related to dataCc parameter(NDATA = NI*NJ)CC Parameters related to minimizationC 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))CC ArraysC 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