M. Model_Output_Conventions_____ The NCAR CSM ocean model saves a variety of prognostic and diagnostic quant* *ities to several history files during the course of an integration. In the initial re* *lease, the history files are written using Fortran unformatted IO. The choice of file content and * *format is largely historical, guided by the types of analysis undertaken with the model a* *nd by the characteristics of the NCAR Mass Storage System. To make the data more accessi* *ble through commonly available visualization and analysis tools, a set of filters h* *ave been developed to convert the model's native history files to netCDF files that conf* *orm to CSM conventions. This document briefly describes the content of the native history* * files, the filters and the resulting netCDF files. Native History Files The output from the model is stored in a series of history files. If instan* *taneous output has been generated, these files are named H1, H2, H3, etc. If time-averaged ou* *tput has been generated, files containing time-averaged data are named H121, H122, H120,* * etc., as indicated in the table below. Variables are organized roughly into groups th* *at would typically be used together in an analysis. The table below describes the organ* *ization of the files. Refer to the model documentation and source code for the definitions* * of variable names. Inst. Avg. __File__File____Record____Variables___________________________________________* *________ H1 H121 1 - jmt fitt, fj, ttsec, t(imt,km,nt) H11 H122 1 - jmt fitt, fj, ttsec, u(imt,km), v(imt,km), w(imt,kmt) H2 H120 1 fitt, ttsec, dtuv, psi(imt,jmt) 2 nconxy(imt,jmt,4) 3 fitt, ttsec, c2dtuv, err(imt,jmt), dpdx(imt,jmt),dpd* *y(imt,jmt) 4 fitt, ttsec, hblt(imt,jmt) 5 fitt, ttsec, hbml(imt,jmt) H3 H125 1 fitt, ttsec, ttn(8,jmt,nt), tmt(jmt,km) 2 fitt, ttsec, ttn2(6:9,jmt,nt,0:nhreg), tmtiso(jmt,km) H4 _ 1 fitt, ttsec, buoy(0:km), plicin, plicex, ekt, engint(8), engext(8) 2 psile(nisle), Tbarglb(km,nt), Tbarreg(nhreg,km,nt),p* *northpole H5 H123 1 - jmt fitt, fj, ttsec, uiso(imt,km), viso(imt,km),wiso(imt* *,km) H7 H124 1 - jmt fitt, fj, ttsec, smf(imt,2), stf(imt,nt), sswt(imt) File Conversion Filters While the native file organization provides efficient storage and access on* * the NCAR MSS, it can be awkward for model analysis purposes. Two filters that convert th* *e data to netCDF format are provided to help ameliorate this problem. The first filter, "* *filtdiag", M-1 converts the model H3 (H125) and H4 file data, and the second, "filtprog", conv* *erts the data from the remaining model H-files. Both filters produce netCDF files that * *conform to CSM conventions for global and variable attributes. Our practice is to stor* *e data from multiple times (typically one year's worth) in the "diagnostic" files, and* * data from a single time in the prognostic files, though this easily configurable at run tim* *e. Due to the large number of land points carrying constant fill values in the model output, * *the files are efficiently (40% to 55%) compressed by standard Unix utilities like compress or* * gzip. The output of the filters is minimally configurable at runtime through thei* *r input (via namelist IO) as indicated in Appendices A (filtdiag) and B (filtprog). Th* *e filters are written in ANSI standard Fortran 90 and have been tested in the NCAR Cray a* *nd IBM/RS6000 cluster environments. Example batch queue system scripts are also pr* *ovided for each of these environments. netCDF History Files The netCDF file format is self describing. NCL descriptions of example ocea* *n model netCDF files are included in Appendices C and D. Appendix A. filtdiag input group fileinfo ncfilenm - (character) - name of output netCDF file title - (character) - global attribute title string save_kmt - (logical) - save integer depth array in file save_rmask - (logical) - save integer basin index array in file group expinfo modver - (character) - global attribute model version string case - (character) - global attribute case string daypyr - (real) - length of model calendar in days group trcinfo trcname - (character array) - tracer variable names trclname - (character array) - tracer long name variable attribute string trcunit - (character array) - tracer units variable attribute string trcscl - (real array) - tracer scale variable attribute trcoff - (real array) - tracer offset variable attribute ttnname - (character array) - northward tracer transport variable names ttnlname - (character array) - northward tracer transport long name variabl* *e attribute string ttnunit - (character array) - northward tracer transport units variable att* *ribute string ttnscl - (real array) - northward tracer transport scale variable attribute ttnoff - (real array) - northward tracer transport offset variable attribute group basinfo basin_nm - (character array) - names of basins in region mask group auxinfo file_kmt - (character) - Unix file name for integer depth data file_rmask - (character) - Unix file name for integer region mask data group inpinfo (repeatable) done - (logical) - no more input data to process file_h3 - (character) - Unix filename of H3 data file_h4 - (character) - Unix filename of H4 data M-2 Appendix B. filtprog input group fileinfo ncfilenm - (character) - name of output netCDF file title - (character) - global attribute title string save_kmt - (logical) - save integer depth array in file save_depth - (logical) - save real valued depth array in file save_rmask - (logical) - save integer basin index array in file save_ncon - (logical) - save convective adjustment counter data in file save_sswt - (logical) - save penetrative radiation flux data in file group expinfo modver - (character) - global attribute model version string case - (character) - global attribute case string daypyr - (real) - length of model calendar in days is_average - (logical) - input history data is already averaged group trcinfo trcname - (character array) - tracer variable names trclname - (character array) - tracer long name variable attribute string trcunit - (character array) - tracer units variable attribute string trcscl - (real array) - tracer scale variable attribute trcoff - (real array) - tracer offset variable attribute flxname - (character array) - surface tracer flux variable names flxlname - (character array) - surface tracer flux long name variable attri* *bute string flxunit - (character array) - surface tracer flux units variable attribute * *string flxscl - (real array) - surface tracer flux scale variable attribute flxoff - (real array) - surface tracer flux offset variable attribute rfillval - (real) - value to use for missing real valued data ifillval - (integer) - value to use for missing integer valued data group auxinfo file_kmt - (character) - Unix file name for integer depth data file_rmask - (character) - Unix file name for integer region mask data group basinfo basin_nm - (character array) - names of basins in region mask group inpinfo (repeatable) done - (logical) - no more input data to process file_h1t - (character) - Unix filename of H1 data file_h1u - (character) - Unix filename of H11 data file_h2 - (character) - Unix filename of H2 data file_h5 - (character) - Unix filename of H5 data file_75 - (character) - Unix filename of H7 data Appendix C. Example Prognostic Data File NCL (2 x 2 model) netcdf ocnprog_y0007.d000.00 dimensions: time = UNLIMITED ; // (1 currently) lon_t = 152 ; lon_u = 152 ; lat_t = 111 ; lat_u = 111 ; z_t = 45 ; z_w = 46 ; nchar = 132 ; basins = 8 ; M-3 variables: double time(time) ; time:long_name = "time" ; float lon_t(lon_t) ; lon_t:long_name = "Longitude (T grid)" ; float lon_u(lon_u) ; lon_u:long_name = "Longitude (U grid)" ; float lat_t(lat_t) ; lat_t:long_name = "Latitude (T grid)" ; float lat_u(lat_u) ; lat_u:long_name = "Latitude (U grid)" ; float z_t(z_t) ; z_t:long_name = "Depth (T grid)" ; float z_w(z_w) ; z_w:long_name = "Depth (W grid)" ; char basins_label(basins, nchar) ; basins_label:long_name = "Ocean Basins" ; float daypyr ; daypyr:long_name = "Calendar Length" ; long itt(time) ; itt:long_name = "Time Step Number" ; float dz(z_t) ; dz:long_name = "Vertical Grid Cell Thickness" ; float dzz(z_w) ; dzz:long_name = "Vertical Grid Cell Spacing" ; float dxt(lon_t) ; dxt:long_name = "Zonal T Grid Cell Width" ; float dxu(lon_u) ; dxu:long_name = "Zonal U Grid Cell Width" ; float dyt(0lat_t) ; dyt:long_name = "Meridional T Grid Cell Width" ; float dyu(lat_u) ; dyu:long_name = "Meridional U Grid Cell Width" ; long kmt(lat_t, lon_t) ; kmt:long_name = "Depth of Ocean in Model Levels" ; long rmask(lat_t, lon_t) ; rmask:long_name = "Basin Index" ; long H(lat_t, lon_t) ; H:long_name = "Ocean Depth" ; float T(time, lat_t, z_t, lon_t) ; T:long_name = "Potential Temperature" ; float S(time, lat_t, z_t, lon_t) ; S:long_name = "Salinity" ; float U(time, lat_u, z_t, lon_u) ; U:long_name = "Eulerian Velocity East Component" ; float V(time, lat_u, z_t, lon_u) ; V:long_name = "Eulerian Velocity North Component" ; float W(time, lat_t, z_w, lon_t) ; W:long_name = "Eulerian Velocity Vertical Component" ; float Uiso(time, lat_u, z_t, lon_u) ; Uiso:long_name = "Eddy Induced Transport Velocity East Component" ; float Viso(time, lat_u, z_t, lon_u) ; Viso:long_name = "Eddy Induced Transport Velocity North Component" ; M-4 float Wiso(time, lat_t, z_w, lon_t) ; Wiso:long_name = "Eddy Induced Transport Velocity Vertical Component" ; float psi(time, lat_t, lon_t) ; psi:long_name = "Barotropic Transport Streamfunction" ; float dpdx(time, lat_u, lon_u) ; dpdx:long_name = "Surface Pressure Gradient East Component" ; float dpdy(time, lat_u, lon_u) ; dpdy:long_name = "Surface Pressure Gradient North Component" ; float hblt(time, lat_t, lon_t) ; hblt:long_name = "Boundary Layer Depth" ; float hbml(time, lat_t, lon_t) ; hbml:long_name = "Mixed Layer Depth" ; float smfx(time, lat_u, lon_u) ; smfx:long_name = "Surface Momentum Flux East Component" ; float smfy(time, lat_u, lon_u) ; smfy:long_name = "Surface Momentum Flux North Component" ; float Tflx(time, lat_t, lon_t) ; Tflx:long_name = "Surface Heat Flux" ; float Sflx(time, lat_t, lon_t) ; Sflx:long_name = "Surface Salt Flux" ; // global attributes: :conventions = "CSM NetCDF Conventions Version 0.0" ; :filename = "ocnprog_y0007.d000.00.nc" ; :platform = "Model: CSM Ocean Component" ; :model_ver = "D02L45T2" ; :case = "b001.02" ; :title = "Field Variables" ; :time_rep = "n", Appendix D. Example Diagnostic Data File NCL (2 x 2 model) netcdf ocndiag_y0005 dimensions: time = UNLIMITED ; // (12 currently) lon_t = 152 ; lon_u = 152 ; lat_t = 111 ; lat_u = 111 ; z_t = 45 ; z_w = 46 ; nchar = 132 ; islands = 8 ; basins = 8 ; engterm = 9 ; ttnterm1 = 8 ; ttnterm2 = 4 ; M-5 variables: double time(time) ; time:long_name = "time" ; float lon_t(lon_t) ; lon_t:long_name = "Longitude (T grid)" ; float lon_u(lon_u) ; lon_u:long_name = "Longitude (U grid)" ; float lat_t(lat_t) ; lat_t:long_name = "Latitude (T grid)" ; float lat_u(lat_u) ; lat_u:long_name = "Latitude (U grid)" ; float z_t(z_t) ; z_t:long_name = "Depth (T grid)" ; float z_w(z_w) ; z_w:long_name = "Depth (W grid)" ; char islands_label(islands, nchar) ; islands_label:long_name = "Islands" ; char basins_label(basins, nchar) ; basins_label:long_name = "Ocean Basins" ; char engterm_label(engterm, nchar) ; engterm_label:long_name = "Energy Diagnostic Terms" ; char ttnterm1_label(ttnterm1, nchar) ; ttnterm1_label:long_name = "Meridional Tracer Transport Terms" ; char ttnterm2_label(ttnterm2, nchar) ; ttnterm2_label:long_name = "Meridional Tracer Transport Terms" ; float daypyr ; daypyr:long_name = "Calendar Length" ; long itt(time) ; itt:long_name = "Time Step Number" ; float dz(z_t) ; dz:long_name = "Vertical Grid Cell Thickness" ; float dzz(z_w) ; dzz:long_name = "Vertical Grid Cell Spacing" ; float dxt(lon_t) ; dxt:long_name = "Zonal T Grid Cell Width" ; float dxu(lon_u) ; dxu:long_name = "Zonal U Grid Cell Width" ; float dyt(lat_t) ; dyt:long_name = "Meridional T Grid Cell Width" ; float dyu(lat_u) ; dyu:long_name = "Meridional U Grid Cell Width" ; long kmt(lat_t, lon_t) ; kmt:long_name = "Depth of Ocean in Model Levels" ; long rmask(lat_t, lon_t) ; rmask:long_name = "Basin Index" ; float tmt(time, z_w, lat_u) ; tmt:long_name = "Eulerian Meridional Transport Streamfunction" ; float tmtiso(time, z_w, lat_u) ; tmtiso:long_name = "Eddy Induced Meridional Transport Streamfunction" ; float Tttn_terms(time, lat_u, ttnterm1) ; Tttn_terms:long_name = "Meridional Heat Transport" ; float Sttn_terms(time, lat_u, ttnterm1) ; Sttn_terms:long_name = "Meridional Salt Transport" ; M-6 float Tttn_basins(time, basins, lat_u, ttnterm2) ; Tttn_basins:long_name = "Meridional Heat Transport" ; float Sttn_basins(time, basins, lat_u, ttnterm2) ; Sttn_basins:long_name = "Meridional Salt Transport" ; float ekt(time) ; ekt:long_name = "Global Average Kinetic Energy Density" ; float buoylev(time, z_w) ; buoylev:long_name = "Level Integrated Buoyancy Work" ; float buoyglb(time) ; buoyglb:long_name = "Global Average Buoyancy Work" ; float engext(time, engterm) ; Pengext:long_name = "Global Average External Mode Energy Budget" ; float engint(time, engterm) ; engint:long_name = "Global Average Internal Mode Energy Budget" ; float T_horz(time, basins, z_t) ; T_horz:long_name = "Horizontal Average Potential Temperature" ; float S_horz(time, basins, z_t) ; S_horz:long_name = "Horizontal Average Salinity" ; float pisle(time, islands) ; pisle:long_name = "Island Streamfunction" ; float pnp(time) ; pnp:long_name = "Barotropic Transport Streamfunction at North Pole" ; // global attributes: :conventions = "CSM NetCDF Conventions Version 0.0" ; :filename = "ocndiag_y0005.nc" ; :platform = "Model: CSM Ocean Component" ; :model_ver = "D02L45T2" ; :case = "b001.02" ; :title = "Diagnostic Variables" ; :time_rep = "n", M-7