Skip to content

Commit

Permalink
Add SAL/TEM limiter for output netcdf
Browse files Browse the repository at this point in the history
  • Loading branch information
danishyo committed Mar 25, 2024
1 parent 226aba6 commit ab9370f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/PDAF_bindings/output_netcdf_pdaf.F90
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
module output_schism_pdaf
use schism_glbl, only: nea,nsa,npa,nvrt,idry,idry_e,idry_s,znl,id_out_var,kbp,rkind,&
& np,ne,ns,time_stamp,iplg,xnd,ynd,rnday,dt,kbe,elnode,i34,kbs,isidenode,&
& tempmin,tempmax,saltmin,saltmax,&
& nsteps_from_cold,cumsum_eta,windx,windy
use schism_msgp, only: myrank,parallel_abort,nproc
use netcdf
Expand Down Expand Up @@ -115,6 +116,7 @@ subroutine write_netcdf_pdaf( step, dim_p, state_p, std_p)
do k=1,nvrt
itot=itot+1
temp(k,i)=state_p(itot)
if(temp(k,i)<tempmin.or.temp(k,i)>tempmax) temp(k,i)=max(tempmin,min(temp(k,i),tempmax))
temp_std(k,i)=std_p(itot)
end do
do k=1,kbp(i)-1 ! extrapolation
Expand All @@ -126,6 +128,7 @@ subroutine write_netcdf_pdaf( step, dim_p, state_p, std_p)
do k=1,nvrt
itot=itot+1
salt(k,i)=state_p(itot)
if(salt(k,i)<saltmin.or.salt(k,i)>saltmax) salt(k,i)=max(saltmin,min(salt(k,i),saltmax))
salt_std(k,i)=std_p(itot)
end do
do k=1,kbp(i)-1 ! extrapolation
Expand Down

0 comments on commit ab9370f

Please sign in to comment.