- Edit environment variables in makefile accordingly
- Compile and get
zeta.x
- Generate an input file
input.nml
from the samplesample_input.nml
- Run
zeta.x
The testing example is using a small region in the Arabian Sea from Jan 1, 2009 in a 0.1deg POP/CICE simulation. The testing is perform on OLCF Rhea.
Input: ./example/momentum_2009-01-01_as.nc
Output: ./example/vorticity_2009-01-01_as.nc
In addition, it uses grid files stored at /ccs/home/hewang/pop0_1/ on Rhea
To test:
- copy ./example/input.nml to ./
- run ./zeta.x > log.out
- compare sampled outputs in log.out with ./example/log.out
-
Global grid and constants files
- "ocn_static_grid.nc": 2-D fields
ULAT
,ULONG
,UAREA
,TLAT
,TLONG
,TAREA
,DXU
,DYU
,z_t
,z_w
,HTN
,HTE
,HUS
,HUW
- "ocn_static_dz": 3-D fields
DZT
,DZU
,TMASK
,UMASK
- "ocn_constant.nc": constants
omega
andgrav
- "ocn_static_grid.nc": 2-D fields
-
Input files with momentum terms
Depending on the calculation mode, variables needed includeUVEL
,VVEL
,WVEL
SSH
,ADVU
,ADVV
,GRADX
,GRADY
,HDIFFU
,HDIFFV
,VDIFFU
,VDIFFV
,UEU
,UEV
,VNU
,VNV
,WTU
,WTV
-
Input files are supposed to be netCDF files with time record length = 1. The fields can be of daily, monthly or annually frequency.
-
It is recommended to use at least daily averaged fields for nonlinear decomposition. Technically, the decomposition can be done for any frequency, but large errors are expected with monthly and annual fields.
-
sec
controls the period of mean/eddy decomposition and overall output frequency. It can be set by a list of options (see comments in sample_input.nml for details), for an arbitrary average length (annually, monthly, fixed number of days etc) within a year. -
Mean/Eddy decomposition section frequency
meanfreq
can only be "a" for annual fields and "a" or "m" for monthly fields
If the daily, monthly and annual inpupt files are also averged across multiple years, the input files are considered to be "climatology".
yrnm_clm
is required. It is a wildcard option to replace the numerics for "year" in the filename. it can be set to be anything, though it is suggested to follow the form of "YYYY-YYYY".- When mean/eddy decomposition is turned on (
ifmeaneddy
= T),ifmeanclm
is automatically set to T. - When nonlinear decomposition is turned on (
ifdecomp
= T), it is calculated only for the mean fields. In this case,ifmeaneddy
is equivalent of being turned on.- In other words, when
ifdecomp
= F andifmeaneddy
= T, the outputs are curladv (mean), curlmet (mean), errsub (eddy); whenifdecomp
= T,ifmeaneddy
is ignored and the outputs are adv(u,v,w) (mean), twi(u,v,w) (mean), curlmet (mean), errsub (eddy)
- In other words, when
- Curl of momentum terms (output at the same frequency as input)
ifcurl
= T;ifdecomp
= F;
ifmeaneddy
= F- func = c, func_m = NULL, func_me = NULL
- Curl + nonlinear decomposition (output at the same frequency as input)
ifcurl
= T;ifdecomp
= T; [flxtwi
= T for flux twisting, and F for nonflux]
ifmeaneddy
= F- func = cdme, func_m = NULL, func_me = NULL
- Curl + mean/eddy decomposition (output at section frequency)
ifcurl
= T;ifdecomp
= F;
ifmeaneddy
= F;ifdecomposed
= F; [ifmeanclm
= T for clim mean and F for ann mean]- func = c, func_m = am, func_me = func
- Curl + nonlinear decomposition + mean/eddy decomposition (output at section frequency)
ifcurl
= T;ifdecomp
= T; [flxtwi
= T for flux twisting, and F for nonflux]
ifmeaneddy
= T;ifdecomposed
= T; [ifmeanclm
= T for clim mean and F for ann mean]- func = cdme, func_m = dm, func_me = func
dalist_in
should be set to any single negative value, which sets doylist to the negative month number- Nonlinear decomposition not recommened
meanfreq
= 'm' or 'a'
dalist_in
andmnlist_in
should be set to any single negative value, which sets doylist to 0- Nonlinear decomposition not recommened
meanfreq
= 'a'
-
For mean/eddy decomposiion, the mean nonlinear fields are calculated first and saved, which means the files can be reused for re-calculations.
-
For fully-decomposed nonlinear term, output frequency is also the same as the input. Mean/eddy decomposion then reads and averages these files.
-
Resume calculation when using daily-averaged input with fully-decomposed nonlinear term:
- Streamlines:
- Generate files containing mean nonlinear field
- Files containing curl of each term and decomposed nonlinear term of each day
- Load and average files from 2 and output mean (from 1) and eddy (difference averged 2 and 1)
- If the calculation is interrupted during 2:
- Turn off
ifmeaneddy
and reset lists of days, month and years and resume - Turn off
ifcurl
andifdecomp
and turn onifmeaneddy
- Turn off
- Streamlines:
See the appendix of 10.1175/JPO-D-20-0223.1