Hi,
I am a new ROMS user and I am trying to figure out how to create the netCDF file listed as an input at the end of my ocean_*.in file. When looking at test cases (riverplume or upwelling), there is a list of .nc files used as inputs:
GRDNAME == ocean_grd.nc
ININAME == ocean_ini.nc
ITLNAME == ocean_itl.nc
IRPNAME == ocean_irp.nc
IADNAME == ocean_iad.nc
FWDNAME == ocean_fwd.nc
ADSNAME == ocean_ads.nc
as well as
BRYNAME == ocean_bry.nc
CLMNAME == ocean_clm.nc
and
FRCNAME == ocean_frc.nc
But these files are nowhere to be found in my ROMS directory, and I cannot figure out where (i.e. what piece of code) they are generated! Finding out would help me understand how to generate my own initial conditions and how to construct the netCDF files.
Another related question is: how do ana_grid and the variable GRDNAME interact? I created my own grid by modifying the ana_grid file. Does it generate the appropriate ocean_grd.nc file for the ocean_*.in to read?
Thank you for your help,
Mat.
input NetCDF file names - where
Re: input NetCDF file names - where
Hi Mat,
You have a choice for each of these things. If ANA_GRID is #defined, then it won't be reading an external grid file. It will use the code in ana_grid.h to set up the grid. The same is true for the rest of the input fields - there is either an analytic version of it or there's a file that needs to get read. The #ifdefs for whether or not to try to read say the forcing file happens in globaldefs.h.
If ANA_GRID is #defined, then it won't ever use GRDNAME. You could leave it out of your ocean.in if you so choose, but most of us leave it in as a place-holder.
You have a choice for each of these things. If ANA_GRID is #defined, then it won't be reading an external grid file. It will use the code in ana_grid.h to set up the grid. The same is true for the rest of the input fields - there is either an analytic version of it or there's a file that needs to get read. The #ifdefs for whether or not to try to read say the forcing file happens in globaldefs.h.
If ANA_GRID is #defined, then it won't ever use GRDNAME. You could leave it out of your ocean.in if you so choose, but most of us leave it in as a place-holder.
Re: input NetCDF file names - where
Thank you Kate, very helpful.
So if ANA_GRID overwrites GRDNAME, ANA_INITIAL overwrites ININAME? What about the others? In a test case like riverplume or upwelling, what defines the other inputs (especially BRYNAME, CLMNAME and FRCNAME)? I am only asking this because 1) It helps figuring out how ROMS works and 2) I need a template/example to understand how to generate my own forcing and input lateral boundary conditions.
Thanks again,
Mat.
So if ANA_GRID overwrites GRDNAME, ANA_INITIAL overwrites ININAME? What about the others? In a test case like riverplume or upwelling, what defines the other inputs (especially BRYNAME, CLMNAME and FRCNAME)? I am only asking this because 1) It helps figuring out how ROMS works and 2) I need a template/example to understand how to generate my own forcing and input lateral boundary conditions.
Thanks again,
Mat.
Re: input NetCDF file names - where
* BRYNAME: In ocean.in, the LBC variable determines the type of boundary condition on each side. Some require external values, some do not. A wall or periodic condition is complete without anything else. A clamped boundary is clamped at some external value. You can look inside ROMS/Functionals/analytical.F to see code like:
for what sets the tracer open boundary. If *any* of tracer, 2D momentum, 3D momentum or free surface need external values without the analytic form being available, then you must provide a file with it.
* CLMNAME: You will only need this if you tell ROMS that you need there to be a climatology of some field. Many test cases like UPWELLING do not need a climatology, whether analytic or otherwise.
* FRCNAME: Many different kinds of things can be here, from tides to winds to rivers. Perhaps you like flow charts with boxes like: "winds needed" pointing to "ana_winds" pointing to FRC_FILE if you need winds but there's no ANA_WINDS. If FRC_FILE gets set in globaldefs.h, ROMS will go looking for FRCNAME.
The files in Data/ROMS/CDL give clues to the structure of NetCDF files you need to be creating. There are also codes in Matlab/Python/... for making at least some of these things.
Code: Select all
# ifdef ANA_TOBC
# include <ana_tobc.h>
# endif
* CLMNAME: You will only need this if you tell ROMS that you need there to be a climatology of some field. Many test cases like UPWELLING do not need a climatology, whether analytic or otherwise.
* FRCNAME: Many different kinds of things can be here, from tides to winds to rivers. Perhaps you like flow charts with boxes like: "winds needed" pointing to "ana_winds" pointing to FRC_FILE if you need winds but there's no ANA_WINDS. If FRC_FILE gets set in globaldefs.h, ROMS will go looking for FRCNAME.
The files in Data/ROMS/CDL give clues to the structure of NetCDF files you need to be creating. There are also codes in Matlab/Python/... for making at least some of these things.