romsUtil module

Various routines, not just for ROMS models anymore. TODO: Rename this module.

romsUtil.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

romsUtil.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.

romsUtil.get_ICs_roms(ofs, cdate, cycle, localpath)
romsUtil.get_baseline_lo(cdate, vdir, sshuser)

Retrieve operational LiveOcean forecast data from UW

romsUtil.lo_date(cdate)

return the LiveOcean format of date e.g. f2019.11.06

romsUtil.makeOceanin(NPROCS, settings, template, outfile, ratio=1.0)

creates the ocean.in file for ROMS forecasts using templated variables

romsUtil.ndate(cdate, days)

return the YYYYMMDD for CDATE +/- days

romsUtil.ndate_hrs(cdate: str, hours: int)

return the YYYYMMDDHH for CDATE +/- hours

romsUtil.ndays(cdate1, cdate2)

Calculate the number of days between two dates

romsUtil.readConfig(configfile)

converts a JSON document to a python dictionary

romsUtil.scrub_liveocean()

scrubs the disk - removes forcings/ICs and forecast data older than x days

romsUtil.sedoceanin(template, outfile, settings)

substitues the templated fields with specified settings, like sed