//
// TestROMS.java
//

/*
VisAD system for interactive analysis and visualization of numerical
data.  Copyright (C) 1996 - 2017 Bill Hibbard, Curtis Rueden, Tom
Rink, Dave Glowacki, Steve Emmerson, Tom Whittaker, Don Murray, and
Tommy Jasmin.

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Library General Public License for more details.

You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA
*/

package visad.cluster;

import visad.*;
import visad.java3d.*;
import visad.util.*;
import visad.data.netcdf.Plain;
import visad.data.mcidas.*;

import java.rmi.*;
import java.awt.event.*;
import javax.swing.*;
import java.io.IOException;

/**
cd /home1/billh/mead
java -mx128m visad.cluster.TestROMS NE_Pacific_2.nc roms_his_NEP2.nc
*/
public class TestROMS {

  private RemoteDataReferenceImpl remote_ref = null;

  public TestROMS(String[] args)
         throws VisADException, RemoteException, IOException {

    if (args == null || args.length < 2) {
      System.out.println(
        "usage: 'java visad.cluster.TestROMS grid_file history_file'");
    }

    // read grid and history files
    Plain plain = new Plain();
    Tuple grid_file = (Tuple) plain.open(args[0]);
    if (grid_file == null) {
      System.out.println("cannot open " + args[0]);
      return;
    }
    Tuple history_file = (Tuple) plain.open(args[1]);
    if (history_file == null) {
      System.out.println("cannot open " + args[1]);
      return;
    }

    // extract lat-lon arrays from grid file
    FlatField rho_ff = (FlatField) grid_file.getComponent(16);
    float[][] rho_floats = rho_ff.getFloats(false);
    float[][] rho_latlon = {rho_floats[8], rho_floats[9]};

    int n = rho_latlon[1].length;
/* not needed: adjustLongitude() does this implicitly
    for (int i=0 ;i PLAT),
3   PLONG,
4   ROTA,
5   P1,
6   P2,
7   P3,
8   P4,
9   XOFF,
10  YOFF,
11  depthmin,
12  depthmax,
13  f0,
14  dfdy,
15  ((xi_rho, eta_rho, bath) -> hraw),
16  ((xi_rho, eta_rho) -> (h, f, pm, pn, dndx, dmde, x_rho, y_rho, lat_rho, lon_rho, mask_rho, Angle)),
17  ((xi_psi, eta_psi) -> (x_psi, y_psi, lat_psi, lon_psi, mask_psi)),
18  ((xi_u, eta_u) -> (x_u, y_u, lat_u, lon_u, mask_u)),
19  ((xi_v, eta_v) -> (x_v, y_v, lat_v, lon_v, mask_v)))
. . .


java visad.jmet.DumpType roms_his_NEP2.nc
roms_his_NEP2.nc: 
0  (ntimes,
1   ndtfast,
2   dt,
3   dtfast, 
4   dstart,
5   nhis,
6   nrst,
7   ntsavg,
8   navg,
9   (tracer -> (tnu2, Akt_bak, Tnudg)),
10  visc2,
11  Akv_bak,
12  rdrg,
13  rdrg2,
14  Zob,
15  Zos,
16  Znudg,
17  M2nudg,
18  M3nudg,
19  (boundary -> (FSobc_in, FSobc_out, M2obc_in, M2obc_out, M3obc_in, M3obc_out)),
20  ((boundary, tracer) -> (Tobc_in, Tobc_out)),
21  rho0,
22  gamma2,
23  xl,
24  el,
25  theta_s,
26  theta_b,
27  Tcline,
28  hc,
29  (s_rho -> (sc_r, Cs_r, Lev)), 
30  (s_w -> (sc_w, Cs_w)),
31  (Time -> (ocean_time,
  1           ((xi_rho, eta_rho) -> zeta), 
  2           ((xi_u, eta_u) -> (ubar, sustr)),
  3           ((xi_v, eta_v) -> (vbar, svstr)),
  4           ((xi_u, eta_u, s_rho) -> u),
  5           ((xi_v, eta_v, s_rho) -> v),
  6           ((xi_rho, eta_rho, s_rho) -> (w, temp, salt, rho)),
  7           ((xi_rho, eta_rho, s_w) -> omega))))

*/


 

Ads help maintain this website.