Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion fix
28 changes: 14 additions & 14 deletions regression/regression_param.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ case $regtest in
topts[1]="0:10:00" ; popts[1]="18/8/" ; ropts[1]="/1"
topts[2]="0:10:00" ; popts[2]="18/10/" ; ropts[2]="/2"
elif [[ "$machine" = "wcoss2" ]]; then
topts[1]="0:10:00" ; popts[1]="12/8/" ; ropts[1]="/1"
topts[2]="0:10:00" ; popts[2]="12/10/" ; ropts[2]="/2"
topts[1]="1:10:00" ; popts[1]="12/8/" ; ropts[1]="/1"
topts[2]="1:10:00" ; popts[2]="12/10/" ; ropts[2]="/2"
fi

if [ "$debug" = ".true." ] ; then
Expand Down Expand Up @@ -102,8 +102,8 @@ case $regtest in
topts[1]="0:15:00" ; popts[1]="18/1/" ; ropts[1]="/1"
topts[2]="0:15:00" ; popts[2]="18/2/" ; ropts[2]="/1"
elif [[ "$machine" = "wcoss2" ]]; then
topts[1]="0:15:00" ; popts[1]="64/1/" ; ropts[1]="/1"
topts[2]="0:15:00" ; popts[2]="128/2/" ; ropts[2]="/1"
topts[1]="1:15:00" ; popts[1]="64/1/" ; ropts[1]="/1"
topts[2]="1:15:00" ; popts[2]="128/2/" ; ropts[2]="/1"
fi

if [ "$debug" = ".true." ] ; then
Expand Down Expand Up @@ -132,8 +132,8 @@ case $regtest in
topts[1]="0:15:00" ; popts[1]="18/1/" ; ropts[1]="/1"
topts[2]="0:15:00" ; popts[2]="18/2/" ; ropts[2]="/1"
elif [[ "$machine" = "wcoss2" ]]; then
topts[1]="0:15:00" ; popts[1]="64/1/" ; ropts[1]="/1"
topts[2]="0:15:00" ; popts[2]="128/2/" ; ropts[2]="/1"
topts[1]="1:15:00" ; popts[1]="64/1/" ; ropts[1]="/1"
topts[2]="1:15:00" ; popts[2]="128/2/" ; ropts[2]="/1"
fi

if [ "$debug" = ".true." ] ; then
Expand Down Expand Up @@ -161,8 +161,8 @@ case $regtest in
topts[1]="0:15:00" ; popts[1]="18/1/" ; ropts[1]="/1"
topts[2]="0:15:00" ; popts[2]="18/2/" ; ropts[2]="/1"
elif [[ "$machine" = "wcoss2" ]]; then
topts[1]="0:15:00" ; popts[1]="64/1/" ; ropts[1]="/1"
topts[2]="0:15:00" ; popts[2]="128/2/" ; ropts[2]="/1"
topts[1]="1:15:00" ; popts[1]="64/1/" ; ropts[1]="/1"
topts[2]="1:15:00" ; popts[2]="128/2/" ; ropts[2]="/1"
fi

if [ "$debug" = ".true." ] ; then
Expand Down Expand Up @@ -191,8 +191,8 @@ case $regtest in
topts[1]="0:15:00" ; popts[1]="4/4/" ; ropts[1]="/1"
topts[2]="0:15:00" ; popts[2]="6/6/" ; ropts[2]="/1"
elif [[ "$machine" = "wcoss2" ]]; then
topts[1]="0:15:00" ; popts[1]="28/1/" ; ropts[1]="/1"
topts[2]="0:15:00" ; popts[2]="28/2/" ; ropts[2]="/1"
topts[1]="1:15:00" ; popts[1]="28/1/" ; ropts[1]="/1"
topts[2]="1:15:00" ; popts[2]="28/2/" ; ropts[2]="/1"
fi

if [ "$debug" = ".true." ] ; then
Expand Down Expand Up @@ -221,8 +221,8 @@ case $regtest in
topts[1]="0:30:00" ; popts[1]="8/6/" ; ropts[1]="/1"
topts[2]="0:30:00" ; popts[2]="8/8/" ; ropts[2]="/1"
elif [[ "$machine" = "wcoss2" ]]; then
topts[1]="0:30:00" ; popts[1]="14/8/" ; ropts[1]="/1"
topts[2]="0:30:00" ; popts[2]="14/14/" ; ropts[2]="/2"
topts[1]="1:30:00" ; popts[1]="14/8/" ; ropts[1]="/1"
topts[2]="1:30:00" ; popts[2]="14/14/" ; ropts[2]="/2"
fi

if [ "$debug" = ".true." ] ; then
Expand Down Expand Up @@ -251,8 +251,8 @@ case $regtest in
topts[1]="0:10:00" ; popts[1]="12/3/" ; ropts[1]="/1"
topts[2]="0:10:00" ; popts[2]="12/5/" ; ropts[2]="/2"
elif [[ "$machine" = "wcoss2" ]]; then
topts[1]="0:10:00" ; popts[1]="16/2/" ; ropts[1]="/1"
topts[2]="0:10:00" ; popts[2]="16/4/" ; ropts[2]="/2"
topts[1]="1:10:00" ; popts[1]="16/2/" ; ropts[1]="/1"
topts[2]="1:10:00" ; popts[2]="16/4/" ; ropts[2]="/2"
fi

if [ "$debug" = ".true." ] ; then
Expand Down
2 changes: 2 additions & 0 deletions src/gsi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ find_package(NetCDF REQUIRED Fortran)
if(OPENMP)
find_package(OpenMP REQUIRED)
endif()
find_package(ZLIB REQUIRED)

# NCEPLibs dependencies
find_package(bacio REQUIRED)
Expand Down Expand Up @@ -157,6 +158,7 @@ target_link_libraries(gsi_fortran_obj PUBLIC w3emc::w3emc_d)
target_link_libraries(gsi_fortran_obj PUBLIC sp::sp_d)
target_link_libraries(gsi_fortran_obj PUBLIC bufr::bufr_d)
target_link_libraries(gsi_fortran_obj PUBLIC crtm::crtm)
target_link_libraries(gsi_fortran_obj PUBLIC ZLIB::ZLIB)
if(GSI_MODE MATCHES "Regional")
target_link_libraries(gsi_fortran_obj PUBLIC wrf_io::wrf_io)
endif()
Expand Down
5 changes: 3 additions & 2 deletions src/gsi/cmake/gsiapp_compiler_flags_Intel_Fortran.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -g -traceback -assume byterecl -
# RELEASE FLAGS
####################################################################

set(CMAKE_Fortran_FLAGS_RELEASE "-O3 -fp-model strict")
#clt set(CMAKE_Fortran_FLAGS_RELEASE "-O3 -fp-model strict")
set(CMAKE_Fortran_FLAGS_RELEASE "-O3 -fp-model strict -fimf-precision=hight -assume protect_parens -fma -qopt-report=3")

####################################################################
# DEBUG FLAGS
####################################################################

set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -init=snan,arrays -fp-model source -debug -ftrapuv -warn all,nointerfaces -check all,noarg_temp_created -fp-stack-check -fstack-protector")
set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -init=snan,arrays -fp-model source -debug -ftrapuv -warn all,nointerfaces -check all,noarg_temp_created -fp-stack-check -fstack-protector -fpe0")

####################################################################
# LINK FLAGS
Expand Down
3 changes: 2 additions & 1 deletion src/gsi/combine_radobs.f90
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ subroutine combine_radobs(mype_sub,mype_root,&
end if
deallocate(icrit)
allocate(data_all_in(nele,ndata))
data_all_in=zero
!$omp parallel do private(kk,k,l)
do kk=1,ndata
k=nloc(kk)
Expand All @@ -133,7 +134,7 @@ subroutine combine_radobs(mype_sub,mype_root,&
deallocate(nloc)

! get all data on process mype_root
! data_all(:,:) = zero
data_all(:,:) = zero
call mpi_reduce(data_all_in,data_all,nele*ndata,mpi_rtype,mpi_sum,&
mype_root,mpi_comm_sub,ierror)
deallocate(data_all_in)
Expand Down
24 changes: 16 additions & 8 deletions src/gsi/intrad.f90
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,8 @@ subroutine intrad_(radhead,rval,sval,rpred,spred)
enddo

tdir=zero
!$omp parallel do schedule(dynamic,1) private(k,i1,i2,i3,i4)
!clt #!$omp parallel do schedule(dynamic,1) private(k,i1,i2,i3,i4)
!$omp parallel do schedule(static,1) private(k,i1,i2,i3,i4)
do k=1,nsig
i1 = i1n(k)
i2 = i2n(k)
Expand Down Expand Up @@ -514,7 +515,8 @@ subroutine intrad_(radhead,rval,sval,rpred,spred)

if (.not. ladtest_obs) then
allocate(biasvect(radptr%nchan))
!$omp parallel do schedule(dynamic,1) private(nn,n,ic1,ix1,val_quad)
!clt !$omp parallel do schedule(dynamic,1) private(nn,n,ic1,ix1,val_quad)
!$omp parallel do schedule(static,1) private(nn,n,ic1,ix1,val_quad)
do nn=1,radptr%nchan
ic1=radptr%icx(nn)
ix1=(ic1-1)*npred
Expand All @@ -526,7 +528,8 @@ subroutine intrad_(radhead,rval,sval,rpred,spred)
end do
end if

!$omp parallel do schedule(dynamic,1) private(nn,k,ncr1,val_quad,mm)
!clt !$omp parallel do schedule(dynamic,1) private(nn,k,ncr1,val_quad,mm)
!$omp parallel do schedule(static,1) private(nn,k,ncr1,val_quad,mm)
do nn=1,radptr%nchan

! include observation increment and lapse rate contributions to bias correction
Expand Down Expand Up @@ -567,7 +570,8 @@ subroutine intrad_(radhead,rval,sval,rpred,spred)

if (l_do_adjoint) then
if (.not. lsaveobsens) then
!$omp parallel do schedule(dynamic,1) private(nn,ic,cg_rad,wnotgross,wgross,p0)
!clt !$omp parallel do schedule(dynamic,1) private(nn,ic,cg_rad,wnotgross,wgross,p0)
!$omp parallel do schedule(static,1) private(nn,ic,cg_rad,wnotgross,wgross,p0)
do nn=1,radptr%nchan
ic=radptr%icx(nn)
if( .not. ladtest_obs) val(nn)=val(nn)-radptr%res(nn)
Expand All @@ -591,7 +595,8 @@ subroutine intrad_(radhead,rval,sval,rpred,spred)
if( .not. ladtest_obs) then
if(radptr%luse)then
if (radptr%use_corr_obs) then
!$omp parallel do schedule(dynamic,1) private(n,nn,ix,ncr1,ncr2,mm)
!clt !$omp parallel do schedule(dynamic,1) private(n,nn,ix,ncr1,ncr2,mm)
!$omp parallel do schedule(static,1) private(n,nn,ix,ncr1,ncr2,mm)
do nn=1,radptr%nchan
ncr1 = radptr%iccerr(nn)+nn
ncr2 = ncr1
Expand All @@ -607,7 +612,8 @@ subroutine intrad_(radhead,rval,sval,rpred,spred)
enddo
enddo
else
!$omp parallel do schedule(dynamic,1) private(n,nn,ix)
!clt !$omp parallel do schedule(dynamic,1) private(n,nn,ix)
!$omp parallel do schedule(static,1) private(n,nn,ix)
do nn=1,radptr%nchan
ix=(radptr%icx(nn)-1)*npred
do n=1,npred
Expand All @@ -622,7 +628,8 @@ subroutine intrad_(radhead,rval,sval,rpred,spred)


! Begin adjoint
!$omp parallel do schedule(dynamic,1) private(k,nn)
!clt !$omp parallel do schedule(dynamic,1) private(k,nn)
!$omp parallel do schedule(static,1) private(k,nn)
do k=1,nsigradjac
tval(k)=zero

Expand All @@ -635,7 +642,8 @@ subroutine intrad_(radhead,rval,sval,rpred,spred)

! Distribute adjoint contributions over surrounding grid points

!$omp parallel do schedule(dynamic,1) private(k,i1,i2,i3,i4,mm)
!clt !$omp parallel do schedule(dynamic,1) private(k,i1,i2,i3,i4,mm)
!$omp parallel do schedule(static,1) private(k,i1,i2,i3,i4,mm)
do k=1,nsig
i1 = i1n(k)
i2 = i2n(k)
Expand Down
1 change: 1 addition & 0 deletions src/gsi/read_NASA_LaRC_cloud.f90
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ subroutine read_NASA_LaRC_cloud(nread,ndata,nouse,infile,obstype,lunout,sis,nob
!maxobs=(1800*700 + 1500*850)*1
maxobs=(12250000)
allocate(cdata_all(maxdat,maxobs))
cdata_all=zero
!satfile='lgycldbufr'
satfile=trim(infile)
allocate(lat_l(maxobs))
Expand Down
1 change: 1 addition & 0 deletions src/gsi/read_abi.f90
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ subroutine read_abi(mype,val_abi,ithin,rmesh,jsatid,&
nreal = maxinfo + nstinfo
nele = nreal + nchanl
allocate(data_all(nele,itxmax),nrec(itxmax))
data_all=zero


! Reopen unit to bufr file
Expand Down
1 change: 1 addition & 0 deletions src/gsi/read_ahi.f90
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ subroutine read_ahi(mype,val_img,ithin,rmesh,jsatid,gstime,&
nreal = maxinfo + nstinfo
nele = nreal + nchanl
allocate(data_all(nele,itxmax),nrec(itxmax))
data_all=zero

call closbf(lnbufr)
close(lnbufr)
Expand Down
2 changes: 2 additions & 0 deletions src/gsi/read_airs.f90
Original file line number Diff line number Diff line change
Expand Up @@ -384,9 +384,11 @@ subroutine read_airs(mype,val_airs,ithin,isfcalc,rmesh,jsatid,gstime,&
! The number of channels in obtained from the satinfo file being used.
nele=nreal+satinfo_nchan
allocate(data_all(nele,itxmax),nrec(itxmax))
data_all=zero
allocate(allchan(3,1)) ! actual values set after ireadsb
allocate(bufr_chan_test(1))! actual values set after ireadsb


! Big loop to read data file
nrec=999999
next=0
Expand Down
1 change: 1 addition & 0 deletions src/gsi/read_amsr2.f90
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,7 @@ subroutine read_amsr2(mype,val_amsr2,ithin,rmesh,jsatid,gstime,&
nreal = maxinfo + nstinfo
nele = nreal + nchanl
allocate(data_all(nele,itxmax),nrec(itxmax))
data_all=zero

nrec=999999
obsloop: do iobs = 1, num_obs
Expand Down
1 change: 1 addition & 0 deletions src/gsi/read_amsre.f90
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@ subroutine read_amsre(mype,val_amsre,ithin,isfcalc,rmesh,jsatid,gstime,&
! Allocate local array to contain observation information
nele=nreal+nchanl
allocate(data_all(nele,itxmax),nrec(itxmax))
data_all=zero

! Big loop to read data file
next=0
Expand Down
1 change: 1 addition & 0 deletions src/gsi/read_atms.f90
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ subroutine read_atms(mype,val_tovs,ithin,isfcalc,&
nreal = maxinfo + nstinfo
nele = nreal + nchanl
allocate(data_all(nele,itxmax),nrec(itxmax))
data_all=zero
nrec=999999

! IFSCALC setup
Expand Down
1 change: 1 addition & 0 deletions src/gsi/read_avhrr.f90
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ subroutine read_avhrr(mype,val_avhrr,ithin,rmesh,jsatid,&

if ( imesh == 1 ) then
allocate( data_all(nele,itxmax) )
data_all=zero
endif

open(lnbufr,file=trim(infile),form='unformatted') ! open bufr data file
Expand Down
1 change: 1 addition & 0 deletions src/gsi/read_avhrr_navy.f90
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ subroutine read_avhrr_navy(mype,val_avhrr,ithin,rmesh,jsatid,&
nreal = maxinfo + nstinfo
nele = nreal + nchanl
allocate(data_all(nele,itxmax),nrec(itxmax))
data_all=zero

open(lnbufr,file=trim(infile),form='unformatted') ! open bufr data file

Expand Down
1 change: 1 addition & 0 deletions src/gsi/read_bufrtovs.f90
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,7 @@ subroutine read_bufrtovs(mype,val_tovs,ithin,isfcalc,&
hdr1b ='SAID FOVN YEAR MNTH DAYS HOUR MINU SECO CLAT CLON CLATH CLONH HOLS SACV'
hdr2b ='SAZA SOZA BEARAZ SOLAZI'
allocate(data_all(nele,itxmax),data1b8(nchanl),data1b4(nchanl),nrec(itxmax))
data_all=zero


next=0
Expand Down
1 change: 1 addition & 0 deletions src/gsi/read_cris.f90
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,7 @@ subroutine read_cris(mype,val_cris,ithin,isfcalc,rmesh,jsatid,gstime,&
! The number of channels is obtained from the satinfo file being used.
nele=nreal+satinfo_nchan
allocate(data_all(nele,itxmax),nrec(itxmax))
data_all=zero
allocate(temperature(1)) ! actual values set after ireadsb
allocate(allchan(2,1)) ! actual values set after ireadsb
allocate(bufr_chan_test(1))! actual values set after ireadsb
Expand Down
1 change: 1 addition & 0 deletions src/gsi/read_dbz_nc.f90
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ subroutine read_dbz_nc(nread,ndata,nodata,infile,lunout,obstype,sis,hgtl_full,no

!--Allocate cdata_all array
allocate(cdata_all(maxdat,maxobs),rthin(maxobs),rusage(maxobs))
cdata_all=zero
rmesh=rmesh_dbz
zmesh=zmesh_dbz

Expand Down
1 change: 1 addition & 0 deletions src/gsi/read_dbz_netcdf.f90
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ subroutine read_dbz_mrms_netcdf(nread,ndata,nodata,infile,obstype,lunout,sis,nob
!--Allocate cdata_all array

allocate(cdata_all(maxdat,maxobs))
cdata_all=zero

lunrad=31
! get the time from the file name
Expand Down
1 change: 1 addition & 0 deletions src/gsi/read_fl_hdob.f90
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@ subroutine read_fl_hdob(nread,ndata,nodata,infile,obstype,lunout,gstime,twind,si

! Allocate array to hold data
allocate(cdata_all(nreal,maxobs),rusage(maxobs),rthin(maxobs))
cdata_all=zero

! Initialize
cdata_all = zero
Expand Down
1 change: 1 addition & 0 deletions src/gsi/read_gmi.f90
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,7 @@ subroutine read_gmi(mype,val_gmi,ithin,rmesh,jsatid,gstime,&
nreal = maxinfo + nstinfo
nele = nreal + nchanl
allocate(data_all(nele,itxmax),nrec(itxmax))
data_all=zero

nrec=999999
if (mype==0) write(*,*) 'read_gmi num_obs before thinning: ', num_obs
Expand Down
1 change: 1 addition & 0 deletions src/gsi/read_goesimg.f90
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ subroutine read_goesimg(mype,val_img,ithin,rmesh,jsatid,gstime,&
nreal = maxinfo + nstinfo
nele = nreal + nchanl
allocate(data_all(nele,itxmax),nrec(itxmax))
data_all=zero

next=0
nrec=999999
Expand Down
1 change: 1 addition & 0 deletions src/gsi/read_goesndr.f90
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ subroutine read_goesndr(mype,val_goes,ithin,rmesh,jsatid,infile,&
nreal = maxinfo + nstinfo
nele = nreal + nchanl
allocate(data_all(nele,itxmax),nrec(itxmax))
data_all=zero

! Big loop to read data file
nrec=999999
Expand Down
1 change: 1 addition & 0 deletions src/gsi/read_gps.f90
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ subroutine read_gps(nread,ndata,nodata,infile,lunout,obstype,twind, &

! Allocate work array to hold observations
allocate(cdata_all(nreal,maxobs))
cdata_all=zero

! Big loop over the bufr file

Expand Down
1 change: 1 addition & 0 deletions src/gsi/read_iasi.f90
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ subroutine read_iasi(mype,val_iasi,ithin,isfcalc,rmesh,jsatid,gstime,&
! The number of channels in obtained from the satinfo file being used.
nele=nreal+satinfo_nchan
allocate(data_all(nele,itxmax),nrec(itxmax))
data_all=zero
allocate(temperature(1)) ! dependent on # of channels in the bufr file
allocate(allchan(2,1)) ! actual values set after ireadsb
allocate(bufr_chan_test(1))! actual values set after ireadsb
Expand Down
1 change: 1 addition & 0 deletions src/gsi/read_lidar.f90
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ subroutine read_lidar(nread,ndata,nodata,infile,obstype,lunout,twind,sis,nobs)
endif

allocate(cdata_all(maxdat,maxobs))
cdata_all=zero


! Time offset
Expand Down
1 change: 1 addition & 0 deletions src/gsi/read_mitm_mxtm.f90
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ subroutine read_mitm_mxtm(nread,ndata,nodata,infile,obstype,lunout,gstime,sis,no
end if

allocate(cdata_all(nreal,maxobs))
cdata_all=zero

kxall=0
iout=0
Expand Down
2 changes: 1 addition & 1 deletion src/gsi/read_modsbufr.f90
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ subroutine read_modsbufr(nread,ndata,nodata,gstime,infile,obstype,lunout, &
nreal=maxinfo+nstinfo

allocate(data_all(nreal,maxobs))
data_all = zero
data_all=zero


if(oberrflg)then
Expand Down
1 change: 1 addition & 0 deletions src/gsi/read_nsstbufr.f90
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ subroutine read_nsstbufr(nread,ndata,nodata,gstime,infile,obstype,lunout, &
nreal=maxinfo+nstinfo

allocate(data_all(nreal,maxobs))
data_all=zero


if(oberrflg)then
Expand Down
Loading