Skip to content

Commit

Permalink
Add check for lon/lat in nudging/hot scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
josephzhang8 committed Feb 13, 2020
1 parent 99cfbbb commit d3adb2c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/Utility/Gen_Hotstart/gen_hot_3Dth_from_hycom.f90
Original file line number Diff line number Diff line change
Expand Up @@ -464,9 +464,17 @@ program gen_hot
! processing static info
do i=1,ixlen
lon(i,:)=xind(i)
if(i<ixlen) then; if(xind(i)>=xind(i+1)) then
write(11,*)'Lon must be increasing:',i,xind(i),xind(i+1)
stop
endif; endif;
enddo !i
do j=1,iylen
lat(:,j)=yind(j)
if(j<iylen) then; if(yind(j)>=yind(j+1)) then
write(11,*)'Lat must be increasing:',j,yind(j),yind(j+1)
stop
endif; endif;
enddo !j
! lon=lon-360 !convert to our long.

Expand Down
2 changes: 1 addition & 1 deletion src/Utility/Post-Processing-Fortran/compute_average3.f90
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ program read_out
endif !file63

if(ivs==1) then
write(65,*)
write(65,*)iday1,iday2
write(65,*)ne,np
do i=1,np
write(65,*)i,x(i),y(i),residual(i,1)
Expand Down
8 changes: 8 additions & 0 deletions src/Utility/Pre-Processing/gen_nudge_from_hycom.f90
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,17 @@ program gen_hot
! non-rectangular grids
do i=1,ixlen
lon(i,:)=xind(i)
if(i<ixlen) then; if(xind(i)>=xind(i+1)) then
write(11,*)'Lon must be increasing:',i,xind(i),xind(i+1)
stop
endif; endif;
enddo !i
do j=1,iylen
lat(:,j)=yind(j)
if(j<iylen) then; if(yind(j)>=yind(j+1)) then
write(11,*)'Lat must be increasing:',j,yind(j),yind(j+1)
stop
endif; endif;
enddo !j
! lon=lon-360 !convert to our long.

Expand Down

0 comments on commit d3adb2c

Please sign in to comment.