OCEANWEATHER WIND FILE

From CIRPwiki
Revision as of 18:22, 26 May 2010 by Deleted (talk | contribs)
Jump to navigation Jump to search

Oceanweather Wind File Format

The file format for the Oceanweather wind file (*.win) is best described with an example:

   Oceanweather WIN/PRE Format                            2008090912     2008091406
   iLat= 118iLong= 201DX=0.0150DY=0.0150SWLat=28.50000SWLon=-96.0000DT=200809091200
   -4.8891   -4.8873   -4.8855   -4.8838   -4.8821   -4.8805   -4.8789   -4.8774
   -4.8759   -4.8744   -4.8730   -4.8717   -4.8704   -4.8692   -4.8680   -4.8669
   ...
   -2.1530   -2.1382   -2.1233   -2.1085   -2.0937   -2.0788   -2.0637   -2.0486
   -2.0335   -2.0184   -2.0035   -1.9887   -1.9741   -1.9598   -1.9458   -1.9322
   -1.9190   -1.9062   -1.8938   -1.8820   -1.8707   -1.8600
   iLat= 118iLong= 201DX=0.0150DY=0.0150SWLat=28.50000SWLon=-96.0000DT=200809091215
   -4.9107   -4.9090   -4.9074   -4.9058   -4.9043   -4.9028   -4.9014   -4.9001
   -4.8988   -4.8975   -4.8963   -4.8952   -4.8942   -4.8932   -4.8923   -4.8914
   -4.8906   -4.8898   -4.8889   -4.8881   -4.8873   -4.8866   -4.8860   -4.8854
   ...

The last two arguments of the header is are the starting and end times in yyyymmddhh. The wind data is preceded by a header line with the grid information. iLat and iLong are latitude North and longitude West. DX and DY are the grid spacing in units of degrees. SWLat and SWLon are the coordinates of the south-west grid point. DT is the actual time in yyyymmddhhMM. First the wind velocities in the x-direction are read than the velocities in the y-direction. The wind speeds are written in m/s.

FORTRAN CODE

An excerpt of the FORTRAN code used to read the file is shown below:

   open(nunit,file=windfile,status='old')
   read(nunit,*) !skip header 
 11 format(t6,i4,t16,i4)
   read(nunit,11) nwindi, nwindj
   backspace(nunit)
 !...
 13 format(68x,I4,4(I2)) 
   read(wunit,13,end=333,err=333) iyear,imonth,iday,ihour,imin
 !...
 12 format(8f10.0)   
   read(wunit,12,end=333,err=333) ((wndspdx(i,j),j=1,nwindj),i=1,nwindi)
   read(wunit,12,end=333,err=333) ((wndspdy(i,j),j=1,nwindj),i=1,nwindi)
 !...
 333 close(wunit)

Wind Forcing