source: issm/oecreview/Archive/12678-13393/ISSM-12943-12944.diff@ 13394

Last change on this file since 13394 was 13394, checked in by Mathieu Morlighem, 13 years ago

Added 12678-13393

File size: 22.2 KB
  • u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/solve.py

     
    1010        """
    1111        SOLVE - apply solution sequence for this model
    1212 
    13             Usage:
    14                md=solve(md,solutionenum,varargin)
    15                where varargin is a list of paired arguments of string OR enums
     13           Usage:
     14              md=solve(md,solutionenum,varargin)
     15              where varargin is a list of paired arguments of string OR enums
    1616 
    17             solution types available comprise:
    18                         - DiagnosticSolutionEnum
    19                         - PrognosticSolutionEnum
    20                         - ThermalSolutionEnum
    21                         - SteadystateSolutionEnum
    22                         - TransientSolutionEnum...
    23                         - BalancethicknessSolutionEnum
    24                         - BedSlopeSolutionEnum
    25                         - SurfaceSlopeSolutionEnum
    26                         - HydrologySolutionEnum
    27                         - FlaimSolutionEnum
     17           solution types available comprise:
     18                  - DiagnosticSolutionEnum
     19                  - PrognosticSolutionEnum
     20                  - ThermalSolutionEnum
     21                  - SteadystateSolutionEnum
     22                  - TransientSolutionEnum...
     23                  - BalancethicknessSolutionEnum
     24                  - BedSlopeSolutionEnum
     25                  - SurfaceSlopeSolutionEnum
     26                  - HydrologySolutionEnum
     27                  - FlaimSolutionEnum
    2828 
    2929           extra options:
    30                - loadonly : does not solve. only load results
     30              - loadonly : does not solve. only load results
    3131 
    32             Examples:
    33                md=solve(md,DiagnosticSolutionEnum);
     32           Examples:
     33              md=solve(md,DiagnosticSolutionEnum);
    3434        """
    3535
    3636        #recover and process solve options
  • u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/process_solve_options.py

     
    55        """
    66        DEFAULT_SOLVE_OPTIONS - set up default options for solve phase
    77 
    8             Usage:
    9                options=process_solve_options(options)
     8           Usage:
     9              options=process_solve_options(options)
    1010 
    11             See also: SOLVE
     11           See also: SOLVE
    1212        """
    1313
    1414        outoptions={}
  • u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/marshall.py

     
    44        """
    55        MARSHALL - outputs a compatible binary file from @model md, for certain solution type.
    66
    7             The routine creates a compatible binary file from @model md
    8             This binary file will be used for parallel runs in JPL-package
     7           The routine creates a compatible binary file from @model md
     8           This binary file will be used for parallel runs in JPL-package
    99
    10             Usage:
    11                marshall(md)
     10           Usage:
     11              marshall(md)
    1212        """
    1313
    1414        print "marshalling file '%s.bin'." % md.miscellaneous.name
  • u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/AnalysisConfiguration.py

     
    44        """
    55        ANALYSISCONFIGURATION - return type of analyses, number of analyses
    66
    7             Usage:
    8                [analyses, numanalyses]=AnalysisConfiguration(solutiontype);
     7           Usage:
     8              [analyses, numanalyses]=AnalysisConfiguration(solutiontype);
    99        """
    1010
    1111        if   solutiontype == DiagnosticSolutionEnum:
  • u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/MatlabProcessPatch.py

     
    22        """
    33        PROCESSPATCH - create a structure from a patch
    44 
    5             Usage:
    6                Result=ProcessPatch(Result);
     5           Usage:
     6              Result=ProcessPatch(Result);
    77        """
    88
    99        #loop over steps
  • u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/setflowequation.py

     
    88        """
    99        SETELEMENTSTYPE - associate a solution type to each element
    1010
    11             This routine works like plotmodel: it works with an even number of inputs
    12             'hutter','macayeal','pattyn','stokes' and 'fill' are the possible options
    13             that must be followed by the corresponding exp file or flags list
    14             It can either be a domain file (argus type, .exp extension), or an array of element flags.
    15             If user wants every element outside the domain to be
    16             setflowequationd, add '~' to the name of the domain file (ex: '~Pattyn.exp');
    17             an empty string '' will be considered as an empty domain
    18             a string 'all' will be considered as the entire domain
    19             You can specify the type of coupling, 'penalties' or 'tiling', to use with the input 'coupling'
     11           This routine works like plotmodel: it works with an even number of inputs
     12           'hutter','macayeal','pattyn','stokes' and 'fill' are the possible options
     13           that must be followed by the corresponding exp file or flags list
     14           It can either be a domain file (argus type, .exp extension), or an array of element flags.
     15           If user wants every element outside the domain to be
     16           setflowequationd, add '~' to the name of the domain file (ex: '~Pattyn.exp');
     17           an empty string '' will be considered as an empty domain
     18           a string 'all' will be considered as the entire domain
     19           You can specify the type of coupling, 'penalties' or 'tiling', to use with the input 'coupling'
    2020
    21             Usage:
    22                md=setflowequation(md,varargin)
     21           Usage:
     22              md=setflowequation(md,varargin)
    2323
    24             Example:
    25                md=setflowequation(md,'pattyn','Pattyn.exp','macayeal',md.mask.elementonfloatingice,'fill','hutter');
    26                md=setflowequation(md,'pattyn','Pattyn.exp',fill','hutter','coupling','tiling');
     24           Example:
     25              md=setflowequation(md,'pattyn','Pattyn.exp','macayeal',md.mask.elementonfloatingice,'fill','hutter');
     26              md=setflowequation(md,'pattyn','Pattyn.exp',fill','hutter','coupling','tiling');
    2727        """
    2828
    2929        #some checks on list of arguments
  • u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/loadresultsfromdisk.py

     
    44        """
    55        LOADRESULTSFROMDISK - load results of solution sequence from disk file "filename"           
    66 
    7             Usage:
    8                md=loadresultsfromdisk(md=False,filename=False);
     7           Usage:
     8              md=loadresultsfromdisk(md=False,filename=False);
    99        """
    1010
    1111        #check number of inputs/outputs
  • u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/waitonlock.py

     
    77        """
    88        WAITONLOCK - wait for a file
    99 
    10             This routine will return when a file named 'filename' is written to disk.
    11             If the time limit given in input is exceeded, return 0
     10           This routine will return when a file named 'filename' is written to disk.
     11           If the time limit given in input is exceeded, return 0
    1212 
    13             Usage:
    14                flag=waitonlock(md,executionpath)
     13           Usage:
     14              flag=waitonlock(md,executionpath)
    1515        """
    1616
    1717        #Get filename (lock file) and options
  • u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/recover_areas.py

     
    55        """
    66        RECOVER_AREAS - flag the element depending on the physical model that is assigned to them
    77
    8             This routine is called by setelementstype, do not use
     8           This routine is called by setelementstype, do not use
    99
    10             Usage:
    11                [hutterflag macayealflag pattynflag stokesflag filltype]=recover_areas(md,varargin);
     10           Usage:
     11              [hutterflag macayealflag pattynflag stokesflag filltype]=recover_areas(md,varargin);
    1212        """
    1313
    1414        #go through varargin, extract options and plug them into subtype options, by order of appearance
  • u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/WriteData.py

     
    77        """
    88        WRITEDATA - write model field in binary file
    99 
    10             Usage:
    11                WriteData(fid,varargin)
     10           Usage:
     11              WriteData(fid,varargin)
    1212        """
    1313
    1414        #process options
  • u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/loadresultsfromcluster.py

     
    77        """
    88        LOADRESULTSFROMCLUSTER - load results of solution sequence from cluster
    99 
    10             Usage:
    11                md=loadresultsfromcluster(md,runtimename);
     10           Usage:
     11              md=loadresultsfromcluster(md,runtimename);
    1212        """
    1313
    1414        #retrieve cluster, to be able to call its methods
  • u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/parameterization/parameterize.py

     
    55def parameterize(md,parametername):
    66        """
    77        PARAMETERIZE - parameterize a model
    8          
    9             from a parameter python file, start filling in all the model fields that were not
    10             filled in by the mesh.py and mask.py model methods.
    11             Warning: the parameter file must be able to be run in Python
    12          
    13             Usage:
    14                md=parameterize(md,parametername)
    15          
    16             Example:
    17                md=parameterize(md,'Square.par');
     8
     9           from a parameter python file, start filling in all the model fields that were not
     10           filled in by the mesh.py and mask.py model methods.
     11           Warning: the parameter file must be able to be run in Python
     12
     13           Usage:
     14              md=parameterize(md,parametername)
     15
     16           Example:
     17              md=parameterize(md,'Square.par');
    1818        """
    1919
    2020        #some checks
  • u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/parseresultsfromdisk.py

     
    66def parseresultsfromdisk(filename,iosplit):
    77        """
    88        PARSERESULTSFROMDISK - ...
    9          
    10             Usage:
    11                results=parseresultsfromdisk(filename,iosplit)
     9
     10           Usage:
     11              results=parseresultsfromdisk(filename,iosplit)
    1212        """
    1313
    1414        if iosplit:
  • u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/addnote.py

     
    11def addnote(md,string):
    22        """
    33        ADDNOTE - add a note to the existing model notes field
    4          
    5             Usage:
    6                md=addnote(md,string);
    7          
    8             Example:
    9                md=addnote(md,'Pine Island, Geometry of 2007');
     4
     5           Usage:
     6              md=addnote(md,string);
     7
     8           Example:
     9              md=addnote(md,'Pine Island, Geometry of 2007');
    1010        """
    1111
    1212        if not isinstance(string,str):
  • u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/ismodelselfconsistent.py

     
    44        """
    55        ISMODELSELFCONSISTENT - check that model forms a closed form solvable problem.
    66
    7             Usage:
    8                ismodelselfconsistent(md),
     7           Usage:
     8              ismodelselfconsistent(md),
    99        """
    1010
    1111        #initialize consistency as true
  • u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/petscversion.py

     
    66        """
    77        PETSCVERSION - recover petsc version number, inside config.h file
    88 
    9             Usage:
    10                 PETSC_VERSION=petscversion();
     9           Usage:
     10              PETSC_VERSION=petscversion();
    1111        """
    1212
    1313        #default
  • u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/OS/issmscpin.py

     
    99        """
    1010        SCPIN get packages from host, using scp on unix, and pscp on windows
    1111 
    12             usage: scpin(host,packages,path)
    13  
    14  
     12           usage: scpin(host,packages,path)
    1513        """
    1614
    1715        #first get hostname
  • u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/OS/issmscpout.py

     
    99        """
    1010        SCPOUT send packages to a host, using scp on unix, and pscp on windows
    1111 
    12             usage: scpout(host,path,packages)
    13  
    14  
     12           usage: scpout(host,path,packages)
    1513        """
    1614
    1715        #get hostname
  • u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/OS/issmssh.py

     
    88        """
    99        ISSMSSH - wrapper for OS independent ssh command.
    1010 
    11             usage:
    12                issmssh(host,command)
     11           usage:
     12              issmssh(host,command)
    1313        """
    1414
    1515        #first get hostname
  • u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/OS/ispetsc.py

     
    66        """
    77        ISPETSC - figure out if PETSC package was compiled with ISSM
    88 
    9             Usage:
    10                 flag=ispetsc();
     9           Usage:
     10              flag=ispetsc();
    1111        """
    1212
    1313        configfile=os.path.join(issmdir(),'bin','config.h')    #should find it in the install target
  • u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/OS/ismumps.py

     
    66        """
    77        ISMUMPS - figure out if MUMPS package was compiled with ISSM
    88 
    9             Usage:
    10                 flag=ismumps();
     9           Usage:
     10              flag=ismumps();
    1111        """
    1212
    1313        configfile=os.path.join(issmdir(),'bin','config.h')    #should find it in the install target
  • u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/Cluster/parallelrange.py

     
    33        """
    44        PARALLELRANGE - from a rank, and a number of processors, figure out a range, for parallel tasks.
    55 
    6             Usage:
    7                i1,i2=parallelrange(rank,numprocs,globalsize)
     6           Usage:
     7              i1,i2=parallelrange(rank,numprocs,globalsize)
    88        """
    99
    1010        #We use floor. we under distribute rows. The rows left are then redistributed, therefore resulting in a more even distribution.
  • u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/BC/SetIceShelfBC.py

     
    44def SetIceShelfBC(md,icefrontfile=''):
    55        """
    66        SETICESHELFBC - Create the boundary conditions for diagnostic and thermal models for a  Ice Shelf with Ice Front
    7          
    8             Neumann BC are used on the ice front (an ANRGUS contour around the ice front
    9             must be given in input)
    10             Dirichlet BC are used elsewhere for diagnostic
    11          
    12             Usage:
    13                md=SetIceShelfBC(md,varargin)
    14          
    15             Example:
    16                md=SetIceShelfBC(md);
    17                md=SetIceShelfBC(md,'Front.exp');
    18          
    19             See also: SETICESHEETBC, SETMARINEICESHEETBC
     7
     8           Neumann BC are used on the ice front (an ANRGUS contour around the ice front
     9           must be given in input)
     10           Dirichlet BC are used elsewhere for diagnostic
     11
     12           Usage:
     13              md=SetIceShelfBC(md,varargin)
     14
     15           Example:
     16              md=SetIceShelfBC(md);
     17              md=SetIceShelfBC(md,'Front.exp');
     18
     19           See also: SETICESHEETBC, SETMARINEICESHEETBC
    2020        """
    2121
    2222        #node on Dirichlet (boundary and ~icefront)
  • u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/Geometry/FlagElements.py

     
    88        """
    99        FLAGELEMENTS - flag the elements in an region
    1010
    11             The region can be given with an exp file, a list of elements.
     11           The region can be given with an exp file, a list of elements.
    1212
    13             Usage:
    14                flag=FlagElements(md,region);
     13           Usage:
     14              flag=FlagElements(md,region);
    1515
    16             Example:
    17                flag=FlagElements(md,'all');
    18                flag=FlagElements(md,'');
    19                flag=FlagElements(md,'Domain.exp');
    20                flag=FlagElements(md,'~Domain.exp');
    21                flag=FlagElements(md,md.mask.elementongroundedice);
     16           Example:
     17              flag=FlagElements(md,'all');
     18              flag=FlagElements(md,'');
     19              flag=FlagElements(md,'Domain.exp');
     20              flag=FlagElements(md,'~Domain.exp');
     21              flag=FlagElements(md,md.mask.elementongroundedice);
    2222        """
    2323
    2424        if   isinstance(region,str):
  • u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/Shell/issmdir.py

     
    66        """
    77        ISSMDIR - Get ISSM_DIR environment variable
    88 
    9             Usage:
    10                ISSM_DIR=issmdir()
     9           Usage:
     10              ISSM_DIR=issmdir()
    1111        """
    1212
    1313        if not 'Windows' in platform.system():
  • u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/generic.py

     
    1313        """
    1414        GENERIC cluster class definition
    1515 
    16             Usage:
    17                cluster=generic('name','astrid','np',3);
    18                cluster=generic('name',oshostname(),'np',3,'login','username');
     16           Usage:
     17              cluster=generic('name','astrid','np',3);
     18              cluster=generic('name',oshostname(),'np',3,'login','username');
    1919        """
    2020
    2121        def __init__(self,*args):    # {{{
  • u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/pairoptions.py

     
    44        """
    55        PAIROPTIONS class definition
    66 
    7             Usage:
    8                pairoptions=pairoptions();
    9                pairoptions=pairoptions('module',true,'solver',false);
     7           Usage:
     8              pairoptions=pairoptions();
     9              pairoptions=pairoptions('module',true,'solver',false);
    1010        """
    1111
    1212        def __init__(self,*arg):
Note: See TracBrowser for help on using the repository browser.