How make initial condition from other model to ROMS

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
javadi
Posts: 118
Joined: Mon Jan 27, 2020 5:55 pm
Location: UoT

How make initial condition from other model to ROMS

#1 Unread post by javadi »

Hi all,

In the past, I used a global dataset to make initial conditions.

Now I try to use Mediterranean reanalysis data for ROMS as the initial condition, how can I do this? is there any code for other model output for ROMS?
For example, d_initial in MATLAB for this type of work?


Best,

Kosa
Posts: 35
Joined: Mon Jan 12, 2015 4:12 pm
Location: URI GSO

Re: How make initial condition from other model to ROMS

#2 Unread post by Kosa »

What was your process like when using the global model data? If you have regional model data in the same format, and it fully covers your ROMS model, you should be able to follow a similar procedure. I generally I just write a custom script so I know the full assumptions that going into the regridding. Particularly, how to handle mismatch in land mask and bottom depth. You'll want to think about the separation between horizontal and vertical interpolation.

For example, if we assume your Med data is on a regular grid of size 100x200x30 with uniform depth levels, and your curvilinear ROMS grid is 300x400x50 (with sigma layer vertical coordinates). You could follow a procedure like this:

1. Interpolate the Med model onto your ROMS horizontal grid. Will get a 300x400x30 array on curvilinear grid with uniform depth levels. If there are land points that should be ocean cells in the ROMS model, you'll need to extrapolate to avoid NaNs.
2. Vertically interpolate onto your ROMS sigma coordinates, to get a 300x400x50 array which can be written into your INI netcdf file. For points where the ROMS model is deeper than the source data, maybe do nearest neighbor extrapolation.

This is the procedure for tracer like temp and salt. For u and v, make sure to rotate into ROMS coordinates using the `angle` value from your grid file.

javadi
Posts: 118
Joined: Mon Jan 27, 2020 5:55 pm
Location: UoT

Re: How make initial condition from other model to ROMS

#3 Unread post by javadi »

Hi,
I have taken some actions but am still having problems.


My data is for NEMO model in the whole Mediterranean Sea with grid [1016 380 141]but my grid is the east med sea with Lm=803 and Mm=629 and 20 layers.

if directly use some code like d_inital. I faced some errors mentioned that the second dimension must not exceed 380. So, I have done extra work before using it.

Initially, i cut my data to exactly the same my domain(lon and lat) only the east from NEMO. Now my domain is 636 380 141. After that, I interpolate my data to new grid 803 629 20; the same as my ROMS grid. Now I try to use d_initial for making initials. still I have an error. Now Interpolating from OA fields, please wait ...
Error using interp1>reshapeAndSortXandV (line 445)
X and V must be of the same length.

Error in interp1 (line 128)
[X,V,orig_size_v] = reshapeAndSortXandV(X,V);

Error in d_initial (line 255)

bhayward
Posts: 3
Joined: Thu Aug 31, 2023 3:51 pm
Location: University of Maine

Re: How make initial condition from other model to ROMS

#4 Unread post by bhayward »

Is your grid spherical? The Matlab scripts have to figure out whether the x and y dimensions/prefixes are 'x' and 'y' or 'lat' and 'lon', and use the 'spherical' variable to figure that out. If you've made your grid manually and didn't include the spherical flag, it might be trying to read in the wrong coordinate, and end up reading in nothing. At least that happens somewhat frequently to me.

Post Reply