Particle floats in ROMS?

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
osean
Posts: 47
Joined: Sat Jan 23, 2021 3:46 pm
Location: MIT-WHOI

Particle floats in ROMS?

#1 Unread post by osean »

Is there a way to seed particle floats in ROMS?

I see that there is a float tracking test case, but the wiki page for it is nonexistent: https://www.myroms.org/wiki/FLT_TEST_CASE

Is a tutorial somewhere that can help me set up particle tracking in ROMS? Very lost in this

Thanks

User avatar
wilkin
Posts: 922
Joined: Mon Apr 28, 2003 5:44 pm
Location: Rutgers University
Contact:

Re: Particle floats in ROMS?

#2 Unread post by wilkin »

#define FLOATS

then ROMS reads the "floats.in" file name set by option FPOSNAME in roms.in. There is an example floats.in file in External that is documented further on WikiROMS here
https://www.myroms.org/wiki/floats.in
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

osean
Posts: 47
Joined: Sat Jan 23, 2021 3:46 pm
Location: MIT-WHOI

Re: Particle floats in ROMS?

#3 Unread post by osean »

Thanks for the information. After some digging I found it

But I wonder if you know why in the flt_test.h there is no FLOATS flag, but the test case still runs normally and produces float output??
** svn $Id: flt_test.h 1100 2022-01-06 21:19:26Z arango $
*******************************************************************************
** Copyright (c) 2002-2022 The ROMS/TOMS Group **
** Licensed under a MIT/X style license **
** See License_ROMS.txt **
*******************************************************************************
**
** Options for Floats Tracking Test.
**
** Application flag: FLT_TEST
** Input script: roms_flt_test2d.in, roms_flt_test3d.in
** floats_flt_test2d.in, floats_flt_test3d.in
*/

#define UV_ADV
#define UV_QDRAG
#define UV_VIS2
#define MIX_S_UV
#define MASKING
#define ANA_GRID
#define ANA_INITIAL
#define ANA_SMFLUX

#ifdef SOLVE3D
# define DJ_GRADPS
# define SPLINES_VDIFF
# define SPLINES_VVISC
# define BODYFORCE
# define ANA_BTFLUX
# define ANA_STFLUX
#endif
It is a little confusing - without FLOATS defined the run also produces roms_flt.nc output at the end. I wonder if this is something done for the 4.0 version ROMS?

Below is an attempt to plot the float trajectories...

fltplot.png
fltplot.png (34.89 KiB) Viewed 12236 times

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

Re: Particle floats in ROMS?

#4 Unread post by arango »

ROMS will not generate the floats NetCDF file without activating the FLOATS option. You MUST have activated it. Check the ROMS standard output and look at the report of the activated options. There is a test for the 2D and 3D Lagrangian floats in the test repository. We even provide the plt_floats.m as a guideline on how to plot them. I haven't run that test in a long time, but you need to animate in time the location of the float trajectory. Your figure doesn't make sense.

I don't know what you mean about the seed. Randon number generation? If so, the random numbers are generated internally if you activate FLOAT_VWALK.

User avatar
wilkin
Posts: 922
Joined: Mon Apr 28, 2003 5:44 pm
Location: Rutgers University
Contact:

Re: Particle floats in ROMS?

#5 Unread post by wilkin »

Where did you get your source code?

My up-to-date checkout from myroms.org has flt_test.h at revision 1099, and the #define FLOATS is definitely there.

Code: Select all

/*
** svn $Id: flt_test.h 1099 2022-01-06 21:01:01Z arango $
*******************************************************************************
** Copyright (c) 2002-2022 The ROMS/TOMS Group                               **
**   Licensed under a MIT/X style license                                    **
**   See License_ROMS.txt                                                    **
*******************************************************************************
**
** Options for Floats Tracking Test.
**
** Application flag:   FLT_TEST
** Input script:       roms_flt_test2d.in,   roms_flt_test3d.in
**                     floats_flt_test2d.in, floats_flt_test3d.in
*/

#define UV_ADV
#define UV_QDRAG
#define UV_VIS2
#define MIX_S_UV
#define FLOATS
#define MASKING
#define ANA_GRID
#define ANA_INITIAL
#define ANA_SMFLUX
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

Post Reply