[ncl-talk] Problem with CFS initial condition data plot in NCL

Nicolas GASNIER ngprod41 at gmail.com
Tue Aug 4 05:11:17 MDT 2015


Hi,

With the xaxis_1 and yaxis_1 variables you should try to build a lat and 
lon 2d arrays matching your data grid dimensions. Then use these 2d 
arrays as sfXArray and sfYArray plotting ressource.

Something like this (untested) :

xaxis_1 = fin->xaxis_1
yaxis_1 = fin->yaxis_1

lon2d = new((/720, 410/), float)
do i=0,719
     lon2d(i, :) = xaxis_1
end do

lat2d = new((/720, 410/), float)
do i=0,409
     lat2d(:, i) = yaxis_1
end do


gen_res = True
gen_res at sfXArray = lon2d
gen_res at sfYArray = lat2d

Then pass that ressource to your plotting function.

Hope that helps.

Nicolas Gasnier


Le 04/08/2015 08:23, ncl-talk-request at ucar.edu a écrit :
> Date: Tue, 4 Aug 2015 11:53:07 +0530
> From: Vimal Koul<koulvimal18 at gmail.com>
> Subject: [ncl-talk] Problem with CFS initial condition data plot in
> 	NCL
> To:ncl-talk at ucar.edu
> Message-ID:
> 	<CAJVe0MCbueZr-1EZHk6eOD1VULML0XEOMaGchvsM5rczLjjFSQ at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Dear Users,
>
> I am trying to plot an ocean data file which is a part of CFS High
> Resolution Initial Conditions (http://nomads.ncdc.noaa.gov/data.php).
>
> File: ocnanl.gdas.1985050100.ocean_temp_salt.res.nc (uploaded to ncl ftp
> link) or download from:https://copy.com/7bVgOvDfQKDjcg07
>
> Unfortunately, printVarSummary shows that the variable "temp" I'm trying to
> plot does not have coordinate information, however, nlat, nlon are
> provided. So I used fspan (and tried other functions also) to attach
> coordinates, but the resulting plot is messed up. The plot and ncl script
> are attached.
>
> Can you please help me in defining the lat long coordinate information for
> this type of data?
>
> I am completely new to NCL, infact just started last week.



More information about the ncl-talk mailing list