Difference between revisions of "How to download HYCOM"

From ccrmwiki
Jump to: navigation, search
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
From Dr. Dan Yu (July 2018):
+
Please note that PYSCHISM can now download HYCOM and ERA5 etc easily.
  
This HYCOM download tool uses “ferret” as interface.
 
Please visit  [https://ferret.pmel.noaa.gov/Ferret ferret web site] to see details of the software. Also you'll need nco tool.
 
  
You can download our tool [http://ccrm.vims.edu/yinglong/wiki_files/hycom_dl.tgz here].
+
 
 +
==From Dr. Wenfan Wu (May 2022) ==
 +
 
 +
A [https://github.com/wenfanwu/get_hycom_online MATLAB function] for downloading the HYCOM data.
 +
 
 +
This function enables you to obtain the HYCOM data of a specified region and time moment since 1992. I hope it could help you.
 +
 
 +
 
 +
 
 +
 
 +
==From Dr. Dan Yu (July 2018)==
 +
 
 +
This HYCOM download tool uses “ferret” as interface.<br>
 +
Please visit  [https://ferret.pmel.noaa.gov/Ferret ferret web site] to see details of the software. Also you'll need nco tool.<br>
 +
Version 7.1 of ferret/pyferret or higher are tested. <br>
 +
ferret/pyferret also can be installed by python conda tool. <br>
 +
 
 +
conda create -n FERRET -c conda-forge pyferret --yes <br>
 +
source activate FERRET <br>
 +
 
 +
You can download our tool [http://ccrm.vims.edu/yinglong/wiki_files/hycom_dl.tgz here]. <br>
  
 
Once you download and untar, there’re 2 directories (9x.x_exp & 19.x_exp) that correspond to 2 different HYCOM experiment datasets; check HYCOM web site for further details about the description of the datasets.
 
Once you download and untar, there’re 2 directories (9x.x_exp & 19.x_exp) that correspond to 2 different HYCOM experiment datasets; check HYCOM web site for further details about the description of the datasets.
Line 11: Line 29:
 
For example:  
 
For example:  
 
*exp="91.1"    HYCOM experiment
 
*exp="91.1"    HYCOM experiment
*lon_s="120E"  start longitude
+
*lon_s="120"  start longitude (-180 ~ 180) <br>
*lon_e="125E"  end longitude
+
*lon_e="125"  end longitude (-180 ~ 180) <br>
*lat_s="20N"  start latitude
+
*lat_s="20"  start latitude (-90 ~ 90) <br>
*lat_e="25N"  end latitude
+
*lat_e="25"  end latitude   (-90 ~ 90) <br>
  
 
For 19.x_exp, 1 extra var “yr” has to be defined.
 
For 19.x_exp, 1 extra var “yr” has to be defined.
Line 30: Line 48:
 
If any error occurs, such as TMAP error or disconnection, <br>
 
If any error occurs, such as TMAP error or disconnection, <br>
 
please check ncfile (including size) in output directory first, <br>
 
please check ncfile (including size) in output directory first, <br>
and '''DELETE''' the line which already successfully download in listHYCOM.jnl, <br>
+
and '''DELETE''' the lines in listHYCOM.jnl corresponding to those that have already been successfully downloaded, <br>
 
and then type: dlHYCOM.sh again! <br>
 
and then type: dlHYCOM.sh again! <br>
  
The download script is designed to get all variables into 3 files (EL_*.nc, ST_*.nc, UV_*.nc) for SCHISM. <br>
+
The download script is designed to get all variables into 3 files (SSH_*.nc, ST_*.nc, UV_*.nc) for SCHISM. <br>
 
Once you gather all you need, simply use nco command to cat your ncfiles. <br>
 
Once you gather all you need, simply use nco command to cat your ncfiles. <br>
For example: ncrcat EL_*.nc EL_final.nc <br>
+
For example: ncrcat SSH_*.nc SSH_final.nc <br>
Then you can use "gen_hot_3Dth_from_hycom.f90" to generate your initial & open boundary conditions for SCHISM.
+
Then you can use "gen_hot_3Dth_from_hycom.f90" to generate your initial & open boundary conditions for SCHISM.<br>
 +
 
 +
Instead of downloading the whole records, the script is designed to download each record at a time to avoid too many requests to HYCOM server.<br>
 +
Also using OPeNDAP protocol to only request the region you need.<br>
 +
HYCOM server will reject too large a request!<br>
 +
Both minimize the load of HYCOM server, and makes downloading long record possible.<br>
 +
The only drawback is you will need extra disk storage to concatenate all netcdf files.<br>
  
 
Enjoy!
 
Enjoy!

Latest revision as of 07:54, 13 April 2023

Please note that PYSCHISM can now download HYCOM and ERA5 etc easily.


From Dr. Wenfan Wu (May 2022)

A MATLAB function for downloading the HYCOM data.

This function enables you to obtain the HYCOM data of a specified region and time moment since 1992. I hope it could help you.



From Dr. Dan Yu (July 2018)

This HYCOM download tool uses “ferret” as interface.
Please visit ferret web site to see details of the software. Also you'll need nco tool.
Version 7.1 of ferret/pyferret or higher are tested.
ferret/pyferret also can be installed by python conda tool.

conda create -n FERRET -c conda-forge pyferret --yes
source activate FERRET

You can download our tool here.

Once you download and untar, there’re 2 directories (9x.x_exp & 19.x_exp) that correspond to 2 different HYCOM experiment datasets; check HYCOM web site for further details about the description of the datasets.

Main script is listdate.sh in each dir, edit options as you need. For example:

  • exp="91.1" HYCOM experiment
  • lon_s="120" start longitude (-180 ~ 180)
  • lon_e="125" end longitude (-180 ~ 180)
  • lat_s="20" start latitude (-90 ~ 90)
  • lat_e="25" end latitude (-90 ~ 90)

For 19.x_exp, 1 extra var “yr” has to be defined.

  • yr="2012"

There’re 3 optional vars you can specify, if you have large domain (and want to subsample) or encounter memory problem with ferret.

  • lon_i: longitudinal interval, default is 0.08, use larger if needed
  • lat_i: latitudinal interval , default is 0.08, use larger if needed
  • mem: ferret memory cache, default is 300 (MegaWords), use larger if needed

Once you finish, execute listdate.sh, and it will generate listHYCOM.jnl for whole record list of experiment.
Edit time range in listHYCOM.jnl if you wish.
Then execute dlHYCOM.sh, and all your nc files will be in “output/”.

If any error occurs, such as TMAP error or disconnection,
please check ncfile (including size) in output directory first,
and DELETE the lines in listHYCOM.jnl corresponding to those that have already been successfully downloaded,
and then type: dlHYCOM.sh again!

The download script is designed to get all variables into 3 files (SSH_*.nc, ST_*.nc, UV_*.nc) for SCHISM.
Once you gather all you need, simply use nco command to cat your ncfiles.
For example: ncrcat SSH_*.nc SSH_final.nc
Then you can use "gen_hot_3Dth_from_hycom.f90" to generate your initial & open boundary conditions for SCHISM.

Instead of downloading the whole records, the script is designed to download each record at a time to avoid too many requests to HYCOM server.
Also using OPeNDAP protocol to only request the region you need.
HYCOM server will reject too large a request!
Both minimize the load of HYCOM server, and makes downloading long record possible.
The only drawback is you will need extra disk storage to concatenate all netcdf files.

Enjoy!