2D tidal modelling and options in *.h and *.in files

Discussion of how to use ROMS on different regional and basin scale applications.

Moderators: arango, robertson

Post Reply
Message
Author
BAN

2D tidal modelling and options in *.h and *.in files

#1 Unread post by BAN »

Hi
I am a new ROMS user and the first application is a high resolution Cartesian barotropic-tides-only run for the local region. We have a locally developed barotropic model, but we also want to run ROMS in 2D mode and do a comparison.
ROMS is installed on the local cluster and some test cases have been executed. I have not found an ideal test case on which to construct/sculpt my application, but latte_c seems to be a good candidate (forcing files located at http://coast-enviro.er.usgs.gov/models/Latte/). Latte_c is a realistic 3D application with tidal forcing at the open boundaries etc.
My plan was to iteratively turn off the different 3D options (input and output) so I would end up with a 2D tides-only application . . . but this became more difficult than I had expected. This leads me to my question:

Is there anybody which has conducted 2D runs (preferably with tidal forcing, but this is not a must as I also have the latte_c example) and would be willing to send me the header file (*.h) input file (*.in)?

It would be much appreciated.

Best regards
Bardur
-------------------------------
Bardur A. Niclasen
University of the Faroe Islands
E-mail: bardurn@setur.fo and bardurn@gmail.com
Web page: http://setur.fo/index.php?id=653

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: 2D tidal modelling and options in *.h and *.in files

#2 Unread post by kate »

What happens if you simply turn off the SOLVE3D option and change the timestepping in your ocean.in to have a shorter dt, ndtfast=1? That's all I did to get a 2D Bering Sea.

BAN

Re: 2D tidal modelling and options in *.h and *.in files

#3 Unread post by BAN »

Hi Kate.
Thank you for the suggestion.
I tried it (wrote "#undef SOLVE3D" in latte_c.h) but got compilation errors as given below. I think that the problem is that there are several 3D options turned on in latte_c.h which are violated by using "#undef SOLVE3D". I have been able to get it to compile by undefining options which seem to be 3D-only, but then the model will not run, I guess some options in ocean_latte_c.in are violated. I have then tried to eliminate 3D options in ocean_latte_c.in, but got stuck . . . there are too many different combination's of options in *.h and *.in.

I guess running a 3D model with only one or two layers (I’m not sure what is the minimum), and with only depth averaged output, could make the model behave similar to a 2D model but I guess that parallel ROMS would be outperformed by even a serial 2D model due overhead of using 3D routines to calculate 2D physics . . . and our goal is to get ROMS running as fast as possible in 2D, so we can use the computational power for 2D resolution instead.
It must be possible to do this as this seems like this is what is done in:
Jihène Abdennadhera and Moncef Boukthir, "Numerical simulation of the barotropic tides in the Tunisian Shelf and the Strait of Sicily" Journal of Marine Systems, Volume 63, Issues 3-4, December 2006, Pages 162-182

p.s.
Here are some of the error messages from the compilation:
---------------------------------------

fortcom: Error: bulk_flux.f90, line 106: This is not a field name that is defined in the encompassing structure. [ALPHA] & MIXING(ng) % alpha,
. . .
fortcom: Error: bulk_flux.f90, line 120: This is not a field name that is defined in the encompassing structure. [STFLX] & FORCES(ng) % stflx,
. . .
fortcom: Error: bulk_flux.f90, line 106: The shape matching rules of actual arguments and dummy arguments have been violated. [ALPHA] & MIXING(ng) % alpha,
. . .
fortcom: Error: bulk_flux.f90, line 120: The shape matching rules of actual arguments and dummy arguments have been violated. [STFLX] & FORCES(ng) % stflx,
----------------------------------------^
compilation aborted for bulk_flux.f90 (code 1)
make: *** [/home/bardurn/ROMS/Projects/Latte_c/BAN_04/Build/bulk_flux.o] Error 1

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: 2D tidal modelling and options in *.h and *.in files

#4 Unread post by kate »

Your problem is with bulk_flux.F. I have:

Code: Select all

#ifdef SOLVE3D
# define CORE_FORCING
# define BULK_FLUXES
# define CCSM_FLUXES
# if defined BULK_FLUXES || defined CCSM_FLUXES
#  define LONGWAVE_OUT
#  define DIURNAL_SRFLUX
#  define EMINUSP
#  undef ANA_SRFLUX
#  undef ALBEDO
#  undef LONGWAVE
# endif
#endif
If it is 2D, there are no bulk fluxes.

Oh, and the ocean.in file can still have the 3D parts. They will be ignored in a 2D simulation.

ocecept
Posts: 42
Joined: Tue Jan 08, 2008 3:57 pm
Location: Universidade Federal do Ceará
Contact:

Re: 2D tidal modelling and options in *.h and *.in files

#5 Unread post by ocecept »

Hi Bardur, here is one example of my *.h for a 2D - tidal model. I'm using the OSU / TPX 7.2 global model (see https://www.myroms.org/wiki/index.php/Tidal_Forcing for detais) to force the model. That's different from what you intend to do, but maybe it will help:

#define UV_COR
#define UV_LDRAG
#define UV_VIS2

#define MASKING

#define NORTH_WALL

#define SOUTH_FSCHAPMAN
#define SOUTH_M2FLATHER
#define SOUTH_TRADIATION

#define EAST_FSCHAPMAN
#define EAST_M2FLATHER
#define EAST_TRADIATION

#define WEST_FSCHAPMAN
#define WEST_M2FLATHER
#define WEST_TRADIATION

#define SSH_TIDES
#define UV_TIDES
#define RAMP_TIDES

#define ANA_INITIAL
#define ANA_SMFLUX
#define ANA_FSOBC
#define ANA_M2OBC
#define STATIONS


Then you have to define ndtfast=1 and also change the Number of vertical levels to N == 1 on the *.in file. If you want I can send a copy of my *.h and *.in file to you.

Good look.

Carlos Teixeira

BAN

Re: 2D tidal modelling and options in *.h and *.in files

#6 Unread post by BAN »

Thank you very much for your suggestions. I’ll have a go at it.

p.s. Carlos if you have the time, it would be much appreciated if you did send me the *.h and *.in file. It is always good to have different examples. My email is given in the first post (gmail account usually is more stable).

klyons

Re: 2D tidal modelling and options in *.h and *.in files

#7 Unread post by klyons »

Bardur

Something else to consider is whether or not you want to include wind forcing in your model. If you do not want to use analytical surface stress (ANA_SMFLX) you will have to explicitly include surface stress fields (sustr and svstr) in your forcing file (if BULK_FLUXES was switched on the surface stress fields would be calculated by the model using wind speed, etc).

Kieran

BAN

Re: 2D tidal modelling and options in *.h and *.in files

#8 Unread post by BAN »

Hi again
I gave it a go, but I quickly ran into new difficulties.
If I use ‘# define BULK_FLUXES’ I have the errors mentioned above if running in 2D, and when I do not use ‘# define BULK_FLUXES’ I get the following error:

GET_2DFLD - unable to find requested variable: sustr
in file: file:
../in/frc_tides_lattec.nc
. . .
ROMS/TOMS - Input error ............. exit_flag: 2
ERROR: Abnormal termination: NetCDF INPUT.
REASON: No error

Is possible to work around this in a 2D tides-only application?
or must ROMS have access to surface-stress (ANA_SMFLX) or wind-fields (BULK_FLUXES) to be able to execute?

BAN

Re: 2D tidal modelling and options in *.h and *.in files

#9 Unread post by BAN »

I gave it a go once more. Using #define ANA_SMFLUX generates the surface stress with only zero values, so the 'GET_2DFLD - unable to find requested variable: sustr'-error is avoided. The time step also had to be adjusted so the model did not blow-up. . . and it runs quite fast :o)

Thank you all for the help

Post Reply