Had CM 3 wind stress modifications
How to modify the wind stress that is passed from the atmosphere to the ocean in Had CM 3 based on user ancillary files.
h.spencer@rdg.ac.uk
Example:
Add a correction onto the wind stress only in a particular region.
The regions is also specified in a user ancillary file.
The example includes a gradual blend out of the correction.
This works by altering the coupling routines so that the windstress fields passed to the ocean are modified after they have been interpolated from the atmosphere.
Uses files:
http://www.met.rdg.ac.uk/~swr99hs/UM/phs1f405.sm
http://www.met.rdg.ac.uk/~swr99hs/IT/UM/phs1f405
Step 1:
Create the ancillary files for two components of the wind stress and the blending factor. (Or just the wind stress corrections if you are not using a blend factor) These should be given the following PP codes and UM stash codes. These are special USER field codes and stash codes. This is described in the UMUI help for the user ancillary file.
| PP code | stash code |
TAUX CORRECTION | 721 | 331 |
TAUY CORRECTION | 722 | 332 |
blend factor | 723 | 333 |
These should all be on the ocean temperature grid (with or without wrap around). For the standard Had OM? ocean resolution this is:
290 longitudes, 0, 1.25, 2.5, … every 1.25, …, 358.75, 360, 361.25 � (with wrap around)
144 latitudes, −89.375, −88.125,… every 1.25, …, −0.625, 0.625,…, 89.375
The blend factor should be zero outside the region to be corrected and 1 inside with a value between zero and one in the blending region.
The wind stress correctors are in N/m^2. If different units are used then they can be converted into N/m2 in the user mod.
You can convert netcdf files to pp format in idl locally. The conversion would be done something like this:
handle=ncassoc(ncfile)
fields=ppa(handle,/all)
fields.lbfc=[721,722,723]
fields.lbuser(3)=[331,332,333]
ppw,fields,ppfile
then convert the ppfiles to ancillaries on the machine to run on using pptoanc.
However I have used a more complicated conversion procedure which starts from three separate netcdf files containing these three variables on the correct grid. These can be converted; to ancillary files using the following programmes which are on wren.cfs.ac.uk:
/ohome/lrhs/um/vn4.5/ancil/windStress/mkTauBlend_origin
which uses
/ohome/lrhs/um/vn4.5/ancil/windStress/mkTauBlend.F90
Step 2:
Create a file which defines the ancillary fields for the umui.
Copy this file to your ~/umui_jobs directory:
http://www.met.rdg.ac.uk/~swr99hs/IT/UM/phs1f405.sm
This gives the PP codes, names, and units of the new ancillary fields.
Take care if you modify this file to get all the | s in the right place.
Step 3:
Tell the umui about your new ancillary fields.
The user stashmaster defines whatever fields the code needs to use, and there happen to be three different kinds in this this example.
\\
Set up you job with the umui and
In:
Ocean GCM → Input Files → Climatologies and potential climatologies
→ User single-level ancillary file and fields
Specify the location (on the machine you will be running on) of the new ancillary file that contains the new ancillary fields.
Eg:
$HOME/um/$RUNID
tauxy.ancil.clim
And set the fields to be “Updated” every 5 days
In:
Ocean GCM → STASH → User-STAS Fmaster? files. Diags, Progs & Ancills
specify the location of the phs1f405.sm (in your local ~/umui_jobs directory)
In:
Ocean GCM → STASH → Initialisation of User Prognostics
Your new fields should now appear together with their units.
Set the “Option” column to 3 for each field. (Set to Zero)
Step 4:
Write a fortran mod:
You can start with the following:
http://www.met.rdg.ac.uk/~swr99hs/IT/UM/phs1f405
This works by altering the coupling routines so that the windstress fields passed to the ocean are modified after they have been interpolated from the atmosphere.
This mod adds a constant corrector to TAUX and TAUY in the region where BLEND > 0 using the formula:
taux_seen_by_ocean = taux_from_atmosphere + x_correction*blend_factor
tauy_seen_by_ocean = tauy_from_atmosphere + y_correction*blend_factor
It would be possible just to impose x_correction*blend_factor
and y_correction*blend_factor
and not specify the blend factor separately for this case but the blend factor is included for flexibility, if you want a more complicated modification of the wind stress.
Step 5:
Put the mod on the machine you will be running on and tell the umui to compile this mod:
In the umui:
Sub-Model Independent → Compilation and Modifications
→ Modifications for the model
add the mod that modifies the wind stress. This mod should somewhere in your home directory on the machine you will be running on. For example:
$HOME/um/coupled/mods/phs1f405
Step 6:
Run the UM!
PLEASE PLEASE PLEASE let me know if this doesn’t work so that I can correct this documentation:
h.spencer@rdg.ac.uk