Skip to content

Commit 2a834e4

Browse files
authored
Feature ugrid (#204)
* CF: out2d validates for ics=1 and iof_ugrid=2 * 3D outputs working for iof_ugrid=0 * Tested for all iof_ugrid = (/1,2,3/) and ics=1 * New iof_ugrid tested with ics=2 and optional metadata.nc input * Documented iof_ugrid=2 and metadata.nc * MAke sure that CRS is transferred from metadata.nc even for ics=1 (when it does not exist in original output) * Simplified to have only iof_ugrid = 0, 1 * Added full reference, make empty institution and license by default * Cleaned up CF output on iof_ugrid=0 * Remove redundant createion_date from variable attributes * Keep iof_ugrid=0 with minimal metadata, keep iof_ugrid=1 with complete data+metadata, new iof_ugrid=2 with complete metadata and referenced data in 3D * Reverted renameing of add_mesh_attributes
1 parent 57f824d commit 2a834e4

File tree

4 files changed

+437
-31
lines changed

4 files changed

+437
-31
lines changed

docs/input-output/optional-inputs.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,3 +259,7 @@ NHAGE, NHAGV = flags that indicate whether or not harmonic analysis is performed
259259
- FMV: fraction of the harmonic analysis period (extending back from the end of the harmonic analysis period) to use for comparing the water elevation and velocity means and variances from the raw model time series with corresponding means and variances of a time series resynthesized from the harmonic constituents. This comparison is helpful for identifying numerical instabilities and for determining how complete the harmonic analysis was. Examples: FMV = 0. - do not compute any means and vars. FMV = 0.1 - compute means and vars. over final 10% of period used in harmonic analysis FMV = 1.0 - compute means and vars. over entire period used in harmonic analysis.
260260
- NHAGE: NHAGE= 0 no harmonic analysis is performed for global elevations; NHAGE =1 harmonic analysis is performed for global elevations (output on harme.53);
261261
- NHAGV: NHAGV is for velocity which is not active right now.
262+
263+
### metadata.nc
264+
265+
This optional file can contain global and variable metadata in the form of NetCDF attributes that will be copied over to the SCHISM output NetCDF files. This file is useful for adding project- or institution-specific metadata. In particular, you should use it to fill the contact and institution information required by CF, and to add a coordinate reference system to SCHISM output on projected coordinates (`ics = 1`) if you add a grid mapping variable called `crs` with appropriate attributes. See the CF conventions for details on required and recommended metadata: https://cfconventions.org/.

docs/input-output/param.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -400,9 +400,12 @@ If `iout_sta=1`, each line of outputs `staout_[1-]` represents time series of th
400400
location for 3D variables). If `iout_sta=2`, 2 lines of outputs are produced at each time step: the odd lines are same as `iout_sta=1`,
401401
and the even lines are 3D profiles - see `Utility/Post-Processing-Fortran/read_staout.f90` for the profile format.
402402

403-
### iof_ugrid (int)
404-
UGRID option for outputs under scribed IO. If iof_ugrid/=0, outputs will also have UGRID metadata (at
405-
the expense of file size).
403+
### iof_ugrid = 0 (int)
404+
UGRID option for 3D outputs under scribed IO (`out2d_*.nc` always has metadata
405+
info). If `iof_ugrid > 0`, 3D outputs will contain UGRID and CF metadata.
406+
if `iof_ugrid == 1`, 3D output contains UGRID mesh data at the expense
407+
of file size; if `iof_ugrid == 2`, 3D output references mesh data in the
408+
2D output.
406409

407410
### nc_out =1(int)
408411
Main switch to turn on/off netcdf outputs, useful for other programs (e.g., ESMF) to control outputs.

sample_inputs/param.nml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -835,8 +835,10 @@
835835

836836
!-----------------------------------------------------------------------
837837
! UGRID option for _3D_ outputs under scribed IO (out2d*.nc always has meta
838-
! data info). If iof_ugrid/=0, 3D outputs will also have UGRID metadata (at
839-
! the expense of file size).
838+
! data info). If iof_ugrid > 0, 3D outputs will also have UGRID metadata.
839+
! if iof_ugrid == 1 3D output will contain UGRID mesh data (at the expense
840+
! of file size); if iof_ugrid == 2, 3D output references mesh data in the
841+
! 2D output.
840842
!-----------------------------------------------------------------------
841843
iof_ugrid = 0
842844

0 commit comments

Comments
 (0)