how to use roms plot package?
how to use roms plot package?
I have finished compilation and there are several executable files such as 'cnt' 'ccnt' 'csec', etc. But I don't know how to use these for plotting?
-
- Posts: 15
- Joined: Tue Mar 09, 2004 3:21 pm
- Location: University of New South Wales, Australia
Re: how to use roms plot package?
Hi,
There should also be sample input files for each program, named cnt.in, csec.in etc.
Edit the appropriate input file and if you are using Unix/Linux, you can run the executable with input from the .in file using the command
cnt < cnt.in
or similar.
regards,
Deborah
There should also be sample input files for each program, named cnt.in, csec.in etc.
Edit the appropriate input file and if you are using Unix/Linux, you can run the executable with input from the .in file using the command
cnt < cnt.in
or similar.
regards,
Deborah
thanks Deborah. I managed to make it partially work. However, there is another problem. When I modified the cnt.in and tried to output my test run using upwelling case (predefined in ROMS), it generated the following error:
GET_NC2DAT - error while reading variable: temp
NetCDF: Index exceeds dimension bound
Execution abnormally terminated in module: GET_NC2DAT
Since the upwelling case does not have grid file, I modified the cnt.in so it will not read grid file and coastline file. But I don't know how to do with the LGRID and the range of latitude and longitude, so I just specified LGRID=0.1 and the range to 0.0~90.0 for both latitude and longitude.
______________________________________________________________
Plottable Fields in Primary NetCDF File:
---------------------------------------
ocean_his.nc
[ID= 59] bathymetry at RHO-points
[ID= 66] Coriolis parameter at RHO-points
[ID= 57] curvilinear coordinate metric in XI
[ID= 58] curvilinear coordinate metric in ETA
[ID= 21] free-surface
[ID= 13] vertically integrated u-momentum component
[ID= 14] vertically integrated v-momentum component
[ID= 1] u-momentum component
[ID= 2] v-momentum component
[ID= 19] vertical momentum component
[ID= 20] S-coordinate vertical momentum component
[ID= 23] potential temperature
[ID= 24] salinity
Available Times:
---------------
0.000000 0.2500000 0.5000000 0.7500000 1.000000
1.250000 1.500000 1.750000 2.000000 2.250000
2.500000 2.750000 3.000000 3.250000 3.500000
3.750000 4.000000 4.250000 4.500000 4.750000
5.000000
Parameters:
number of points (Lr,Mr,Nr) = 43 82 16
basin dimensions (Lx,Le) = 41.000 80.000
Field Diagnostics:
Day = 0.000
Field type = Potential Temperature (C)
Model level = 1
Number of points = 3526
Minimum = 1.45064764E+01 ( 1, 29 )
Maximum = 1.87151108E+01 ( 1, 1 )
Mean = 1.53662481E+01
RMS = 1.54259357E+01
Average Deviation = 1.08849454E+00
Variance = 1.83655632E+00
Standard Deviation = 1.35519600E+00
Skewness = 1.44651937E+00
Kurtosis = 3.58500385E+00
CNTPACK - real workspace used: 1690 given: 1000000
- integer workspace used: 20 given: 5000000
Plotted frame: 00001
GET_NC2DAT - error while reading variable: temp
NetCDF: Index exceeds dimension bound
Execution abnormally terminated in module: GET_NC2DAT
GET_NC2DAT - error while reading variable: temp
NetCDF: Index exceeds dimension bound
Execution abnormally terminated in module: GET_NC2DAT
Since the upwelling case does not have grid file, I modified the cnt.in so it will not read grid file and coastline file. But I don't know how to do with the LGRID and the range of latitude and longitude, so I just specified LGRID=0.1 and the range to 0.0~90.0 for both latitude and longitude.
______________________________________________________________
Plottable Fields in Primary NetCDF File:
---------------------------------------
ocean_his.nc
[ID= 59] bathymetry at RHO-points
[ID= 66] Coriolis parameter at RHO-points
[ID= 57] curvilinear coordinate metric in XI
[ID= 58] curvilinear coordinate metric in ETA
[ID= 21] free-surface
[ID= 13] vertically integrated u-momentum component
[ID= 14] vertically integrated v-momentum component
[ID= 1] u-momentum component
[ID= 2] v-momentum component
[ID= 19] vertical momentum component
[ID= 20] S-coordinate vertical momentum component
[ID= 23] potential temperature
[ID= 24] salinity
Available Times:
---------------
0.000000 0.2500000 0.5000000 0.7500000 1.000000
1.250000 1.500000 1.750000 2.000000 2.250000
2.500000 2.750000 3.000000 3.250000 3.500000
3.750000 4.000000 4.250000 4.500000 4.750000
5.000000
Parameters:
number of points (Lr,Mr,Nr) = 43 82 16
basin dimensions (Lx,Le) = 41.000 80.000
Field Diagnostics:
Day = 0.000
Field type = Potential Temperature (C)
Model level = 1
Number of points = 3526
Minimum = 1.45064764E+01 ( 1, 29 )
Maximum = 1.87151108E+01 ( 1, 1 )
Mean = 1.53662481E+01
RMS = 1.54259357E+01
Average Deviation = 1.08849454E+00
Variance = 1.83655632E+00
Standard Deviation = 1.35519600E+00
Skewness = 1.44651937E+00
Kurtosis = 3.58500385E+00
CNTPACK - real workspace used: 1690 given: 1000000
- integer workspace used: 20 given: 5000000
Plotted frame: 00001
GET_NC2DAT - error while reading variable: temp
NetCDF: Index exceeds dimension bound
Execution abnormally terminated in module: GET_NC2DAT
-
- Posts: 15
- Joined: Tue Mar 09, 2004 3:21 pm
- Location: University of New South Wales, Australia
Re: how to use roms plot package?
If there is no separate grid file, you should set the main output file ocean_his.nc as the grid file in cnt.in.
Set all of the top, bottom, left and right map coordinates to zero to plot the full horizontal domain.
It is difficult to know exactly what your problem is without seeing the whole of your input file. Could you be trying to plot more time steps than are in the results file?
Deborah
Set all of the top, bottom, left and right map coordinates to zero to plot the full horizontal domain.
It is difficult to know exactly what your problem is without seeing the whole of your input file. Could you be trying to plot more time steps than are in the results file?
Deborah
Re: how to use roms plot package?
I download and compile the plotting package following https://www.myroms.org/wiki/index.php/P ... stallation.
I am trying to make contour plot following the tutorial. In that case, I edit the ccnt_hraw.in file where at the end i include ocean_his.nc (output of upwelling test case) as fourth, fifth, and sixth file according to suggestions mentioned in this thread. But what about seventh file ie., coastline file? Here there will also be ocean_his.nc?
Another quarry is I am not finding the fort.35. where it supposed to be?
Looking for someones help
Rouf
I am trying to make contour plot following the tutorial. In that case, I edit the ccnt_hraw.in file where at the end i include ocean_his.nc (output of upwelling test case) as fourth, fifth, and sixth file according to suggestions mentioned in this thread. But what about seventh file ie., coastline file? Here there will also be ocean_his.nc?
Another quarry is I am not finding the fort.35. where it supposed to be?
Looking for someones help
Rouf
Re: how to use roms plot package?
The coastline is not needed when plotting the upwelling test case. You should set CST to F in your .in file so the plotting package will ignore the 7th input file. I have tried to make this a little clearer in the tutorial.
Sorry for the lack of clarity regarding the fort.35 file. There is not a fort.35 file distributed with the plotting package. That said, you only need a fort.35 file if you wish to draw lines or shapes on your plots. If you don't want to draw anything on you plots then you should set IREF to 0. I have also updated the tutorial to further explain the fort.35 file and IREF.
good luck
Sorry for the lack of clarity regarding the fort.35 file. There is not a fort.35 file distributed with the plotting package. That said, you only need a fort.35 file if you wish to draw lines or shapes on your plots. If you don't want to draw anything on you plots then you should set IREF to 0. I have also updated the tutorial to further explain the fort.35 file and IREF.
good luck
Re: how to use roms plot package?
Dear Robertson,
I am using cygwin for running roms. According to the tutorial I set CST to F in ccnt_hraw.in file and set IREF to 0. I also set the end portion of the file like following way:
and when I put the command like
it shows following error
My executable file was ccntG.exe. But I rename as ccnt.exe. Is it the same way you did? Where do u find the ccnt_temp.in? As per the tutorial, I copy ccnt.in to ccnt_hraw.in and edit. and got the above error.
Pls help me
Rouf
I am using cygwin for running roms. According to the tutorial I set CST to F in ccnt_hraw.in file and set IREF to 0. I also set the end portion of the file like following way:
Code: Select all
/home/MuhammadAbdurRouf/plot/Data/varid.dat
/home/MuhammadAbdurRouf/plot/Palettes/natlan1.pal
/home/MuhammadAbdurRouf/plot/Data/default.cnt
ocean_his.nc
ocean_his.nc
ocean_his.nc
ocean_his.nc
Code: Select all
ccnt <ccnt_hraw.in
Code: Select all
GET_NC2DAT - cannot inquiring ID for variable: hraw
NetCDF: Variable not found
Execution abnormally terminated in module: GET_NC2DAT
Pls help me
Rouf
Re: how to use roms plot package?
It told you that you asked to plot a variable called hraw which is not in the file you gave it to plot. In the output to ccnt, there should be a chunk like this:
This gives you the codes (ID) of the fields that it found in the file. Line 6 of ccnt.in has how many fields to plot and line 7 contains the list. For instance:
Note that I told it to plot ten fields, but have more than ten ID's there. The 11th and beyond are ignored. Clear as mud?
Code: Select all
[ID= 66] Coriolis parameter at RHO-points
[ID= 57] curvilinear coordinate metric in XI
[ID= 58] curvilinear coordinate metric in ETA
[ID= 21] free-surface
[ID= 13] vertically integrated u-momentum component
[ID= 14] vertically integrated v-momentum component
[ID= 1] u-momentum component
[ID= 2] v-momentum component
[ID= 19] vertical momentum component
[ID= 20] S-coordinate vertical momentum component
Code: Select all
10 NFIELDS: number of fields to plot. Line below, field(s) types:
21 1 2 23 24 44 45 50 51 53 19 124 125 126 127 128
Re: how to use roms plot package?
I am stuck with the plotting package. For a cross-section plot I follow the tutorial with upwelling test case but at the end it shows following error
Please help me with your kind suggestion.
M.A-Rouf
Code: Select all
MuhammadAbdurRouf@ROUF ~/myplot
$ which csecG
/roms/Projects/Upwelling/csecG
MuhammadAbdurRouf@ROUF ~/myplot
$ which idt
/usr/local/bin/idt
MuhammadAbdurRouf@ROUF ~/myplot
$ printenv NCARG_ROOT
/usr/local/
MuhammadAbdurRouf@ROUF ~/myplot
$ csecG <csec_upwelling.in
open: No such file or directory
apparent state: unit 10 named /home/MuhammadAbdurRouf/plot/Data/varid.dat
lately writing sequential formatted external IO
Segmentation fault (core dumped)
M.A-Rouf
Re: how to use roms plot package?
Code: Select all
open: No such file or directory
apparent state: unit 10 named /home/MuhammadAbdurRouf/plot/Data/varid.dat
Re: how to use roms plot package?
Dear Kate,
varid.dat is in the exact location where i addressed. But surprisingly the following error comes
varid.dat is in the exact location where i addressed. But surprisingly the following error comes
Is there anything wrong with following error message or somewhere else?No such file or directory
apparent state: unit 10 named /home/MuhammadAbdurRouf/plot/Data/varid.dat
Rouflately writing sequential formatted external IO
Segmentation fault (core dumped)
Re: how to use roms plot package?
If that file exists and is readable, I have no idea what is wrong. I see you are running the one compiled for debugging. Does this mean that you are prepared to run it in the debugger to see what's what? That's what I would do next. Beware that these programs aren't the easiest to follow.
- arango
- Site Admin
- Posts: 1367
- Joined: Wed Feb 26, 2003 4:41 pm
- Location: DMCS, Rutgers University
- Contact:
Re: how to use roms plot package?
There is step-by-step instructions in wikiROMS showing how to use the plotting package. It seems to me that you are not following the instructions correctly. We have a lot of users that have used this package right away without problems. Perhaps, you edited the input script incorrectly and deleted an input line by accident. This plotting package is very simple to run. You have posted several messages about plotting in this forum for either the ROMS plotting package or the matlab scripts and you had problems at every step.
I will recommend to find someone at your institution to advise you about basic technical computer skills. You meed such skills to run a complex model like ROMS successfuly on your scientific application.
I will recommend to find someone at your institution to advise you about basic technical computer skills. You meed such skills to run a complex model like ROMS successfuly on your scientific application.
Re: how to use roms plot package?
Hi everyone,
I'm working on the lake_signell test case (run OK) and plotting my results with NCARG.
If the option SED_MORPH is not activated in my lake_signell.h, ccnt < ccnt.in is OK and I can plot the bathymetry "h" (which is not evolving)
But I would like to visualize the bathymetry and its evolution through the time, so I activated the SED_MORPH option.
Then, when I issue the ccnt < ccnt.in I have an error message telling me that bathymetry does not belong to the plottable fields so I can't visualize it.
I saw when SED_MORPH is activated, the variable "bath" contains the changing bathymetry but "bath" does not belong to the plottable fields, according to the error message.
Does anyone have an idea ?
Thank you
I'm working on the lake_signell test case (run OK) and plotting my results with NCARG.
If the option SED_MORPH is not activated in my lake_signell.h, ccnt < ccnt.in is OK and I can plot the bathymetry "h" (which is not evolving)
But I would like to visualize the bathymetry and its evolution through the time, so I activated the SED_MORPH option.
Then, when I issue the ccnt < ccnt.in I have an error message telling me that bathymetry does not belong to the plottable fields so I can't visualize it.
I saw when SED_MORPH is activated, the variable "bath" contains the changing bathymetry but "bath" does not belong to the plottable fields, according to the error message.
Does anyone have an idea ?
Thank you
Re: how to use roms plot package?
The plotting code has a file somewhat like varinfo.dat, but called varid.dat. Check the attributes on bath/h and change them to match zeta, i.e., is time variant.
Re: how to use roms plot package?
Can plotting package plot zeta(time,y,x) along constant y or x?
cnt is for horizontal(y,x) plot, while sec is for vertical (z,y) or (z,x) plot.
I want to do a space one dimensional plot along x or y section, how to do it?
Thanks
cnt is for horizontal(y,x) plot, while sec is for vertical (z,y) or (z,x) plot.
I want to do a space one dimensional plot along x or y section, how to do it?
Thanks
Re: how to use roms plot package?
I expect that if anyone here has such a code, it would be in Matlab. The Fortran plotting package won't do it, though you could write such a program. If I were to do it, I'd start over in some other language.
Re: how to use roms plot package?
Hi,
I would like to plot the "suspended non cohesive sediment concentration".
I checked I have " Hout (isand) == T ! suspended concentration " in my sediment.in, so I guess the suspended concentration is written in my output history file.
But I do not manage to plot it because in the varid.dat there isn't any line concerning suspended non cohesive sediment concentration.
Whereas in my varinfo.dat, I have the variable :
'sand_' ! Input/Output
'suspended noncohesive sediment'
'kilogram meter-3' ! [kg/m3]
'sand_, scalar, series'
'ocean_time'
'idTvar(isand(i))'
'r3dvar'
1.0d0
So I tried to add a line like :
393,'IDSAND',1,T,'sand_','-', 'suspendend non cohesive sediment'
to my varid.dat with varying attributes but it does not work.
I would like to plot the "suspended non cohesive sediment concentration".
I checked I have " Hout (isand) == T ! suspended concentration " in my sediment.in, so I guess the suspended concentration is written in my output history file.
But I do not manage to plot it because in the varid.dat there isn't any line concerning suspended non cohesive sediment concentration.
Whereas in my varinfo.dat, I have the variable :
'sand_' ! Input/Output
'suspended noncohesive sediment'
'kilogram meter-3' ! [kg/m3]
'sand_, scalar, series'
'ocean_time'
'idTvar(isand(i))'
'r3dvar'
1.0d0
So I tried to add a line like :
393,'IDSAND',1,T,'sand_','-', 'suspendend non cohesive sediment'
to my varid.dat with varying attributes but it does not work.
Re: how to use roms plot package?
Have you done ncdump -h on the file you are trying to plot? Is the variable named sand_ in there? Or do you have sand_01, sand_02, mud_01, mod_02? Not that I know the sediment package at all, but that's something to check.
Re: how to use roms plot package?
Thank you Kate,
Doing a ncdump -h ocean_his.nc, I saw the variable was mud_01
So I add the following line to my varid.dat :
393,'IDTVAR',1,F,'mud_01','-' 'suspended cohesive sediment(kg/m3)'
Doing a ncdump -h ocean_his.nc, I saw the variable was mud_01
So I add the following line to my varid.dat :
393,'IDTVAR',1,F,'mud_01','-' 'suspended cohesive sediment(kg/m3)'