Changes for constituents, salt, gwflow, and heat#159
Changes for constituents, salt, gwflow, and heat#159RyanTBailey wants to merge 23 commits intoswat-model:mainfrom
Conversation
…imulation years are read in the road salt input file
…ons for cs mass in lateral flow and surface runoff
|
This is a big merge, so I have asked several people including myself to review. |
|
so far I found three issues in channel routing that may cause salt and constituent mass to be silently wrong or lost entirely.
!! rtb: add salt and constituent mass to outflow; then subtract from channel mass storage
if(cs_db%num_salts > 0) then
do isalt=1,cs_db%num_salts
hcs2%salt(isalt) = hcs2%salt(isalt) + (rto * ch_water(jrch)%salt(isalt)) ! line 208: accumulates
ch_water(jrch)%salt(isalt) = ch_water(jrch)%salt(isalt) - hcs2%salt(isalt) ! line 209: subtracts FULL cumulative
enddo
endif
if(cs_db%num_cs > 0) then
do ics=1,cs_db%num_cs
hcs2%cs(ics) = hcs2%cs(ics) + (rto * ch_water(jrch)%cs(ics)) ! line 214: accumulates
ch_water(jrch)%cs(ics) = ch_water(jrch)%cs(ics) - hcs2%cs(ics) ! line 215: subtracts FULL cumulative
enddo
endif
Set in hyd_sep_array(ich,1) = hdsep2%flo_surq / 86400.
hyd_sep_array(ich,2) = hdsep2%flo_latq / 86400.
hyd_sep_array(ich,3) = hdsep2%flo_gwsw / 86400.
hyd_sep_array(ich,4) = hdsep2%flo_swgw / 86400.
hyd_sep_array(ich,5) = hdsep2%flo_satex / 86400.
hyd_sep_array(ich,6) = hdsep2%flo_satexsw / 86400.
hyd_sep_array(ich,7) = hdsep2%flo_tile / 86400.Overwritten by hyd_sep_array(ich,1) = q_lsu_surf
hyd_sep_array(ich,2) = q_lsu_lat
hyd_sep_array(ich,3) = q_gw
hyd_sep_array(ich,4) = q_lsu_wyld
hyd_sep_array(ich,5) = q_lsu_sno
hyd_sep_array(ich,6) = tw_final
hyd_sep_array(ich,7) = tw_init |
|
File: if (ch_dat(ichi)%nut == 0) write (9001,*) ch_dat_c(ichi)%nut, " not found (nutrients.cha)" ! line 104
if (ch_dat(ichi)%nut == 0) write (9001,*) ch_dat_c(ichi)%temp, " not found (temperature.cha)" ! line 105Line 105 checks |
These are changes to many files focused on constituents, salinity, gwflow, and heat. I was doing commits one file at a time, but then I must have pressed the wrong button because the remaining files were committed without being able to enter a description of the changes.
Thank you
Ryan