﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
814	IMPORTANT: EcoSim Bio-Optical Diagnostic Terms	arango		"Updated the !EcoSim model to include diagnostics of the optical terms when '''DIAGNOSTICS_BIO''' and '''BIO_OPTIC''' to write out into output NetCDF file '''DIANAME''' various underwater light spectral properties.

* The standard input script '''ecosim.in''' now has several logical switches to process:
 {{{
! Logical switches (TRUE/FALSE) to activate writing of time-averaged,
! underwater optical diagnostics terms into DIAGNOSTIC output file [Ngrids].

  Dout(idSpIr) == T      ! surface_irradiance      surface spectral irradiance
  Dout(iddIrr) == T      ! downward_irradiance     downward spectral irradiance
  Dout(idsIrr) == T      ! scalar_irradiance       scalar spectral irradiance
  Dout(idAcos) == T      ! light_cosine            light spectral average cosine
  Dout(idLatt) == T      ! light_attenuation       diffuse light attenuation
  Dout(idaPHY) == T      ! Phy_absorption          phytoplankton absorption
  Dout(idaDET) == T      ! detrital_absorption     detrital absorption
  Dout(idaCDC) == T      ! CDC_absorption          CDC absorption
  Dout(idsPHY) == T      ! Phy_scattering          phytoplankton scattering
  Dout(idbPHY) == T      ! Phy_backscattering      phytoplankton backscattering
  Dout(idsTOT) == T      ! total_scattering        total scattering
  Dout(idbTOT) == T      ! total_backscattering    total backscattering
}}}

* The '''varinfo.dat''' was updated to include the metadata for the new light spectral properties.

* Added new routines '''bc_4d.F''' and '''exchange_4d.F''' to process the open boundary conditions for 4D spectral optical fields.

* If '''ECOSIM''' is activated, all output NetCDF files contain the light coordinate for all optical spectral variables:
 {{{
        double light(Nbands) ;
                light:long_name = ""center wavelength of spectral irradiance bands"" ;
                light:units = ""nanometer"" ;
}}}
 Currently, '''ECOSIM''' is configured with 60 wavelenghts of light spectral bands ranging from '''402:5:697''' nanometers.  Notice that all the '''def_*.F''' routines that creates ROMS output NetCDF files were updated to include this '''light''' coordinate.

* A new C-preprocessing option '''BIO_OPTIC''' is introduced to compute the underwater light spectral properties that are essential for any biogeochemical model.  All the !EcoSim model routines ('''ecosim.h''', '''ecosim_def.h''', '''ecosim_inp.h''', '''ecosim_mod.h''', '''ecosim_var.h''', and '''ecosim_wrt.h''') were updated.

* All the changes to the ROMS code were tested with the '''BIO_TOY''' test case:

[[Image(https://www.myroms.org/trac/SpecIrr.png, center, 600)]]
[[Image(https://www.myroms.org/trac/DownIrr.png, center, 600)]]
[[Image(https://www.myroms.org/trac/ScalarIrr.png, center, 600)]]
[[Image(https://www.myroms.org/trac/LightCosine.png, center, 600)]]
[[Image(https://www.myroms.org/trac/LightAtt.png, center, 600)]]
[[Image(https://www.myroms.org/trac/PhyAbs.png, center, 600)]]
[[Image(https://www.myroms.org/trac/CDCabs.png, center, 600)]]
[[Image(https://www.myroms.org/trac/DetAbs.png, center, 600)]]
[[Image(https://www.myroms.org/trac/PhySca.png, center, 600)]]
[[Image(https://www.myroms.org/trac/PhyBck.png, center, 600)]]
[[Image(https://www.myroms.org/trac/TotalSca.png, center, 600)]]
[[Image(https://www.myroms.org/trac/TotalBck.png, center, 600)]]

* The '''BIO_TOY''' application was also updated in the test repository. It now includes Matlab script '''ecosim_optics.m''' used to generate the above plots.

----

Many thanks to Bronwyn Cahill for her help coding and testing this update to the !EcoSim model.
"	upgrade	closed	major	Release ROMS/TOMS 3.7	Nonlinear	3.7	Done		
