mitgcm
Analysis of MITgcm output using python
Public Member Functions | List of all members
mitgcm.core.Tracerpoint_field Class Reference

This is the base class for all model fields on the tracer points. More...

Inheritance diagram for mitgcm.core.Tracerpoint_field:
Inheritance graph
[legend]

Public Member Functions

def __init__
 
def load_field
 Load a model field from NetCDF output. More...
 
def take_d_dx
 Take the x derivative of the field on tracer points, using spacings in grid object. More...
 
def numerics_take_d_dx (self, rho, wet_mask_TH, dxC)
 
def take_d_dy
 Take the y derivative of the field on tracer points, using spacings in grid object. More...
 
def numerics_take_d_dy (self, rho, wet_mask_TH, dyC)
 The numerical bit of taking the y derivative. More...
 
def take_d_dz
 Take the z derivative of the field given on tracer-points, using the spacings in grid object. More...
 
- Public Member Functions inherited from mitgcm.core.MITgcm_Simulation
def __init__
 Instantiate an MITgcm model instance. More...
 
def load_field
 Load a model field from NetCDF output. More...
 
def load_from_file (self, model_instance, file_list, variable, time_level, grid_loc, single_file)
 Internal function to pull the data from the file(s). More...
 
def __add__ (self, other)
 A method that allows model objects to be added together. More...
 
def __div__ (self, other)
 A method that allows model objects to be divided by floating point numbers. More...
 
def __mul__ (self, other)
 A method that allows model objects to be multiplied by floating point numbers. More...
 
def __rmul__ (self, other)
 A method that allows model objects to be multiplied by floating point numbers. More...
 

Additional Inherited Members

- Public Attributes inherited from mitgcm.core.MITgcm_Simulation
 grid
 

Detailed Description

This is the base class for all model fields on the tracer points.

It includes definitions for taking derivatives.

Definition at line 593 of file core.py.

Constructor & Destructor Documentation

def mitgcm.core.Tracerpoint_field.__init__ (   self,
  model_instance,
  netcdf_filename,
  variable,
  time_level = -1,
  empty = False,
  field_name = None,
  single_file = False 
)

Definition at line 595 of file core.py.

Member Function Documentation

def mitgcm.core.Tracerpoint_field.load_field (   self,
  model_instance,
  netcdf_filename,
  variable,
  time_level = -1,
  field_name = None,
  grid_loc = 'T',
  single_file = False 
)

Load a model field from NetCDF output.

This function associates the field with the object it is called on.

time_level can be an integer or an array of integers. If it's an array, then multiple time levels will be returned as a higher dimensional array.

netcdf_filename can be a string with shell wildcards - they'll be expanded and all of the files loaded. BUT, this is intended as a way to take a quick look at the model. I would strongly recommend using something like "gluemncbig" to join the multiple tiles into one file before doing proper analysis.

Definition at line 603 of file core.py.

def mitgcm.core.Tracerpoint_field.numerics_take_d_dx (   self,
  rho,
  wet_mask_TH,
  dxC 
)

Definition at line 636 of file core.py.

def mitgcm.core.Tracerpoint_field.numerics_take_d_dy (   self,
  rho,
  wet_mask_TH,
  dyC 
)

The numerical bit of taking the y derivative.

This has been separated out so that it can be accelerated with numba, but that isn't working yet.

Definition at line 672 of file core.py.

def mitgcm.core.Tracerpoint_field.take_d_dx (   self,
  model_instance,
  input_field = 'RHO',
  output_field = 'dRHO_dx' 
)

Take the x derivative of the field on tracer points, using spacings in grid object.

Performs centred second-order differencing everywhere except next to boundaries. First order is used there (meaning the gradients at the boundary are evaluated half a grid point away from where they should be).

Definition at line 618 of file core.py.

def mitgcm.core.Tracerpoint_field.take_d_dy (   self,
  model_instance,
  input_field = 'RHO',
  output_field = 'dRHO_dy' 
)

Take the y derivative of the field on tracer points, using spacings in grid object.

Performs centred second-order differencing everywhere except next to boundaries. First order is used there (meaning the gradients at the boundary are evaluated half a grid point away from where they should be).

Definition at line 656 of file core.py.

def mitgcm.core.Tracerpoint_field.take_d_dz (   self,
  model_instance,
  input_field = 'RHO',
  output_field = 'dRHO_dz' 
)

Take the z derivative of the field given on tracer-points, using the spacings in grid object.

Performs centred second-order differencing everywhere except next to boundaries. First order is used there (meaning the gradients at the boundary are evaluated half a grid point away from where they should be).

Definition at line 693 of file core.py.


The documentation for this class was generated from the following file: