Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 26-02-2016, 07:03   #1
Registered User

Join Date: May 2012
Posts: 338
ncdf plugin for reading NetCDF tidal currents

Gilletarom
Registered User




Join Date: Mar 2010
Location: France
Boat: 10.50 mètres
Posts: 1,951


Re: oGrib2 Plugin using the ECMWF grib_api
Quote:
Originally Posted by Rasbats
Further Update ...
.....
A Windows compiled version of ncdf_pi has been left in the Extras folder, with an example tidal current nc file.
https://github.com/Rasbats/ncdf_pi
Mike


I placed ncdf_pi.dll in folder plugins, with the other dll.

Then, I run O (4.2.0, Or 4.2.1)
Then "options" and then "Plugins" but immediatly, Crash.
Today, 14:59 #19 Rasbats
Registered User


Join Date: May 2012
Posts: 208


Re: oGrib2 Plugin using the ECMWF grib_api
Gilletarom,

Strange. I have tested on two other machines and each opened the plugin without a problem.

Do you still have NetCDF 4.4.0 installed?

I have taken this post and started another thread for netcdf.

Mike
Attached Thumbnails
__________________

__________________
Rasbats is offline   Reply With Quote
Old 26-02-2016, 08:24   #2
Registered User
 
Gilletarom's Avatar

Join Date: Mar 2010
Location: France
Boat: 10.50 mètres
Posts: 2,226
Re: ncdf plugin for reading NetCDF tidal currents

Quote:
Originally Posted by Rasbats View Post
Gilletarom,

Strange. I have tested on two other machines and each opened the plugin without a problem.

Do you still have NetCDF 4.4.0 installed?

I have taken this post and started another thread for netcdf.

Mike
Yes, NetCDF 4.4.0 is installed. I have just put out the previous "grib2.dll file" But ... I cleaned the PC with CCleaner after put out the previous dll .... ????
__________________

__________________
Gilletarom is offline   Reply With Quote
Old 26-02-2016, 09:35   #3
Registered User

Join Date: May 2012
Posts: 338
Re: ncdf plugin for reading NetCDF tidal currents

Just a thought ...

Do you still have "C:\Program Files\netCDF 4.4.0\bin" in your PATH?

Did CCleaner remove it?

Mike
__________________
Rasbats is offline   Reply With Quote
Old 26-02-2016, 18:38   #4
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 8,073
Re: ncdf plugin for reading NetCDF tidal currents

Mike,
I have tried building the plugin and seem to be able to build it for Debug,
but not Release. Please see the attached.

Then I tried the ncdf_pi.dll and my version of Opencpn would not start any and had some errors. I took then deleted the dll and my version of opencpn 4.2 still would not start, so perhaps something else has changed.... but I am certain I have iconv.dll in the main directorty.

More later. Later: Built and updated Opencpn v4.2 and installed, now no longer have those errors and the program starts.
Attached Thumbnails
Click image for larger version

Name:	Iconv-could-not-be-located-2.png
Views:	73
Size:	52.8 KB
ID:	119648   Click image for larger version

Name:	iconv-could-not be-located.png
Views:	72
Size:	50.7 KB
ID:	119649  

Attached Files
File Type: doc ncdf_pi-VS-settings-reults.doc (100.3 KB, 18 views)
__________________
rgleason is online now   Reply With Quote
Old 26-02-2016, 18:59   #5
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 8,073
Re: ncdf plugin for reading NetCDF tidal currents

The ncdf_pi.dll plugin is installed, and I have the 4 dlls in the main directory.(no thats for survey!)
I wonder what is missing. Have path to the bin for netcdf

ocpencpn.log
Quote:
9:55:26 PM: PlugInManager searching for PlugIns in location C:\Program Files (x86)\OpenCPN 4.2.0\plugins
9:55:26 PM: PlugInManager: Loading PlugIn: C:\Program Files (x86)\OpenCPN 4.2.0\plugins\ncdf_pi.dll
9:55:26 PM: Error: Failed to load shared library 'C:\Program Files (x86)\OpenCPN 4.2.0\plugins\ncdf_pi.dll' (error 126: the specified module could not be found.)
9:55:26 PM: PlugInManager: Cannot load library: C:\Program Files (x86)\OpenCPN 4.2.0\plugins\ncdf_pi.dll
Quote:
10:15:38 PM: PlugInManager: Loading PlugIn: C:\Program Files (x86)\OpenCPN 4.2.0\plugins\ncdf_pi.dll
10:15:38 PM: Error: Failed to load shared library 'C:\Program Files (x86)\OpenCPN 4.2.0\plugins\ncdf_pi.dll' (error 126: the specified module could not be found.)
10:15:38 PM: PlugInManager: Cannot load library: C:\Program Files (x86)\OpenCPN 4.2.0\plugins\ncdf_pi.dll
10:15:38 PM: PlugInManager: Loading PlugIn: C:\Program Files (x86)\OpenCPN 4.2.0\plugins\nmeaconverter_pi.dll
__________________
rgleason is online now   Reply With Quote
Old 27-02-2016, 01:06   #6
Registered User
 
Gilletarom's Avatar

Join Date: Mar 2010
Location: France
Boat: 10.50 mètres
Posts: 2,226
Re: ncdf plugin for reading NetCDF tidal currents

Hello Mike,
Quote:
Originally Posted by Rasbats View Post
Just a thought ...

Do you still have "C:\Program Files\netCDF 4.4.0\bin" in your PATH?

Did CCleaner remove it?

Mike
No problem with the "path". It is always present.
__________________
Gilletarom is offline   Reply With Quote
Old 27-02-2016, 04:10   #7
Registered User

Join Date: May 2012
Posts: 338
Re: ncdf plugin for reading NetCDF tidal currents

Rick,

From your attached doc it looks like the link to opencpn.lib is not working.

Could you try putting both ocpn_plugin.h and opencpn.lib (from O4.2) in your build directory and recompiling. For release you need to make the same changes to 'properties' as you did for debug. The 'properties' in VS2013 do not carry over from 'debug' to 'release'.

Rick, Gilletarom,

I have just downloaded a zip of ncdf_pi from GitHub onto a fairly clean XP machine. Unzipped and installed NetCDF from the Extras folder (add to PATH for all users). Installed OpenCPN 4.2 (only 3.2.2 previously on this pc). Copied ncdf.dll from Extras into the plugins folder. Started O and enabled ncdf. It worked (had to switch OpenGL off).

Rick ... if you could try this route with using the pre-compiled ncdf_pi it could confirm/deny whether I am going totally crazy.

Any Win user ... Would appreciate another test of just using the pre-compiled plugin with OpenCPN 4.2. There is an example of a tidal current netcdf (nc) file in the Extras folder to use with the plugin.

My development pc and tablet are Win 8.1, where the plugin worked. Is Win 10 the problem?

Mike
__________________
Rasbats is offline   Reply With Quote
Old 05-03-2016, 10:01   #8
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 8,073
Re: ncdf plugin for reading NetCDF tidal currents

Installed the ncdf.dll attached to your email.
Then installed netcdf 4.4.0.exe in the Extras folder.
Checked the Control Panel > System > Advanced and found Path and checked to see if the path shows

C:/Program Files (x86)/netCDF 4.4.0/bin/

Then the plugin dll when installed under the plugins directory of Opencpn 4.2
works fine.
Attached Thumbnails
Click image for larger version

Name:	ncdf.jpg
Views:	94
Size:	248.9 KB
ID:	120047  
__________________
rgleason is online now   Reply With Quote
Old 09-03-2016, 15:22   #9
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 8,073
Re: ncdf plugin for reading NetCDF tidal currents

Mike,
Ok it builds and you can the one I built....
- Now I found the problem!
The plugin window does not open up big enough to expose the Current checkbox!
Also I have not used this plugin enough to know that it is there!
Can you make the Preferences window that pops up be bigger to show the checkboxes?
Or perhaps have both checkboxes checked to begin with, when the plugin is first started?
That would help a lot.

I can display
ibi_example.nc 000m Forecast thru 660 m Forecast
ibi_test.nc 000m Forecast thru 660 m Forecast
ibi,nc 000m Forecast thru 1440 m Forecast

Thanks. I believe the build instructions in ncdf4.txt for setting up VC++ are now correct.
Best
Rick
__________________
rgleason is online now   Reply With Quote
Old 10-03-2016, 00:49   #10
Registered User

Join Date: May 2012
Posts: 338
Re: ncdf plugin for reading NetCDF tidal currents

Rick,

Github has been updated. Checkbox for current is ticked by default. Position moved.

I cannot make the display of the area downloaded totally flexible. Following a suggestion by Gilletarom I am now looking at defining areas ... English Channel, Irish Sea, South Brittany etc etc. If you have selected an area from Copernicus that includes that region it will display. I do not want to make the areas too large because of the size of the download.

Must make it work on OpenGL!!! Forward/Back buttons. Anything else?

Mike
__________________
Rasbats is offline   Reply With Quote
Old 11-03-2016, 07:40   #11
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 8,073
Re: ncdf plugin for reading NetCDF tidal currents

Mike, I think defining areas is a good idea.
I wonder if there is a way of reducing the display of all arrows at larger scales?
Perhaps just an option to display only every other or every 3rd grib arrow, perhaps associated with the scale? This would help with the density of the the display and redraw time. It would also help with when the "force" is checked. Just an idea.
__________________
rgleason is online now   Reply With Quote
Old 11-03-2016, 08:11   #12
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 8,073
Re: ncdf plugin for reading NetCDF tidal currents

Mike,
Attached is your most current version of ncdf.dll along with updated notes for creating the dll using VC++. Also attached are some images of the current files, for others to see what this plugin is doing.

Thanks creating this plugin, it will be especially helpful to European Cruisers because the current files are of that area, I guess.

This is beta. Take the pdf off the ncdf.dll and place it in your 4.2.0 or 4.2.1 Opencpn plugin directory. Then point the plugin to some downloaded current files. I'll make a Ncdf gb2 directory in File Thingie for current files for testers to try.
Attached Thumbnails
Click image for larger version

Name:	ncdf-image.png
Views:	81
Size:	347.2 KB
ID:	120473   Click image for larger version

Name:	ncdf-image-2.jpg
Views:	80
Size:	180.9 KB
ID:	120474  

Attached Files
File Type: pdf ncdf_pi.dll.pdf (150.0 KB, 17 views)
__________________
rgleason is online now   Reply With Quote
Old 11-03-2016, 08:38   #13
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 8,073
Re: ncdf plugin for reading NetCDF tidal currents

Mike

Your script motu-client-script.txt shows this:
Quote:
"C:\Python27/python" "C:\plugins\motu-client/motu-client.py" -u XXXXXXXXXXXX -p XXXXXXXXXX -m http://puertos.cesga.es/mis-gateway-servlet/Motu -s http://purl.org/myocean/ontology/ind..._005_001_b-TDS -d dataset-ibi-analysis-forecast-phys-005-001-hourly -x -4 -X 0 -y 49 -Y 52 -t "2016-03-08 12:00:00" -T "2016-03-09 12:00:00" -v v -v u -o "C:\plugins\cdo" -f "ibi.nc"
I have python27 on the PC and would like to make a script that fits with my setup which I could start with Launcher_pi (adding another operation) as I have done with three VDR_player files.

Can you explain what the paths are ?
First path: goes to python
Second path: location of another script in py ?
Then it looks like you are combining two http: sources into one file
located somewhere "C:\plugins\cdo" with the name ibi.nc

Currently I am putting a single line of python script into Launcher in order to play the VDR files. How would you suggest I set this up?
__________________
rgleason is online now   Reply With Quote
Old 11-03-2016, 12:44   #14
Registered User

Join Date: May 2012
Posts: 338
Re: ncdf plugin for reading NetCDF tidal currents

Rick,

If you go to the Copernicus site, login and make a download you will get a screen telling you about the motu client at the end of the process.

There is a link to a site for downloading this motu-client script.

"C:\plugins\cdo" -f "ibi.nc" is where my download is saved and the file name.

"C:\Python27/python" "C:\plugins\motu-client/motu-client.py" is the folder for Python and the folder containing the motu-client script.

Mike
__________________
Rasbats is offline   Reply With Quote
Old 11-03-2016, 12:58   #15
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 8,073
Re: ncdf plugin for reading NetCDF tidal currents

Ok so I could save motu-client-script.txt as motu-client-script.py straight into my python27 directory, then modify the paths accordingly.


Quote:
"C:\Python27/python" "C:\Python27\python\motu-client.py" -u XXXXXXXXXXXX -p XXXXXXXXXX -m http://puertos.cesga.es/mis-gateway-servlet/Motu -s http://purl.org/myocean/ontology/ind..._005_001_b-TDS -d dataset-ibi-analysis-forecast-phys-005-001-hourly -x -4 -X 0 -y 49 -Y 52 -t "2016-03-08 12:00:00" -T "2016-03-09 12:00:00" -v v -v u -o "D:\grib\cdo" -f "ibi.nc"

Python Directory: C:\Python27/python
Script Location: C:\Python27\python\motu-client.py
Download Location: D:\grib\cdo
Filename Assigned to the concatenated files: ibi.nc

I'll check the Copernicus site for more details. Thanks
__________________

__________________
rgleason is online now   Reply With Quote
Reply

Tags
current, plug

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tidal Currents in West, North Europe christopher1958 OpenCPN 2 03-06-2012 10:36
Want To Buy: Canadian Atlas of Tidal Currents (St. Lawrence Estuary) Westerly33 Classifieds Archive 0 02-08-2011 08:50
OpenCPN Tidal Heights and Currents NAV OpenCPN 14 25-06-2011 03:23
Tidal Currents (Not Heights) wizard-merlin OpenCPN 3 16-02-2011 03:34
Riding Tidal Currents on the ICW endoftheroad Navigation 8 03-01-2010 16:38


Our Communities

Our communities encompass many different hobbies and interests, but each one is built on friendly, intelligent membership.

» More about our Communities

Automotive Communities

Our Automotive communities encompass many different makes and models. From U.S. domestics to European Saloons.

» More about our Automotive Communities

Marine Communities

Our Marine websites focus on Cruising and Sailing Vessels, including forums and the largest cruising Wiki project on the web today.

» More about our Marine Communities


Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 18:16.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.