Due to a shift in policy, from 0900 GMT on Wednesday 14th July 2021, we will be disabling ssh access to the server for external users. External users who wish to continue to access code repositories on the server will need to switch to using https. This can be accomplished in the following way: 1) On the repo on gitlab, use the clone dialogue and select ‘Clone with HTTPS’ to get the address of the repo; 2) From within the checkout of your repo run: $ git remote set-url origin HTTPS_ADDRESS. Here, replace HTTPS_ADDRESS with the address you have just copied from GitLab. Pulls and pushes will now require you to enter a username and password rather than using a ssh key. If you would prefer not to enter a password each time, you might consider caching your login credentials.

Commit 05d2e399 authored by Pierre Cazenave's avatar Pierre Cazenave

Create a new function whose job is to take an existing FVCOM model restart...

Create a new function whose job is to take an existing FVCOM model restart file and change the temperature and salinity values for values extracted from an appropriate POLCOMS model result file.

The POLCOMS data is read in as a 4D array (y, x, z, t) and is interpolated onto the FVCOM sigma layers. This provides the correct number of vertical levels which are then interpolated onto the FVCOM horizontal unstructured grid. This order is chosen because interpolating onto the horizontal grid first would dramatically increase the number of interpolations of the vertical which would be necessary. Initial development of the function revealed that the interpolation returns NaNs outside the POLCOMS domain: since it is likely the FVCOM domain is both higher resolution and more faithful to the coastline, a simple extrapolation is performed to remove all the NaNs (based on the nearest existing finite value to a given NaN location).

Once the data have been interpolated (and extrapolated), an existing NetCDF restart file is opened and its contents replicated into a new NetCDF file (appended with _polcoms.nc). Only the "temp" and "salinity" variables are changed with the interpolated 3D arrays (we lose a dimension because the FVCOM grid is unstructured).
parent b35b2959
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment