Skip to content

Commit

Permalink
change name from iSed in ICM to iSFM
Browse files Browse the repository at this point in the history
  • Loading branch information
wzhengui committed Aug 1, 2024
1 parent 2cf23b6 commit 9532b30
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions sample_inputs/icm.nml
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,10 @@ imarsh_icm = 0 !0: off; 1: mechanistic model; 2: simple formulation
nmarsh = 3 !parameters in marsh module must be consistent with

!-----------------------------------------------------------------------
!Sediment module switch. iSed=1: Use sediment flux model
!Sediment module switch. iSFM=1: Use sediment flux model
!benthic flux provided by sed_flux_model
!-----------------------------------------------------------------------
iSed = 1
iSFM = 1

!-----------------------------------------------------------------------
!Benthic Algae
Expand Down
2 changes: 1 addition & 1 deletion sample_inputs/param.nml
Original file line number Diff line number Diff line change
Expand Up @@ -1032,7 +1032,7 @@
! !bThp: consective days of hypoxia (day)
! !bTox: consective days of oxic condition after hypoxia (day)
! !-------------------------------------------------------------
! iof_icm_sed = 1
! iof_icm_sfm = 1
!
! !Benthic Algae model
! iof_icm_ba = 1 !BA (g[C].m-2)
Expand Down
2 changes: 1 addition & 1 deletion src/Core/schism_glbl.F90
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ module schism_glbl
&inv_atm_bnd,ieos_type,ieos_pres,iupwind_mom,inter_mom,ishapiro,iveg, &
&nstep_ice,niter_shap,iunder_deep,flag_fib,ielm_transport,max_subcyc, &
&itransport_only,iloadtide,nc_out,nu_sum_mult,iprecip_off_bnd, &
&iof_ugrid,model_type_pahm,iof_icm_sav,iof_icm_marsh,iof_icm_sed,iof_icm_ba,&
&iof_ugrid,model_type_pahm,iof_icm_sav,iof_icm_marsh,iof_icm_sfm,iof_icm_ba,&
&iof_icm_clam,nbins_veg_vert,veg_lai,veg_cw
integer,save :: ntrs(natrm),nnu_pts(natrm),mnu_pts,lev_tr_source(natrm)
integer,save,dimension(:),allocatable :: iof_hydro,iof_wwm,iof_gen,iof_age,iof_sed,iof_eco, &
Expand Down
4 changes: 2 additions & 2 deletions src/Hydro/schism_init.F90
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ subroutine schism_init(iorder,indir,iths,ntime)
&veg_vert_z,veg_vert_scale_cd,veg_vert_scale_N,veg_vert_scale_D,veg_lai,veg_cw

namelist /SCHOUT/nc_out,iof_hydro,iof_wwm,iof_gen,iof_age,iof_sed,iof_eco,iof_icm_core, &
&iof_icm_silica,iof_icm_zb,iof_icm_ph,iof_icm_srm,iof_icm_sav,iof_icm_marsh,iof_icm_sed, &
&iof_icm_silica,iof_icm_zb,iof_icm_ph,iof_icm_srm,iof_icm_sav,iof_icm_marsh,iof_icm_sfm, &
&iof_icm_ba,iof_icm_clam,iof_cos,iof_fib,iof_sed2d,iof_ice,iof_ana,iof_marsh,iof_dvd, &
&nhot,nhot_write,iout_sta,nspool_sta,iof_ugrid

Expand Down Expand Up @@ -509,7 +509,7 @@ subroutine schism_init(iorder,indir,iths,ntime)
iof_hydro=0; iof_wwm=0; iof_gen=0; iof_age=0; iof_sed=0; iof_eco=0; iof_dvd=0
iof_hydro(1)=1; iof_hydro(25:26)=1
iof_icm_core=0; iof_icm_silica=0; iof_icm_zb=0; iof_icm_ph=0; iof_icm_srm=0; iof_icm_sav=0
iof_icm_marsh=0; iof_icm_sed=0; iof_icm_ba=0; iof_icm_clam=0; iof_cos=0; iof_fib=0; iof_sed2d=0
iof_icm_marsh=0; iof_icm_sfm=0; iof_icm_ba=0; iof_icm_clam=0; iof_cos=0; iof_fib=0; iof_sed2d=0
iof_ice=0; iof_ana=0; iof_marsh=0; nhot=0; nhot_write=8640; iout_sta=0; nspool_sta=10; iof_ugrid=0

read(15,nml=OPT)
Expand Down
4 changes: 2 additions & 2 deletions src/ICM/icm.F90
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ subroutine ecosystem(it)
if(iClam==1) call clam_calc(id,kb,dz(kb+1))

!sediment flux module
if(iSed==1) call sfm_calc(id,kb,tdep,dz(kb+1),it,isub)
if(iSFM==1) call sfm_calc(id,kb,tdep,dz(kb+1),it,isub)

!BA module
if(iBA==1) call ba_calc(id,kb,dz(kb+1))
Expand Down Expand Up @@ -326,7 +326,7 @@ subroutine ecosystem(it)
endif

!sediment fluxes addition from SFM
if(iSed==1) then
if(iSFM==1) then
!pH effect on sediment PO4 release
if(iPh==1 .and.ppatch(id)/=0) then
JPO4(id)=max(JPO4(id)*exp(1.3*(PH(kb+1)-8.5)),0.02)
Expand Down
16 changes: 8 additions & 8 deletions src/ICM/icm_init.F90
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ subroutine read_icm_param(imode)
use schism_glbl, only : rkind,dt,nvrt,ne_global,in_dir,out_dir,len_in_dir,len_out_dir, &
& ihconsv,nws,nea,npa,ihot,idry_e,ze,kbe,irange_tr,tr_el,tr_nd,nea,npa,iof_icm, &
& iof_icm_core,iof_icm_silica,iof_icm_zb,iof_icm_ph,iof_icm_srm,iof_icm_sav, &
& iof_icm_marsh,iof_icm_sed, iof_icm_ba,iof_icm_clam
& iof_icm_marsh,iof_icm_sfm,iof_icm_ba,iof_icm_clam

use schism_msgp, only : myrank,parallel_abort
use icm_misc, only : read_gr3_prop
Expand All @@ -41,7 +41,7 @@ subroutine read_icm_param(imode)
type(icm_pointer),pointer :: p

!define namelists
namelist /MARCO/ nsub,iRad,iKe,iLight,iPR,iLimit,isflux,iSed,iBA,iClam,nclam, &
namelist /MARCO/ nsub,iRad,iKe,iLight,iPR,iLimit,isflux,iSFM,iBA,iClam,nclam, &
& ibflux,iSilica,iZB,iPh,iSRM,isav_icm,imarsh_icm,nmarsh,idry_icm,KeC,KeS,KeSalt, &
& alpha,Ke0,tss2c,PRR,wqc0,WSP,WSPn,iout_icm,nspool_icm,idbg
namelist /CORE/ GPM,TGP,KTGP,MTR,MTB,TMT,KTMT,FCP,FNP,FPP,FCM,FNM,FPM, &
Expand Down Expand Up @@ -78,11 +78,11 @@ subroutine read_icm_param(imode)
!read ICM; compute total # of state variables
!------------------------------------------------------------------------------------
!initilize global switches
nsub=1; iRad=0; iKe=0; iLight=0; iPR=0; iLimit=0; isflux=0; iSed=1; iBA=0; ibflux=0; iSilica=0;
nsub=1; iRad=0; iKe=0; iLight=0; iPR=0; iLimit=0; isflux=0; iSFM=1; iBA=0; ibflux=0; iSilica=0;
iZB=0; iPh=0; iSRM=0; isav_icm=0; imarsh_icm=0; nmarsh=3; idry_icm=0; KeC=0.26; KeS=0.07; KeSalt=-0.02;
alpha=5.0; Ke0=0.26; tss2c=6.0; PRR=0; wqc0=0; WSP=0.0; WSPn=0.0; iout_icm=0; nspool_icm=0
iClam=0; nclam=0; idbg=0
jdry=>idry_icm; jsav=>isav_icm; jmarsh=>imarsh_icm; ised_icm=>iSed; iBA_icm=>iBA
jdry=>idry_icm; jsav=>isav_icm; jmarsh=>imarsh_icm; iBA_icm=>iBA

!read global switches
open(31,file=in_dir(1:len_in_dir)//'icm.nml',delim='apostrophe',status='old')
Expand Down Expand Up @@ -354,7 +354,7 @@ subroutine read_icm_param(imode)
endif

!SFM module: 8
if(iSed==1) then
if(iSFM==1) then
p=>wqout(nout+1); p%name='ICM_bPOC1'; p%p1=>bPOC(1,:); p%itype=4
p=>wqout(nout+2); p%name='ICM_bPOC2'; p%p1=>bPOC(2,:); p%itype=4
p=>wqout(nout+3); p%name='ICM_bPOC3'; p%p1=>bPOC(3,:); p%itype=4
Expand Down Expand Up @@ -478,7 +478,7 @@ subroutine read_icm_param(imode)
if(iSRM==1) iof_icm(iout(1,5): iout(2,5)) =iof_icm_srm
if(isav_icm/=0) iof_icm(iout(1,6): iout(2,6)) =iof_icm_sav
if(imarsh_icm==1) iof_icm(iout(1,7): iout(2,7)) =iof_icm_marsh
if(ised_icm==1) iof_icm(iout(1,8): iout(2,8)) =iof_icm_sed
if(iSFM==1) iof_icm(iout(1,8): iout(2,8)) =iof_icm_sfm
if(iBA_icm==1) iof_icm(iout(1,9): iout(2,9)) =iof_icm_ba
if(iClam==1) iof_icm(iout(1,10):iout(2,10))=iof_icm_clam
do i=1,nout
Expand Down Expand Up @@ -1027,7 +1027,7 @@ subroutine icm_vars_init
endif

!SFM init
if(iSed==1) then
if(iSFM==1) then
bPOC(:,i)=bPOC0(:); bPON(:,i)=bPON0(:); bPOP(:,i)=bPOP0(:)
bNH4(i)=bNH40; bNO3(i)=bNO30; bPO4(i)=bPO40
bH2S(i)=bH2S0; bCH4(i)=bCH40; bstc(i)=bstc0
Expand Down Expand Up @@ -1307,7 +1307,7 @@ subroutine check_icm_param()
if(iSRM/=0.and.iSRM/=1) call parallel_abort('ICM iSRM: 0/1')
if(jsav/=0.and.jsav/=1.and.jsav/=2) call parallel_abort('ICM isav_icm: 0/1/2')
if(jmarsh/=0.and.jmarsh/=1.and.jmarsh/=2) call parallel_abort('ICM imarsh_icm: 0/1/2')
if(iSed/=0.and.iSed/=1) call parallel_abort('ICM iSed: 0/1')
if(iSFM/=0.and.iSFM/=1) call parallel_abort('ICM iSFM: 0/1')
if(iBA/=0.and.iBA/=1) call parallel_abort('ICM iBA: 0/1')
if(iRad/=0.and.iRad/=1) call parallel_abort('ICM iRad: 0/1')
if(isflux/=0.and.isflux/=1) call parallel_abort('ICM isflux: 0/1')
Expand Down
4 changes: 2 additions & 2 deletions src/ICM/icm_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ module icm_mod
!-------------------------------------------------------------------------------
!global switch and variables
!-------------------------------------------------------------------------------
integer,save,target :: nsub,iKe,iLight,iPR,iLimit,iSed,iBA,iRad,isflux,ibflux,idbg(10),iout_icm,nspool_icm
integer,save,target :: nsub,iKe,iLight,iPR,iLimit,iSFM,iBA,iRad,isflux,ibflux,idbg(10),iout_icm,nspool_icm
integer,save,target :: iSilica,iZB,iPh,iSRM,isav_icm,imarsh_icm,nmarsh,idry_icm,iClam,nclam
real(rkind),save,target :: KeC,KeS,KeSalt,Ke0,tss2c,PRR(3),wqc0(29),WSP(29),WSPn(29)
real(rkind),save,target,dimension(3) :: alpha
integer,save,pointer :: jdry,jsav,jmarsh,ised_icm,iBA_icm
integer,save,pointer :: jdry,jsav,jmarsh,iBA_icm

integer,save,target :: ntrs_icm,nout,nouts(10),iout(2,10),nout_icm_3d(2),nhot_icm
integer,save,pointer :: itrs_icm(:,:),elem_in(:,:),nout_icm
Expand Down

0 comments on commit 9532b30

Please sign in to comment.