Re: problems regridding CCSM CICE grid

From: David B. Reusch <dreusch_at_nyahnyahspammersnyahnyah>
Date: Tue Mar 19 2013 - 17:03:16 MDT

Hi Mary,

Thanks to your efforts I was able to eliminate the regridding steps as
the problem source and focus on how I was creating the new netCDF file
with the regridded data. My modified script is not pretty but it
creates the file correctly now. Short version: I needed to include lat
& lon from the target grid and define the vars using that instead of y &
x. My only other experience with ESMF used files that both had lat/lon
(and the target was just a subset of the source). This time it was CCSM
CICE TLAT/TLON to CCSM atm lat/lon. I overlooked the importance of the
name changes and just used the regridded TLAT/TLON. Apparently that's
asking for trouble...

Thanks for finding time to at least look at the regridding part, that
definitely helped me to find the broken part!


Mary Haley said the following on 3/19/13 1:11 PM:
> Hi Dave,
> I got all your files, and for debugging purposes, I decided to create a single NCL
> script that did the regridding. (I had a script for this, so it was a quick couple of changes).
> The reason I did this is because it's easier for me to look at one script rather than several scripts.
> Once I had this working, I tried to compare your scripts with the single one, but I don't
> immediately see the problem. One issue is that you don't want to set SrcRegional
> and DstRegional to True, because both of your grids are global. Also, you want to
> set res@gsnAddCyclic to True.
> Please see the attached script and PNG file. I'm not sure why your images were
> showing a lot more white areas, so this might be something to look into.
> I'm sorry I don't have time to do more debugging. I'm a bit pressed for time today.
> Let me know if this script doesn't help you find the problem.
> --Mary
> On Mar 18, 2013, at 11:37 AM, David B. Reusch wrote:
>> Hello,
>> I have run into a problem trying to regrid CCSM CICE data to the CCSM
>> atmospheric grid. Inexperience with the CICE grid may be part of what's
>> going on but I'm also seeing weirdness in NCL plotting of regridded
>> data. (See for the atm grid I want to regrid to.)
>> The CICE grid (as I understand it and based on looking at plots, etc.)
>> is basically a normally spaced lat/lon grid in the SH (the part I care
>> about) and a shifted pole in the NH (to over Greenland so the sea ice
>> and ocean models can function over the North Pole). See
>> When I use ESMF to regrid (see define_src.ncl, define_tgt.ncl,
>> define_wts.ncl, do_regrid.ncl), the general picture looks "ok" but there
>> are gaps at ~40 deg W and 0 deg. The former is probably due to this
>> being the edge of the CICE grid, but the latter is a mystery. The SH
>> looks ok other than this. The NH starts to get weird beginning with
>> something at the equator, between the two longitude gaps that goes off
>> in a tail to the west. The Greenland pole area is also nearly free of
>> grid points, though I don't know if this is expected or not. See
>> and for plots of the
>> regridded grid points.
>> I'd at least like to fix the gaps at ~40 deg W and 0 deg and I'd be
>> happier if the NH weirdness went away (but it's not essential, I think).
>> Ignoring the above gridpoint issues, when I proceed with
>> gsn_csm_contour_map_polar, things get ugly in the area west of 0 deg
>> with contours that just don't make any sense (see
>> Although cnFillMode only affects contour filling, not where the contours
>> go, I also tried cellfill and rasterfill to see what happened. In
>> raster fill this same area of wacky contours is left blank, making me
>> wonder if there's something going wrong in NCL vs. it just being my data
>> (see
>> I've uploaded ncl_report2_dbr.tgz to the ftp site (ignore
>> ncl_report.dbr.tgz, it's missing ps files). In addition to the already
>> mentioned ncl and ps files, it has:
>> - the target grid
>> - the source grids and sea ice data to be regridded
>> - the regridded data
>> -,, ESMF files
>> - ccsm_atm_ll.ncl, ccsm_ice_ll.ncl, ccsm_plot.ncl NCL to plot atm grid,
>> ice grid, sea ice data
>> - ccsm_atm_ll*.ps atm grid plots
>> - ccsm_ice_ll*.ps ice grid plots, original and regridded
>> Note that the reason for this regridding is to take advantage of
>> existing code that uses the CCSM atm grid for creating WRF WPS
>> intermediate files from netCDF files.
>> Thanks,
>> Dave
>> --
>> Associate Research Professor of Climatology
>> Dept of Earth and Environmental Science
>> MSEC 304; 801 Leroy Place
>> New Mexico Tech
>> Socorro, NM 87801
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:

Associate Research Professor of Climatology
Dept of Earth and Environmental Science
MSEC 304; 801 Leroy Place
New Mexico Tech
Socorro, NM 87801
Received on Tue Mar 19 17:03:23 2013

This archive was generated by hypermail 2.1.8 : Fri Mar 22 2013 - 16:45:18 MDT