NOC-MSM / BoBEAS

Bay of Bengal East Arabian Sea, regional model
0 stars 0 forks source link

Objective 5: Tools for generating ocean boundary conditions. #8

Closed jpolton closed 5 years ago

jpolton commented 5 years ago

Tools for generating boundary conditions from COPERNICUS data.

jpolton commented 5 years ago

We have established workflows and tooling that works using parent data where we have access to the parent grids. COPERNICUS data is proving problematic since grid spacings and associated metadata have to be inferred from the published variables.

The tool is called PyNEMO and is a managed as a separate project: https://bitbucket.org/jdha/nrct

jpolton commented 5 years ago

@ashbre can you add your instructions (script workflow) to the wiki for the not-yet-working PyNEMO implementation of the T,S boundaries. I want to try it out tomorrow.

ashbre commented 5 years ago

run:

/work/n01/n01/ashbre/INDIAN_OCEAN_AUTO/setup_python_obc.sh

to set up python environment for OBCs - this is a change from ORCA0083 with edits for the COPERNICUS data sets.

Then, you can run /work/n01/n01/ashbre/INDIAN_OCEAN_AUTO/BOUNDARY_FORCING/run_script.pbs

for the 12 months of data.

jpolton commented 5 years ago

Ran COPERNICUS branch on Livljobs4 as it looked like I was having a java issue on ARCHER. Made a file for baroclinic T,S with ln_tra = .true. : /scratch/jelt/BoBEAS/OBC/INDIAN_bdyT_y2016m12.nc that looks physical, though there are some naughty values because the parent mask was not known, or applied correctly.

jpolton commented 5 years ago

Running with ln_dyn3d=T or ln_dyn2d=T produces a familiar error "UnboundLocalError: local variable 'ft' referenced before assignment" which I had when trying to do tides only. Can investigate later.

ashbre commented 5 years ago

There is no mask provided for the parent. I was considering doing a "flood fill" to the parent. This is what I did for my Matlab IC code.

Java fix:

LD_LIBRARY_PATH=/opt/java/jdk1.8.0_51/jre/lib/amd64/server/:$LD_LIBRARY_PATH

ashbre commented 5 years ago

Using ORCA0083 pynemo, when commenting back in the vertical interpolate in *tm3.py, bdyT has not been interpolated on to my grid in depth

jpolton commented 5 years ago

@ashbre Line 173 and onwards of https://github.com/NOC-MSM/NEMO_cfgs/blob/master/recipes/docs/source/Solent_archer_livljobs_TCarta.rst describes/outlines how to build a coordinates.nc file from near-scratch

jpolton commented 5 years ago

@ashbre - Make a 1d depth variable 3d but doing something like:

cd TEMP16_dir/DEC
module load nco/gcc/4.4.2.ncwa
ncap2 -s 'depth_3d[depth,latitude,longitude]=depth' Temp_16_0359.nc   out.nc

On ARCHER the modules are probably:

 module unload cray-netcdf-hdf5parallel cray-hdf5-parallel
  module load cray-netcdf cray-hdf5

  module load nco/4.5.0

Be warned that the coastal points end up as NaNs, or equivalent, because they are NaN in the parent Temperature file - so this shouldn't be an issue.

jpolton commented 5 years ago

Generating ocean boundary conditions is a multi-faceted task. I have spit it into separate cards: tides, met, non tidal open boundaries and rivers as each will have their own documentation. We can then close this card

jpolton commented 5 years ago

Re-open this issue to do some further work

Plan for @jpolton :

Plan A (preferred/planned):

Plan B (non-preferred):