Ocean Modeling Discussion

ROMS/TOMS

Search for:
It is currently Sun Oct 21, 2018 12:41 am




Post new topic Reply to topic  [ 7 posts ] 

All times are UTC

Author Message
 Post subject: Fjord tidal test case
PostPosted: Thu Apr 12, 2018 2:38 pm 
Offline

Joined: Mon Mar 12, 2018 2:19 pm
Posts: 4
Location: Marine and Freshwater Research Institute
I'm new in trying ROMS. I installed it in a Linux machine that I'm running remotly from a windows computer through putty. The upwellingg test case runs good.

Now I'm trying to run the https://www.myroms.org/wiki/FJORD_TIDAL_CASE , when compiling, in both cases I get this error:

Error: 'rdrag2' at (1) is not a member of the 't_grid' structure
make: *** [/u2/hydro/ROMS/MyTest/fjord/Build/wrt_info.o] Error 1

I can't find any answers online. What does it mean? How I can solve this?


Top
 Profile  
Reply with quote  
PostPosted: Thu Apr 12, 2018 3:24 pm 
Offline
User avatar

Joined: Wed Jul 02, 2003 5:29 pm
Posts: 3515
Location: IMS/UAF, USA
The way I hunt down this sort of thing:
Quote:
chinook03 203% grep rdrag2 */Modules/*
ROMS/Modules/mod_grid.F:! rdrag2 Quadratic drag coefficient (nondimensional). !
ROMS/Modules/mod_grid.F: real(r8), pointer :: rdrag2(:,:)
ROMS/Modules/mod_grid.F: allocate ( GRID(ng) % rdrag2(LBi:UBi,LBj:UBj) )
ROMS/Modules/mod_grid.F: GRID(ng) % rdrag2(i,j) = rdrg2(ng)
So we look at mod_grid.F:
Code:
#if defined UV_LDRAG
            GRID(ng) % rdrag(i,j) = rdrg(ng)
#elif defined UV_QDRAG
            GRID(ng) % rdrag2(i,j) = rdrg2(ng)
#endif
You need to #define UV_QDRAG and not define UV_LDRAG.


Top
 Profile  
Reply with quote  
PostPosted: Thu Apr 12, 2018 4:18 pm 
Offline

Joined: Mon Mar 12, 2018 2:19 pm
Posts: 4
Location: Marine and Freshwater Research Institute
Thanks for the reply

So in my fjord.h I have #define UV_QDRAG /* use to turn ON or OFF quadratic bottom friction */

and in my mod_grid.F I have this
#if defined UV_LDRAG
GRID(ng) % rdrag(i,j) = rdrg(ng)
#elif defined UV_QDRAG
GRID(ng) % rdrag2(i,j) = rdrg2(ng)

which looks like yours but still doesn't run.


Top
 Profile  
Reply with quote  
PostPosted: Thu Apr 12, 2018 5:11 pm 
Offline
User avatar

Joined: Wed Jul 02, 2003 5:29 pm
Posts: 3515
Location: IMS/UAF, USA
Next is to look in $SCRATCH_DIR/mod_grid.f90 to see what's in there. That's the result of the C-preprocessor.


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 13, 2018 9:44 am 
Offline

Joined: Mon Mar 12, 2018 2:19 pm
Posts: 4
Location: Marine and Freshwater Research Institute
Hi Kate, many thanks. What shall I seek in here? I only see rdrag instead of rdrag2 but I'm not sure if it is that.... I'm attaching it


Attachments:
mod_grid.f90 [22.75 KiB]
Downloaded 14 times
Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 13, 2018 10:17 am 
Offline
User avatar

Joined: Mon Apr 28, 2003 5:44 pm
Posts: 460
Location: Rutgers University
You say
Quote:
I only see rdrag instead of rdrag2


There are a few things to check here.

First, be very careful about spelling of #define directives. Are you sure you have all the right characters (I'm sure you do, for some directives 0 and o or 1 and l can be confused.

Second, be careful about the placement of comments (the /* and */ syntax in C.) A language sensitive editor will highlight fields in your fjord.h to distinguish these. If you haven't closed a comment correctly (line breaks are of no consequence) something may be disabled.

Next, did ROMS run at all? If it did it should have reported the CPP options to the logfile. Look for the drag option there and make sure it's what you intended. If it created a netcdf output file they are reported there too in the global attributes. It's important to know what ROMS was actually told, as opposed to what you think you told it to do.

Did you modify mod_grid.h? I hope not. If you did, check for missing #endif.

That fjord test case is not one of the ones we support in the trunk distribution of the code, and that page in the wiki has not been updated since 2008. For example, the code chunks to modify ana_m2obs.h etc. are quite out of date in how they specify open boundary code. Perhaps you have adapted to those changes, but be careful to work within the new framework. But I doubt that would have thrown errors in mod_grid.f90, so this remains a mystery.

The fjord_grd.nc has "spherical" as a char T/F, when now ROMS expects a logical 0/1. But again, I doubt that would have thrown errors in mod_grid.f90.

_________________
John Wilkin: IMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 13, 2018 11:44 am 
Offline

Joined: Mon Mar 12, 2018 2:19 pm
Posts: 4
Location: Marine and Freshwater Research Institute
Hi Wilkin, thanks for all of these comments.

I'm trying to use the jord test case because I'm going to be using ROMS for some Fiords in Iceland. So in parallel I was carrying the same steps for one of my fiords to learn about ROMS (this is my first attempt with a model and it's language). Maybe I should try another test case, one updated...

Let me answer to each of your comments:
- My ROMS runs for the upwelling case (generates OceanS, OceanM, OceanG and OceanO without problems, depending on the settings). In contrast, for the Fiord case it generates the build folder and is able to run only for a bit.
- I did not modified the mod_grid.h, only the ana_fsobc.h and the ana_m2obc.h
- I did not updated the chuck of data needed for the ana_m2obs.h maybe I should start there...
- about other codding stuff, I just followed the steps on the website.

I'm in my very first ROMS steps and working alone, so any comments, must read/do suggestions are welcome!!

Thanks for your help


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

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 1 guest


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