NOAA-EMC / WW3

WAVEWATCH III
Other
254 stars 501 forks source link

Assistance with Converting ERA5 & WRF Model Simulated Wind Fields to WW3 Input Format #1256

Open CHARANJULURI opened 2 weeks ago

CHARANJULURI commented 2 weeks ago

Dear WW3 Community,

I hope this message finds you well. My name is Charan Kumar, and I am reaching out to seek your assistance with a technical issue I am currently facing.

I am working on a project that involves running the WaveWatch III (WW3) model using real forcing fields from ERA5 and WRF model-simulated wind data. I have the wind fields in .nc (NetCDF) format and need to convert them into a compatible format for .ww3 specifically for use with the ww3_prnc pre-processing tool.

Despite my efforts, I have encountered errors when directly importing the wind files in .nc format into WW3. Therefore, I am seeking guidance or tools that could facilitate this conversion process.

Error Details: image

[(base) [las@localhost work]$ ./ww3_prnc

             *** WAVEWATCH III  Input pre-processing ***
           ===============================================

Grid name : NIO

Description of inputs

   Input type        : winds
   Format type       : long.-lat. grid
      Field conserves velocity.
   Start time        : 2020/05/10 00:00:00 UTC
   Stop time         : 2020/05/10 03:00:00 UTC

       File name         : ./input/May-2020-Wind.nc
       Dimension along x : longitude
       Dimension along y : latitude
       Field component 1 : u10
       Field component 2 : v10

*** WAVEWATCH III ERROR IN W3PRNC : LATITUDE VALUES MUST BE REVERSED EXAMPLE: ncpdq -h -O -a -lat file.nc

(base) [las@localhost work]$ ncpdq -h -O -a -lat input/May-2020-Wind.nc bash: ncpdq: command not found...]

Request: Could you please provide any available codes, software, or guidance on how to successfully convert the wind fields from .nc format to the required wind.ww3 format for use with ww3_prnc?

Your assistance in resolving this issue would be greatly appreciated. Thank you for your time and attention to this matter.

Yours faithfully, J. Charan Kumar

aliabdolali commented 2 weeks ago

you need cdo package to do ncpdq -h -O -a -lat input/May-2020-Wind.nc

CHARANJULURI commented 2 weeks ago

Thank you for addressing my issue, sir. I am currently facing difficulties in using the cdo package. If there are any alternative sources or codes available to convert the .nc file to .ww3 format or directly incorporate it into the ww3 model, I would greatly appreciate any assistance in this matter.

CarstenHansen commented 2 weeks ago

@aliabdolali is pointing out that you encounter a bash shell error because you have no path to the NCO program ncpdq. An installation guidance for the NCO package is given here: https://nco.sourceforge.net/#bld . An alternative is the cdo program, which has an operator -invertlat that can do the same conversion of the latitude order in the netCDF file for ww3_prnc. I find the CDO package very useful for this kind of work - maybe you could try harder to obtain a new installation?