ESMG / pyroms

Python tools for the Regional Ocean Modeling System (ROMS)
Other
138 stars 88 forks source link

I cannot understand the arguments of pyroms.grid.get_ROMS_grid #52

Open lj-cug opened 5 months ago

lj-cug commented 5 months ago

For the example, /example/Yellow_Sea/make_YELLOW_grd_v2.py

How can I run the following script: grd_v1 = pyroms.grid.get_ROMS_grid('YELLOW') using my own arguments? What's the meaning of gridid? I don't understand the hist_file and grid_file. Could you please give me an example?

Thanks Li Jian

kshedstrom commented 5 months ago

The ID there, "YELLOW", is a key into the gridid.txt file. The YELLOW chunk there tells the location of the horizontal grid, plus information about the vertical grid structure:

id      = YELLOW
name    = YELLOW
grdfile = /home/romsuser/Yellow_Sea/yellow_sea_grid.nc
N       = 42
grdtype = roms
Vtrans  = 1 
theta_s = 5 
theta_b = 0.4 
Tcline  = 5 

I have always added my domains to the gridid.txt file so that I haven't needed to use the other form: grd_v1 = pyroms.grid.get_ROMS_grid('GREEN', zeta=zeta, hist_file='path_to_green_hist.nc', grid_file='path_to_green_grid.nc')