How to define boundary conditions from an external data file

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
sargenta

How to define boundary conditions from an external data file

#1 Unread post by sargenta »

Hi,

I am trying to use a time series of free surface level measurements as a boundary condition for my run. I have defined the ANA_FSOBC flag, and modified the ana_fsobc.F file to open the datafile, read the values, and assign them to BOUNDARY(ng)%zeta_east. My question is, how do I specify that the first measurement corresponds to time T, the second to time T+DT, and so on?

Thank you.

jcwarner
Posts: 1200
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

Re: How to define boundary conditions from an external data file

#2 Unread post by jcwarner »

well, actually you do not want to use ana_fsobc. You want to create a netcdf file with zeta_east and zeta_time. Then add that netcdf file to your ocean*.in file as a boundary frc file.

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

Re: How to define boundary conditions from an external data file

#3 Unread post by arango »

See the templates for the boundary NetCDF file in Data/ROMS/CDL in ROMS tree directory.Check either bry_limit.cdl or bry_unlimit.cdl files. Recall that you can edit any these CDL files and create a NetCDF file by just typing, for example:

Code: Select all

ncgen -b bry_limit.cdl
Then, you can use any NetCDF software to fill the file with data.

sargenta

Re: How to define boundary conditions from an external data file

#4 Unread post by sargenta »

Thanks for your replies. I just wanted to see if I could avoid the "hassle" of generating the netcdf file by reading directly from my data file.

Regards

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

Re: How to define boundary conditions from an external data file

#5 Unread post by arango »

Hassle? ROMS is a parallel model which uses either shared-memory or distributed-memory paradigms. As in any parallel code, a very careful manipulation of input/output data is required. In distributed-memory, an exchange of the halo regions is needed. This is not trivial and requires serious expertise :!: The NetCDF files provide a nice way to do this without the need to worry about parallel partitions. Also recall that a time interpolation is required a every time-step between snapshots (records) in the boundary file. Notice that adding simple print is problematic in parallel codes. You need to follow parallel rules for it. Recall that ROMS uses NetCDF extensively and users need to become familiar with it. If this is really an inconvenience, perhaps your are using the wrong model for your application.

I don't know what do you mean by data. The boundary conditions are usually computed from large scale ocean models. Very rarely, we use hydrographic data since there is not enough data to satisfy the boundary requirements for all model state variables for a particular application.

sargenta

Re: How to define boundary conditions from an external data file

#6 Unread post by sargenta »

Ooops! Sorry, I didn't want to annoy anyone :-). I am sure there is a reason to be using netcdf files for the ROMS code, even though I was unaware of all that you said in your first paragraph. Perhaps "hassle" isn't the word I should have used. I am working on my first application using ROMS, but I have used the AGRIF version of the model before, in which the Roms_tools packet provides an easy way to generate the necessary netcdf files, and I suppose I just miss it!
In any case, I have created my boundary netcdf file and the model seems to run OK, although I haven't had time to check results, so thank you again for your help.

Post Reply