# OceanFlux Greenhouse Gases default climatology configuration file
# created 27/07/2016 Jamie Shutler, j.d.shutler@exeter.ac.uk
#

#
# Input datasets and identifiers, path/location definition needed for all entries
# Required input dataset names are: windu10, sstskin, sstfnd, ecmwf, pco2, sigma0, sig_wv_ht
# The data product name is the name of the data set within the netcdf file. This can be checked using 'ncdump -h <file.nc> | less'
# An example file is '20100101_OCF-SST-GLO-1M-100-MGD-OSTIA.nc' , where the data identifier is 'MGD-OSTIA' and data product name is
# 'analysed_sst_mean'
#
# Issues to note:
#  - All entries are case sensitive
#  - 
#
# Filepaths can contain the following tokens:
#    <YYYY>  - converted to 4 digit year, e.g. 1999
#    <YY>    - converted to 2 digit year, e.g.   99
#    <MM>	 - converted to two digit month, e.g. 01 for January
#	 <Mmm>	 - converted to three letter month abbreviation, e.g. Jan for January
#    <MMM>	 - uppercase three letter month abbreviation, e.g. JAN
#    <mmm>	 - lowercase three letter month abbreviation, e.g. jan
#	 <DD>	 - two digit decimal representation of the day of the month, e.g. 01 for the 1st day of the month
#	 <DDD>	 - three digit decimal representation of the day of the year, e.g. 123 for 3rd May (124 on a leap year)
#
# In addition to these tokens, filename patterns can be specified using ? and * which
# follow the standard Unix glob behaviour.
#


# Flux calculation options. Valid options are 'bulk', 'rapid' or 'equilibrium'
# 'rapid' and 'equilibrium' are in relation to the flux model as described in
# Woolf et al., 2012.
flux_calc = rapid
GAS = N2O #N2O not CO2
ATMGAS = "P" #Partial pressure, not volume

# If sst_gradients enables and only one of sstskin or sstfnd is used the other
# will be derived according to, i.e.:
# 		sstskin = sstfnd - cool_skin_difference
# Default value for cool_skin_difference is 0.17K (Donlon et al., 2002)
# At least one must be selected.
sst_gradients = yes
cool_skin_difference = 0.17
saline_skin_value = 0.0


# Latitude, longitude and time product names (these are taken from the data layer names in
# axes_data_layer, which must contain the name of datalayer defined below, e.g. 'sstskin').
# Typically 'lat' and 'lon' unless using Takahashi which is 'latitude' and 'longitude'.
axes_data_layer = sstfnd
latitude_prod = latitude
longitude_prod = longitude
time_prod = time

# 
# Input data layers and their associated data variable names
# 
# Each input data layer is specified by its names and at least a path # and prod (netCDF
# variable name) using the name followed by a '_path' or '_prod' suffix, respectively. E.g.:
# sstskin_path = path/to/data.nc
# sstskin_prod = sst_skin_mean
# 
# Other suffixes can be used:
#   _path		    - Filepath to the netCDF (.nc) file containing this data.
#				      May be relative or absolute and can contain the tokens described above.
#	_prod           - The name of the variable within the netCDF file.
#	_stddev_prod    - Optional. Name of the variable containing standard deviation data.
#	_count_prod	    - Optional. Name of the variable containing count data.
#   _netCDFName     - Optional. Override the name which will be given to the data layer in the
#					- output netCDF file.
#	_minBound	    - Optional. Override the minimum allowed value.
#	_maxBound	    - Optional. Override the maximum allowed value.
#   _preprocessing	- Optional. A list of functions used to transform the data before it is used.
#					- Functions should be seperated by commas and are applied in order.
#					- Functions must be defined in src_home/data_preprocessing.py
#


# sst skin data inputs
sstfnd_path = data/MEMENTO/monthly_n2o/N2O_onedeggrid_monthly_<YYYY>_<M>.nc
sstfnd_prod = SST

sstfnd_preprocessing = celsius_to_kelvin, flip_longitude
sstfnd_timeDimensionName = month

sstfnd_stddev_path = data/reynolds_sst/reynolds_avhrr_only_monthly/<YYYY>/<YYYY><MM>01_OCF-SST-GLO-1M-100-REYNOLDS.nc
sstfnd_stddev_prod = sst_stddev

sstfnd_count_path = data/reynolds_sst/reynolds_avhrr_only_monthly/<YYYY>/<YYYY><MM>01_OCF-SST-GLO-1M-100-REYNOLDS.nc
sstfnd_count_prod = sst_count


# U10 wind data inputs
windu10_path = data/ccmp_monthly/ccmp_v2_rebinned_<YYYY>_month<MM>.nc
windu10_prod = windspeed

windu10_moment2_path = data/ccmp_monthly/ccmp_v2_rebinned_<YYYY>_month<MM>.nc
windu10_moment2_prod = windspeed
windu10_moment2_preprocessing = pow2

windu10_moment3_path = data/ccmp_monthly/ccmp_v2_rebinned_<YYYY>_month<MM>.nc
windu10_moment3_prod = windspeed
windu10_moment3_preprocessing = pow3


# ice data
ice_path = data/ice/2010/2010<MM>01_OCF-ICE-GLO-1M-100-MGD-SSMI.nc
ice_prod = sea_ice_fraction_mean


# modelled air pressure data.
pressure_path = data/air_pressure/<YYYY>/<YYYY><MM>_OCF-PRE-GLO-1M-100-ECMWF.nc
pressure_prod = msl_mean
pressure_preprocessing = pascal_to_millibar


# Salinity data
salinity_path = data/salinity/2010/SSS_SMOS_L3_Monthly_1deg_CATDS_CECOS_2011_2010.<MM>_V02.nc
salinity_prod = sss


#
# Option to tell FluxEngine to expect Takahashi or SOCAT data to be used for the 'pco2 ='
# definition below. This is needed as the lat grid between the two datasets are different.
# The OceanFluxGHG data netcdf description has lat -90 to +90, whereas the Takahashi data
# are +90 to -90.
# '= taka' for using Takashashi, '= socat' for SOCAT
# if 'taka' option selected then the 1.5 uatm per year increment is not added to the values in the flux calculation
# pCO2 and fCO2 are handled in the same way, so with the SOCAT option you can either use pCO2 or fCO2 data
#
pco2_data_selection = socat_pco2

pgas_air_path = data/MEMENTO/monthly_n2o/N2O_onedeggrid_monthly_<YYYY>_<M>.nc
pgas_air_prod = partial_pressure_atm
pgas_air_preprocessing = flip_longitude, nano_to_micro
pgas_air_timeDimensionName = month

pgas_sw_path = data/MEMENTO/monthly_n2o/N2O_onedeggrid_monthly_<YYYY>_<M>.nc
pgas_sw_prod = partial_pressure_ocean
pgas_sw_preprocessing = flip_longitude, nano_to_micro
pgas_sw_timeDimensionName = month

schmidt_parameterisation = schmidt_Wanninkhof2014

#
# random noise switches for ensemble analyses, options are 'no' or 'yes'
# format is 'random_noise_<variable>, where <variable> matches one of the input dataset names
# currently we can only perturb the windu10, sstskin and sstfnd datasets
# the mean and stddev of the noise function used to perturb the data are set within the python flux processor
# using the known bias and rmse values for these datasets
# order of priority: any option of random noise is added first, then bias (see next option) is added
# noise can be added to multiple datasets simultaneously
# noise is added before any internal quality control
#
random_noise_windu10 = no
random_noise_sstskin = no
random_noise_sstfnd = no
random_noise_pco2 = no


# bias switches for uncertainty work, options are 'no' or 'yes'
# format is 'bias_<variable>, where <variable> matches one of the input dataset names
# currently we can perturb the windu10, sstskin, sstfnd, pCO2(water) datasets
# order of priority: any option of random noise (see previous option) is added first, then bias is added
# bias to pco2 data is set to the input pco2 data (ie before any temperature correction occurs)
# biases are added before any internal quality control
# multiple biases can be set.
#
# bias values, value needs to be a floating point number and there needs to be one entry for each of the bias switches
# defined above. units are wind (ms^-1), sstskin (degrees kelvin), sstfnd (degrees centigrade), pco2 (ppm)
# multiple biases can be set and bias values can be positive or negative.
# biases are added before any internal quality control
# note: bias to pco2 data is set to the input pco2 data (ie before any temperature correction occurs)
#
bias_windu10 = no
bias_windu10_value = 0.0

bias_sstskin = no
bias_sstskin_value = 0.0

bias_sstfnd = no
bias_sstfnd_value = 0.0

bias_pco2 = no
bias_pco2_value = 0.0

bias_k = no
bias_k_percent = no
bias_k_value = 0.0
bias_k_biology_value = 0.0
bias_k_wind_value = 0.0


#
# Selected k parameterisation. Options are:
# k_Ho2006, k_Nightingale2000, kt_OceanFluxGHG, k_Wanninkhof1992, k_Wanninkhof2013, 
# k_McGillis2001, k_Ho1997, kd_OceanFluxGHG_backscatter, kd_OceanFluxGHG_wind, 
# kb_OceanFluxGHG, kt_OceanFluxGHG_kd_wind, k_generic
#
k_parameterisation = k_Nightingale2000


# asymmetry for OceanFlux k paramterisation
# default is 1.0 ie no asymmetry
# this option is only used when k_parameterisation = kt_OceanFluxGHG.
kb_asymmetry = 1.00


# Rain specific components
# rain bias influence on sstskin
bias_sstskin_due_rain = no
# values for bias influence and conditions
bias_sstskin_due_rain_value = 0.0
bias_sstskin_due_rain_intensity = 0.0
bias_sstskin_due_rain_wind = 0.0

# enable flux due to wet deposition by rain ('yes' or 'no')
rain_wet_deposition = no

# enable additional linear additive k term due to rain ('yes' or 'no')
k_rain_linear_ho1997 = no
k_rain_nonlinear_h2012 = no


#
# Output directory for the resultant netcdf files
#
output_dir = fe_output/N2O_rapid_N00/
