diff --git a/inputs/namelist_remote.bdy b/inputs/namelist_remote.bdy index 81bb8c493c4090ac7806b8a84effc39c92ea8292..45bc2dc3d555ac90423f4e8e16794549be60aa84 100644 --- a/inputs/namelist_remote.bdy +++ b/inputs/namelist_remote.bdy @@ -58,7 +58,7 @@ ! (if ln_mask_file=.TRUE.) ln_dyn2d = .false. ! boundary conditions for ! barotropic fields - ln_dyn3d = .false. ! boundary conditions for + ln_dyn3d = .true. ! boundary conditions for ! baroclinic velocities ln_tra = .true. ! boundary conditions for T and S ln_ice = .false. ! ice boundary condition @@ -68,7 +68,7 @@ ! unstructured open boundaries tidal parameters !------------------------------------------------------------------------------ ln_tide = .true. ! =T : produce bdy tidal conditions - sn_tide_model = 'tpxo' ! Name of tidal model (fes|tpxo) + sn_tide_model = 'fes' ! Name of tidal model (fes|tpxo) clname(1) = 'M2' ! constituent name clname(2) = 'S2' clname(3) = 'O1' diff --git a/pynemo/nemo_bdy_ncgen.py b/pynemo/nemo_bdy_ncgen.py index c0ccccc2e3de2bacf0c75c05fe8afe2b61ebf738..190fb344973b9ffab73ebe26dda2a42b3b3d21ee 100644 --- a/pynemo/nemo_bdy_ncgen.py +++ b/pynemo/nemo_bdy_ncgen.py @@ -14,7 +14,8 @@ def CreateBDYNetcdfFile(filename, N, I, J, K, rw, h, orig, fv, calendar, grd, va """ This method creates a template of bdy netcdf files. A common for T, I, U, V, E grid types. """ - if var_nam == 'tide_data' or var_nam[0] == 'votemper' or var_nam[0] == 'vosaline': + var_nams = ['tide_data','votemper','vosaline','vozocrtx','vomecrty','vobtcrty','vomecrty'] + if var_nam[0] in var_nams: logging.info('benchmark variables identified, using original variable names.......') gridNames = ['T', 'I', 'U', 'V', 'E', 'Z'] # All possible grids @@ -239,8 +240,8 @@ def CreateBDYNetcdfFile(filename, N, I, J, K, rw, h, orig, fv, calendar, grd, va logging.error('Unknown Grid') ncid.close() - - if var_nam[0] == 'thetao' or var_nam[0] == 'so' or var_nam[0] == 'uo' or var_nam[0] == 'vo': + var_nams = ['thetao','so','zos','uo','vo'] + if var_nam[0] in var_nams: logging.info('CMEMS variables identified, using default CMEMS variables.....') gridNames = ['T', 'I', 'U', 'V', 'E', 'Z'] # All possible grids diff --git a/pynemo/nemo_bdy_ncpop.py b/pynemo/nemo_bdy_ncpop.py index 7e67dc2f491e361bbf32cbe75b42e2becf544ea8..298945f504ffc482bb7d9dc21f751fd0138b7513 100644 --- a/pynemo/nemo_bdy_ncpop.py +++ b/pynemo/nemo_bdy_ncpop.py @@ -18,7 +18,7 @@ def write_data_to_file(filename, variable_name, data): ncid = Dataset(filename, 'a', clobber=False, format='NETCDF4') count = data.shape - three_dim_variables = ['votemper', 'vosaline', 'N1p', 'N3n', 'N5s','thetao','so','uo','vo'] + three_dim_variables = ['votemper', 'vosaline', 'N1p', 'N3n', 'N5s','thetao','so','uo','vo','vobtcrtx','vozocrtx','vobtcrty','vomecrty'] two_dim_variables = ['sossheig', 'vobtcrtx', 'vobtcrty', 'iicethic', 'ileadfra', 'isnowthi','zos'] if variable_name in three_dim_variables: diff --git a/pynemo/nemo_bdy_zgrv2.py b/pynemo/nemo_bdy_zgrv2.py index 4503e0d9af7fb59a6ecabaa1696baaa2aecc973d..ff96ae3aef0bc31b46f3b25a10e5ef842abad2ee 100644 --- a/pynemo/nemo_bdy_zgrv2.py +++ b/pynemo/nemo_bdy_zgrv2.py @@ -52,7 +52,7 @@ class Depth: # Check inputs # FIX ME? Errors for wrong obj arg len. probably better to work around - print(settings) + self.logger.info(settings) if settings['sco']: # hc = ... FIX ME?? # Depth of water column at t-point diff --git a/pynemo/profile.py b/pynemo/profile.py index 83061b0612275f56d33d2ea678435c40a74c7869..d9c3846ea7df1fd5eeb8f5213a9658ef59bbd48f 100644 --- a/pynemo/profile.py +++ b/pynemo/profile.py @@ -531,8 +531,8 @@ def process_bdy(setup_filepath=0, mask_gui=False): var_in['t'].extend(['votemper', 'vosaline']) if ln_dyn2d or ln_dyn3d: - var_in['u'].extend(['vozocrtx', 'vomecrty']) - var_in['v'].extend(['vozocrtx', 'vomecrty']) + var_in['u'].extend(['vozocrtx']) + var_in['v'].extend(['vomecrty']) if ln_dyn2d: var_in['t'].extend(['sossheig']) @@ -546,8 +546,8 @@ def process_bdy(setup_filepath=0, mask_gui=False): var_in['t'].extend(['votemper', 'vosaline']) if ln_dyn2d or ln_dyn3d: - var_in['u'].extend(['vozocrtx', 'vomecrty']) - var_in['v'].extend(['vozocrtx', 'vomecrty']) + var_in['u'].extend(['vozocrtx']) + var_in['v'].extend(['vomecrty']) if ln_dyn2d: var_in['t'].extend(['sossheig']) diff --git a/pynemo/reader/factory.py b/pynemo/reader/factory.py index 33ab3465ccd138299c677898121f85aea2511105..76bd4a55cb882813ab38bedabb4f5619179c24d0 100644 --- a/pynemo/reader/factory.py +++ b/pynemo/reader/factory.py @@ -10,12 +10,13 @@ import os from pynemo.reader.ncml import Reader as NcMLReader from pynemo.reader.ncml import NcMLFile from pynemo.reader.directory import Reader as DirectoryReader +import logging from netCDF4 import Dataset - +logger = logging.getLogger(__name__) def GetReader(uri, t_adjust, reader_type=None): if reader_type is None: - print(uri) + logger.info(uri) if uri.endswith(".ncml"): reader_type = "NcML" elif os.path.isdir(uri): diff --git a/screenshots/example_bdy_coords.png b/screenshots/example_bdy_coords.png deleted file mode 100644 index cd83e138a1bc0d264fabd8c3c0e25c2686696aa2..0000000000000000000000000000000000000000 Binary files a/screenshots/example_bdy_coords.png and /dev/null differ