| 1 | 
enderton | 
1.1 | 
% This file contains general diagnostics parameters. | 
| 2 | 
  | 
  | 
 | 
| 3 | 
  | 
  | 
 | 
| 4 | 
  | 
  | 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | 
| 5 | 
  | 
  | 
%                            Field information                            %  | 
| 6 | 
  | 
  | 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | 
| 7 | 
  | 
  | 
 | 
| 8 | 
  | 
  | 
% When ever a new field is added to be analyzed using the diagnostics | 
| 9 | 
  | 
  | 
% package, it must be added here so that the packages knows what type of | 
| 10 | 
  | 
  | 
% field it is. | 
| 11 | 
  | 
  | 
 | 
| 12 | 
  | 
  | 
fields2D = {'USTR'  ,'VSTR'  ,'TSR'   ,'OLR'   ,'SSR'   ,... | 
| 13 | 
  | 
  | 
            'SLR'   ,'SHF'   ,'EVAP'  ,'PRECNV','PRECLS',... | 
| 14 | 
  | 
  | 
            'CLOUDC','CLTOP' ,'CBMF'  ,'DRAG'  ,'aimV0' ,... | 
| 15 | 
  | 
  | 
            'aimT0' ,'aimQ0' ,'EnFxPr','albedo','dTsurf',... | 
| 16 | 
  | 
  | 
            'EmP'   ,'TotP'  ,'ETA'   ,'ETAstd','Eta2'  ,... | 
| 17 | 
  | 
  | 
            'Eta'                                       ,... | 
| 18 | 
  | 
  | 
            'SLP','HF' ,'QSW','TX' ,'TY' ,'FW' ,... | 
| 19 | 
  | 
  | 
            'SFx','SIC','MXL','SST','SSS','vSq',... | 
| 20 | 
  | 
  | 
            'ice_fract'     ,'ice_iceH'      ,'ice_snowAge'   ,... | 
| 21 | 
  | 
  | 
            'ice_snowH'     ,'ice_snowPrc'   ,'ice_Qice1'     ,... | 
| 22 | 
  | 
  | 
            'ice_Qice2'     ,'ice_Tice1'     ,'ice_Tice2'     ,... | 
| 23 | 
  | 
  | 
            'ice_Tsrf'                                        ,... | 
| 24 | 
  | 
  | 
            'ICE_fract'     ,'ICE_iceH'      ,... | 
| 25 | 
enderton | 
1.2 | 
            'ICE_fract-T'   ,'ICE_iceH-T'    ,... | 
| 26 | 
enderton | 
1.1 | 
            'ice_fract_Ave' ,'ice_iceH_Ave'  ,... | 
| 27 | 
  | 
  | 
            'ice_snowH_Ave' ,'ice_Tsrf_Ave'  ,'ice_Tice1_Ave' ,... | 
| 28 | 
  | 
  | 
            'ice_Tice2_Ave' ,'ice_snowPr_Ave','ice_flx2oc_Ave',... | 
| 29 | 
  | 
  | 
            'ice_frw2oc_Ave','ice_salFx_Ave' ,'ice_flxAtm_Ave',... | 
| 30 | 
  | 
  | 
            'ice_frwAtm_Ave','ice_albedo_Ave','ICE_tMxL_Ave'  ,... | 
| 31 | 
  | 
  | 
            'ICE_sMxL_Ave'}; | 
| 32 | 
  | 
  | 
     | 
| 33 | 
  | 
  | 
fields3D = {'S','T','Temp','TT','U','UU','uVel','V','VV','vVel','W',... | 
| 34 | 
  | 
  | 
            'wVel','aim_RH','Tstd','KEpri','phiHyd','Psi','Bol','Res',... | 
| 35 | 
enderton | 
1.2 | 
            'Conv','Test','ActT','MoiPTc'}; | 
| 36 | 
enderton | 
1.1 | 
 | 
| 37 | 
  | 
  | 
     | 
| 38 | 
  | 
  | 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | 
| 39 | 
  | 
  | 
%                         AIM physics parameters                          %  | 
| 40 | 
  | 
  | 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | 
| 41 | 
  | 
  | 
 | 
| 42 | 
  | 
  | 
% This information is specific to the aim atmospheric physics package.  The | 
| 43 | 
  | 
  | 
% data (unfortunately) comes in a single file with an array that must be | 
| 44 | 
  | 
  | 
% properly indexed to pull out the desired information.  Here is the list | 
| 45 | 
  | 
  | 
% of fields and the indecies.  Note that some fields do not have indecies | 
| 46 | 
  | 
  | 
% such as 'EmP' and 'TotP'.  This is because these are compositions of | 
| 47 | 
  | 
  | 
% other aim physics fields. | 
| 48 | 
  | 
  | 
 | 
| 49 | 
  | 
  | 
aimparameters = {'USTR'  ,'VSTR'  ,'TSR'   ,'OLR'   ,'SSR'   ,... | 
| 50 | 
  | 
  | 
                 'SLR'   ,'SHF'   ,'EVAP'  ,'PRECNV','PRECLS',... | 
| 51 | 
  | 
  | 
                 'CLOUDC','CLTOP' ,'CBMF'  ,'DRAG'  ,'aimV0' ,... | 
| 52 | 
  | 
  | 
                 'aimT0' ,'aimQ0' ,'EnFxPr','albedo','dTsurf',... | 
| 53 | 
  | 
  | 
                 'EmP'   ,'TotP'}; | 
| 54 | 
  | 
  | 
 | 
| 55 | 
  | 
  | 
USTR   =  1;  % U-stress (Pa) | 
| 56 | 
  | 
  | 
VSTR   =  2;  % V-stress (Pa) | 
| 57 | 
  | 
  | 
TSR    =  3;  % Top-of-atm. shortwave radiation (W/m2) | 
| 58 | 
  | 
  | 
OLR    =  4;  % Outgoing longwave radiation (W/m2) | 
| 59 | 
  | 
  | 
SSR    =  5;  % Surface shortwave radiation (W/m2) | 
| 60 | 
  | 
  | 
SLR    =  6;  % Surface longwave radiation (W/m2) | 
| 61 | 
  | 
  | 
SHF    =  7;  % Sensible heat flux (W/m2) | 
| 62 | 
  | 
  | 
EVAP   =  8;  % Evaporation [g/ (m2 s)] | 
| 63 | 
  | 
  | 
PRECNV =  9;  % Convective precipitation [g/ (m2 s)] | 
| 64 | 
  | 
  | 
PRECLS = 10;  % Large-scale precipitation [g/ (m2 s)] | 
| 65 | 
  | 
  | 
CLOUDC = 11;  % Total cloud cover (fraction) | 
| 66 | 
  | 
  | 
CLTOP  = 12;  % Normalized pressure at cloud top | 
| 67 | 
  | 
  | 
CBMF   = 13;  % Cloud-base mass flux | 
| 68 | 
  | 
  | 
DRAG   = 14;  % Surface Drag term (= Cd*Rho*|V|) (land+sea combined) | 
| 69 | 
  | 
  | 
aimV0  = 15;  % Surface wind speed [m/s] | 
| 70 | 
  | 
  | 
aimT0  = 16;  % Surface air absolute temp. [K] | 
| 71 | 
  | 
  | 
aimQ0  = 17;  % Surface air spec. humidity [g/kg] | 
| 72 | 
  | 
  | 
EnFxPr = 18;  % Precip energy flux (snow, rain temp) [W/m^2] | 
| 73 | 
  | 
  | 
albedo = 19;  % Surface albedo [0-1] | 
| 74 | 
  | 
  | 
dTsurf = 20;  % Surf. Temp change from 1 iter to the next one (>0) [K] | 
| 75 | 
  | 
  | 
 | 
| 76 | 
  | 
  | 
 | 
| 77 | 
  | 
  | 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | 
| 78 | 
  | 
  | 
%                       Coupled fields parameters                         % | 
| 79 | 
  | 
  | 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | 
| 80 | 
  | 
  | 
 | 
| 81 | 
  | 
  | 
cplparameters = {'SLP','HF' ,'QSW','TX' ,'TY' ,'FW' ,... | 
| 82 | 
  | 
  | 
                 'SFx','SIC','MXL','SST','SSS','vSq'}; | 
| 83 | 
  | 
  | 
 | 
| 84 | 
  | 
  | 
SLP = 1;   % Atmospheric Sea-Level pressure [N/m2] | 
| 85 | 
  | 
  | 
HF  = 2;   % Net surface heat-flux [W/m2] | 
| 86 | 
  | 
  | 
QSW = 3;   % ??? [W/m2] | 
| 87 | 
  | 
  | 
TX  = 4;   % Surface stress in X [N/m2] | 
| 88 | 
  | 
  | 
TY  = 5;   % Surface stress in Y [N/m2] | 
| 89 | 
  | 
  | 
FW  = 6;   % Net fresh water flux (E-P-R) [m/s] | 
| 90 | 
  | 
  | 
SFx = 7;   % Salt flux from sea-ice [psu.kg/m^2/s] | 
| 91 | 
  | 
  | 
SIC = 8;   % Sea-ice mass [kg/m^2] | 
| 92 | 
  | 
  | 
MXL = 9;   % Ocean mixed-layer depth [m] | 
| 93 | 
  | 
  | 
SST = 10;  % Ocean surface temperature [degC] | 
| 94 | 
  | 
  | 
SSS = 11;  % Ocean surface salinity [psu] | 
| 95 | 
  | 
  | 
vSq = 12;  % Ocean surface velocity square [m^2/s^2] | 
| 96 | 
  | 
  | 
 | 
| 97 | 
  | 
  | 
 | 
| 98 | 
  | 
  | 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | 
| 99 | 
  | 
  | 
%                        Ice time-average fields                          % | 
| 100 | 
  | 
  | 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | 
| 101 | 
  | 
  | 
 | 
| 102 | 
  | 
  | 
iceparameters = {'ice_fract'     ,'ice_iceH'      ,'ice_snowAge'   ,... | 
| 103 | 
  | 
  | 
                 'ice_snowH'     ,'ice_snowPrc'   ,'ice_Qice1'     ,... | 
| 104 | 
  | 
  | 
                 'ice_Qice2'     ,'ice_Tice1'     ,'ice_Tice2'     ,... | 
| 105 | 
  | 
  | 
                 'ice_Tsrf'                                        ,... | 
| 106 | 
  | 
  | 
                 'ICE_fract'     ,'ICE_iceH'      ,... | 
| 107 | 
  | 
  | 
                 'ICE_fract-T'     ,'ICE_iceH-T'      ,... | 
| 108 | 
  | 
  | 
                 'ice_fract_Ave' ,'ice_iceH_Ave'  ,... | 
| 109 | 
  | 
  | 
                 'ice_snowH_Ave' ,'ice_Tsrf_Ave'  ,'ice_Tice1_Ave' ,... | 
| 110 | 
  | 
  | 
                 'ice_Tice2_Ave' ,'ice_snowPr_Ave','ice_flx2oc_Ave',... | 
| 111 | 
  | 
  | 
                 'ice_frw2oc_Ave','ice_salFx_Ave' ,'ice_flxAtm_Ave',... | 
| 112 | 
  | 
  | 
                 'ice_frwAtm_Ave','ice_albedo_Ave','ICE_tMxL_Ave'  ,... | 
| 113 | 
  | 
  | 
                 'ICE_sMxL_Ave'}; | 
| 114 | 
  | 
  | 
 | 
| 115 | 
  | 
  | 
ice_fract_Ave  = 1;  % Ice fraction  [0-1] | 
| 116 | 
  | 
  | 
ice_iceH_Ave   = 2;  % Ice thickness [m] | 
| 117 | 
  | 
  | 
ice_snowH_Ave  = 3;  % Snow thickness [m] | 
| 118 | 
  | 
  | 
ice_Tsrf_Ave   = 4;  % Surface Temperature [C] | 
| 119 | 
  | 
  | 
ice_Tice1_Ave  = 5;  % 1st level Temp. [C] | 
| 120 | 
  | 
  | 
ice_Tice2_Ave  = 6;  % 2nd level Temp. [C] | 
| 121 | 
  | 
  | 
ice_snowPr_Ave = 7;  % Snow precipitation (+=down) [kg/m2/s] | 
| 122 | 
  | 
  | 
ice_flx2oc_Ave = 8;  % Heat flux out of the ocean (+=up) [W/m2] | 
| 123 | 
  | 
  | 
ice_frw2oc_Ave = 9; % Fresh-water flux out off the ocean (E-P) [m/s] | 
| 124 | 
  | 
  | 
ice_salFx_Ave  = 10; % Salt flux out of the ocean (+=up) [psu.kg/m2] | 
| 125 | 
  | 
  | 
ice_flxAtm_Ave = 11; % Net heat flux from Atmosphere (+=down) [W/m2] | 
| 126 | 
  | 
  | 
ice_frwAtm_Ave = 12; % Fresh-water flux from Atmos. (+=up) [kg/m2/s]  | 
| 127 | 
  | 
  | 
ice_albedo_Ave = 13; % Sea-ice albedo [0-1] | 
| 128 | 
  | 
  | 
ICE_tMxL_Ave   = 14; % Ocean mixed-layer Temp. [C] | 
| 129 | 
  | 
  | 
ICE_sMxL_Ave   = 15; % Ocean mixed-layer salinity [psu] | 
| 130 | 
  | 
  | 
 | 
| 131 | 
  | 
  | 
 | 
| 132 | 
  | 
  | 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | 
| 133 | 
  | 
  | 
%                  Experiment and configuration indecies                  % | 
| 134 | 
  | 
  | 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | 
| 135 | 
  | 
  | 
 | 
| 136 | 
  | 
  | 
% Current experiment order with indecies defined: | 
| 137 | 
enderton | 
1.2 | 
%   { FieldName  (fln), Experiment (trl),  DataType   (dat),... | 
| 138 | 
enderton | 
1.1 | 
%     DataDir    (dad), GridDir    (grd),  Iterations (itr),... | 
| 139 | 
  | 
  | 
%     TimeStep   (tst), Fluid      (flu),  DataFormat (drm),... | 
| 140 | 
enderton | 
1.2 | 
%     Averaging  (avg),  SliceType (slc),  PlotStyle  (pst),... | 
| 141 | 
  | 
  | 
%     Optional parameters} | 
| 142 | 
enderton | 
1.1 | 
% | 
| 143 | 
  | 
  | 
% Field descriptions/options: | 
| 144 | 
  | 
  | 
%   FieldName  (fln):   Variable name. | 
| 145 | 
enderton | 
1.2 | 
%   Experiment (trl):   Experiment name. | 
| 146 | 
  | 
  | 
%   DataType   (dat):   Data type, supports 'Tav', 'Ins'. | 
| 147 | 
enderton | 
1.1 | 
%   DataDir    (dad):   Data directory. | 
| 148 | 
  | 
  | 
%   GridDir    (grd):   Grid data directory. | 
| 149 | 
  | 
  | 
%   Iterations (itr):   Iterations for analysis. | 
| 150 | 
  | 
  | 
%   TimeStep   (tst):   Time step. | 
| 151 | 
  | 
  | 
%   Fluid      (flu):   Fluid, supports 'A', 'O'. | 
| 152 | 
  | 
  | 
%   DataFormat (dfm):   Data format, supports 'MDS', 'MNC'. | 
| 153 | 
  | 
  | 
%   Averaging  (avg):  'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', | 
| 154 | 
  | 
  | 
%                      'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec', | 
| 155 | 
  | 
  | 
%                      'DJF', 'MAM', 'JJA', 'SON', 'Ann', 'Ins', | 
| 156 | 
  | 
  | 
%   SliceType  (slc):  'Sur', 'Zon', 'i=#', 'j=#', 'k=#' | 
| 157 | 
  | 
  | 
%   PlotStyle  (pst):  'Grd', 'Int', 'Con', 'Cnf', 'Lin' | 
| 158 | 
  | 
  | 
ifln = 1; | 
| 159 | 
enderton | 
1.2 | 
itrl = 2; | 
| 160 | 
enderton | 
1.1 | 
idat = 3; | 
| 161 | 
  | 
  | 
idad = 4; | 
| 162 | 
  | 
  | 
igrd = 5; | 
| 163 | 
  | 
  | 
iitr = 6; | 
| 164 | 
  | 
  | 
itst = 7; | 
| 165 | 
  | 
  | 
iflu = 8; | 
| 166 | 
  | 
  | 
iddf = 9; | 
| 167 | 
  | 
  | 
igdf = 10; | 
| 168 | 
  | 
  | 
iavg = 11; | 
| 169 | 
  | 
  | 
islc = 12; | 
| 170 | 
  | 
  | 
ipst = 13; | 
| 171 | 
  | 
  | 
 | 
| 172 | 
  | 
  | 
 | 
| 173 | 
  | 
  | 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | 
| 174 | 
  | 
  | 
%                          General grid parameters                        % | 
| 175 | 
  | 
  | 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | 
| 176 | 
  | 
  | 
 | 
| 177 | 
  | 
  | 
% Often time cube sphere data must be interpolated onto a lon-lat grid. | 
| 178 | 
  | 
  | 
% These variables define the longitude (XL) and latitude (YL) values onto | 
| 179 | 
  | 
  | 
% which the grid sphere data is interpolated. | 
| 180 | 
  | 
  | 
XL = -179:2:180; | 
| 181 | 
  | 
  | 
YL =  -89:2:90 ; | 
| 182 | 
  | 
  | 
 | 
| 183 | 
  | 
  | 
% Zonal averaging parameters.  Currently the zonal average function is set | 
| 184 | 
  | 
  | 
% to compute the grid information everytime.  Though it only needs to do | 
| 185 | 
  | 
  | 
% this once (and then access the zonal average grid information file), it | 
| 186 | 
  | 
  | 
% takes little time, so it is currently set to do this every time.  To set | 
| 187 | 
  | 
  | 
% it to do this only once, specify:  kpr=3; nBas=-2; kwr=0; | 
| 188 | 
  | 
  | 
kpr=1; nBas=-2; kwr=1; | 
| 189 | 
  | 
  | 
 | 
| 190 | 
  | 
  | 
% Resolution parameters. KEEP WITH OTHER GRID INFORMATION?!?!? | 
| 191 | 
  | 
  | 
hres  = 32; | 
| 192 | 
  | 
  | 
faces = 6; | 
| 193 | 
  | 
  | 
 | 
| 194 | 
enderton | 
1.2 | 
% Constants | 
| 195 | 
  | 
  | 
g        = 9.81;        % Acceleration due to gravity [m/s2]. | 
| 196 | 
  | 
  | 
presrefA = 100000;      % Atmospheric reference pressure [Pa]. | 
| 197 | 
  | 
  | 
RdA      = 287.05;      % Gas constant for dry air [J/kg/K]. | 
| 198 | 
  | 
  | 
RvA      = 461;         % Gas constant for ?moist? air [J/kg/K]. | 
| 199 | 
  | 
  | 
cpA      = 1005;        % Atmos. spec. heat at constant pres. [J/kg/K]. | 
| 200 | 
  | 
  | 
LHvapA   = 2501000;     % Atmos. latent heat of vaporization. | 
| 201 | 
  | 
  | 
A_CC     = 611;         % Clausius-Clapeyron A coefficient [Pa]. | 
| 202 | 
  | 
  | 
Beta_CC  = 0.067;       % Clausius-Clapeyron Beta coefficient [1/C]. | 
| 203 | 
  | 
  | 
 | 
| 204 | 
  | 
  | 
% Conversions | 
| 205 | 
  | 
  | 
K2C      = 273.15;      % Kelvin = K2C + Celsius [K or C]. |