[ncl-talk] To read ocean model output data
Jyothi L
jyothir033 at gmail.com
Thu Nov 1 10:54:58 MDT 2018
Thanks for the response. The output for the script is as follows:
Variable: time (file variable)
Type: float
Total Size: 4 bytes
1 values
Number of Dimensions: 1
Dimensions and sizes: [time | 1]
Coordinates:
time: [ 0.. 0]
Number Of Attributes: 2
long_name : time
units : days since 2017-12-01 00:00:00 +00:00
(0) 0
Variable: time (file variable)
Type: float
Total Size: 4 bytes
1 values
Number of Dimensions: 1
Dimensions and sizes: [time | 1]
Coordinates:
time: [0.25..0.25]
Number Of Attributes: 2
long_name : time
units : days since 2017-12-01 00:00:00 +00:00
(0) 0.25
Variable: time (file variable)
Type: float
Total Size: 4 bytes
1 values
Number of Dimensions: 1
Dimensions and sizes: [time | 1]
Coordinates:
time: [0.5..0.5]
Number Of Attributes: 2
long_name : time
units : days since 2017-12-01 00:00:00 +00:00
(0) 0.5
Variable: time (file variable)
Type: float
Total Size: 4 bytes
1 values
Number of Dimensions: 1
Dimensions and sizes: [time | 1]
Coordinates:
time: [0.75..0.75]
Number Of Attributes: 2
long_name : time
units : days since 2017-12-01 00:00:00 +00:00
(0) 0.75
Variable: time (file variable)
Type: float
Total Size: 4 bytes
1 values
Number of Dimensions: 1
Dimensions and sizes: [time | 1]
Coordinates:
time: [ 1.. 1]
Number Of Attributes: 2
long_name : time
units : days since 2017-12-01 00:00:00 +00:00
(0) 1
Variable: time (file variable)
Type: float
Total Size: 4 bytes
1 values
Number of Dimensions: 1
Dimensions and sizes: [time | 1]
Coordinates:
time: [1.25..1.25]
Number Of Attributes: 2
long_name : time
units : days since 2017-12-01 00:00:00 +00:00
(0) 1.25
Variable: time (file variable)
Type: float
Total Size: 4 bytes
1 values
Number of Dimensions: 1
Dimensions and sizes: [time | 1]
Coordinates:
time: [1.5..1.5]
Number Of Attributes: 2
long_name : time
units : days since 2017-12-01 00:00:00 +00:00
(0) 1.5
Variable: time (file variable)
Type: float
Total Size: 4 bytes
1 values
Number of Dimensions: 1
Dimensions and sizes: [time | 1]
Coordinates:
time: [1.75..1.75]
Number Of Attributes: 2
long_name : time
units : days since 2017-12-01 00:00:00 +00:00
(0) 1.75
Variable: time (file variable)
Type: float
Total Size: 4 bytes
1 values
Number of Dimensions: 1
Dimensions and sizes: [time | 1]
Coordinates:
time: [ 2.. 2]
Number Of Attributes: 2
long_name : time
units : days since 2017-12-01 00:00:00 +00:00
(0) 2
Variable: time (file variable)
Type: float
Total Size: 4 bytes
1 values
Number of Dimensions: 1
Dimensions and sizes: [time | 1]
Coordinates:
time: [2.25..2.25]
Number Of Attributes: 2
long_name : time
units : days since 2017-12-01 00:00:00 +00:00
(0) 2.25
Variable: time (file variable)
Type: float
Total Size: 4 bytes
1 values
Number of Dimensions: 1
Dimensions and sizes: [time | 1]
Coordinates:
time: [2.5..2.5]
Number Of Attributes: 2
long_name : time
units : days since 2017-12-01 00:00:00 +00:00
(0) 2.5
Variable: time (file variable)
Type: float
Total Size: 4 bytes
1 values
Number of Dimensions: 1
Dimensions and sizes: [time | 1]
Coordinates:
time: [2.75..2.75]
Number Of Attributes: 2
long_name : time
units : days since 2017-12-01 00:00:00 +00:00
(0) 2.75
Variable: time (file variable)
Type: float
Total Size: 4 bytes
1 values
Number of Dimensions: 1
Dimensions and sizes: [time | 1]
Coordinates:
time: [ 3.. 3]
Number Of Attributes: 2
long_name : time
units : days since 2017-12-01 00:00:00 +00:00
(0) 3
Variable: time (file variable)
Type: float
Total Size: 4 bytes
1 values
Number of Dimensions: 1
Dimensions and sizes: [time | 1]
Coordinates:
time: [3.25..3.25]
Number Of Attributes: 2
long_name : time
units : days since 2017-12-01 00:00:00 +00:00
(0) 3.25
Variable: time (file variable)
Type: float
Total Size: 4 bytes
1 values
Number of Dimensions: 1
Dimensions and sizes: [time | 1]
Coordinates:
time: [3.5..3.5]
Number Of Attributes: 2
long_name : time
units : days since 2017-12-01 00:00:00 +00:00
(0) 3.5
Variable: time (file variable)
Type: float
Total Size: 4 bytes
1 values
Number of Dimensions: 1
Dimensions and sizes: [time | 1]
Coordinates:
time: [3.75..3.75]
Number Of Attributes: 2
long_name : time
units : days since 2017-12-01 00:00:00 +00:00
(0) 3.75
Variable: time (file variable)
Type: float
Total Size: 4 bytes
1 values
Number of Dimensions: 1
Dimensions and sizes: [time | 1]
Coordinates:
time: [ 4.. 4]
Number Of Attributes: 2
long_name : time
units : days since 2017-12-01 00:00:00 +00:00
(0) 4
Variable: time (file variable)
Type: float
Total Size: 4 bytes
1 values
Number of Dimensions: 1
Dimensions and sizes: [time | 1]
Coordinates:
time: [4.25..4.25]
Number Of Attributes: 2
long_name : time
units : days since 2017-12-01 00:00:00 +00:00
(0) 4.25
Variable: time (file variable)
Type: float
Total Size: 4 bytes
1 values
Number of Dimensions: 1
Dimensions and sizes: [time | 1]
Coordinates:
time: [4.5..4.5]
Number Of Attributes: 2
long_name : time
units : days since 2017-12-01 00:00:00 +00:00
(0) 4.5
Variable: time (file variable)
Type: float
Total Size: 4 bytes
1 values
Number of Dimensions: 1
Dimensions and sizes: [time | 1]
Coordinates:
time: [4.75..4.75]
Number Of Attributes: 2
long_name : time
units : days since 2017-12-01 00:00:00 +00:00
(0) 4.75
Variable: time (file variable)
Type: float
Total Size: 4 bytes
1 values
Number of Dimensions: 1
Dimensions and sizes: [time | 1]
Coordinates:
time: [ 5.. 5]
Number Of Attributes: 2
long_name : time
units : days since 2017-12-01 00:00:00 +00:00
(0) 5
On Thu, Nov 1, 2018 at 9:01 PM Mary Haley <haley at ucar.edu> wrote:
> Jyothi,
>
> Thanks for providing the one file. We would need to see information about
> the other files, however, in order to determine why NCL couldn't aggregate
> the time dimension. We need to see what the time variable looks like across
> all the files.
>
> It may be the case that time is monotonic on one file, but when you
> concatenate time across several files, it may not be monotonic depending on
> the "units" of each time variable and the values. If the units are
> different for each file, then this is going to be an issue, because NCL
> assumes that the aggregated dimension has the same units across all files.
>
> Can you run this small script for me and email the output back to ncl-talk:
>
> dir =
> "/incois_ncmrwfx/incois/hycom/hwrf_output/pytmp/POMcoupled_emcPHY/com/2017120100/03B/"
> files = systemfunc("ls " + dir + "ockhi03b.2017120100.pom.00*.nc")
>
> do nf=0,dimsizes(files)-1
> a = addfile(files(nf),"r")
> print(a->time)
> end do
>
> Hopefully I don't have any typos in the code.
>
> Thanks,
>
> --Mary
>
>
>
>
> On Wed, Oct 31, 2018 at 8:55 PM, Jyothi L <jyothir033 at gmail.com> wrote:
>
>> 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
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181101/6ab67468/attachment.html>
More information about the ncl-talk
mailing list