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

update lat/lon info for inline post on global latlon grid #9

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions io/module_wrt_grid_comp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,28 @@ subroutine wrt_initialize(wrt_comp, imp_state_write, exp_state_write, clock, rc)
latPtr(i,j) = lat(j)
enddo
enddo
wrt_int_state%lat_start = lbound(latPtr,2)
wrt_int_state%lat_end = ubound(latPtr,2)
wrt_int_state%lon_start = lbound(lonPtr,1)
wrt_int_state%lon_end = ubound(lonPtr,1)
allocate( wrt_int_state%lat_start_wrtgrp(wrt_int_state%petcount))
allocate( wrt_int_state%lat_end_wrtgrp (wrt_int_state%petcount))
call mpi_allgather(wrt_int_state%lat_start,1,MPI_INTEGER, &
wrt_int_state%lat_start_wrtgrp, 1, MPI_INTEGER, wrt_mpi_comm, rc)
call mpi_allgather(wrt_int_state%lat_end, 1,MPI_INTEGER, &
wrt_int_state%lat_end_wrtgrp, 1, MPI_INTEGER, wrt_mpi_comm, rc)
if( lprnt ) print *,'aft wrtgrd, latlon, dimj_start=',wrt_int_state%lat_start_wrtgrp, &
'dimj_end=',wrt_int_state%lat_end_wrtgrp, 'wrt_group=',n_group
allocate( wrt_int_state%latPtr(wrt_int_state%lon_start:wrt_int_state%lon_end, &
wrt_int_state%lat_start:wrt_int_state%lat_end))
allocate( wrt_int_state%lonPtr(wrt_int_state%lon_start:wrt_int_state%lon_end, &
wrt_int_state%lat_start:wrt_int_state%lat_end))
do j=wrt_int_state%lat_start,wrt_int_state%lat_end
do i=wrt_int_state%lon_start,wrt_int_state%lon_end
wrt_int_state%latPtr(i,j) = latPtr(i,j)
wrt_int_state%lonPtr(i,j) = lonPtr(i,j)
enddo
enddo
wrt_int_state%im = imo
wrt_int_state%jm = jmo
wrt_int_state%post_maptype = 0
Expand Down