Skip to content

Commit

Permalink
replace Time with Obs_Time in setuprad netcdf, add inquire to init_di…
Browse files Browse the repository at this point in the history
…rectories (NOAA-EMC#623)
  • Loading branch information
RussTreadon-NOAA committed Sep 19, 2023
1 parent 008c63c commit 1ba5a44
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
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= '
call stop2(678)
endif
endif
#else
command = 'mkdir -p -m 755 ' // trim(loc_dirname)
Expand Down
2 changes: 1 addition & 1 deletion src/gsi/setuprad.f90
Original file line number Diff line number Diff line change
Expand Up @@ -2575,7 +2575,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

0 comments on commit 1ba5a44

Please sign in to comment.