modelUtil module¶
Various routines, not just for ROMS models anymore. TODO: Rename this module.
-
modelUtil.getTiling(totalCores, ratio=1.0)¶ Determines the ROMS tiling to use based on the number of cores available. Sets NtileI and NtileJ
- Parameters
totalCores (int) – The number of cores to use
ratio (float) – The approximate aspect ratio of the model grid, I/J
-
modelUtil.get_ICs_lo(cdate, localpath, sshuser)¶ Get the atmospheric forcing and boundary layer conditions and ICs for LiveOcean ROMS model.
This requires an account on the remote server with private key authentication.
-
modelUtil.get_ICs_roms(ofs, cdate, cycle, localpath)¶
-
modelUtil.get_baseline_lo(cdate, vdir, sshuser)¶ Retrieve operational LiveOcean forecast data from UW
-
modelUtil.lo_date(cdate)¶ return the LiveOcean format of date e.g. f2019.11.06
-
modelUtil.makeOceanin(NPROCS, settings, template, outfile, ratio=1.0)¶ creates the ocean.in file for ROMS forecasts using templated variables
-
modelUtil.ndate(cdate, days)¶ return the YYYYMMDD for CDATE +/- days
-
modelUtil.ndate_hrs(cdate: str, hours: int)¶ return the YYYYMMDDHH for CDATE +/- hours
-
modelUtil.ndays(cdate1, cdate2)¶ Calculate the number of days between two dates
-
modelUtil.readConfig(configfile)¶ converts a JSON document to a python dictionary
-
modelUtil.scrub_liveocean()¶ scrubs the disk - removes forcings/ICs and forecast data older than x days
-
modelUtil.sedoceanin(template, outfile, settings)¶ substitues the templated fields with specified settings, like sed