Re: Subsetting NLDAS variables

From: Rick Brownrigg <brownrig_at_nyahnyahspammersnyahnyah>
Date: Tue Mar 12 2013 - 10:39:51 MDT

Hi Noel,

I'm not expert at this, but I think you'd subset something like:

    d = fin->apcpsfc(:, {39.5:41.5}, {-83.5:-81.5})

I did this using a small subset of the time dimension, and the spatial subsetting seemed to be right.

However, using ":" for time above is not quite right. I don't understand the time coordinate in this file -- the values all seem to be zeros. If I understand "time"s metadata, I think you'd have to calculate indices N and M for your start/stop times and specify it as:

   d = fin->apcpsfc(N:M, {39.5:41.5}, {-83.5:-81.5})

I hope that helps…
Rick

On Mar 12, 2013, at 10:11 AM, Noel Aloysius <noel.aloysius@gmail.com> wrote:

> Hello NCL-talk,
>
> I want to extract a subset (lat 39.5 to 41.5 and lon -83.5 to -81.5) of hourly precipitation for the period 1979-2012 from the NLDAS-2 OPeNDAP archives.
>
> I am not sure how to define the subset.
>
>
> f1 = "http://hydro1.sci.gsfc.nasa.gov:80/dods/NLDAS_FORA0125_H.002"
> exists = isfilepresent(f1)
> print("File: <" + f1 + ">, existence: " + exists) ; returns the following
>
> (0) File: <http://hydro1.sci.gsfc.nasa.gov:80/dods/NLDAS_FORA0125_H.002>, existence: True
>
> fin = addfile(f1, "r")
>
> At this point, I am not sure how to define the subset of the variable apcpsfc (precipitation hourly total (kg/m^2)
>
> Thanks in advance for the help.
>
> I am using NCL 6.1.2 DAP-enabled version.
>
> Thanks,
> Noel
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Mar 12 08:40:02 2013

This archive was generated by hypermail 2.1.8 : Wed Mar 13 2013 - 14:19:38 MDT