Change the unit of x_rho from "meter" to "degree"

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
phamsymt
Posts: 26
Joined: Fri May 09, 2008 3:21 pm
Location: center for environment

Change the unit of x_rho from "meter" to "degree"

#1 Unread post by phamsymt »

Dear Guys,

Could anyone tell me how to change the unit of x_rho and y_rho from "meter" to "degree" in output files of ROMS "ocean_avg.nc and ocean_his.nc" ?

Thank you very much

PV-Sy

User avatar
kate
Posts: 4088
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: Change the unit of x_rho from "meter" to "degree"

#2 Unread post by kate »

If you set spherical to True, you should get lat_rho and lon_rho instead, in units of degrees. Spherical is set in either the grid file or in ana_grid.

phamsymt
Posts: 26
Joined: Fri May 09, 2008 3:21 pm
Location: center for environment

Re: Change the unit of x_rho from "meter" to "degree"

#3 Unread post by phamsymt »

Great comment. It done

Thank you very much

phamsymt
Posts: 26
Joined: Fri May 09, 2008 3:21 pm
Location: center for environment

Re: Change the unit of x_rho from "meter" to "degree"

#4 Unread post by phamsymt »

Dear Guys,

I still get problem with changing the coordinate

1. I set spherical to be True in /Functionals/ana_grid.h. The x_rho & y_rho changed to lon_rho & lat_rho but zero value in roms_avg.nc & roms_his.nc.

2. In the gird file I always set spherical to True. However, the x_rho & y_rho still exist in roms_avg.nc & roms_his.nc if I not set in ana_grid.h

Could anyone give me further comment?

Thank you very much

User avatar
kate
Posts: 4088
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: Change the unit of x_rho from "meter" to "degree"

#5 Unread post by kate »

If you set ANA_GRID, it will call ana_grid and use grid information from there. If you don't set ANA_GRID, it will read your grid file and use information from it. It seems like you should undefine ANA_GRID.

phamsymt
Posts: 26
Joined: Fri May 09, 2008 3:21 pm
Location: center for environment

Re: Change the unit of x_rho from "meter" to "degree"

#6 Unread post by phamsymt »

Thank you very much for your useful comment. It work now

Post Reply