II. Domain Setup

I assume you are familiar with the domain setup for both RSM and ROMS.

1. RSM domain: get lon1, lon2, dlon, lat1, lat2, dlat..
It is in prmap.ctl after you set the domain in rsim script

2. ROMS domain: I use RomsTool for creating grids, forcing, climate files.

  • a. Use make_grid.m to create grid and use grid info from RSM when you do that. Sample: Grid_Setup/make_grid_roms25-indian.m Note this sample uses identical domain for both RSM and ROMS. This will create grid.nc file for ROMS. Add this grid file in rnt_gridinfo.m file (I assume you have Manu toolbox). Also do the same thing for RSM too. Use sample codes, make_grid_rsm25-indian.m, in Grid_Setup. We need grid file for both RSM and ROMS.
  • b. Use make_forc.m, make_clim.m to create forcing, climate, bryfile, and the initial file do the forced ocean run to see it it runs.. this is necessary not only for making sure that your grid is ok but also for getting the spin-up solution from the forced run (say for 8 years.) The end solution will be the initial condition for the coupled run. We can use other global model run to initialize the model (say POP model). I used to use JPL ECCO product to initialize the model but it is only available from 1993.
  • c. Make 12 climte/bry files for each month from your monthly climatology/boundary files. Each monthly file will be ftped from local machine to COMAPS during the integration ( this is specfied in prepareROMS-indian25.sh). The sample code is in Grid_Setup and called indian_woa_monthly_1t.m).

3. Now need some grid information written in ascii format (I use .dat).
  • In Grid_Setup, there is a .tar file that has sample codes.Copy the tar file in your local machine and
  • > tar xvf indian25.tar
    > [[code]]
    There are 4 directiroes; Coupler, matlab, ROMS, and RSM.
    * a. go to **Coupler** and **vi gen_grid_indian25.m** (rename the script whatever you like. This was an indian25 example.
    >> 1) Change cd path
    >> 2) Since it is an indian25 exmaple, you need to change this for your application name. In vi editor, I use, :1,$ s/indian/your_application_name/g. This will find the patterns of every indian and change it to your_application_name. If you think this is to inconvenient, you are welcome to make a subroutine where the application name is input parameter. For some reason, I don't do that, but can easily do it. And then, do
    >> [[code]]
    > # cp *rsm*.dat to ../ROMS
    > # cp *roms*.dat to ../ROMS
    > [[code]]
    * b. Same thing in **matlab** directory
    * c. **edit gridmask.m** accordingly and do
    >> [[code]]
    > * cp *rsm*.dat to ../ROMS
    > * cp *roms*.dat to ../ROMS
    > [[code]]
    * d. Go to ROMS directory and vi **roms25-indian-nxnyr.dat**
    >> 1) This is the number of grid points in rho points of your ROMS domain. 1st line is nx, 2nd line is ny, and 3rd line is nx * ny. Modify accordinly
    >> 2) roms25-indian-nxnyu.dat is the same but on u-grid points. Only difference is one less grid points in x-direction.
    >> 3) roms25-indian-nxnyv.dat is the same but on v-grid points. Only difference is one less grid points in y-direction.
    * e. Copy your ROMS grid file in to ROMS directory.
    * f. In Lib/grids/indian25/RSM directory, create two files.
    >> (**rgrd.dat**, **rcdt.dat**; These are used in Roms2RSM.sh, see IV.5).
    > a1) **rgrd.dat** contains igrd_ , and jgrd_ (These are actually nx-1 and ny-1 respectively, where nx and ny are acual number of grid points in x and y.
    > You can find this number also in RSM/rsm/def/your_domain_directory/define.h. E.g., for indian25, igrd_=320, jgrd_281
    > a2) **rcdt.dat** contains information of your RSM domain located in RSM/runs/rsm_domain/your_domain_file.h e.g., for indian25, this file looks like

o RPROJ=0.
o RTRUTH=30.
o RORIENT=180.
o RDELX=25000
o RDELY=25000
o RCENLON=29.5


  • Write this number in this order (without letter and =) in rcdt.dat

  • rcdt.dat looks like
  • # 0.
  • # 30.
  • # 180.
  • # 25000
  • # 25000
  • # -30
  • # 29.5
  • # 0
  • # 0
  • code

e) tar cvf the indian25 directory and ftp to Lib/grid in COMPAS and untar it.

4. Run create_bulk_forc_init.m in your local machine to create the netcdf files. Sftp the resultant netcdf files in Model/misc/indian25 (see I.2.c)