Re: continents contours and corresponding variable values don't overlap

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Fri Feb 11 2011 - 15:09:54 MST

I speculate that the one of the
files span -180 to +180 (binary file)
and the other (CCSM) spans 0 - 360

After

     oro = ins->LANDFRAC(0,:,:)

Add

     oro = lonFlip(oro)

Good luck

On 2/11/11 11:58 AM, Ioana Colfescu wrote:
> Hi,
>
> I have a binary data file with global temperature values. I want to mask out the continents and have the temperature over the ocean only. I use mask function and all works but when I plot the temperature the continents contours and the temperature values are not corresponding - they are somehow translated ( i.e. the contour of Australia is over Africa temperature values). Could anyone please tell me how to fix this problem ?
>
> The code I used is the following :
>
> ; **********************
> ; read the files
> path = ("/data/oldfarm2/colfi/cam3.1.p2/CCSM/IEt42_test1/temp/ts_interp.b30C.dat")
> nlat = 64
> nlon = 128
> nrec=1560
> ts = new((/nrec,nlat,nlon/),float)
>
> do ir=1,1559
> rec=ir
> ts(ir,:,:)=fbindirread(path,rec,(/nlat,nlon/),"float")
> end do
>
> ins=addfile("/data/oldfarm2/colfi/cam3.1.p2/CCSM/IEt42_test1/scripts/IEt42_test1.cam.1870-01.nc","r")
> oro = ins->LANDFRAC(0,:,:)
>
> ;************************************************
> mask out land
>
> ocean_only = ts
> ocean_only = mask(ts,oro,0) ; Return the values of ts where oro=0.8
>
>
> Thanks,
>
> Ioana
> _______________________________________________
> 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 Fri Feb 11 15:10:23 2011

This archive was generated by hypermail 2.1.8 : Tue Feb 15 2011 - 09:43:19 MST