Ocean loading coefficients interpolated from global maps



Files { csr4 | GOT00 | FES99 }-maps.tar.Z  contain the ocean loading effects on global grids. For machine independence you receive these files in ASCII.

In the following ${comp} stands for  the components { radi ptan } and ${tide} for the tides { M2 S2 N2 K2 K1 O1 P1 Q1 MF MM SS }
 

The  { csr4 | GOT00 }-${comp}${tide}.daf  files are written from the south to the north with 720 complex numbers per latitude ring, 360 (361) latitude rings (0.5o x 0.5o ). (csr4, 360: There is no data for the north pole in csr4). There is one header line. On each line following there are 5 complex elements (REAL, IMAG, REAL, IMAG,...). The position of the first element in line two of the file is  ( lat. 90.0o S, long. 0.5o E ). The position of the first element in line three of the file is (lat 90.0o S, long. 3.0o E ) etc.
 
The  FES99-${comp}${tide}.daf  files are written from the south to the north with 1440 complex numbers per latitude ring, 721  latitude rings (0.25o x 0.25o ). There is one header line. On each line following there are 5 complex elements (REAL, IMAG, REAL, IMAG,...). The position of the first element in line 2 of the file is  ( lat. 90.0o S, long. 0.25o E ). The position of the first element in line three of the file is (lat 90.0o S, long. 1.5o E ) etc.

The files  schw-${comp}${tide}.daf  and  eqlt-${comp}${tide}.daf  use a grid 360 x 180 (1o  x 1o ) with the first element in line 2 of the file at ( lat. 89.5o S, long 0.5o ).
 
The GOT00 and FES99 files comprise 11 tides, i.e. also the long-period tides at the same resolution.
 


To compute the row number (L) and column number (K) in the ASCII files for a point with longitude  x  and latitude y

(1) on the 1440 x 721 grid

L = 207649 - int( ( 2880 * ( 90.25 - y ) - 4x )/5 +eps)                                                         |
 
K = ( int( 4x + 4 ) mod 5 ) + 1

 

(2) on the 720 x 360 or 720 x 361 grid:

L = 51985 - int( ( 1440 * ( 90.5 - y ) - 2x )/5 +eps)

K = ( int( 2x + 4 ) mod 5 ) + 1



 (3) on the 360 x 180 grid:

L = 13033 - int( ( 360 * ( 91.5 - y) - x - 0.5 )/5 +eps)

K = ( int( x - 0.5 ) mod 5 ) + 1


 eps  is a small rounding constant,   0 < eps < 0.1
 To address the ten floating-point items on a line individually

 Real part: 2K-1
 Imag part: 2K

This addressing respects that the header is in line one. int( ) is the function that returns the integer part of a floating-point argument. The fact that
int(-0.5) = int(+0.5) = 0   (in FORTRAN)
causes the somewhat unintuitive arithmetics above.


 
The interpolation program  olmg&nbsad
cd /yyy/Oload
tar xfv /.../progs.tar

You may have to:
Edit the script  p/m/fcmd   to adjust the path ($HOME/bin), referenced system libs, main compile command, and options.
Edit the script  bin/gfmb to adjust system compile command for main programs.
Edit the script  bin/gfs  to adjust subroutine compile command and options.

Add to your path:
setenv PATH $PATH:/yyy/Oload/bin; set path=( $path
/yyy/Oload/bin )

Subroutines:

cd p
foreach file ( *.f )

gfs $file load
end

Mains:

cd m
fcmd mzfu
fcmd olmg

Making the binary data file copies
cd /yyy/Oload/Otide

foreach model ( csr4 GOT00 FES99 )
ln -s /xxx/$model-maps.tar.Z .
uncompress $model-maps.tar.Z

foreach comp ( radi ptan )
foreach tide ( M2 S2 N2 K2 K1 O1 P1 Q1 MF MM SS )
tar xfv $model-maps.tar $model-$comp$tide.daf
mzuf.out -f2u csr4-radiM2.daf
rm -f
csr4-radiM2.daf
end
end
end


Running the interpolation program:
There are two test cases in GOT00/olmg.ins
There are two test cases in FES99/olmg.ins

Here's how you execute olmg for GOT00:

cd /yyy/Oload
olmg.out GOT00/
$
 

olmg.out GOT00/ '>1S>'
$

The $ satisfies the instruction file prompter. It tells the system to use the instruction file location information from the command line.

That's an instruction file section with my comments:

BLQ>
 &forms
 fmtin='(t6,a9,a5,t27,3f15.4)'
 zqopt='+C-T'
 nmsg=-1
 comp='radi','ptan'
 ocomp='RADI','TANG'
 &end
11 O BIGGER-out.xyz
11 * O addsites_csr_m.lola
40 O GOT00/header.blq
31 B GOT00/olmg_t.blq
123C5678901234567890123456789012345678901234567890
   Q
OUT BLQ
DO TIDE MF P=Otide M=GOT00- C=GOT0 G=LEPR STORE 9
DO TIDE MM STORE 10
DO TIDE SS STORE 11
DO TIDE M2 STORE 1
DO TIDE S2 STORE 2
DO TIDE N2 STORE 3
DO TIDE K2 STORE 4
DO TIDE K1 STORE 5
DO TIDE O1 STORE 6
DO TIDE P1 STORE 7
DO TIDE Q1 STORE 8
STOP

1S>
 &forms
 fmtin='(t6,a9,a5,t27,3f15.4)'
 zqopt='+C+T'
 nmsg=-1
 comp='radi','ptan'
 ocomp='RADI','TANG'
 &end
40 O GOT00/header.blq
31 B GOT00/olmg_t1s.blq
   Q
1 sites for test
-/ XYZ FMT (5x,a,t21,a6,t30,3f15.3) /
-/ LN=MANILLE         22006S001 DORIS]
0087 MANILLE          MANA      -3184357.592    5291042.183    1590419.452
OUT BLQ
DO TIDE MF P=Otide M=GOT00- C=GOT0 G=LEPR STORE 9
DO TIDE MM STORE 10
DO TIDE SS STORE 11
DO TIDE M2 STORE 1
DO TIDE S2 STORE 2
DO TIDE N2 STORE 3
DO TIDE K2 STORE 4
DO TIDE K1 STORE 5
DO TIDE O1 STORE 6
DO TIDE P1 STORE 7
DO TIDE Q1 STORE 8
STOP
location flag
&namelist
   site record input format
    zquint options
    geogr messsages
    input file components -> names
    output blq component labels
&end
input file unit 11: sites, O = old ascii file
* means commented out
B means output file ascii
c means printable comment
q means end of openf block
instructions to the main program

P= to specify file path,
M= model code,
G= grid code,
C= comment on the output,
STORE= column in blq file


The site records are either read in from unit 11 or, if the unit is not referenced in the instruction block in the olmg.ins file, read between the file block and the command block ("1 sites for test"). If you need "manual pages", see my pages on the get_sites subroutine. There are also manual pages on the openf  and open_ins subroutines.

The output of the first test job is in csr/olmg_t.blq
 

.bye