[ncl-talk] To read ocean model output data

Jyothi L jyothir033 at gmail.com
Wed Oct 31 20:55:11 MDT 2018


Hi,

I am trying to analyze the output from a list of forecast files simulated
by Ocean Model. However, I have few issues regarding this output data.

1) *Regarding Time: *
I used "cat" to combine the list of 21 forecast files. My idea behind
merging is to make a time vs depth section. NCl shows the following error.
Should I go with join instead of cat??
*ERROR*
*     warning:Aggregated dimension coordinate values are non-monotonic;
check aggregated file ordering.*
(Is it something to do with my Time values?)

printVarSummary(Time)
Variable: Time
Type: float
Total Size: 84 bytes
            21 values
Number of Dimensions: 1
Dimensions and sizes:    [time | 21]
Coordinates:
            time: [ 0.. 5]
Number Of Attributes: 2
  long_name :    time
  units :    days since 2017-12-01 00:00:00 +00:00
(0)     0
(1)    0.25
(2)    0.5
(3)    0.75
(4)     1
(5)    1.25
(6)    1.5
(7)    1.75
(8)     2
(9)    2.25
(10)    2.5
(11)    2.75
(12)     3
(13)    3.25
(14)    3.5
(15)    3.75
(16)     4
(17)    4.25
(18)    4.5
(19)    4.75
(20)     5
How do I get the regular time axis from the above values?

2) *Regarding lat and lon :*
I found the units of lat and lon are in meters. I want to convert them into
degrees. I could get the conversion from radians to degrees and vice versa,
but not meters to degrees. And also, this data is in curvilinear grid I
suppose.

2) *Regarding depth:*
Model output is in sigma coordinate system, where I would like to convert
it into regular depth levels(meters). I found couple of examples in this
regard which didn't help me much.
 ockhi03b.2017120100.pom.0000.nc
<https://drive.google.com/file/d/17Dc8CpN0gtgGFUX5H_iYhpgmQnnDpZYX/view?usp=drive_web>

********************************
Below is a sample script where I tried to plot a 2D temperature plot at
first time step over surface. (to check the data)

dir    =
"/incois_ncmrwfx/incois/hycom/hwrf_output/pytmp/POMcoupled_emcPHY/com/2017120100/03B/"
files  = systemfunc("ls " + dir + "ockhi03b.2017120100.pom.00*.nc")
a      = addfiles(files,"r")
ListSetType(a,"cat")
vNames = getfilevarnames(a[0])
print(vNames)

;----- Read character variable Times

 temp                = a[:]->t
 Time                = a[:]->time
 dep                 = a[:]->z
 lon2d          = a[:]->east_e
 lat2d          = a[:]->north_e
;;temp at lon2d = a[:]->east_e  ;;creating errors when I use
;;temp at lat2d  = a[:]->north_e ;;ditto
printVarSummary(lon2d)
printVarSummary(lat2d)

wks = gsn_open_wks("png","testOceanOutput")
res            = True
res at cnFillOn   = True
res at cnLinesOn  = False

plot = gsn_csm_contour(wks,temp(0,0,:,:),res)

This script makes a plot, which is INCORRECT. I have uploaded the data file
using ftp. Kindly look into my data and give your suggestions.

Thanks in advance for your time and support.

Regards
Jyothi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181101/62ec630b/attachment.html>


More information about the ncl-talk mailing list