1111__author__ = 'Trond Kristiansen'
12121313__created__ = datetime (2009 , 1 , 30 )
14- __modified__ = datetime (2021 , 3 , 23 )
14+ __modified__ = datetime (2021 , 7 , 27 )
1515__version__ = "1.6"
1616__status__ = "Development"
1717
18+ # Changelog:
19+ # 27.07.2021 - Added option for running Hardangerfjord 160 m model
1820
1921class Model2romsConfig (object ):
2022
@@ -93,11 +95,8 @@ def define_input_data_varnames(self):
9395 # Define the path to where the ROMS grid can be found
9496 def define_roms_grid_path (self ):
9597 try :
96- return {'Antarctic' : '../oceanography/model2roms_grids/ANT_01.nc' ,
97- 'Josè' : '../oceanography/model2roms_grids/roms12_9km.nc' ,
98- 'A20' : '/Users/trondkr/Dropbox/NIVA/A20/Grid/roms12_9km.nc' ,
99- # '/cluster/projects/nn9412k/A20/Grid/A20niva_grd_v1.nc',
100- # 'ROHO800': '/cluster/projects/nn9490k/ROHO800/Grid/ROHO800_grid_fix3.nc'}[self.outgrid_name]
98+ return {'A20' : '/Users/trondkr/Dropbox/NIVA/A20/Grid/roms12_9km.nc' ,
99+ 'ROHO160' : '../oceanography/NAUTILOS/Grid/norfjords_160m_grid.nc_A04.nc' ,
101100 'ROHO800' : '/Users/trondkr/Dropbox/NIVA/ROHO800/Grid/ROHO800_grid_fix3.nc' }[self .outgrid_name ]
102101 except KeyError :
103102 return KeyError
@@ -106,8 +105,7 @@ def define_roms_grid_path(self):
106105 def define_abbreviation (self ):
107106 return {"A20" : "a20" ,
108107 "Antarctic" : "Antarctic" ,
109- "Josè" : "Josè" ,
110- "ROHO800" : "roho800" }[self .outgrid_name ]
108+ "ROHO160" : "roho160" }[self .outgrid_name ]
111109
112110 def define_ocean_forcing_data_path (self ):
113111 try :
@@ -117,14 +115,10 @@ def define_ocean_forcing_data_path(self):
117115 'GLORYS' : "../oceanography/copernicus-marine-data/Global/" }[self .ocean_indata_type ]
118116 except KeyError :
119117 return KeyError
120-
118+
121119 def define_atmospheric_forcing_path (self ):
122120 return {'ERA5' : "/Volumes/DATASETS/ERA5/" }[self .atmos_indata_type ]
123-
124- def define_atmos_inputdata_varnames (self ):
125-
126- return {'ERA5' : ['swrad' , 'lwrad' , 'precip' , 'u10' , 'v10' ]}[self .atmos_indata_type ]
127-
121+
128122 def __init__ (self ):
129123 logging .info ('\n --------------------------\n ' )
130124 print ('Started ' + time .ctime (time .time ()))
@@ -155,12 +149,12 @@ def __init__(self):
155149 # Create the bry, init, and clim files for a given grid and input data
156150 self .create_ocean_forcing = True
157151 # Create atmospheric forcing for the given grid
158- self .create_atmos_forcing = False # currently in beta stages
152+ self .create_atmos_forcing = False # currently in beta stages
159153 # Create a smaller resolution grid based on your original. Decimates every second for
160154 # each time run
161155 self .decimate_gridfile = False
162156 # Write ice values to file (for Arctic regions)
163- self .write_ice = True
157+ self .write_ice = False
164158 # Write biogeochemistry values to file
165159 self .write_bcg = False
166160 # ROMS sometimes requires input of ice and ssh, but if you dont have these write files containing zeros to file
@@ -177,7 +171,7 @@ def __init__(self):
177171 self .time_frequency_inputdata = "month" # Possible options: "month", "hour", "5days"
178172
179173 # Path to where results files should be stored
180- self .outdir = "../oceanography/model2roms_results /"
174+ self .outdir = "../oceanography/NAUTILOS /"
181175 if not os .path .exists (self .outdir ):
182176 os .makedirs (self .outdir , exist_ok = True )
183177
@@ -228,7 +222,7 @@ def __init__(self):
228222 # OUT GRIDTYPES ------------------------------------------------------------------------------
229223 # Define what grid type you want to interpolate to
230224 # Options: This is just the name of your grid used to identify your selection later
231- self .outgrid_name = 'Josè ' # "ROHO800", "A20"
225+ self .outgrid_name = 'ROHO160 ' # "ROHO800", "A20"
232226 self .outgrid_type = "ROMS"
233227
234228 # Subset input data. If you have global data you may want to seubset these to speed up reading. Make
@@ -261,10 +255,10 @@ def __init__(self):
261255
262256 # DATE AND TIME DETAILS ---------------------------------------------------------
263257 # Define the period to create forcing for
264- self .start_year = 1993
265- self .end_year = 1993
258+ self .start_year = 2017
259+ self .end_year = 2020
266260 self .start_month = 1
267- self .end_month = 5
261+ self .end_month = 12
268262 self .start_day = 15
269263 self .end_day = 31
270264
0 commit comments