Search found 43 matches

by CharlesJames
Wed Mar 01, 2023 1:52 am
Forum: ROMS Discussion
Topic: Which tool is the stablest tools to create ROMS grid?
Replies: 56
Views: 187078

Re: Which tool is the stablest tools to create ROMS grid?

Hi, The default bathymetry, which is eTOPO, probably doesn't have enough resolution to provide useful topography for your lake - or if the lake is above sea-level it will treat it all as land (negative values). if you think the lake is above sea-level but has resolvable features, you can try to prov...
by CharlesJames
Wed Sep 21, 2022 2:06 am
Forum: ROMS Discussion
Topic: Which tool is the stablest tools to create ROMS grid?
Replies: 56
Views: 187078

Re: Which tool is the stablest tools to create ROMS grid?

I haven't tested on Macs, the toolbox installed ok on a Matlab R2022b prerelease running on a PC, it doesn't use any mex files so I'm not sure why it wouldn't install on a Mac, if you can install the toolbox on a PC and do '>>which GridBuilder' in Matlab you should get the location of the GridBuilde...
by CharlesJames
Mon Sep 13, 2021 3:11 am
Forum: ROMS Discussion
Topic: Which tool is the stablest tools to create ROMS grid?
Replies: 56
Views: 187078

Re: Which tool is the stablest tools to create ROMS grid?

Hi Lawrance, I think in the last release of GridBuilder I made it so that bathymetry modifications only affect unmasked parts of the grid, so that setting a minimum depth would set that value where the unmasked depth was less the minimum. Bathymetry that was masked remains as it was and for land to...
by CharlesJames
Mon Sep 13, 2021 2:01 am
Forum: ROMS Discussion
Topic: Which tool is the stablest tools to create ROMS grid?
Replies: 56
Views: 187078

Re: Which tool is the stablest tools to create ROMS grid?

Sorry, I haven't been following the forum too closely recently. I did have a problem with the coastline files in one of the updates, which I is fixed now - I wanted to distinguish the gshhs files used by GridBuilder from the ones I had in my own directories by prefixing them with GB_, this was all o...
by CharlesJames
Wed Apr 28, 2021 2:26 am
Forum: ROMS Discussion
Topic: Which tool is the stablest tools to create ROMS grid?
Replies: 56
Views: 187078

Re: Which tool is the stablest tools to create ROMS grid?

Hi Lawrance, I think in the last release of GridBuilder I made it so that bathymetry modifications only affect unmasked parts of the grid, so that setting a minimum depth would set that value where the unmasked depth was less the minimum. Bathymetry that was masked remains as it was and for land top...
by CharlesJames
Fri Mar 26, 2021 4:03 am
Forum: ROMS Discussion
Topic: Which tool is the stablest tools to create ROMS grid?
Replies: 56
Views: 187078

Re: Which tool is the stablest tools to create ROMS grid?

what you have posted looks like the partial output from a diary file, it is not showing the full mask so I can't really comment. If you want to display your mask using a spherical grid you need to import the lon_rho,lat_rho, and mask_rho points and plot it up with something like pcolor. That should ...
by CharlesJames
Wed Mar 17, 2021 11:29 pm
Forum: ROMS Discussion
Topic: Which tool is the stablest tools to create ROMS grid?
Replies: 56
Views: 187078

Re: Which tool is the stablest tools to create ROMS grid?

I recently had a query about GEBCO - the vertical coordinate is called 'Elevation' rather than 'elevation' and the parser is case sensitive - an easy fix if you are using matlab and have the toolbox is edit getUserBathymetry.m And at line 13 add ‘elevation’ to the zfields cell array i.e. zfields={'Z...
by CharlesJames
Wed Mar 03, 2021 4:33 am
Forum: ROMS Discussion
Topic: Which tool is the stablest tools to create ROMS grid?
Replies: 56
Views: 187078

Re: Which tool is the stablest tools to create ROMS grid?

It looks like there is still a bug in the refinement routine - when it returns a structure of empty fields for R it also includes empty rho,psi,u,and v coordinates for a non spherical grid (i.e. x_rho,x_psi, etc.) since you are using a spherical grid the size of the structures don't match so you get...
by CharlesJames
Wed Mar 03, 2021 12:09 am
Forum: ROMS Discussion
Topic: Which tool is the stablest tools to create ROMS grid?
Replies: 56
Views: 187078

Re: Which tool is the stablest tools to create ROMS grid?

Hi Neel,

The version of contact.m you have attached doesn't have a line 311 with G(ng).refine_factor = RFactors(ng) on it, perhaps you have another contact.m file that is shadowing the one you want to use?
by CharlesJames
Wed Sep 02, 2020 12:24 am
Forum: ROMS Bugs
Topic: Mask beeing rotated Bug in GridBuilder
Replies: 3
Views: 2997

Re: Mask beeing rotated Bug in GridBuilder

Eric is correct regarding the grid creation, note that you can change the origin after creating the grid by right clicking on any corner while in corner edit mode, and also that the h, lon_rho, lat_rho, etc. will be correctly oriented with respect to the selected grid origin so a grid with any origi...
by CharlesJames
Sat Apr 18, 2020 2:37 am
Forum: ROMS Discussion
Topic: Which tool is the stablest tools to create ROMS grid?
Replies: 56
Views: 187078

Re: Which tool is the stablest tools to create ROMS grid?

Yep, that's a bug! varcheck is a routine I made to check if a variable is passed in or not, I didn't include varcheck in the toolbox and I don't use it in any other routines. If you can open up getMapCoord and change the first couple of lines of code from varcheck('x0',0); varcheck('y0',0); to if ~e...
by CharlesJames
Tue Mar 31, 2020 5:54 am
Forum: ROMS Discussion
Topic: Which tool is the stablest tools to create ROMS grid?
Replies: 56
Views: 187078

Re: Which tool is the stablest tools to create ROMS grid?

Hi Charles I am a new GridBuilder user. I use an old coarse grid generated by seagrid to get a fine subgrid by GridBuilder. Then problems show up when I try to generate a contact file using the ROMS function 'contact'. The error message is: Reference to non-existent field 'contact'. Error in grid_c...
by CharlesJames
Wed Feb 19, 2020 5:01 am
Forum: ROMS Bugs
Topic: WET_DRY and Gridbuilder Problem
Replies: 21
Views: 12974

Re: WET_DRY and Gridbuilder Problem

OK, I think I get it: So the steps would be (following what you said): Using GridBuilder: Add enough depth to your bathymetry so that everything that you expect to get wet is under water and load it into GridBuilder Use the new 0 contour as your coast line (let GridBuilder use topography to set mask...
by CharlesJames
Tue Feb 18, 2020 3:16 am
Forum: ROMS Bugs
Topic: WET_DRY and Gridbuilder Problem
Replies: 21
Views: 12974

Re: WET_DRY and Gridbuilder Problem

rx0 can become very large if the depth changes sign within the unmasked part of the grid - I think the topography might not match up quite with your coastline after smoothing and raising it, This may have caused land to be exposed near the coast in unmasked cells which is not good and may be causing...
by CharlesJames
Fri Feb 14, 2020 1:18 am
Forum: ROMS Bugs
Topic: WET_DRY and Gridbuilder Problem
Replies: 21
Views: 12974

Re: WET_DRY and Gridbuilder Problem

I think the problem is the bathymetric filtering. The positive and negative adjustment filters only work on wet cells and rx0 is only calculated on wet cells - if you do filtering first then alter the mask it may tag previously dry cells as wet - the topography of these previously dry cells has not ...
by CharlesJames
Thu Feb 13, 2020 1:35 am
Forum: ROMS Bugs
Topic: WET_DRY and Gridbuilder Problem
Replies: 21
Views: 12974

Re: WET_DRY and Gridbuilder Problem

Are you using GSHHG coastlines to generate the mask? Under the Mask Settings menu choose "Use GSHHG Coastlines (More Accurate)" - default is "Use Topography (Faster)" which is very useful for quickly placing a grid and getting the resolution correct. Once you are happy with the b...
by CharlesJames
Tue Jan 21, 2020 4:03 am
Forum: ROMS Bugs
Topic: WET_DRY and Gridbuilder Problem
Replies: 21
Views: 12974

Re: WET_DRY and Gridbuilder Problem

I think an old version of GridBuilder had an issue with resetting depths with land masks to 0m when exporting to a grid nc file regardless of users intent but that was fixed a while ago; you can set the min depth to anything on export. I am working with version 1.2 of GridBuilder and I am able to cr...
by CharlesJames
Fri Jul 19, 2019 7:11 am
Forum: ROMS Discussion
Topic: Which tool is the stablest tools to create ROMS grid?
Replies: 56
Views: 187078

Re: Which tool is the stablest tools to create ROMS grid?

The coastlines are the latest GSHHG coastline polygons which are GWS84 but even at full resolution they will be coarser than your grid - not sure why Google Maps would be different but the Google map elements might be higher resolution or they may use a different datum. I use the interpolants to spe...
by CharlesJames
Tue Jul 16, 2019 3:14 am
Forum: ROMS Discussion
Topic: Which tool is the stablest tools to create ROMS grid?
Replies: 56
Views: 187078

Re: Which tool is the stablest tools to create ROMS grid?

OK, I see what you have now, it is a rectangular grid but includes the north pole so the gridbuilder default projection is very distorted and the sides are not calculated correctly. To allow gridbuilder to manipulate this grid or others like it I'd need to add a sterographic projection to allow grid...
by CharlesJames
Mon Jul 15, 2019 5:55 am
Forum: ROMS Discussion
Topic: Which tool is the stablest tools to create ROMS grid?
Replies: 56
Views: 187078

Re: Which tool is the stablest tools to create ROMS grid?

I've made a small fix to getDefaultBathymetry.m which is hopefully attached, if too few eTOPO points are found in the model domain this should ensure that the nearest array of depths that include the model domain are still returned. I'm not sure if this will help with the polar grid yet I'll have to...
by CharlesJames
Fri Jul 12, 2019 10:41 pm
Forum: ROMS Discussion
Topic: Which tool is the stablest tools to create ROMS grid?
Replies: 56
Views: 187078

Re: Which tool is the stablest tools to create ROMS grid?

It is interesting that both these issues seem to relate to getDefaultBathymetry which is used to open the ETOPO2 default and extract topography for the region, this might not always be necessary if the user has imported their own topography first but it is still called and kept in reserve to fill in...
by CharlesJames
Wed Jul 10, 2019 3:28 am
Forum: ROMS Discussion
Topic: Which tool is the stablest tools to create ROMS grid?
Replies: 56
Views: 187078

Re: Which tool is the stablest tools to create ROMS grid?

Hi, I haven't tested GridBuilder or ROMS with a polar grid before, the error message is from Matlab's griddedInterpolant routine which usually wants a ndgrid type x,y coordinate so it may be my routines for reading in topography with a pole in it are falling over a bit, if the routine didn't get the...
by CharlesJames
Mon Mar 25, 2019 12:41 am
Forum: ROMS Discussion
Topic: Set a land mask on the sea in SeaGrid
Replies: 22
Views: 31795

Re: Set a land mask on the sea in SeaGrid

The answer in "no", all three of them, A,B,C, cannot be made straight at the same time. This is the nature of conformal mapping: once A and C are straight, there is no way to fit a curve which would go along the coast, and be perpendicular to A and C at the junction points. B can me made ...
by CharlesJames
Thu Mar 14, 2019 11:52 pm
Forum: ROMS Discussion
Topic: Which tool is the stablest tools to create ROMS grid?
Replies: 56
Views: 187078

Re: Which tool is the stablest tools to create ROMS grid?

Hi Peida, It sounds like being able to specify exact corner coordinates would be a useful feature to add, I'll try and put something together. In the meantime you can import custom reference points in a text file as comma deliminated x,y pairs. These points will plot as small black + symbols on the ...
by CharlesJames
Thu Mar 14, 2019 4:24 am
Forum: ROMS Discussion
Topic: Which tool is the stablest tools to create ROMS grid?
Replies: 56
Views: 187078

Re: Which tool is the stablest tools to create ROMS grid?

Hi Victor, Unfortunately I haven't added support for creating multiple nested grids into GruidBuilder since I've only done off-line nesting. For now you'll have to add the nesting attributes manually to the attributes in the new grid to use contact.m. I'll look into it for the next time I update the...
by CharlesJames
Fri Feb 01, 2019 2:19 am
Forum: ROMS Discussion
Topic: Import reference points in GridBuilder
Replies: 1
Views: 1996

Re: Import reference points in GridBuilder

Reference points have no effect on the grid but provide visual points within the map that can be used as a guide when constructing a grid, i.e. where a mooring or tide gauge is that you might want to have within your domain. If you import reference points from a ROMS grid file then they are all the ...
by CharlesJames
Wed Oct 31, 2018 11:48 pm
Forum: ROMS Discussion
Topic: Which tool is the stablest tools to create ROMS grid?
Replies: 56
Views: 187078

Re: Which tool is the stablest tools to create ROMS grid?

GridBuilder is now available as a Matlab Toolbox (.mltbx) including source code from John Luick's Austides site (http://austides.com/downloads). Once installed, it should run from the command line under any recent version of Matlab. If you are having problems with program please let me know the spec...
by CharlesJames
Wed Jul 25, 2018 1:50 am
Forum: ROMS Tools and Techniques
Topic: SEAGRID.m with MATLAB R2014b
Replies: 12
Views: 23007

Re: SEAGRID.m with MATLAB R2014b

After some encouragement I have decided to release the full GridBuilder source code and files in the form of a Matlab toolbox. The latest version should run on any version of Matlab 2014b or later. I have only tested it on a Windows machine so I would be interested in hearing how it goes on Macs and...
by CharlesJames
Mon Feb 20, 2017 2:41 am
Forum: ROMS Tools and Techniques
Topic: SEAGRID.m with MATLAB R2014b
Replies: 12
Views: 23007

Re: SEAGRID.m with MATLAB R2014b

Development on gridbuilder began by trying to fix Seagrid, but the old presto toolbox that was used to drive the gui would also have had to be rewritten so we gave up on that approach - at the heart of Seagrid (and GridBuilder) is the routine rect2grid which uses a fast Poisson solver to generate th...
by CharlesJames
Fri Apr 15, 2016 1:46 am
Forum: ROMS Bugs
Topic: Bug with grid coordinates for station file
Replies: 2
Views: 4314

Re: Bug with grid coordinates for station file

This seems to work I set a station count to 1 if the tile determines that it contains the station, 0 otherwise. Then I mp_collect that variable and the result is the number of times the station was found in different tiles (usually 1 but can be up to 4) - then divide the mp_collected fractional indi...
by CharlesJames
Tue Apr 12, 2016 6:03 am
Forum: ROMS Bugs
Topic: Bug with grid coordinates for station file
Replies: 2
Views: 4314

Bug with grid coordinates for station file

A couple of times we have entered station coordinates at known wet point on a grid and found the station file contained NaN's for the location and all variables for that station. This would occur for a particular tiling but the problem would go away if we changed the tiling slightly. But sometimes t...
by CharlesJames
Thu Mar 17, 2016 1:21 am
Forum: ROMS Discussion
Topic: Instabilities with SWAN_COUPLING and WET_DRY together
Replies: 8
Views: 7612

Re: Instabilities with SWAN_COUPLING and WET_DRY together

Converting SWAN to use the Nautical convention for wind was not easy. I was just browsing the Forum to see if anyone had dealt with this before although it looks like it hasn't been discussed for a while. I was just faced with the same problem after having developed a SWAN model with a large number...
by CharlesJames
Thu Feb 04, 2016 11:26 pm
Forum: ROMS Tools and Techniques
Topic: seagrid2roms ---ncmex (line 110) Undefined "fcn"
Replies: 9
Views: 9345

Re: seagrid2roms ---ncmex (line 110) Undefined "fcn"

Dear CharlesJames, I value very much your effort exploring possibilities. I also understand that do not buy an expensive compiler that you do not need. Thanks for that effort. Beside that, I've had the change to try the program on another computer. It works very well and offers a smooth way to buil...
by CharlesJames
Wed Feb 03, 2016 12:24 am
Forum: ROMS Tools and Techniques
Topic: seagrid2roms ---ncmex (line 110) Undefined "fcn"
Replies: 9
Views: 9345

Re: seagrid2roms ---ncmex (line 110) Undefined "fcn"

Hej John, I very impressed by what I see in the description (pdf-file) of your grid program. Unfortunately we a not allowed and able to install any program on our windows machines. Therefore I would like to ask, if you program could modified so that it runs on Windows without installation. Since I'...
by CharlesJames
Wed Feb 03, 2016 12:10 am
Forum: ROMS Tools and Techniques
Topic: seagrid2roms ---ncmex (line 110) Undefined "fcn"
Replies: 9
Views: 9345

Re: seagrid2roms ---ncmex (line 110) Undefined "fcn"

What I will say is that if you use GridBuilder (http://austides.com/downloads/) instead of seagrid it will be like going from a bicycle to a Ferrari. An old bicycle with innumerable broken parts, to a new Ferrari. Well, thank u very much for your information. I may have a try. However, does anyone ...
by CharlesJames
Tue Dec 01, 2015 2:25 am
Forum: ROMS Tools and Techniques
Topic: problem in seagrid2roms (built in win32 system)
Replies: 6
Views: 7803

Re: problem in seagrid2roms (built in win32 system)

I've recently completed work on the GridBuilder program and added a number of new features based on user feedback. We have also put up a users guide that includes a short tutorial to show how GridBuilder can be used. This is informally v0.99 but will probably become v1.0 after any remaining bugs are...
by CharlesJames
Tue Aug 04, 2015 5:21 am
Forum: ROMS Tools and Techniques
Topic: TPXO to ROMS EXPRESS (tide extraction software)
Replies: 110
Views: 2420130

Re: TPXO to ROMS EXPRESS (tide extraction software)

There may be a couple of issues here, the first is that scatteredInterpolant only takes datatype double (real or complex) so your solution will avoid that error. But there may still be a problem with your u_tpxo72.nc file - the version of that file that I have has the variables URe and UIm (the vari...
by CharlesJames
Fri May 29, 2015 2:31 am
Forum: ROMS Tools and Techniques
Topic: problem in seagrid2roms (built in win32 system)
Replies: 6
Views: 7803

GridBuilder - a new Seagrid style grid editor.

Since Matlab 2014b the creation of a new class for graphic handles (handles are no longer floating point numbers) has created an incompatibility with the very popular Seagrid program. To address this problem within our group I have created an updated version of Seagrid which we call GridBuilder and ...
by CharlesJames
Fri May 29, 2015 1:42 am
Forum: ROMS Tools and Techniques
Topic: SEAGRID.m with MATLAB R2014b
Replies: 12
Views: 23007

Re: SEAGRID.m with MATLAB R2014b

Seagrid doesn't need to have any mex files in order to run, in spite of the error message, if they are not there seagrid uses m files to perform the same functions. The bigger problem is that starting with Matlab 2014b handles are no longer floating point numbers by default - they have a new class c...
by CharlesJames
Tue Sep 18, 2012 12:29 am
Forum: ROMS Problems
Topic: SWAN needs BLOCK to pass variables to ROMS
Replies: 2
Views: 3186

Re: SWAN needs BLOCK to pass variables to ROMS

Thanks John,

I've sent you an e-mail and I would be interested in trying the coawst code; are there any plans to merge these advancements with the standard ROMS distribution. I still have a number of questions regarding the current coupling set-up but where is the best forum to raise them?

Charles
by CharlesJames
Mon Sep 17, 2012 1:22 am
Forum: ROMS Problems
Topic: SWAN needs BLOCK to pass variables to ROMS
Replies: 2
Views: 3186

SWAN needs BLOCK to pass variables to ROMS

I couldn't find any reference to this during a quick check of the forum so I though I'd mention it. I'm running ROMS 3.6 rev 613 in coupled mode with SWAN and have encountered an unexpected behaviour with the swan.in file - if you don't have a BLOCK statement for a variable you want to export to ROM...
by CharlesJames
Mon Oct 31, 2011 5:14 am
Forum: ROMS Installation
Topic: error with inlet_test example
Replies: 14
Views: 14326

Re: error with inlet_test example

I've been working with the inlet_test case with ROMS 3.6 (rev 572), MCT 2.6.0, I'm compiling with mpif90 for MPICH version 1.2.1p1 with ifort 10.1 I've run into a couple of things: First, I've encountered what may be a bug that causes the program to fail at the last hurdle - the mpi_barrier call in ...
by CharlesJames
Wed Feb 18, 2009 3:30 am
Forum: ROMS Bugs
Topic: Kelvin Demo Compile Fails
Replies: 1
Views: 2659

Kelvin Demo Compile Fails

We've been working with a number of the test cases since the recent update (we are currently on 299) and have found a problem with the existing Kelvin wave demo. The kelvin.h file included with the model sets EAST_FSRADIATION and EAST_M2RADIATION. However,the Kelvin test case also provides analytica...