unable to find requested variable

Sediment modeling collaborators: issues, applications, information exchange

Moderators: arango, robertson, rsignell

Post Reply
Message
Author
phamsymt
Posts: 26
Joined: Fri May 09, 2008 3:21 pm
Location: center for environment

unable to find requested variable

#1 Unread post by phamsymt »

Dear Guys

I switch on Sediment with only "define SUSPLOAD". ROMS asked me to provide mud_01_sflux & sand_01_sflux in forcing files. However, after providing them, ROMS gives me the error report " INQUIRE - unable to find requested variable: in files roms_blk.nc and roms_frc.nc". Could anyone tell me what kind of lacking variables I have to continuously provide because here ROMS did not specify the name of variables ?

In addition, I have one more question that. The mud & sand flux providing in forcing files (blk or frc) are in 2D, for example mud_01_sflux(ocean_time,eta_rho,xi_rho). Therefore, It seems to be the source at only surface. So, if I get a source which release mud & sand at deep (100m or 300m) How can I put it for ROMS?

I highly appreciate if anyone could help me figure out it

nacholibre
Posts: 81
Joined: Thu Dec 07, 2006 3:14 pm
Location: USGS
Contact:

Re: unable to find requested variable

#2 Unread post by nacholibre »

It sounds to me like you are not providing mud_01_sflux & sand_01_sflux at all layers (maybe that's why you see a 2D forcing in your forcing files?).
Zafer

phamsymt
Posts: 26
Joined: Fri May 09, 2008 3:21 pm
Location: center for environment

Re: unable to find requested variable

#3 Unread post by phamsymt »

It is right. I provided mud_01_sflux & sand_01_sflux in 2D. However, if I provide them in 3D (mud_01_sflux(ocean_time,s_rho,eta_rho,xi_rho). Please see the attached files "create_forcing.m". ROMS showed error as

" - error while reading variable: mud_01_sflux at TIME index= ...
...
ERROR:Abnormal terminnation: NetCDF INPUT.
REASON: NetCDF: Index exceeds dimension bound "


Could anyone give me the "create_forcing.m" for reference ?

Thank you very much
Attachments
create_forcing.m
(6.83 KiB) Downloaded 407 times

phamsymt
Posts: 26
Joined: Fri May 09, 2008 3:21 pm
Location: center for environment

Re: unable to find requested variable

#4 Unread post by phamsymt »

As following the above error. I ran ROMS with USE_DEBUG. It gave me the following error (please see more detail in file "ocean_basin.log" :

" GET_2DFLD - dye concentration, type 01, surface flux, t = 245 04:59:57
(Rec=0000126, Index=1, File: roms_frc_eez_09.nc)
(Tmin= 240.0000 Tmax= 245.2083)
0: Subscript out of range for array ncfrcid (get_data.f90: 234)
subscript=0, lower bound=1, upper bound=1300, dimension=1 "

It seem to me that my array is too large, then leading to out of range for array. However, as I understand my array (for example dye_01_sflux(126,118,156)) is not so large. Is there any wrong here?

For checking convenience, I upload some main files including: basin.h, ocean_basin.in, ocean_basin.log and create_forcing.m which put some variables (mud_01_sflux, sand_01_sflux and dye_01_flux) into forcing file.

I highly appreciate any suggestion
Attachments
create_forcing.m
(8.08 KiB) Downloaded 396 times
ocean_basin.log
(33.47 KiB) Downloaded 370 times
ocean_basin.in
(117.03 KiB) Downloaded 386 times
basin.h
(2.32 KiB) Downloaded 367 times

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

Re: unable to find requested variable

#5 Unread post by kate »

You may be the first to try to apply a surface flux on a dye variable. Tracer surface fluxes are in idTsur, but I only see entries for idTsur(itemp) and idTsur(isalt) in varinfo.dat and the file that reads it (mod_ncparam.F). There are dye entries for initial conditions, boundary conditions and river tracers.

Your zero means it doesn't have a valid number for that field - the valid range is 1 to 1300.

nacholibre
Posts: 81
Joined: Thu Dec 07, 2006 3:14 pm
Location: USGS
Contact:

Re: unable to find requested variable

#6 Unread post by nacholibre »

The forcing field should have the dimensions of the boundary that you are applying it plus the time dimension. For example, to apply sediment concentration at an eastern boundary it looks something like this:

Code: Select all

nc_forc{'sand_east_01'} = ncdouble('sand_time','layers','eta_rho');
nc_forc{'sand_east_01'}.long_name = ncchar('3D sand 01 eastern boundary condition');
nc_forc{'sand_east_01'}.units = ncchar('kilogram meter-3');
nc_forc{'sand_east_01'}.field = ncchar('sand_east_01, scalar, series');
It seems like you are applying everything at the surface or at the bottom boundary at the moment. Are you actually trying to apply dye as a surface flux? Because it is usually more common to apply it at a lateral boundary (e.g. East, West, etc.) or as a point source. You should also check out the User Guide and the Matlab scripts at Wiki ROMS pages, you can find a lot of useful information there too.
Zafer

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

Re: unable to find requested variable

#7 Unread post by kate »

You should be able to apply a dye surface flux, but you will have to add the management of idTsur(inert(*)) to varinfo.dat and to mod_ncparam.F.

phamsymt
Posts: 26
Joined: Fri May 09, 2008 3:21 pm
Location: center for environment

Re: unable to find requested variable

#8 Unread post by phamsymt »

Many thanks for your nice comments, Kate and Zafer. They help me understand a lot. My original aim is simply to simulate the sediment transport and tracking dye. However, ROMS gave me some error on requested variables including mud_01_sflux, sand_01_sflux and dye_01_sflux in the forcing file. Therefore, I tried to supply these variables. Because of lacking experience, I might do some thing wrongly, leading every thing in a mess. Therefore, they made you confused. I am sorry about that.

Now, every thing is fine when I switch on ANA_BPFLUX (#define ANA_BPFLUX). ROMS does not request mud_01_sflux, sand_01_sflux and dye_01_sflux, and runs fluently

However, I still do not understand that, why in case of I switch off ANA_BPLUX, ROMS requests mud_01_sflux,...? and why ROMS requested mud_01_sflux instead of mud_01, because "_sflux" is suffix ?. And when I provided mud_01_sflux, ROMS only recognized its name but not its dimension although I provided these variables in (time,layer,eta_rho),(time,eta_rho,xi_rho)?

nacholibre
Posts: 81
Joined: Thu Dec 07, 2006 3:14 pm
Location: USGS
Contact:

Re: unable to find requested variable

#9 Unread post by nacholibre »

The model needs boundary conditions to work, let it be defined analytically or read through files. If the ana_### switch is not turned on it will try to read it from a forcing file. mud_01 is a part of lateral boundary conditions, mud_01_bflux is a part of bottom boundary condition. mud_01 is a tracer concentration value, mud_01_bflux is a tracer flux value.
Zafer

phamsymt
Posts: 26
Joined: Fri May 09, 2008 3:21 pm
Location: center for environment

Re: unable to find requested variable

#10 Unread post by phamsymt »

Thanks for your nice explanation, Zafer. It clearly makes sense to me

Post Reply