I have noticed that with the latest version(s) of ROMS, unlike the older version(s), when providing wind stresses (as opposed to using the Bulk Flux formulation), we need to provide them on the appropriate staggered grid - ie. u-stress at u-points and v-stress at v-points. In the older ROMS version(s) both were provided at rho-points.
It is then seen that if the CPP option CURVEGRID is defined, these stresses are locally rotated to be aligned with the model grid inside the routine set_data.F. However, the rotation is performed locally at rho-points without averaging the u- and v- stresses from their staggered grid to the rho-points!
Is there a reason for adopting this procedure or is it a bug?
Wind stress rotation issue in ROMS
- arango
- Site Admin
- Posts: 1367
- Joined: Wed Feb 26, 2003 4:41 pm
- Location: DMCS, Rutgers University
- Contact:
No. If you read the wind stress (sustr, svstr) from the forcing NetCDF file, ROMS always expects the stress to be at U- and V-points respectively and already rotated to the curvilinear grid, if applicable. This has been the strategy in ROMS since the beginning and has never changed.
You may be confused with point source wind stress (see set_data.F). In ROMS, you have the choice to specify wind stress from a single point (say a Met tower measurement). In this case, the single point measurement is assumed to be at RHO-points and assumed to represent uniform wind stress to the entire grid. Then, if you have a curvilinear grid, the single measurement is rotated accordingly to maintain uniform wind stress direction.
You may be confused with point source wind stress (see set_data.F). In ROMS, you have the choice to specify wind stress from a single point (say a Met tower measurement). In this case, the single point measurement is assumed to be at RHO-points and assumed to represent uniform wind stress to the entire grid. Then, if you have a curvilinear grid, the single measurement is rotated accordingly to maintain uniform wind stress direction.
Point source question
I am trying something similar - I would like to do spatially uniform winds over my curvilinear domain that vary in time. I have done this with BULK_FLUXES and full wind vectors (Uwind with dimensions (time, eta_rho, xi_rho), but this is space-intensive and seems silly to specify winds at every point if they are all the same.
I tried separating winds into their own netcdf file, changing dimensions to (time,1), and adjusting Uwind and Vwind in varinfo.dat from rd2var to nulvar, but ROMS unsurprisingly doesn't like that. I am likely overlooking something simple, but I can't find an example of a CDL file that extrapolates a point source to the whole domain. I have never done the ASCII-in mentioned in the main forcing readme, though I wouldn't mind that option, as long as the wind vectors are rotated to curvilinear as in set_data.F:
! If input point wind stress, rotate to curvilinear grid. Notice
! that rotation is done at RHO-points. It does not matter.
!
IF (.not.Linfo(1,idUsms,ng).or. &
& (Iinfo(5,idUsms,ng).ne.Lm(ng)+1).or. &
& (Iinfo(6,idUsms,ng).ne.Mm(ng)+2))
So basically, how do I make those IF's true?
Thanks,
Justin Rogers
URI GSO
I tried separating winds into their own netcdf file, changing dimensions to (time,1), and adjusting Uwind and Vwind in varinfo.dat from rd2var to nulvar, but ROMS unsurprisingly doesn't like that. I am likely overlooking something simple, but I can't find an example of a CDL file that extrapolates a point source to the whole domain. I have never done the ASCII-in mentioned in the main forcing readme, though I wouldn't mind that option, as long as the wind vectors are rotated to curvilinear as in set_data.F:
! If input point wind stress, rotate to curvilinear grid. Notice
! that rotation is done at RHO-points. It does not matter.
!
IF (.not.Linfo(1,idUsms,ng).or. &
& (Iinfo(5,idUsms,ng).ne.Lm(ng)+1).or. &
& (Iinfo(6,idUsms,ng).ne.Mm(ng)+2))
So basically, how do I make those IF's true?
Thanks,
Justin Rogers
URI GSO
- arango
- Site Admin
- Posts: 1367
- Joined: Wed Feb 26, 2003 4:41 pm
- Location: DMCS, Rutgers University
- Contact:
The switch that you are refering triggers point data or interpolation from a larger grid. The problem that you are having is that you are not building the forcing NetCDF correcty. You need to have the following syntax in the CDL file:
This will set Lgrided=.FALSE. switch in get_data.F (stored in Linfo(1,:,ng)) to trigger the rotation in set_data.F. The Lgrided switch is set to .TRUE. if the number of variable dimensions are greater than one.
Your problem is that you have two dimensions in your NetCDF file
Code: Select all
float Uwind(time) ;
Uwind:long_name = "surface u-wind component" ;
Uwind:units = "meter second-1" ;
Uwind:time = "wind_time" ;
float Vwind(time) ;
Vwind:long_name = "surface v-wind component" ;
Vwind:units = "meter second-1" ;
Vwind:time = "wind_time" ;
Your problem is that you have two dimensions in your NetCDF file