Ocean Modeling Discussion

ROMS/TOMS

Search for:
It is currently Wed Jul 17, 2019 6:43 pm




Post new topic Reply to topic  [ 20 posts ] 

All times are UTC

Author Message
 Post subject: Sediment from river!
PostPosted: Tue Jan 15, 2013 9:21 am 
Offline

Joined: Wed Apr 09, 2003 10:40 am
Posts: 32
Location: Institute of Meteorology and hydrology
I used to run ROMS with RIVER_SEDIMENT (of course with UV_PSOURSE and TS_PSOURCE). But in present version (revision 643), RIVER_SEDIMENT seems to be no longer valid. Consequently, I can run ROMS for S and T but not sediments (mud, sand) from rivers.

Any ideas, Thanks


Top
 Profile  
Reply with quote  
 Post subject: Re: Sediment from river!
PostPosted: Tue Jan 15, 2013 2:21 pm 
Offline

Joined: Wed Dec 31, 2003 6:16 pm
Posts: 786
Location: USGS, USA
yes, as many other things this has been changed to accomodate individual source terms. You need to have the correct flags in your sediment.in file, such as

! Logical switches (TRUE/FALSE) to specify which variables to consider on
! tracers point Sources/Sinks (like river runoff). See glossary below for
! details.

MUD_Ltracer == T
and smae for sand.


Top
 Profile  
Reply with quote  
 Post subject: Re: Sediment from river!
PostPosted: Mon Apr 15, 2013 2:39 am 
Offline

Joined: Wed Apr 09, 2003 10:40 am
Posts: 32
Location: Institute of Meteorology and hydrology
Thank,

I've got another problem that ROMS didn't read boundary sediment concentration if a number of classes > 2. For example, I've put 2 classes of non-cohensive mud in eastern and western boundaries both 0.1 mg/l. There are reasonable value for MUD_01 but nothing (zero) for MUD_02 in his, sta, rst files.

Sediment Parameters, Grid: 01
=============================


Size Sd50 Csed Srho Wsed Erate poros
Class (mm) (kg/m3) (kg/m3) (mm/s) (kg/m2/s) (nondim)

1 6.5000E-02 0.0000E+00 2.6500E+03 5.0000E-01 5.0000E-04 0.0000E+00
2 1.0000E-02 0.0000E+00 2.6500E+03 1.0000E-01 1.0000E-04 0.0000E+00

tau_ce tau_cd nl_tnu2 nl_tnu4 Akt_bak Tnudg
(N/m2) (N/m2) (m2/s) (m4/s) (m2/s) (day)

1 3.0000E+00 6.0000E-01 1.0000E-01 0.0000E+00 5.0000E-06 0.0000E+00
2 5.0000E-01 1.0000E-01 1.0000E-01 0.0000E+00 5.0000E-06 0.0000E+00

morph_fac
(nondim)

1 1.0000E+00
2 1.0000E+00

New bed layer formed when deposition exceeds 0.10000E-01 (m).
Two first layers are combined when 2nd layer smaller than 0.00000E+00 (m).
Rate coefficient for bed load transport = 0.15000E+00

T Hout(idTvar) Write out sediment01: mud_01
T Hout(idTvar) Write out sediment02: mud_02
T Hout(idfrac) Write out bed fraction, sediment 01: mudfrac_01
T Hout(idfrac) Write out bed fraction, sediment 02: mudfrac_02
T Hout(idfrac) Write out mass, sediment 01: mudmass_01
T Hout(idfrac) Write out mass, sediment 02: mudmass_02
T Hout(idUbld) Write out U-bedload, sediment 01: bedload_Umud_01
T Hout(idVbld) Write out V-bedload, sediment 01: bedload_Vmud_01
T Hout(idUbld) Write out U-bedload, sediment 02: bedload_Umud_02
T Hout(idVbld) Write out V-bedload, sediment 02: bedload_Vmud_02
T Hout(idSbed) Write out BED property 01: bed_thickness
T Hout(idSbed) Write out BED property 02: bed_age
T Hout(idSbed) Write out BED property 03: bed_porosity

T Aout(idTvar) Write out averaged sediment01: mud_01
T Aout(idTvar) Write out averaged sediment02: mud_02
T Aout(idUbld) Write out U-bedload, sediment 01: bedload_Umud_01
T Aout(idVbld) Write out V-bedload, sediment 01: bedload_Vmud_01
T Aout(idUbld) Write out U-bedload, sediment 02: bedload_Umud_02
T Aout(idVbld) Write out V-bedload, sediment 02: bedload_Vmud_02
...................................................
Lateral Boundary Conditions: NLM
============================

Variable Grid West Edge South Edge East Edge North Edge
--------- ---- ---------- ---------- ---------- ----------

zeta 1 Chapman Chapman Chapman Chapman

ubar 1 Flather Flather Flather Flather

vbar 1 Flather Flather Flather Flather

u 1 Radiation Radiation Radiation Radiation

v 1 Radiation Radiation Radiation Radiation

temp 1 Gradient Gradient Gradient Gradient

mud_01 1 Clamped Gradient Clamped Gradient

mud_02 1 Clamped Gradient Clamped Gradient

tke 1 Gradient Gradient Gradient Gradient
...................................................
GET_NGFLD - suspended cohesive sediment western boundart = 90 00:00:00class 01,
(Rec=0000001, Index=1, File: roms_bry.nc)
(Tmin= 90.0000 Tmax= 270.0000)
(Min = 1.00000000E-01 Max = 1.00000000E-01)
GET_NGFLD - suspended cohesive sediment eastern boundart = 90 00:00:00class 01,
(Rec=0000001, Index=1, File: roms_bry.nc)
(Tmin= 90.0000 Tmax= 270.0000)
(Min = 1.00000000E-01 Max = 1.00000000E-01)

Thanks for any suggestion


Top
 Profile  
Reply with quote  
 Post subject: Re: Sediment from river!
PostPosted: Wed Mar 09, 2016 3:07 am 
Offline

Joined: Tue Oct 16, 2012 8:55 pm
Posts: 29
Location: Old Dominion Universiy
Would like to add suspended sediment from a river analytically using ana_psource.h. Have specified CSED value in input file and attempted to add ised value in ana_psource but neither appear to be introducing sediment. Salinity and temperature appear to be entering from the river as expected. Note MUD_Ltsrc is set to T in sediment input file.


Top
 Profile  
Reply with quote  
 Post subject: Re: Sediment from river!
PostPosted: Fri Oct 14, 2016 1:19 pm 
Offline

Joined: Wed Apr 07, 2004 10:48 pm
Posts: 52
Location: 2nd Institute of Oceanography,SOA
Hi, have you solved the problem?
Feng

jande023 wrote:
Would like to add suspended sediment from a river analytically using ana_psource.h. Have specified CSED value in input file and attempted to add ised value in ana_psource but neither appear to be introducing sediment. Salinity and temperature appear to be entering from the river as expected. Note MUD_Ltsrc is set to T in sediment input file.


Top
 Profile  
Reply with quote  
 Post subject: Re: Sediment from river!
PostPosted: Sat Oct 15, 2016 11:31 am 
Offline

Joined: Tue Oct 16, 2012 8:55 pm
Posts: 29
Location: Old Dominion Universiy
Unfortunately I have not. After reading a recent thread, I am running again with CSED specified as a very large value to see it there is any sediment being introduced.


Top
 Profile  
Reply with quote  
 Post subject: Re: Sediment from river!
PostPosted: Sat Oct 15, 2016 8:02 pm 
Offline

Joined: Wed Dec 31, 2003 6:16 pm
Posts: 786
Location: USGS, USA
the csed is just the init value of sediment in the water column. to introduce sediment as a psource, you need to set that in ana_psource.


Top
 Profile  
Reply with quote  
 Post subject: Re: Sediment from river!
PostPosted: Sun Oct 16, 2016 11:59 am 
Offline

Joined: Tue Oct 16, 2012 8:55 pm
Posts: 29
Location: Old Dominion Universiy
John,

Thank you for your prompt response as always. I had previously attempted to edit ana_psource as follows with no success. Would appreciate any additional guidance you could provide.

V/R

John

!-----------------------------------------------------------------------
! Set tracers point Sources and/or Sinks.
!-----------------------------------------------------------------------
!
TRACERS : IF (ANY(LtracerSrc(:,ng))) THEN
SOURCES(ng)%Tsrc=0.0_r8 ! initialize
!
! Set-up tracer (tracer units) point Sources/Sinks.

# elif defined YORK_ESTUARY
IF (DOMAIN(ng)%SouthWest_Test(tile)) THEN
DO k=1,N(ng)
DO is=1,Nsrc(ng)
SOURCES(ng)%Tsrc(is,k,itemp)=T0(ng)
SOURCES(ng)%Tsrc(is,k,isalt)=0.0_r8
! SOURCES(ng)%Tsrc(is,k,ised)=20.0_r8 JRA
END DO
END DO
END IF


Top
 Profile  
Reply with quote  
 Post subject: Re: Sediment from river!
PostPosted: Sun Oct 16, 2016 12:14 pm 
Offline

Joined: Tue Oct 16, 2012 8:55 pm
Posts: 29
Location: Old Dominion Universiy
John,

Note, the ised line was subsequently "commented out" but before doing so did not introduce any suspended sediment at the river boundary.

thanks again,

John


Top
 Profile  
Reply with quote  
 Post subject: Re: Sediment from river!
PostPosted: Mon Oct 17, 2016 12:17 pm 
Offline

Joined: Wed Dec 31, 2003 6:16 pm
Posts: 786
Location: USGS, USA
well, i would need to see the whole routine. but a first look
"SOURCES(ng)%Tsrc(is,k,ised)=20.0_r8"
where is the value of ised set? looks like it needs a do ised=1,NST loop around it.


Top
 Profile  
Reply with quote  
 Post subject: Re: Sediment from river!
PostPosted: Wed Oct 19, 2016 10:54 pm 
Offline

Joined: Tue Oct 16, 2012 8:55 pm
Posts: 29
Location: Old Dominion Universiy
Thank you John,

I have attached the entire analytical script (ana_psource.h).

ised was defined as a local variable:

! Local variable declarations.
!
integer :: Npts, NSUB, is, i, j, k, ised

I intended a do loop for ised setting it =20 for all point sources along the western boundary (based on the direction set for sources) at all levels.

# elif defined YORK_ESTUARY
IF (DOMAIN(ng)%SouthWest_Test(tile)) THEN
DO k=1,N(ng)
DO is=1,Nsrc(ng)
SOURCES(ng)%Tsrc(is,k,itemp)=T0(ng)
SOURCES(ng)%Tsrc(is,k,isalt)=0.0_r8
SOURCES(ng)%Tsrc(is,k,ised)=20.0_r8 ! JRA
END DO
END DO
END IF

Truly appreciate your assistance.

V/R

John


Attachments:
File comment: ana_psource.h
ana_psource.h [17.46 KiB]
Downloaded 137 times
Top
 Profile  
Reply with quote  
 Post subject: Re: Sediment from river!
PostPosted: Thu Oct 20, 2016 12:19 pm 
Offline

Joined: Wed Dec 31, 2003 6:16 pm
Posts: 786
Location: USGS, USA
thanks for sending the whole thing.
But you did not understand my question, or in fact, i didn't ask my question in a good way.
I asked "where is the value of ised set"
I see ised is declared as an integer, but what value is set for the variable "ised". not the value of Tsrc, but ised itself.
You need to set
ised = _____
like a 1, 2, or 3 ....
Try this:

IF (DOMAIN(ng)%SouthWest_Test(tile)) THEN
DO k=1,N(ng)
DO is=1,Nsrc(ng)
SOURCES(ng)%Tsrc(is,k,itemp)=T0(ng)
SOURCES(ng)%Tsrc(is,k,isalt)=0.0_r8
DO ised=1,NST(ng)
SOURCES(ng)%Tsrc(is,k,idsed(ised))=20.0_r8 ! JRA + JCW
END DO
END DO
END DO
END IF


Top
 Profile  
Reply with quote  
 Post subject: Re: Sediment from river!
PostPosted: Thu Oct 20, 2016 11:53 pm 
Offline

Joined: Tue Oct 16, 2012 8:55 pm
Posts: 29
Location: Old Dominion Universiy
Thanks John,

You probably asked the initial question in a manner that would have made sense to anyone but me. Please bare with an old man here. I added the ised DO loop and then got a I a build error:

analytical.f90(1024): error #6410: This name has not been declared as an array or a function. [NST]
DO ised=1,NST(ng)
--------------------------^

So I attempted to declare as follows:

# ifdef SEDIMENT
USE mod_sediment
real(r8), intent(out) :: ised(LBi:UBi,LBj:UBj,Nbed,NST) ! JRA
# endif

Then it goes pretty far through the build process before getting really ugly:

analytical.f90(829): error #6278: This USE statement is not positioned correctly within the scoping unit.
USE mod_sources
------^
analytical.f90(831): error #6278: This USE statement is not positioned correctly within the scoping unit.
USE distribute_mod, ONLY : mp_bcastf, mp_bcasti
------^
analytical.f90(832): error #6278: This USE statement is not positioned correctly within the scoping unit.
USE distribute_mod, ONLY : mp_collect, mp_reduce
------^
analytical.f90(828): error #6420: This array name is invalid in this context. [ISED]
real(r8), intent(out) :: ised(LBi:UBi,LBj:UBj,Nbed,NST) ! JRA
-------------------------------^
analytical.f90(837): error #6415: This name cannot be assigned this data type because it conflicts with prior uses of the name. [UBI]
integer, intent(in) :: LBi, UBi, LBj, UBj
----------------------------------^
analytical.f90(837): error #6415: This name cannot be assigned this data type because it conflicts with prior uses of the name. [UBJ]
integer, intent(in) :: LBi, UBi, LBj, UBj
--------------------------------------------^
analytical.f90(939): error #6410: This name has not been declared as an array or a function. [NSRC]
Nsrc(ng)=5
-----------^
analytical.f90(941): error #6458: This name must be the name of a variable with a derived type (structure type). [SOURCES]
SOURCES(ng)%Dsrc(is)=0.0_r8
-----------^
analytical.f90(942): error #6458: This name must be the name of a variable with a derived type (structure type). [SOURCES]
SOURCES(ng)%Isrc(is)=1
-----------^
analytical.f90(943): error #6458: This name must be the name of a variable with a derived type (structure type). [SOURCES]
SOURCES(ng)%Jsrc(is)=is+47
-----------^
analytical.f90(950): error #6837: The leftmost part-ref in a data-ref can not be a function reference. [SOURCES]
CALL mp_bcasti (ng, iNLM, SOURCES(ng)%Isrc)
----------------------------------^
analytical.f90(950): error #6158: The structure-name is invalid or is missing. [SOURCES]
CALL mp_bcasti (ng, iNLM, SOURCES(ng)%Isrc)
----------------------------------^
analytical.f90(951): error #6837: The leftmost part-ref in a data-ref can not be a function reference. [SOURCES]
CALL mp_bcasti (ng, iNLM, SOURCES(ng)%Jsrc)
----------------------------------^
analytical.f90(951): error #6158: The structure-name is invalid or is missing. [SOURCES]
CALL mp_bcasti (ng, iNLM, SOURCES(ng)%Jsrc)
----------------------------------^
analytical.f90(952): error #6837: The leftmost part-ref in a data-ref can not be a function reference. [SOURCES]
CALL mp_bcastf (ng, iNLM, SOURCES(ng)%Dsrc)
----------------------------------^
analytical.f90(952): error #6158: The structure-name is invalid or is missing. [SOURCES]
CALL mp_bcastf (ng, iNLM, SOURCES(ng)%Dsrc)
----------------------------------^
analytical.f90(964): error #6515: This function, which is specified as the left side of an assignment statement, is invalid. [SOURCES]
SOURCES(ng)%Qshape=Pspv
--------^
analytical.f90(965): error #6404: This name does not have a type, and must have an explicit type. [MSRC]
Npts=Msrc(ng)*N(ng)
-------------^
analytical.f90(970): error #6515: This function, which is specified as the left side of an assignment statement, is invalid. [SOURCES]
SOURCES(ng)%Qshape(is,k)=1.0_r8/REAL(N(ng),r8)
--------------^
analytical.f90(979): error #6515: This function, which is specified as the left side of an assignment statement, is invalid. [SOURCES]
SOURCES(ng)%Qbar=Pspv
--------^
analytical.f90(987): error #6515: This function, which is specified as the left side of an assignment statement, is invalid. [SOURCES]
SOURCES(ng)%Qbar(is)=fac*((71.0_r8)/5) !421, 71, 43.0_r8
----------^
analytical.f90(996): error #6515: This function, which is specified as the left side of an assignment statement, is invalid. [SOURCES]
SOURCES(ng)%Qsrc(is,k)=SOURCES(ng)%Qbar(is)* &
--------------^
analytical.f90(996): error #6837: The leftmost part-ref in a data-ref can not be a function reference. [SOURCES]
SOURCES(ng)%Qsrc(is,k)=SOURCES(ng)%Qbar(is)* &
-------------------------------------^
analytical.f90(996): error #6158: The structure-name is invalid or is missing. [SOURCES]
SOURCES(ng)%Qsrc(is,k)=SOURCES(ng)%Qbar(is)* &
-------------------------------------^
analytical.f90(997): error #6837: The leftmost part-ref in a data-ref can not be a function reference. [SOURCES]
& SOURCES(ng)%Qshape(is,k)
-------------------------------------^
analytical.f90(997): error #6158: The structure-name is invalid or is missing. [SOURCES]
& SOURCES(ng)%Qshape(is,k)
-------------------------------------^
analytical.f90(1008): error #6515: This function, which is specified as the left side of an assignment statement, is invalid. [SOURCES]
SOURCES(ng)%Tsrc=0.0_r8 ! initialize
--------^
analytical.f90(1023): error #6515: This function, which is specified as the left side of an assignment statement, is invalid. [SOURCES]
SOURCES(ng)%Tsrc(is,k,itemp)=T0(ng)
--------------^
analytical.f90(1024): error #6515: This function, which is specified as the left side of an assignment statement, is invalid. [SOURCES]
SOURCES(ng)%Tsrc(is,k,isalt)=0.0_r8
--------------^
analytical.f90(1025): error #6335: An array name is invalid in this context. [ISED]
DO ised=1,NST(ng)
-------------------^
analytical.f90(2061): catastrophic error: Too many errors, exiting
compilation aborted for analytical.f90 (code 1)
make: *** [Build/analytical.o] Error 1
[jande023@turing1 ~/2015ROMS]$

Again, built fine before the addition of the ised DO loop. Is the issue the placement of my declaration or the structure of the variable declaration itself? Or do I need to repeat all the USE statements within my ifdef SEDIMENT statement?

V/R

John
121,7 19%


Top
 Profile  
Reply with quote  
 Post subject: Re: Sediment from river!
PostPosted: Fri Oct 21, 2016 8:40 am 
Offline
User avatar

Joined: Wed Jul 02, 2003 5:29 pm
Posts: 3633
Location: IMS/UAF, USA
You need two #ifdef SEDIMENT chunks, one for the USE up with all the other USE statements, one for the variable declaration down with the rest of them. Fortran has such weird syntax rules, but you do have to put all the USE stuff up before "implicit none".


Top
 Profile  
Reply with quote  
 Post subject: Re: Sediment from river!
PostPosted: Sat Oct 22, 2016 3:21 pm 
Offline

Joined: Tue Oct 16, 2012 8:55 pm
Posts: 29
Location: Old Dominion Universiy
Kate,

Thank you for your prompt reply. I wanted to give this an earnest try before responding, hence my delay. I attempted to add an additional #ifdef SEDIMENT, USE mod_sediment chunk upfront with the other USE statements. I also tried repeating earlier USE statements within the later #ifdef statement, where I attempted to clear the NST variable not defined error. However, I still get multiple errors and ultimately build failure as follows:

analytical.f90(829): error #6278: This USE statement is not positioned correctly within the scoping unit.
USE mod_sources
------^
analytical.f90(831): error #6278: This USE statement is not positioned correctly within the scoping unit.
USE distribute_mod, ONLY : mp_bcastf, mp_bcasti
------^
analytical.f90(832): error #6278: This USE statement is not positioned correctly within the scoping unit.
USE distribute_mod, ONLY : mp_collect, mp_reduce
------^
analytical.f90(828): error #6420: This array name is invalid in this context. [ISED]
real(r8), intent(out) :: ised(LBi:UBi,LBj:UBj,Nbed,NST) ! JRA
-------------------------------^
analytical.f90(837): error #6415: This name cannot be assigned this data type because it conflicts with prior uses of the name. [UBI]
integer, intent(in) :: LBi, UBi, LBj, UBj
----------------------------------^
analytical.f90(837): error #6415: This name cannot be assigned this data type because it conflicts with prior uses of the name. [UBJ]
integer, intent(in) :: LBi, UBi, LBj, UBj
--------------------------------------------^
analytical.f90(939): error #6410: This name has not been declared as an array or a function. [NSRC]
Nsrc(ng)=5
-----------^
analytical.f90(941): error #6458: This name must be the name of a variable with a derived type (structure type). [SOURCES]
SOURCES(ng)%Dsrc(is)=0.0_r8
-----------^
analytical.f90(942): error #6458: This name must be the name of a variable with a derived type (structure type). [SOURCES]
SOURCES(ng)%Isrc(is)=1
-----------^
analytical.f90(943): error #6458: This name must be the name of a variable with a derived type (structure type). [SOURCES]
SOURCES(ng)%Jsrc(is)=is+47
-----------^
analytical.f90(950): error #6837: The leftmost part-ref in a data-ref can not be a function reference. [SOURCES]
CALL mp_bcasti (ng, iNLM, SOURCES(ng)%Isrc)
----------------------------------^
analytical.f90(950): error #6158: The structure-name is invalid or is missing. [SOURCES]
CALL mp_bcasti (ng, iNLM, SOURCES(ng)%Isrc)
----------------------------------^
analytical.f90(951): error #6837: The leftmost part-ref in a data-ref can not be a function reference. [SOURCES]
CALL mp_bcasti (ng, iNLM, SOURCES(ng)%Jsrc)
----------------------------------^
analytical.f90(951): error #6158: The structure-name is invalid or is missing. [SOURCES]
CALL mp_bcasti (ng, iNLM, SOURCES(ng)%Jsrc)
----------------------------------^
analytical.f90(952): error #6837: The leftmost part-ref in a data-ref can not be a function reference. [SOURCES]
CALL mp_bcastf (ng, iNLM, SOURCES(ng)%Dsrc)
----------------------------------^
analytical.f90(952): error #6158: The structure-name is invalid or is missing. [SOURCES]
CALL mp_bcastf (ng, iNLM, SOURCES(ng)%Dsrc)
----------------------------------^
analytical.f90(964): error #6515: This function, which is specified as the left side of an assignment statement, is invalid. [SOURCES]
SOURCES(ng)%Qshape=Pspv
--------^
analytical.f90(965): error #6404: This name does not have a type, and must have an explicit type. [MSRC]
Npts=Msrc(ng)*N(ng)
-------------^
analytical.f90(970): error #6515: This function, which is specified as the left side of an assignment statement, is invalid. [SOURCES]
SOURCES(ng)%Qshape(is,k)=1.0_r8/REAL(N(ng),r8)
--------------^
analytical.f90(979): error #6515: This function, which is specified as the left side of an assignment statement, is invalid. [SOURCES]
SOURCES(ng)%Qbar=Pspv
--------^
analytical.f90(987): error #6515: This function, which is specified as the left side of an assignment statement, is invalid. [SOURCES]
SOURCES(ng)%Qbar(is)=fac*((71.0_r8)/5) !421, 71, 43.0_r8
----------^
analytical.f90(996): error #6515: This function, which is specified as the left side of an assignment statement, is invalid. [SOURCES]
SOURCES(ng)%Qsrc(is,k)=SOURCES(ng)%Qbar(is)* &
--------------^
analytical.f90(996): error #6837: The leftmost part-ref in a data-ref can not be a function reference. [SOURCES]
SOURCES(ng)%Qsrc(is,k)=SOURCES(ng)%Qbar(is)* &
-------------------------------------^
analytical.f90(996): error #6158: The structure-name is invalid or is missing. [SOURCES]
SOURCES(ng)%Qsrc(is,k)=SOURCES(ng)%Qbar(is)* &
-------------------------------------^
analytical.f90(997): error #6837: The leftmost part-ref in a data-ref can not be a function reference. [SOURCES]
& SOURCES(ng)%Qshape(is,k)
-------------------------------------^
analytical.f90(997): error #6158: The structure-name is invalid or is missing. [SOURCES]
& SOURCES(ng)%Qshape(is,k)
-------------------------------------^
analytical.f90(1008): error #6515: This function, which is specified as the left side of an assignment statement, is invalid. [SOURCES]
SOURCES(ng)%Tsrc=0.0_r8 ! initialize
--------^
analytical.f90(1023): error #6515: This function, which is specified as the left side of an assignment statement, is invalid. [SOURCES]
SOURCES(ng)%Tsrc(is,k,itemp)=T0(ng)
--------------^
analytical.f90(1024): error #6515: This function, which is specified as the left side of an assignment statement, is invalid. [SOURCES]
SOURCES(ng)%Tsrc(is,k,isalt)=0.0_r8
--------------^
analytical.f90(1025): error #6335: An array name is invalid in this context. [ISED]
DO ised=1,NST(ng)
-------------------^
analytical.f90(2061): catastrophic error: Too many errors, exiting
compilation aborted for analytical.f90 (code 1)
make: *** [Build/analytical.o] Error 1
[jande023@turing1 ~/2015ROMS]$

Working with John Warner earlier, I added a do loop within the "Set Tracers point Sources and/or Sinks" area of ana_psource.h (where salinity and temperature are set), to this end. Thats when I started to encounter variable definition and other build errors. Backing up, I am slightly confused why I had to add the do loop in the first place when in the ocean.in file I specify: NCS == 1, LuvSrc == T, LtracerSrc == T and in the sediment.in file I specify: MUD_Ltsrc == T. Note, I am using the 2015 ROMS version prior to combining all sediment input into the sediment.in file. Shouldn't my input file switches introduce suspended sediment into the point source without having to modify ana_psource file?

Would like to understand the purpose of these switches if not to introduce sediment via a river and would value any recommendations to achieve a successful build and ultimately introduce suspended sediment via my river into my estuary model.

thank you,

John


Attachments:
ana_psource.h [18.01 KiB]
Downloaded 147 times
Top
 Profile  
Reply with quote  
 Post subject: Re: Sediment from river!
PostPosted: Sun Oct 23, 2016 1:57 am 
Offline
User avatar

Joined: Wed Jul 02, 2003 5:29 pm
Posts: 3633
Location: IMS/UAF, USA
Code:
#ifdef SEDIMENT
      USE mod_sediment                                           ! JRA
      real(r8), intent(out) :: ised(LBi:UBi,LBj:UBj,Nbed,NST)    ! JRA
#endif
      USE mod_sources
What did I say about making sure all the use statements happen before the other stuff? The ised line *has* to be after USE mod_sources.


Top
 Profile  
Reply with quote  
 Post subject: Re: Sediment from river!
PostPosted: Sun Oct 23, 2016 3:42 pm 
Offline

Joined: Tue Oct 16, 2012 8:55 pm
Posts: 29
Location: Old Dominion Universiy
Thank you Kate,

I missed the last USE in my multiple trials, or in other words I failed to follow directions. Cleaned up errors significantly. However, the original errors related to definition of the variable NST remain.

To resolve, I Have defined (or attempted to defined) NST (Number of Sediment Tracers) as an input variable (comes from ocean.in file) as follows:

Imported variable declarations.
!
integer, intent(in) :: NST ! JRA
integer, intent(in) :: ng, tile, model
integer, intent(in) :: LBi, UBi, LBj, UBj
integer, intent(in) :: IminS, ImaxS, JminS, JmaxS
integer, intent(in) :: nnew, knew

However, I am still getting fatal build errors:

analytical.f90(836): error #6401: The attributes of this name conflict with those made accessible by a USE statement. [NST]
integer, intent(in) :: NST ! JRA
-----------------------------^
analytical.f90(836): error #6445: A dummy argument is required in this context. [NST]
integer, intent(in) :: NST ! JRA
-----------------------------^
compilation aborted for analytical.f90 (code 1)
make: *** [Build/analytical.o] Error 1

Assume the "conflict" is with the intent(in) because NST is clearly an integer. However, the value of NST comes from the ocean.in file NCS+NNS. Is this error related to the absence of a "dummy argument." Assume the dummy argument is needed to pass the value of NST to the psource subroutine?

Still interested to know the utility of the switches in the ocean and sediment input files if not to introduce sediment through the psource subroutine?

Thank you again.

V/R

John


Top
 Profile  
Reply with quote  
 Post subject: Re: Sediment from river!
PostPosted: Sun Oct 23, 2016 4:59 pm 
Offline
User avatar

Joined: Wed Jul 02, 2003 5:29 pm
Posts: 3633
Location: IMS/UAF, USA
There's an NST from mod_param.F. Since your routine has a "USE mod_param" you do not want to be passing in NST in the argument list. You weren't doing so in the last version you showed us. Is there some reason you decided to add it?


Top
 Profile  
Reply with quote  
 Post subject: Re: Sediment from river!
PostPosted: Sun Oct 23, 2016 9:41 pm 
Offline

Joined: Tue Oct 16, 2012 8:55 pm
Posts: 29
Location: Old Dominion Universiy
NST was in the original do loop that jcw recommended early on. In the version I attached earlier, I changed NST to NCS (# of cohesive sediments). Because I was getting the same errors with NST and NCS, I changed back to NST because I wasn't certain if it would cause problems in future runs.


Top
 Profile  
Reply with quote  
 Post subject: Re: Sediment from river!
PostPosted: Mon Oct 24, 2016 11:57 pm 
Offline

Joined: Tue Oct 16, 2012 8:55 pm
Posts: 29
Location: Old Dominion Universiy
Kate,

Figured out the build error.... ROMS didn't like the (ng) after NST in the do loop that was added in the psource analytical.... defined as an array.

Will pass the benefit of the run for the benefit of other followers.

thanks,

John


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


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

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group