Search found 11 matches

by bzhang
Sat May 12, 2018 11:29 am
Forum: ROMS Bugs
Topic: all result = 0?
Replies: 22
Views: 19477

Re: all result = 0?

Make sure sea masks set to one,not zero. Change this first,then check others step by step.
by bzhang
Fri May 11, 2018 2:44 pm
Forum: ROMS Bugs
Topic: all result = 0?
Replies: 22
Views: 19477

Re: all result = 0?

You probably set all sea grids as land pixels. So all the velocity/kinetic energy are zeros, but total potential energy and volume are not since the calculation of these diagnostics are not masked off. Can you make a plot your land/sea masks to check?
-Bin
by bzhang
Wed Sep 24, 2014 3:59 pm
Forum: ROMS Discussion
Topic: tidal analysis of large output files
Replies: 22
Views: 31019

Re: tidal analysis of large output files

Hi, WRH,
I see your simulated tidal phase is completely normal, the phase is out of atan2 in matlab and scaled by 180/pi. You just need to add a constant 360 degree to get a positive number. You can look at this paper for comparison: doi:10.1029/2002JC001451
by bzhang
Tue Jul 01, 2014 10:09 am
Forum: ROMS Discussion
Topic: tidal analysis of large output files
Replies: 22
Views: 31019

Re: tidal analysis of large output files

I think the short simulation time may be the problem, as Hernan said. Attached are two figures with 60 days and 150 days of model runs with 8 tidal constituents in the CBOFS. The results are clearly different and 60 days are not enough to separate these tidal constituents. And the 60 days results ...
by bzhang
Fri Jun 20, 2014 9:32 am
Forum: ROMS Discussion
Topic: tidal analysis of large output files
Replies: 22
Views: 31019

Re: tidal analysis of large output files

I think you can just put these tidal constituents (M4,M6 and M8) into the tide forcing file but set their amplitude to zero. Attached is a matlab code to read the output tidal forcing files and convert the harmonic summation terms to phase and amplitude for each variable. And a time series of zeta ...
by bzhang
Fri Oct 03, 2008 2:55 am
Forum: ROMS Discussion
Topic: barotropic pres gradient
Replies: 2
Views: 3927

Re: barotropic pres gradient

In ROMS, rho is density anomaly, which is 'true density minus a reference density rho0'. In your case, density and rho0 are both 1000 kg/m3, then rho(i,j,k) is 0.0 anywhere in ROMS. So fac1=0. fac2+fac1=1, NOT 2. Hope I solve the problem.
by bzhang
Mon Jul 21, 2008 2:07 pm
Forum: ROMS Problems
Topic: about the new options 'UV_U3DV_SPLIT' and 'TS_U3ADV_SPLIT'
Replies: 3
Views: 3176

Re: about the new options 'UV_U3DV_SPLIT' and 'TS_U3ADV_SPLIT'

These two options have not been fully tested and the rotated tracer flux scheme in 4th order mixing might cause unconditional instability of the model. So you may need to wait sometime for hernan to correct this or remove these two options.
by bzhang
Fri Jul 18, 2008 7:26 pm
Forum: ROMS Tools and Techniques
Topic: Does seagrid give the correct boundary to ROMS grid file?
Replies: 2
Views: 2979

Does seagrid give the correct boundary to ROMS grid file?

It looks to me the seagrid package does not give exact boundary to roms grid file. Say if we set the west boundary to 90E in the sea grid boundary input file, we expect the fist colomn lon_psi is 90E, but seagrid output is another value.

Does anybody mention this before or it's my mistake somewhere?
by bzhang
Tue Oct 10, 2006 1:30 pm
Forum: ROMS Usage
Topic: geostrophically adjusted initial condition.
Replies: 6
Views: 9105

Hi, Dr. Pringle, I have an IDL package dealing with the ROMS OA package output with ROMS grids but at z levels to get the geostrophic velocity. The density is calculated in the code from T/S. It may be useful for your problems. If you want to directly process the ROMS initial netcdf file with an S ...
by bzhang
Fri Sep 29, 2006 9:37 pm
Forum: ROMS Bugs
Topic: Potential Energy and Kinteic Energy use different unit?
Replies: 4
Views: 6523

The original code about ke2d in roms-2.2 is: DO i=Istr,Iend ke2d(i,j)=(zeta(i,j,krhs)+h(i,j))* & & 0.25_r8*(ubar(i ,j,krhs)*ubar(i ,j,krhs)+ & & ubar(i+1,j,krhs)*ubar(i+1,j,krhs)+ & & vbar(i,j ,krhs)*vbar(i,j ,krhs)+ & & vbar(i,j+1,krhs)*vbar(i,j+1,krhs)) ..... avgke=0.5_r8*avgke/volume avgpe=avgpe ...
by bzhang
Thu Sep 28, 2006 6:59 pm
Forum: ROMS Bugs
Topic: Potential Energy and Kinteic Energy use different unit?
Replies: 4
Views: 6523

Potential Energy and Kinteic Energy use different unit?

In diag.F cff=g/rho0 DO k=N(ng),1,-1 DO i=Istr,Iend ke2d(i,j)=ke2d(i,j)+ & & Hz(i,j,k)*(rho(i,j,k)+1000.0_r8)* & & 0.5_r8*(u(i ,j,k,nstp)*u(i,j,k,nstp)+ & & u(i+1,j,k,nstp)*u(i+1,j,k,nstp)+ & & v(i,j ,k,nstp)*v(i,j ,k,nstp)+ & & v(i,j+1,k,nstp)*v(i,j+1,k,nstp)) pe2d(i,j)=pe2d(i,j)+ & & cff*Hz(i,j,k ...