How do you access GRID variables that aren't called in tile?

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
aryansafaie
Posts: 54
Joined: Wed Jan 07, 2015 2:48 pm
Location: University of California, Irvine

How do you access GRID variables that aren't called in tile?

#1 Unread post by aryansafaie »

Dear ROMS Community,

I suppose this is more of a C-header file question, but:
I'm computing the total water depth at any horizontal location as

Code: Select all

abs(z_w(i,j,N(ng))-z_w(i,j,0))
If, for example, I wanted to do this inside the body of ana_smflux.h,
how would I import the z_w variable?
I've trying locally declaring it (failed), I've tried using the extern keyword (failed).

Any guidance would be appreciated.

Thanks!
-aryan

jcwarner
Posts: 1172
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

Re: How do you access GRID variables that aren't called in t

#2 Unread post by jcwarner »

ana_vmix.h has an example for z_r and z_w. Notice that z_w is slightly different as it has a range from 0:N, as compared to z_r that goes from 1:N.

-j

Post Reply