Skip to content

Commit

Permalink
chgres_cube - Run routine 'convert_omega' on all tasks. (#627)
Browse files Browse the repository at this point in the history
When using certain GRIB2 data as input, the vertical velocity must be converted from omega to dzdt. This conversion is controlled by the logical 'conv_omega'. Ensure that logical is set on all MPI tasks. 

Fixes #626
  • Loading branch information
GeorgeGayno-NOAA authored Feb 11, 2022
1 parent 26cd024 commit d1bdd10
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sorc/chgres_cube.fd/input_data.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2457,6 +2457,7 @@ end subroutine read_input_atm_tiled_history_file
!! @author George Gayno NCEP/EMC
subroutine read_input_atm_grib2_file(localpet)

use mpi
use wgrib2api

use grib2_util, only : rh2spfh, rh2spfh_gfs, convert_omega
Expand Down Expand Up @@ -2909,6 +2910,8 @@ subroutine read_input_atm_grib2_file(localpet)
enddo
endif

call mpi_bcast(conv_omega,1,MPI_LOGICAL,0,MPI_COMM_WORLD,rc)

if (localpet == 0) print*,"- CALL FieldScatter FOR INPUT DZDT."
call ESMF_FieldScatter(dzdt_input_grid, dummy3d, rootpet=0, rc=rc)
if(ESMF_logFoundError(rcToCheck=rc,msg=ESMF_LOGERR_PASSTHRU,line=__LINE__,file=__FILE__)) &
Expand Down Expand Up @@ -3081,7 +3084,7 @@ subroutine read_input_atm_grib2_file(localpet)
farrayPtr=presptr, rc=rc)
if(ESMF_logFoundError(rcToCheck=rc,msg=ESMF_LOGERR_PASSTHRU,line=__LINE__,file=__FILE__)) &
call error_handler("IN FieldGet", rc)

call convert_omega(wptr,presptr,tptr,qptr,clb,cub)

endif
Expand Down

0 comments on commit d1bdd10

Please sign in to comment.