Ocean Modeling Discussion

ROMS/TOMS

Search for:
It is currently Mon Oct 23, 2017 5:00 pm




Post new topic Reply to topic  [ 22 posts ] 

All times are UTC

Author Message
 Post subject: Question about floats
PostPosted: Wed Jul 07, 2004 4:04 pm 
Offline

Joined: Tue Apr 29, 2003 2:43 pm
Posts: 14
Location: Institut de Ciencies del Mar
Hi

I am trying to introduce a cluster of floats into my model. I am not sure how the Fdx, Fdy, Fdz parameters in floats.in work? Can somebody tell me what range of values might be used for these parameters, and what sort of clusters will result?

On the last line of floats.in a routine called 'init_floats.F´is mentioned - I don't have this routine in ROMS 2, though I see it was used in ROMS 1. Has this now been omitted from ROMS 2?

Many thanks

Evan


Top
 Profile  
Reply with quote  
 Post subject: How to add floats?
PostPosted: Wed Nov 15, 2006 10:11 pm 
Offline

Joined: Wed Sep 13, 2006 3:25 pm
Posts: 27
Location: National Oceanography Centre
I want to add some floats to my application. What else than declared them in floats.in do I need to do??

Thanks and Regards
GaBy


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Nov 15, 2006 10:57 pm 
Offline
User avatar

Joined: Wed Jul 02, 2003 5:29 pm
Posts: 3236
Location: IMS/UAF, USA
You need to #defined FLOATS in cppdefs.h. The code will then read floats.in and create the corresponding netcdf output file.


Top
 Profile  
Reply with quote  
 Post subject: Already did that...
PostPosted: Wed Nov 15, 2006 11:10 pm 
Offline

Joined: Wed Sep 13, 2006 3:25 pm
Posts: 27
Location: National Oceanography Centre
Yea!
It does it, but the resulting NetCDF ocean_flt.nc, doesn't have the trajectories of the floats... Xgrid, Ygrid, Zgrid, and lon y lat are just series of zeros...

I also try the LAKE_SIGNELL application with the same result...

I can't run the FLT_TEST, it does complie but when I try to run it I get:
Code:
[gaby@localhost roms-2.2]$ ./oceanS <External> Test
forrtl: Is a directory
forrtl: severe (30): open failure, unit 5, file /home/gaby/Desktop/roms-2.2/
Image              PC        Routine            Line        Source
oceanS             08130B04  Unknown               Unknown  Unknown
oceanS             0812F29D  Unknown               Unknown  Unknown
oceanS             0810867E  Unknown               Unknown  Unknown
oceanS             080E1692  Unknown               Unknown  Unknown
oceanS             080E64FE  Unknown               Unknown  Unknown
oceanS             08083F89  Unknown               Unknown  Unknown
oceanS             08049DFD  Unknown               Unknown  Unknown
oceanS             08049A4E  Unknown               Unknown  Unknown
oceanS             080499D6  Unknown               Unknown  Unknown
libc.so.6          00A34D7F  Unknown               Unknown  Unknown
oceanS             08049911  Unknown               Unknown  Unknown


same thing with 2 & 3D test....
Can you tell me whats wrong?

Thanks for your quick replay!
GaBy


Top
 Profile  
Reply with quote  
 Post subject: Re: Already did that...
PostPosted: Wed Nov 15, 2006 11:28 pm 
Offline
User avatar

Joined: Wed Jul 02, 2003 5:29 pm
Posts: 3236
Location: IMS/UAF, USA
OcGaBy wrote:
[gaby@localhost roms-2.2]$ ./oceanS <External> Test
forrtl: Is a directory

It is telling you what the problem is: the input to ROMS should be a file, not a directory. Run it like:
Code:
./oceanS <External> output

Code:
./oceanS <External_ocean_floats2d_in> output

or use whatever input file makes sense. This is the case for serial ROMS and OpenMP ROMS, but MPI ROMS needs to be run like:
Code:
./oceanM External/ocean_floats2d.in > output


Actually, I typed what I wanted to type for the serial case and it isn't showing up the way I meant it to - perhaps that happened elsewhere too! The real input file is External/ocean_floats2d.in (or your file of choice).


Top
 Profile  
Reply with quote  
PostPosted: Wed Nov 15, 2006 11:43 pm 
Offline

Joined: Wed Sep 13, 2006 3:25 pm
Posts: 27
Location: National Oceanography Centre
I think I use the runing instruction rigth:
./oceanS <External> output

But I didn't got the trjectories even when I get an application with floats to run, and the corresponding output NetCDEF...

Cheers
GaBy


Top
 Profile  
Reply with quote  
 Post subject: Again...
PostPosted: Wed Nov 15, 2006 11:47 pm 
Offline

Joined: Wed Sep 13, 2006 3:25 pm
Posts: 27
Location: National Oceanography Centre
:shock: There is a type issue with the Forum...

What I wanted to say is that I did use External/float_3dtest.in as input file...

:wink:

GaBy


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Nov 15, 2006 11:52 pm 
Offline
User avatar

Joined: Wed Jul 02, 2003 5:29 pm
Posts: 3236
Location: IMS/UAF, USA
Did you look through the ROMS output to see if there is any mention of floats? Did you tell ROMS to output to the floats file every step or five? So you say ROMS ran without any floats output being nonzero? But you do get floats?


Top
 Profile  
Reply with quote  
 Post subject: Yes...
PostPosted: Thu Nov 16, 2006 12:02 am 
Offline

Joined: Wed Sep 13, 2006 3:25 pm
Posts: 27
Location: National Oceanography Centre
Yes, I get the floats output NetCDF, with the number of floats I chose. I'm saving the positions every time step, but all of them are zero.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Nov 16, 2006 12:27 am 
Offline
User avatar

Joined: Wed Jul 02, 2003 5:29 pm
Posts: 3236
Location: IMS/UAF, USA
Hmmm, I tried the 3d FLT_TEST case and I get values of 1e+35 for most everything. Clearly something isn't right here, but I don't have time to debug this just now.


Top
 Profile  
Reply with quote  
 Post subject: mmm
PostPosted: Thu Nov 16, 2006 12:41 am 
Offline

Joined: Wed Sep 13, 2006 3:25 pm
Posts: 27
Location: National Oceanography Centre
Thanks anyway... hope some day you get it to work... please keep me inform.

Gaby


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Nov 16, 2006 8:32 am 
Offline
User avatar

Joined: Tue Jul 01, 2003 4:12 am
Posts: 476
Location: NIWA
I'm not sure if my last attempt to post this succeeded. Apologies for duplicates, if any.

FLT_TEST works for me (I just checked, with a couple of recent versions of ROMS.) The floats are release at 0.1 days; before that you get the missing-float value, which I think is 1.E35.

Generally if you get a float position of 1.E35 the first thing to check is whether it's been released yet.


Top
 Profile  
Reply with quote  
 Post subject: It doesn't work for me
PostPosted: Thu Nov 16, 2006 3:37 pm 
Offline

Joined: Wed Sep 13, 2006 3:25 pm
Posts: 27
Location: National Oceanography Centre
I run my appliction for 10 days, I declare my floats to be released after one day. I got a position's series of 10 days for each float but all the values are 1.e35.

How can I check if the floats are actually released?

Thanks

GaBy


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Nov 16, 2006 7:37 pm 
Offline
User avatar

Joined: Tue Jul 01, 2003 4:12 am
Posts: 476
Location: NIWA
First look closely at all the values in your floats file. Are you releasing the floats inside the domain? (When floats go outside the domain, their position is reported as 1.E35.) Are your initial float locations consistent with your coordinate type C (the second entry in each float-position line)?

If you don't see any problems there, you're going to have to do it the slow way. Run your code in debugging mode and work through the relevant routines, checking the float status at the critical locations. Some people do this with a debugger, but I use print statements in the code (the .f90 files), rebuild and rerun, etc. You *will* eventually find the problem this way and you *will* be surprised by how simple it is.

Some debugging tips: You might want to modify the floats file to cause the floats to be released earlier and/or reduce the number, or to find some settings that *do* work before you work out why your original ones *don't*. Debugging in serial, single-tile mode, where possible, simplifies things. Oh and the usual one: enable bounds-checking!


Top
 Profile  
Reply with quote  
PostPosted: Wed Nov 22, 2006 1:20 am 
Offline

Joined: Wed Sep 13, 2006 3:25 pm
Posts: 27
Location: National Oceanography Centre
I was hoping that the correction release for small bugs was going to fix my problems with floats... since a correction to grid_coords.F is mentioned...
Quote:

(*)grid_coords.F: Corrected a bug in the computation of the grid coordinates for floats and stations from (lon,lat) values. This problem is only found at the tile boundaries.


But it still doesn't work to me...

If somebody already fix it, please let me know.

Cheers
GaBy


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Nov 22, 2006 7:11 am 
Offline
User avatar

Joined: Tue Jul 01, 2003 4:12 am
Posts: 476
Location: NIWA
I suspect the problem is with your input data rather than a model bug. If you're waiting for someone else to fix it, then you might be in for a long wait.


Top
 Profile  
Reply with quote  
 Post subject: solve issue!
PostPosted: Thu Nov 23, 2006 11:30 pm 
Offline

Joined: Wed Sep 13, 2006 3:25 pm
Posts: 27
Location: National Oceanography Centre
I figure it out what was the problem.

Everithing is ok with the model. My problem was reading the netCDF files. :oops: I'm reading them in Matlab using netCDF_toolbox, on Windows. As the first values are 1e35, before the floats are released, matlab show just 1e35 and 0e35 instead of the real values. So first you need to clear the large values with something like:
Code:
% clear large values...
ind = find(Xgrid(:,1)==Xgrid(1,1));
Xgrid(ind,:) = [];
Ygrid(ind,:) = [];


and then you can see the real values...

I guess the same thing happen to you Kate... so just in case it happen to somebody else.

Cheers
GaBy


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Nov 24, 2006 1:29 am 
Offline
User avatar

Joined: Tue Jul 01, 2003 4:12 am
Posts: 476
Location: NIWA
I'm glad you found the problem.

It's surprisingly easy to make mistakes like this. (If I had $0.01 for every time I've done it, I'd have ... well, a dollar or too anyway.) The best solution is to have independent ways of scanning through your data files. The ncdump utility is useful for this. It's particularly good at giving you a view of the overall structure of your file, but it can dump data too. Another useful set of tools is NCO:

http://nco.sourceforge.net/


Top
 Profile  
Reply with quote  
PostPosted: Tue Aug 05, 2008 2:27 am 
I am new in ROMS. I tried to run the lake_signell test case.
After the compilation, when i tried to run, it gives ocean_his.nc, ocean_avg.nc and ocean_flt.nc but ocean_flt.nc is completely empty. Along with these I received following error.


MuhammadAbdurRouf@ROUF /roms/test/lake_signell
$ ./oceanS < ocean_lake_signell.in> lake_signellout.dat
At line 282 of file def_floats.f90
Traceback: not available, compile with -ftrace=frame or -ftrace=full
Fortran runtime error: Expected CHARACTER for item 1 in formatted transfer, got
REAL. If you want to make character descriptors typeless, compile with -fsloppy
-char
(6x,'DEF_FLOATS - inquiring history file: ',a)


Someone pls help me to solve the problem?
Rouf


Top
  
Reply with quote  
PostPosted: Tue Aug 05, 2008 2:56 am 
Offline
User avatar

Joined: Tue Jul 01, 2003 4:12 am
Posts: 476
Location: NIWA
rouf wrote:
$ ./oceanS < ocean_lake_signell.in> lake_signellout.dat
At line 282 of file def_floats.f90
Traceback: not available, compile with -ftrace=frame or -ftrace=full
Fortran runtime error: Expected CHARACTER for item 1 in formatted transfer, got
REAL. If you want to make character descriptors typeless, compile with -fsloppy-char
(6x,'DEF_FLOATS - inquiring history file: ',a)


I get the same error. I'll look into it.

PS: why do the "quote" tags not work properly?


Top
 Profile  
Reply with quote  
PostPosted: Tue Aug 05, 2008 4:33 am 
Offline
User avatar

Joined: Tue Jul 01, 2003 4:12 am
Posts: 476
Location: NIWA
There's a bug in ROMS/Utility/def_floats.F in the following section of code.

Code:
#  ifdef SEDIMENT
          DO i=1,NST
            IF (itrc.eq.idsed(i)) THEN
              WRITE (Vinfo(19),20) 1000.0_r8*Sd50(i,ng)
            END IF
          END DO
#  endif


The format-statement number in the WRITE statement should be 40.

I'll report this on Trac.


Top
 Profile  
Reply with quote  
PostPosted: Tue Aug 05, 2008 4:35 am 
Offline
Site Admin
User avatar

Joined: Wed Feb 26, 2003 4:41 pm
Posts: 1012
Location: IMCS, Rutgers University
Yes, I already found that one. The fix is coming in the next big IO release. I am testing now.


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 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