integration of vertical speed for floats; types of floats?

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
jklinck
Posts: 34
Joined: Mon Jun 30, 2003 2:29 pm
Location: CCPO/ODU, USA

integration of vertical speed for floats; types of floats?

#1 Unread post by jklinck »

I have noticed in the step_floats routine, that an Euler forward time scheme is used to calculate the vertical position of the float while the horizontal position uses a predictor-corrector scheme. Is there any reason to do this? Has anyone tried the p-c scheme for the vertical equation?

As a second question, how many types of floats are there? The documentation mentions only type 0 or 1. However, in step_floats, there is an if loop that tests for a float type 2.

John

User avatar
arango
Site Admin
Posts: 1347
Joined: Wed Feb 26, 2003 4:41 pm
Location: DMCS, Rutgers University
Contact:

Re: integration of vertical speed for floats; types of floats?

#2 Unread post by arango »

jklinck wrote:I have noticed in the step_floats routine, that an Euler forward time scheme is used to calculate the vertical position of the float while the horizontal position uses a predictor-corrector scheme. Is there any reason to do this? Has anyone tried the p-c scheme for the vertical equation?
Which version of the code are you taking about? The latest revision of the code has a predictor-corrector scheme in the vertical position (izgrd) for Lagrangian-type floats (Ftype = 1). The Euler forward time step is only used when vertical random walk (FLOAT_VWALK) is activated. Your point is noted and we should explore more accurate schemes. I don't recall the reason why the Euler step was coded. Mark do you recall? Currently, in the predictor step we have:

Code: Select all

      cff1=8.0_r8/3.0_r8
      cff2=4.0_r8/3.0_r8
      DO l=Lstr,Lend
        IF (MyThread(l).and.bounded(l)) THEN
          track(ixgrd,nfp1,l)=track(ixgrd,nfm3,l)+                      &
     &                        dt(ng)*(cff1*track(ixrhs,nf  ,l)-         &
     &                                cff2*track(ixrhs,nfm1,l)+         &
     &                                cff1*track(ixrhs,nfm2,l))
          track(iygrd,nfp1,l)=track(iygrd,nfm3,l)+                      &
     &                        dt(ng)*(cff1*track(iyrhs,nf  ,l)-         &
     &                                cff2*track(iyrhs,nfm1,l)+         &
     &                                cff1*track(iyrhs,nfm2,l))

# if defined SOLVE3D && !defined FLOAT_VWALK
!
!  Compute vertical position (grid units) 3D Lagrangian floats.
!
          IF (Ftype(l).eq.flt_Lagran) THEN
            track(izgrd,nfp1,l)=track(izgrd,nfm3,l)+                    &
     &                          dt(ng)*(cff1*track(izrhs,nf  ,l)-       &
     &                                  cff2*track(izrhs,nfm1,l)+       &
     &                                  cff1*track(izrhs,nfm2,l))
!
!  Compute vertical position (grid units) for isobaric floats
!  (p=g*(z+zeta)=constant) or geopotential floats (constant depth).
!  Use bilinear interpolation to determine vertical position.
!
          ELSE IF ((Ftype(l).eq.flt_Isobar).or.                         &
     &             (Ftype(l).eq.flt_Geopot)) THEN
...
      END DO
whereas in the corrector step we have:

Code: Select all

      cff1=9.0_r8/8.0_r8
      cff2=1.0_r8/8.0_r8
      cff3=3.0_r8/8.0_r8
      cff4=6.0_r8/8.0_r8
      DO l=Lstr,Lend
        IF (MyThread(l).and.bounded(l)) THEN
          track(ixgrd,nfp1,l)=cff1*track(ixgrd,nf  ,l)-                 &
     &                        cff2*track(ixgrd,nfm2,l)+                 &
     &                        dt(ng)*(cff3*track(ixrhs,nfp1,l)+         &
     &                                cff4*track(ixrhs,nf  ,l)-         &
     &                                cff3*track(ixrhs,nfm1,l))
          track(iygrd,nfp1,l)=cff1*track(iygrd,nf  ,l)-                 &
     &                        cff2*track(iygrd,nfm2,l)+                 &
     &                        dt(ng)*(cff3*track(iyrhs,nfp1,l)+         &
     &                                cff4*track(iyrhs,nf  ,l)-         &
     &                                cff3*track(iyrhs,nfm1,l))

# if defined SOLVE3D && !defined FLOAT_VWALK
!
!  Compute vertical position (grid units) 3D Lagrangian floats.
!
          IF (Ftype(l).eq.flt_Lagran) THEN
            track(izgrd,nfp1,l)=cff1*track(izgrd,nf  ,l)-               &
     &                          cff2*track(izgrd,nfm2,l)+               &
     &                          dt(ng)*(cff3*track(izrhs,nfp1,l)+       &
     &                                  cff4*track(izrhs,nf  ,l)-       &
     &                                  cff3*track(izrhs,nfm1,l))
!
!  Compute vertical position (grid units) for isobaric floats
!  (p=g*(z+zeta)=constant) or geopotential floats (constant depth).
!  Use bilinear interpolation to determine vertical position.
!
          ELSE IF ((Ftype(l).eq.flt_Isobar).or.                         &
     &             (Ftype(l).eq.flt_Geopot)) THEN
...
      END DO
jklinck wrote:As a second question, how many types of floats are there? The documentation mentions only type 0 or 1. However, in step_floats, there is an if loop that tests for a float type 2.
The classification of floats was changed recently. See following :arrow: trac ticket. Currently, three types of floats are allowed:
  • 3D Lagrangrian floats (Ftype=1; flt_Lagran)
  • Isobaric floats, p=g*(z+zeta)=constant, (Ftype=2; flt_Isobar)
  • Geopotential floats, constant depth, (Ftype=3; flt_Geopot)

User avatar
m.hadfield
Posts: 521
Joined: Tue Jul 01, 2003 4:12 am
Location: NIWA

Re: integration of vertical speed for floats; types of floats?

#3 Unread post by m.hadfield »

arango wrote:I don't recall the reason why the Euler step was coded. Mark do you recall?
I don't know how to implement a random walk with the predictor-corrector scheme.

jklinck
Posts: 34
Joined: Mon Jun 30, 2003 2:29 pm
Location: CCPO/ODU, USA

Re: integration of vertical speed for floats; types of floats?

#4 Unread post by jklinck »

It looks like the vertical calculation is predictor-corrector unless the random walk is on.

I got lost in the cpp statements.

It should be possible to do the random walk with predictor-corrector. I will think about it, but it will be down my list of things to think about.

Thanks,

John

OcGaBy
Posts: 27
Joined: Wed Sep 13, 2006 3:25 pm
Location: National Oceanography Centre

Re: integration of vertical speed for floats; types of float

#5 Unread post by OcGaBy »

I am revisiting the floats code and I found many new things. Can someone explained me the difference between FLOAT_VWALK and VWALK_FORWARD?
Thanks a lot!

User avatar
m.hadfield
Posts: 521
Joined: Tue Jul 01, 2003 4:12 am
Location: NIWA

Re: integration of vertical speed for floats; types of float

#6 Unread post by m.hadfield »

FLOAT_VWALK enables a vertical random walk for the floats.

VWALK_FORWARD has an effect only if FLOAT_VWALK is activated. With VWALK_FORWARD, the float vertical movement is implemented using a forward-only time-stepping scheme, otherwise it uses the same predictor-corrector method as the rest of the float stepping code.

Historical note: FLOAT_VWALK was orginally coded by me with forward time-stepping only. Several years later the predictor-corrector option was added by John Klinck and/or Hernan Arango.

Post Reply