FV3 Bundle
make_check_data Namespace Reference

Functions

def float2string (val, sformat, addcomma)
 
def write_variable (var_name, dims, v)
 
def write_structure (var_name, dims, v)
 

Variables

string nan = "9e90_r8"
 
 pzeros = re.compile("0{7,}[1-9]*")
 
 pnines = re.compile("9{7,}[0-8]*")
 
dictionary work_dims
 
list work_vars
 
list vars
 
 rootgrp = Dataset('gsw_data_v3_0.nc', 'r')
 
 v = rootgrp.variables
 
 d = rootgrp.dimensions
 
 version_date = rootgrp.version_date
 
 version_number = rootgrp.version_number
 
 fd = os.open("gsw_mod_check_data.f90", os.O_CREAT|os.O_EXCL|os.O_RDWR, 0644)
 
 out = os.fdopen(fd, "w")
 
string dim_format = "integer, parameter :: %s = %d\n"
 
 var_name = var_label
 
list dims = [len(d[dname]) for dname in v[var_name].dimensions]
 

Function Documentation

◆ float2string()

def make_check_data.float2string (   val,
  sformat,
  addcomma 
)

Definition at line 19 of file make_check_data.py.

Here is the caller graph for this function:

◆ write_structure()

def make_check_data.write_structure (   var_name,
  dims,
  v 
)

Definition at line 110 of file make_check_data.py.

Here is the call graph for this function:

◆ write_variable()

def make_check_data.write_variable (   var_name,
  dims,
  v 
)

Definition at line 51 of file make_check_data.py.

Here is the call graph for this function:

Variable Documentation

◆ d

make_check_data.d = rootgrp.dimensions

Definition at line 448 of file make_check_data.py.

◆ dim_format

string make_check_data.dim_format = "integer, parameter :: %s = %d\n"

Definition at line 474 of file make_check_data.py.

◆ dims

list make_check_data.dims = [len(d[dname]) for dname in v[var_name].dimensions]

Definition at line 510 of file make_check_data.py.

◆ fd

make_check_data.fd = os.open("gsw_mod_check_data.f90", os.O_CREAT|os.O_EXCL|os.O_RDWR, 0644)

Definition at line 453 of file make_check_data.py.

◆ nan

string make_check_data.nan = "9e90_r8"

Definition at line 14 of file make_check_data.py.

◆ out

make_check_data.out = os.fdopen(fd, "w")

Definition at line 458 of file make_check_data.py.

◆ pnines

make_check_data.pnines = re.compile("9{7,}[0-8]*")

Definition at line 17 of file make_check_data.py.

◆ pzeros

make_check_data.pzeros = re.compile("0{7,}[1-9]*")

Definition at line 16 of file make_check_data.py.

◆ rootgrp

make_check_data.rootgrp = Dataset('gsw_data_v3_0.nc', 'r')

Definition at line 446 of file make_check_data.py.

◆ v

make_check_data.v = rootgrp.variables

Definition at line 447 of file make_check_data.py.

◆ var_name

make_check_data.var_name = var_label

Definition at line 509 of file make_check_data.py.

◆ vars

list make_check_data.vars

Definition at line 221 of file make_check_data.py.

◆ version_date

make_check_data.version_date = rootgrp.version_date

Definition at line 450 of file make_check_data.py.

◆ version_number

make_check_data.version_number = rootgrp.version_number

Definition at line 451 of file make_check_data.py.

◆ work_dims

dictionary make_check_data.work_dims
Initial value:
1 = {
2  "test_cast_length": ["test_cast_number",
3  "cast_m", "cast_n", "gsw_result"],
4  "Arctic_test_cast_length": ["Arctic_test_cast_number",
5  "cast_ice_m", "cast_ice_n", "gsw_result_ice"],
6  "test_cast_midpressure_length": ["test_cast_midpressure_number",
7  "cast_mpres_m", "cast_mpres_n", "gsw_result_mpres"],
8  "": ["", "", "cast_n", "gsw_result_cast"]
9 }

Definition at line 185 of file make_check_data.py.

◆ work_vars

list make_check_data.work_vars
Initial value:
1 = [
2  ["ct", "CT_chck_cast"],
3  ["rt", "Rt_chck_cast"],
4  ["sa", "SA_chck_cast"],
5  ["sk", "SK_chck_cast"],
6  ["sp", "SP_chck_cast"],
7  ["t", "t_chck_cast"],
8  ["p", "p_chck_cast"],
9  ["delta_p", "delta_p_chck_cast"],
10  ["p_shallow", "p_chck_cast_shallow"],
11  ["p_deep", "p_chck_cast_deep"],
12  ["lat_cast", "lat_chck_cast"],
13  ["long_cast", "long_chck_cast"],
14  ["ct_arctic", "CT_Arctic"],
15  ["sa_arctic", "SA_Arctic"],
16  ["t_arctic", "t_Arctic"],
17  ["p_arctic", "p_Arctic"],
18  ["sa_seaice", "SA_seaice"],
19  ["t_seaice", "t_seaice"],
20  ["w_seaice", "w_seaice"],
21  ["t_ice", "t_ice"],
22  ["w_ice", "w_ice"],
23  ["sa_bulk", "SA_bulk"],
24  ["h_pot_bulk", "h_pot_bulk"],
25  ["h_bulk", "h_bulk"],
26  ["pref", "pr"]
27 ]

Definition at line 194 of file make_check_data.py.