Skip to content

Commit

Permalink
For moving nest output grids assign lat/lon coordinates in the run ph…
Browse files Browse the repository at this point in the history
…ase. (NCAR#581)

* moving nest inline post fix
  • Loading branch information
DusanJovic-NOAA authored Sep 20, 2022
1 parent 523ead1 commit 192463e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions io/module_wrt_grid_comp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1875,6 +1875,8 @@ subroutine wrt_run(wrt_comp, imp_state_write, exp_state_write,clock,rc)
do ii=lbound(lonPtr,1),ubound(lonPtr,1)
lonPtr(ii,jj) = lon1(n) + (lon2(n)-lon1(n))/(imo(n)-1) * (ii-1)
latPtr(ii,jj) = lat1(n) + (lat2(n)-lat1(n))/(jmo(n)-1) * (jj-1)
wrt_int_state%out_grid_info(n)%latPtr(ii,jj) = latPtr(ii,jj)
wrt_int_state%out_grid_info(n)%lonPtr(ii,jj) = lonPtr(ii,jj)
enddo
enddo
else if (trim(output_grid(grid_id)) == 'rotated_latlon_moving') then
Expand All @@ -1890,6 +1892,8 @@ subroutine wrt_run(wrt_comp, imp_state_write, exp_state_write,clock,rc)
if (geo_lon < 0.0) geo_lon = geo_lon + 360.0
lonPtr(ii,jj) = geo_lon
latPtr(ii,jj) = geo_lat
wrt_int_state%out_grid_info(n)%latPtr(ii,jj) = latPtr(ii,jj)
wrt_int_state%out_grid_info(n)%lonPtr(ii,jj) = lonPtr(ii,jj)
enddo
enddo
endif
Expand Down

0 comments on commit 192463e

Please sign in to comment.