HYCOM data extraction

264 views
Skip to first unread message

B Jessop

unread,
Feb 21, 2022, 11:26:40 AM2/21/22
to HYCOM.org Forum
Dear Group:

I am a retired fishery biologist working on his last paper and now looking to extract water temperature data from a range of dates (60 d contiguous period) in a given year from several depths (100, 200, 300 m; one depth at a time) at a series of lat/long positions (again one at a time) across the North Atlantic Ocean.  I have used Panoply to extract water temperatures from NetCDF files from the Net CDF Subnet Service Documentation page but it permits data from only one day at a time.  I have looked at the OPENDAP page, but again, it seems not to permit downloads of multiple days of water temperatures from a given lat/long and depth.  One of the data sets that I have used is the GOFS3.0: HYCOM + NCODA 1/12 Reanalysis, (1995) Reanalysis Data: 1995-01-01 to 1995-07-31 at 00Z. 
Can anyone suggest a method to obtain the data that I would like?  I am completely unfamiliar with PYTHON so cannot write a program to do so.  I could do the very tedious job of getting a water temperature for a given lat/long and depth for each of the 60 days that I would like and then move along to the next site but I might not live long enough to complete the task.  
Thanks for any assistance.

Regards,
Brian Jessop

Ken Harris

unread,
Feb 21, 2022, 2:08:56 PM2/21/22
to B Jessop, HYCOM.org Forum
On Mon, Feb 21, 2022 at 8:26 AM B Jessop <bj3...@gmail.com> wrote:

> I am a retired fishery biologist working on his last paper and now looking to extract water temperature data from a range of dates (60 d contiguous period) in a given year from several depths (100, 200, 300 m; one depth at a time) at a series of lat/long positions (again one at a time) across the North Atlantic Ocean.

> I have used Panoply to extract water temperatures from NetCDF files from the Net CDF Subnet Service Documentation page but it permits data from only one day at a time.

> I have looked at the OPENDAP page, but again, it seems not to permit downloads of multiple days of water temperatures from a given lat/long and depth. One of the data sets that I have used is the GOFS3.0: HYCOM + NCODA 1/12 Reanalysis, (1995) Reanalysis Data: 1995-01-01 to 1995-07-31 at 00Z.

> Can anyone suggest a method to obtain the data that I would like? I am completely unfamiliar with PYTHON so cannot write a program to do so.

You might mention your prefered scripting languages and what data
format you'd like to get (eg : CSV, etc) and OS (Windoze, macOS or
Linux).

Not an expert, but you might try the "NCO" tool called "ncks" (NC
kitchen sink). Install NCO from http://nco.sf.net .

For example, I got some FVCOM surface current data via OPENDAP like this :

u0=https://thredds.cencoos.org/thredds/dodsC/NOAA_OFS_SFBOFS_regulargrid.nc
ncks -v u_eastward,v_northward -d Depth,0 -d
ocean_time,2021-10-10T00:00:00Z,2021-10-10T23:55:00 $u0 $(basename
$u0)

Here is another example from https://github.com/powellb/seapy (that
uses hycom data) :

ncks -v water_temp,salinity,surf_el,water_v,water_u -d time,352,352 -d
lat,1204,1309 -d lon,2438,2603
http://tds.hycom.org/thredds/dodsC/GLBu0.08/expt_91.1 hycom_file.nc

> I could do the very tedious job of getting a water temperature for a given lat/long and depth for each of the 60 days that I would like and then move along to the next site but I might not live long enough to complete the task.

A tedious job might make it seem like you're living longer ...

-K

Greg Pelletier

unread,
Jan 11, 2023, 4:15:56 PM1/11/23
to B Jessop, HYCOM.org Forum

I wrote a script to download the 3-hourly HYCOM hindcast predictions between 1994 to the present within any user-specified bounding area.

Here is the link to download the script:

https://github.com/gjpelletier/get_hycom

This script automatically downloads all of the 3-hourly predictions between any user-specified start and end date-times within any user-specified bounding area. The user may also specify any combination of the available hindcast variables (sea surface elevation, and water temperature, salinity, u-velocity, and v-velocity). Each of the 3-hourly predictions are stored in separate netcdf files within a user-specified output folder.

The script is written in the Microsoft Powershell language. Powershell is a cross-platform task-automation solution that runs in Windows, Linux, and MacOS. Powershell is part of the Windows operating system. Microsoft also offers Powershell for no cost to install on Linux and MacOS. 

INSTRUCTIONS

  1. In the user input section above the while loop, specify the following: - specify the list of variables to be extracted from any combination of $var_list = "surf_el,water_temp,salinity,water_u,water_v" - specify the $west, $east, $south, and $north extent of the bounding box to be extracted - specify the name of the $resultDirectory where the hycom data will be saved as output - specify the $date_start and $date_end of the period to be extracted
  2. In the user selection section within the while loop, select the appropriate $url for the time period and variables to be extracted
  3. In the Windows search box, search for "Powershell" and open a Powershell window, and then copy and paste the entire contents of this script into the Powershell window to execute. If you do not have Windows, you may use this script in the new cross-platform version of PowerShell that is available for MacOS and Linux at the following link from Microsoft: https://aka.ms/pscore6
  4. During execution you should see the progress of each 3-hour file that is extracted during the period of interest from beginning to end. Each nc file name has the format yyyyMMdd_HH.nc to indicate the datetime stamp in UTC

On Mon, Feb 21, 2022 at 8:26 AM B Jessop <bj3...@gmail.com> wrote:
--
--
You received this message because you are a member of HYCOM.org
To ask a question, send an email to fo...@hycom.org

---
To unsubscribe from this group and stop receiving emails from it, send an email to forum+un...@hycom.org.
Reply all
Reply to author
Forward
0 new messages