4 from util
import makenwrap
109 """!Class that generates the namelist for POM."""
111 """!nml constructor. Generates the namelist."""
112 self.
namelist = {
'title' :
"'MPIPOM-TC: stormenv'" ,
113 'netcdf_file' :
"'stormenv'" ,
121 'time_start' :
"'yyyy-mm-dd-hh:00:00 +00:00'" ,
123 'read_rst_file' :
"'restart.phaseN.nc'" ,
125 'write_rst_file':
"'restart'" ,
140 self.
keys = [
'title',
'netcdf_file',
'mode',
'nadv',
'nitera',
'sw',
'npg', \
141 'dte',
'isplit',
'time_start',
'nread_rst',
'read_rst_file', \
142 'write_rst',
'write_rst_file',
'days',
'prtd1',
'prtd2',
'swtch',\
143 'nbct',
'ifplane',
'cnorth_e',
'ismoth',
'smh',
'tnowindd', \
144 'igeovel',
'nl',
'ionedim',
'ipwave']
152 def __call__(self,title,netcdf_file,time_start,nread_rst,read_rst_file, \
153 write_rst,days,prtd1,nbct,tnowindd,igeovel,nl):
154 """!Updates the namelist values
156 @param title Runs' title.
157 @param netcdf_file POM NetCDF output file (run ID)
158 @param time_start Model analysis time in format "YYYY-MM-DD HH:MM:SS <+/->HH:MM"
159 where the "<+/->HH:MM" is the timezone.
160 @param nread_rst index index to indicate whether run to start from restart file
161 (nread_rst=0: no restart input file; nread_rst=1: restart
163 @param read_rst_file restart input filename
164 @param write_rst Restart interval.
165 @param days Run duration (days)
166 @param prtd1 Initial print interval (days)
167 @param nbct Surface temperature boundary condition (see initialize.f)
168 @param tnowindd No prescribed wind after tnowindd (days)
169 @param igeovel Initial geostrophic velocity option. 0=no, 1=yes
170 @param nl Number of Z levels in initial condition files."""
172 self.
namelist[
'netcdf_file'] =
'"'+netcdf_file+
'"'
173 self.
namelist[
'time_start'] = time_start
174 self.
namelist[
'nread_rst'] = nread_rst
175 self.
namelist[
'read_rst_file'] = read_rst_file
176 self.
namelist[
'write_rst'] = write_rst
180 self.
namelist[
'tnowindd'] = tnowindd
186 """!Writes the POM namelist pom.nml in the destination directory.
187 @param DEST destination directory"""
Class that generates the namelist for POM.
namelist
a dict mapping from namelist variable name to value.
def __call__(self, title, netcdf_file, time_start, nread_rst, read_rst_file, write_rst, days, prtd1, nbct, tnowindd, igeovel, nl)
Updates the namelist values.
keys
A list of namelist variables.
def __init__(self)
nml constructor.
def make(self, DEST)
Writes the POM namelist pom.nml in the destination directory.