SOURCE POINT FOR RIVER RUNOFF (topic locked)
SOURCE POINT FOR RIVER RUNOFF (topic locked)
Hi romsusers,
i am in the process of run roms in a real case. I have the grid made with seagrid. In the first run i want to try with tidal forcing and river runoff by analytical mode.
following the wikiroms i've tried to define some variables in the ana_psource.h file as well as activate the cpp's below in my my_case.h
#define ANA_FSOBC /*Analytical free surface boundary condition*/
#define ANA_PSOURCE /*use if analytical point Sources/Sinks */
i set in ana_psource.h the following
#elif defined MY_CASE
Nsrc=1
Dsrc(Nsrc)=0.0_r8
Isrc(Nsrc)=1
Jsrc(Nsrc)=50
......
......
......
! Set-up vertically integrated mass transport (m3/s) of point
! Sources/Sinks (positive in the positive U- or V-direction and
! viceversa).
!
.......
.......
.......
!$OMP BARRIER
#elif defined MY_CASE
Qbar=50
i get the following error.
fortcom: Error: radiation_stress.f90, line 253: This name has not been declared as an array or a function. [SXY_PSI]
Sxy_psi(i,j)=0.25_r8*(Sxyl(i-1,j-1)+Sxyl(i,j-1)+ &
i am not specifying anything about the radiation stress in my my_case.h file. where is this error coming from?
i am in the process of run roms in a real case. I have the grid made with seagrid. In the first run i want to try with tidal forcing and river runoff by analytical mode.
following the wikiroms i've tried to define some variables in the ana_psource.h file as well as activate the cpp's below in my my_case.h
#define ANA_FSOBC /*Analytical free surface boundary condition*/
#define ANA_PSOURCE /*use if analytical point Sources/Sinks */
i set in ana_psource.h the following
#elif defined MY_CASE
Nsrc=1
Dsrc(Nsrc)=0.0_r8
Isrc(Nsrc)=1
Jsrc(Nsrc)=50
......
......
......
! Set-up vertically integrated mass transport (m3/s) of point
! Sources/Sinks (positive in the positive U- or V-direction and
! viceversa).
!
.......
.......
.......
!$OMP BARRIER
#elif defined MY_CASE
Qbar=50
i get the following error.
fortcom: Error: radiation_stress.f90, line 253: This name has not been declared as an array or a function. [SXY_PSI]
Sxy_psi(i,j)=0.25_r8*(Sxyl(i-1,j-1)+Sxyl(i,j-1)+ &
i am not specifying anything about the radiation stress in my my_case.h file. where is this error coming from?
Re: SOURCE POINT FOR RIVER RUNOFF
The problem go out when i define the tide also analyticaly:
my .h file:
#define WEST_FSGRADIENT /* Free surface gradient condition*/
the file ana_fsobc.h i just copy the same that inlet_test_case
#elif defined MY_CASE
fac=1.0_r8 ! zeta0
omega=2.0_r8*pi/(12.42_r8*3600.0_r8) ! M2 Tide period
# ifdef WEST_FSOBC
IF (WESTERN_EDGE) THEN
DO j=JstrR,JendR
val=fac*EXP(-GRID(ng)%f(Istr-1,j)*GRID(ng)%yp(Istr-1,j)/ &
& SQRT(g*GRID(ng)%h(Istr-1,j)))
BOUNDARY(ng)%zeta_west(j)=val*COS(omega*time(ng))
END DO
END IF
# endif
ROMS compile but when i try to run the model nothing seems happening
./oceanS
Process Information:
Thread # 0 (pid= 19450) is active.
Model Input Parameters: ROMS/TOMS version 3.4
Monday - April 18, 2011 - 7:27:11 PM
-----------------------------------------------------------------------------
thanks in advance.
my .h file:
#define WEST_FSGRADIENT /* Free surface gradient condition*/
the file ana_fsobc.h i just copy the same that inlet_test_case
#elif defined MY_CASE
fac=1.0_r8 ! zeta0
omega=2.0_r8*pi/(12.42_r8*3600.0_r8) ! M2 Tide period
# ifdef WEST_FSOBC
IF (WESTERN_EDGE) THEN
DO j=JstrR,JendR
val=fac*EXP(-GRID(ng)%f(Istr-1,j)*GRID(ng)%yp(Istr-1,j)/ &
& SQRT(g*GRID(ng)%h(Istr-1,j)))
BOUNDARY(ng)%zeta_west(j)=val*COS(omega*time(ng))
END DO
END IF
# endif
ROMS compile but when i try to run the model nothing seems happening
./oceanS
Process Information:
Thread # 0 (pid= 19450) is active.
Model Input Parameters: ROMS/TOMS version 3.4
Monday - April 18, 2011 - 7:27:11 PM
-----------------------------------------------------------------------------
thanks in advance.
Re: SOURCE POINT FOR RIVER RUNOFF
Just typing "./oceanS" doesn't do much because it's looking for stuff on standard in. You need "./oceanS < ocean_case.in". For MPI, it's "./oceanM ocean_case.in".
Re: SOURCE POINT FOR RIVER RUNOFF
It is running, but i get errors related about .nc files.
READ_PHYPAR - could not find input file: ocean_ini.nc
i solved setting #define ANA_INITIAL /*Use if analytical initial conditions*/
READ_PHYPAR - could not find input file: ocean_frc.nc
i tried to put NFFILES=0 but i got the error
READ_PHYPAR - Invalid input parameter, NFFILES
Must be equal or greater than one.
is there the options to specify friction in analytical way as initial condition? or how could i avoid to specify friction in the system? don't find the options in the ANA cpp's.
thanks in advance.
READ_PHYPAR - could not find input file: ocean_ini.nc
i solved setting #define ANA_INITIAL /*Use if analytical initial conditions*/
READ_PHYPAR - could not find input file: ocean_frc.nc
i tried to put NFFILES=0 but i got the error
READ_PHYPAR - Invalid input parameter, NFFILES
Must be equal or greater than one.
is there the options to specify friction in analytical way as initial condition? or how could i avoid to specify friction in the system? don't find the options in the ANA cpp's.
thanks in advance.
Re: SOURCE POINT FOR RIVER RUNOFF
It is asking for a forcing file rather than a friction file. If you want zero wind forcing, you have to specify ANA_SMFLUX. Same for ANA_BTFLUX for zero bottom temperature flux. And so on. You need to provide surface and bottom fluxes of stress, salt and temperature, one way or another.
Re: SOURCE POINT FOR RIVER RUNOFF
here again. i've been off.
thanks for reply, i will try.
thanks for reply, i will try.
Re: SOURCE POINT FOR RIVER RUNOFF
Hi, i put the following commands in the header file
#define ANA_SMFLUX /*use if analytical surface momentum stress*/
#define ANA_SSFLUX /*use if analytical surface salinity flux*/
#define ANA_STFLUX /*use if analytical surface temperature flux*/
/*fluxes in the bottom*/
#define ANA_BSFLUX /*use if analytical bottom salinity flux*/
#define ANA_BTFLUX /*use if analytical bottom temperature flux*/
i am getting this error
READ_PHYPAR - could not find input file:
please you'd see below
[dnavidad@darkstar guadalquivir_ROMS]$ ./oceanS < ocean_guadalquivir.in
GUADALQUIVIR 1test
Operating system : Linux
CPU/hardware : x86_64
Compiler system : ifort
Compiler command : /opt/intel/fce/10.0.023/bin/ifort
Compiler flags : -heap-arrays -fp-model precise -ip -O3 -xW -free
SVN Root URL : https://www.myroms.org/svn/src/trunk
SVN Revision : 539M
Local Root : /home/dnavidad/ROMS/src
Header Dir : /home/dnavidad/ROMS/PROJECTS/guadalquivir_ROMS
Header file : guadalquivir.h
Analytical Dir: /home/dnavidad/ROMS/src/ROMS/Functionals
Resolution, Grid 01: 0041x0080x016, Parallel Threads: 1, Tiling: 001x001
Physical Parameters, Grid: 01
=============================
1440 ntimes Number of timesteps for 3-D equations.
300.000 dt Timestep size (s) for 3-D equations.
30 ndtfast Number of timesteps for 2-D equations between
each 3D timestep.
1 ERstr Starting ensemble/perturbation run number.
1 ERend Ending ensemble/perturbation run number.
0 nrrec Number of restart records to read from disk.
T LcycleRST Switch to recycle time-records in restart file.
288 nRST Number of timesteps between the writing of data
into restart fields.
1 ninfo Number of timesteps between print of information
to standard output.
T ldefout Switch to create a new output NetCDF file(s).
72 nHIS Number of timesteps between the writing fields
into history file.
5.0000E+00 nl_visc2 NLM Horizontal, harmonic mixing coefficient
(m2/s) for momentum.
3.0000E-04 rdrg Linear bottom drag coefficient (m/s).
3.0000E-03 rdrg2 Quadratic bottom drag coefficient.
2.0000E-02 Zob Bottom roughness (m).
1025.000 rho0 Mean density (kg/m3) for Boussinesq approximation.
0.000 dstart Time-stamp assigned to model initialization (days).
0.00 time_ref Reference time for units attribute (yyyymmdd.dd)
0.0000E+00 Znudg Nudging/relaxation time scale (days)
for free-surface.
0.0000E+00 M2nudg Nudging/relaxation time scale (days)
for 2D momentum.
0.0000E+00 obcfac Factor between passive and active
open boundary conditions.
1.000 gamma2 Slipperiness variable: free-slip (1.0) or
no-slip (-1.0).
T Hout(idFsur) Write out free-surface.
T Hout(idUbar) Write out 2D U-momentum component.
T Hout(idVbar) Write out 2D V-momentum component.
Output/Input Files:
Output Restart File: ocean_rst.nc
Output History File: ocean_his.nc
Input Grid File: ocean_grd_guadalquivir.nc
READ_PHYPAR - could not find input file:
Elapsed CPU time (seconds):
Thread # 0 CPU: 0.025
Total: 0.025
Nonlinear model elapsed time profile:
Total: 0.000 0.0000
All percentages are with respect to total time = 0.025
ROMS/TOMS - Output NetCDF summary for Grid 01:
ROMS/TOMS - I/O error ............... exit_flag: 4
ERROR: I/O related problem.
#define ANA_SMFLUX /*use if analytical surface momentum stress*/
#define ANA_SSFLUX /*use if analytical surface salinity flux*/
#define ANA_STFLUX /*use if analytical surface temperature flux*/
/*fluxes in the bottom*/
#define ANA_BSFLUX /*use if analytical bottom salinity flux*/
#define ANA_BTFLUX /*use if analytical bottom temperature flux*/
i am getting this error
READ_PHYPAR - could not find input file:
please you'd see below
[dnavidad@darkstar guadalquivir_ROMS]$ ./oceanS < ocean_guadalquivir.in
GUADALQUIVIR 1test
Operating system : Linux
CPU/hardware : x86_64
Compiler system : ifort
Compiler command : /opt/intel/fce/10.0.023/bin/ifort
Compiler flags : -heap-arrays -fp-model precise -ip -O3 -xW -free
SVN Root URL : https://www.myroms.org/svn/src/trunk
SVN Revision : 539M
Local Root : /home/dnavidad/ROMS/src
Header Dir : /home/dnavidad/ROMS/PROJECTS/guadalquivir_ROMS
Header file : guadalquivir.h
Analytical Dir: /home/dnavidad/ROMS/src/ROMS/Functionals
Resolution, Grid 01: 0041x0080x016, Parallel Threads: 1, Tiling: 001x001
Physical Parameters, Grid: 01
=============================
1440 ntimes Number of timesteps for 3-D equations.
300.000 dt Timestep size (s) for 3-D equations.
30 ndtfast Number of timesteps for 2-D equations between
each 3D timestep.
1 ERstr Starting ensemble/perturbation run number.
1 ERend Ending ensemble/perturbation run number.
0 nrrec Number of restart records to read from disk.
T LcycleRST Switch to recycle time-records in restart file.
288 nRST Number of timesteps between the writing of data
into restart fields.
1 ninfo Number of timesteps between print of information
to standard output.
T ldefout Switch to create a new output NetCDF file(s).
72 nHIS Number of timesteps between the writing fields
into history file.
5.0000E+00 nl_visc2 NLM Horizontal, harmonic mixing coefficient
(m2/s) for momentum.
3.0000E-04 rdrg Linear bottom drag coefficient (m/s).
3.0000E-03 rdrg2 Quadratic bottom drag coefficient.
2.0000E-02 Zob Bottom roughness (m).
1025.000 rho0 Mean density (kg/m3) for Boussinesq approximation.
0.000 dstart Time-stamp assigned to model initialization (days).
0.00 time_ref Reference time for units attribute (yyyymmdd.dd)
0.0000E+00 Znudg Nudging/relaxation time scale (days)
for free-surface.
0.0000E+00 M2nudg Nudging/relaxation time scale (days)
for 2D momentum.
0.0000E+00 obcfac Factor between passive and active
open boundary conditions.
1.000 gamma2 Slipperiness variable: free-slip (1.0) or
no-slip (-1.0).
T Hout(idFsur) Write out free-surface.
T Hout(idUbar) Write out 2D U-momentum component.
T Hout(idVbar) Write out 2D V-momentum component.
Output/Input Files:
Output Restart File: ocean_rst.nc
Output History File: ocean_his.nc
Input Grid File: ocean_grd_guadalquivir.nc
READ_PHYPAR - could not find input file:
Elapsed CPU time (seconds):
Thread # 0 CPU: 0.025
Total: 0.025
Nonlinear model elapsed time profile:
Total: 0.000 0.0000
All percentages are with respect to total time = 0.025
ROMS/TOMS - Output NetCDF summary for Grid 01:
ROMS/TOMS - I/O error ............... exit_flag: 4
ERROR: I/O related problem.
Re: SOURCE POINT FOR RIVER RUNOFF
This kind of thing needs either a debugger or print statements. You need to find out what file it's looking for.
- jivica
- Posts: 172
- Joined: Mon May 05, 2003 2:41 pm
- Location: The University of Western Australia, Perth, Australia
- Contact:
Re: SOURCE POINT FOR RIVER RUNOFF
If you do not want to use any forcing file than simply leave it clear:
This means that all needed forcing should be done through ANA_
Cheers,
Ivica
And that should do, do not put any number like 0.NFFILES == ! number of forcing files
FRCNAME ==
This means that all needed forcing should be done through ANA_
Cheers,
Ivica
Re: SOURCE POINT FOR RIVER RUNOFF
oh, thanks.
that's what i want. really i tried to put 0, but didn't work.
let me try.
Many many thanks.
that's what i want. really i tried to put 0, but didn't work.
let me try.
Many many thanks.
Re: SOURCE POINT FOR RIVER RUNOFF
i've got this error when i try to compile, with
cd /home/dnavidad/ROMS/PROJECTS/guadalquivir_ROMS/Build; /opt/intel/fce/10.0.023/bin/ifort -c -heap-arrays -fp-model precise -ip -O3 -xW -free analytical.f90
fortcom: Error: analytical.f90, line 594: This is not a field name that is defined in the encompassing structure. [STFLX]
& FORCES(ng) % stflx)
-----------------------------------------^
fortcom: Error: analytical.f90, line 594: The shape matching rules of actual arguments and dummy arguments have been violated. [STFLX]
& FORCES(ng) % stflx)
-----------------------------------------^
compilation aborted for analytical.f90 (code 1)
make: *** [/home/dnavidad/ROMS/PROJECTS/guadalquivir_ROMS/Build/analytical.o] Error 1
cd /home/dnavidad/ROMS/PROJECTS/guadalquivir_ROMS/Build; /opt/intel/fce/10.0.023/bin/ifort -c -heap-arrays -fp-model precise -ip -O3 -xW -free mod_sources.f90NFFILES == ! number of forcing files
FRCNAME ==
cd /home/dnavidad/ROMS/PROJECTS/guadalquivir_ROMS/Build; /opt/intel/fce/10.0.023/bin/ifort -c -heap-arrays -fp-model precise -ip -O3 -xW -free analytical.f90
fortcom: Error: analytical.f90, line 594: This is not a field name that is defined in the encompassing structure. [STFLX]
& FORCES(ng) % stflx)
-----------------------------------------^
fortcom: Error: analytical.f90, line 594: The shape matching rules of actual arguments and dummy arguments have been violated. [STFLX]
& FORCES(ng) % stflx)
-----------------------------------------^
compilation aborted for analytical.f90 (code 1)
make: *** [/home/dnavidad/ROMS/PROJECTS/guadalquivir_ROMS/Build/analytical.o] Error 1
Re: SOURCE POINT FOR RIVER RUNOFF
The only thing that would hide stflx from the FORCES structure should be if you fail to #define SOLVE3D.
Re: SOURCE POINT FOR RIVER RUNOFF
hit the target!
that was the problem. now i can compile it, but i still have problem with the analytical bottom stress formulation. i don't find the command in the cppdefs. is it ANA_BPFLUX? this is for tracers, isn't?
thanks.
that was the problem. now i can compile it, but i still have problem with the analytical bottom stress formulation. i don't find the command in the cppdefs. is it ANA_BPFLUX? this is for tracers, isn't?
thanks.
Re: SOURCE POINT FOR RIVER RUNOFF
i found in the forum
ANA_DRAG
but not in the "Options_for_analytical_fields_configuration" in the wikiroms.
i don't have problem about the analytical configuration now. I have the following error regarding the grid file. I made this file with seagrid.
.......
INITIAL: Configuring and initializing forward nonlinear model ...
NETCDF_OPEN - unable to open existing NetCDF file:
ocean_grd_guadalquivir.nc
call from: get_grid.F
thanks.
ANA_DRAG
but not in the "Options_for_analytical_fields_configuration" in the wikiroms.
i don't have problem about the analytical configuration now. I have the following error regarding the grid file. I made this file with seagrid.
.......
INITIAL: Configuring and initializing forward nonlinear model ...
NETCDF_OPEN - unable to open existing NetCDF file:
ocean_grd_guadalquivir.nc
call from: get_grid.F
thanks.
Re: SOURCE POINT FOR RIVER RUNOFF
Is that file in your current directory? Do you have read permission on it?
Re: SOURCE POINT FOR RIVER RUNOFF
yes, i should have. let me check.
i thought about something wrong with seagrid.
thanks.
i thought about something wrong with seagrid.
thanks.
Re: SOURCE POINT FOR RIVER RUNOFF
[dnavidad@darkstar guadalquivir_ROMS]$ ls
Build build.bash guadalquivir.h ocean_grd_guadalquivir.nc ocean_guadalquivir.in oceanS varinfo.dat
and i also have the permissions
[dnavidad@darkstar guadalquivir_ROMS]$ ll ocean_grd_guadalquivir.nc
-rw-r--r-- 1 dnavidad kirby 538576 Apr 15 11:00 ocean_grd_guadalquivir.nc
thanks
Build build.bash guadalquivir.h ocean_grd_guadalquivir.nc ocean_guadalquivir.in oceanS varinfo.dat
and i also have the permissions
[dnavidad@darkstar guadalquivir_ROMS]$ ll ocean_grd_guadalquivir.nc
-rw-r--r-- 1 dnavidad kirby 538576 Apr 15 11:00 ocean_grd_guadalquivir.nc
thanks
Re: SOURCE POINT FOR RIVER RUNOFF
Then it's a mystery and you need to find out what the netcdf error code is on that open function call. I like to add this statement to the error block for (status.ne.nf90_noerr):
Note that this is in mod_netcdf.F.
Code: Select all
PRINT *, trim(nf90_strerror(status))
Re: SOURCE POINT FOR RIVER RUNOFF
thank.
this is the only message i get (note i changed the name of .nc file)
NETCDF_OPEN - unable to open existing NetCDF file:
ocean_grd.nc
call from: get_grid.F
......
......
ERROR: Abnormal termination: NetCDF OUTPUT.
REASON: Not a netCDF file
Do you think there is somenthing wrong in the format of the file? something wrong in the process of generation of the grid with seagrid?
this is the only message i get (note i changed the name of .nc file)
NETCDF_OPEN - unable to open existing NetCDF file:
ocean_grd.nc
call from: get_grid.F
......
......
ERROR: Abnormal termination: NetCDF OUTPUT.
REASON: Not a netCDF file
Do you think there is somenthing wrong in the format of the file? something wrong in the process of generation of the grid with seagrid?
Re: SOURCE POINT FOR RIVER RUNOFF
thank.
this is the only message i get (note i changed the name of .nc file)
NETCDF_OPEN - unable to open existing NetCDF file:
ocean_grd.nc
call from: get_grid.F
......
......
ERROR: Abnormal termination: NetCDF OUTPUT.
REASON: Not a netCDF file
Do you think there is somenthing wrong in the format of the file? something wrong in the process of generation of the grid with seagrid?
this is the only message i get (note i changed the name of .nc file)
NETCDF_OPEN - unable to open existing NetCDF file:
ocean_grd.nc
call from: get_grid.F
......
......
ERROR: Abnormal termination: NetCDF OUTPUT.
REASON: Not a netCDF file
Do you think there is somenthing wrong in the format of the file? something wrong in the process of generation of the grid with seagrid?
- arango
- Site Admin
- Posts: 1356
- Joined: Wed Feb 26, 2003 4:41 pm
- Location: DMCS, Rutgers University
- Contact:
Re: SOURCE POINT FOR RIVER RUNOFF
Well, that is it. You mentioned above that your grid file is ocean_grd_guadalquivir.nc and not ocean_grd.in. You need to put the right file name in your ocean.in.
- jivica
- Posts: 172
- Joined: Mon May 05, 2003 2:41 pm
- Location: The University of Western Australia, Perth, Australia
- Contact:
Re: SOURCE POINT FOR RIVER RUNOFF
give us:
ncdump -h your_grid_file.nc
hope you used seagrid2roms.m because seagrid is giving you .mat file
cheers,
Ivica
ncdump -h your_grid_file.nc
hope you used seagrid2roms.m because seagrid is giving you .mat file
cheers,
Ivica
Re: SOURCE POINT FOR RIVER RUNOFF
hi arango
thanks. No, i did notice that because the file was named ocean_grd_guadalquivir.nc at first,
and now it is named ocean_grd.nc. But in both case the name was indicated in the .in file.
i only change the name, thinking in to get short name.
thanks. No, i did notice that because the file was named ocean_grd_guadalquivir.nc at first,
and now it is named ocean_grd.nc. But in both case the name was indicated in the .in file.
i only change the name, thinking in to get short name.
Re: SOURCE POINT FOR RIVER RUNOFF
Hi Ivica, thanks
First, i could not type your command in matlab2010b
>>ncdump -h roms_grd.nc
??? Undefined function or method 'ncid' for input arguments of type 'double'.
Error in ==> netcdf.netcdf at 432
if ncid(result) >= 0
Error in ==> ncdump at 58
nc = netcdf(theNetCDFFile, 'nowrite');
but, typing only ncdump and select my file from a matlab browser window was ok.
please find below the result for ncdump
%% ncdump('D:\DELAWARE\ROMS\creating_grid\roms_grd.nc') %% Generated 13-May-2011 11:47:45
nc = netcdf('D:\DELAWARE\ROMS\creating_grid\roms_grd.nc', 'noclobber');
if isempty(nc), return, end
%% Global attributes:
nc.type = ncchar(''Gridpak file'');
nc.gridid = ncchar('' '');
nc.history = ncchar(''Created by "seagrid2roms" on 12-May-2011 16:16:48'');
nc.CPP-options = ncchar(''DCOMPLEX, DBLEPREC, NCARG_32, PLOTS,'');
%% Dimensions:
nc('xi_psi') = 49;
nc('xi_rho') = 50;
nc('xi_u') = 49;
nc('xi_v') = 50;
nc('eta_psi') = 49;
nc('eta_rho') = 50;
nc('eta_u') = 50;
nc('eta_v') = 49;
nc('two') = 2;
nc('bath') = 0; %% (record dimension)
%% Variables and attributes:
nc{'xl'} = ncdouble; %% 1 element.
nc{'xl'}.long_name = ncchar(''domain length in the XI-direction'');
nc{'xl'}.units = ncchar(''meter'');
nc{'el'} = ncdouble; %% 1 element.
nc{'el'}.long_name = ncchar(''domain length in the ETA-direction'');
nc{'el'}.units = ncchar(''meter'');
nc{'JPRJ'} = ncchar('two'); %% 2 elements.
nc{'JPRJ'}.long_name = ncchar(''Map projection type'');
nc{'JPRJ'}.option(ME) = ncchar(''Mercator'');
nc{'JPRJ'}.option(ST) = ncchar(''Stereographic'');
nc{'JPRJ'}.option(LC) = ncchar(''Lambert conformal conic'');
nc{'PLAT'} = ncfloat('two'); %% 2 elements.
nc{'PLAT'}.long_name = ncchar(''Reference latitude(s) for map projection'');
nc{'PLAT'}.units = ncchar(''degree_north'');
nc{'PLONG'} = ncfloat; %% 1 element.
nc{'PLONG'}.long_name = ncchar(''Reference longitude for map projection'');
nc{'PLONG'}.units = ncchar(''degree_east'');
nc{'ROTA'} = ncfloat; %% 1 element.
nc{'ROTA'}.long_name = ncchar(''Rotation angle for map projection'');
nc{'ROTA'}.units = ncchar(''degree'');
nc{'JLTS'} = ncchar('two'); %% 2 elements.
nc{'JLTS'}.long_name = ncchar(''How limits of map are chosen'');
nc{'JLTS'}.option(CO) = ncchar(''P1, .. P4 define two opposite corners '');
nc{'JLTS'}.option(MA) = ncchar(''Maximum (whole world)'');
nc{'JLTS'}.option(AN) = ncchar(''Angles - P1..P4 define angles to edge of domain'');
nc{'JLTS'}.option(LI) = ncchar(''Limits - P1..P4 define limits in u,v space'');
nc{'P1'} = ncfloat; %% 1 element.
nc{'P1'}.long_name = ncchar(''Map limit parameter number 1'');
nc{'P2'} = ncfloat; %% 1 element.
nc{'P2'}.long_name = ncchar(''Map limit parameter number 2'');
nc{'P3'} = ncfloat; %% 1 element.
nc{'P3'}.long_name = ncchar(''Map limit parameter number 3'');
nc{'P4'} = ncfloat; %% 1 element.
nc{'P4'}.long_name = ncchar(''Map limit parameter number 4'');
nc{'XOFF'} = ncfloat; %% 1 element.
nc{'XOFF'}.long_name = ncchar(''Offset in x direction'');
nc{'XOFF'}.units = ncchar(''meter'');
nc{'YOFF'} = ncfloat; %% 1 element.
nc{'YOFF'}.long_name = ncchar(''Offset in y direction'');
nc{'YOFF'}.units = ncchar(''meter'');
nc{'depthmin'} = ncshort; %% 1 element.
nc{'depthmin'}.long_name = ncchar(''Shallow bathymetry clipping depth'');
nc{'depthmin'}.units = ncchar(''meter'');
nc{'depthmax'} = ncshort; %% 1 element.
nc{'depthmax'}.long_name = ncchar(''Deep bathymetry clipping depth'');
nc{'depthmax'}.units = ncchar(''meter'');
nc{'spherical'} = ncchar; %% 1 element.
nc{'spherical'}.long_name = ncchar(''Grid type logical switch'');
nc{'spherical'}.option(T) = ncchar(''spherical'');
nc{'spherical'}.option(F) = ncchar(''Cartesian'');
nc{'hraw'} = ncdouble('bath', 'eta_rho', 'xi_rho'); %% 0 elements.
nc{'hraw'}.long_name = ncchar(''Working bathymetry at RHO-points'');
nc{'hraw'}.units = ncchar(''meter'');
nc{'hraw'}.field = ncchar(''bath, scalar'');
nc{'h'} = ncdouble('eta_rho', 'xi_rho'); %% 2500 elements.
nc{'h'}.long_name = ncchar(''Final bathymetry at RHO-points'');
nc{'h'}.units = ncchar(''meter'');
nc{'h'}.coordinates = ncchar(''lon_rho lat_rho'');
nc{'h'}.field = ncchar(''bath, scalar'');
nc{'f'} = ncdouble('eta_rho', 'xi_rho'); %% 2500 elements.
nc{'f'}.long_name = ncchar(''Coriolis parameter at RHO-points'');
nc{'f'}.units = ncchar(''second-1'');
nc{'f'}.coordinates = ncchar(''lon_rho lat_rho'');
nc{'f'}.field = ncchar(''Coriolis, scalar'');
nc{'pm'} = ncdouble('eta_rho', 'xi_rho'); %% 2500 elements.
nc{'pm'}.long_name = ncchar(''curvilinear coordinate metric in XI'');
nc{'pm'}.units = ncchar(''meter-1'');
nc{'pm'}.field = ncchar(''pm, scalar'');
nc{'pn'} = ncdouble('eta_rho', 'xi_rho'); %% 2500 elements.
nc{'pn'}.long_name = ncchar(''curvilinear coordinate metric in ETA'');
nc{'pn'}.units = ncchar(''meter-1'');
nc{'pn'}.field = ncchar(''pn, scalar'');
nc{'dndx'} = ncdouble('eta_rho', 'xi_rho'); %% 2500 elements.
nc{'dndx'}.long_name = ncchar(''xi derivative of inverse metric factor pn'');
nc{'dndx'}.units = ncchar(''meter'');
nc{'dndx'}.field = ncchar(''dndx, scalar'');
nc{'dmde'} = ncdouble('eta_rho', 'xi_rho'); %% 2500 elements.
nc{'dmde'}.long_name = ncchar(''eta derivative of inverse metric factor pm'');
nc{'dmde'}.units = ncchar(''meter'');
nc{'dmde'}.field = ncchar(''dmde, scalar'');
nc{'x_rho'} = ncdouble('eta_rho', 'xi_rho'); %% 2500 elements.
nc{'x_rho'}.long_name = ncchar(''x location of RHO-points'');
nc{'x_rho'}.units = ncchar(''meter'');
nc{'y_rho'} = ncdouble('eta_rho', 'xi_rho'); %% 2500 elements.
nc{'y_rho'}.long_name = ncchar(''y location of RHO-points'');
nc{'y_rho'}.units = ncchar(''meter'');
nc{'x_psi'} = ncdouble('eta_psi', 'xi_psi'); %% 2401 elements.
nc{'x_psi'}.long_name = ncchar(''x location of PSI-points'');
nc{'x_psi'}.units = ncchar(''meter'');
nc{'y_psi'} = ncdouble('eta_psi', 'xi_psi'); %% 2401 elements.
nc{'y_psi'}.long_name = ncchar(''y location of PSI-points'');
nc{'y_psi'}.units = ncchar(''meter'');
nc{'x_u'} = ncdouble('eta_u', 'xi_u'); %% 2450 elements.
nc{'x_u'}.long_name = ncchar(''x location of U-points'');
nc{'x_u'}.units = ncchar(''meter'');
nc{'y_u'} = ncdouble('eta_u', 'xi_u'); %% 2450 elements.
nc{'y_u'}.long_name = ncchar(''y location of U-points'');
nc{'y_u'}.units = ncchar(''meter'');
nc{'x_v'} = ncdouble('eta_v', 'xi_v'); %% 2450 elements.
nc{'x_v'}.long_name = ncchar(''x location of V-points'');
nc{'x_v'}.units = ncchar(''meter'');
nc{'y_v'} = ncdouble('eta_v', 'xi_v'); %% 2450 elements.
nc{'y_v'}.long_name = ncchar(''y location of V-points'');
nc{'y_v'}.units = ncchar(''meter'');
nc{'lat_rho'} = ncdouble('eta_rho', 'xi_rho'); %% 2500 elements.
nc{'lat_rho'}.long_name = ncchar(''latitude of RHO-points'');
nc{'lat_rho'}.units = ncchar(''degree_north'');
nc{'lon_rho'} = ncdouble('eta_rho', 'xi_rho'); %% 2500 elements.
nc{'lon_rho'}.long_name = ncchar(''longitude of RHO-points'');
nc{'lon_rho'}.units = ncchar(''degree_east'');
nc{'lat_psi'} = ncdouble('eta_psi', 'xi_psi'); %% 2401 elements.
nc{'lat_psi'}.long_name = ncchar(''latitude of PSI-points'');
nc{'lat_psi'}.units = ncchar(''degree_north'');
nc{'lon_psi'} = ncdouble('eta_psi', 'xi_psi'); %% 2401 elements.
nc{'lon_psi'}.long_name = ncchar(''longitude of PSI-points'');
nc{'lon_psi'}.units = ncchar(''degree_east'');
nc{'lat_u'} = ncdouble('eta_u', 'xi_u'); %% 2450 elements.
nc{'lat_u'}.long_name = ncchar(''latitude of U-points'');
nc{'lat_u'}.units = ncchar(''degree_north'');
nc{'lon_u'} = ncdouble('eta_u', 'xi_u'); %% 2450 elements.
nc{'lon_u'}.long_name = ncchar(''longitude of U-points'');
nc{'lon_u'}.units = ncchar(''degree_east'');
nc{'lat_v'} = ncdouble('eta_v', 'xi_v'); %% 2450 elements.
nc{'lat_v'}.long_name = ncchar(''latitude of V-points'');
nc{'lat_v'}.units = ncchar(''degree_north'');
nc{'lon_v'} = ncdouble('eta_v', 'xi_v'); %% 2450 elements.
nc{'lon_v'}.long_name = ncchar(''longitude of V-points'');
nc{'lon_v'}.units = ncchar(''degree_east'');
nc{'mask_rho'} = ncdouble('eta_rho', 'xi_rho'); %% 2500 elements.
nc{'mask_rho'}.long_name = ncchar(''mask on RHO-points'');
nc{'mask_rho'}.option(0) = ncchar(''land'');
nc{'mask_rho'}.option(1) = ncchar(''water'');
nc{'mask_u'} = ncdouble('eta_u', 'xi_u'); %% 2450 elements.
nc{'mask_u'}.long_name = ncchar(''mask on U-points'');
nc{'mask_u'}.option(0) = ncchar(''land'');
nc{'mask_u'}.option(1) = ncchar(''water'');
nc{'mask_v'} = ncdouble('eta_v', 'xi_v'); %% 2450 elements.
nc{'mask_v'}.long_name = ncchar(''mask on V-points'');
nc{'mask_v'}.option(0) = ncchar(''land'');
nc{'mask_v'}.option(1) = ncchar(''water'');
nc{'mask_psi'} = ncdouble('eta_psi', 'xi_psi'); %% 2401 elements.
nc{'mask_psi'}.long_name = ncchar(''mask on PSI-points'');
nc{'mask_psi'}.option(0) = ncchar(''land'');
nc{'mask_psi'}.option(1) = ncchar(''water'');
nc{'angle'} = ncdouble('eta_rho', 'xi_rho'); %% 2500 elements.
nc{'angle'}.long_name = ncchar(''angle between xi axis and east'');
nc{'angle'}.units = ncchar(''radian'');
endef(nc)
close(nc)
thanks.
First, i could not type your command in matlab2010b
>>ncdump -h roms_grd.nc
??? Undefined function or method 'ncid' for input arguments of type 'double'.
Error in ==> netcdf.netcdf at 432
if ncid(result) >= 0
Error in ==> ncdump at 58
nc = netcdf(theNetCDFFile, 'nowrite');
but, typing only ncdump and select my file from a matlab browser window was ok.
please find below the result for ncdump
%% ncdump('D:\DELAWARE\ROMS\creating_grid\roms_grd.nc') %% Generated 13-May-2011 11:47:45
nc = netcdf('D:\DELAWARE\ROMS\creating_grid\roms_grd.nc', 'noclobber');
if isempty(nc), return, end
%% Global attributes:
nc.type = ncchar(''Gridpak file'');
nc.gridid = ncchar('' '');
nc.history = ncchar(''Created by "seagrid2roms" on 12-May-2011 16:16:48'');
nc.CPP-options = ncchar(''DCOMPLEX, DBLEPREC, NCARG_32, PLOTS,'');
%% Dimensions:
nc('xi_psi') = 49;
nc('xi_rho') = 50;
nc('xi_u') = 49;
nc('xi_v') = 50;
nc('eta_psi') = 49;
nc('eta_rho') = 50;
nc('eta_u') = 50;
nc('eta_v') = 49;
nc('two') = 2;
nc('bath') = 0; %% (record dimension)
%% Variables and attributes:
nc{'xl'} = ncdouble; %% 1 element.
nc{'xl'}.long_name = ncchar(''domain length in the XI-direction'');
nc{'xl'}.units = ncchar(''meter'');
nc{'el'} = ncdouble; %% 1 element.
nc{'el'}.long_name = ncchar(''domain length in the ETA-direction'');
nc{'el'}.units = ncchar(''meter'');
nc{'JPRJ'} = ncchar('two'); %% 2 elements.
nc{'JPRJ'}.long_name = ncchar(''Map projection type'');
nc{'JPRJ'}.option(ME) = ncchar(''Mercator'');
nc{'JPRJ'}.option(ST) = ncchar(''Stereographic'');
nc{'JPRJ'}.option(LC) = ncchar(''Lambert conformal conic'');
nc{'PLAT'} = ncfloat('two'); %% 2 elements.
nc{'PLAT'}.long_name = ncchar(''Reference latitude(s) for map projection'');
nc{'PLAT'}.units = ncchar(''degree_north'');
nc{'PLONG'} = ncfloat; %% 1 element.
nc{'PLONG'}.long_name = ncchar(''Reference longitude for map projection'');
nc{'PLONG'}.units = ncchar(''degree_east'');
nc{'ROTA'} = ncfloat; %% 1 element.
nc{'ROTA'}.long_name = ncchar(''Rotation angle for map projection'');
nc{'ROTA'}.units = ncchar(''degree'');
nc{'JLTS'} = ncchar('two'); %% 2 elements.
nc{'JLTS'}.long_name = ncchar(''How limits of map are chosen'');
nc{'JLTS'}.option(CO) = ncchar(''P1, .. P4 define two opposite corners '');
nc{'JLTS'}.option(MA) = ncchar(''Maximum (whole world)'');
nc{'JLTS'}.option(AN) = ncchar(''Angles - P1..P4 define angles to edge of domain'');
nc{'JLTS'}.option(LI) = ncchar(''Limits - P1..P4 define limits in u,v space'');
nc{'P1'} = ncfloat; %% 1 element.
nc{'P1'}.long_name = ncchar(''Map limit parameter number 1'');
nc{'P2'} = ncfloat; %% 1 element.
nc{'P2'}.long_name = ncchar(''Map limit parameter number 2'');
nc{'P3'} = ncfloat; %% 1 element.
nc{'P3'}.long_name = ncchar(''Map limit parameter number 3'');
nc{'P4'} = ncfloat; %% 1 element.
nc{'P4'}.long_name = ncchar(''Map limit parameter number 4'');
nc{'XOFF'} = ncfloat; %% 1 element.
nc{'XOFF'}.long_name = ncchar(''Offset in x direction'');
nc{'XOFF'}.units = ncchar(''meter'');
nc{'YOFF'} = ncfloat; %% 1 element.
nc{'YOFF'}.long_name = ncchar(''Offset in y direction'');
nc{'YOFF'}.units = ncchar(''meter'');
nc{'depthmin'} = ncshort; %% 1 element.
nc{'depthmin'}.long_name = ncchar(''Shallow bathymetry clipping depth'');
nc{'depthmin'}.units = ncchar(''meter'');
nc{'depthmax'} = ncshort; %% 1 element.
nc{'depthmax'}.long_name = ncchar(''Deep bathymetry clipping depth'');
nc{'depthmax'}.units = ncchar(''meter'');
nc{'spherical'} = ncchar; %% 1 element.
nc{'spherical'}.long_name = ncchar(''Grid type logical switch'');
nc{'spherical'}.option(T) = ncchar(''spherical'');
nc{'spherical'}.option(F) = ncchar(''Cartesian'');
nc{'hraw'} = ncdouble('bath', 'eta_rho', 'xi_rho'); %% 0 elements.
nc{'hraw'}.long_name = ncchar(''Working bathymetry at RHO-points'');
nc{'hraw'}.units = ncchar(''meter'');
nc{'hraw'}.field = ncchar(''bath, scalar'');
nc{'h'} = ncdouble('eta_rho', 'xi_rho'); %% 2500 elements.
nc{'h'}.long_name = ncchar(''Final bathymetry at RHO-points'');
nc{'h'}.units = ncchar(''meter'');
nc{'h'}.coordinates = ncchar(''lon_rho lat_rho'');
nc{'h'}.field = ncchar(''bath, scalar'');
nc{'f'} = ncdouble('eta_rho', 'xi_rho'); %% 2500 elements.
nc{'f'}.long_name = ncchar(''Coriolis parameter at RHO-points'');
nc{'f'}.units = ncchar(''second-1'');
nc{'f'}.coordinates = ncchar(''lon_rho lat_rho'');
nc{'f'}.field = ncchar(''Coriolis, scalar'');
nc{'pm'} = ncdouble('eta_rho', 'xi_rho'); %% 2500 elements.
nc{'pm'}.long_name = ncchar(''curvilinear coordinate metric in XI'');
nc{'pm'}.units = ncchar(''meter-1'');
nc{'pm'}.field = ncchar(''pm, scalar'');
nc{'pn'} = ncdouble('eta_rho', 'xi_rho'); %% 2500 elements.
nc{'pn'}.long_name = ncchar(''curvilinear coordinate metric in ETA'');
nc{'pn'}.units = ncchar(''meter-1'');
nc{'pn'}.field = ncchar(''pn, scalar'');
nc{'dndx'} = ncdouble('eta_rho', 'xi_rho'); %% 2500 elements.
nc{'dndx'}.long_name = ncchar(''xi derivative of inverse metric factor pn'');
nc{'dndx'}.units = ncchar(''meter'');
nc{'dndx'}.field = ncchar(''dndx, scalar'');
nc{'dmde'} = ncdouble('eta_rho', 'xi_rho'); %% 2500 elements.
nc{'dmde'}.long_name = ncchar(''eta derivative of inverse metric factor pm'');
nc{'dmde'}.units = ncchar(''meter'');
nc{'dmde'}.field = ncchar(''dmde, scalar'');
nc{'x_rho'} = ncdouble('eta_rho', 'xi_rho'); %% 2500 elements.
nc{'x_rho'}.long_name = ncchar(''x location of RHO-points'');
nc{'x_rho'}.units = ncchar(''meter'');
nc{'y_rho'} = ncdouble('eta_rho', 'xi_rho'); %% 2500 elements.
nc{'y_rho'}.long_name = ncchar(''y location of RHO-points'');
nc{'y_rho'}.units = ncchar(''meter'');
nc{'x_psi'} = ncdouble('eta_psi', 'xi_psi'); %% 2401 elements.
nc{'x_psi'}.long_name = ncchar(''x location of PSI-points'');
nc{'x_psi'}.units = ncchar(''meter'');
nc{'y_psi'} = ncdouble('eta_psi', 'xi_psi'); %% 2401 elements.
nc{'y_psi'}.long_name = ncchar(''y location of PSI-points'');
nc{'y_psi'}.units = ncchar(''meter'');
nc{'x_u'} = ncdouble('eta_u', 'xi_u'); %% 2450 elements.
nc{'x_u'}.long_name = ncchar(''x location of U-points'');
nc{'x_u'}.units = ncchar(''meter'');
nc{'y_u'} = ncdouble('eta_u', 'xi_u'); %% 2450 elements.
nc{'y_u'}.long_name = ncchar(''y location of U-points'');
nc{'y_u'}.units = ncchar(''meter'');
nc{'x_v'} = ncdouble('eta_v', 'xi_v'); %% 2450 elements.
nc{'x_v'}.long_name = ncchar(''x location of V-points'');
nc{'x_v'}.units = ncchar(''meter'');
nc{'y_v'} = ncdouble('eta_v', 'xi_v'); %% 2450 elements.
nc{'y_v'}.long_name = ncchar(''y location of V-points'');
nc{'y_v'}.units = ncchar(''meter'');
nc{'lat_rho'} = ncdouble('eta_rho', 'xi_rho'); %% 2500 elements.
nc{'lat_rho'}.long_name = ncchar(''latitude of RHO-points'');
nc{'lat_rho'}.units = ncchar(''degree_north'');
nc{'lon_rho'} = ncdouble('eta_rho', 'xi_rho'); %% 2500 elements.
nc{'lon_rho'}.long_name = ncchar(''longitude of RHO-points'');
nc{'lon_rho'}.units = ncchar(''degree_east'');
nc{'lat_psi'} = ncdouble('eta_psi', 'xi_psi'); %% 2401 elements.
nc{'lat_psi'}.long_name = ncchar(''latitude of PSI-points'');
nc{'lat_psi'}.units = ncchar(''degree_north'');
nc{'lon_psi'} = ncdouble('eta_psi', 'xi_psi'); %% 2401 elements.
nc{'lon_psi'}.long_name = ncchar(''longitude of PSI-points'');
nc{'lon_psi'}.units = ncchar(''degree_east'');
nc{'lat_u'} = ncdouble('eta_u', 'xi_u'); %% 2450 elements.
nc{'lat_u'}.long_name = ncchar(''latitude of U-points'');
nc{'lat_u'}.units = ncchar(''degree_north'');
nc{'lon_u'} = ncdouble('eta_u', 'xi_u'); %% 2450 elements.
nc{'lon_u'}.long_name = ncchar(''longitude of U-points'');
nc{'lon_u'}.units = ncchar(''degree_east'');
nc{'lat_v'} = ncdouble('eta_v', 'xi_v'); %% 2450 elements.
nc{'lat_v'}.long_name = ncchar(''latitude of V-points'');
nc{'lat_v'}.units = ncchar(''degree_north'');
nc{'lon_v'} = ncdouble('eta_v', 'xi_v'); %% 2450 elements.
nc{'lon_v'}.long_name = ncchar(''longitude of V-points'');
nc{'lon_v'}.units = ncchar(''degree_east'');
nc{'mask_rho'} = ncdouble('eta_rho', 'xi_rho'); %% 2500 elements.
nc{'mask_rho'}.long_name = ncchar(''mask on RHO-points'');
nc{'mask_rho'}.option(0) = ncchar(''land'');
nc{'mask_rho'}.option(1) = ncchar(''water'');
nc{'mask_u'} = ncdouble('eta_u', 'xi_u'); %% 2450 elements.
nc{'mask_u'}.long_name = ncchar(''mask on U-points'');
nc{'mask_u'}.option(0) = ncchar(''land'');
nc{'mask_u'}.option(1) = ncchar(''water'');
nc{'mask_v'} = ncdouble('eta_v', 'xi_v'); %% 2450 elements.
nc{'mask_v'}.long_name = ncchar(''mask on V-points'');
nc{'mask_v'}.option(0) = ncchar(''land'');
nc{'mask_v'}.option(1) = ncchar(''water'');
nc{'mask_psi'} = ncdouble('eta_psi', 'xi_psi'); %% 2401 elements.
nc{'mask_psi'}.long_name = ncchar(''mask on PSI-points'');
nc{'mask_psi'}.option(0) = ncchar(''land'');
nc{'mask_psi'}.option(1) = ncchar(''water'');
nc{'angle'} = ncdouble('eta_rho', 'xi_rho'); %% 2500 elements.
nc{'angle'}.long_name = ncchar(''angle between xi axis and east'');
nc{'angle'}.units = ncchar(''radian'');
endef(nc)
close(nc)
thanks.
Re: SOURCE POINT FOR RIVER RUNOFF
I don't know if this makes sense, but one way to get what you are seeing is if Matlab somehow created a NetCDF4 file while you compile ROMS against a NetCDF3 library. I don't know of any other explanation.
Re: SOURCE POINT FOR RIVER RUNOFF
ok, thanks.
i compiled roms with netcdf3.
the grid file was make with matlab 2009b, and also yesterday i try with matlab2010b using in both cases seagrid2roms but roms doesn't like the file.
how i can solve that, how to know which kind of netcdf is using matlab.
thanks.
i compiled roms with netcdf3.
the grid file was make with matlab 2009b, and also yesterday i try with matlab2010b using in both cases seagrid2roms but roms doesn't like the file.
how i can solve that, how to know which kind of netcdf is using matlab.
thanks.
Re: SOURCE POINT FOR RIVER RUNOFF
just in case, i took a look to the libraries we have installed
[dnavidad@darkstar ~]$ ls /opt/netcdf/3.5.1-intel
ncvalues.h netcdf.h netcdf.inc typesizes.mod
netcdfcpp.h netcdf.hh netcdf.mod
My build.bash
........
export NETCDF_INCDIR=/opt/netcdf/3.5.1-intel/include
export NETCDF_LIBDIR=/opt/netcdf/3.5.1-intel/lib
........
[dnavidad@darkstar ~]$ ls /opt/netcdf/3.5.1-intel
ncvalues.h netcdf.h netcdf.inc typesizes.mod
netcdfcpp.h netcdf.hh netcdf.mod
My build.bash
........
export NETCDF_INCDIR=/opt/netcdf/3.5.1-intel/include
export NETCDF_LIBDIR=/opt/netcdf/3.5.1-intel/lib
........
- jivica
- Posts: 172
- Joined: Mon May 05, 2003 2:41 pm
- Location: The University of Western Australia, Perth, Australia
- Contact:
Re: SOURCE POINT FOR RIVER RUNOFF
ncdump is a application that is "made" when you installed netcdf library and is located inside netcdf bin folder, so in your case should be:
/opt/netcdf/3.5.1-intel/bin/ncdump
It is veeeery useful command and you will use it a lot. So if you can show us how does this grid file looks like:
/opt/netcdf/3.5.1-intel/bin/ncdump -h your_grid_file.nc
Then we can check if it is having right structure. Matlab is creating nc file (seagrid2roms function) using netcdf (mexnc) file that you installed for Matlab before and this part should be fine if installation went OK.
Cheers,
Ivica
/opt/netcdf/3.5.1-intel/bin/ncdump
It is veeeery useful command and you will use it a lot. So if you can show us how does this grid file looks like:
/opt/netcdf/3.5.1-intel/bin/ncdump -h your_grid_file.nc
Then we can check if it is having right structure. Matlab is creating nc file (seagrid2roms function) using netcdf (mexnc) file that you installed for Matlab before and this part should be fine if installation went OK.
Cheers,
Ivica
Re: SOURCE POINT FOR RIVER RUNOFF
Ivica, thanks
please see below
[dnavidad@darkstar guadalquivir_ROMS]$ /opt/netcdf/3.5.1-intel/bin/ncdump -h roms_grd.nc
netcdf roms_grd {
dimensions:
xi_psi = 49 ;
xi_rho = 50 ;
xi_u = 49 ;
xi_v = 50 ;
eta_psi = 49 ;
eta_rho = 50 ;
eta_u = 50 ;
eta_v = 49 ;
two = 2 ;
bath = UNLIMITED ; // (0 currently)
variables:
double xl ;
xl:long_name = "domain length in the XI-direction" ;
xl:units = "meter" ;
double el ;
el:long_name = "domain length in the ETA-direction" ;
el:units = "meter" ;
char JPRJ(two) ;
JPRJ:long_name = "Map projection type" ;
JPRJ:option(ME) = "Mercator" ;
JPRJ:option(ST) = "Stereographic" ;
JPRJ:option(LC) = "Lambert conformal conic" ;
float PLAT(two) ;
PLAT:long_name = "Reference latitude(s) for map projection" ;
PLAT:units = "degree_north" ;
float PLONG ;
PLONG:long_name = "Reference longitude for map projection" ;
PLONG:units = "degree_east" ;
float ROTA ;
ROTA:long_name = "Rotation angle for map projection" ;
ROTA:units = "degree" ;
char JLTS(two) ;
JLTS:long_name = "How limits of map are chosen" ;
JLTS:option(CO) = "P1, .. P4 define two opposite corners " ;
JLTS:option(MA) = "Maximum (whole world)" ;
JLTS:option(AN) = "Angles - P1..P4 define angles to edge of domain" ;
JLTS:option(LI) = "Limits - P1..P4 define limits in u,v space" ;
float P1 ;
P1:long_name = "Map limit parameter number 1" ;
float P2 ;
P2:long_name = "Map limit parameter number 2" ;
float P3 ;
P3:long_name = "Map limit parameter number 3" ;
float P4 ;
P4:long_name = "Map limit parameter number 4" ;
float XOFF ;
XOFF:long_name = "Offset in x direction" ;
XOFF:units = "meter" ;
float YOFF ;
YOFF:long_name = "Offset in y direction" ;
YOFF:units = "meter" ;
short depthmin ;
depthmin:long_name = "Shallow bathymetry clipping depth" ;
depthmin:units = "meter" ;
short depthmax ;
depthmax:long_name = "Deep bathymetry clipping depth" ;
depthmax:units = "meter" ;
char spherical ;
spherical:long_name = "Grid type logical switch" ;
spherical:option(T) = "spherical" ;
spherical:option(F) = "Cartesian" ;
double hraw(bath, eta_rho, xi_rho) ;
hraw:long_name = "Working bathymetry at RHO-points" ;
hraw:units = "meter" ;
hraw:field = "bath, scalar" ;
double h(eta_rho, xi_rho) ;
h:long_name = "Final bathymetry at RHO-points" ;
h:units = "meter" ;
h:coordinates = "lon_rho lat_rho" ;
h:field = "bath, scalar" ;
double f(eta_rho, xi_rho) ;
f:long_name = "Coriolis parameter at RHO-points" ;
f:units = "second-1" ;
f:coordinates = "lon_rho lat_rho" ;
f:field = "Coriolis, scalar" ;
double pm(eta_rho, xi_rho) ;
pm:long_name = "curvilinear coordinate metric in XI" ;
pm:units = "meter-1" ;
pm:field = "pm, scalar" ;
double pn(eta_rho, xi_rho) ;
pn:long_name = "curvilinear coordinate metric in ETA" ;
pn:units = "meter-1" ;
pn:field = "pn, scalar" ;
double dndx(eta_rho, xi_rho) ;
dndx:long_name = "xi derivative of inverse metric factor pn" ;
dndx:units = "meter" ;
dndx:field = "dndx, scalar" ;
double dmde(eta_rho, xi_rho) ;
dmde:long_name = "eta derivative of inverse metric factor pm" ;
dmde:units = "meter" ;
dmde:field = "dmde, scalar" ;
double x_rho(eta_rho, xi_rho) ;
x_rho:long_name = "x location of RHO-points" ;
x_rho:units = "meter" ;
double y_rho(eta_rho, xi_rho) ;
y_rho:long_name = "y location of RHO-points" ;
y_rho:units = "meter" ;
double x_psi(eta_psi, xi_psi) ;
x_psi:long_name = "x location of PSI-points" ;
x_psi:units = "meter" ;
double y_psi(eta_psi, xi_psi) ;
y_psi:long_name = "y location of PSI-points" ;
y_psi:units = "meter" ;
double x_u(eta_u, xi_u) ;
x_u:long_name = "x location of U-points" ;
x_u:units = "meter" ;
double y_u(eta_u, xi_u) ;
y_u:long_name = "y location of U-points" ;
y_u:units = "meter" ;
double x_v(eta_v, xi_v) ;
x_v:long_name = "x location of V-points" ;
x_v:units = "meter" ;
double y_v(eta_v, xi_v) ;
y_v:long_name = "y location of V-points" ;
y_v:units = "meter" ;
double lat_rho(eta_rho, xi_rho) ;
lat_rho:long_name = "latitude of RHO-points" ;
lat_rho:units = "degree_north" ;
double lon_rho(eta_rho, xi_rho) ;
lon_rho:long_name = "longitude of RHO-points" ;
lon_rho:units = "degree_east" ;
double lat_psi(eta_psi, xi_psi) ;
lat_psi:long_name = "latitude of PSI-points" ;
lat_psi:units = "degree_north" ;
double lon_psi(eta_psi, xi_psi) ;
lon_psi:long_name = "longitude of PSI-points" ;
lon_psi:units = "degree_east" ;
double lat_u(eta_u, xi_u) ;
lat_u:long_name = "latitude of U-points" ;
lat_u:units = "degree_north" ;
double lon_u(eta_u, xi_u) ;
lon_u:long_name = "longitude of U-points" ;
lon_u:units = "degree_east" ;
double lat_v(eta_v, xi_v) ;
lat_v:long_name = "latitude of V-points" ;
lat_v:units = "degree_north" ;
double lon_v(eta_v, xi_v) ;
lon_v:long_name = "longitude of V-points" ;
lon_v:units = "degree_east" ;
double mask_rho(eta_rho, xi_rho) ;
mask_rho:long_name = "mask on RHO-points" ;
mask_rho:option(0) = "land" ;
mask_rho:option(1) = "water" ;
double mask_u(eta_u, xi_u) ;
mask_u:long_name = "mask on U-points" ;
mask_u:option(0) = "land" ;
mask_u:option(1) = "water" ;
double mask_v(eta_v, xi_v) ;
mask_v:long_name = "mask on V-points" ;
mask_v:option(0) = "land" ;
mask_v:option(1) = "water" ;
double mask_psi(eta_psi, xi_psi) ;
mask_psi:long_name = "mask on PSI-points" ;
mask_psi:option(0) = "land" ;
mask_psi:option(1) = "water" ;
double angle(eta_rho, xi_rho) ;
angle:long_name = "angle between xi axis and east" ;
angle:units = "radian" ;
// global attributes:
:type = "Gridpak file" ;
:gridid = " " ;
:history = "Created by \"seagrid2roms\" on 12-May-2011 16:16:48" ;
:CPP-options = "DCOMPLEX, DBLEPREC, NCARG_32, PLOTS," ;
}
thanks
please see below
[dnavidad@darkstar guadalquivir_ROMS]$ /opt/netcdf/3.5.1-intel/bin/ncdump -h roms_grd.nc
netcdf roms_grd {
dimensions:
xi_psi = 49 ;
xi_rho = 50 ;
xi_u = 49 ;
xi_v = 50 ;
eta_psi = 49 ;
eta_rho = 50 ;
eta_u = 50 ;
eta_v = 49 ;
two = 2 ;
bath = UNLIMITED ; // (0 currently)
variables:
double xl ;
xl:long_name = "domain length in the XI-direction" ;
xl:units = "meter" ;
double el ;
el:long_name = "domain length in the ETA-direction" ;
el:units = "meter" ;
char JPRJ(two) ;
JPRJ:long_name = "Map projection type" ;
JPRJ:option(ME) = "Mercator" ;
JPRJ:option(ST) = "Stereographic" ;
JPRJ:option(LC) = "Lambert conformal conic" ;
float PLAT(two) ;
PLAT:long_name = "Reference latitude(s) for map projection" ;
PLAT:units = "degree_north" ;
float PLONG ;
PLONG:long_name = "Reference longitude for map projection" ;
PLONG:units = "degree_east" ;
float ROTA ;
ROTA:long_name = "Rotation angle for map projection" ;
ROTA:units = "degree" ;
char JLTS(two) ;
JLTS:long_name = "How limits of map are chosen" ;
JLTS:option(CO) = "P1, .. P4 define two opposite corners " ;
JLTS:option(MA) = "Maximum (whole world)" ;
JLTS:option(AN) = "Angles - P1..P4 define angles to edge of domain" ;
JLTS:option(LI) = "Limits - P1..P4 define limits in u,v space" ;
float P1 ;
P1:long_name = "Map limit parameter number 1" ;
float P2 ;
P2:long_name = "Map limit parameter number 2" ;
float P3 ;
P3:long_name = "Map limit parameter number 3" ;
float P4 ;
P4:long_name = "Map limit parameter number 4" ;
float XOFF ;
XOFF:long_name = "Offset in x direction" ;
XOFF:units = "meter" ;
float YOFF ;
YOFF:long_name = "Offset in y direction" ;
YOFF:units = "meter" ;
short depthmin ;
depthmin:long_name = "Shallow bathymetry clipping depth" ;
depthmin:units = "meter" ;
short depthmax ;
depthmax:long_name = "Deep bathymetry clipping depth" ;
depthmax:units = "meter" ;
char spherical ;
spherical:long_name = "Grid type logical switch" ;
spherical:option(T) = "spherical" ;
spherical:option(F) = "Cartesian" ;
double hraw(bath, eta_rho, xi_rho) ;
hraw:long_name = "Working bathymetry at RHO-points" ;
hraw:units = "meter" ;
hraw:field = "bath, scalar" ;
double h(eta_rho, xi_rho) ;
h:long_name = "Final bathymetry at RHO-points" ;
h:units = "meter" ;
h:coordinates = "lon_rho lat_rho" ;
h:field = "bath, scalar" ;
double f(eta_rho, xi_rho) ;
f:long_name = "Coriolis parameter at RHO-points" ;
f:units = "second-1" ;
f:coordinates = "lon_rho lat_rho" ;
f:field = "Coriolis, scalar" ;
double pm(eta_rho, xi_rho) ;
pm:long_name = "curvilinear coordinate metric in XI" ;
pm:units = "meter-1" ;
pm:field = "pm, scalar" ;
double pn(eta_rho, xi_rho) ;
pn:long_name = "curvilinear coordinate metric in ETA" ;
pn:units = "meter-1" ;
pn:field = "pn, scalar" ;
double dndx(eta_rho, xi_rho) ;
dndx:long_name = "xi derivative of inverse metric factor pn" ;
dndx:units = "meter" ;
dndx:field = "dndx, scalar" ;
double dmde(eta_rho, xi_rho) ;
dmde:long_name = "eta derivative of inverse metric factor pm" ;
dmde:units = "meter" ;
dmde:field = "dmde, scalar" ;
double x_rho(eta_rho, xi_rho) ;
x_rho:long_name = "x location of RHO-points" ;
x_rho:units = "meter" ;
double y_rho(eta_rho, xi_rho) ;
y_rho:long_name = "y location of RHO-points" ;
y_rho:units = "meter" ;
double x_psi(eta_psi, xi_psi) ;
x_psi:long_name = "x location of PSI-points" ;
x_psi:units = "meter" ;
double y_psi(eta_psi, xi_psi) ;
y_psi:long_name = "y location of PSI-points" ;
y_psi:units = "meter" ;
double x_u(eta_u, xi_u) ;
x_u:long_name = "x location of U-points" ;
x_u:units = "meter" ;
double y_u(eta_u, xi_u) ;
y_u:long_name = "y location of U-points" ;
y_u:units = "meter" ;
double x_v(eta_v, xi_v) ;
x_v:long_name = "x location of V-points" ;
x_v:units = "meter" ;
double y_v(eta_v, xi_v) ;
y_v:long_name = "y location of V-points" ;
y_v:units = "meter" ;
double lat_rho(eta_rho, xi_rho) ;
lat_rho:long_name = "latitude of RHO-points" ;
lat_rho:units = "degree_north" ;
double lon_rho(eta_rho, xi_rho) ;
lon_rho:long_name = "longitude of RHO-points" ;
lon_rho:units = "degree_east" ;
double lat_psi(eta_psi, xi_psi) ;
lat_psi:long_name = "latitude of PSI-points" ;
lat_psi:units = "degree_north" ;
double lon_psi(eta_psi, xi_psi) ;
lon_psi:long_name = "longitude of PSI-points" ;
lon_psi:units = "degree_east" ;
double lat_u(eta_u, xi_u) ;
lat_u:long_name = "latitude of U-points" ;
lat_u:units = "degree_north" ;
double lon_u(eta_u, xi_u) ;
lon_u:long_name = "longitude of U-points" ;
lon_u:units = "degree_east" ;
double lat_v(eta_v, xi_v) ;
lat_v:long_name = "latitude of V-points" ;
lat_v:units = "degree_north" ;
double lon_v(eta_v, xi_v) ;
lon_v:long_name = "longitude of V-points" ;
lon_v:units = "degree_east" ;
double mask_rho(eta_rho, xi_rho) ;
mask_rho:long_name = "mask on RHO-points" ;
mask_rho:option(0) = "land" ;
mask_rho:option(1) = "water" ;
double mask_u(eta_u, xi_u) ;
mask_u:long_name = "mask on U-points" ;
mask_u:option(0) = "land" ;
mask_u:option(1) = "water" ;
double mask_v(eta_v, xi_v) ;
mask_v:long_name = "mask on V-points" ;
mask_v:option(0) = "land" ;
mask_v:option(1) = "water" ;
double mask_psi(eta_psi, xi_psi) ;
mask_psi:long_name = "mask on PSI-points" ;
mask_psi:option(0) = "land" ;
mask_psi:option(1) = "water" ;
double angle(eta_rho, xi_rho) ;
angle:long_name = "angle between xi axis and east" ;
angle:units = "radian" ;
// global attributes:
:type = "Gridpak file" ;
:gridid = " " ;
:history = "Created by \"seagrid2roms\" on 12-May-2011 16:16:48" ;
:CPP-options = "DCOMPLEX, DBLEPREC, NCARG_32, PLOTS," ;
}
thanks
Re: SOURCE POINT FOR RIVER RUNOFF
hi Ivica,
i made a new (finer) grid. this time i didn't use mask, now seem that roms is reading the file. but i have other problem. i am using the seagrid2roms command in matlab.
it is a problem in the outer boundary grid. i didn't specify in seagrid anything about boundary, i wonder if it is related with that., please read below
thanks
.......................
.......................
.......................
INITIAL: Configuring and initializing forward nonlinear model ...
NETCDF_CHECK_DIM - inconsistent size of dimension: xi_psi 99 42
in file: ocean_grd.nc
Elapsed CPU time (seconds):
Thread # 0 CPU: 0.060
Total: 0.060
Nonlinear model elapsed time profile:
Total: 0.000 0.0000
All percentages are with respect to total time = 0.060
ROMS/TOMS - Output NetCDF summary for Grid 01:
ROMS/TOMS - Input error ............. exit_flag: 2
ERROR: Abnormal termination: NetCDF INPUT.
REASON: No error
i made a new (finer) grid. this time i didn't use mask, now seem that roms is reading the file. but i have other problem. i am using the seagrid2roms command in matlab.
it is a problem in the outer boundary grid. i didn't specify in seagrid anything about boundary, i wonder if it is related with that., please read below
thanks
.......................
.......................
.......................
INITIAL: Configuring and initializing forward nonlinear model ...
NETCDF_CHECK_DIM - inconsistent size of dimension: xi_psi 99 42
in file: ocean_grd.nc
Elapsed CPU time (seconds):
Thread # 0 CPU: 0.060
Total: 0.060
Nonlinear model elapsed time profile:
Total: 0.000 0.0000
All percentages are with respect to total time = 0.060
ROMS/TOMS - Output NetCDF summary for Grid 01:
ROMS/TOMS - Input error ............. exit_flag: 2
ERROR: Abnormal termination: NetCDF INPUT.
REASON: No error
Re: SOURCE POINT FOR RIVER RUNOFF
It is telling you what the problem is. You set the grid size Lm and Mm in the ocean.in file and they have to match those of your grid. The grid size in seagrid is Lm+2 by Mm+2, I think. In any case, xi_rho of your grid file has to match Lm+2.dnavidad wrote: NETCDF_CHECK_DIM - inconsistent size of dimension: xi_psi 99 42
in file: ocean_grd.nc
Re: SOURCE POINT FOR RIVER RUNOFF
thanks a lot, it is working of course.
ncdump:
nc('eta_rho') = 180; Lm=178
nc('xi_rho') = 100; Mm=98;
now, there is a problem with the initial basin volume. let me check the index of the source point and discharge value.
thanks.
ncdump:
nc('eta_rho') = 180; Lm=178
nc('xi_rho') = 100; Mm=98;
now, there is a problem with the initial basin volume. let me check the index of the source point and discharge value.
thanks.
Re: SOURCE POINT FOR RIVER RUNOFF
Finally i did get the index of the source point using the function getinput by matlab and using the structure that seagrid save for the grid. In the following variables is the information about grid coordinates.
X=s.geographic_grids{1};
Y=s.geographic_grids{2};
So i've got the index.
i have problem with the Initial basin volumes when try to run.
thanks.
.......
.......
TotVolume = NaN m3
i have added a case in the ana_psource.h for my area
#elif defined GUADALQUIVIR
Nsrc=2
i put 2 for temperature and salinity
Dsrc(Nsrc)=0.0_r8
i put 0, but i don't sure about that. i don;t know exactly what it means. i know it is about the rho_point or u-v points.
Isrc(Nsrc)=11
Jsrc(Nsrc)=36
i put the index i got in the seagrid .mat file.
LtracerSrc(itemp,ng)=F !
LtracerSrc(isalt,ng)=F !
i don't put any information about salt and temp in this point.
Qbar=500
depth integrated flow.
thanks in advanced.
ROM's output
X=s.geographic_grids{1};
Y=s.geographic_grids{2};
So i've got the index.
i have problem with the Initial basin volumes when try to run.
thanks.
.......
.......
TotVolume = NaN m3
i have added a case in the ana_psource.h for my area
#elif defined GUADALQUIVIR
Nsrc=2
i put 2 for temperature and salinity
Dsrc(Nsrc)=0.0_r8
i put 0, but i don't sure about that. i don;t know exactly what it means. i know it is about the rho_point or u-v points.
Isrc(Nsrc)=11
Jsrc(Nsrc)=36
i put the index i got in the seagrid .mat file.
LtracerSrc(itemp,ng)=F !
LtracerSrc(isalt,ng)=F !
i don't put any information about salt and temp in this point.
Qbar=500
depth integrated flow.
thanks in advanced.
ROM's output
Code: Select all
......................
........................
.........................
Initial basin volumes: TotVolume = NaN m3
MinVolume = 8.6936641795E+03 m3
MaxVolume = 1.1015613641E+05 m3
Max/Min = 1.2670852489E+01
NL ROMS/TOMS: started time-stepping: (Grid: 01 TimeSteps: 00000001 - 00001440)
STEP Day HH:MM:SS KINETIC_ENRG POTEN_ENRG TOTAL_ENRG NET_VOLUME
C => (i,j,k) Cu Cv Cw Max Speed
0 0 00:00:00 NaN NaN NaN NaN
(00,000,00) 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00
Re: SOURCE POINT FOR RIVER RUNOFF
by other hand, i am trying to generate a netcdf file from frc_river.cdl as (better) alternative, how i have been advised.
what is wrong?
also, how to specify the depth integrated flow here? (Qbar)
thanks in advance any help will be wellcome.
1netcdf frc_rivers {
2
3dimensions:
4 xi_rho = 10 ;
5 xi_u = 9 ;
6 xi_v = 10 ;
7 eta_rho = 37 ;
8 eta_u = 37 ;
9 eta_v = 36 ;
10 s_rho = 10 ;
11 river = 19 ;
12 river_time = UNLIMITED ; // (0 currently)
13
14variables:
15 double river(river) ;
16 river:long_name = "river runoff identification number" ;
17 double river_Xposition(river) ;
18 river_Xposition:long_name = "river XI-position at RHO-points" ;
19 river_Xposition:valid_min = 1. ;
20 river_Xposition:valid_max = 180. ;
21 double river_Eposition(river) ;
22 river_Eposition:long_name = "river ETA-position at RHO-points" ;
23 river_Eposition:valid_min = 1. ;
24 river_Eposition:valid_max = 100. ;
25 double river_direction(river) ;
26 river_direction:long_name = "river runoff direction" ;
27 double river_Vshape(s_rho, river) ;
28 river_Vshape:long_name = "river runoff mass transport vertical profile" ;
29 double river_time(river_time) ;
30 river_time:long_name = "river runoff time" ;
31 river_time:units = "days since 1992-01-01 00:00:00" ;
32 river_time:add_offset = 2448623. ;
33 double river_transport(river_time river) ;
34 river_transport:long_name = "river runoff vertically integrated mass transport" ;
35 river_transport:units = "meter3 second-1" ;
36 river_transport:time = "river_time" ;
37 double river_temp(river_time s_rho, river) ;
38 river_temp:long_name = "river runoff potential temperature" ;
39 river_temp:units = "Celsius" ;
40 river_temp:time = "river_time" ;
41 double river_salt(river_time s_rho, river) ;
42 river_salt:long_name = "river runoff salinity" ;
43 river_salt:time = "river_time" ;
44
45// global attributes:
46 :type = "ROMS FORCING file" ;
47 :title = "GUADALQUIVIR River Forcing" ;
48 :grd_file = "ocean_grd.nc" ;
49 :rivers = "(1) Mississippi River at Vicksburg, MS, (2) Susquehanna River at Conowingo, MD, ( 3) Tombigbee River at Coffeeville L&D near Coffeeville, (4) Apalachicola River near Sumatra, FL, (5) 51Connecticut River at Hartford, CT, (6) Hudson River at Green Island NY, (7) Penobscot River at Eddington, ME, (8) Delaware River at Trenton NJ, (9) Altamaha River at Doctortown, GA, (10) Potomac River near Wash, DC Little Falls Pump, (11) Savannah River near Clyo, GA, (12) Roanoke River at Roanoke Rapids, NC, (13) Pee Dee River at Peedee, SC, (14) Pearl River near Bogalusa, LA, (15) Suwannee River near Wilcox, FL, (16) Kennebec River at North Sidney, ME,(17) Escambia River near Molino, FL, (18) James River near Richmond, VA, (19) Guadalquivir River, Spain" ;
50}
Code: Select all
[dnavidad@darkstar guadalquivir_ROMS]$ /opt/netcdf/3.5.1-intel/bin/ncgen -b frc_rivers.cdl
ncgen: frc_rivers.cdl line 33: syntax error
also, how to specify the depth integrated flow here? (Qbar)
thanks in advance any help will be wellcome.
Code: Select all
>joe frc_rivers.cdl
2
3dimensions:
4 xi_rho = 10 ;
5 xi_u = 9 ;
6 xi_v = 10 ;
7 eta_rho = 37 ;
8 eta_u = 37 ;
9 eta_v = 36 ;
10 s_rho = 10 ;
11 river = 19 ;
12 river_time = UNLIMITED ; // (0 currently)
13
14variables:
15 double river(river) ;
16 river:long_name = "river runoff identification number" ;
17 double river_Xposition(river) ;
18 river_Xposition:long_name = "river XI-position at RHO-points" ;
19 river_Xposition:valid_min = 1. ;
20 river_Xposition:valid_max = 180. ;
21 double river_Eposition(river) ;
22 river_Eposition:long_name = "river ETA-position at RHO-points" ;
23 river_Eposition:valid_min = 1. ;
24 river_Eposition:valid_max = 100. ;
25 double river_direction(river) ;
26 river_direction:long_name = "river runoff direction" ;
27 double river_Vshape(s_rho, river) ;
28 river_Vshape:long_name = "river runoff mass transport vertical profile" ;
29 double river_time(river_time) ;
30 river_time:long_name = "river runoff time" ;
31 river_time:units = "days since 1992-01-01 00:00:00" ;
32 river_time:add_offset = 2448623. ;
33 double river_transport(river_time river) ;
34 river_transport:long_name = "river runoff vertically integrated mass transport" ;
35 river_transport:units = "meter3 second-1" ;
36 river_transport:time = "river_time" ;
37 double river_temp(river_time s_rho, river) ;
38 river_temp:long_name = "river runoff potential temperature" ;
39 river_temp:units = "Celsius" ;
40 river_temp:time = "river_time" ;
41 double river_salt(river_time s_rho, river) ;
42 river_salt:long_name = "river runoff salinity" ;
43 river_salt:time = "river_time" ;
44
45// global attributes:
46 :type = "ROMS FORCING file" ;
47 :title = "GUADALQUIVIR River Forcing" ;
48 :grd_file = "ocean_grd.nc" ;
49 :rivers = "(1) Mississippi River at Vicksburg, MS, (2) Susquehanna River at Conowingo, MD, ( 3) Tombigbee River at Coffeeville L&D near Coffeeville, (4) Apalachicola River near Sumatra, FL, (5) 51Connecticut River at Hartford, CT, (6) Hudson River at Green Island NY, (7) Penobscot River at Eddington, ME, (8) Delaware River at Trenton NJ, (9) Altamaha River at Doctortown, GA, (10) Potomac River near Wash, DC Little Falls Pump, (11) Savannah River near Clyo, GA, (12) Roanoke River at Roanoke Rapids, NC, (13) Pee Dee River at Peedee, SC, (14) Pearl River near Bogalusa, LA, (15) Suwannee River near Wilcox, FL, (16) Kennebec River at North Sidney, ME,(17) Escambia River near Molino, FL, (18) James River near Richmond, VA, (19) Guadalquivir River, Spain" ;
50}
Re: SOURCE POINT FOR RIVER RUNOFF
Here's a dump of a working rivers file:
Code: Select all
netcdf NEP4_rivers_57-04_djd {
dimensions:
xi = 642 ;
eta = 226 ;
s_rho = 42 ;
time = UNLIMITED ; // (0 currently)
river = 242 ;
river_time = 576 ;
variables:
double time(time) ;
time:long_name = "river time" ;
time:units = "days since 1899-12-31 00:00:00 GMT" ;
time:field = "river_time, scalar, series" ;
double river(river) ;
river:long_name = "river runoff identification number" ;
river:units = "nondimensional" ;
river:field = "river, scalar" ;
double river_Xposition(river) ;
river_Xposition:long_name = "river XI-position at RHO-points" ;
river_Xposition:units = "nondimensional" ;
river_Xposition:valid_min = 1. ;
river_Xposition:valid_max = 641. ;
river_Xposition:field = "river_Xposition, scalar" ;
double river_Eposition(river) ;
river_Eposition:long_name = "river ETA-position at RHO-points" ;
river_Eposition:units = "nondimensional" ;
river_Eposition:valid_min = 1. ;
river_Eposition:valid_max = 225. ;
river_Eposition:field = "river_Eposition, scalar" ;
double river_direction(river) ;
river_direction:long_name = "river runoff direction" ;
river_direction:units = "nondimensional" ;
river_direction:field = "river_direction, scalar" ;
double river_flag(river) ;
river_flag:long_name = "river runoff tracer flag" ;
river_flag:option_0 = "all tracers are off" ;
river_flag:option_1 = "only temperature is on" ;
river_flag:option_2 = "only salinity is on" ;
river_flag:option_3 = "both temperature and salinity are on" ;
river_flag:units = "nondimensional" ;
river_flag:field = "river_flag, scalar" ;
double river_Vshape(s_rho, river) ;
river_Vshape:long_name = "river runoff mass transport vertical profile" ;
river_Vshape:units = "nondimensional" ;
river_Vshape:field = "river_Vshape, scalar" ;
double river_time(river_time) ;
river_time:long_name = "river runoff time" ;
river_time:units = "days since 1899-12-31 00:00:00 GMT" ;
river_time:field = "river_time, scalar, series" ;
double river_transport(river_time, river) ;
river_transport:long_name = "river runoff vertically integrated mass transport" ;
river_transport:units = "meter3 second-1" ;
river_transport:field = "river_transport, scalar, series" ;
river_transport:time = "river_time" ;
double river_temp(river_time, s_rho, river) ;
river_temp:long_name = "river runoff potential temperature" ;
river_temp:units = "Celsius" ;
river_temp:field = "river_temp, scalar, series" ;
river_temp:time = "river_time" ;
double river_salt(river_time, s_rho, river) ;
river_salt:long_name = "river runoff salinity" ;
river_salt:units = "PSU" ;
river_salt:field = "river_salt, scalar, series" ;
river_salt:time = "river_time" ;
// global attributes:
:type = "NEP4b FORCING file" ;
:history = "NorthEast Pacific" ;
:rivers = "AK linesource,AK linesource,AK linesource,AK linesource,AK linesource,AK linesource,AK linesource,AK linesource,AK linesource,AK linesource,...,Arctic Drain,Columbia,Columbia,Copper,Yukon,Yukon,Yukon" ;
}
Re: SOURCE POINT FOR RIVER RUNOFF
i have this problem
.....................
.....................
......................
......................
.....................
.....................
......................READ_PHYPAR - variable info not yet loaded, idEmPf
......................
......................
ERROR: Illegal model configuration.
Re: SOURCE POINT FOR RIVER RUNOFF
You need to make sure that symbol is in your varinfo.dat file.
Re: SOURCE POINT FOR RIVER RUNOFF
I found that, put it in varinfo.dat and it is solved.
thanks.!
'EminusP' ! Input/Output
'bulk_flux surface net freswater flux, (E-P)'
'meter second-1' ! computed by NLM ROMS
'EminusP, scalar, series' ! bulk_flux.F and
'ocean_time' ! needed in adjoint-based
'idEmPf' ! applications
'r2dvar'
1.0d0
!
Re: SOURCE POINT FOR RIVER RUNOFF
There is still something wrong with some analitical field in my .h file
i've got this error
READ_PHYPAR - could not find input file: ocean_ini.nc
I am following this error in a previous post by fchen:
Post subject: "READ_PHYPAR - could not find input file:ocean_ini.nc" Err
the first thing i checked out is the value to the variable 'stflx' in the ana_stflux.h file as that post.
!----------------------------------------------------------------------
! Set kinematic surface flux (T m/s) of passive tracers, if any.
!-----------------------------------------------------------------------
!
but only that doesn't work.
following that post also i checked out initial conditions for passive inert tracers in ana_passive
i have defined
....
#define ANA_INITIAL /* use if analytical initial conditions */
#define ANA_PASSIVE /*use if analytical initial conditions for inert tracers*/
....
but still i have the same message with ocean_ini.nc
i've got this error
READ_PHYPAR - could not find input file: ocean_ini.nc
I am following this error in a previous post by fchen:
Post subject: "READ_PHYPAR - could not find input file:ocean_ini.nc" Err
the first thing i checked out is the value to the variable 'stflx' in the ana_stflux.h file as that post.
!----------------------------------------------------------------------
! Set kinematic surface flux (T m/s) of passive tracers, if any.
!-----------------------------------------------------------------------
!
Code: Select all
ELSE
DO j=JstrR,JendR
DO i=IstrR,IendR
stflx(i,j,itrc)=0.0_r8
#ifdef TL_IOMS
tl_stflx(i,j,itrc)=0.0_r8
#endif
END DO
END DO
END IF
following that post also i checked out initial conditions for passive inert tracers in ana_passive
Code: Select all
!
!-----------------------------------------------------------------------
! Set analytical initial conditions for passive inert tracers.
!-----------------------------------------------------------------------
!
#if defined GUADALQUIVIR_TEST1
DO ip=1,NPT
itrc=inert(ip)
DO k=1,N(ng)
DO j=JstrR,JendR
DO i=IstrR,IendR
t(i,j,k,1,itrc)=0.0
t(i,j,k,2,itrc)=t(i,j,k,1,itrc)
END DO
END DO
END DO
END DO
#else
ana_passive.h: no values provided for t(:,:,:,1,inert(itrc))
#endif
....
#define ANA_INITIAL /* use if analytical initial conditions */
#define ANA_PASSIVE /*use if analytical initial conditions for inert tracers*/
....
but still i have the same message with ocean_ini.nc
Re: SOURCE POINT FOR RIVER RUNOFF
From globaldefs.h:
Anything ring a bell? Sediments or the BBL_MODEL?
Code: Select all
#if !defined ANA_INITIAL || \
( defined BIOLOGY && !defined ANA_BIOLOGY) || \
( defined T_PASSIVE && !defined ANA_PASSIVE) || \
( defined SEDIMENT && !defined ANA_SEDIMENT) || \
( defined BBL_MODEL && !defined ANA_SEDIMENT)
# define INI_FILE
#endif
Re: SOURCE POINT FOR RIVER RUNOFF
Hello kate, thanks for the post.
my .h file
and i changed in ana_sediment.h
Now i don't have this problem, but there is something wrong again with the dimensions of the grid.
thanks.
my .h file
Code: Select all
# undef SEDIMENT
#define SSW_BBL /*sherwood et al bbl closure*/
.......
# if defined SEDIMENT || defined SG_BBL || defined MB_BBL || defined SSW_BBL
# define ANA_SEDIMENT
# endif
Code: Select all
# elif defined GUADALQUIVIR_TEST1
DO j=JstrR,JendR
DO i=IstrR,IendR
bottom(i,j,isd50)=0.005_r8 ! 5 mm
bottom(i,j,idens)=2650.0_r8
END DO
END DO
thanks.
Re: SOURCE POINT FOR RIVER RUNOFF
Hello,
> /opt/netcdf/3.5.1-intel/bin/ncdump ocean_grd.nc
based on the grid generation sketch in wikiroms (https://www.myroms.org/wiki/index.php/Grid_Generation)
L + 1 = xi_rho = 100 -----> Lm = L - 1 = 98
M + 1 = eta_rho = 180 ----> Mm = L - 1 = 178
that is solved.
> /opt/netcdf/3.5.1-intel/bin/ncdump ocean_grd.nc
netcdf ocean_grd {
dimensions:
xi_psi = 99 ;
xi_rho = 100 ;
xi_u = 99 ;
xi_v = 100 ;
eta_psi = 179 ;
eta_rho = 180 ;
eta_u = 180 ;
eta_v = 179 ;
two = 2 ;
bath = UNLIMITED ; // (0 currently)
....................................
..........................
based on the grid generation sketch in wikiroms (https://www.myroms.org/wiki/index.php/Grid_Generation)
L + 1 = xi_rho = 100 -----> Lm = L - 1 = 98
M + 1 = eta_rho = 180 ----> Mm = L - 1 = 178
that is solved.
Re: SOURCE POINT FOR RIVER RUNOFF
I'm glad you solved it!
Just a note: if you ever run in parallel, the values Lm and Mm are the ones that should have factors of 2,3, etc. for perfect load balancing on systems with 8, 12 or 16 cores per node.
Just a note: if you ever run in parallel, the values Lm and Mm are the ones that should have factors of 2,3, etc. for perfect load balancing on systems with 8, 12 or 16 cores per node.
Re: SOURCE POINT FOR RIVER RUNOFF
does it never stop? ....
i got a error related with the variable "Dwave".
and also in https://www.myroms.org/wiki/index.php/Variables# i found that is wind-induced wave direction and that ssw_bbl.h, are the only routines that i am using.
......
I am not coupling swan and roms right now and i don't wanna use wave field just tide?
So should i provide this waves parameter for the orbital motion formulation (ana_wwaves.h) or should i avoid to define SSW_BBL(i don't think that can do that)?
i am little confused with that.
thanks.
i got a error related with the variable "Dwave".
i've been reading in the forum, seems to be something related with ana_wwaves.h.GET_2DFLD - unable to find requested variable: Dwave
in file:
#if defined BBL_MODEL || defined NEARSHORE_MELLOR
& Dwave,
........................
and also in https://www.myroms.org/wiki/index.php/Variables# i found that is wind-induced wave direction and that ssw_bbl.h, are the only routines that i am using.
......
#define SSW_BBL /*sherwood et al bbl closure*/
#ifdef SSW_BBL
# define SSW_CALC_ZNOT /*use if computing bottom roughness internally use if */
#endif
I am not coupling swan and roms right now and i don't wanna use wave field just tide?
So should i provide this waves parameter for the orbital motion formulation (ana_wwaves.h) or should i avoid to define SSW_BBL(i don't think that can do that)?
i am little confused with that.
thanks.
Re: SOURCE POINT FOR RIVER RUNOFF
kate wrote:I'm glad you solved it!
Just a note: if you ever run in parallel, the values Lm and Mm are the ones that should have factors of 2,3, etc. for perfect load balancing on systems with 8, 12 or 16 cores per node.
i will keep in mind.
i think i am close to get it.
thanks.
Re: SOURCE POINT FOR RIVER RUNOFF
i've inserted
and modified ana_wwaves.h
> ./oceanS < ocean_guadalquivir.in
fortcom: Error: analytical.f90, line 1119: This name has not been declared as an array or a function. [HWAVE]
Hwave(i,j)=2.0_r8
----^
fortcom: Error: analytical.f90, line 1122: This name has not been declared as an array or a function. [LWAVE]
Lwave(i,j)=20.0_r8
----^
??
varinfo.dat?
#define ANA_WWAVES.h
and modified ana_wwaves.h
#elif defined GUADALQUIVIR_TEST1
DO j=JstrR,JendR
DO i=IstrR,IendR
Hwave(i,j)=2.0_r8
Dwave(i,j)=90.0_r8*deg2rad
Pwave_bot(i,j)=8.0_r8
Lwave(i,j)=20.0_r8
END DO
END DO
> ./oceanS < ocean_guadalquivir.in
fortcom: Error: analytical.f90, line 1119: This name has not been declared as an array or a function. [HWAVE]
Hwave(i,j)=2.0_r8
----^
fortcom: Error: analytical.f90, line 1122: This name has not been declared as an array or a function. [LWAVE]
Lwave(i,j)=20.0_r8
----^
??
varinfo.dat?
Re: SOURCE POINT FOR RIVER RUNOFF
i found in varinfo.dat
'Dwave' ! Input
'wind-induced wave direction'
'degrees' ! [radians]
'Dwave, scalar, series'
'wave_time'
'idWdir'
'r2dvar'
0.017453292519943295 ! pi/180
'Hwave' ! Input
'wind-induced significant wave height'
'meter' ! [m]
'Hwave, scalar, series'
'wave_time'
'idWamp'
'r2dvar'
1.0d0
'Lwave' ! Input
'wind-induced mean wavelength'
'meter' ! [m]
'Lwave, scalar, series'
'wave_time'
'idWlen'
'r2dvar'
1.0
they are scalar should i change that? how?
i would need some help before touch too much and get more errors.
thanks.
'Dwave' ! Input
'wind-induced wave direction'
'degrees' ! [radians]
'Dwave, scalar, series'
'wave_time'
'idWdir'
'r2dvar'
0.017453292519943295 ! pi/180
'Hwave' ! Input
'wind-induced significant wave height'
'meter' ! [m]
'Hwave, scalar, series'
'wave_time'
'idWamp'
'r2dvar'
1.0d0
'Lwave' ! Input
'wind-induced mean wavelength'
'meter' ! [m]
'Lwave, scalar, series'
'wave_time'
'idWlen'
'r2dvar'
1.0
they are scalar should i change that? how?
i would need some help before touch too much and get more errors.
thanks.
Re: SOURCE POINT FOR RIVER RUNOFF
SSW_BBL is meant for bottom boundary layer wave-current interactions (mostly due to sediment transport).
If you define this, you have to provide several wave parameters:
- running ROMS-SWAN coupled online
or
- running SWAN uncoupled and later (i.e., offline) providing ROMS with forcing file including wave parameters from SWAN run
or
- define analytical waves.
If you don't really need SSW_BBL, use one of the BBL for currents only, i.e., define one of the followings:
** UV_LOGDRAG use to turn ON or OFF logarithmic bottom friction **
** UV_LDRAG use to turn ON or OFF linear bottom friction **
** UV_QDRAG use to turn ON or OFF quadratic bottom friction **
In this way, no wave parameters are required by ROMS.
Jacopo
If you define this, you have to provide several wave parameters:
- running ROMS-SWAN coupled online
or
- running SWAN uncoupled and later (i.e., offline) providing ROMS with forcing file including wave parameters from SWAN run
or
- define analytical waves.
If you don't really need SSW_BBL, use one of the BBL for currents only, i.e., define one of the followings:
** UV_LOGDRAG use to turn ON or OFF logarithmic bottom friction **
** UV_LDRAG use to turn ON or OFF linear bottom friction **
** UV_QDRAG use to turn ON or OFF quadratic bottom friction **
In this way, no wave parameters are required by ROMS.
Jacopo
Re: SOURCE POINT FOR RIVER RUNOFF
dnavidad wrote:i've inserted
#define ANA_WWAVES.h
wait: this must be 'ANA_WWAVES', not 'ANA_WWAVES.h'
Re: SOURCE POINT FOR RIVER RUNOFF
No, you don't have to change this. I guess your problem is associated to the CCPdefs you are using. Can you paste your list of CPPdefs?dnavidad wrote:i found in varinfo.dat
'Dwave' ! Input
'wind-induced wave direction'
'degrees' ! [radians]
'Dwave, scalar, series'
'wave_time'
'idWdir'
'r2dvar'
0.017453292519943295 ! pi/180
'Hwave' ! Input
'wind-induced significant wave height'
'meter' ! [m]
'Hwave, scalar, series'
'wave_time'
'idWamp'
'r2dvar'
1.0d0
'Lwave' ! Input
'wind-induced mean wavelength'
'meter' ! [m]
'Lwave, scalar, series'
'wave_time'
'idWlen'
'r2dvar'
1.0
they are scalar should i change that? how?
i would need some help before touch too much and get more errors.
thanks.
Re: SOURCE POINT FOR RIVER RUNOFF
jacopo wrote:dnavidad wrote:i've inserted
#define ANA_WWAVES.h
wait: this must be 'ANA_WWAVES', not 'ANA_WWAVES.h'
was only an typying error.
Re: SOURCE POINT FOR RIVER RUNOFF
hello jacopo.
many thanks.
this is my .h file
many thanks.
this is my .h file
with this options compile without complaints about waves./*
** svn $Id: inlet_test.h 170 2008-04-01 18:31:49Z arango $
*******************************************************************************
** Copyright (c) 2002-2008 The ROMS/TOMS Group **
** Licensed under a MIT/X style license **
** See License_ROMS.txt **
*******************************************************************************
**
** Options for Guadalquivir_area, ocean.
**
** Application flag: GUADALQUIVIR_TEST1
** Input script: ocean_guadalquivir_test1.in
** coupling_inlet_test.in
** sediment_inlet_test.in
*/
/*Options associated with momentum equations*/
#define UV_VIS2 /* use to activate harmonic horizontal mixing*/
#define UV_ADV /* use to activate advection terms*/
#undef UV_COR /* use to activate Coriolis term*/
/*Options for horizontal mixing of momentum*/
#define MIX_S_UV /* use if mixing along constant S-surfaces*/
/*Options associated with tracers equations*/
#define TS_MPDATA /* use if recursive MPDATA 3D advection*/
#define SALINITY /* use if having salinity*/
/*Options for pressure gradient algorithm*/
#define DJ_GRADPS /* use if splines density Jacobian (Shchepetkin, 2000) */
/*boundary conditions*/
#define FSOBC_REDUCED /* use if SSH data and reduced physics conditions*/
#define NORTH_FSGRADIENT /* use if free-surface gradient condition*/
#define NORTH_M2REDUCED /* use if 2D momentum reduced-physics*/
#define NORTH_M3GRADIENT /* use if 3D momentum gradient condition*/
#define WEST_FSGRADIENT /* use if free-surface gradient condition*/
#define WEST_M2GRADIENT /* use if 2D momentum reduced-physics*/
#define WEST_M3GRADIENT /* use if 3D momentum gradient condition*/
#define SOUTH_FSGRADIENT /* use if free-surface gradient condition*/
#define SOUTH_M2REDUCED /* use if 2D momentum reduced-physics*/
#define SOUTH_M3GRADIENT /* use if 3D momentum gradient condition*/
/*Options for model coupling*/
#undef SWAN_COUPLING*
/*Options for model configuration*/
#define SOLVE3D /* use if solving 3D primitive equations */
#define SPLINES /* use to activate parabolic splines reconstruction of vertical derivatives*/
#undef MASKING /* use if land/sea masking*/
/*Options for nearshore stresses and shallow water configurations*/
#define WET_DRY /* use to activate wetting and drying*/
/*#undef NEARSHORE_MELLOR*/ /* use to activate radiation stress terms.*/
/*Analitycal*/
#define ANA_INITIAL /* use if analytical initial conditions */
#define ANA_SMFLUX /* use if analytical surface momentum stress*/
#define ANA_FSOBC /* use if analytical free-surface boundary conditions */
#define ANA_M2OBC /* use if analytical 2D momentum boundary conditions*/
#define ANA_PASSIVE /* use if analytical initial conditions for inert tracers*/
#undef ANA_WWAVE /* use if analytical wind induced waves*/
/*Boundary layer closure*/
/* define only one of the following 5 */
#define UV_LOGDRAG /* logarithmic bottom friction of momentum. */
#define UV_LDRAG /* lineara bottom friction of momentum*/
#undef UV_QDRAG /* activate/deactivate quadratic bottom friction of momentum. */
#undef MB_BBL /* use if Meinte Blaas BBL closure use if */
#undef SG_BBL /* Options for Styles and Glenn (2000) bottom boundary layer closure*/
#undef SSW_BBL /* sherwood et al bbl closure*/ /* only with waves */
#ifdef SSW_BBL
# define SSW_CALC_ZNOT /* use if computing bottom roughness internally use if */
#endif
#ifdef SWAN_COUPLING
# define MCT_LIB
#endif
#ifdef SOLVE3D
# define GLS_MIXING
# ifdef GLS_MIXING
# define KANTHA_CLAYSON
# define N2S2_HORAVG
# endif
# undef SEDIMENT
# ifdef SEDIMENT
# define SUSPLOAD
# undef BEDLOAD_SOULSBY
# undef BEDLOAD_MPM
# define SED_MORPH
# endif
# if defined SEDIMENT || defined SG_BBL || defined MB_BBL || defined SSW_BBL
# define ANA_SEDIMENT
# endif
# define ANA_STFLUX /*use if analytical surface temperature flux*/
# define ANA_SSFLUX /*use if analytical surface salinity flux*/
# define ANA_BPFLUX /*use if analytical bottom temperature flux*/
# define ANA_BTFLUX /*use if analytical bottom temperature flux*/
# define ANA_BSFLUX /*use if analytical bottom temperature flux*/
# define ANA_SPFLUX /*use if analytical surface passive tracers fluxes*/
# define ANA_SRFLUX /*use if analytical surface shortwave radiation flux*/
#endif
Re: SOURCE POINT FOR RIVER RUNOFF
notice that there was an error
already solved.
#define UV_LOGDRAG /* logarithmic bottom friction of momentum. */
#define UV_LDRAG /* lineara bottom friction of momentum*/
already solved.
Re: SOURCE POINT FOR RIVER RUNOFF
is it just me or does seem work (at least running)?
thank to all the people helping.
NL ROMS/TOMS: started time-stepping: (Grid: 01 TimeSteps: 00000001 - 00001440)
STEP Day HH:MM:SS KINETIC_ENRG POTEN_ENRG TOTAL_ENRG NET_VOLUME
C => (i,j,k) Cu Cv Cw Max Speed
0 0 00:00:00 0.000000E+00 2.088931E+02 2.088931E+02 6.338668E+10
(00,000,00) 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00
DEF_HIS - creating history file: ocean_his.nc
WRT_HIS - wrote history fields (Index=1,1) into time record = 0000001
1 0 00:05:00 2.183920E-31 2.088931E+02 2.088931E+02 6.338668E+10
(91,178,01) 4.515118E-16 2.238342E-15 0.000000E+00 4.182053E-15
2 0 00:10:00 2.540739E-30 2.088931E+02 2.088931E+02 6.338668E+10
(08,141,16) 6.043855E-14 3.740286E-14 5.412554E-16 1.458921E-13
3 0 00:15:00 1.312643E-29 2.088931E+02 2.088931E+02 6.338668E+10
(26,163,16) 0.000000E+00 1.793247E-14 1.374884E-11 3.711014E-13
4 0 00:20:00 1.546295E-28 2.088931E+02 2.088931E+02 6.338668E+10
(21,161,16) 3.100414E-14 5.361623E-14 1.510129E-11 7.770870E-13
5 0 00:25:00 5.811475E-28 2.088931E+02 2.088931E+02 6.338668E+10
(26,163,16) 0.000000E+00 1.562411E-14 1.624741E-11 1.229629E-12
6 0 00:30:00 1.145404E-27 2.088931E+02 2.088931E+02 6.338668E+10
(07,141,01) 9.174278E-13 4.544697E-13 2.677935E-11 1.675661E-12
7 0 00:35:00 1.781146E-27 2.088931E+02 2.088931E+02 6.338668E+10
(07,141,02) 1.023950E-12 3.444682E-13 3.765840E-11 1.991298E-12
8 0 00:40:00 2.484483E-27 2.088931E+02 2.088931E+02 6.338668E+10
(07,141,02) 1.260884E-12 3.389799E-13 4.669952E-11 2.364674E-12
9 0 00:45:00 3.273220E-27 2.088931E+02 2.088931E+02 6.338668E+10
(07,141,02) 1.566261E-12 2.484535E-13 5.419638E-11 2.768089E-12
10 0 00:50:00 4.385100E-27 2.088931E+02 2.088931E+02 6.338668E+10
(04,139,16) 0.000000E+00 7.169810E-14 7.756428E-11 3.953831E-12
11 0 00:55:00 6.496698E-27 2.088931E+02 2.088931E+02 6.338668E+10
(04,139,16) 0.000000E+00 1.311657E-13 1.327058E-10 6.644153E-12
12 0 01:00:00 1.148771E-26 2.088931E+02 2.088931E+02 6.338668E+10
(04,139,16) 0.000000E+00 2.343541E-13 2.285201E-10 1.120450E-11
..............................
..............................
thank to all the people helping.
NL ROMS/TOMS: started time-stepping: (Grid: 01 TimeSteps: 00000001 - 00001440)
STEP Day HH:MM:SS KINETIC_ENRG POTEN_ENRG TOTAL_ENRG NET_VOLUME
C => (i,j,k) Cu Cv Cw Max Speed
0 0 00:00:00 0.000000E+00 2.088931E+02 2.088931E+02 6.338668E+10
(00,000,00) 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00
DEF_HIS - creating history file: ocean_his.nc
WRT_HIS - wrote history fields (Index=1,1) into time record = 0000001
1 0 00:05:00 2.183920E-31 2.088931E+02 2.088931E+02 6.338668E+10
(91,178,01) 4.515118E-16 2.238342E-15 0.000000E+00 4.182053E-15
2 0 00:10:00 2.540739E-30 2.088931E+02 2.088931E+02 6.338668E+10
(08,141,16) 6.043855E-14 3.740286E-14 5.412554E-16 1.458921E-13
3 0 00:15:00 1.312643E-29 2.088931E+02 2.088931E+02 6.338668E+10
(26,163,16) 0.000000E+00 1.793247E-14 1.374884E-11 3.711014E-13
4 0 00:20:00 1.546295E-28 2.088931E+02 2.088931E+02 6.338668E+10
(21,161,16) 3.100414E-14 5.361623E-14 1.510129E-11 7.770870E-13
5 0 00:25:00 5.811475E-28 2.088931E+02 2.088931E+02 6.338668E+10
(26,163,16) 0.000000E+00 1.562411E-14 1.624741E-11 1.229629E-12
6 0 00:30:00 1.145404E-27 2.088931E+02 2.088931E+02 6.338668E+10
(07,141,01) 9.174278E-13 4.544697E-13 2.677935E-11 1.675661E-12
7 0 00:35:00 1.781146E-27 2.088931E+02 2.088931E+02 6.338668E+10
(07,141,02) 1.023950E-12 3.444682E-13 3.765840E-11 1.991298E-12
8 0 00:40:00 2.484483E-27 2.088931E+02 2.088931E+02 6.338668E+10
(07,141,02) 1.260884E-12 3.389799E-13 4.669952E-11 2.364674E-12
9 0 00:45:00 3.273220E-27 2.088931E+02 2.088931E+02 6.338668E+10
(07,141,02) 1.566261E-12 2.484535E-13 5.419638E-11 2.768089E-12
10 0 00:50:00 4.385100E-27 2.088931E+02 2.088931E+02 6.338668E+10
(04,139,16) 0.000000E+00 7.169810E-14 7.756428E-11 3.953831E-12
11 0 00:55:00 6.496698E-27 2.088931E+02 2.088931E+02 6.338668E+10
(04,139,16) 0.000000E+00 1.311657E-13 1.327058E-10 6.644153E-12
12 0 01:00:00 1.148771E-26 2.088931E+02 2.088931E+02 6.338668E+10
(04,139,16) 0.000000E+00 2.343541E-13 2.285201E-10 1.120450E-11
..............................
..............................
Re: SOURCE POINT FOR RIVER RUNOFF
What do you think you have for forcing? Those are some very small numbers for maximum velocity. Maybe it's right, starting from rest.
Re: SOURCE POINT FOR RIVER RUNOFF
yes, because you are using a currents-only BBL (either UV_LOGDRAG or UV_LDRAG). Waves are required instead by SSW_BBL.dnavidad wrote: with this options compile without complaints about waves.
Looking at your CPPdefs, I see that you have all OBC for passive tracers. But I guess you have to define also T_PASSIVE in order to actually activate passive tracers in the model (do you want to activate them?!?).
You should also consider using NONLIN_EOS.
Do you really need now WET_DRY? Maybe you want to use this options in a later stage, when you have a robust basic configuration already running.
-J.
Re: SOURCE POINT FOR RIVER RUNOFF
Hi,
When I try to create a NetCDF file from the original frc_rivers.cdl and also with a version based on the script posted by Kate (see below), I received the following message:
/usr/local/bin/ncgen -b frc_rivers.cdl
ncgen: frc_rivers.cdl: syntax error
Could you help me please?
Thanks in advence... Best regards
netcdf frc_rivers {
dimensions:
xi = 642 ;
eta = 226 ;
s_rho = 42 ;
time = UNLIMITED ; // (0 currently)
river = 1 ;
river_time = 576 ;
variables:
double time(time) ;
time:long_name = "river time" ;
time:units = "days since 1899-12-31 00:00:00 GMT" ;
time:field = "river_time, scalar, series" ;
double river(river) ;
river:long_name = "river runoff identification number" ;
river:units = "nondimensional" ;
river:field = "river, scalar" ;
double river_Xposition(river) ;
river_Xposition:long_name = "river XI-position at RHO-points" ;
river_Xposition:units = "nondimensional" ;
river_Xposition:valid_min = 1. ;
river_Xposition:valid_max = 641. ;
river_Xposition:field = "river_Xposition, scalar" ;
double river_Eposition(river) ;
river_Eposition:long_name = "river ETA-position at RHO-points" ;
river_Eposition:units = "nondimensional" ;
river_Eposition:valid_min = 1. ;
river_Eposition:valid_max = 225. ;
river_Eposition:field = "river_Eposition, scalar" ;
double river_direction(river) ;
river_direction:long_name = "river runoff direction" ;
river_direction:units = "nondimensional" ;
river_direction:field = "river_direction, scalar" ;
double river_flag(river) ;
river_flag:long_name = "river runoff tracer flag" ;
river_flag:option_0 = "all tracers are off" ;
river_flag:option_1 = "only temperature is on" ;
river_flag:option_2 = "only salinity is on" ;
river_flag:option_3 = "both temperature and salinity are on" ;
river_flag:units = "nondimensional" ;
river_flag:field = "river_flag, scalar" ;
double river_Vshape(s_rho, river) ;
river_Vshape:long_name = "river runoff mass transport vertical profile" ;
river_Vshape:units = "nondimensional" ;
river_Vshape:field = "river_Vshape, scalar" ;
double river_time(river_time) ;
river_time:long_name = "river runoff time" ;
river_time:units = "days since 1899-12-31 00:00:00 GMT" ;
river_time:field = "river_time, scalar, series" ;
double river_transport(river_time, river) ;
river_transport:long_name = "river runoff vertically integrated mass transport" ;
river_transport:units = "meter3 second-1" ;
river_transport:field = "river_transport, scalar, series" ;
river_transport:time = "river_time" ;
double river_temp(river_time, s_rho, river) ;
river_temp:long_name = "river runoff potential temperature" ;
river_temp:units = "Celsius" ;
river_temp:field = "river_temp, scalar, series" ;
river_temp:time = "river_time" ;
double river_salt(river_time, s_rho, river) ;
river_salt:long_name = "river runoff salinity" ;
river_salt:units = "PSU" ;
river_salt:field = "river_salt, scalar, series" ;
river_salt:time = "river_time" ;
// global attributes:
:type = "FORCING file" ;
:history = "River Forcing" ;
:rivers = "RIVER" ;
}
Miguel
When I try to create a NetCDF file from the original frc_rivers.cdl and also with a version based on the script posted by Kate (see below), I received the following message:
/usr/local/bin/ncgen -b frc_rivers.cdl
ncgen: frc_rivers.cdl: syntax error
Could you help me please?
Thanks in advence... Best regards
netcdf frc_rivers {
dimensions:
xi = 642 ;
eta = 226 ;
s_rho = 42 ;
time = UNLIMITED ; // (0 currently)
river = 1 ;
river_time = 576 ;
variables:
double time(time) ;
time:long_name = "river time" ;
time:units = "days since 1899-12-31 00:00:00 GMT" ;
time:field = "river_time, scalar, series" ;
double river(river) ;
river:long_name = "river runoff identification number" ;
river:units = "nondimensional" ;
river:field = "river, scalar" ;
double river_Xposition(river) ;
river_Xposition:long_name = "river XI-position at RHO-points" ;
river_Xposition:units = "nondimensional" ;
river_Xposition:valid_min = 1. ;
river_Xposition:valid_max = 641. ;
river_Xposition:field = "river_Xposition, scalar" ;
double river_Eposition(river) ;
river_Eposition:long_name = "river ETA-position at RHO-points" ;
river_Eposition:units = "nondimensional" ;
river_Eposition:valid_min = 1. ;
river_Eposition:valid_max = 225. ;
river_Eposition:field = "river_Eposition, scalar" ;
double river_direction(river) ;
river_direction:long_name = "river runoff direction" ;
river_direction:units = "nondimensional" ;
river_direction:field = "river_direction, scalar" ;
double river_flag(river) ;
river_flag:long_name = "river runoff tracer flag" ;
river_flag:option_0 = "all tracers are off" ;
river_flag:option_1 = "only temperature is on" ;
river_flag:option_2 = "only salinity is on" ;
river_flag:option_3 = "both temperature and salinity are on" ;
river_flag:units = "nondimensional" ;
river_flag:field = "river_flag, scalar" ;
double river_Vshape(s_rho, river) ;
river_Vshape:long_name = "river runoff mass transport vertical profile" ;
river_Vshape:units = "nondimensional" ;
river_Vshape:field = "river_Vshape, scalar" ;
double river_time(river_time) ;
river_time:long_name = "river runoff time" ;
river_time:units = "days since 1899-12-31 00:00:00 GMT" ;
river_time:field = "river_time, scalar, series" ;
double river_transport(river_time, river) ;
river_transport:long_name = "river runoff vertically integrated mass transport" ;
river_transport:units = "meter3 second-1" ;
river_transport:field = "river_transport, scalar, series" ;
river_transport:time = "river_time" ;
double river_temp(river_time, s_rho, river) ;
river_temp:long_name = "river runoff potential temperature" ;
river_temp:units = "Celsius" ;
river_temp:field = "river_temp, scalar, series" ;
river_temp:time = "river_time" ;
double river_salt(river_time, s_rho, river) ;
river_salt:long_name = "river runoff salinity" ;
river_salt:units = "PSU" ;
river_salt:field = "river_salt, scalar, series" ;
river_salt:time = "river_time" ;
// global attributes:
:type = "FORCING file" ;
:history = "River Forcing" ;
:rivers = "RIVER" ;
}
Miguel
Re: SOURCE POINT FOR RIVER RUNOFF
Hello Miguel,
sorry, i am just a very beginner in roms, i would not know where your problem is.
the kate's script pasted in the previous post worked for me, i could generate my .nc file with it althoug i have not run the model for this case yet, (i am solving other issues before using the source point).
Anyway it is strange you don't get any other error that "syntax error". in my case the line was indicated in this message.
The only advise i could give you is to use first the kate's script, check out that it is working obtaining the .nc file and, after that, to change or add your parameters. (maybe you already did that).
best regards.
sorry, i am just a very beginner in roms, i would not know where your problem is.
the kate's script pasted in the previous post worked for me, i could generate my .nc file with it althoug i have not run the model for this case yet, (i am solving other issues before using the source point).
Anyway it is strange you don't get any other error that "syntax error". in my case the line was indicated in this message.
The only advise i could give you is to use first the kate's script, check out that it is working obtaining the .nc file and, after that, to change or add your parameters. (maybe you already did that).
best regards.
Re: SOURCE POINT FOR RIVER RUNOFF
hello kate,kate wrote:What do you think you have for forcing? Those are some very small numbers for maximum velocity. Maybe it's right, starting from rest.
I only mean that is was running, i think now the fine job left to do. let me post some output stuff from roms at the beginning, maybe it can make you say it is something wrong from first view.
........
........
Centers of gravity and integrals (values must be 1, 1, approx 1/2, 1, 1):
1.000000000000 1.047601458608 0.523800729304 1.000000000000 1.000000000000
Power filter parameters, Fgamma, gamma = 0.28400 0.18933
Minimum X-grid spacing, DXmin = 2.92734535E-01 km
Maximum X-grid spacing, DXmax = 7.91470778E-01 km
Minimum Y-grid spacing, DYmin = 2.57070211E-01 km
Maximum Y-grid spacing, DYmax = 7.08989912E-01 km
Minimum Z-grid spacing, DZmin = 1.88264045E-16 m
Maximum Z-grid spacing, DZmax = 1.53502527E+01 m
Minimum barotropic Courant Number = 9.55767372E-09
Maximum barotropic Courant Number = 1.28308657E+00
Maximum Coriolis Courant Number = 2.64545788E-02
Maximum grid stiffness ratios: rx0 = 1.000000E+00 (Beckmann and Haidvogel)
rx1 = 1.063412E+01 (Haney)
Initial basin volumes: TotVolume = 6.3325487059E+10 m3
MinVolume = 2.7061772017E-11 m3
MaxVolume = 2.5843821828E+06 m3
Max/Min = 9.5499370150E+16
The first number that i was surprised with are the initial basin volumes. i guess that is the total volumen of water in my area.
Regarding the forcing, my idea was to start with the minimun stuff. I am using the "ana_initial" option and letting the zero condition.
Regarding the boundary conditions, for free surface i copied the inlet test
Code: Select all
#elif defined GUADALQUIVIR_TEST1
# ifdef WEST_FSOBC
IF (WESTERN_EDGE) THEN
cff=2.0_r8*SIN(2.0_r8*pi*time(ng)/(12.0_r8*3600.0_r8))
DO j=JstrR,JendR
BOUNDARY(ng)%zeta_west(j)=cff
END DO
END IF
# endif
By the way the running is blowing up
.............................
.............................
57 0 04:45:00 4.772692E-06 2.088949E+02 2.088949E+02 6.338601E+10
(04,139,16) 0.000000E+00 7.164951E-03 9.423976E+00 3.223799E-01
58 0 04:50:00 1.473244E-05 2.088962E+02 2.088962E+02 6.338551E+10
(01,140,16) 3.346110E-02 0.000000E+00 2.855273E+01 5.992370E-01
59 0 04:55:00 4.497088E-05 2.088986E+02 2.088986E+02 6.338462E+10
(01,140,16) 2.383901E-03 0.000000E+00 7.887075E+01 1.109832E+00
60 0 05:00:00 1.290142E-04 2.089025E+02 2.089026E+02 6.338317E+10
(08,141,16) 8.260172E-03 2.795421E-03 6.774371E+01 2.037138E+00
61 0 05:05:00 2.856477E-04 2.089087E+02 2.089089E+02 6.338098E+10
(01,143,16) 0.000000E+00 1.253453E-01 2.974339E+02 3.912140E+00
62 0 05:10:00 NaN NaN NaN NaN
(46,163,16) 5.398759E-05 5.566224E-05 3.020733E-03 3.012407E-05
Blowing-up: Saving latest model state into RESTART file
WRT_RST - wrote re-start fields (Index=1,1) into time record = 0000001
thanks.
Re: SOURCE POINT FOR RIVER RUNOFF
hi, many thanks for take a look. most of them options was heredit from test cases script so i am glad that you do comments about becuase maybe some of the doesn't make sense. So the bbl issue it is ok, regarding the passive tracer i am not very familiar with that so i don't know how much necessary they are or how many really i nedd to run the model only with tides and do a check of the model in my place, any advise it is wellcome. i also define NONLIN_EOS.jacopo wrote:yes, because you are using a currents-only BBL (either UV_LOGDRAG or UV_LDRAG). Waves are required instead by SSW_BBL.dnavidad wrote: with this options compile without complaints about waves.
Looking at your CPPdefs, I see that you have all OBC for passive tracers. But I guess you have to define also T_PASSIVE in order to actually activate passive tracers in the model (do you want to activate them?!?).
You should also consider using NONLIN_EOS.
Do you really need now WET_DRY? Maybe you want to use this options in a later stage, when you have a robust basic configuration already running.
-J.
thanks.
Re: SOURCE POINT FOR RIVER RUNOFF
If it blows up that quickly, it might be a timestepping issue. Does it run longer with a shorter timestep? If not, it's something else and you'll have to see where the trouble is happening by investigating the output files.
Re: SOURCE POINT FOR RIVER RUNOFF
i am still plotting result and testing with tiddlyspot tools.
All the variables 'u',.. seems to be zero.
and i only could plot one time step, see below
i am excited to get correct result soon and start to have a robust model for my place (after 60 post).
thanks for you help kate.
All the variables 'u',.. seems to be zero.
and i only could plot one time step, see below
by the way, where or how could i change the time step? i guess in .in file, is it?Requested time index 2 not available
There are 1 time records in ocean_his.nc
i am excited to get correct result soon and start to have a robust model for my place (after 60 post).
thanks for you help kate.
Re: SOURCE POINT FOR RIVER RUNOFF
the boundary condition for free surface is
cff=-1.0_r8*sin(2.0_r8*pi*time(ng)/(12.0_r8*3600.0_r8))
so T=12h
i checked out the time steeping, i had the default
thanks
cff=-1.0_r8*sin(2.0_r8*pi*time(ng)/(12.0_r8*3600.0_r8))
so T=12h
i checked out the time steeping, i had the default
300s should be enought, isn't? or there is something else to take into account.NTIMES = 1440 ! Number of time steps
DT == 300.0d0 ! Time-step size (seconds)
NDTFAST == 30 ! Number of barotropic steps
thanks
Re: SOURCE POINT FOR RIVER RUNOFF
By the way, (i promise that i didn't change nothing from the last run), why i had this error now?
Initial basin volumes: TotVolume = NaN m3
MinVolume = 8.6936641795E+03 m3
MaxVolume = 1.1015613641E+05 m3
Max/Min = 1.2670852489E+01
NL ROMS/TOMS: started time-stepping: (Grid: 01 TimeSteps: 00000001 - 00001440)
STEP Day HH:MM:SS KINETIC_ENRG POTEN_ENRG TOTAL_ENRG NET_VOLUME
C => (i,j,k) Cu Cv Cw Max Speed
0 0 00:00:00 NaN NaN NaN NaN
(00,000,00) 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00
Elapsed CPU time (seconds):
Thread # 0 CPU: 0.367
Total: 0.367
Nonlinear model elapsed time profile:
Initialization ................................... 0.117 (31.8800 %)
Processing of input data ......................... 0.001 ( 0.2725 %)
Computation of global information integrals ...... 0.017 ( 4.6323 %)
2D/3D coupling, vertical metrics ................. 0.030 ( 8.1742 %)
Omega vertical velocity .......................... 0.004 ( 1.0901 %)
Equation of state for seawater ................... 0.066 (17.9836 %)
Total: 0.235 64.0328
All percentages are with respect to total time = 0.367
ROMS/TOMS - Output NetCDF summary for Grid 01:
Analytical header files used:
ROMS/Functionals/ana_btflux.h
ROMS/Functionals/ana_fsobc.h
ROMS/Functionals/ana_initial.h
ROMS/Functionals/ana_m2obc.h
ROMS/Functionals/ana_m3obc.h
ROMS/Functionals/ana_smflux.h
ROMS/Functionals/ana_stflux.h
ROMS/TOMS - Blows up ................ exit_flag: 1
Re: SOURCE POINT FOR RIVER RUNOFF
Yes, you need to worry about the water depth, your grid spacing, and the speed of waves.
What do you have for these values in your output? These are numbers from my Northeast Pacific, which is stable.
What do you have for these values in your output?
Code: Select all
Minimum barotropic Courant Number = 1.38305599E-02
Maximum barotropic Courant Number = 3.71291754E-01
Maximum Coriolis Courant Number = 3.11287252E-02
Re: SOURCE POINT FOR RIVER RUNOFF
there is a zero. I am not activate "UV_COR" should i do?
Minimum barotropic Courant Number = 0.00000000E+00
Maximum barotropic Courant Number = 1.28308657E+00
Maximum Coriolis Courant Number = 2.64545788E-02
Re: SOURCE POINT FOR RIVER RUNOFF
can i change these values or are they fixed by the initial conditions?
i don't see anything in ocean_guadalquivir.in.
i don't see anything in ocean_guadalquivir.in.
Re: SOURCE POINT FOR RIVER RUNOFF
You need to try a shorter barotropic timestep. Either a shorter DT or a larger NDTFAST.dnavidad wrote:Code: Select all
Maximum barotropic Courant Number = 1.28308657E+00
Don't worry about the zero minimum. The UV_COR is for the Coriolis term in the momentum equations. Do you want it or do you want a non-rotating solution?there is a zero. I am not activate "UV_COR" should i do?
The way to find out where these Courant numbers come from is to search the code:
Code: Select all
grep 'Maximum barotropic Courant' */*/*
ROMS/Utility/metrics.F: & ' Maximum barotropic Courant Number = ', 1pe15.8,/, &
Code: Select all
!-----------------------------------------------------------------------
! Compute gravity waves Courant number.
!-----------------------------------------------------------------------
!
! The 2D Courant number is defined as:
!
! Cg = c * dt * SQRT (1/dx^2 + 1/dy^2)
!
! where c=SQRT(g*h) is gravity wave speed, and dx, dy are grid spacing
! in each direction.
Re: SOURCE POINT FOR RIVER RUNOFF
well... i think is worst the 1.2 for courant number...
Re: SOURCE POINT FOR RIVER RUNOFF
thanks,
i knew that courant number has to be less than 1 if not numerical wave will move faster than physical wave. for instance advection equation. i tried to decrease dt but still blowing up. let me do some trial and let same values than you.
sincerely thanks for you help. very grateful.
i knew that courant number has to be less than 1 if not numerical wave will move faster than physical wave. for instance advection equation. i tried to decrease dt but still blowing up. let me do some trial and let same values than you.
sincerely thanks for you help. very grateful.
Re: SOURCE POINT FOR RIVER RUNOFF
i tried smaller time steps:
1)
DT == 100.0d0 ! Time-step size (seconds)
NDTFAST == 30 ! Number of barotropic steps
Minimum barotropic Courant Number = 0.00000000E+00
Maximum barotropic Courant Number = 4.27695523E-01
Maximum Coriolis Courant Number = 8.81819295E-03
2) i tried also DT as before 300s and a higher NDTFAST=100
Minimum barotropic Courant Number = 0.00000000E+00
Maximum barotropic Courant Number = 3.84925971E-01
Maximum Coriolis Courant Number = 2.64545788E-02
3)
NTIMES = 1440 ! Number of time steps
DT == 5 ! Time-step size (seconds)
NDTFAST == 100 ! Number of barotropic steps
Minimum barotropic Courant Number = 0.00000000E+00
Maximum barotropic Courant Number = 6.41543285E-03
Maximum Coriolis Courant Number = 4.40909647E-04
for all the case i have the same error
thanks.
1)
DT == 100.0d0 ! Time-step size (seconds)
NDTFAST == 30 ! Number of barotropic steps
Minimum barotropic Courant Number = 0.00000000E+00
Maximum barotropic Courant Number = 4.27695523E-01
Maximum Coriolis Courant Number = 8.81819295E-03
2) i tried also DT as before 300s and a higher NDTFAST=100
Minimum barotropic Courant Number = 0.00000000E+00
Maximum barotropic Courant Number = 3.84925971E-01
Maximum Coriolis Courant Number = 2.64545788E-02
3)
NTIMES = 1440 ! Number of time steps
DT == 5 ! Time-step size (seconds)
NDTFAST == 100 ! Number of barotropic steps
Minimum barotropic Courant Number = 0.00000000E+00
Maximum barotropic Courant Number = 6.41543285E-03
Maximum Coriolis Courant Number = 4.40909647E-04
for all the case i have the same error
STEP Day HH:MM:SS KINETIC_ENRG POTEN_ENRG TOTAL_ENRG NET_VOLUME
C => (i,j,k) Cu Cv Cw Max Speed
0 0 00:00:00 NaN NaN NaN NaN
(00,000,00) 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00
..................
.................
ROMS/TOMS - Blows up ................ exit_flag: 1
MAIN: Abnormal termination: BLOWUP.
thanks.
Re: SOURCE POINT FOR RIVER RUNOFF
Then it isn't just the timestep that's the problem. You need to develop some debugging skills to figure this out on your own. I guess I'd start by investigating your initial conditions, etc. Are they from netcdf files? If so, run ncview on all the fields.
Off to solve my own new-domain issues...
Off to solve my own new-domain issues...
Re: SOURCE POINT FOR RIVER RUNOFF
but the NaN for TotVolume i think is the problem, maybe they are related.
Initial basin volumes: TotVolume = NaN m3
MinVolume = 8.6936641795E+03 m3
MaxVolume = 1.1015613641E+05 m3
Max/Min = 1.2670852489E+01
NL ROMS/TOMS: started time-stepping: (Grid: 01 TimeSteps: 00000001 - 00001440)
STEP Day HH:MM:SS KINETIC_ENRG POTEN_ENRG TOTAL_ENRG NET_VOLUME
C => (i,j,k) Cu Cv Cw Max Speed
0 0 00:00:00 NaN NaN NaN NaN
(00,000,00) 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00
Re: SOURCE POINT FOR RIVER RUNOFF
Maybe so. Where did you get the grid from? Have you looked at the grid file with ncview?
Re: SOURCE POINT FOR RIVER RUNOFF
kate the grid comes from seagrid. i had problem at the beginning with seagrid.
A couple of things:
1. i took a look to the results when the models run once and blowed up.
(so the results are zero for all variable and olnly one step was saved)
A couple of things:
1. i took a look to the results when the models run once and blowed up.
(so the results are zero for all variable and olnly one step was saved)
[dnavidad@darkstar ~]$ /opt/netcdf/3.5.1-intel/bin/nc
ncdump ncgen
Re: SOURCE POINT FOR RIVER RUNOFF
What is the circled value and what are all the green values? That's the u field, but did you look at the depth and pm, pn values in the grid file? Those all have to be non-zero and finite.
Re: SOURCE POINT FOR RIVER RUNOFF
the green valued it is the 'u' field at some depth. IT is all zero valued, and i realized that there was a hole inside the circle, so that means sure there is a NaN value there maybe due to something wrong in the grid. Probably that the reason why i obtain
Initial basin volumes: TotVolume = NaN m3.
maybe some depth is NaN. i think maybe a finer grid would be better but before that:
i am trying all the command ncdump, ncview in matlab but i don't no why it is not working.
>ncdump
i installed again the netcdf tools. what i am doing wrong?
Initial basin volumes: TotVolume = NaN m3.
maybe some depth is NaN. i think maybe a finer grid would be better but before that:
i am trying all the command ncdump, ncview in matlab but i don't no why it is not working.
>ncdump
??? Undefined function or variable "fcn".
Error in ==> ncmex at 108
[varargout{:}] = feval(fcn, varargin{:});
Error in ==> netcdf.open at 20
[theNCid, status] = ncmex('open', name(self), thePermission);
Error in ==> netcdf.netcdf at 431
result = open(result, thePermission);
Error in ==> ncdump at 58
nc = netcdf(theNetCDFFile, 'nowrite');
i installed again the netcdf tools. what i am doing wrong?
Re: SOURCE POINT FOR RIVER RUNOFF
ncview is a program outside of Matlab. I also use the ncdump that's outside of Matlab.
Re: SOURCE POINT FOR RIVER RUNOFF
Code: Select all
> which nc_varget
D:\MATLAB_PATH\mexcdf\snctools\nc_varget.m
Code: Select all
>> tnetcdf
## http://crusty.er.usgs.gov/~cdenham
## NetCDF Toolbox For Matlab-5.
## Version of 30-Apr-2003 11:16:19
## TNETCDF: Using file "foo.nc"
??? Undefined function or variable "fcn".
Error in ==> ncmex at 108
[varargout{:}] = feval(fcn, varargin{:});
Error in ==> ncitem.options at 21
result = ncmex('setopts', theOptions);
Error in ==> tnetcdf at 54
oldOptions = options(ncitem, 0); % Quiet mode.
Code: Select all
>> which('netcdf','-all')
D:\MATLAB_PATH\netcdf_toolbox\netcdf\@netcdf\netcdf.m % netcdf constructor
D:\MATLAB_PATH\matlab_roms\netcdf\@netcdf\netcdf.m % Shadowed netcdf constructor
>> which('mexnc','-all')
D:\MATLAB_PATH\mexcdf\mexnc\mexnc.m
so, is it well installed?
Re: SOURCE POINT FOR RIVER RUNOFF
sorry i thought that it was a command like ncdump or ncgen. i used that under linux. but they are not working for me in matlab. (they used to)kate wrote:ncview is a program outside of Matlab. I also use the ncdump that's outside of Matlab.
thanks kate.
very gratefull.
Re: SOURCE POINT FOR RIVER RUNOFF
i could get to work with ncview. The grid cover an area of approx. 35km x 27km with dx=118m dy=89m, respectively.kate wrote:Maybe so. Where did you get the grid from? Have you looked at the grid file with ncview?
i took a look to several variables with ncview, for instance pn and pm, whose values are nonzero and finite. the typical values are 0.008 for pm 0.009 for pn.
regarding h, i've enclosed a figure. coast seems to be not well defined the in the mouth area (land and water is mixing?)
i get NaN for the initial basin volumns, Minimum anbd maximun Z-grid spacing and Maximum grid stiffness ratios:
these are the values of courant number, for Dt=5s
Minimum barotropic Courant Number = 0.00000000E+00
Maximum barotropic Courant Number = 1.00787915E-02
Maximum Coriolis Courant Number = 8.77401737E-05
many thanks.
Last edited by dnavidad on Tue Jun 21, 2011 4:52 pm, edited 1 time in total.
Re: SOURCE POINT FOR RIVER RUNOFF
The numbers you give at the bottom there for the range of h look more like your pm/pn numbers. h is the depth in meters and should be nonzero everywhere - unless you have WET_DRY defined.
Re: SOURCE POINT FOR RIVER RUNOFF
yes, you are right that are the values for pn and pm (just i copied the caption for the figures of pn and pm), the depth range values varies between 65m and 0 (approx) for the sea and also i have negative values for land in my original file. wet/dry it is not define yet.
let enclose again.
many thanks.
let enclose again.
many thanks.
-
- Posts: 81
- Joined: Thu Dec 07, 2006 3:14 pm
- Location: USGS
- Contact:
Re: SOURCE POINT FOR RIVER RUNOFF
I would suggest setting your minimum depth to a positive number (say 2 m) and see if it will run this time. It seems to me that you might be having a problem with the depth values. Do you think you might have a grid point that has not been masked properly and has a depth of 0 m maybe?
Zafer
Zafer
Re: SOURCE POINT FOR RIVER RUNOFF
Hi Zafer and Kate
Now the model is running in my grid but just a simple question (maybe dumb) about to set a minimum depth and masking when making the grid.
i used easygrid to make the grid and this matlab code let you to set a minimum depth (around the maximun tidal variation) as, maybe, you know. In my case i am using negative and positive bathymetric data with the aim to take into account the potential flooding. In such case i activate the wet_dry option in roms and i am not choosing any minimum depth when making the grid via easygrid. In case i wouldn't want to use this option (wet_dry) and keep the same bathymetric file (+,- values) should be enough to deactivate wet_dry and to activate masking in roms? or will i still have problem with zero values and in this case remake a grid with this depth offset?
thanks in advance.
Now the model is running in my grid but just a simple question (maybe dumb) about to set a minimum depth and masking when making the grid.
i used easygrid to make the grid and this matlab code let you to set a minimum depth (around the maximun tidal variation) as, maybe, you know. In my case i am using negative and positive bathymetric data with the aim to take into account the potential flooding. In such case i activate the wet_dry option in roms and i am not choosing any minimum depth when making the grid via easygrid. In case i wouldn't want to use this option (wet_dry) and keep the same bathymetric file (+,- values) should be enough to deactivate wet_dry and to activate masking in roms? or will i still have problem with zero values and in this case remake a grid with this depth offset?
thanks in advance.
-
- Posts: 81
- Joined: Thu Dec 07, 2006 3:14 pm
- Location: USGS
- Contact:
Re: SOURCE POINT FOR RIVER RUNOFF
I assume you will still have a problem with the grid points shallower than the minimum of your tidal range. They will go dry and the model will blow up. You will need to set a minimum depth to solve this issue.
Zafer
Zafer
Re: SOURCE POINT FOR RIVER RUNOFF
Thanks for you reply, very gratefull.
I am not sure about that, but i could be wrong. When would you expect the model blowup for this kind of issue? i am testing with a T=12h, with 2.m of amplitude and the model blowup at 5176s also i observe very high values for free surface and velocities in the domain so it looks like the coast line area is working like a reflecting wall, instead of a wet_dry problem. Should i expect any specific error message due to get dry points like, for instance, something wrong in the total volume during the computation?
Also i have tried with and without this offset depth, ie 0 and 2.5m. Always with the negative values included in my grid file and no many differences are observed.
thanks in advance.
I am not sure about that, but i could be wrong. When would you expect the model blowup for this kind of issue? i am testing with a T=12h, with 2.m of amplitude and the model blowup at 5176s also i observe very high values for free surface and velocities in the domain so it looks like the coast line area is working like a reflecting wall, instead of a wet_dry problem. Should i expect any specific error message due to get dry points like, for instance, something wrong in the total volume during the computation?
Also i have tried with and without this offset depth, ie 0 and 2.5m. Always with the negative values included in my grid file and no many differences are observed.
thanks in advance.
Re: SOURCE POINT FOR RIVER RUNOFF
Regarding to the source point for river runoff i would like to introduce one my area like the picture indicated, please see attachment.
the first idea i've got was based on ANA_PSOURCE, TS_PSOURCE, UV_PSOURCE or "analytical way". After read the Arango's post viewtopic.php?f=30&t=1733&p=6270&hilit=TS_PSOURCE#p6270 and thinking on to develop a robust model for further realistic applications seem much more reasonable try the "netcdf file way".
I think that "analytical way", at first view, seems easier to understand and to get an idea on how river is being modelling. So, one should be able to specify
* Numbers of point, Nsrc, direction (eta or x directions), Dsrc, and index coordinates Isrc, Jsrc
* integrated mass transport (m3/s) Qbar (positive or negative)
* 3D distribution, if define 3D, for temperature and salinity Tsrc(is,k,itemp),Tsrc(is,k,isalt)
but as it is warned in the former link "we are representing an estuary with a single point". Please, just let me post some question about how to proceed in the second way to get an good idea how it works.
"netcdf way"
* from a .cdl you have to generate the netcdf file with ncgen -b filename.cdl. The .cdl file i have, posted by kate before, it is working (i can generate the netcdf file). i guess that the name of the .nc river file has to been provided in .in file.
* i assume that "xi", "eta" are the index where the source it is located and "s_rho" the sigma coordinate where to locate vertically the source. So, seems like again a simple point it has been specifying. am i wrong with that or another extra information would have been provided like shape or contour of the river, max and min coordinates of the river inside the grid,.....
* what are the variables "river" and "river time"?
* river_Xposition:valid_min, river_Xposition:valid_max, river_Eposition:valid_min, river_Eposition:valid_max would be the max-min index that river could be use (so these values have to match with the max-min index grid ones)
* i want to use both temp and salinity, i saw "river_flag:option_3", how to specify this flag? How to provide they values
* how to specify the Qbar in this case?
* should i still keep defined UV_PSOURCE or TS_PSOURCE in my .h file?
Among the grid file i never try to do a netcdf file. Some help or also ROMS-links to overcome the doubts will be very welcome.
Many thanks in advance.
the first idea i've got was based on ANA_PSOURCE, TS_PSOURCE, UV_PSOURCE or "analytical way". After read the Arango's post viewtopic.php?f=30&t=1733&p=6270&hilit=TS_PSOURCE#p6270 and thinking on to develop a robust model for further realistic applications seem much more reasonable try the "netcdf file way".
I think that "analytical way", at first view, seems easier to understand and to get an idea on how river is being modelling. So, one should be able to specify
* Numbers of point, Nsrc, direction (eta or x directions), Dsrc, and index coordinates Isrc, Jsrc
* integrated mass transport (m3/s) Qbar (positive or negative)
* 3D distribution, if define 3D, for temperature and salinity Tsrc(is,k,itemp),Tsrc(is,k,isalt)
but as it is warned in the former link "we are representing an estuary with a single point". Please, just let me post some question about how to proceed in the second way to get an good idea how it works.
"netcdf way"
* from a .cdl you have to generate the netcdf file with ncgen -b filename.cdl. The .cdl file i have, posted by kate before, it is working (i can generate the netcdf file). i guess that the name of the .nc river file has to been provided in .in file.
* i assume that "xi", "eta" are the index where the source it is located and "s_rho" the sigma coordinate where to locate vertically the source. So, seems like again a simple point it has been specifying. am i wrong with that or another extra information would have been provided like shape or contour of the river, max and min coordinates of the river inside the grid,.....
* what are the variables "river" and "river time"?
* river_Xposition:valid_min, river_Xposition:valid_max, river_Eposition:valid_min, river_Eposition:valid_max would be the max-min index that river could be use (so these values have to match with the max-min index grid ones)
* i want to use both temp and salinity, i saw "river_flag:option_3", how to specify this flag? How to provide they values
* how to specify the Qbar in this case?
* should i still keep defined UV_PSOURCE or TS_PSOURCE in my .h file?
Among the grid file i never try to do a netcdf file. Some help or also ROMS-links to overcome the doubts will be very welcome.
Many thanks in advance.
Code: Select all
netcdf NEP4_rivers_my_river {
dimensions:
xi = 642 ;
eta = 226 ;
s_rho = 42 ;
time = UNLIMITED ; // (0 currently)
river = 242 ;
river_time = 576 ;
variables:
double time(time) ;
time:long_name = "river time" ;
time:units = "days since 1899-12-31 00:00:00 GMT" ;
time:field = "river_time, scalar, series" ;
double river(river) ;
river:long_name = "river runoff identification number" ;
river:units = "nondimensional" ;
river:field = "river, scalar" ;
double river_Xposition(river) ;
river_Xposition:long_name = "river XI-position at RHO-points" ;
river_Xposition:units = "nondimensional" ;
river_Xposition:valid_min = 1. ;
river_Xposition:valid_max = 641. ;
river_Xposition:field = "river_Xposition, scalar" ;
double river_Eposition(river) ;
river_Eposition:long_name = "river ETA-position at RHO-points" ;
river_Eposition:units = "nondimensional" ;
river_Eposition:valid_min = 1. ;
river_Eposition:valid_max = 225. ;
river_Eposition:field = "river_Eposition, scalar" ;
double river_direction(river) ;
river_direction:long_name = "river runoff direction" ;
river_direction:units = "nondimensional" ;
river_direction:field = "river_direction, scalar" ;
double river_flag(river) ;
river_flag:long_name = "river runoff tracer flag" ;
river_flag:option_0 = "all tracers are off" ;
river_flag:option_1 = "only temperature is on" ;
river_flag:option_2 = "only salinity is on" ;
river_flag:option_3 = "both temperature and salinity are on" ;
river_flag:units = "nondimensional" ;
river_flag:field = "river_flag, scalar" ;
double river_Vshape(s_rho, river) ;
river_Vshape:long_name = "river runoff mass transport vertical profile" ;
river_Vshape:units = "nondimensional" ;
river_Vshape:field = "river_Vshape, scalar" ;
double river_time(river_time) ;
river_time:long_name = "river runoff time" ;
river_time:units = "days since 1899-12-31 00:00:00 GMT" ;
river_time:field = "river_time, scalar, series" ;
double river_transport(river_time, river) ;
river_transport:long_name = "river runoff vertically integrated mass transport" ;
river_transport:units = "meter3 second-1" ;
river_transport:field = "river_transport, scalar, series" ;
river_transport:time = "river_time" ;
double river_temp(river_time, s_rho, river) ;
river_temp:long_name = "river runoff potential temperature" ;
river_temp:units = "Celsius" ;
river_temp:field = "river_temp, scalar, series" ;
river_temp:time = "river_time" ;
double river_salt(river_time, s_rho, river) ;
river_salt:long_name = "river runoff salinity" ;
river_salt:units = "PSU" ;
river_salt:field = "river_salt, scalar, series" ;
river_salt:time = "river_time" ;
// global attributes:
:type = "NEP4b FORCING file" ;
:history = "NorthEast Pacific" ;
:rivers = "AK linesource,AK linesource,AK linesource,AK linesource,AK linesource,AK linesource,AK linesource,AK linesource,AK linesource,AK linesource,...,Arctic Drain,Columbia,Columbia,Copper,Yukon,Yukon,Yukon" ;
Re: SOURCE POINT FOR RIVER RUNOFF
River is just an integer, 1 to whatever.
River_time is to match your model ocean_time. The "time" in that file is not used. River_time is a dimension variable, allowing for time-dependent flow. There is some info here, but note which fields in the NetCDF have a time dimension.
I'm sure I've said elsewhere that it would behoove you to learn how to make NetCDF files in your favorite scripting language. I'm currently using NCL and Python, but the best time I had making a river file was in Perl with PDL. I'm sure most ROMS users use Matlab for these tasks.
Yes, you need to define TS_PSOURCE and UV_PSOURCE. They control the ROMS code where the rivers are actually put into the physics of the model.
You might find this powerpoint useful.
River_time is to match your model ocean_time. The "time" in that file is not used. River_time is a dimension variable, allowing for time-dependent flow. There is some info here, but note which fields in the NetCDF have a time dimension.
I'm sure I've said elsewhere that it would behoove you to learn how to make NetCDF files in your favorite scripting language. I'm currently using NCL and Python, but the best time I had making a river file was in Perl with PDL. I'm sure most ROMS users use Matlab for these tasks.
Yes, you need to define TS_PSOURCE and UV_PSOURCE. They control the ROMS code where the rivers are actually put into the physics of the model.
You might find this powerpoint useful.
Re: SOURCE POINT FOR RIVER RUNOFF
Hi kate,
thanks for reply.
i realized that most of my question could simply be answered in wikiroms link https://www.myroms.org/wiki/index.php/River_Runoff, actually, the same link you indicate in your post as "here" so, excuses for a lot of question and thanks again. At least it is clearer for me the two ways of how to proceed with the river.
Actually, i did get run the model with the source point, via single point and ana_psource.h. it is running, but in the first step i get high salinity values like hundred or so, also the initial values for salinity in the entire domain are not the ones i imposed (35) as initial condition. Let me do a finer job in the my setting up of the river and check that problems out before to expose next ones.
regarding the netcdf way, also i am working in it. by now, i am making the netcdf file from a .cdl file you post before. I don't know if it is good enough do it like this. (cdl--->netcdf with ncgen -b command). hopping that river works soon via this method.
Thanks for your ppt.
As a mark
Being honest i think that matlab is not the suitable software to make the things seriously, maybe the easiest or most friendly one to get something fast at the beginning but to do serious things, is not (although it is a very very useful and powerful tool). For instance, i have had a lot of problems with seagrid and the netcdf libraries and tools (and still have), finally i used easygrid, which is not the best one neither, but it is working. i mean that i am sure that there is (more serious) software or grid-makers , not running under matlab, to make the grid. Nothing to say for code with fortran against matlab. The same about to plot results, i am very glad with using ncview software, it is really cool. So, i hope find myself using that languages you say to make netcdf files soon.![Very Happy :D](./images/smilies/icon_biggrin.gif)
thanks for reply.
i realized that most of my question could simply be answered in wikiroms link https://www.myroms.org/wiki/index.php/River_Runoff, actually, the same link you indicate in your post as "here" so, excuses for a lot of question and thanks again. At least it is clearer for me the two ways of how to proceed with the river.
Actually, i did get run the model with the source point, via single point and ana_psource.h. it is running, but in the first step i get high salinity values like hundred or so, also the initial values for salinity in the entire domain are not the ones i imposed (35) as initial condition. Let me do a finer job in the my setting up of the river and check that problems out before to expose next ones.
regarding the netcdf way, also i am working in it. by now, i am making the netcdf file from a .cdl file you post before. I don't know if it is good enough do it like this. (cdl--->netcdf with ncgen -b command). hopping that river works soon via this method.
Thanks for your ppt.
As a mark
Being honest i think that matlab is not the suitable software to make the things seriously, maybe the easiest or most friendly one to get something fast at the beginning but to do serious things, is not (although it is a very very useful and powerful tool). For instance, i have had a lot of problems with seagrid and the netcdf libraries and tools (and still have), finally i used easygrid, which is not the best one neither, but it is working. i mean that i am sure that there is (more serious) software or grid-makers , not running under matlab, to make the grid. Nothing to say for code with fortran against matlab. The same about to plot results, i am very glad with using ncview software, it is really cool. So, i hope find myself using that languages you say to make netcdf files soon.
![Very Happy :D](./images/smilies/icon_biggrin.gif)
Re: SOURCE POINT FOR RIVER RUNOFF
I did get the error below (please see in red) providing the river runoff with netcdf file.
I guess my netcdf file for the river is not correct at all.
i set up my files following wikiroms
1. did NOT define the ANA_PSOURCE, keep TS_SOURCE,UV_SOURCE.
/*Source points*/
#define UV_PSOURCE
#define TS_PSOURCE
2. create the netcdf file
ncgen -b .cdl
3. define FRCNAME in ocean.in.
NFFILES == 1 ! number of forcing files
FRCNAME == Forcing/ocean_river_guadalquivir_frc.nc ! forcing file 1, grid 1
4. activate logical switches LtracerSrc in the ocean.in
LtracerSrc == T T F
how proceed with geometry or time parameters, salinity, temp? should i introduce the cross-section of the river? i am not clear how to proceed.
Some help or push will be welcome.
Many thanks in advance.
ERROR
GET_NGFLD - river runoff XI-positions at RHO-points
(Min = 0.00000000E+00 Max = 0.00000000E+00)
GET_NGFLD - river runoff ETA-positions at RHO-points
(Min = 0.00000000E+00 Max = 0.00000000E+00)
GET_NGFLD - river runoff direction
(Min = 0.00000000E+00 Max = 0.00000000E+00)
GET_NGFLD - river runoff mass transport vertical profile
(Min = 0.00000000E+00 Max = 0.00000000E+00)
GET_NGFLD - river runoff mass transport, t = ***** **:**:**
(Rec=0576, Index=2, File: ocean_river_guadalquivir_frc.nc)
(Tmin= 0.0000 Tmax= 0.0000)
(Min = 0.00000000E+00 Max = 0.00000000E+00)
GET_NGFLD - river runoff potential temperature, t = ***** **:**:**
(Rec=0576, Index=2, File: ocean_river_guadalquivir_frc.nc)
(Tmin= 0.0000 Tmax= 0.0000)
(Min = 0.00000000E+00 Max = 0.00000000E+00)
GET_NGFLD - river runoff salinity, t = ***** **:**:**
(Rec=0576, Index=2, File: ocean_river_guadalquivir_frc.nc)
(Tmin= 0.0000 Tmax= 0.0000)
(Min = 0.00000000E+00 Max = 0.00000000E+00)
I guess my netcdf file for the river is not correct at all.
i set up my files following wikiroms
1. did NOT define the ANA_PSOURCE, keep TS_SOURCE,UV_SOURCE.
/*Source points*/
#define UV_PSOURCE
#define TS_PSOURCE
2. create the netcdf file
ncgen -b .cdl
3. define FRCNAME in ocean.in.
NFFILES == 1 ! number of forcing files
FRCNAME == Forcing/ocean_river_guadalquivir_frc.nc ! forcing file 1, grid 1
4. activate logical switches LtracerSrc in the ocean.in
LtracerSrc == T T F
how proceed with geometry or time parameters, salinity, temp? should i introduce the cross-section of the river? i am not clear how to proceed.
Some help or push will be welcome.
Many thanks in advance.
ERROR
GET_NGFLD - river runoff XI-positions at RHO-points
(Min = 0.00000000E+00 Max = 0.00000000E+00)
GET_NGFLD - river runoff ETA-positions at RHO-points
(Min = 0.00000000E+00 Max = 0.00000000E+00)
GET_NGFLD - river runoff direction
(Min = 0.00000000E+00 Max = 0.00000000E+00)
GET_NGFLD - river runoff mass transport vertical profile
(Min = 0.00000000E+00 Max = 0.00000000E+00)
GET_NGFLD - river runoff mass transport, t = ***** **:**:**
(Rec=0576, Index=2, File: ocean_river_guadalquivir_frc.nc)
(Tmin= 0.0000 Tmax= 0.0000)
(Min = 0.00000000E+00 Max = 0.00000000E+00)
GET_NGFLD - river runoff potential temperature, t = ***** **:**:**
(Rec=0576, Index=2, File: ocean_river_guadalquivir_frc.nc)
(Tmin= 0.0000 Tmax= 0.0000)
(Min = 0.00000000E+00 Max = 0.00000000E+00)
GET_NGFLD - river runoff salinity, t = ***** **:**:**
(Rec=0576, Index=2, File: ocean_river_guadalquivir_frc.nc)
(Tmin= 0.0000 Tmax= 0.0000)
(Min = 0.00000000E+00 Max = 0.00000000E+00)
Re: SOURCE POINT FOR RIVER RUNOFF
When you use ncgen, what was in the source file? I probably just gave you the header. Are there any values in there for the variables? You need to set those somehow. You can run a full "ncdump" on the netcdf file to see the data values. Ncview is another way to see what's really in the file. You can also ncdump into a file, set the data, then run ncgen again.
Re: SOURCE POINT FOR RIVER RUNOFF
thanks kate.
Yes, i think that not all variables are includes or at least not well included. That is what i really want to learn how to do it. Very clear how to (and which var) introduce via ana_psource.
the variables are defined but not valued. i took a look your .ppt but i not figure out how to give the values.
For "river_Xposition", "river_Eposition", "river_direction" and "river_flag": all missing values warning is obtained with ncview. And "river_Vshape", "river_transport", "river_temp" and "river_salt" i get the message "min and max both 0 for variable....".
this my (your) .cdl file, the variables are red highlighted. Where i have to specify the values in this file?
thanks in advance.
netcdf ocean_river_guadalquivir_frc{
dimensions:
xi = 442 ;
eta = 133 ;
s_rho = 10;
time = UNLIMITED ; // (0 currently)
river = 242 ;
river_time = 576 ;
variables:
double time(time) ;
time:long_name = "river time" ;
time:units = "days since 1899-12-31 00:00:00 GMT" ;
time:field = "river_time, scalar, series" ;
double river(river) ;
river:long_name = "river runoff identification number" ;
river:units = "nondimensional" ;
river:field = "river, scalar" ;
double river_Xposition(river) ;
river_Xposition:long_name = "river XI-position at RHO-points" ;
river_Xposition:units = "nondimensional" ;
river_Xposition:valid_min = 1. ;
river_Xposition:valid_max = 464. ;
river_Xposition:field = "river_Xposition, scalar" ;
double river_Eposition(river) ;
river_Eposition:long_name = "river ETA-position at RHO-points" ;
river_Eposition:units = "nondimensional" ;
river_Eposition:valid_min = 1. ;
river_Eposition:valid_max = 669. ;
river_Eposition:field = "river_Eposition, scalar" ;
double river_direction(river) ;
river_direction:long_name = "river runoff direction" ;
river_direction:units = "nondimensional" ;
river_direction:field = "river_direction, scalar" ;
double river_flag(river) ;
river_flag:long_name = "river runoff tracer flag" ;
river_flag:option_0 = "all tracers are off" ;
river_flag:option_1 = "only temperature is on" ;
river_flag:option_2 = "only salinity is on" ;
river_flag:option_3 = "both temperature and salinity are on" ;
river_flag:units = "nondimensional" ;
river_flag:field = "river_flag, scalar" ;
double river_Vshape(s_rho, river) ;
river_Vshape:long_name = "river runoff mass transport vertical profile" ;
river_Vshape:units = "nondimensional" ;
river_Vshape:field = "river_Vshape, scalar" ;
double river_time(river_time) ;
river_time:long_name = "river runoff time" ;
river_time:units = "days since 1899-12-31 00:00:00 GMT" ;
river_time:field = "river_time, scalar, series" ;
double river_transport(river_time, river) ;
river_transport:long_name = "river runoff vertically integrated mass transport" ;
river_transport:units = "meter3 second-1" ;
river_transport:field = "river_transport, scalar, series" ;
river_transport:time = "river_time" ;
double river_temp(river_time, s_rho, river) ;
river_temp:long_name = "river runoff potential temperature" ;
river_temp:units = "Celsius" ;
river_temp:field = "river_temp, scalar, series" ;
river_temp:time = "river_time" ;
double river_salt(river_time, s_rho, river) ;
river_salt:long_name = "river runoff salinity" ;
river_salt:units = "PSU" ;
river_salt:field = "river_salt, scalar, series" ;
river_salt:time = "river_time" ;
// global attributes:
:type = "NEP4b FORCING file" ;
:history = "NorthEast Pacific" ;
:rivers = "AK linesource,AK linesource,AK linesource,AK linesource,AK linesource,AK linesource,AK linesource,AK linesource,AK linesource,AK linesource,...,Arctic Drain,Columbia,Columbia,Copper,Yukon,Yukon,Yukon" ;
}
Yes, i think that not all variables are includes or at least not well included. That is what i really want to learn how to do it. Very clear how to (and which var) introduce via ana_psource.
the variables are defined but not valued. i took a look your .ppt but i not figure out how to give the values.
For "river_Xposition", "river_Eposition", "river_direction" and "river_flag": all missing values warning is obtained with ncview. And "river_Vshape", "river_transport", "river_temp" and "river_salt" i get the message "min and max both 0 for variable....".
this my (your) .cdl file, the variables are red highlighted. Where i have to specify the values in this file?
thanks in advance.
netcdf ocean_river_guadalquivir_frc{
dimensions:
xi = 442 ;
eta = 133 ;
s_rho = 10;
time = UNLIMITED ; // (0 currently)
river = 242 ;
river_time = 576 ;
variables:
double time(time) ;
time:long_name = "river time" ;
time:units = "days since 1899-12-31 00:00:00 GMT" ;
time:field = "river_time, scalar, series" ;
double river(river) ;
river:long_name = "river runoff identification number" ;
river:units = "nondimensional" ;
river:field = "river, scalar" ;
double river_Xposition(river) ;
river_Xposition:long_name = "river XI-position at RHO-points" ;
river_Xposition:units = "nondimensional" ;
river_Xposition:valid_min = 1. ;
river_Xposition:valid_max = 464. ;
river_Xposition:field = "river_Xposition, scalar" ;
double river_Eposition(river) ;
river_Eposition:long_name = "river ETA-position at RHO-points" ;
river_Eposition:units = "nondimensional" ;
river_Eposition:valid_min = 1. ;
river_Eposition:valid_max = 669. ;
river_Eposition:field = "river_Eposition, scalar" ;
double river_direction(river) ;
river_direction:long_name = "river runoff direction" ;
river_direction:units = "nondimensional" ;
river_direction:field = "river_direction, scalar" ;
double river_flag(river) ;
river_flag:long_name = "river runoff tracer flag" ;
river_flag:option_0 = "all tracers are off" ;
river_flag:option_1 = "only temperature is on" ;
river_flag:option_2 = "only salinity is on" ;
river_flag:option_3 = "both temperature and salinity are on" ;
river_flag:units = "nondimensional" ;
river_flag:field = "river_flag, scalar" ;
double river_Vshape(s_rho, river) ;
river_Vshape:long_name = "river runoff mass transport vertical profile" ;
river_Vshape:units = "nondimensional" ;
river_Vshape:field = "river_Vshape, scalar" ;
double river_time(river_time) ;
river_time:long_name = "river runoff time" ;
river_time:units = "days since 1899-12-31 00:00:00 GMT" ;
river_time:field = "river_time, scalar, series" ;
double river_transport(river_time, river) ;
river_transport:long_name = "river runoff vertically integrated mass transport" ;
river_transport:units = "meter3 second-1" ;
river_transport:field = "river_transport, scalar, series" ;
river_transport:time = "river_time" ;
double river_temp(river_time, s_rho, river) ;
river_temp:long_name = "river runoff potential temperature" ;
river_temp:units = "Celsius" ;
river_temp:field = "river_temp, scalar, series" ;
river_temp:time = "river_time" ;
double river_salt(river_time, s_rho, river) ;
river_salt:long_name = "river runoff salinity" ;
river_salt:units = "PSU" ;
river_salt:field = "river_salt, scalar, series" ;
river_salt:time = "river_time" ;
// global attributes:
:type = "NEP4b FORCING file" ;
:history = "NorthEast Pacific" ;
:rivers = "AK linesource,AK linesource,AK linesource,AK linesource,AK linesource,AK linesource,AK linesource,AK linesource,AK linesource,AK linesource,...,Arctic Drain,Columbia,Columbia,Copper,Yukon,Yukon,Yukon" ;
}
- Attachments
-
- salida.jpg (73.23 KiB) Viewed 3715628 times
Re: SOURCE POINT FOR RIVER RUNOFF
The ncl scripts shown in part in the ppt file are on my web site in full, in this directory. The "write" ones show how to create files that are populated with values.
Alternately, take your netcdf file and dump it to an ascii file:Do not include the "-h" argument here because you want to see the full data. It should all be zero, but you can change it with a text editor to the values you want. Once you are happy with it, run your ncgen command again.
If the file is too big or if you don't like NCL, any reasonable scripting language will do for this sort of job.
Alternately, take your netcdf file and dump it to an ascii file:
Code: Select all
ncdump xxx.nc > ascii.nc
If the file is too big or if you don't like NCL, any reasonable scripting language will do for this sort of job.
Re: SOURCE POINT FOR RIVER RUNOFF
thanks kate, i think i get the idea, definitely gonna be, among others, on netcdf file. Let me post something about source point method.
After read "treatment of river" and about vertical structure or how many points to choose i think that's far away to be a simple problem. But i would like to see how much can i get from this via and see how is the behavior of Temp and salinity.
my entire domain start with constant values for Temp and Salinity, 18 and 35 resp.
in the source point i imposed a value for 500m^3, typical value for the river discharge, T=20 and Salinity=0.
the result after about 3800s is enclosed below.
I get high values of salinity. some idea what is happening that? should i activate some other options (maybe numerical scheme related) when salinity is working?
thanks in advance.
After read "treatment of river" and about vertical structure or how many points to choose i think that's far away to be a simple problem. But i would like to see how much can i get from this via and see how is the behavior of Temp and salinity.
my entire domain start with constant values for Temp and Salinity, 18 and 35 resp.
in the source point i imposed a value for 500m^3, typical value for the river discharge, T=20 and Salinity=0.
the result after about 3800s is enclosed below.
I get high values of salinity. some idea what is happening that? should i activate some other options (maybe numerical scheme related) when salinity is working?
thanks in advance.
Re: SOURCE POINT FOR RIVER RUNOFF
Hi...
I have some query regarding including river discharge as a point source in ROMS via netcdf way.I have created an input file using only river transport values available .But when I run it,it asks for river_Eposition,river_Xposition etc.I don't know how to specify them explicitly.Is it possible to include river discharge without specifying temp and salinity values.If not,how do I specify constant values for T and S?
thank you in advance.
Regards
Katherine
I have some query regarding including river discharge as a point source in ROMS via netcdf way.I have created an input file using only river transport values available .But when I run it,it asks for river_Eposition,river_Xposition etc.I don't know how to specify them explicitly.Is it possible to include river discharge without specifying temp and salinity values.If not,how do I specify constant values for T and S?
thank you in advance.
Regards
Katherine
Re: SOURCE POINT FOR RIVER RUNOFF
In the Data/ROMS/CDL directory, there is an example of how the river netcdf file should be structured. It is asking for the xi,eta positions of your rivers. These are required fields. The T and S are not required, depending on how you set LtracerSrc in your ocean.in file, but note that on inflow, you might need to set T and S for improved numerical stability.
Re: SOURCE POINT FOR RIVER RUNOFF
Thank you so much Kate.I am trying that.
Regards
Katherine
Regards
Katherine
Re: SOURCE POINT FOR RIVER RUNOFF
hi...
I have few questions regarding the Model Physics.
1.How to check to know about how the model is taking Salinity and Temperature for rivers?( i.e. where exactly can I see the implementation of the tracer-advection equation in the model?)
2. Where to look for zeta variation equation(inside model) when we include river transports?
2. Does the model conserves ZETA (sea surface height) and S(salinity) when rivers are included? Whether in ROMS zeta increases with time?
Thank you.
I have few questions regarding the Model Physics.
1.How to check to know about how the model is taking Salinity and Temperature for rivers?( i.e. where exactly can I see the implementation of the tracer-advection equation in the model?)
2. Where to look for zeta variation equation(inside model) when we include river transports?
2. Does the model conserves ZETA (sea surface height) and S(salinity) when rivers are included? Whether in ROMS zeta increases with time?
Thank you.
Re: SOURCE POINT FOR RIVER RUNOFF
1. A grep on TS_PSOURCE shows that pre_step3d.F and step3d_t.F are the places to look for tracer sources code.
2. Zeta is trickier because it is a secondary variable. It is computed from the velocities. Changes in zeta come about from net flux in and out of a grid cell.
3. If you have closed walls on all four sides (or periodic BC), then a net inflow from sources will lead to an increase in zeta. If you have any open boundaries, it is less clear.
2. Zeta is trickier because it is a secondary variable. It is computed from the velocities. Changes in zeta come about from net flux in and out of a grid cell.
3. If you have closed walls on all four sides (or periodic BC), then a net inflow from sources will lead to an increase in zeta. If you have any open boundaries, it is less clear.
Re: SOURCE POINT FOR RIVER RUNOFF
Hi Kate...
Thank you so much for the reply.
I have one more query.
When we create the river input file,the variable "river" in DATA/ROMS/CDL indicates the number of rivers or the number of grid points in the model in which river has to be included?
Thank you so much for the reply.
I have one more query.
When we create the river input file,the variable "river" in DATA/ROMS/CDL indicates the number of rivers or the number of grid points in the model in which river has to be included?
Re: SOURCE POINT FOR RIVER RUNOFF
It's the number of grid points with a source. If your Amazon is 10 gridpoints wide, you need to count that as ten, not one.
Re: SOURCE POINT FOR RIVER RUNOFF
Hi to everybody,
I am having a problem with point source option.
I am giving with an external file the flow of
sea of Marmara (5 points) through to Dardanelles straits to
North Aegean sea but the only thing i am getting is
blow ups...I am sure that my CFL condition is ok and
the values of rx1 and rx0 are good/sane. Also i must say
that is a test case and not a realistic at the moment.
Any help would be appreciated. I am attaching the log file and .h file
Thanks for your time.
Yiannis.
I am having a problem with point source option.
I am giving with an external file the flow of
sea of Marmara (5 points) through to Dardanelles straits to
North Aegean sea but the only thing i am getting is
blow ups...I am sure that my CFL condition is ok and
the values of rx1 and rx0 are good/sane. Also i must say
that is a test case and not a realistic at the moment.
Any help would be appreciated. I am attaching the log file and .h file
Thanks for your time.
Yiannis.
- Attachments
-
tss_log4a.txt
- (27.69 KiB) Downloaded 1370 times
-
dard_exp1.h
- (1.14 KiB) Downloaded 1419 times
Re: SOURCE POINT FOR RIVER RUNOFF
Hi to all,
My Problem is solved. It appears
that occurred due to small
number of points (5 points) for a relatively big
volume flow.
Yiannis.
My Problem is solved. It appears
that occurred due to small
number of points (5 points) for a relatively big
volume flow.
Yiannis.
Re: SOURCE POINT FOR RIVER RUNOFF
Hi
I have few doubts regarding creating a river input file.
1.In the Data/ROMS/CDL ,the frc_rivers.cdl file has river_Xposition:valid_min = 1.,river_Xposition:valid_max = 385. and similar for river_Eposition as well.Does it mean the location of river should be given in the whole of domain.i.e. say in a 3N:15N and 47:55E and I have to introduce river at 5 (latitudinal)grid points(say 3,4,5,6,7) and at one particular longitude(say 47) using a (monthly)time series data of salinity.So,my question is,do I have to specify river_salinity at other locations as zero in the input file?Also can I use time series data or do I have to use 2-dimensional netcdf file?
Thank you so much
Regards
Katherine
I have few doubts regarding creating a river input file.
1.In the Data/ROMS/CDL ,the frc_rivers.cdl file has river_Xposition:valid_min = 1.,river_Xposition:valid_max = 385. and similar for river_Eposition as well.Does it mean the location of river should be given in the whole of domain.i.e. say in a 3N:15N and 47:55E and I have to introduce river at 5 (latitudinal)grid points(say 3,4,5,6,7) and at one particular longitude(say 47) using a (monthly)time series data of salinity.So,my question is,do I have to specify river_salinity at other locations as zero in the input file?Also can I use time series data or do I have to use 2-dimensional netcdf file?
Thank you so much
Regards
Katherine
Re: SOURCE POINT FOR RIVER RUNOFF
The positions are given as the i,j positions in the grid file. You want them to be up against a wall or at the edge of a domain, not in the ocean interior.
The river netcdf file has a dimension "river", indexing the source points. You need to specify salinity for each river, not for each grid point in the whole domain. The field river_salt is dimensioned (river_time, s_rho, river).
The river netcdf file has a dimension "river", indexing the source points. You need to specify salinity for each river, not for each grid point in the whole domain. The field river_salt is dimensioned (river_time, s_rho, river).
Re: SOURCE POINT FOR RIVER RUNOFF
Hi
I have another set of queries .
1.I have understood that if I specify river=6 that would serve as 6 point sources for river discharge.
Say now,if I have to specify the locations of river from 121W:122W and 40N:43N with uniform horizontal resolution of 0.5 deg.I want to distribute the river discharge data into these locations.So,what should be the number of river points ? Should it be river=12?(Calculation say 1 deg ~100 km,so with 0.5deg in the above specified location it should be 12 points,please correct me if I am wrong).
2. About river_Vshape I am using the following code:-
for i=1:num_rivers
for k=1:N
river_Vshape(k,i)=1/N;
end
end
I want to know for a constant vertical profile ,does the value of river_Vshape matters or any value can be used?
Thank you so much in advance
Regards
Katherine
I have another set of queries .
1.I have understood that if I specify river=6 that would serve as 6 point sources for river discharge.
Say now,if I have to specify the locations of river from 121W:122W and 40N:43N with uniform horizontal resolution of 0.5 deg.I want to distribute the river discharge data into these locations.So,what should be the number of river points ? Should it be river=12?(Calculation say 1 deg ~100 km,so with 0.5deg in the above specified location it should be 12 points,please correct me if I am wrong).
2. About river_Vshape I am using the following code:-
for i=1:num_rivers
for k=1:N
river_Vshape(k,i)=1/N;
end
end
I want to know for a constant vertical profile ,does the value of river_Vshape matters or any value can be used?
Thank you so much in advance
Regards
Katherine
Re: SOURCE POINT FOR RIVER RUNOFF
Is that along the coast? That's 4 degrees of latitude, so maybe 8 points if your coast is a N-S wall. We would have to see it to know for sure.Katherine wrote:Hi
I have another set of queries .
1.I have understood that if I specify river=6 that would serve as 6 point sources for river discharge.
Say now,if I have to specify the locations of river from 121W:122W and 40N:43N with uniform horizontal resolution of 0.5 deg.I want to distribute the river discharge data into these locations.So,what should be the number of river points ? Should it be river=12?(Calculation say 1 deg ~100 km,so with 0.5deg in the above specified location it should be 12 points,please correct me if I am wrong).
How deep is your coastal shelf? Do you want the river coming in at all depths or only at the surface? Know that we've had bad luck with only the surface, in that the fresh water stays at the surface, making a sharp pycnocline that's hard to mix. For basin scale problems (not resolving estuaries), you might do better applying fresh water as an additional surface "runoff" spread over a few points near the coast.2. About river_Vshape I am using the following code:-
I want to know for a constant vertical profile ,does the value of river_Vshape matters or any value can be used?Code: Select all
for i=1:num_rivers for k=1:N river_Vshape(k,i)=1/N; end end
Re: SOURCE POINT FOR RIVER RUNOFF
You have to be aware that by setting
you are not setting uniform flux over the vertical profile. Let us write the vertical positions as z_w(i) with i between 0 and N.
In your case, what this means is that 1/N of the flux goes into the layer between level z_w(i) and z_w(i+1) for i between 0 and N-1.
Since, usually, the surface layers are much finer than the deeper layer, your setting can cause blowup by speed larger than 20m/s in some cases.
Since you want an uniform profile, you have to use your vertical parameterization with theta_s, theta_b, etc. compute the vertical levels z_w and then write down the river_Vshape. Note that since the relative positions of those levels depend on the free surface, which varies along the simulation while the vertical shape does not, the profile will only be approximately uniform. I do not know how to solve this small problem.
Code: Select all
river_Vshape(k,i)=1/N;
In your case, what this means is that 1/N of the flux goes into the layer between level z_w(i) and z_w(i+1) for i between 0 and N-1.
Since, usually, the surface layers are much finer than the deeper layer, your setting can cause blowup by speed larger than 20m/s in some cases.
Since you want an uniform profile, you have to use your vertical parameterization with theta_s, theta_b, etc. compute the vertical levels z_w and then write down the river_Vshape. Note that since the relative positions of those levels depend on the free surface, which varies along the simulation while the vertical shape does not, the profile will only be approximately uniform. I do not know how to solve this small problem.
Re: SOURCE POINT FOR RIVER RUNOFF
hi,
First, to Kate's post. Its latitude ranges from N40-43, with a skip of 3 degs. If this, with a resolution of 0.5 deg, it should have 6 cells along the N-S boundary, thus makes 6 point sources. Also, along the W-E direction.
Second, to Mathieu's post. I think you are right and its a accurate comment on the point of the question. I dont know whether we can coded in ROMS that let ROMS to calculates the vertical profile(flux) by instant water depth(include zeta) during simulation, and we just provide a value. Its a flash idea that hits me.
wshou
First, to Kate's post. Its latitude ranges from N40-43, with a skip of 3 degs. If this, with a resolution of 0.5 deg, it should have 6 cells along the N-S boundary, thus makes 6 point sources. Also, along the W-E direction.
Second, to Mathieu's post. I think you are right and its a accurate comment on the point of the question. I dont know whether we can coded in ROMS that let ROMS to calculates the vertical profile(flux) by instant water depth(include zeta) during simulation, and we just provide a value. Its a flash idea that hits me.
wshou
Re: SOURCE POINT FOR RIVER RUNOFF
This topic is far too long so I am locking it. Please create new posts for future queries related to this topic.