From a4ed20bba62a8a07e163723b8568e656921765ac Mon Sep 17 00:00:00 2001 From: Ricardo Todling Date: Fri, 24 Jul 2026 12:16:34 -0400 Subject: [PATCH 1/3] Ability to control ncdiag output by iteration number --- GEOSaana_GridComp/GSI_GridComp/analyzer | 23 ++++++++++++++++--- .../GSI_GridComp/etc/GEOSIT/gsi.rc.tmpl | 2 +- .../GSI_GridComp/etc/GEOSIT/gsi_sens.rc.tmpl | 1 + .../GSI_GridComp/etc/gsi.rc.tmpl | 3 ++- .../GSI_GridComp/etc/gsi_sens.rc.tmpl | 1 + .../GSI_GridComp/etc/jedi_gsi.rc.tmpl | 3 ++- .../GSI_GridComp/etc/jedi_gsi_sens.rc.tmpl | 1 + .../GSI_GridComp/genstats_gps.f90 | 6 ++--- GEOSaana_GridComp/GSI_GridComp/obsmod.F90 | 2 +- GEOSaana_GridComp/GSI_GridComp/radinfo.f90 | 2 +- GEOSaana_GridComp/GSI_GridComp/setupaod.f90 | 6 ++--- GEOSaana_GridComp/GSI_GridComp/setupcldch.f90 | 6 ++--- .../GSI_GridComp/setupcldtot.F90 | 8 +++---- GEOSaana_GridComp/GSI_GridComp/setupdbz.f90 | 2 +- GEOSaana_GridComp/GSI_GridComp/setupdw.f90 | 12 +++++----- GEOSaana_GridComp/GSI_GridComp/setupgust.f90 | 6 ++--- GEOSaana_GridComp/GSI_GridComp/setuphowv.f90 | 6 ++--- GEOSaana_GridComp/GSI_GridComp/setuplcbas.f90 | 6 ++--- GEOSaana_GridComp/GSI_GridComp/setuplight.f90 | 6 ++--- GEOSaana_GridComp/GSI_GridComp/setuplwcp.f90 | 6 ++--- GEOSaana_GridComp/GSI_GridComp/setupmitm.f90 | 6 ++--- GEOSaana_GridComp/GSI_GridComp/setupmxtm.f90 | 6 ++--- GEOSaana_GridComp/GSI_GridComp/setupoz.f90 | 14 +++++------ GEOSaana_GridComp/GSI_GridComp/setuppblh.f90 | 6 ++--- GEOSaana_GridComp/GSI_GridComp/setuppm10.f90 | 6 ++--- GEOSaana_GridComp/GSI_GridComp/setuppm2_5.f90 | 6 ++--- GEOSaana_GridComp/GSI_GridComp/setuppmsl.f90 | 6 ++--- GEOSaana_GridComp/GSI_GridComp/setupps.f90 | 6 ++--- GEOSaana_GridComp/GSI_GridComp/setuppw.f90 | 6 ++--- GEOSaana_GridComp/GSI_GridComp/setupq.f90 | 8 +++---- GEOSaana_GridComp/GSI_GridComp/setuprad.f90 | 6 ++--- GEOSaana_GridComp/GSI_GridComp/setuprw.f90 | 6 ++--- GEOSaana_GridComp/GSI_GridComp/setupspd.f90 | 6 ++--- GEOSaana_GridComp/GSI_GridComp/setupsst.f90 | 6 ++--- GEOSaana_GridComp/GSI_GridComp/setupswcp.f90 | 6 ++--- GEOSaana_GridComp/GSI_GridComp/setupt.f90 | 8 +++---- GEOSaana_GridComp/GSI_GridComp/setuptcamt.f90 | 6 ++--- GEOSaana_GridComp/GSI_GridComp/setuptcp.f90 | 6 ++--- GEOSaana_GridComp/GSI_GridComp/setuptd2m.f90 | 6 ++--- .../GSI_GridComp/setupuwnd10m.f90 | 6 ++--- GEOSaana_GridComp/GSI_GridComp/setupvis.f90 | 6 ++--- .../GSI_GridComp/setupvwnd10m.f90 | 6 ++--- GEOSaana_GridComp/GSI_GridComp/setupw.f90 | 6 ++--- .../GSI_GridComp/setupwspd10m.f90 | 6 ++--- 44 files changed, 143 insertions(+), 121 deletions(-) diff --git a/GEOSaana_GridComp/GSI_GridComp/analyzer b/GEOSaana_GridComp/GSI_GridComp/analyzer index 86213fb2..7ec85959 100755 --- a/GEOSaana_GridComp/GSI_GridComp/analyzer +++ b/GEOSaana_GridComp/GSI_GridComp/analyzer @@ -1982,14 +1982,31 @@ sub lndiag { $lsubdirs = "-subdirs"; } + $this = `nmlread.py $rcname SETUP netcdf_diag`; chomp($result); + $var = "$this"; chomp($var); + # Remove the brackets + $var =~ s/^\[//; + $var =~ s/\]$//; + my @values = split /\s*,\s*/, $var; + my $ncdjiter = 0; + for my $value (@values) { + if ($value eq 'True') { + $ncdjiter++; + } + } + $npe_factor = 4; $myncpus = floor($npes/$npe_factor); $myncpus = $myncpus - $myncpus % 2; if ( $doasens ) { - my $nametag = "ans_${gnorm}${jiteradm}"; - $cmd = "gsidiags -ncpus $myncpus -jiter $jiteradm -tag $nametag $nymd $nhms $expid $opt"; + my $nametag = "-tag ans_${gnorm}${jiteradm}"; + $cmd = "gsidiags -ncpus $myncpus -jiter $jiteradm $nametag $nymd $nhms $expid $opt"; } else { - $cmd = "gsidiags $lsubdirs -ncpus $myncpus $nymd $nhms $expid $opt"; + my $nametag = ""; + if ($ncdjiter == 1) { + $nametag = "-tag ges"; + } + $cmd = "gsidiags -ncpus $myncpus $lsubdirs -jiter $ncdjiter $nametag $nymd $nhms $expid $opt"; } print " $cmd\n"; $rc = System($cmd, "$log_ana","gsidiag"); diff --git a/GEOSaana_GridComp/GSI_GridComp/etc/GEOSIT/gsi.rc.tmpl b/GEOSaana_GridComp/GSI_GridComp/etc/GEOSIT/gsi.rc.tmpl index 2d7e31ed..b5a3cea4 100644 --- a/GEOSaana_GridComp/GSI_GridComp/etc/GEOSIT/gsi.rc.tmpl +++ b/GEOSaana_GridComp/GSI_GridComp/etc/GEOSIT/gsi.rc.tmpl @@ -27,7 +27,7 @@ ! l4densvar=.true.,nmn_obsbin=360,iwrtinc=1,thin4d=.true., iorthomax=10, ens_nstarthr=3, - netcdf_diag=.false., + netcdf_diag(1)=.false.,netcdf_diag(2)=.false.,netcdf_diag(3)=.false., newpc4pred=.true.,adp_anglebc=.true.,angord=4, passive_bc=.true.,use_edges=.false., diag_precon=.true.,step_start=1.e-3,emiss_bc=.true., diff --git a/GEOSaana_GridComp/GSI_GridComp/etc/GEOSIT/gsi_sens.rc.tmpl b/GEOSaana_GridComp/GSI_GridComp/etc/GEOSIT/gsi_sens.rc.tmpl index 12b446b9..0a49fe14 100644 --- a/GEOSaana_GridComp/GSI_GridComp/etc/GEOSIT/gsi_sens.rc.tmpl +++ b/GEOSaana_GridComp/GSI_GridComp/etc/GEOSIT/gsi_sens.rc.tmpl @@ -35,6 +35,7 @@ lobsdiagsave=.true., ens_nstarthr=3, tau_fcst=-1, + netcdf_diag(1)=.false.,netcdf_diag(2)=.false.,netcdf_diag(3)=.false., newpc4pred=.true.,adp_anglebc=.true.,angord=4, passive_bc=.true.,use_edges=.false., diag_precon=.true.,step_start=1.e-3,emiss_bc=.true., diff --git a/GEOSaana_GridComp/GSI_GridComp/etc/gsi.rc.tmpl b/GEOSaana_GridComp/GSI_GridComp/etc/gsi.rc.tmpl index b28b1456..a55f2a5e 100755 --- a/GEOSaana_GridComp/GSI_GridComp/etc/gsi.rc.tmpl +++ b/GEOSaana_GridComp/GSI_GridComp/etc/gsi.rc.tmpl @@ -28,7 +28,8 @@ @4DHYB l4densvar=.true.,nmn_obsbin=@VAROBSBIN,iwrtinc=@IWRTINC,thin4d=.true., iorthomax=10, ens_nstarthr=3, - netcdf_diag=.false.,wrtgeovals=.false., + netcdf_diag(1)=.false.,netcdf_diag(2)=.false.,netcdf_diag(3)=.false., + wrtgeovals=.false., @RADBC newpc4pred=.true.,adp_anglebc=.true.,angord=4, @RADBC passive_bc=.true.,use_edges=.false., @RADBC diag_precon=.true.,step_start=1.e-3,emiss_bc=.true., diff --git a/GEOSaana_GridComp/GSI_GridComp/etc/gsi_sens.rc.tmpl b/GEOSaana_GridComp/GSI_GridComp/etc/gsi_sens.rc.tmpl index dda88dc0..99df7b3e 100755 --- a/GEOSaana_GridComp/GSI_GridComp/etc/gsi_sens.rc.tmpl +++ b/GEOSaana_GridComp/GSI_GridComp/etc/gsi_sens.rc.tmpl @@ -36,6 +36,7 @@ lobsdiagsave=.true., ens_nstarthr=3, tau_fcst=-1, + netcdf_diag(1)=.false.,netcdf_diag(2)=.false.,netcdf_diag(3)=.false., @RADBC newpc4pred=.true.,adp_anglebc=.true.,angord=4, @RADBC passive_bc=.true.,use_edges=.false., @RADBC diag_precon=.true.,step_start=1.e-3,emiss_bc=.true., diff --git a/GEOSaana_GridComp/GSI_GridComp/etc/jedi_gsi.rc.tmpl b/GEOSaana_GridComp/GSI_GridComp/etc/jedi_gsi.rc.tmpl index 5fe1a3a8..699326de 100755 --- a/GEOSaana_GridComp/GSI_GridComp/etc/jedi_gsi.rc.tmpl +++ b/GEOSaana_GridComp/GSI_GridComp/etc/jedi_gsi.rc.tmpl @@ -29,7 +29,8 @@ iorthomax=100, ltcost=.true., ens_nstarthr=3, - netcdf_diag=.true.,wrtgeovals=.false., + netcdf_diag(1)=.true.,netcdf_diag(2)=.false.,netcdf_diag(3)=.false., + wrtgeovals=.false., @RADBC newpc4pred=.true.,adp_anglebc=.true.,angord=4, @RADBC passive_bc=.true.,use_edges=.false., @RADBC diag_precon=.true.,step_start=1.e-3,emiss_bc=.true., diff --git a/GEOSaana_GridComp/GSI_GridComp/etc/jedi_gsi_sens.rc.tmpl b/GEOSaana_GridComp/GSI_GridComp/etc/jedi_gsi_sens.rc.tmpl index e20f8335..76b45277 100755 --- a/GEOSaana_GridComp/GSI_GridComp/etc/jedi_gsi_sens.rc.tmpl +++ b/GEOSaana_GridComp/GSI_GridComp/etc/jedi_gsi_sens.rc.tmpl @@ -36,6 +36,7 @@ lobsdiagsave=.true., ens_nstarthr=3, tau_fcst=-1, + netcdf_diag(1)=.false.,netcdf_diag(2)=.false.,netcdf_diag(3)=.false., @RADBC newpc4pred=.true.,adp_anglebc=.true.,angord=4, @RADBC passive_bc=.true.,use_edges=.false., @RADBC diag_precon=.true.,step_start=1.e-3,emiss_bc=.true., diff --git a/GEOSaana_GridComp/GSI_GridComp/genstats_gps.f90 b/GEOSaana_GridComp/GSI_GridComp/genstats_gps.f90 index ee7c941d..9c21c388 100644 --- a/GEOSaana_GridComp/GSI_GridComp/genstats_gps.f90 +++ b/GEOSaana_GridComp/GSI_GridComp/genstats_gps.f90 @@ -326,7 +326,7 @@ subroutine genstats_gps(bwork,awork,toss_gps_sub,conv_diagsave,mype) mpi_comm_world,ierror) ! If netcdf diag, initialize it - if (conv_diagsave.and.netcdf_diag) call init_netcdf_diag_ + if (conv_diagsave.and.netcdf_diag(jiter)) call init_netcdf_diag_ ! Get height of maximum bending angle dobs_height_sub = zero @@ -697,7 +697,7 @@ subroutine genstats_gps(bwork,awork,toss_gps_sub,conv_diagsave,mype) endif - if (conv_diagsave .and. netcdf_diag .and. luse) call contents_netcdf_diag_ + if (conv_diagsave .and. netcdf_diag(jiter) .and. luse) call contents_netcdf_diag_ gps_allptr => gps_allptr%llpoint @@ -709,7 +709,7 @@ subroutine genstats_gps(bwork,awork,toss_gps_sub,conv_diagsave,mype) ! If requested, write information to diagnostic file if(conv_diagsave) then - if (netcdf_diag) call nc_diag_write + if (netcdf_diag(jiter)) call nc_diag_write if (binary_diag .and. icnt > 0)then nchar = 1 write(7)'gps',nchar,nreal,icnt,mype,ioff diff --git a/GEOSaana_GridComp/GSI_GridComp/obsmod.F90 b/GEOSaana_GridComp/GSI_GridComp/obsmod.F90 index 75e0de13..7f3145a2 100644 --- a/GEOSaana_GridComp/GSI_GridComp/obsmod.F90 +++ b/GEOSaana_GridComp/GSI_GridComp/obsmod.F90 @@ -499,7 +499,7 @@ module obsmod #endif logical luse_obsdiag - logical binary_diag, netcdf_diag + logical binary_diag, netcdf_diag(1:50) ! Declare types diff --git a/GEOSaana_GridComp/GSI_GridComp/radinfo.f90 b/GEOSaana_GridComp/GSI_GridComp/radinfo.f90 index e3a27df1..08156026 100644 --- a/GEOSaana_GridComp/GSI_GridComp/radinfo.f90 +++ b/GEOSaana_GridComp/GSI_GridComp/radinfo.f90 @@ -1726,7 +1726,7 @@ subroutine init_predx fdiag_rad = 'diag_' // trim(dtype(iii)) // '_' // trim(dplat(iii)) ! Set diagnostic file type - call set_netcdf_read(netcdf_diag) + call set_netcdf_read(any(netcdf_diag)) ! See if diagnostic file exists inquire(file=fdiag_rad,exist=lexist) diff --git a/GEOSaana_GridComp/GSI_GridComp/setupaod.f90 b/GEOSaana_GridComp/GSI_GridComp/setupaod.f90 index 7419aaba..a02142ee 100644 --- a/GEOSaana_GridComp/GSI_GridComp/setupaod.f90 +++ b/GEOSaana_GridComp/GSI_GridComp/setupaod.f90 @@ -291,7 +291,7 @@ subroutine setupaod(obsLL,odiagLL,lunin,mype,nchanl,nreal,nobs,& varnames(6:) = aerosol_names if (binary_diag) call init_binary_diag_ - if (netcdf_diag) call init_netcdf_diag_ + if (netcdf_diag(jiter)) call init_netcdf_diag_ end if @@ -616,7 +616,7 @@ subroutine setupaod(obsLL,odiagLL,lunin,mype,nchanl,nreal,nobs,& write(4) psfc,diagbuf,diagbufchan if (binary_diag) call contents_binary_diag_ - if (netcdf_diag) call contents_netcdf_diag_ + if (netcdf_diag(jiter)) call contents_netcdf_diag_ end if endif ! (in_curbin) @@ -632,7 +632,7 @@ subroutine setupaod(obsLL,odiagLL,lunin,mype,nchanl,nreal,nobs,& if (aero_diagsave) then close(4) if (binary_diag) call final_binary_diag_ - if (netcdf_diag) call nc_diag_write + if (netcdf_diag(jiter)) call nc_diag_write endif call destroy_crtm diff --git a/GEOSaana_GridComp/GSI_GridComp/setupcldch.f90 b/GEOSaana_GridComp/GSI_GridComp/setupcldch.f90 index 6ceddf66..f59db029 100644 --- a/GEOSaana_GridComp/GSI_GridComp/setupcldch.f90 +++ b/GEOSaana_GridComp/GSI_GridComp/setupcldch.f90 @@ -243,7 +243,7 @@ subroutine setupcldch(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_dia if (lobsdiagsave) nreal=nreal+4*miter+1 allocate(cdiagbuf(nobs),rdiagbuf(nreal,nobs)) allocate(cprvstg(nobs),csprvstg(nobs)) - if(netcdf_diag) call init_netcdf_diag_ + if(netcdf_diag(jiter)) call init_netcdf_diag_ end if mm1=mype+1 @@ -480,7 +480,7 @@ subroutine setupcldch(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_dia if (err_final>tiny_r_kind) errinv_final = one/err_final if (binary_diag) call contents_binary_diag_(my_diag) - if (netcdf_diag) call contents_netcdf_diag_(my_diag) + if (netcdf_diag(jiter)) call contents_netcdf_diag_(my_diag) end if @@ -492,7 +492,7 @@ subroutine setupcldch(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_dia ! Write information to diagnostic file if(conv_diagsave) then - if(netcdf_diag) call nc_diag_write + if(netcdf_diag(jiter)) call nc_diag_write if(binary_diag .and. ii>0)then write(7)'cei',nchar,nreal,ii,mype,ioff0 write(7)cdiagbuf(1:ii),rdiagbuf(:,1:ii) diff --git a/GEOSaana_GridComp/GSI_GridComp/setupcldtot.F90 b/GEOSaana_GridComp/GSI_GridComp/setupcldtot.F90 index e2891cdd..5b91c64c 100644 --- a/GEOSaana_GridComp/GSI_GridComp/setupcldtot.F90 +++ b/GEOSaana_GridComp/GSI_GridComp/setupcldtot.F90 @@ -285,7 +285,7 @@ subroutine setupcldtot(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_di allocate(all_qv_obs(nrealcld,nobs*nsig)) all_qv_obs=miss_obs_real endif - if (netcdf_diag) call init_netcdf_diag_ + if (netcdf_diag(jiter)) call init_netcdf_diag_ endif endif @@ -626,7 +626,7 @@ subroutine setupcldtot(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_di if (err_final>tiny_r_kind) errinv_final = one/err_final if (binary_diag) call contents_binary_diag_ - if (netcdf_diag) call contents_netcdf_diag_ + if (netcdf_diag(jiter)) call contents_netcdf_diag_ if (i_ens_mean == 1) then @@ -706,7 +706,7 @@ subroutine setupcldtot(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_di if(conv_diagsave)then if (binary_diag) call contents_binary_diag_mem_ - if (netcdf_diag) call contents_netcdf_diag_mem_ + if (netcdf_diag(jiter)) call contents_netcdf_diag_mem_ endif enddo @@ -718,7 +718,7 @@ subroutine setupcldtot(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_di !! Write information to diagnostic file if(conv_diagsave)then if (i_cloud_q_innovation == 2 .and. iip>0) then - if(netcdf_diag) call nc_diag_write + if(netcdf_diag(jiter)) call nc_diag_write if(binary_diag)then write(7)' q',nchar,nreal,iip,mype,ioff0 write(7)cdiagbufp(1:iip),rdiagbufp(:,1:iip) diff --git a/GEOSaana_GridComp/GSI_GridComp/setupdbz.f90 b/GEOSaana_GridComp/GSI_GridComp/setupdbz.f90 index 8953428c..82d85b52 100644 --- a/GEOSaana_GridComp/GSI_GridComp/setupdbz.f90 +++ b/GEOSaana_GridComp/GSI_GridComp/setupdbz.f90 @@ -623,7 +623,7 @@ subroutine setupdbz(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,radardbz_d if (err_final>tiny_r_kind) errinv_final = one/err_final if(binary_diag) call contents_binary_diag_(my_diag) - if(netcdf_diag) call contents_netcdf_diag_(my_diag) + if(netcdf_diag(jiter)) call contents_netcdf_diag_(my_diag) end if diff --git a/GEOSaana_GridComp/GSI_GridComp/setupdw.f90 b/GEOSaana_GridComp/GSI_GridComp/setupdw.f90 index d1d2692f..38f00c7f 100644 --- a/GEOSaana_GridComp/GSI_GridComp/setupdw.f90 +++ b/GEOSaana_GridComp/GSI_GridComp/setupdw.f90 @@ -296,7 +296,7 @@ subroutine setupdw(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diagsa nreal = nreal + size(dhx_dx) endif allocate(cdiagbuf(nobs),rdiagbuf(nreal,nobs)) - if(netcdf_diag.and.nobs>0) call init_netcdf_diag_ + if(netcdf_diag(jiter).and.nobs>0) call init_netcdf_diag_ end if scale=one @@ -664,7 +664,7 @@ subroutine setupdw(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diagsa if (err_final>tiny_r_kind) errinv_final=one/err_final if (binary_diag) call contents_binary_diag_(my_diag) - if (netcdf_diag) call contents_netcdf_diag_(my_diag) + if (netcdf_diag(jiter)) call contents_netcdf_diag_(my_diag) end if @@ -675,7 +675,7 @@ subroutine setupdw(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diagsa ! Write information to diagnostic file if(conv_diagsave) then - if(netcdf_diag.and.nobs>0) call nc_diag_write + if(netcdf_diag(jiter).and.nobs>0) call nc_diag_write if(binary_diag .and. ii>0)then write(7)' dw',nchar,nreal,ii,mype,ioff0 write(7)cdiagbuf(1:ii),rdiagbuf(:,1:ii) @@ -958,9 +958,9 @@ subroutine contents_netcdf_diag_(odiag) if (save_jacobian) then call fullarray(dhx_dx, dhx_dx_array) call nc_diag_data2d("Observation_Operator_Jacobian", dhx_dx_array) - call nc_diag_data2d("Observation_Operator_Jacobian_stind", dhx_dx%st_ind) - call nc_diag_data2d("Observation_Operator_Jacobian_endind", dhx_dx%end_ind) - call nc_diag_data2d("Observation_Operator_Jacobian_val", real(dhx_dx%val,r_single)) + call nc_diag_data2d("Observation_Operator_Jacobian_stind", dhx_dx%st_ind) + call nc_diag_data2d("Observation_Operator_Jacobian_endind", dhx_dx%end_ind) + call nc_diag_data2d("Observation_Operator_Jacobian_val", real(dhx_dx%val,r_single)) endif end subroutine contents_netcdf_diag_ diff --git a/GEOSaana_GridComp/GSI_GridComp/setupgust.f90 b/GEOSaana_GridComp/GSI_GridComp/setupgust.f90 index 2e09737f..bd093471 100644 --- a/GEOSaana_GridComp/GSI_GridComp/setupgust.f90 +++ b/GEOSaana_GridComp/GSI_GridComp/setupgust.f90 @@ -266,7 +266,7 @@ subroutine setupgust(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diag if (lobsdiagsave) nreal=nreal+4*miter+1 allocate(cdiagbuf(nobs),rdiagbuf(nreal,nobs)) allocate(cprvstg(nobs),csprvstg(nobs)) - if(netcdf_diag) call init_netcdf_diag_ + if(netcdf_diag(jiter)) call init_netcdf_diag_ end if call dtime_setup() @@ -597,7 +597,7 @@ subroutine setupgust(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diag if (err_final>tiny_r_kind) errinv_final = one/err_final if(binary_diag) call contents_binary_diag_(my_diag) - if(netcdf_diag) call contents_netcdf_diag_(my_diag) + if(netcdf_diag(jiter)) call contents_netcdf_diag_(my_diag) end if @@ -609,7 +609,7 @@ subroutine setupgust(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diag ! Write information to diagnostic file if(conv_diagsave) then - if(netcdf_diag) call nc_diag_write + if(netcdf_diag(jiter)) call nc_diag_write if(binary_diag .and. ii>0)then write(7)'gst',nchar,nreal,ii,mype,ioff0 write(7)cdiagbuf(1:ii),rdiagbuf(:,1:ii) diff --git a/GEOSaana_GridComp/GSI_GridComp/setuphowv.f90 b/GEOSaana_GridComp/GSI_GridComp/setuphowv.f90 index 7520fac0..6b3d121c 100644 --- a/GEOSaana_GridComp/GSI_GridComp/setuphowv.f90 +++ b/GEOSaana_GridComp/GSI_GridComp/setuphowv.f90 @@ -234,7 +234,7 @@ subroutine setuphowv(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diag if (lobsdiagsave) nreal=nreal+4*miter+1 if (twodvar_regional) then; nreal=nreal+2; allocate(cprvstg(nobs),csprvstg(nobs)); endif allocate(cdiagbuf(nobs),rdiagbuf(nreal,nobs)) - if (netcdf_diag) call init_netcdf_diag_ + if (netcdf_diag(jiter)) call init_netcdf_diag_ end if @@ -432,7 +432,7 @@ subroutine setuphowv(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diag if (err_final>tiny_r_kind) errinv_final = one/err_final if (binary_diag) call contents_binary_diag_(my_diag) - if (netcdf_diag) call contents_netcdf_diag_(my_diag) + if (netcdf_diag(jiter)) call contents_netcdf_diag_(my_diag) end if end do @@ -442,7 +442,7 @@ subroutine setuphowv(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diag ! Write information to diagnostic file if(conv_diagsave) then - if(netcdf_diag) call nc_diag_write + if(netcdf_diag(jiter)) call nc_diag_write if(binary_diag .and. ii>0)then write(7)'hwv',nchar,nreal,ii,mype,ioff0 write(7)cdiagbuf(1:ii),rdiagbuf(:,1:ii) diff --git a/GEOSaana_GridComp/GSI_GridComp/setuplcbas.f90 b/GEOSaana_GridComp/GSI_GridComp/setuplcbas.f90 index 1e179dd5..582d4024 100644 --- a/GEOSaana_GridComp/GSI_GridComp/setuplcbas.f90 +++ b/GEOSaana_GridComp/GSI_GridComp/setuplcbas.f90 @@ -232,7 +232,7 @@ subroutine setuplcbas(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_dia if (lobsdiagsave) nreal=nreal+4*miter+1 allocate(cdiagbuf(nobs),rdiagbuf(nreal,nobs)) allocate(cprvstg(nobs),csprvstg(nobs)) - if(netcdf_diag) call init_netcdf_diag_ + if(netcdf_diag(jiter)) call init_netcdf_diag_ end if call dtime_setup() @@ -435,7 +435,7 @@ subroutine setuplcbas(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_dia if (err_final>tiny_r_kind) errinv_final = one/err_final if(binary_diag) call contents_binary_diag_(my_diag) - if(netcdf_diag) call contents_netcdf_diag_(my_diag) + if(netcdf_diag(jiter)) call contents_netcdf_diag_(my_diag) end if @@ -444,7 +444,7 @@ subroutine setuplcbas(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_dia ! Write information to diagnostic file if(conv_diagsave)then - if(netcdf_diag) call nc_diag_write + if(netcdf_diag(jiter)) call nc_diag_write if(binary_diag) then write(7)'lcb',nchar,nreal,ii,mype,ioff0 write(7)cdiagbuf(1:ii),rdiagbuf(:,1:ii) diff --git a/GEOSaana_GridComp/GSI_GridComp/setuplight.f90 b/GEOSaana_GridComp/GSI_GridComp/setuplight.f90 index 9def2028..f9f6d986 100644 --- a/GEOSaana_GridComp/GSI_GridComp/setuplight.f90 +++ b/GEOSaana_GridComp/GSI_GridComp/setuplight.f90 @@ -448,7 +448,7 @@ subroutine setuplight(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,light_di allocate(diagbuf(nreal,nobs)) ii=0 if(binary_diag) call init_binary_diag_(lu_diag,init_pass) - if(netcdf_diag) call init_netcdf_diag_() + if(netcdf_diag(jiter)) call init_netcdf_diag_() end if !-- ! Save some lightning flash rate values (observed, guess, no. of obs.) @@ -1108,7 +1108,7 @@ subroutine setuplight(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,light_di if (err_final>tiny_r_kind) errinv_final=one/err_final if(binary_diag) call contents_binary_diag_(my_diag) - if(netcdf_diag) call contents_netcdf_diag_(my_diag) + if(netcdf_diag(jiter)) call contents_netcdf_diag_(my_diag) end if @@ -1125,7 +1125,7 @@ subroutine setuplight(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,light_di ! Write information to a diagnostics file if(light_diagsave .and. ii>0)then - if(netcdf_diag) call nc_diag_write + if(netcdf_diag(jiter)) call nc_diag_write if(binary_diag .and. ii>0)then write(lu_diag)" light",nchar,nreal,ii,mype write(lu_diag)diagbuf(:,1:ii) diff --git a/GEOSaana_GridComp/GSI_GridComp/setuplwcp.f90 b/GEOSaana_GridComp/GSI_GridComp/setuplwcp.f90 index 44cbfc6c..d27b0a5f 100644 --- a/GEOSaana_GridComp/GSI_GridComp/setuplwcp.f90 +++ b/GEOSaana_GridComp/GSI_GridComp/setuplwcp.f90 @@ -308,7 +308,7 @@ subroutine setuplwcp(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diag endif allocate(cdiagbuf(nobs),rdiagbuf(nreal,nobs)) ii=0 - if(netcdf_diag) call init_netcdf_diag_ + if(netcdf_diag(jiter)) call init_netcdf_diag_ end if @@ -614,7 +614,7 @@ subroutine setuplwcp(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diag ioff=ioff0 if(binary_diag) call contents_binary_diag_(my_diag) - if(netcdf_diag) call contents_netcdf_diag_(my_diag) + if(netcdf_diag(jiter)) call contents_netcdf_diag_(my_diag) end if @@ -625,7 +625,7 @@ subroutine setuplwcp(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diag ! Write information to diagnostic file if(conv_diagsave)then - if(netcdf_diag) call nc_diag_write + if(netcdf_diag(jiter)) call nc_diag_write if(binary_diag.and. ii>0)then write(7)'lwc',nchar,nreal,ii,mype,ioff0 write(7)cdiagbuf(1:ii),rdiagbuf(:,1:ii) diff --git a/GEOSaana_GridComp/GSI_GridComp/setupmitm.f90 b/GEOSaana_GridComp/GSI_GridComp/setupmitm.f90 index de5ad569..89461445 100644 --- a/GEOSaana_GridComp/GSI_GridComp/setupmitm.f90 +++ b/GEOSaana_GridComp/GSI_GridComp/setupmitm.f90 @@ -235,7 +235,7 @@ subroutine setupmitm(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diag if (lobsdiagsave) nreal=nreal+4*miter+1 if (twodvar_regional) then; nreal=nreal+2; allocate(cprvstg(nobs),csprvstg(nobs)); endif allocate(cdiagbuf(nobs),rdiagbuf(nreal,nobs)) - if (netcdf_diag) call init_netcdf_diag_ + if (netcdf_diag(jiter)) call init_netcdf_diag_ end if @@ -437,7 +437,7 @@ subroutine setupmitm(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diag if (err_final>tiny_r_kind) errinv_final = one/err_final if (binary_diag) call contents_binary_diag_(my_diag) - if (netcdf_diag) call contents_binary_diag_(my_diag) + if (netcdf_diag(jiter)) call contents_binary_diag_(my_diag) end if end do @@ -447,7 +447,7 @@ subroutine setupmitm(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diag ! Write information to diagnostic file if(conv_diagsave) then - if(netcdf_diag) call nc_diag_write + if(netcdf_diag(jiter)) call nc_diag_write if(binary_diag .and. ii>0)then write(7)'mit',nchar,nreal,ii,mype,ioff0 write(7)cdiagbuf(1:ii),rdiagbuf(:,1:ii) diff --git a/GEOSaana_GridComp/GSI_GridComp/setupmxtm.f90 b/GEOSaana_GridComp/GSI_GridComp/setupmxtm.f90 index 4ff41d7f..901cba6e 100644 --- a/GEOSaana_GridComp/GSI_GridComp/setupmxtm.f90 +++ b/GEOSaana_GridComp/GSI_GridComp/setupmxtm.f90 @@ -235,7 +235,7 @@ subroutine setupmxtm(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diag if (lobsdiagsave) nreal=nreal+4*miter+1 if (twodvar_regional) then; nreal=nreal+2; allocate(cprvstg(nobs),csprvstg(nobs)); endif allocate(cdiagbuf(nobs),rdiagbuf(nreal,nobs)) - if(netcdf_diag) call init_netcdf_diag_ + if(netcdf_diag(jiter)) call init_netcdf_diag_ end if @@ -437,7 +437,7 @@ subroutine setupmxtm(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diag if (err_final>tiny_r_kind) errinv_final = one/err_final if(binary_diag) call contents_binary_diag_(my_diag) - if(netcdf_diag) call contents_netcdf_diag_(my_diag) + if(netcdf_diag(jiter)) call contents_netcdf_diag_(my_diag) end if end do @@ -447,7 +447,7 @@ subroutine setupmxtm(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diag ! Write information to diagnostic file if(conv_diagsave) then - if(netcdf_diag) call nc_diag_write + if(netcdf_diag(jiter)) call nc_diag_write if(binary_diag .and. ii>0)then write(7)'mxt',nchar,nreal,ii,mype,ioff0 write(7)cdiagbuf(1:ii),rdiagbuf(:,1:ii) diff --git a/GEOSaana_GridComp/GSI_GridComp/setupoz.f90 b/GEOSaana_GridComp/GSI_GridComp/setupoz.f90 index f15a59d7..133dc4ac 100644 --- a/GEOSaana_GridComp/GSI_GridComp/setupoz.f90 +++ b/GEOSaana_GridComp/GSI_GridComp/setupoz.f90 @@ -334,7 +334,7 @@ subroutine setupozlay(obsLL,odiagLL,lunin,mype,stats_oz,nlevs,nreal,nobs,& endif allocate(rdiagbuf(irdim1,nlevs,nobs)) - if(netcdf_diag) call init_netcdf_diag_ + if(netcdf_diag(jiter)) call init_netcdf_diag_ end if @@ -578,7 +578,7 @@ subroutine setupozlay(obsLL,odiagLL,lunin,mype,stats_oz,nlevs,nreal,nobs,& idia = idia+size(dhx_dx) endif - if (netcdf_diag) then + if (netcdf_diag(jiter)) then k1 = k k2 = k - 1 if(k2 == 0)k2 = 1 @@ -798,7 +798,7 @@ subroutine setupozlay(obsLL,odiagLL,lunin,mype,stats_oz,nlevs,nreal,nobs,& enddo end associate ! odiag - if (netcdf_diag) then + if (netcdf_diag(jiter)) then ! TBD: Sensitivities must be written out in coordination w/ rest of obs ! associate(odiag => my_diagLL%tail) ! call nc_diag_data2d("ObsDiagSave_iuse", obsdiag_iuse ) @@ -827,7 +827,7 @@ subroutine setupozlay(obsLL,odiagLL,lunin,mype,stats_oz,nlevs,nreal,nobs,& ! If requested, write to diagnostic file if (ozone_diagsave) then - if (netcdf_diag) call nc_diag_write + if (netcdf_diag(jiter)) call nc_diag_write if (binary_diag .and. ii>0) then filex=obstype @@ -1206,7 +1206,7 @@ subroutine setupozlev(obsLL,odiagLL,lunin,mype,stats_oz,nlevs,nreal,nobs,& endif allocate(rdiagbuf(irdim1,1,nobs)) rdiagbuf=0._r_single - if(netcdf_diag) call init_netcdf_diag_ + if(netcdf_diag(jiter)) call init_netcdf_diag_ end if ! index information for data array (see reading routine) @@ -1484,14 +1484,14 @@ subroutine setupozlev(obsLL,odiagLL,lunin,mype,stats_oz,nlevs,nreal,nobs,& errorinv = sqrt(varinv3*rat_err2) if (binary_diag) call contents_binary_diag_(my_diag) - if (netcdf_diag) call contents_netcdf_diag_(my_diag) + if (netcdf_diag(jiter)) call contents_netcdf_diag_(my_diag) end if !end if(ozone_diagsave ) end do ! end do i=1,nobs ! If requested, write to diagnostic file if (ozone_diagsave) then - if (netcdf_diag) call nc_diag_write + if (netcdf_diag(jiter)) call nc_diag_write if (binary_diag .and. ii>0) then filex=obstype write(string,100) jiter diff --git a/GEOSaana_GridComp/GSI_GridComp/setuppblh.f90 b/GEOSaana_GridComp/GSI_GridComp/setuppblh.f90 index ea65c4d6..06e0013e 100644 --- a/GEOSaana_GridComp/GSI_GridComp/setuppblh.f90 +++ b/GEOSaana_GridComp/GSI_GridComp/setuppblh.f90 @@ -213,7 +213,7 @@ subroutine setuppblh(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diag nreal=ioff0 if (lobsdiagsave) nreal=nreal+4*miter+1 allocate(cdiagbuf(nobs),rdiagbuf(nreal,nobs)) - if(netcdf_diag) call init_netcdf_diag_ + if(netcdf_diag(jiter)) call init_netcdf_diag_ end if halfpi = half*pi @@ -404,7 +404,7 @@ subroutine setuppblh(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diag if (err_final>tiny_r_kind) errinv_final = one/err_final if(binary_diag) call contents_binary_diag_(my_diag) - if(netcdf_diag) call contents_netcdf_diag_(my_diag) + if(netcdf_diag(jiter)) call contents_netcdf_diag_(my_diag) end if @@ -416,7 +416,7 @@ subroutine setuppblh(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diag ! Write information to diagnostic file if(conv_diagsave) then - if(netcdf_diag) call nc_diag_write + if(netcdf_diag(jiter)) call nc_diag_write if(binary_diag .and. ii>0)then write(7)'pbl',nchar,nreal,ii,mype,ioff0 write(7)cdiagbuf(1:ii),rdiagbuf(:,1:ii) diff --git a/GEOSaana_GridComp/GSI_GridComp/setuppm10.f90 b/GEOSaana_GridComp/GSI_GridComp/setuppm10.f90 index ec6f6341..046c0937 100644 --- a/GEOSaana_GridComp/GSI_GridComp/setuppm10.f90 +++ b/GEOSaana_GridComp/GSI_GridComp/setuppm10.f90 @@ -441,7 +441,7 @@ subroutine setuppm10(obsLL,odiagLL,lunin,mype,nreal,nobs,isis,is,conv_diagsave) ii=0 if (lobsdiagsave) nrealdiag=nrealdiag+4*miter+1 allocate(cdiagbuf(nobs),rdiagbuf(nrealdiag,nobs)) - if (netcdf_diag) call init_netcdf_diag_ + if (netcdf_diag(jiter)) call init_netcdf_diag_ end if mm1=mype+1 @@ -635,7 +635,7 @@ subroutine setuppm10(obsLL,odiagLL,lunin,mype,nreal,nobs,isis,is,conv_diagsave) if (err_final>tiny_r_kind) errinv_final=one/err_final if (binary_diag) call contents_binary_diag_(my_diag) - if (netcdf_diag) call contents_netcdf_diag_(my_diag) + if (netcdf_diag(jiter)) call contents_netcdf_diag_(my_diag) endif @@ -656,7 +656,7 @@ subroutine setuppm10(obsLL,odiagLL,lunin,mype,nreal,nobs,isis,is,conv_diagsave) !! write information to diagnostic file if(conv_diagsave) then - if(netcdf_diag) call nc_diag_write + if(netcdf_diag(jiter)) call nc_diag_write if(binary_diag .and.ii>0) then write(7)cvar,nchar,nrealdiag,ii,mype,nrealdiag write(7)cdiagbuf(1:ii),rdiagbuf(:,1:ii) diff --git a/GEOSaana_GridComp/GSI_GridComp/setuppm2_5.f90 b/GEOSaana_GridComp/GSI_GridComp/setuppm2_5.f90 index 9aad6b7b..97545a7e 100644 --- a/GEOSaana_GridComp/GSI_GridComp/setuppm2_5.f90 +++ b/GEOSaana_GridComp/GSI_GridComp/setuppm2_5.f90 @@ -430,7 +430,7 @@ subroutine setuppm2_5(obsLL,odiagLL,lunin,mype,nreal,nobs,isis,is,conv_diagsave) ii=0 if (lobsdiagsave) nrealdiag=nrealdiag+4*miter+1 allocate(cdiagbuf(nobs),rdiagbuf(nrealdiag,nobs)) - if (netcdf_diag) call init_netcdf_diag_ + if (netcdf_diag(jiter)) call init_netcdf_diag_ end if mm1=mype+1 @@ -640,7 +640,7 @@ subroutine setuppm2_5(obsLL,odiagLL,lunin,mype,nreal,nobs,isis,is,conv_diagsave) if (err_final>tiny_r_kind) errinv_final=one/err_final if (binary_diag) call contents_binary_diag_(my_diag) - if (netcdf_diag) call contents_netcdf_diag_(my_diag) + if (netcdf_diag(jiter)) call contents_netcdf_diag_(my_diag) endif @@ -661,7 +661,7 @@ subroutine setuppm2_5(obsLL,odiagLL,lunin,mype,nreal,nobs,isis,is,conv_diagsave) !! write information to diagnostic file if(conv_diagsave) then - if(netcdf_diag) call nc_diag_write + if(netcdf_diag(jiter)) call nc_diag_write if(binary_diag .and.ii>0) then write(7)cvar,nchar,nrealdiag,ii,mype,nrealdiag write(7)cdiagbuf(1:ii),rdiagbuf(:,1:ii) diff --git a/GEOSaana_GridComp/GSI_GridComp/setuppmsl.f90 b/GEOSaana_GridComp/GSI_GridComp/setuppmsl.f90 index 9f407df0..f341c69b 100644 --- a/GEOSaana_GridComp/GSI_GridComp/setuppmsl.f90 +++ b/GEOSaana_GridComp/GSI_GridComp/setuppmsl.f90 @@ -220,7 +220,7 @@ subroutine setuppmsl(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diag if (lobsdiagsave) nreal=nreal+4*miter+1 if (twodvar_regional) then; nreal=nreal+2; allocate(cprvstg(nobs),csprvstg(nobs)); endif allocate(cdiagbuf(nobs),rdiagbuf(nreal,nobs)) - if(netcdf_diag) call init_netcdf_diag_ + if(netcdf_diag(jiter)) call init_netcdf_diag_ end if @@ -415,7 +415,7 @@ subroutine setuppmsl(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diag if (err_final>tiny_r_kind) errinv_final = one/err_final if(binary_diag) call contents_binary_diag_(my_diag) - if(netcdf_diag) call contents_netcdf_diag_(my_diag) + if(netcdf_diag(jiter)) call contents_netcdf_diag_(my_diag) end if end do @@ -425,7 +425,7 @@ subroutine setuppmsl(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diag ! Write information to diagnostic file if(conv_diagsave)then - if(netcdf_diag) call nc_diag_write + if(netcdf_diag(jiter)) call nc_diag_write if(binary_diag .and. ii>0)then write(7)'psl',nchar,nreal,ii,mype,ioff0 write(7)cdiagbuf(1:ii),rdiagbuf(:,1:ii) diff --git a/GEOSaana_GridComp/GSI_GridComp/setupps.f90 b/GEOSaana_GridComp/GSI_GridComp/setupps.f90 index 7438a517..39881dd6 100644 --- a/GEOSaana_GridComp/GSI_GridComp/setupps.f90 +++ b/GEOSaana_GridComp/GSI_GridComp/setupps.f90 @@ -380,7 +380,7 @@ subroutine setupps(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diagsa endif allocate(cdiagbuf(nobs),rdiagbuf(nreal,nobs)) ii=0 - if(netcdf_diag.and.nobs>0) call init_netcdf_diag_ + if(netcdf_diag(jiter).and.nobs>0) call init_netcdf_diag_ end if call dtime_setup() @@ -792,7 +792,7 @@ subroutine setupps(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diagsa if (err_final>tiny_single) errinv_final = one/err_final if(binary_diag) call contents_binary_diag_(my_diag) - if(netcdf_diag) call contents_netcdf_diag_(my_diag) + if(netcdf_diag(jiter)) call contents_netcdf_diag_(my_diag) end if @@ -805,7 +805,7 @@ subroutine setupps(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diagsa ! Write information to diagnostic file if(conv_diagsave)then - if(netcdf_diag .and. nobs>0) call nc_diag_write + if(netcdf_diag(jiter) .and. nobs>0) call nc_diag_write if(binary_diag .and. ii>0)then write(7)' ps',nchar,nreal,ii,mype,ioff0 write(7)cdiagbuf(1:ii),rdiagbuf(:,1:ii) diff --git a/GEOSaana_GridComp/GSI_GridComp/setuppw.f90 b/GEOSaana_GridComp/GSI_GridComp/setuppw.f90 index 05b26d6b..331a4edf 100644 --- a/GEOSaana_GridComp/GSI_GridComp/setuppw.f90 +++ b/GEOSaana_GridComp/GSI_GridComp/setuppw.f90 @@ -265,7 +265,7 @@ subroutine setuppw(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diagsa endif allocate(cdiagbuf(nobs),rdiagbuf(nreal,nobs)) ii=0 - if(netcdf_diag.and.nobs>0) call init_netcdf_diag_ + if(netcdf_diag(jiter).and.nobs>0) call init_netcdf_diag_ end if @@ -507,7 +507,7 @@ subroutine setuppw(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diagsa if (err_final>tiny_r_kind) errinv_final=one/err_final if(binary_diag) call contents_binary_diag_(my_diag) - if(netcdf_diag) call contents_netcdf_diag_(my_diag) + if(netcdf_diag(jiter)) call contents_netcdf_diag_(my_diag) end if @@ -519,7 +519,7 @@ subroutine setuppw(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diagsa ! Write information to diagnostic file if(conv_diagsave)then - if(netcdf_diag .and. nobs>0) call nc_diag_write + if(netcdf_diag(jiter) .and. nobs>0) call nc_diag_write if(binary_diag .and. ii>0)then write(7)' pw',nchar,nreal,ii,mype,ioff0 write(7)cdiagbuf(1:ii),rdiagbuf(:,1:ii) diff --git a/GEOSaana_GridComp/GSI_GridComp/setupq.f90 b/GEOSaana_GridComp/GSI_GridComp/setupq.f90 index 7a97541b..71b3ac20 100644 --- a/GEOSaana_GridComp/GSI_GridComp/setupq.f90 +++ b/GEOSaana_GridComp/GSI_GridComp/setupq.f90 @@ -440,7 +440,7 @@ subroutine setupq(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diagsav endif allocate(cdiagbuf(nobs),rdiagbuf(nreal,nobs)) if(l_pbl_pseudo_surfobsq) allocate(cdiagbufp(nobs*3),rdiagbufp(nreal,nobs*3)) - if(netcdf_diag.and.nobs>0) call init_netcdf_diag_ + if(netcdf_diag(jiter).and.nobs>0) call init_netcdf_diag_ end if rsig=nsig @@ -949,7 +949,7 @@ subroutine setupq(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diagsav if (err_final>tiny_r_kind) errinv_final = one/err_final if(binary_diag) call contents_binary_diag_(my_diag) - if(netcdf_diag) call contents_netcdf_diag_(my_diag) + if(netcdf_diag(jiter)) call contents_netcdf_diag_(my_diag) end if @@ -1042,7 +1042,7 @@ subroutine setupq(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diagsav else iip=3*nobs endif - if(netcdf_diag) call contents_netcdf_diagp_() + if(netcdf_diag(jiter)) call contents_netcdf_diagp_() endif !conv_diagsave .and. luse(i)) prest = prest - pps_press_incr @@ -1061,7 +1061,7 @@ subroutine setupq(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diagsav ! Write information to diagnostic file if(conv_diagsave) then - if(netcdf_diag.and.nobs>0) call nc_diag_write + if(netcdf_diag(jiter).and.nobs>0) call nc_diag_write if(binary_diag .and. ii>0)then write(7)' q',nchar,nreal,ii+iip,mype,ioff0 if(l_pbl_pseudo_surfobsq .and. iip>0) then diff --git a/GEOSaana_GridComp/GSI_GridComp/setuprad.f90 b/GEOSaana_GridComp/GSI_GridComp/setuprad.f90 index 29c22d38..6844c8d0 100755 --- a/GEOSaana_GridComp/GSI_GridComp/setuprad.f90 +++ b/GEOSaana_GridComp/GSI_GridComp/setuprad.f90 @@ -780,7 +780,7 @@ subroutine setuprad(obsLL,odiagLL,lunin,mype,aivals,stats,nchanl,nreal,nobs,& ! If diagnostic file requested, open unit to file and write header. if (rad_diagsave .and. nchanl_diag > 0) then if (binary_diag) call init_binary_diag_ - if (netcdf_diag) call init_netcdf_diag_ + if (netcdf_diag(jiter)) call init_netcdf_diag_ endif ! Load data array for current satellite @@ -2164,7 +2164,7 @@ subroutine setuprad(obsLL,odiagLL,lunin,mype,aivals,stats,nchanl,nreal,nobs,& if (rad_diagsave .and. luse(n) .and. nchanl_diag > 0) then if (binary_diag) call contents_binary_diag_(odiags(:),is,ioid(n)) - if (netcdf_diag) call contents_netcdf_diag_(odiags(:),is,ioid(n)) + if (netcdf_diag(jiter)) call contents_netcdf_diag_(odiags(:),is,ioid(n)) end if endif ! (in_curbin) @@ -2182,7 +2182,7 @@ subroutine setuprad(obsLL,odiagLL,lunin,mype,aivals,stats,nchanl,nreal,nobs,& deallocate(sc_index) if (rad_diagsave) then - if (netcdf_diag) call nc_diag_write + if (netcdf_diag(jiter)) call nc_diag_write if(binary_diag) call final_binary_diag_ if (lextra .and. allocated(diagbufex)) deallocate(diagbufex) endif diff --git a/GEOSaana_GridComp/GSI_GridComp/setuprw.f90 b/GEOSaana_GridComp/GSI_GridComp/setuprw.f90 index 6dff0e0d..6e9af54f 100644 --- a/GEOSaana_GridComp/GSI_GridComp/setuprw.f90 +++ b/GEOSaana_GridComp/GSI_GridComp/setuprw.f90 @@ -297,7 +297,7 @@ subroutine setuprw(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diagsa nreal = nreal + size(dhx_dx) endif allocate(cdiagbuf(nobs),rdiagbuf(nreal,nobs)) - if(netcdf_diag.and.nobs>0) call init_netcdf_diag_ + if(netcdf_diag(jiter).and.nobs>0) call init_netcdf_diag_ end if mm1=mype+1 @@ -795,7 +795,7 @@ subroutine setuprw(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diagsa if (err_final>tiny_r_kind) errinv_final = one/err_final if (binary_diag) call contents_binary_diag_(my_diag) - if (netcdf_diag) call contents_netcdf_diag_(my_diag) + if (netcdf_diag(jiter)) call contents_netcdf_diag_(my_diag) end if end do @@ -805,7 +805,7 @@ subroutine setuprw(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diagsa ! Write information to diagnostic file if(conv_diagsave)then - if(netcdf_diag.and.nobs>0) call nc_diag_write + if(netcdf_diag(jiter).and.nobs>0) call nc_diag_write if(binary_diag .and. ii>0)then write(7)' rw',nchar,nreal,ii,mype,ioff0 write(7)cdiagbuf(1:ii),rdiagbuf(:,1:ii) diff --git a/GEOSaana_GridComp/GSI_GridComp/setupspd.f90 b/GEOSaana_GridComp/GSI_GridComp/setupspd.f90 index 190c0d3f..63b97560 100644 --- a/GEOSaana_GridComp/GSI_GridComp/setupspd.f90 +++ b/GEOSaana_GridComp/GSI_GridComp/setupspd.f90 @@ -276,7 +276,7 @@ subroutine setupspd(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diags nreal = nreal + size(dhx_dx) endif allocate(cdiagbuf(nobs),rdiagbuf(nreal,nobs)) - if(netcdf_diag.and.nobs>0) call init_netcdf_diag_ + if(netcdf_diag(jiter).and.nobs>0) call init_netcdf_diag_ end if @@ -651,7 +651,7 @@ subroutine setupspd(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diags if (err_final>tiny_r_kind) errinv_final = one/err_final if(binary_diag) call contents_binary_diag_(my_diag) - if(netcdf_diag) call contents_netcdf_diag_(my_diag) + if(netcdf_diag(jiter)) call contents_netcdf_diag_(my_diag) end if @@ -663,7 +663,7 @@ subroutine setupspd(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diags ! Write information to diagnostic file if(conv_diagsave) then - if(netcdf_diag.and.nobs>0) call nc_diag_write + if(netcdf_diag(jiter).and.nobs>0) call nc_diag_write if(binary_diag .and. ii>0)then write(7)'spd',nchar,nreal,ii,mype,ioff0 write(7)cdiagbuf(1:ii),rdiagbuf(:,1:ii) diff --git a/GEOSaana_GridComp/GSI_GridComp/setupsst.f90 b/GEOSaana_GridComp/GSI_GridComp/setupsst.f90 index 448cd3e6..7e08af53 100644 --- a/GEOSaana_GridComp/GSI_GridComp/setupsst.f90 +++ b/GEOSaana_GridComp/GSI_GridComp/setupsst.f90 @@ -244,7 +244,7 @@ subroutine setupsst(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diags nreal=ioff0 if (lobsdiagsave) nreal=nreal+4*miter+1 allocate(cdiagbuf(nobs),rdiagbuf(nreal,nobs)) - if(netcdf_diag) call init_netcdf_diag_ + if(netcdf_diag(jiter)) call init_netcdf_diag_ end if halfpi = half*pi @@ -462,14 +462,14 @@ subroutine setupsst(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diags if (err_final>tiny_r_kind) errinv_final = one/err_final if (binary_diag) call contents_binary_diag_(my_diag) - if (netcdf_diag) call contents_netcdf_diag_(my_diag) + if (netcdf_diag(jiter)) call contents_netcdf_diag_(my_diag) end if end do ! do i=1,nobs ! Write information to diagnostic file if(conv_diagsave)then - if(netcdf_diag) call nc_diag_write + if(netcdf_diag(jiter)) call nc_diag_write if(binary_diag .and. ii>0)then write(7)'sst',nchar,nreal,ii,mype,ioff0 write(7)cdiagbuf(1:ii),rdiagbuf(:,1:ii) diff --git a/GEOSaana_GridComp/GSI_GridComp/setupswcp.f90 b/GEOSaana_GridComp/GSI_GridComp/setupswcp.f90 index e2f7680e..d0047703 100644 --- a/GEOSaana_GridComp/GSI_GridComp/setupswcp.f90 +++ b/GEOSaana_GridComp/GSI_GridComp/setupswcp.f90 @@ -302,7 +302,7 @@ subroutine setupswcp(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diag endif allocate(cdiagbuf(nobs),rdiagbuf(nreal,nobs)) ii=0 - if(netcdf_diag) call init_netcdf_diag_ + if(netcdf_diag(jiter)) call init_netcdf_diag_ end if @@ -619,7 +619,7 @@ subroutine setupswcp(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diag ioff=ioff0 if(binary_diag) call contents_binary_diag_(my_diag) - if(netcdf_diag) call contents_netcdf_diag_(my_diag) + if(netcdf_diag(jiter)) call contents_netcdf_diag_(my_diag) end if @@ -630,7 +630,7 @@ subroutine setupswcp(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diag ! Write information to diagnostic file if(conv_diagsave)then - if(netcdf_diag) call nc_diag_write + if(netcdf_diag(jiter)) call nc_diag_write if(binary_diag.and. ii>0)then write(7)'swc',nchar,nreal,ii,mype,ioff0 write(7)cdiagbuf(1:ii),rdiagbuf(:,1:ii) diff --git a/GEOSaana_GridComp/GSI_GridComp/setupt.f90 b/GEOSaana_GridComp/GSI_GridComp/setupt.f90 index 458deb9d..59566a1d 100644 --- a/GEOSaana_GridComp/GSI_GridComp/setupt.f90 +++ b/GEOSaana_GridComp/GSI_GridComp/setupt.f90 @@ -525,7 +525,7 @@ subroutine setupt(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diagsav allocate(cdiagbuf(nobs),rdiagbuf(nreal,nobs)) if(l_pbl_pseudo_surfobst) allocate(cdiagbufp(nobs*3),rdiagbufp(nreal,nobs*3)) rdiagbuf=zero - if(netcdf_diag.and.nobs>0) call init_netcdf_diag_ + if(netcdf_diag(jiter).and.nobs>0) call init_netcdf_diag_ end if scale=one rsig=float(nsig) @@ -1259,7 +1259,7 @@ subroutine setupt(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diagsav if (err_final>tiny_r_kind) errinv_final=one/err_final if(binary_diag) call contents_binary_diag_(my_diag) - if(netcdf_diag) call contents_netcdf_diag_(my_diag) + if(netcdf_diag(jiter)) call contents_netcdf_diag_(my_diag) end if @@ -1375,7 +1375,7 @@ subroutine setupt(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diagsav else iip=nobs endif - if(netcdf_diag) call contents_netcdf_diagp_ + if(netcdf_diag(jiter)) call contents_netcdf_diagp_ end if prest = prest - pps_press_incr @@ -1394,7 +1394,7 @@ subroutine setupt(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diagsav call final_vars_ ! Write information to diagnostic file if(conv_diagsave)then - if(netcdf_diag.and.nobs>0.and.do_nc_diag) call nc_diag_write + if(netcdf_diag(jiter).and.nobs>0.and.do_nc_diag) call nc_diag_write if(binary_diag .and. ii>0)then write(7)' t',nchar,nreal,ii+iip,mype,idia0 if(l_pbl_pseudo_surfobst .and. iip>0) then diff --git a/GEOSaana_GridComp/GSI_GridComp/setuptcamt.f90 b/GEOSaana_GridComp/GSI_GridComp/setuptcamt.f90 index c353307d..26c1b90d 100644 --- a/GEOSaana_GridComp/GSI_GridComp/setuptcamt.f90 +++ b/GEOSaana_GridComp/GSI_GridComp/setuptcamt.f90 @@ -240,7 +240,7 @@ subroutine setuptcamt(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_dia if (lobsdiagsave) nreal=nreal+4*miter+1 allocate(cdiagbuf(nobs),rdiagbuf(nreal,nobs)) allocate(cprvstg(nobs),csprvstg(nobs)) - if(netcdf_diag) call init_netcdf_diag_ + if(netcdf_diag(jiter)) call init_netcdf_diag_ end if call dtime_setup() @@ -426,7 +426,7 @@ subroutine setuptcamt(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_dia if (err_final>tiny_r_kind) errinv_final = one/err_final if(binary_diag) call contents_binary_diag_(my_diag) - if(netcdf_diag) call contents_netcdf_diag_(my_diag) + if(netcdf_diag(jiter)) call contents_netcdf_diag_(my_diag) end if @@ -438,7 +438,7 @@ subroutine setuptcamt(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_dia ! Write information to diagnostic file if(conv_diagsave)then - if(netcdf_diag) call nc_diag_write + if(netcdf_diag(jiter)) call nc_diag_write if(binary_diag)then write(7)'tca',nchar,nreal,ii,mype,ioff0 write(7)cdiagbuf(1:ii),rdiagbuf(:,1:ii) diff --git a/GEOSaana_GridComp/GSI_GridComp/setuptcp.f90 b/GEOSaana_GridComp/GSI_GridComp/setuptcp.f90 index 72b8b8ce..3b00e767 100644 --- a/GEOSaana_GridComp/GSI_GridComp/setuptcp.f90 +++ b/GEOSaana_GridComp/GSI_GridComp/setuptcp.f90 @@ -203,7 +203,7 @@ subroutine setuptcp(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diags endif allocate(cdiagbuf(nobs),rdiagbuf(nreal,nobs)) ii=0 - if(netcdf_diag) call init_netcdf_diag_ + if(netcdf_diag(jiter)) call init_netcdf_diag_ end if @@ -462,7 +462,7 @@ subroutine setuptcp(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diags if (err_final>tiny_single) errinv_final = one/err_final if(binary_diag) call contents_binary_diag_(my_diag) - if(netcdf_diag) call contents_netcdf_diag_(my_diag) + if(netcdf_diag(jiter)) call contents_netcdf_diag_(my_diag) end if ! conv_diagsave .true. and luse .true. @@ -474,7 +474,7 @@ subroutine setuptcp(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diags ! Write information to diagnostic file if(conv_diagsave)then - if(netcdf_diag) call nc_diag_write + if(netcdf_diag(jiter)) call nc_diag_write if(binary_diag .and. ii>0)then write(7)'tcp',nchar,nreal,ii,mype,idia0 write(7)cdiagbuf(1:ii),rdiagbuf(:,1:ii) diff --git a/GEOSaana_GridComp/GSI_GridComp/setuptd2m.f90 b/GEOSaana_GridComp/GSI_GridComp/setuptd2m.f90 index e0880c0d..127ffc4e 100644 --- a/GEOSaana_GridComp/GSI_GridComp/setuptd2m.f90 +++ b/GEOSaana_GridComp/GSI_GridComp/setuptd2m.f90 @@ -221,7 +221,7 @@ subroutine setuptd2m(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diag if (lobsdiagsave) nreal=nreal+4*miter+1 if (twodvar_regional) then; nreal=nreal+2; allocate(cprvstg(nobs),csprvstg(nobs)); endif allocate(cdiagbuf(nobs),rdiagbuf(nreal,nobs)) - if(netcdf_diag) call init_netcdf_diag_ + if(netcdf_diag(jiter)) call init_netcdf_diag_ end if @@ -424,7 +424,7 @@ subroutine setuptd2m(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diag if (err_final>tiny_r_kind) errinv_final = one/err_final if(binary_diag) call contents_binary_diag_(my_diag) - if(netcdf_diag) call contents_netcdf_diag_(my_diag) + if(netcdf_diag(jiter)) call contents_netcdf_diag_(my_diag) end if end do @@ -434,7 +434,7 @@ subroutine setuptd2m(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diag ! Write information to diagnostic file if(conv_diagsave)then - if(netcdf_diag) call nc_diag_write + if(netcdf_diag(jiter)) call nc_diag_write if(binary_diag .and. ii>0)then write(7)'td2',nchar,nreal,ii,mype,ioff0 write(7)cdiagbuf(1:ii),rdiagbuf(:,1:ii) diff --git a/GEOSaana_GridComp/GSI_GridComp/setupuwnd10m.f90 b/GEOSaana_GridComp/GSI_GridComp/setupuwnd10m.f90 index 7e227e08..4db251c3 100644 --- a/GEOSaana_GridComp/GSI_GridComp/setupuwnd10m.f90 +++ b/GEOSaana_GridComp/GSI_GridComp/setupuwnd10m.f90 @@ -279,7 +279,7 @@ subroutine setupuwnd10m(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_d if (lobsdiagsave) nreal=nreal+4*miter+1 if (twodvar_regional) then; nreal=nreal+2; allocate(cprvstg(nobs),csprvstg(nobs)); endif if (binary_diag) allocate(cdiagbuf(nobs),rdiagbuf(nreal,nobs)) - if (netcdf_diag) call init_netcdf_diag_ + if (netcdf_diag(jiter)) call init_netcdf_diag_ end if call dtime_setup() @@ -666,7 +666,7 @@ subroutine setupuwnd10m(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_d if (err_final>tiny_r_kind) errinv_final = one/err_final if (binary_diag) call contents_binary_diag_(my_diag) - if (netcdf_diag) call contents_netcdf_diag_(my_diag) + if (netcdf_diag(jiter)) call contents_netcdf_diag_(my_diag) end if @@ -678,7 +678,7 @@ subroutine setupuwnd10m(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_d ! Write information to diagnostic file if(conv_diagsave .and. ii>0)then - if(netcdf_diag) call nc_diag_write + if(netcdf_diag(jiter)) call nc_diag_write if(binary_diag) then write(7)'uwn',nchar,nreal,ii,mype,ioff0 write(7)cdiagbuf(1:ii),rdiagbuf(:,1:ii) diff --git a/GEOSaana_GridComp/GSI_GridComp/setupvis.f90 b/GEOSaana_GridComp/GSI_GridComp/setupvis.f90 index e489dfbb..60e9260c 100644 --- a/GEOSaana_GridComp/GSI_GridComp/setupvis.f90 +++ b/GEOSaana_GridComp/GSI_GridComp/setupvis.f90 @@ -250,7 +250,7 @@ subroutine setupvis(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diags if (lobsdiagsave) nreal=nreal+4*miter+1 allocate(cdiagbuf(nobs),rdiagbuf(nreal,nobs)) allocate(cprvstg(nobs),csprvstg(nobs)) - if(netcdf_diag) call init_netcdf_diag_ + if(netcdf_diag(jiter)) call init_netcdf_diag_ end if mm1=mype+1 @@ -449,7 +449,7 @@ subroutine setupvis(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diags if (err_final>tiny_r_kind) errinv_final = one/err_final if(binary_diag) call contents_binary_diag_(my_diag) - if(netcdf_diag) call contents_netcdf_diag_(my_diag) + if(netcdf_diag(jiter)) call contents_netcdf_diag_(my_diag) end if end do @@ -459,7 +459,7 @@ subroutine setupvis(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diags ! Write information to diagnostic file if(conv_diagsave) then - if(netcdf_diag) call nc_diag_write + if(netcdf_diag(jiter)) call nc_diag_write if(binary_diag .and. ii>0)then write(7)'vis',nchar,nreal,ii,mype,ioff0 write(7)cdiagbuf(1:ii),rdiagbuf(:,1:ii) diff --git a/GEOSaana_GridComp/GSI_GridComp/setupvwnd10m.f90 b/GEOSaana_GridComp/GSI_GridComp/setupvwnd10m.f90 index a667f73b..b6b64732 100644 --- a/GEOSaana_GridComp/GSI_GridComp/setupvwnd10m.f90 +++ b/GEOSaana_GridComp/GSI_GridComp/setupvwnd10m.f90 @@ -279,7 +279,7 @@ subroutine setupvwnd10m(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_d if (lobsdiagsave) nreal=nreal+4*miter+1 if (twodvar_regional) then; nreal=nreal+2; allocate(cprvstg(nobs),csprvstg(nobs)); endif if (binary_diag) allocate(cdiagbuf(nobs),rdiagbuf(nreal,nobs)) - if (netcdf_diag) call init_netcdf_diag_ + if (netcdf_diag(jiter)) call init_netcdf_diag_ end if call dtime_setup() @@ -666,7 +666,7 @@ subroutine setupvwnd10m(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_d if (err_final>tiny_r_kind) errinv_final = one/err_final if (binary_diag) call contents_binary_diag_(my_diag) - if (netcdf_diag) call contents_netcdf_diag_(my_diag) + if (netcdf_diag(jiter)) call contents_netcdf_diag_(my_diag) end if @@ -678,7 +678,7 @@ subroutine setupvwnd10m(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_d ! Write information to diagnostic file if(conv_diagsave .and. ii>0)then - if(netcdf_diag) call nc_diag_write + if(netcdf_diag(jiter)) call nc_diag_write if(binary_diag) then write(7)'uwn',nchar,nreal,ii,mype,ioff0 write(7)cdiagbuf(1:ii),rdiagbuf(:,1:ii) diff --git a/GEOSaana_GridComp/GSI_GridComp/setupw.f90 b/GEOSaana_GridComp/GSI_GridComp/setupw.f90 index db29d675..cd4490c0 100644 --- a/GEOSaana_GridComp/GSI_GridComp/setupw.f90 +++ b/GEOSaana_GridComp/GSI_GridComp/setupw.f90 @@ -416,7 +416,7 @@ subroutine setupw(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diagsav endif allocate(cdiagbuf(nobs),rdiagbuf(nreal,nobs)) - if (netcdf_diag.and.nobs>0) call init_netcdf_diag_ + if (netcdf_diag(jiter).and.nobs>0) call init_netcdf_diag_ end if num_bad_ikx=0 do i=1,nobs @@ -1497,7 +1497,7 @@ subroutine setupw(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diagsav if (err_final>tiny_r_kind) errinv_final = one/err_final if (binary_diag) call contents_binary_diag_(my_diagu,my_diagv) - if (netcdf_diag) call contents_netcdf_diag_(my_diagu,my_diagv) + if (netcdf_diag(jiter)) call contents_netcdf_diag_(my_diagu,my_diagv) endif @@ -1594,7 +1594,7 @@ subroutine setupw(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_diagsav ! Write information to diagnostic file if(conv_diagsave)then - if(netcdf_diag.and.nobs>0) call nc_diag_write + if(netcdf_diag(jiter).and.nobs>0) call nc_diag_write if(binary_diag .and. ii>0)then write(7)' uv',nchar,nreal,ii,mype,ioff0 write(7)cdiagbuf(1:ii),rdiagbuf(:,1:ii) diff --git a/GEOSaana_GridComp/GSI_GridComp/setupwspd10m.f90 b/GEOSaana_GridComp/GSI_GridComp/setupwspd10m.f90 index 044e8f93..ac1c26d0 100644 --- a/GEOSaana_GridComp/GSI_GridComp/setupwspd10m.f90 +++ b/GEOSaana_GridComp/GSI_GridComp/setupwspd10m.f90 @@ -268,7 +268,7 @@ subroutine setupwspd10m(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_d if (lobsdiagsave) nreal=nreal+4*miter+1 if (twodvar_regional) then; nreal=nreal+2; allocate(cprvstg(nobs),csprvstg(nobs)); endif allocate(cdiagbuf(nobs),rdiagbuf(nreal,nobs)) - if(netcdf_diag) call init_netcdf_diag_ + if(netcdf_diag(jiter)) call init_netcdf_diag_ end if call dtime_setup() @@ -649,7 +649,7 @@ subroutine setupwspd10m(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_d if (err_final>tiny_r_kind) errinv_final = one/err_final if(binary_diag) call contents_binary_diag_(my_diag) - if(netcdf_diag) call contents_netcdf_diag_(my_diag) + if(netcdf_diag(jiter)) call contents_netcdf_diag_(my_diag) end if @@ -661,7 +661,7 @@ subroutine setupwspd10m(obsLL,odiagLL,lunin,mype,bwork,awork,nele,nobs,is,conv_d ! Write information to diagnostic file if(conv_diagsave)then - if(netcdf_diag) call nc_diag_write + if(netcdf_diag(jiter)) call nc_diag_write if(binary_diag .and. ii>0)then write(7)'wst',nchar,nreal,ii,mype,ioff0 write(7)cdiagbuf(1:ii),rdiagbuf(:,1:ii) From aeb23473c3bc45854f46b188a4b91f89788faae2 Mon Sep 17 00:00:00 2001 From: Ricardo Todling Date: Fri, 24 Jul 2026 12:21:10 -0400 Subject: [PATCH 2/3] just for consistency --- GEOSaana_GridComp/GSI_GridComp/etc/R21C/gsi.rc.tmpl | 3 ++- GEOSaana_GridComp/GSI_GridComp/etc/R21C/gsi_sens.rc.tmpl | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/GEOSaana_GridComp/GSI_GridComp/etc/R21C/gsi.rc.tmpl b/GEOSaana_GridComp/GSI_GridComp/etc/R21C/gsi.rc.tmpl index 79d20e77..122b66ff 100644 --- a/GEOSaana_GridComp/GSI_GridComp/etc/R21C/gsi.rc.tmpl +++ b/GEOSaana_GridComp/GSI_GridComp/etc/R21C/gsi.rc.tmpl @@ -28,7 +28,8 @@ @4DHYB l4densvar=.true.,nmn_obsbin=@VAROBSBIN,iwrtinc=@IWRTINC,thin4d=.true., iorthomax=10, ens_nstarthr=3, - netcdf_diag=.false.,wrtgeovals=.false., + netcdf_diag(1)=.false.,netcdf_diag(2)=.false.,netcdf_diag(3)=.false., + wrtgeovals=.false., @RADBC newpc4pred=.true.,adp_anglebc=.true.,angord=4, @RADBC passive_bc=.true.,use_edges=.false., @RADBC diag_precon=.true.,step_start=1.e-3,emiss_bc=.true., diff --git a/GEOSaana_GridComp/GSI_GridComp/etc/R21C/gsi_sens.rc.tmpl b/GEOSaana_GridComp/GSI_GridComp/etc/R21C/gsi_sens.rc.tmpl index 23ccbeff..df349bd9 100644 --- a/GEOSaana_GridComp/GSI_GridComp/etc/R21C/gsi_sens.rc.tmpl +++ b/GEOSaana_GridComp/GSI_GridComp/etc/R21C/gsi_sens.rc.tmpl @@ -36,6 +36,7 @@ lobsdiagsave=.true., ens_nstarthr=3, tau_fcst=-1, + netcdf_diag(1)=.false.,netcdf_diag(2)=.false.,netcdf_diag(3)=.false., @RADBC newpc4pred=.true.,adp_anglebc=.true.,angord=4, @RADBC passive_bc=.true.,use_edges=.false., @RADBC diag_precon=.true.,step_start=1.e-3,emiss_bc=.true., From fa16b83cf8d82ee563929ba6e94dfb804d98444a Mon Sep 17 00:00:00 2001 From: Ricardo Todling Date: Fri, 24 Jul 2026 12:29:49 -0400 Subject: [PATCH 3/3] explain --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e212cb1f..86c8a3e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added ### Changed +24Jul2026: +- now able to write out ncdiags for specific jiter iteration 21Jul2026: - revise settings of jedi-gsi (closer to actual GSI)