Re: Removing missing values from a 3D array

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Sun Jun 19 2011 - 13:32:15 MDT

The original post is not clear.

What procedure are you using to output the ascii file.
Is the source grid rectilinear or curvilinear?

One scenario: If you have a rectilinear array x(lat,lon):

      asciiwrite("foo.txt", x(jStrt:jLast,iStrt:iLast) )

      opt = True
      opt@fout = "foo.txt"
      write_matrix( x(jStrt:jLast,iStrt:iLast) , "10f7.2", opt)

Please see examples at:
http://www.ncl.ucar.edu/Document/Functions/Built-in/write_matrix.shtml
http://www.ncl.ucar.edu/Document/Functions/Built-in/asciiwrite.shtml

On 6/19/11 1:24 PM, Brandon Fisel wrote:
> You could bury your ascii output code into a conditional statement:
>
> if (.not.(ismissing(yourvariable))) then
> output your data to ascii
> code goes here
> else
>
> endif
>
> -------------------------------------------------------------
> Brandon Fisel
>
>
> On Sun, Jun 19, 2011 at 13:26, Justin Glisan <glisanj@iastate.edu
> <mailto:glisanj@iastate.edu>> wrote:
>
> Hello,
>
> I have a script that cuts out a sub-region within an Arctic domain.
> Then I use a sea ice and ocean mask to get only the land points.
> When I print out a variable, say precipitation, I get a value for
> all grid points within the sub-region, but outside the "box" the
> printed value is -999. I would like to remove these values from the
> outputted ascii file, as they take up a lot of space. Is there
> anyway to have only the "sub-region" outputted?
>
> Thank you,
>
> Justin
>
> _______________________________________________
> 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
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sun Jun 19 13:32:23 2011

This archive was generated by hypermail 2.1.8 : Mon Jun 20 2011 - 12:30:20 MDT