Re: issue running PopLatLon / (gx1v5) version

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Fri, 17 Oct 2008 14:17:56 -0600

Hi Cecile,
You need to tell NCL where the weight file is located. So, if your file
is located in the following directory: /data1/wgt , you need to set your
environment like this:
setenv NCL_POP_REMAP /data1/wgt

A further dicussion about why you need to do this can be found here:
http://www.ncl.ucar.edu/Applications/pop2lat.shtml
Adam

Cecile Dardel wrote:
> Hello,
>
> I have a problem when I want to use the PoPLatLon function (it is the
> first time I try to use it).
> I understood that I need a weight file .
> I tried to download it from the ESG website, but the version I need
> (gx1v5) is not available.
> So I got, by a ftp from the NCAR, this file : gx1v5_070611.nc
>
> But now, I don't understand how to use it, when I try to remap.
> Here is the line I want to run ( I need to regrid to a 0.5x0.5 lat/lon
> grid):
> *remap = PopLatLon(fld,"gx1v5","0.5x0.5d","bilin","da","070611")*
>
> But I get this message error :
> *ls: map_*: No such file or directory
> (0) create_rmpPopFileName: file not recognized/found:
> map_gx1v5_to_1x1d_bilin_da_070611.nc
> (0) create_rmpPopFileName: dir searched: ./*
>
> Thank you very much for helping me.
>
> Best regards,
>
> Cecile Dardel
>
> PS : here is the script I have :
>
> ;************************************************
> ; pop2lat_1.ncl
> ;************************************************
> 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"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/popRemap.ncl"
> ;************************************************
> begin
> data = "SSH" ; "SSH"/"TAUX"/"TAUY"
> who = "m" ; "m=markus;y=yeager"
> ;**********************************************
> indir = "/gyre/cp1/sig/OBSERVATIONS/NCAR/"
> infile = "markus.nc"
> outdir = indir
> ; infile_grid = "/gyre/cp1/sig/OBSERVATIONS/NCAR/gx1v5_070611.nc"
> if (who.eq."m")then
> infile = "markus.nc"
> outfile = "map_markus_"+data
> else
> infile = "yeager.nc"
> outfile = "map_yeager_"+data
> end if
>
> in = addfile(indir+infile,"r")
> fld = in->$data$
>
> ;************************************************
> ; convert pop to a 1x1 degree grid
> ;************************************************
> remap = PopLatLon(fld,"gx1v5","1x1d","bilin","da","070611")
>
> ;************************************************
> ; create plots
> ;************************************************
> wks = gsn_open_wks("ps","pop2lat") ; open ps file
> gsn_define_colormap(wks,"WhBlGrYeRe") ; choose colormap
> i = NhlNewColor(wks,0.7,0.7,0.7) ; add gray to colormap
>
> res = True
> res_at_gsnPolar = "NH" ; choose hemisphere
>
> res_at_cnFillOn = True ; turn on color
> res_at_cnLinesOn = False ; no contour lines
>
> res_at_mpLandFillColor = "grey" ; color of land
> res_at_mpMinLatF = 50 ; adjust map limit
>
>
> res_at_cnLevelSelectionMode = "ManualLevels" ; set manual contour levels
> res_at_cnMinLevelValF = 0. ; set min contour level
> res_at_cnMaxLevelValF = 5. ; set max contour level
> res_at_cnLevelSpacingF = 0.5 ; set contour spacing
>
> res_at_gsnSpreadColors = True ; use full colormap
> res_at_gsnSpreadColorStart = 2
> res_at_gsnSpreadColorEnd = 97
>
> res_at_tiMainString = "gx1v3 to 1x1d"
>
> ; because this is ice data, which has a gap in the tropics, we need to
> ; explicitly pass the range of the data to plot. Since we are coloring
> ; the vectors, this range should also match the MinLatF above, since the
> ; range for the colors is chosen over the full data passed, and not the
> ; map limits.
>
> plot = gsn_csm_contour_map_polar(wks,remap(0,{50:90},:),res)
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
--------------------------------------------------------------
Adam Phillips			             asphilli_at_ucar.edu
National Center for Atmospheric Research   tel: (303) 497-1726
ESSL/CGD/CAS                               fax: (303) 497-1333
P.O. Box 3000				
Boulder, CO 80307-3000	  http://www.cgd.ucar.edu/cas/asphilli
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Oct 17 2008 - 14:17:56 MDT

This archive was generated by hypermail 2.2.0 : Fri Oct 24 2008 - 14:07:49 MDT