[ncl-install] plot

Mary Haley haley at ucar.edu
Mon Oct 21 09:02:21 MDT 2013


Dear Fereshte,


The "ncl-install" email list is for people who are having trouble installing NCL and/or NCAR Graphics.

If you are having problems with NCL scripts, then we recommend sending those questions to ncl-talk at ucar.edu.
If you are having problems with NCAR Graphics programs, then we recommend sending those questions to ncarg-talk at ucar.edu.

However, in general, we ask that people use NCL rather than NCAR Graphics, because NCAR Graphics is the "old" way of creating graphics and is more difficult to use. NCL can easily read NetCDF and other data formats (HDF, HDF-EOS, GRIB1, GRIB2) and has a large library of computational functions.

Before posting to these email lists, please see our posting guidelines:

http://www.ncl.ucar.edu/Support/posting_guidelines.shtml

---------
Now back to your question.

Thanks for including a sample image, but I'm having a hard time seeing the numbers on the plot, either because of the size or the font used.

Are you plotting these with an NCAR Graphics program, or with an NCL script?

It would help if you could provide me with your data file, and I'll see if I can get a valid plot out of it using NCL. I recommend NCL over NCAR Graphics as it is *much* easier, and NCL will automatically recognize the _FillValue attribute.

You can look at our ROMS examples page, but these are all plots over maps, however, and none show the type of plot you're creating.

 http://www.ncl.ucar.edu/Applications/roms.shtml

If you can provide your data file on FTP, then I can probably quickly create an NCL script for you.

http://www.ncl.ucar.edu/report_bug.shtml#HowToFTP

Thanks,

--Mary

On Oct 19, 2013, at 4:38 AM, fereshteh komijani <fereshtehkomijani at gmail.com> wrote:

> Dear all
> 
> Briefly I use ROMS model. In this model there are masking process to separate land and sea. One of its outputs is ocean_history.nc file. Its header contain
> 
> Code:
> float u(ocean_time, s_rho, eta_u, xi_u) ;
>       u:long_name = "time-averaged u-momentum component" ;
>       u:units = "meter second-1" ;
>       u:time = "ocean_time" ;
>       u:coordinates = "lon_u lat_u s_rho ocean_time" ;
>       u:field = "u-velocity, scalar, series" ;
>       u:_FillValue = 1.e+37f ;
> 
> for all variables. As you can see there is _FillValue option with  1.e+37f value.
> 
> For plotting, there are csec.in and ccent.in in ROMS plotting package for cross-section and countor plotting, respectively by
> 
>  $ ccntG<ccnt_test.in
> 
> $ csecG<csec_test.in
> 
> That base on ROMS manual, they plotted with ncarg.
> 
> Recently I face with one problem that makes me confused. My problem is that when I plot some variable cross section, I see that its color bar and also max and min values which written in plot's corner are not correct. For example for u component max and min values are 1.83 and -2.47, respectively. But in plot it shows values in order e+38 and whole of plot covered by same color (attached plot). It seems that values multiplied by one factor. I send this error to ROMS forum several times. They reply:
> 
> 
> 
> 1-    1- Very simple. You need to pay attention to the statistics that are dumped to standard output when plotting. Also, see the minimum and maximum values in the bottom left corner of the plot. Notice also at the bottom of the colorbar there is a scale x10^38. The maximum value in the plot is around 1E+38  The special value in ROMS for masking is 1.0E+37. The plotting package is able to recognize such masked values. The _FillValue is added in masked regions and it is easy recognizable by any third party plotting software. You can try plotting your fields with any NetCDF file tools out there
>  
> 2-     2-The masked values are not NaN, but rather some strange 1.e38 value picked to never be a valid value. You need to tell your plotting software to use a mask for anything equal to the _FillValue. ncdump and ncview know to do that.
> 
> 
> 
> 3-Your choices are to look at the source code and fix it yourself or to submit a bug report to the maker of the software.
> 
> 
> 
> Bas on this replies would you please help and guide e how I can do that till be able to plot correctly.
> 
> Thanks in advance for your attention
> 
> Cheers
> 
> fereshte
> 
>  
>  
> 
> -- 
> **Angel**
>  
>  
> <total u velocity.png>_______________________________________________
> ncl-install mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-install



More information about the ncl-install mailing list