Here is a segment in ROMS3.0 Utility/def_avg.F
https://www.myroms.org/svn/src/tags/rom ... /def_avg.F
Code: Select all
!
! Define surface net salt flux.
!
IF (Hout(idTsur(isalt),ng)) THEN
Vinfo( 1)=Vname(1,idTsur(isalt))
WRITE (Vinfo( 2),'(a,1x,a)') Prefix, &
& TRIM(Vname(2,idTsur(isalt)))
Vinfo( 3)=Vname(3,idTsur(isalt))
Vinfo(11)='upward flux, freshening (net precipitation)'
Vinfo(12)='downward flux, salting (net evaporation)'
Vinfo(14)=Vname(4,idTsur(isalt))
Vinfo(16)=Vname(1,idtime)
# if defined WRITE_WATER && defined MASKING
Vinfo(20)='mask_rho'
# endif
Vinfo(22)='coordinates'
Aval(5)=REAL(Iinfo(1,idTsur(itemp),ng),r8)
status=def_var(ncAVGid(ng),avgVid(idTsur(isalt),ng),NF_FOUT, &
& nvd3,t2dgrd,Aval,Vinfo,ncname)
END IF
have "idTsur(itemp)" in it. Hence the 4th to the last line should be:
Code: Select all
Aval(5)=REAL(Iinfo(1,idTsur(isalt),ng),r8)
https://www.myroms.org/svn/src/tags/rom ... get_data.F
where
Code: Select all
# ifndef ANA_SPFLUX
!
!-----------------------------------------------------------------------
! Passive tracers surface fluxes.
!-----------------------------------------------------------------------
!
DO i=NAT+1,NT(ng)
CALL get_2dfld (ng, iNLM, idTsur(i), ncFRCid(idTsur(i),ng), &
& nFfiles(ng), FRCname(1,ng), update(1), &
& LBi, UBi, LBj, UBj, 2, 1, &
# ifdef MASKING
& GRID(ng) % rmask(LBi,LBj), &
# endif
& FORCES(ng) % stflxG(LBi,LBj,1,i))
END DO
# endif
# ifndef ANA_BPFLUX
!
!-----------------------------------------------------------------------
! Passive tracers bottom fluxes.
!-----------------------------------------------------------------------
!
DO i=NAT+1,NT(ng)
CALL get_2dfld (ng, iNLM, idTbot(i), ncFRCid(idTbot(i),ng), &
& nFfiles(ng), FRCname(1,ng), update(1), &
& LBi, UBi, LBj, UBj, 2, 1, &
# ifdef MASKING
& GRID(ng) % rmask(LBi,LBj), &
# endif
& FORCES(ng) % btflxG(LBi,LBj,1,i))
END DO
# endif
# endif
https://www.myroms.org/svn/src/tags/rom ... _ncparam.F
Code: Select all
CASE ('idTsur(itemp)')
idTsur(itemp)=varid
CASE ('iddQdT')
iddQdT=varid
CASE ('idsfwf')
idsfwf=varid
CASE ('idTsur(isalt)')
idTsur(isalt)=varid
CASE ('idTbot(itemp)')
idTbot(itemp)=varid
CASE ('idTbot(isalt)')
Code: Select all
# ifdef ADJUST_STFLUX
!
! Write out surface tracer fluxes.
!
DO itrc=1,NT(ng)
scale=1.0_r8
gtype=gfactor*r2dvar
status=nf_fwrite2d(ng, iADM, ncHSSid(ng), &
& hssVid(idTsur(itrc),ng), &
& tHSSindx(ng), gtype, &
& LBi, UBi, LBj, UBj, scale, &
# ifdef MASKING
& GRID(ng) % rmask(LBi,LBj), &
# endif
& FORCES(ng) % ad_stflx(LBi,LBj,itrc))
IF (status.ne.nf_noerr) THEN
IF (Master) THEN
WRITE (stdout,10) TRIM(Vname(1,idTsur(itrc))), &
& tHSSindx(ng)
END IF
exit_flag=3
ioerror=status
RETURN
END IF
END DO
# endif
assigned in mod_ncparam.F
Same issue in def_hessian.F
Code: Select all
# ifdef ADJUST_STFLUX
!
! Define surface tracer fluxes.
!
DO itrc=1,NT(ng)
Vinfo( 1)=Vname(1,idTsur(itrc))
WRITE (Vinfo( 2),40) TRIM(Vname(2,idTsur(itrc)))
Vinfo( 3)='nondimensional'
Vinfo(14)=Vname(4,idTsur(itrc))
Vinfo(16)=Vname(1,idtime)
status=def_var(ncHSSid(ng),hssVid(idTsur(itrc),ng), &
& NF_FOUT,nvd3,t2dgrd,Aval,Vinfo,ncname)
END DO
# endif
# endif