New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
WorkingGroups/ConfigurationManager/2014/NOC_tools (diff) – NEMO

Changes between Version 1 and Version 2 of WorkingGroups/ConfigurationManager/2014/NOC_tools


Ignore:
Timestamp:
2017-04-27T21:06:11+02:00 (7 years ago)
Author:
nicolasmartin
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WorkingGroups/ConfigurationManager/2014/NOC_tools

    v1 v2  
    1 [[TOC(heading=nemo_ConfigurationManagerNOC,nemo_ConfigurationManagerNOC/*, depth=1)]] 
    2  
    3 = '''NOC BDY Tools''' = 
     1= NOC BDY Tools 
    42 
    53This is just a note to illustrate where I had got to with a few scripts to set up open boundaries for NEMO simulations using the BDY code. This set of tools was born out of a requirement to have a generic method by which to provide boundary data for use in regional NEMO configurations. The original code for these tools was written in Mathworks Matlab. It is was being translated into Python for wider distribution and to facilitate development, but this process stalled at the beginning of 2013. The Python port is 70% complete and the desire is to finish an alpha version within the next six months. At present the tools have only been tested by transferring data from global NEMO simulations to refined regional domains, although in principle could use non-NEMO input to generate BDY data. 
     
    75The BDY tools use grid information from the source data (e.g. a global NEMO 025 run) and destination simulation (i.e. the proposed regional simulation - at present you have to run the proposed regional simulation with nn_msh=3 to get the required mesh/mask files for the setup tools) to determine which source points are required for data extraction. This is done using a kdtree approximate nearest neighbour algorithm. The idea behind this targeted method is that if a NEMO style grid file is produced (tool to be written) for non-NEMO source data (e.g. we could use NCML [XML] to wrap non-NEMO netcdf files so they appear to have the common variables and dimensions e.g. votemper etc) in principle the BDY tools become more generic. At present the tools do not contain many options, but those that exist are accessed through a NEMO style namelist that is read in when the main python call is made. 
    86 
     7== Summary: 
    98 
    10 == Summary: == 
     9•       Works using a NEMO style namelist to initiate BDY configuration. 
     10•       Automatic identification of BDY points from a user chosen or predefined mask 
     11•       KDTree nearest neighbour matchup between the identified BDY points and the associated locations on source grid 
     12•       Data are first interpolated (horizontally) from source grid to destination BDY points using: 
     13  •     Bi-linear 
     14  •     Gauss-like – distance weighted function using nearest 9 points with a de-correlation distance r0 proportional to dx*cos(lat(j,i)) 
     15  •     Nearest – takes closest point on distance (for use with similar res src and dst grids) 
     16•       Then in the vertical 
     17  •     Linear 
     18  •     Cubic-Spline 
     19•       Output in NEMO v3.2/3.3 and 3.4 forms 
     20•       Time stretching used to accommodate mismatch in source and destination calendars 
     21•       Optional smoothing of BDY boundary (post interpolation) 
     22•       Should be able to accept non NEMO netcdf src files, but not tested yet 
     23•       Handles rotation of vector quantities and can accommodate rotated grids (e.g. pan arctic) 
     24•       At present is only coded to use TPXO7.2 inverse tidal model to provide tidal boundary conditions 
     25•       Recently add a hack to setup generic tracer boundary conditions (e.g. so one can include nutrients for coupled ecosystem simulations 
    1126 
    12 •       Works using a NEMO style namelist to initiate BDY configuration.[[BR]] 
    13 •       Automatic identification of BDY points from a user chosen or predefined mask[[BR]] 
    14 •       KDTree nearest neighbour matchup between the identified BDY points and the associated locations on source grid [[BR]] 
    15 •       Data are first interpolated (horizontally) from source grid to destination BDY points using: [[BR]] 
    16   •     Bi-linear[[BR]] 
    17   •     Gauss-like – distance weighted function using nearest 9 points with a de-correlation distance r0 proportional to dx*cos(lat(j,i))[[BR]] 
    18   •     Nearest – takes closest point on distance (for use with similar res src and dst grids)[[BR]] 
    19 •       Then in the vertical[[BR]] 
    20   •     Linear[[BR]] 
    21   •     Cubic-Spline [[BR]] 
    22 •       Output in NEMO v3.2/3.3 and 3.4 forms[[BR]] 
    23 •       Time stretching used to accommodate mismatch in source and destination calendars[[BR]] 
    24 •       Optional smoothing of BDY boundary (post interpolation)[[BR]] 
    25 •       Should be able to accept non NEMO netcdf src files, but not tested yet[[BR]] 
    26 •       Handles rotation of vector quantities and can accommodate rotated grids (e.g. pan arctic) [[BR]] 
    27 •       At present is only coded to use TPXO7.2 inverse tidal model to provide tidal boundary conditions[[BR]] 
    28 •       Recently add a hack to setup generic tracer boundary conditions (e.g. so one can include nutrients for coupled ecosystem simulations[[BR]] 
     27== Example namelist: 
    2928 
    30 == Example namelist: == 
    31  
    32  
    33 {{{ 
     29{{{#!f 
    3430!----------------------------------------------------------------------- 
    3531!   vertical coordinate 
     
    108104}}} 
    109105 
    110 == Examples: == 
     106== Examples: