#################################################
#################################################
Coupler script inputs and outputs as designed by Taimaz Bahadory
07-02-2017 Heather Andres first attempt at describing coupler, LOVECLIM and GSM
                          input variables, crude list of output vars

#################################################
Coupling variables
#################################################
## Coupler reads input vaiables from "ens.prm".
## "ens.prm" example:

-----------------------------------------------------------------------------------------------------
love=1                          # Loveclim (1: enable / 0: disable)
gsm=1                           # GSM (1: enable / 0: disable)
orby=-12000                     # Inception orbital year (before present); sets "eccf, oblf, omwebf"
orbv=1                          # Orbital year variation (1: variable; 0: fixed) (only for spin-up)
noy=5000                        # Number of years to spin-up; "lengthInDays" in file
ghg=1                           # ghg; (0: fixed, 1: variable)
ic=ic000000_360                 # IC for LOVECLIM compressed name without .tar.gz (full path)
it=40ka                         # Initial Topography: directory containing berg, icemask, and maybe GSM restart files (for LGM runs)
bs=1				# Enable/Disable Bering Strait variations
biasT=1                         # Bias correction for Temperature (1: enable / 0: disable)
biasP=1                         # Bias correction for Precipitation (1: enable / 0: disable)
biasMethod=0                    # Bias correction method (0/1/2/3/4) # Currectly ONLY 0 & 1
loveYearStep=20                 # Number of Years to run Loveclim <= dOrby
dOrby=20                        # Orbital forcing and GHG step & No. of years to run GSM
loveAve=20                      # Number of last years to average fields before passing to GSM LOVECLIM
upscl=1                         # Upscaling method (1: Simple / 2: Envelope / 3: Silhouette)
lps=1                           # Lapse-rate (0: fixed to 6.5 / 1: calculated)

imask=1				# Always use 1!

albin=0.45                      # Albedo of melting ice in the arctic
albis=0.45                      # Albedo of melting ice in the antarctic
albice=0.45                     # Albedo of melting ice
alphd=0.75                      # Albedo of snow (thickness > 0.05) {range: 0.6 - 0.95}
alphdi=0.60                     # Albedo of thick bare ice {range: 0.3 - 0.7}
alphs=0.70                      # Albedo of melting snow {range: 0.4 - 0.7}
cgren=0.04                      # Correction of the snow or ice albedo to take into account effects of cloudiness

precth=0.85                     # Precipitation threshold (default: 0.9) (in atmphys0.f)

cloud=1                         # Cloud radiation parameterization (enabled/disabled)
cloudFile=Default               # Cloud data file to use (-> ccECBILT.asc)

<------ CONTROL LOVECLIM OUTPUTS ------>
ts=1                            # surface temperature   ! "DON'T CHANGE"
t2m=1                           # temperature        ! "DON'T CHANGE"
t4g=1                           # 650 hPa temperature   ! "DON'T CHANGE"
evap=1                          # evaporation           ! "DON'T CHANGE"
prec=1                          # precipitation         ! "DON'T CHANGE"
wind10m=0                       # Wind 10 m
wind200=0                       # Wind X/Y 200 hPa
wind500=0                       # Wind X/Y 500 hPa
wind800=1                       # Wind X/Y 800 hPa
windStress=0                    # U/V-Stress
sp=0                            # surface pressure
t2g=0                           # 350 hPa temperature
t0g=0                           # stratosphere temperature
dyprec=0                        # dynamic precipitation
coprec=0                        # convection precipitation
snow=0                          # total snow
snowa=0                         # land snow depth
gph=0                           # geopotential height
rh=0                            # relative humidity

-----------------------------------------------------------------------------------------------------

## Inside variables (DO NOT TOUCH -> set by coupler at runtime)
cnt 		(0,1)		cplEns job submit -> 0 ; cplEnsCont job submit -> 1
era 		(PD, inc, LGM) 	Flag that specifies Present-day/inception/LGM boundary conditions and simulation lengths
iter 				If 1, only run for 100 LOVECLIM years, otherwise, run for loveYearStep years
maxIter 	totalYears/step	Number of coupling steps. Depends on time-step and total run length
nextOrby 	orby+dOrby 	orbital year for next LOVECLIM submission
noy 				Total number of years to spinup
spn 		(0,1)		If 1, LOVECLIMl to be spun up, otherwise not (cplEns -> 1 ; cplEnsCont -> depends!)

################################################
GSM variables
################################################
## GSM uses one the following scripts to run:
## rsiNE.init: Clean start
## rsiNE.step: starts GSM at each time-step
## rsiNE.restart: Starts GSM for first the time-step using restart files
##
## GSM executes using any of rsiNE files like this:
## ./rsiNE.restart GSMparamLineNo runName NAEUa startYear endYear
## eg: ./rsiNE.restart 1 run1000 NAEUa -40000 -39980
##
## If this is a restart job (rsiNE.restart), you need to provide five restart files

Restart File  		GSM runtime name
------------		----------------
restartVE		fort.19
restartSGk1		fort.111
restartSGk2		fort.112
restartk1		fort.31
restartk2		fort.32


###############################################
Methodological Notes
###############################################
### Creates executable directories for coupler, GSM and LOVECLIM
LOVECLIM:  OUTPUT/

GSM: restart/

