Ocean Modeling Discussion

ROMS/TOMS

Search for:
It is currently Tue Apr 24, 2018 4:12 pm




Post new topic Reply to topic  [ 6 posts ] 

All times are UTC

Author Message
PostPosted: Wed Apr 11, 2018 8:19 am 
Offline

Joined: Thu Mar 15, 2018 3:00 pm
Posts: 4
Location: EXWEXs - Plouzané - France
Hello everyone,
I'm trying to use the pyroms tools to create my own files for initializing, defining boundaries and forcing. As the files I want to use are from HYCOM outputs (from GLBv0.08), I first want to train on the Arctic_HYCOM example. To do it, I need a definition of the grid ARCTIC2 (that I could then add into my gridid.txt). Could someone help me to find these few text lines?
Thanks a lot,
Morgane


Top
 Profile  
Reply with quote  
PostPosted: Wed Apr 11, 2018 3:20 pm 
Offline
User avatar

Joined: Wed Jul 02, 2003 5:29 pm
Posts: 3365
Location: IMS/UAF, USA
The few lines you're asking for are:
Quote:
id = ARCTIC2
name = ARCTIC2
grdfile = /archive/u1/uaf/AKWATERS/kshedstrom/gridpak/Arctic2/grid_Arctic_2.nc
N = 50
grdtype = roms
Vtrans = 4
theta_s = 7
theta_b = 2
Tcline = 250
The grid file itself is rather large, not a great starter grid.


Top
 Profile  
Reply with quote  
PostPosted: Wed Apr 11, 2018 3:37 pm 
Offline

Joined: Thu Mar 15, 2018 3:00 pm
Posts: 4
Location: EXWEXs - Plouzané - France
Thanks a lot! :)


Top
 Profile  
Reply with quote  
PostPosted: Mon Apr 16, 2018 2:23 pm 
Offline

Joined: Thu Mar 15, 2018 3:00 pm
Posts: 4
Location: EXWEXs - Plouzané - France
Hello everyone,
I try to interpolate some HYCOM output fields (temperature, salinity, ssh and wind velocity) to a ROMS grid thanks the pyroms tools. To achieve that, I try to reproduce the HYCOM_Arctic example from the examples directory. Yet, I succeed in interpolating the ssh from HYCOM GLBa0.08 to an ARCTIC2 grid.

Code:
#----------------------------------------------------------------------------
#I defined ARCTIC2 grid with these characteristics :
#----------------------------------------------------------------------------
Lp = 160
Mp = 300

# define the 4 corners of the grid
# first point is the top left corner then counter clock wise rotation
lon0=-20.5
lat0=80.8
lon1=20.75
lat1=80.8
lon2=20.75
lat2=48.75
lon3=-20.5
lat3=48.75
 …
hmin = 10.0

rx0_max = 0.2

gridid='ARCTIC2'
grd_name = 'ARCTIC2'

#----------------------------------------------------------------------------


That's means that :
    I've well downloaded files from HYCOM.org.
    I've formatted them through get_hycom_GLBa0.08_'varname'_2014.py.
    I've built my source grid through get_hycom_GLBa0.08_grid.py.
    I've computed my weigth files from make_remap_weights_file.py.
    And then, I've 'concatenated' all my variable files to obtain one big file HYCOM_GLBa0.08_2014_095.nc.
    I've modified my make_ic_file.py while adding a “exit()” line just after the computation of the ssh on the destinated grid (because, I realize something was wrong with the interpolation of my following variables).

Code:
#----------------------------------------------------------------------------
# remap
zeta = remap(file, 'ssh', src_grd, dst_grd, dst_dir=dst_dir)
exit() # <= the lien I added
st_grd = pyroms.grid.get_ROMS_grid('ARCTIC2', zeta=zeta)
#----------------------------------------------------------------------------


The scripts built a new ssh which seems to be OK.
Image

Then, I modified only the destination grid (actually, I tried a grid in the South Africa and keep exactly the same gridid parameters as ARCTIC2 to define the vertical grid) and I adapted the scripts get*.py , make_remap*.py, merge*.ksh, remap.py, remap_uv.py and make_ic_file*.py from the HYCOM_Arctic example to stay coherent.

Code:
#----------------------------------------------------------------------------
#I defined an other grid with these characteristics :
#----------------------------------------------------------------------------

#Grid dimension
Lp = 280 # i-direction
Mp = 230 # j-direction


# define the 4 corners of the grid
# first point is the top left corner then counter clock wise rotation
lon0=-2.5
lat0=-4.8
lon1=54.75
lat1=-4.8
lon2=54.75
lat2=-46.75
lon3=-2.5
lat3=-46.75

hmin = 10.0

rx0_max = 0.2

gridid='NEW_GRID'
grd_name = 'NEW_GRID'
#----------------------------------------------------------------------------------------


While the grid file seems OK (mask is correct), the scripts built a interpolated ssh file with errors in the mash and abnormal values of ssh (FillValue in the ocean).

Image

My source grid is well larger than my destination grid. I've verified that my longitudes and latitudes were defined the same than the example... Actually, I've no more ideas to test and I though that someone on the forum could have some new ones...


Top
 Profile  
Reply with quote  
PostPosted: Mon Apr 16, 2018 3:33 pm 
Offline
User avatar

Joined: Wed Jul 02, 2003 5:29 pm
Posts: 3365
Location: IMS/UAF, USA
When downloading HYCOM, pyroms expects the HYCOM grid file to be two grid cells larger in all directions than the other HYCOM files. Do you have that? It would be good to recode things so that that's not necessary, but we're not there yet.

Because of the North Pole, the Arctic is an especially challenging domain. There might be Arctic hacks that you don't want for a mid-latitude domain. We should provide examples for both kinds of domains - sorry about that.


Top
 Profile  
Reply with quote  
PostPosted: Tue Apr 17, 2018 7:50 am 
Offline

Joined: Thu Mar 15, 2018 3:00 pm
Posts: 4
Location: EXWEXs - Plouzané - France
Thanks a lot!
Indeed, I did not notice the modification in the index as downloading the HYCOM files. Now, my ssh interpolation works correctly.


And at the same time, that explains the error I received after the ssh interpolation, as computing the interpolation of the following variables.
Code:
Traceback (most recent call last):
  File "make_ic_file.py", line 29, in <module>
    remap(file, 'temp', src_grd, dst_grd, dst_dir=dst_dir)
  File "/home/mdessert/pyroms/mytools/caretta_test/remap.py", line 127, in remap
    dxy=dxy, cdepth=cdepth, kk=kk)
  File "/home/mdessert/usr/conda/envs/seasnake/lib/python3.6/site-packages/pyroms_toolbox/Grid_HYCOM/flood_fast.py", line 87, in flood_fast
    c = c1 & c2 & c3


Then, from some extra "print", I learned that :
Code:
 grd.mask_t size = (33, 656, 4498)
 grd.mask_t[0,:,:] size = (656, 4498)
C1 size : (656, 4496)
C2 size : (658, 4496) #=> and I did not understand why these mask was bigger  ! It is from the mash while the two others are directly from the variable!
C3 size : (656, 4496)


Thanks you very much for these explanations !


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group