# Ocean Modeling Discussion

ROMS/TOMS

Search for:
 It is currently Sun Aug 25, 2019 6:47 pm

 Page 1 of 1 [ 1 post ]
 All times are UTC
Author Message
 Posted: Wed Sep 19, 2018 7:40 am

Joined: Fri Mar 15, 2013 1:30 pm
Posts: 1
Location: hkust
First, I run the standard riverplume2 case without any change.
Then I add some print command in step2d_LF_AM3.h and step3d_uv.F to print out the value of point sources input (like: Qbar(is), cff) for checking.

################################################################################################
In the step2d_LF_AM3.h the print statement are add like:

!
!-----------------------------------------------------------------------
! Apply mass point sources.
!-----------------------------------------------------------------------
!
DO j=Jstr-1,Jend+1
DO i=Istr-1,Iend+1
Dnew(i,j)=zeta(i,j,knew)+h(i,j)
END DO
END DO
DO is=1,Nsrc
i=Isrc(is)
j=Jsrc(is)
IF (((IstrR.le.i).and.(i.le.IendR)).and. &
& ((JstrR.le.j).and.(j.le.JendR))) THEN
IF (INT(Dsrc(is)).eq.0) THEN
cff=1.0_r8/(on_u(i,j)*0.5_r8*(Dnew(i-1,j)+Dnew(i,j)))
ubar(i,j,knew)=Qbar(is)*cff
if (is.eq.1)then !! rex
print *,"rex ubar(i,j,knew)", is," ", i," ", j," ",knew ," ",Qbar(is), " ", cff !! rex
end if !! rex

# ifdef SOLVE3D
DU_avg1(i,j)=Qbar(is)
if (is.eq.1)then !! rex
print *,"rex DU_avg1(i,j)", is," ", i," ", j," ",Qbar(is), " ", cff !! rex
end if !! rex

# endif
ELSE
cff=1.0_r8/(om_v(i,j)*0.5_r8*(Dnew(i,j-1)+Dnew(i,j)))
vbar(i,j,knew)=Qbar(is)*cff
if (is.eq.1)then !! rex
print *,"rex vbar(i,j,knew)", is," ", i," ", j," ",knew ," ",Qbar(is), " ", cff !! rex
end if !! rex

# ifdef SOLVE3D
DV_avg1(i,j)=Qbar(is)
if (is.eq.1)then !! rex
print *,"rex DV_avg1(i,j)", is," ", i," ", j," ",Qbar(is), " ", cff !! rex
end if !! rex

# endif
END IF
END IF
END DO
# endif
############################################################
############################################################
And in the step3d_uv.F the print command add in:
!
!-----------------------------------------------------------------------
! Apply mass point sources.
!-----------------------------------------------------------------------
!
DO is=1,Nsrc
i=Isrc(is)
j=Jsrc(is)
IF (((IstrR.le.i).and.(i.le.IendR)).and. &
& ((JstrR.le.j).and.(j.le.JendR))) THEN
IF (INT(Dsrc(is)).eq.0) THEN
DO k=1,N(ng)
cff1=1.0_r8/(on_u(i,j)* &
& 0.5_r8*(z_w(i-1,j,k)-z_w(i-1,j,k-1)+ &
& z_w(i ,j,k)-z_w(i ,j,k-1)))
u(i,j,k,nnew)=Qsrc(is,k)*cff1
if (is.eq.1)then !! rex
print *,"rex u(i,j,k,nnew)", is," ", i," ", j," ", k," ",nnew ," ",Qsrc(is,k), " ", cff1 !! rex
end if !! rex

END DO
ELSE
DO k=1,N(ng)
cff1=1.0_r8/(om_v(i,j)* &
& 0.5_r8*(z_w(i,j-1,k)-z_w(i,j-1,k-1)+ &
& z_w(i,j ,k)-z_w(i,j ,k-1)))
v(i,j,k,nnew)=Qsrc(is,k)*cff1
if (is.eq.1)then !! rex
print *,"rex v(i,j,k,nnew)", is," ", i," ", j," ", k," ",nnew ," ",Qsrc(is,k), " ", cff1 !! rex
end if !! rex

END DO
END IF
END IF
END DO
# endif

#####################################################################################################

And after adding print, the case result of u,v, S are changed as the figures attached.
Furthermore I test to add a print command in the upwelling case, it wouldn't change the result.
I have some questions:
1, why adding the print commands will change result in the riverplume2 case?
2, how to solve this problem?

 Attachments: step2d.f90 [36.99 KiB] Downloaded 82 times step3d_uv.f90 [24.7 KiB] Downloaded 77 times File comment: the different of two case of the bottom salinity diff_S_bot.png [ 28.63 KiB | Viewed 635 times ] File comment: the different of two case of the surface salinity diff_S_sur.png [ 24.89 KiB | Viewed 635 times ] File comment: the different of two case of the bottom velocity v diff_v_bot.png [ 28.82 KiB | Viewed 635 times ] File comment: the different of two case of the surface velocity v diff_v_sur.png [ 29.86 KiB | Viewed 635 times ] File comment: the different of two case of the bottom velocity u diff_u_bot.png [ 28 KiB | Viewed 635 times ] File comment: the different of two case of the surface velocity u diff_u_sur.png [ 28.71 KiB | Viewed 635 times ]
Top

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 1 post ]

 All times are UTC

#### Who is online

Users browsing this forum: No registered users and 4 guests

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

Search for:
 Jump to:  Select a forum ------------------ News, Events & Job Opportunities    Meetings/Workshops    Job Opportunities    Ocean News ROMS/TOMS    ROMS Adjoint    ROMS Benchmarks    ROMS Bugs    ROMS Discussion    ROMS Documentation    ROMS Ecosystem    ROMS FAQ    ROMS Ice    ROMS Information    ROMS Installation    ROMS Known Problems    ROMS Messages    ROMS Problems    ROMS Releases    ROMS Results    ROMS Sediment    ROMS Source    ROMS Tips    ROMS Tools and Techniques    ROMS Trivia    ROMS Usage    ROMS Webinar    ROMS Wish List ROMS/TOMS Applications    User Applications    Adriatic Sea Ocean Modeling    Ocean Modeling FAQ