Re: Regrid error : area_conserve_remap

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Sat Sep 24 2011 - 17:20:23 MDT

area_conserve_remap requires that *both* the input and output grid be
global. The input grid

Variable: U
[snip]
            lat: [-18.40244..35.33525]
            lon: [-35.74922..35.74922]

is not global

On 9/24/11 2:30 PM, Erik Noble wrote:
> Hi. I am trying to remap a hi resolution file to a 2.5 degree global
> grid, similar to NCEP Reanalysis II, so that I can compare data. I'm
> following the examples using the area_conserve_remap function.
> http://www.ncl.ucar.edu/Document/Functions/Contributed/area_conserve_remap_Wrap.shtml
> I keep getting this error:
>
> Error in "cremapbin":
> Could not map global lat array into grid array
> Segmentation fault
>
> I am not sure where I am creating this error. Could I please have some
> help with this?
> Sincerely,
> Erik
>
>
> [eunoble@borg01t008] Experiment_01 $ ncl test_regrid.ncl
> Copyright (C) 1995-2011 - All Rights Reserved
> University Corporation for Atmospheric Research
> NCAR Command Language Version 6.0.0
> The use of this software is governed by a License Agreement.
> See http://www.ncl.ucar.edu/ for more details.
> (0) ***************************************************************
> (0) These are the WRF Model output files you are extracting from.
> (0) number of FILES = 97
> (0) ***************************************************************
> (0) Extracting WRF Model Output Variables
>
> Variable: U
> Type: float
> Total Size: 6844488 bytes
> 1711122 values
> Number of Dimensions: 4
> Dimensions and sizes: [time | 1] x [lev | 14] x [lat | 311] x [lon | 393]
> Coordinates:
> time: [0..0]
> lev: [1000..50]
> lat: [-18.40244..35.33525]
> lon: [-35.74922..35.74922]
> Number Of Attributes: 6
> _FillValue : 9.96921e+36
> description : y-wind component
> units : m s-1
> coordinates : lat lon
> stagger :
> FieldType : 104
> Error in "cremapbin":
> Could not map global lat array into grid array
> Segmentation fault
>
>
> ;;;;;;;;;;;;;;;; NCL SCRIPT
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
>
> ;***************************************************************
> ; Load Libaries
> ;***************************************************************
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
>
> begin
> ;***************************************************************
> ; Change these parts
> ;***************************************************************
> DATADir = "./" ;input directory
> Files = "wrfout_d01*_wind_diagnostics.nc
> <http://wind_diagnostics.nc>" ;input files
> ncdiro = "./" ;output directory
> NCFILE1 = "wind_diagnostics" ;output file
> ;***************************************************************
> ; Read in WRF Files
> ;***************************************************************
> ;FILES = systemfunc (" ls -1 " + DATADir + Files) ; file paths
> FILES = systemfunc (" ls -1 " + Files) ; file paths
> numFILES = dimsizes(FILES)
>
> print("***************************************************************")
> print("These are the WRF Model output files you are extracting from.")
> print("number of FILES = " + numFILES)
> ;print(FILES)
>
> print("***************************************************************")
> print ("Extracting WRF Model Output Variables")
> ;**************************************
> ; DO LOOP: Extraction
> ;**************************************
> ; Use wrf_user_getvar function to extract each variable.
> ; "-1" means all times, which doesn't matter here
> ; b/c there is only 1 time in each file
> ;************************************
> deltaTime = ispan(0,numFILES-1,1)
> do ifil = 0,0,1 ;0,numFILES-1
> a = addfile(FILES(ifil)+".nc","r") ;read individual wrfout file
> U = a->U
> V = a->V
> printVarSummary(U)
>
> ;************************************************
> ; interpolate to new grid (NCEP R2 2.5 GRID --> 73,144)
> ;***********************************************
> loni = U&lon
> lati = U&lat
> newlat = fspan(-90.,90,73)
> newlon = fspan(0.,359.,144)
> newlat@units = "degrees_north"
> newlon@units = "degrees_east"
>
>
> Uo = area_conserve_remap_Wrap (loni,lati,U, newlon,newlat, False)
> printVarSummary(Uo)
>
> end do
> end
>
>
>
>
>
> _______________________________________________________
> Erik Noble
> Center for Climate Systems Research, Columbia University
> NASA Goddard Institute for Space Studies
> 2880 Broadway, New York, NY-10025, USA
>
> Tel: +1 (212) 678-5512; Fax: +1 (212) 678-5552
> E-mail: enoble@giss.nasa.gov <mailto:enoble@giss.nasa.gov>,
> en2192@columbia.edu <mailto:en2192@columbia.edu>
> WEB: http://www.giss.nasa.gov/staff/enoble.html
> GISS: http://www.giss.nasa.gov
> CCSR: http://www.ccsr.columbia.edu
> _______________________________________________________
>
>
>
> _______________________________________________
> 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 Sat Sep 24 17:20:30 2011

This archive was generated by hypermail 2.1.8 : Mon Sep 26 2011 - 14:45:50 MDT