source:
issm/oecreview/Archive/12678-13393/ISSM-12943-12944.diff@
13394
Last change on this file since 13394 was 13394, checked in by , 13 years ago | |
---|---|
File size: 22.2 KB |
-
u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/solve.py
10 10 """ 11 11 SOLVE - apply solution sequence for this model 12 12 13 14 15 13 Usage: 14 md=solve(md,solutionenum,varargin) 15 where varargin is a list of paired arguments of string OR enums 16 16 17 18 19 20 21 22 23 24 25 26 27 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 28 28 29 29 extra options: 30 30 - loadonly : does not solve. only load results 31 31 32 33 32 Examples: 33 md=solve(md,DiagnosticSolutionEnum); 34 34 """ 35 35 36 36 #recover and process solve options -
u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/process_solve_options.py
5 5 """ 6 6 DEFAULT_SOLVE_OPTIONS - set up default options for solve phase 7 7 8 9 8 Usage: 9 options=process_solve_options(options) 10 10 11 11 See also: SOLVE 12 12 """ 13 13 14 14 outoptions={} -
u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/marshall.py
4 4 """ 5 5 MARSHALL - outputs a compatible binary file from @model md, for certain solution type. 6 6 7 8 7 The routine creates a compatible binary file from @model md 8 This binary file will be used for parallel runs in JPL-package 9 9 10 11 10 Usage: 11 marshall(md) 12 12 """ 13 13 14 14 print "marshalling file '%s.bin'." % md.miscellaneous.name -
u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/AnalysisConfiguration.py
4 4 """ 5 5 ANALYSISCONFIGURATION - return type of analyses, number of analyses 6 6 7 8 7 Usage: 8 [analyses, numanalyses]=AnalysisConfiguration(solutiontype); 9 9 """ 10 10 11 11 if solutiontype == DiagnosticSolutionEnum: -
u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/MatlabProcessPatch.py
2 2 """ 3 3 PROCESSPATCH - create a structure from a patch 4 4 5 6 5 Usage: 6 Result=ProcessPatch(Result); 7 7 """ 8 8 9 9 #loop over steps -
u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/setflowequation.py
8 8 """ 9 9 SETELEMENTSTYPE - associate a solution type to each element 10 10 11 12 13 14 15 16 17 18 19 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' 20 20 21 22 21 Usage: 22 md=setflowequation(md,varargin) 23 23 24 25 26 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'); 27 27 """ 28 28 29 29 #some checks on list of arguments -
u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/loadresultsfromdisk.py
4 4 """ 5 5 LOADRESULTSFROMDISK - load results of solution sequence from disk file "filename" 6 6 7 8 7 Usage: 8 md=loadresultsfromdisk(md=False,filename=False); 9 9 """ 10 10 11 11 #check number of inputs/outputs -
u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/waitonlock.py
7 7 """ 8 8 WAITONLOCK - wait for a file 9 9 10 11 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 12 12 13 14 13 Usage: 14 flag=waitonlock(md,executionpath) 15 15 """ 16 16 17 17 #Get filename (lock file) and options -
u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/recover_areas.py
5 5 """ 6 6 RECOVER_AREAS - flag the element depending on the physical model that is assigned to them 7 7 8 8 This routine is called by setelementstype, do not use 9 9 10 11 10 Usage: 11 [hutterflag macayealflag pattynflag stokesflag filltype]=recover_areas(md,varargin); 12 12 """ 13 13 14 14 #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
7 7 """ 8 8 WRITEDATA - write model field in binary file 9 9 10 11 10 Usage: 11 WriteData(fid,varargin) 12 12 """ 13 13 14 14 #process options -
u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/loadresultsfromcluster.py
7 7 """ 8 8 LOADRESULTSFROMCLUSTER - load results of solution sequence from cluster 9 9 10 11 10 Usage: 11 md=loadresultsfromcluster(md,runtimename); 12 12 """ 13 13 14 14 #retrieve cluster, to be able to call its methods -
u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/parameterization/parameterize.py
5 5 def parameterize(md,parametername): 6 6 """ 7 7 PARAMETERIZE - parameterize a model 8 9 10 11 12 13 14 15 16 17 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'); 18 18 """ 19 19 20 20 #some checks -
u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/parseresultsfromdisk.py
6 6 def parseresultsfromdisk(filename,iosplit): 7 7 """ 8 8 PARSERESULTSFROMDISK - ... 9 10 11 9 10 Usage: 11 results=parseresultsfromdisk(filename,iosplit) 12 12 """ 13 13 14 14 if iosplit: -
u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/addnote.py
1 1 def addnote(md,string): 2 2 """ 3 3 ADDNOTE - add a note to the existing model notes field 4 5 6 7 8 9 4 5 Usage: 6 md=addnote(md,string); 7 8 Example: 9 md=addnote(md,'Pine Island, Geometry of 2007'); 10 10 """ 11 11 12 12 if not isinstance(string,str): -
u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/ismodelselfconsistent.py
4 4 """ 5 5 ISMODELSELFCONSISTENT - check that model forms a closed form solvable problem. 6 6 7 8 7 Usage: 8 ismodelselfconsistent(md), 9 9 """ 10 10 11 11 #initialize consistency as true -
u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/petscversion.py
6 6 """ 7 7 PETSCVERSION - recover petsc version number, inside config.h file 8 8 9 10 9 Usage: 10 PETSC_VERSION=petscversion(); 11 11 """ 12 12 13 13 #default -
u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/OS/issmscpin.py
9 9 """ 10 10 SCPIN get packages from host, using scp on unix, and pscp on windows 11 11 12 usage: scpin(host,packages,path) 13 14 12 usage: scpin(host,packages,path) 15 13 """ 16 14 17 15 #first get hostname -
u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/OS/issmscpout.py
9 9 """ 10 10 SCPOUT send packages to a host, using scp on unix, and pscp on windows 11 11 12 usage: scpout(host,path,packages) 13 14 12 usage: scpout(host,path,packages) 15 13 """ 16 14 17 15 #get hostname -
u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/OS/issmssh.py
8 8 """ 9 9 ISSMSSH - wrapper for OS independent ssh command. 10 10 11 12 11 usage: 12 issmssh(host,command) 13 13 """ 14 14 15 15 #first get hostname -
u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/OS/ispetsc.py
6 6 """ 7 7 ISPETSC - figure out if PETSC package was compiled with ISSM 8 8 9 10 9 Usage: 10 flag=ispetsc(); 11 11 """ 12 12 13 13 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
6 6 """ 7 7 ISMUMPS - figure out if MUMPS package was compiled with ISSM 8 8 9 10 9 Usage: 10 flag=ismumps(); 11 11 """ 12 12 13 13 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
3 3 """ 4 4 PARALLELRANGE - from a rank, and a number of processors, figure out a range, for parallel tasks. 5 5 6 7 6 Usage: 7 i1,i2=parallelrange(rank,numprocs,globalsize) 8 8 """ 9 9 10 10 #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
4 4 def SetIceShelfBC(md,icefrontfile=''): 5 5 """ 6 6 SETICESHELFBC - Create the boundary conditions for diagnostic and thermal models for a Ice Shelf with Ice Front 7 8 9 10 11 12 13 14 15 16 17 18 19 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 20 20 """ 21 21 22 22 #node on Dirichlet (boundary and ~icefront) -
u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/Geometry/FlagElements.py
8 8 """ 9 9 FLAGELEMENTS - flag the elements in an region 10 10 11 11 The region can be given with an exp file, a list of elements. 12 12 13 14 13 Usage: 14 flag=FlagElements(md,region); 15 15 16 17 18 19 20 21 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); 22 22 """ 23 23 24 24 if isinstance(region,str): -
u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/Shell/issmdir.py
6 6 """ 7 7 ISSMDIR - Get ISSM_DIR environment variable 8 8 9 10 9 Usage: 10 ISSM_DIR=issmdir() 11 11 """ 12 12 13 13 if not 'Windows' in platform.system(): -
u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/generic.py
13 13 """ 14 14 GENERIC cluster class definition 15 15 16 17 18 16 Usage: 17 cluster=generic('name','astrid','np',3); 18 cluster=generic('name',oshostname(),'np',3,'login','username'); 19 19 """ 20 20 21 21 def __init__(self,*args): # {{{ -
u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/pairoptions.py
4 4 """ 5 5 PAIROPTIONS class definition 6 6 7 8 9 7 Usage: 8 pairoptions=pairoptions(); 9 pairoptions=pairoptions('module',true,'solver',false); 10 10 """ 11 11 12 12 def __init__(self,*arg):
Note:
See TracBrowser
for help on using the repository browser.