Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intel 2022 updates #629

Merged
17 changes: 11 additions & 6 deletions src/gsi/obsmod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1022,12 +1022,12 @@ subroutine init_directories(in_pe,num_pe)

integer(i_kind),intent(in ) :: in_pe
integer(i_kind),intent(in ) :: num_pe
logical :: l_mkdir_stat
logical :: l_mkdir_stat, l_dir_exist

character(len=144):: command
character(len=8):: pe_name, loc_pe_name
character(len=128):: loc_dirname
integer(i_kind) :: i
integer(i_kind) :: i, ierror

if (lrun_subdirs) then
write(pe_name,'(i4.4)') in_pe
Expand All @@ -1038,10 +1038,15 @@ subroutine init_directories(in_pe,num_pe)
write(loc_pe_name,'(i4.4)') i
loc_dirname = 'dir.'//trim(loc_pe_name)
#ifdef __INTEL_COMPILER
l_mkdir_stat = MAKEDIRQQ(trim(loc_dirname))
if(.not. l_mkdir_stat) then
write(6, *) "Failed to create directory ", trim(loc_dirname), " for PE ", loc_pe_name
call stop2(678)
INQUIRE(directory=trim(loc_dirname), exist=l_dir_exist)
if (.not.l_dir_exist) then
l_mkdir_stat = MAKEDIRQQ(trim(loc_dirname))
if(.not.l_mkdir_stat) then
ierror=GETLASTERRORQQ()
write(6, *) "INIT_DIRECTORIES: ***ERROR** Failed to create directory ", &
trim(loc_dirname)," for PE ", loc_pe_name, ' ierror= '
RussTreadon-NOAA marked this conversation as resolved.
Show resolved Hide resolved
call stop2(678)
endif
endif
#else
command = 'mkdir -p -m 755 ' // trim(loc_dirname)
Expand Down
2 changes: 1 addition & 1 deletion src/gsi/setupaod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ subroutine contents_netcdf_diag_
call nc_diag_metadata("Observation_Class", obsclass)
call nc_diag_metadata_to_single("Latitude",(cenlat)) ! observation latitude (degrees)
call nc_diag_metadata_to_single("Longitude",(cenlon)) ! observation longitude (degrees)
call nc_diag_metadata_to_single("Obs_Time",(dtime))!-time_offset)) ! observation time (hours relative to analysis time)
call nc_diag_metadata_to_single("Time",(dtime))!-time_offset)) ! observation time (hours relative to analysis time)
call nc_diag_metadata_to_single("Sol_Zenith_Angle",(pangs)) ! solar zenith angle (degrees)
call nc_diag_metadata_to_single("Sol_Azimuth_Angle",(data_s(isazi_ang,n))) ! solar azimuth angle (degrees)
call nc_diag_metadata("Surface_type", nint(data_s(istyp,n)))
Expand Down
5 changes: 3 additions & 2 deletions src/gsi/setupoz.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1720,6 +1720,7 @@ subroutine contents_netcdf_diag_(odiag)
type(obs_diag),pointer,intent(in):: odiag
! Observation class
character(7),parameter :: obsclass = ' ozlev'
integer(i_kind),parameter :: ione = 1
real(r_kind),dimension(miter) :: obsdiag_iuse
call nc_diag_metadata_to_single("Latitude", data(ilate,i) )
call nc_diag_metadata_to_single("Longitude", data(ilone,i) )
Expand All @@ -1731,9 +1732,9 @@ subroutine contents_netcdf_diag_(odiag)
call nc_diag_metadata_to_single("Obs_Minus_Forecast_unadjusted",ozone_inv )
call nc_diag_metadata_to_single("Reference_Pressure", preso3l*r100 ) ! Pa
if(luse(i)) then
call nc_diag_metadata_to_single("Analysis_Use_Flag", one )
call nc_diag_metadata("Analysis_Use_Flag", ione )
else
call nc_diag_metadata_to_single("Analysis_Use_Flag", -one )
call nc_diag_metadata("Analysis_Use_Flag", -ione )
endif

call nc_diag_metadata_to_single("Input_Observation_Error",obserror )
Expand Down
2 changes: 1 addition & 1 deletion src/gsi/setuprad.f90
Original file line number Diff line number Diff line change
Expand Up @@ -2577,7 +2577,7 @@ subroutine contents_netcdf_diag_(odiags,idv,iob)

call nc_diag_metadata_to_single("Elevation",zsges ) ! model (guess) elevation at observation location

call nc_diag_metadata_to_single("Time",dtime,time_offset,'-')
call nc_diag_metadata_to_single("Obs_Time",dtime,time_offset,'-')

call nc_diag_metadata_to_single("Scan_Position",data_s(iscan_pos,n) ) ! sensor scan position
call nc_diag_metadata_to_single("Sat_Zenith_Angle", zasat,rad2deg,'*') ! satellite zenith angle (degrees)
Expand Down