Tools for Displaced-Pole Ocean Grid Generation for CCSM2 Steve Yeager Esther Brady Davis Rick Smith John What needs to be modified? 1. OCN horiz_grid : ieee r8, {ulat,ulng,htn,hte,hus,huw,utan} topography : ieee i4, {kmt} region_mask : ieee i4 {regionmask} other input_template files… 2. CPL map_ATM_to_OCN_aave.nc map_ATM_to_OCN_bilin.nc map_OCN_to_ATM_aave.nc map_RUNOFF_to_OCN.nc Tools ns_dipole.F generates a dipole mesh grid, (R Smith et al) topography.F Generates a kmt based on etopo5 data, (R Smith et al) paleotopo.F90 Generates a kmt based on paleo data display_hgrid_land.F Grid display with land mask, (R Smith et al) eCubed (C++ package) Interactive grid display & kmt edit, (J Davis et al) grid_bin2nc.F90 Creates a netcdf file of grid info gridkmt_nc2bin.F90 Writes kmt in netcdf back into binary ncview (C++ package) All-purpose netcdf viewer (D Pierce) (http://meteora.ucsd.edu/~pierce/ncview_home_page.html) SCRIP (F90 package) Remapping between grids (P Jones) (http://climate.acl.lanl.gov/software/SCRIP/scrip_frames.htm) (http://www.cgd.ucar.edu/csm/models/ocn-pop/scrip.shtml) mk_grid.csh Automates grid generation procedure, including grid & kmt mk_ocninput.csh Automates ocn input file modification, including region mask mk_remap.csh Automates atmosphereocean map generation mk_runoff_remap.csh Automates runoffocean map generation map_runoff (F90 package) Correction routines for runoffocean map 1. a. Generating a Grid • ns_dipole* generates a dipole mesh grid with userspecified north/south pole locations. • Equator is always a grid line • Enhanced meridional resolution at the equator • Code tries to make aspect ratio 1 • Nx is independent variable (sets the order of the resolution); Ny requires iteration Created using display_hgrid* (R Smith et al) 1. b. Generating a kmt • topography* assigns topography/kmt to a grid based on the 1/12 degree etopo5 dataset. • paleotopo* assigns topography/kmt to a grid based on a paleo bathymetry dataset in netcdf format. Created using display_hgrid_land* Iterate grid/kmt generation until … for a given Nx and equatorial gaussian function, Ny is sufficient to extend the grid into the polar continents without wasting resolution, … grid has acceptable min/max cell sides & aspect ratios for active ocean points (when compared to standard grids) 1. c. Hand Edit Kmt • eCubed* enables interactive gridviewing/kmt-editing using a mouse & keyboard • Reads/writes a grid netcdf file created with grid_bin2nc* • Convert kmt back into POP input binary with gridkmt_nc2bin* Created using display_hgrid_land* Created using eCubed* 2. a. Maps between ATM & OCN • mk_remap.csh creates atmosphereocean mappings using SCRIP (Spherical Coordinate Remapping and Interpolation Package) developed by Phil Jones. 2. b. Mapping Runoff to OCN • • • mk_runoff_remap.csh calls SCRIP; generates a conservative runoffocean mapping netcdf. BUT, it does not guarantee global water conservation ALSO, it may require additional smoothing to prevent excessively low ocean salinities in high runoff regions. • Use map_runoff/*.F90 for – – – – runoff map conservation correction map matrix testing ocean smoothing map generation & testing map matrix multiplication. Why are conservation corrections needed? Potential flux loss …where an active source grid cell does not overlap any (a) or only partially overlaps (b) a destination cell. …where an active source grid cell maps into an inactive destination cell (c) runoff_conserve_mod.F90 applies corrections Runoff Smoothing • runoff_smooth_mod.F90 contains routines for generating an ocean-to-ocean smoothing map • Input parameters maxradius (km) & efold (km) • test_smooth generates netcdf output of smoothing effects for select source points efold = 100km, maxradius = 500km Runoff-to-Ocean Map with Smoothing • runoff_map_mod.F90 contains routines for matrix multiplication & testing: runoff grid ocean grid runoff grid Smoothing Map Corrected SCRIP Map = Final Map efold = 100km, maxradius = 500km efold = 2000km, maxradius = 500km Surface Salinity Effect of Smoothing Runoff