NETCDF_OPEN - unable to open existing NetCDF file.

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
lliu
Posts: 5
Joined: Wed Jul 03, 2013 2:12 pm
Location: Stony Brook University

NETCDF_OPEN - unable to open existing NetCDF file.

#1 Unread post by lliu »

I have run into a problem regarding a real tidal experiment and I describe the problem in the follow. I appreciate any of your advice in helping me solve this problem. Thank you.

I prepared the wind and tidal forcing in netcdf files. This is from the ocean.in file for my input tidal and wind forcing:

NFFILES == 2 ! number of unique forcing files
FRCNAME == LIS_wind.nc \
tide_forcing.nc ! forcing file 1, grid 1
----------------------------------------------------------------------
And my configuration file is:

#define UV_ADV
#define UV_COR
#define UV_LDRAG
#define SOLVE3D
#define SALINITY
#define NONLIN_EOS

#ifdef SOLVE3D
# define TS_U3HADVECTION
# define TS_C4VADVECTION
# undef TS_MPDATA
#endif
#ifdef SOLVE3D
# define DJ_GRADPS
#endif

#define SPLINES
#undef CURVGRID
#define MASKING

/* tides */
#define SSH_TIDES
#define UV_TIDES
#define ADD_FSOBC
#define ADD_M2OBC

#define AVERAGES
#define AVERAGES_AKV
#define DIAGNOSTICS_TS
#define DIAGNOSTICS_UV

/* Surface and bottom boundary */
#define ANA_SMFLUX
#define ANA_STFLUX
#define ANA_SSFLUX
#define ANA_BTFLUX
#define ANA_BSFLUX
#define EAST_FSCHAPMAN /* use if free-surface Chapman condition*/
#define EAST_M2FLATHER /* use if 2D momentum Flather condition*/
#undef EAST_M3RADIATION /* use if 3D momentum radiation condition*/
#undef EAST_TRADIATION

/* Turbulence Closure */
#define MY25_MIXING
#define N2S2_HORAVG
#define KANTHA_CLAYSON
---------------------------------------------------------------------------------------
The .out file shows the problem is:

NETCDF_OPEN - unable to open existing NetCDF file:
tide_forcing.nc
call from: inp_par.F, find_file
---------------------------------------------------------------------------------
My tide_forcing.nc includes tidal period, longitudes and latitudes of boundary points, Ephase, Eamp, Cphase, Cangle, Cmin and Cmax calculated by OTPS for the boundary points. I don’t understand why it cannot open tide.forcing.nc. Btw, I did specify the lateral boundary condition keyword as follow, and it also asked for the BRYNAME, so if I have only tidal forcing at boundary, is this file BRYNAME necessary since I have already specified the tidal forcing for the input forcing?

LBC(isFsur) == Cha Cha Cha Cha ! free-surface
LBC(isUbar) == Fla Fla Fla Fla ! 2D U-momentum
LBC(isVbar) == Fla Fla Fla Fla ! 2D V-momentum
LBC(isUvel) == Per Clo Per Clo ! 3D U-momentum
LBC(isVvel) == Per Clo Per Clo ! 3D V-momentum
LBC(isMtke) == Per Clo Per Clo ! mixing TKE

LBC(isTvar) == Per Clo Per Clo \ ! temperature
Per Clo Per Clo ! salinity

Thank you again for reading my question and I appreciate your help!
Attachments
LIS_wind.nc
This is the input wind forcing file with constant wind speed.
(1.61 MiB) Downloaded 279 times
tide_forcing.nc
This is the input boundary tidal forcing file with tidal parameters estimated by OTPS at the side boundaries.
(4.05 KiB) Downloaded 279 times

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: NETCDF_OPEN - unable to open existing NetCDF file.

#2 Unread post by kate »

There are several things here:
* The tides forcing file needs to have the tides for all the points in the domain, not simply the boundary.
* That doesn't explain why ROMS couldn't open it. It would give a different error when finding a mismatch for eta_rho. Failure to open can be the wrong file path or the wrong file permissions.
* I believe the recommended way to have only tidal boundary conditions is to use ADD_FSOBC (as you have), adding them to analytic boundary conditions of zero amplitude for the non-tidal flow. You would therefore also need ANA_FSOBC, similar for ANA_M2OBC.

lliu
Posts: 5
Joined: Wed Jul 03, 2013 2:12 pm
Location: Stony Brook University

Re: NETCDF_OPEN - unable to open existing NetCDF file.

#3 Unread post by lliu »

Thank you, Kate! Will try to figure it out.

lliu
Posts: 5
Joined: Wed Jul 03, 2013 2:12 pm
Location: Stony Brook University

Re: NETCDF_OPEN - unable to open existing NetCDF file.

#4 Unread post by lliu »

Kate, I have finally input tidal forcing file that ROMS could read. For simplicity, only M2 tidal constituent was put as tidal forcing for entire domain. At open boundaries, zeta, ubar and vbar were all prescribed as zero with 90 days time series. However, the model output M2 has only half of the input amplitude, any idea of the problem? Thank you, I appreciate your answer.

kate wrote:There are several things here:
* The tides forcing file needs to have the tides for all the points in the domain, not simply the boundary.
* That doesn't explain why ROMS couldn't open it. It would give a different error when finding a mismatch for eta_rho. Failure to open can be the wrong file path or the wrong file permissions.
* I believe the recommended way to have only tidal boundary conditions is to use ADD_FSOBC (as you have), adding them to analytic boundary conditions of zero amplitude for the non-tidal flow. You would therefore also need ANA_FSOBC, similar for ANA_M2OBC.

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: NETCDF_OPEN - unable to open existing NetCDF file.

#5 Unread post by kate »

Tidal amplitudes are sensitive to many things, including horizontal viscosity, bottom drag, etc.

lliu
Posts: 5
Joined: Wed Jul 03, 2013 2:12 pm
Location: Stony Brook University

Re: NETCDF_OPEN - unable to open existing NetCDF file.

#6 Unread post by lliu »

Thanks for your kind reply! I did test to change bottom drag coefficient and viscosity, but it seems they did not affect tidal amplitudes a lot... The current RDRG2 is 3.0d-3
kate wrote:Tidal amplitudes are sensitive to many things, including horizontal viscosity, bottom drag, etc.

Post Reply