Skip to content

Commit

Permalink
Add computation of corner point lat/lon to
Browse files Browse the repository at this point in the history
'define_input_grid_grib2'

Fixes ufs-community#591.
  • Loading branch information
GeorgeGayno-NOAA committed Oct 26, 2021
1 parent cfcfdeb commit e01b23b
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions sorc/chgres_cube.fd/model_grid.F90
Original file line number Diff line number Diff line change
Expand Up @@ -923,6 +923,28 @@ subroutine define_input_grid_grib2(localpet, npets)
print*,'after gdswzd lat/lon ni/nj', rlat(ni,nj),rlon(ni,nj)
print*,'after gdswzd lat/lon mid ', rlat(ni/2,nj/2),rlon(ni/2,nj/2)

deallocate(rlat,rlon,xpts,ypts)

allocate(rlat(ni+1,nj+1))
allocate(rlon(ni+1,nj+1))
allocate(xpts(ni+1,nj+1))
allocate(ypts(ni+1,nj+1))

do j = 1, nj+1
do i = 1, ni+1
xpts(i,j) = float(i) - 0.5
ypts(i,j) = float(j) - 0.5
enddo
enddo

call gdswzd(kgds,1,((ni+1)*(nj+1)),-9999.,xpts,ypts,rlon,rlat,nret)
print*,'after gdswzd nret ',nret
print*,'after gdswzd corner lat/lon 11', rlat(1,1),rlon(1,1)
print*,'after gdswzd corner lat/lon ni/11', rlat(ni+1,1),rlon(ni+1,1)
print*,'after gdswzd corner lat/lon 11/nj', rlat(1,nj+1),rlon(1,nj+1)
print*,'after gdswzd corner lat/lon ni/nj', rlat(ni+1,nj+1),rlon(ni+1,nj+1)
print*,'after gdswzd corner lat/lon mid ', rlat(ni/2,nj/2),rlon(ni/2,nj/2)

!!!!!

call ESMF_FieldGather(latitude_target_grid, lat_target, rootPet=0, tile=1, rc=error)
Expand Down

0 comments on commit e01b23b

Please sign in to comment.