Back to home page

MITgcm

 
 

    


File indexing completed on 2022-06-17 05:09:18 UTC

view on githubraw file Latest commit cc60455f on 2022-06-16 14:55:16 UTC
6d54cf9ca1 Ed H*0001 #include "EXF_OPTIONS.h"
7f861c1808 Patr*0002 
c3c3169472 Jean*0003       SUBROUTINE EXF_READPARMS( myThid )
7f861c1808 Patr*0004 
492dec36bd Jean*0005 C     ==================================================================
                0006 C     SUBROUTINE exf_readparms
                0007 C     ==================================================================
                0008 C
                0009 C     o This routine initialises the package that calculates external
                0010 C       forcing fields for a given timestep of the MITgcmUV. Parameters
                0011 C       for this package are set in "data.externalforcing". Some additional
                0012 C       precompiler switches have to be specified in "EXF_OPTIONS.h".
                0013 C
                0014 C     started: Christian Eckert eckert@mit.edu  30-Jun-1999
                0015 C
                0016 C     changed: Christian Eckert eckert@mit.edu  11-Jan-2000
                0017 C              - Restructured the code in order to create a package
                0018 C                for the MITgcmUV.
                0019 C              Christian Eckert eckert@mit.edu  12-Feb-2000
                0020 C              - Changed Routine names (package prefix: exf_)
                0021 C     changed: Patrick Heimbach, heimbach@mit.edu  04-May-2000
                0022 C              - changed the handling of precip and sflux with respect
                0023 C                to CPP options ALLOW_BULKFORMULAE and ALLOW_ATM_TEMP
                0024 C     changed: Ralf.Giering@FastOpt.de 25-Mai-20000
                0025 C              - moved relaxation and climatology to extra routines
                0026 C              Patrick Heimbach, heimbach@mit.edu  04-May-2000
                0027 C              - added obcs parameters
                0028 C     changed: Virginie Thierry, vthierry@ucsd.edu 04-June-2001
                0029 C              - added new obcs parameters (for each boundaries)
                0030 C     included runoff D. Stammer, Nov. 25, 2001
                0031 C     included pressure forcing. heimbach@mit.edu 05-Nov-2002
                0032 C     added "repeatPeriod" for cycling of forcing datasets 19-Dec-2002
                0033 C     mods for pkg/seaice: menemenlis@jpl.nasa.gov 20-Dec-2002
                0034 C
                0035 C     ==================================================================
                0036 C     SUBROUTINE exf_readparms
                0037 C     ==================================================================
7f861c1808 Patr*0038 
1ccd5d14b8 Jean*0039       IMPLICIT NONE
7f861c1808 Patr*0040 
492dec36bd Jean*0041 C     == global variables ==
7f861c1808 Patr*0042 
                0043 #include "EEPARAMS.h"
                0044 #include "SIZE.h"
793277f3cc Patr*0045 #include "PARAMS.h"
c3c3169472 Jean*0046 c#include "cal.h"
082e18c36c Jean*0047 #include "EXF_PARAM.h"
                0048 #include "EXF_CONSTANTS.h"
30fcb891cf Jean*0049 #include "EXF_INTERP_SIZE.h"
                0050 #include "EXF_INTERP_PARAM.h"
7f861c1808 Patr*0051 
492dec36bd Jean*0052 C     == routine arguments ==
ae1d4f326f Jean*0053       INTEGER myThid
7f861c1808 Patr*0054 
492dec36bd Jean*0055 C     == local variables ==
203850bf7f Jean*0056 #ifdef USE_EXF_INTERPOLATION
c747f147c2 Jean*0057       INTEGER j
b9b591469d Jean*0058 #endif /* USE_EXF_INTERPOLATION */
ae1d4f326f Jean*0059       INTEGER iUnit
9f46642c85 Jean*0060       LOGICAL exf_verbose
ae1d4f326f Jean*0061       CHARACTER*(2) exf_yftype
                0062       CHARACTER*(MAX_LEN_MBUF) msgBuf
497d85062c Jean*0063       _RL     exf_inscal_sst, exf_inscal_sss
492dec36bd Jean*0064 C     == end of interface ==
7f861c1808 Patr*0065 
492dec36bd Jean*0066 C     Surface flux data.
ad5cdab327 Patr*0067       NAMELIST /EXF_NML_01/
d7b4f7c409 Jean*0068      &      windstressmax,       repeatPeriod,    exf_albedo,
6a63774fc2 Mart*0069      &   ocean_emissivity,     ice_emissivity, snow_emissivity,
d7b4f7c409 Jean*0070      &          exf_iceCd,          exf_iceCe,     exf_iceCh,
9f46642c85 Jean*0071      &   exf_scal_BulkCdn,     climtempfreeze, useExfCheckRange,
                0072      &      exf_iprec    ,   exf_iprec_obcs  , exf_yftype,
afd492c074 Mart*0073      &     exf_verbose  ,   exf_debugLev    , exf_monFreq,
                0074      &     exf_adjMonFreq, exf_adjMonSelect,
83b72232fc Jean*0075      & useExfYearlyFields,  twoDigitYear,
1ccd5d14b8 Jean*0076      & readStressOnAgrid, rotateStressOnAgrid, readStressOnCgrid,
                0077      & useAtmWind,          useRelativeWind  , noNegativeEvap,
                0078      & useStabilityFct_overIce, diags_opOceWeighted,
f71b2ceff6 Gael*0079      & select_ZenAlbedo, useExfZenIncoming,
d7b4f7c409 Jean*0080      & hu, ht, umin, atmrho, atmcp, cen2kel, gravity_mks,
cc60455fbb Mart*0081      & cdrag_1, cdrag_2, cdrag_3, cdrag_8, cdragMax, umax,
                0082      & cstanton_1, cstanton_2, cdalton,
20cf30c902 Patr*0083      & flamb, flami, zolmin, zref,
                0084      & cvapor_fac, cvapor_exp, cvapor_fac_ice, cvapor_exp_ice,
ec1f56ea0e Jean*0085      & humid_fac, gamma_blk, saltsat, sstExtrapol, psim_fac
ad5cdab327 Patr*0086 
                0087       NAMELIST /EXF_NML_02/
d078fa0cf5 Jean*0088      &          hfluxfile,     hfluxstartdate1,     hfluxstartdate2,
                0089      &          hfluxRepCycle,     hfluxperiod,     hfluxStartTime,
                0090      &          atempfile,     atempstartdate1,     atempstartdate2,
                0091      &          atempRepCycle,     atempperiod,     atempStartTime,
                0092      &            aqhfile,       aqhstartdate1,       aqhstartdate2,
                0093      &            aqhRepCycle,       aqhperiod,       aqhStartTime,
                0094      &            hs_file,       hs_startdate1,       hs_startdate2,
                0095      &            hs_RepCycle,       hs_period,       hs_StartTime,
                0096      &            hl_file,       hl_startdate1,       hl_startdate2,
                0097      &            hl_RepCycle,       hl_period,       hl_StartTime,
                0098      &          sfluxfile,     sfluxstartdate1,     sfluxstartdate2,
                0099      &          sfluxRepCycle,     sfluxperiod,     sfluxStartTime,
                0100      &           evapfile,      evapstartdate1,      evapstartdate2,
                0101      &           evapRepCycle,      evapperiod,      evapStartTime,
                0102      &         precipfile,    precipstartdate1,    precipstartdate2,
                0103      &         precipRepCycle,    precipperiod,    precipStartTime,
                0104      &     snowprecipfile, snowprecipstartdate1, snowprecipstartdate2,
                0105      &     snowprecipRepCycle, snowprecipperiod, snowprecipStartTime,
                0106      &         runofffile,    runoffstartdate1,    runoffstartdate2,
                0107      &         runoffRepCycle,    runoffperiod,    runoffStartTime,
d7e09becc2 Jean*0108      &      runoftempfile,
d078fa0cf5 Jean*0109      &        saltflxfile,   saltflxstartdate1,   saltflxstartdate2,
                0110      &        saltflxRepCycle,   saltflxperiod,   saltflxStartTime,
                0111      &        ustressfile,   ustressstartdate1,   ustressstartdate2,
                0112      &        ustressRepCycle,   ustressperiod,   ustressStartTime,
                0113      &        vstressfile,   vstressstartdate1,   vstressstartdate2,
                0114      &        vstressRepCycle,   vstressperiod,   vstressStartTime,
                0115      &          uwindfile,     uwindstartdate1,     uwindstartdate2,
                0116      &          uwindRepCycle,     uwindperiod,     uwindStartTime,
                0117      &          vwindfile,     vwindstartdate1,     vwindstartdate2,
                0118      &          vwindRepCycle,     vwindperiod,     vwindStartTime,
                0119      &         wspeedfile,    wspeedstartdate1,    wspeedstartdate2,
                0120      &         wspeedRepCycle,    wspeedperiod,    wspeedStartTime,
                0121      &         swfluxfile,    swfluxstartdate1,    swfluxstartdate2,
                0122      &         swfluxRepCycle,    swfluxperiod,    swfluxStartTime,
                0123      &         lwfluxfile,    lwfluxstartdate1,    lwfluxstartdate2,
                0124      &         lwfluxRepCycle,    lwfluxperiod,    lwfluxStartTime,
                0125      &         swdownfile,    swdownstartdate1,    swdownstartdate2,
                0126      &         swdownRepCycle,    swdownperiod,    swdownStartTime,
                0127      &         lwdownfile,    lwdownstartdate1,    lwdownstartdate2,
                0128      &         lwdownRepCycle,    lwdownperiod,    lwdownStartTime,
                0129      &      apressurefile, apressurestartdate1, apressurestartdate2,
                0130      &      apressureRepCycle, apressureperiod, apressureStartTime,
497d85062c Jean*0131      &        tidePotFile,   tidePotStartdate1,   tidePotStartdate2,
                0132      &        tidePotRepCycle,   tidePotPeriod,   tidePotStartTime,
d078fa0cf5 Jean*0133      &       areamaskfile,  areamaskstartdate1,  areamaskstartdate2,
                0134      &       areamaskRepCycle,  areamaskperiod,  areamaskStartTime,
                0135      &        climsstfile,   climsststartdate1,   climsststartdate2,
                0136      &        climsstRepCycle,   climsstperiod,   climsstStartTime,
                0137      &        climsssfile,   climsssstartdate1,   climsssstartdate2,
                0138      &        climsssRepCycle,   climsssperiod,   climsssStartTime,
                0139      &       climustrfile,  climustrstartdate1,  climustrstartdate2,
                0140      &       climustrRepCycle,  climustrperiod,  climustrStartTime,
                0141      &       climvstrfile,  climvstrstartdate1,  climvstrstartdate2,
                0142      &       climvstrRepCycle,  climvstrperiod,  climvstrStartTime,
                0143      &     areamaskTauRelax,  climsstTauRelax,    climsssTauRelax,
                0144      &                       climustrTauRelax,   climvstrTauRelax
ad5cdab327 Patr*0145 
                0146       NAMELIST /EXF_NML_03/
c994dbe735 Jean*0147      &   exf_inscal_hflux,  exf_inscal_sflux,    exf_inscal_evap,
7e230c5c02 Dimi*0148      & exf_inscal_ustress,  exf_inscal_vstress,
3752238fd8 Patr*0149      &   exf_inscal_uwind,  exf_inscal_vwind,    exf_inscal_wspeed,
c994dbe735 Jean*0150      &   exf_inscal_atemp,  exf_offset_atemp,
                0151      &   exf_inscal_aqh,    exf_inscal_hs,       exf_inscal_hl,
7e230c5c02 Dimi*0152      &     exf_inscal_sst,  exf_inscal_sss,
                0153      &  exf_inscal_swflux,  exf_inscal_lwflux,   exf_inscal_precip,
3752238fd8 Patr*0154      &  exf_inscal_runoff,  exf_inscal_apressure, exf_inscal_snowprecip,
a66aad0124 Gael*0155      &  exf_inscal_runoftemp, exf_inscal_saltflx,
bdec91d862 Patr*0156      &  exf_inscal_swdown,  exf_inscal_lwdown,
ad5cdab327 Patr*0157      & exf_inscal_climsst, exf_inscal_climsss,
de9be302a8 Patr*0158      & exf_inscal_climustr, exf_inscal_climvstr,
bdec91d862 Patr*0159      &  exf_outscal_hflux,  exf_outscal_ustress, exf_outscal_vstress,
7e230c5c02 Dimi*0160      & exf_outscal_swflux,  exf_outscal_sst,     exf_outscal_sss,
bdec91d862 Patr*0161      &  exf_outscal_sflux,  exf_outscal_apressure,
497d85062c Jean*0162      & exf_inscal_tidePot,  exf_outscal_tidePot,
d877a5eaeb Patr*0163      & exf_inscal_areamask, exf_outscal_areamask,
c994dbe735 Jean*0164      &  hfluxconst, atempconst, aqhconst, hs_const, hl_const,
                0165      &  sfluxconst, evapconst, precipconst, snowprecipconst,
                0166      &  runoffconst, runoftempconst, saltflxconst, ustressconst,
240fc4ff39 Jean*0167      &  vstressconst, uwindconst, vwindconst, wspeedconst, swfluxconst,
                0168      &  lwfluxconst, swdownconst, lwdownconst, apressureconst,
497d85062c Jean*0169      &  tidePotConst, areamaskconst, climsstconst, climsssconst,
de9be302a8 Patr*0170      &  climustrconst, climvstrconst,
bc0b8e4ad2 Patr*0171      &     hflux_exfremo_intercept, hflux_exfremo_slope,
ec80b41947 Patr*0172      &     atemp_exfremo_intercept, atemp_exfremo_slope,
                0173      &     aqh_exfremo_intercept, aqh_exfremo_slope,
c994dbe735 Jean*0174      &     hs_exfremo_intercept,  hs_exfremo_slope,
                0175      &     hl_exfremo_intercept,  hl_exfremo_slope,
ec80b41947 Patr*0176      &     sflux_exfremo_intercept, sflux_exfremo_slope,
                0177      &     evap_exfremo_intercept, evap_exfremo_slope,
                0178      &     precip_exfremo_intercept, precip_exfremo_slope,
3752238fd8 Patr*0179      &     snowprecip_exfremo_intercept, snowprecip_exfremo_slope,
ec80b41947 Patr*0180      &     runoff_exfremo_intercept, runoff_exfremo_slope,
e603dbf008 Dimi*0181      &     runoftemp_exfremo_intercept, runoftemp_exfremo_slope,
a66aad0124 Gael*0182      &     saltflx_exfremo_intercept, saltflx_exfremo_slope,
ec80b41947 Patr*0183      &     ustress_exfremo_intercept, ustress_exfremo_slope,
                0184      &     vstress_exfremo_intercept, vstress_exfremo_slope,
                0185      &     uwind_exfremo_intercept, uwind_exfremo_slope,
                0186      &     vwind_exfremo_intercept, vwind_exfremo_slope,
3752238fd8 Patr*0187      &     wspeed_exfremo_intercept, wspeed_exfremo_slope,
ec80b41947 Patr*0188      &     swflux_exfremo_intercept, swflux_exfremo_slope,
                0189      &     lwflux_exfremo_intercept, lwflux_exfremo_slope,
                0190      &     swdown_exfremo_intercept, swdown_exfremo_slope,
                0191      &     lwdown_exfremo_intercept, lwdown_exfremo_slope,
ad5cdab327 Patr*0192      &     apressure_exfremo_intercept, apressure_exfremo_slope,
497d85062c Jean*0193      &     tidePot_exfremo_intercept, tidePot_exfremo_slope,
203850bf7f Jean*0194      &     areamask_exfremo_intercept, areamask_exfremo_slope,
ad5cdab327 Patr*0195      &     climsst_exfremo_intercept, climsst_exfremo_slope,
de9be302a8 Patr*0196      &     climsss_exfremo_intercept, climsss_exfremo_slope,
                0197      &     climustr_exfremo_intercept, climustr_exfremo_slope,
                0198      &     climvstr_exfremo_intercept, climvstr_exfremo_slope
ad5cdab327 Patr*0199 
981f32514d Dimi*0200 #ifdef USE_EXF_INTERPOLATION
f468b54d47 Mart*0201       NAMELIST /EXF_NML_04/
                0202      & ustress_lon0, ustress_lon_inc, ustress_lat0, ustress_lat_inc,
4aa4270510 Jean*0203      & ustress_nlon, ustress_nlat, ustress_interpMethod,
63a371a454 Jean*0204      & vstress_lon0, vstress_lon_inc, vstress_lat0, vstress_lat_inc,
4aa4270510 Jean*0205      & vstress_nlon, vstress_nlat, vstress_interpMethod,
63a371a454 Jean*0206      & hflux_lon0, hflux_lon_inc, hflux_lat0, hflux_lat_inc,
4aa4270510 Jean*0207      & hflux_nlon, hflux_nlat, hflux_interpMethod,
63a371a454 Jean*0208      & sflux_lon0, sflux_lon_inc, sflux_lat0, sflux_lat_inc,
4aa4270510 Jean*0209      & sflux_nlon, sflux_nlat, sflux_interpMethod,
63a371a454 Jean*0210      & swflux_lon0, swflux_lon_inc, swflux_lat0, swflux_lat_inc,
4aa4270510 Jean*0211      & swflux_nlon, swflux_nlat, swflux_interpMethod,
fb915f73a5 Patr*0212      & lwflux_lon0, lwflux_lon_inc, lwflux_lat0, lwflux_lat_inc,
4aa4270510 Jean*0213      & lwflux_nlon, lwflux_nlat, lwflux_interpMethod,
63a371a454 Jean*0214      & atemp_lon0, atemp_lon_inc, atemp_lat0, atemp_lat_inc,
4aa4270510 Jean*0215      & atemp_nlon, atemp_nlat, atemp_interpMethod,
c994dbe735 Jean*0216      & aqh_lon0, aqh_lon_inc, aqh_lat0, aqh_lat_inc,
4aa4270510 Jean*0217      & aqh_nlon, aqh_nlat, aqh_interpMethod,
c994dbe735 Jean*0218      & hs_lon0, hs_lon_inc, hs_lat0, hs_lat_inc,
                0219      & hs_nlon, hs_nlat, hs_interpMethod,
                0220      & hl_lon0, hl_lon_inc, hl_lat0, hl_lat_inc,
                0221      & hl_nlon, hl_nlat, hl_interpMethod,
4aa4270510 Jean*0222      & evap_lon0, evap_lon_inc, evap_lat0, evap_lat_inc,
                0223      & evap_nlon, evap_nlat, evap_interpMethod,
240fc4ff39 Jean*0224      & precip_lon0, precip_lon_inc, precip_lat0, precip_lat_inc,
4aa4270510 Jean*0225      & precip_nlon, precip_nlat, precip_interpMethod,
fb915f73a5 Patr*0226      & runoff_lon0, runoff_lon_inc, runoff_lat0, runoff_lat_inc,
4aa4270510 Jean*0227      & runoff_nlon, runoff_nlat, runoff_interpMethod,
a66aad0124 Gael*0228      & saltflx_lon0, saltflx_lon_inc,
                0229      & saltflx_lat0, saltflx_lat_inc,
                0230      & saltflx_nlon, saltflx_nlat, saltflx_interpMethod,
4aa4270510 Jean*0231      & snowprecip_lon0, snowprecip_lon_inc,
                0232      & snowprecip_lat0, snowprecip_lat_inc,
                0233      & snowprecip_nlon, snowprecip_nlat, snowprecip_interpMethod,
63a371a454 Jean*0234      & uwind_lon0, uwind_lon_inc, uwind_lat0, uwind_lat_inc,
4aa4270510 Jean*0235      & uwind_nlon, uwind_nlat, uwind_interpMethod,
63a371a454 Jean*0236      & vwind_lon0, vwind_lon_inc, vwind_lat0, vwind_lat_inc,
4aa4270510 Jean*0237      & vwind_nlon, vwind_nlat, vwind_interpMethod,
3752238fd8 Patr*0238      & wspeed_lon0, wspeed_lon_inc, wspeed_lat0, wspeed_lat_inc,
4aa4270510 Jean*0239      & wspeed_nlon, wspeed_nlat, wspeed_interpMethod,
63a371a454 Jean*0240      & swdown_lon0, swdown_lon_inc, swdown_lat0, swdown_lat_inc,
4aa4270510 Jean*0241      & swdown_nlon, swdown_nlat, swdown_interpMethod,
63a371a454 Jean*0242      & lwdown_lon0, lwdown_lon_inc, lwdown_lat0, lwdown_lat_inc,
4aa4270510 Jean*0243      & lwdown_nlon, lwdown_nlat, lwdown_interpMethod,
d078fa0cf5 Jean*0244      & apressure_lon0, apressure_lon_inc,
                0245      & apressure_lat0, apressure_lat_inc,
                0246      & apressure_nlon, apressure_nlat, apressure_interpMethod,
497d85062c Jean*0247      & tidePot_lon0, tidePot_lon_inc, tidePot_lat0, tidePot_lat_inc,
                0248      & tidePot_nlon, tidePot_nlat, tidePot_interpMethod,
4aa4270510 Jean*0249      & areamask_lon0, areamask_lon_inc, areamask_lat0, areamask_lat_inc,
                0250      & areamask_nlon, areamask_nlat, areamask_interpMethod,
                0251      & climsst_lon0, climsst_lon_inc, climsst_lat0, climsst_lat_inc,
                0252      & climsst_nlon, climsst_nlat, climsst_interpMethod,
                0253      & climsss_lon0, climsss_lon_inc,climsss_lat0, climsss_lat_inc,
                0254      & climsss_nlon, climsss_nlat, climsss_interpMethod,
                0255      & climustr_lon0, climustr_lon_inc, climustr_lat0, climustr_lat_inc,
                0256      & climustr_nlon, climustr_nlat, climustr_interpMethod,
                0257      & climvstr_lon0, climvstr_lon_inc, climvstr_lat0, climvstr_lat_inc,
f593ce37b5 Jean*0258      & climvstr_nlon, climvstr_nlat, climvstr_interpMethod,
                0259      & exf_output_interp
f468b54d47 Mart*0260 #endif /* USE_EXF_INTERPOLATION */
7f861c1808 Patr*0261 
f468b54d47 Mart*0262 #ifdef ALLOW_OBCS
ad5cdab327 Patr*0263       NAMELIST /EXF_NML_OBCS/
26d79ac7cb Jean*0264      &    useOBCSYearlyFields,
d078fa0cf5 Jean*0265      &    obcsNstartdate1,   obcsNstartdate2,   obcsNstartTime,
                0266      &        obcsNperiod,   obcsNrepCycle,
                0267      &    obcsSstartdate1,   obcsSstartdate2,   obcsSstartTime,
                0268      &        obcsSperiod,   obcsSrepCycle,
                0269      &    obcsEstartdate1,   obcsEstartdate2,   obcsEstartTime,
                0270      &        obcsEperiod,   obcsErepCycle,
                0271      &    obcsWstartdate1,   obcsWstartdate2,   obcsWstartTime,
                0272      &        obcsWperiod,   obcsWrepCycle,
                0273      &    siobNstartdate1,   siobNstartdate2,   siobNstartTime,
                0274      &        siobNperiod,   siobNrepCycle,
                0275      &    siobSstartdate1,   siobSstartdate2,   siobSstartTime,
                0276      &        siobSperiod,   siobSrepCycle,
                0277      &    siobEstartdate1,   siobEstartdate2,   siobEstartTime,
                0278      &        siobEperiod,   siobErepCycle,
                0279      &    siobWstartdate1,   siobWstartdate2,   siobWstartTime,
                0280      &        siobWperiod,   siobWrepCycle
f468b54d47 Mart*0281 #endif /* ALLOW_OBCS */
ad5cdab327 Patr*0282 
ae4c29e0db Jean*0283       IF ( .NOT.useEXF ) THEN
                0284 C-    pkg EXF is not used
                0285         _BEGIN_MASTER(myThid)
                0286 C-    Track pkg activation status:
                0287 C     print a (weak) warning if data.exf is found
                0288          CALL PACKAGES_UNUSED_MSG( 'useEXF', ' ', ' ' )
                0289         _END_MASTER(myThid)
                0290         RETURN
                0291       ENDIF
                0292 
492dec36bd Jean*0293       _BEGIN_MASTER(myThid)
7f861c1808 Patr*0294 
492dec36bd Jean*0295 C     Set default values.
7f861c1808 Patr*0296 
056678d46d Jean*0297 #ifdef USE_EXF_INTERPOLATION
                0298 C     define interpolation default input-grid
                0299       CALL EXF_INIT_INTERP( myThid )
                0300 #endif /* USE_EXF_INTERPOLATION */
9f46642c85 Jean*0301 c     exf_verbose        = debugMode
                0302       exf_verbose        = .FALSE.
                0303       exf_debugLev       = debugLevel
d9263fe447 Jean*0304       exf_monFreq        = monitorFreq
afd492c074 Mart*0305       exf_adjMonFreq     = adjMonitorFreq
                0306       exf_adjMonSelect   = 1
c3c3169472 Jean*0307       useExfCheckRange   = .TRUE.
f71b2ceff6 Gael*0308       select_ZenAlbedo   = 0
d106b5e2d8 Gael*0309       useExfZenIncoming  = .FALSE.
c3c3169472 Jean*0310       readStressOnAgrid  = .FALSE.
1ccd5d14b8 Jean*0311       rotateStressOnAgrid= .FALSE.
c3c3169472 Jean*0312       readStressOnCgrid  = .FALSE.
358649780a Gael*0313 #ifdef ALLOW_ATM_WIND
                0314       useAtmWind         = .TRUE.
                0315 #else
                0316       useAtmWind         = .FALSE.
                0317 #endif
0b49ffce6f Dimi*0318       useRelativeWind    = .FALSE.
ec1f56ea0e Jean*0319       noNegativeEvap     = .FALSE.
1ccd5d14b8 Jean*0320       useStabilityFct_overIce = .FALSE.
                0321       diags_opOceWeighted= .TRUE.
cea01ffd1b Patr*0322 
d7b4f7c409 Jean*0323 C-  default value should be set to main model parameter:
                0324 c     cen2kel     =  celsius2K
c3c3169472 Jean*0325 c     gravity_mks = gravity
d7b4f7c409 Jean*0326 c     atmcp       =  atm_Cp
                0327 c     humid_fac   =  atm_Rq     <- default is zero !!!
                0328 
                0329       cen2kel        =      273.150  _d 0
                0330       gravity_mks    =        9.81   _d 0
                0331       atmrho         =        1.200  _d 0
                0332       atmcp          =     1005.000  _d 0
                0333       flamb          =  2500000.000  _d 0
                0334       flami          =   334000.000  _d 0
                0335       cvapor_fac     =   640380.000  _d 0
                0336       cvapor_exp     =     5107.400  _d 0
                0337       cvapor_fac_ice = 11637800.000  _d 0
                0338       cvapor_exp_ice =     5897.800  _d 0
                0339       humid_fac      =        0.606  _d 0
                0340       gamma_blk      =        0.010  _d 0
                0341       saltsat        =        0.980  _d 0
ec1f56ea0e Jean*0342       sstExtrapol    =        0.0    _d 0
d7b4f7c409 Jean*0343       cdrag_1        =        0.0027000 _d 0
                0344       cdrag_2        =        0.0001420 _d 0
                0345       cdrag_3        =        0.0000764 _d 0
cc60455fbb Mart*0346 #ifdef  ALLOW_DRAG_LARGEYEAGER09
                0347       cdrag_8        =       -3.1480700 _d -13
                0348       cdragMax       =        2.34      _d -03
                0349       umax           =       33.        _d 0
                0350 #else
                0351       cdrag_8        = UNSET_RL
                0352       cdragMax       = UNSET_RL
                0353       umax           = UNSET_RL
                0354 #endif
d7b4f7c409 Jean*0355       cstanton_1     =        0.0327 _d 0
                0356       cstanton_2     =        0.0180 _d 0
                0357       cdalton        =        0.0346 _d 0
                0358       zolmin         =     -100.000  _d 0
                0359       psim_fac       =        5.000  _d 0
                0360       zref           =       10.000  _d 0
                0361       hu             =       10.000  _d 0
                0362       ht             =        2.000  _d 0
                0363       umin           =        0.5    _d 0
                0364       exf_iceCd        = 1.63 _d -3
                0365       exf_iceCe        = 1.63 _d -3
                0366       exf_iceCh        = 1.63 _d -3
                0367       exf_albedo       = 0.1 _d 0
492dec36bd Jean*0368 C--   this default is chosen to be backward compatible with
                0369 C--   an earlier setting of 5.5 = ocean_emissivity*stefanBoltzmann
a738070d52 Jean*0370       ocean_emissivity = 5.50 _d -8 / 5.670 _d -8
d7b4f7c409 Jean*0371       ice_emissivity   = 0.95 _d 0
                0372       snow_emissivity  = 0.95 _d 0
20cf30c902 Patr*0373 
492dec36bd Jean*0374 C     Calendar data.
7f861c1808 Patr*0375       hfluxstartdate1    = 0
                0376       hfluxstartdate2    = 0
                0377       hfluxperiod        = 0.0 _d 0
2458d0a95d Patr*0378       hfluxconst         = 0.0 _d 0
4bf6063982 Patr*0379       hflux_exfremo_intercept = 0.0 _d 0
                0380       hflux_exfremo_slope = 0.0 _d 0
7f861c1808 Patr*0381 
                0382       atempstartdate1    = 0
                0383       atempstartdate2    = 0
                0384       atempperiod        = 0.0 _d 0
793277f3cc Patr*0385       atempconst         = celsius2K
4bf6063982 Patr*0386       atemp_exfremo_intercept = 0.0 _d 0
                0387       atemp_exfremo_slope = 0.0 _d 0
7f861c1808 Patr*0388 
                0389       aqhstartdate1      = 0
                0390       aqhstartdate2      = 0
                0391       aqhperiod          = 0.0 _d 0
2458d0a95d Patr*0392       aqhconst           = 0.0 _d 0
4bf6063982 Patr*0393       aqh_exfremo_intercept = 0.0 _d 0
c994dbe735 Jean*0394       aqh_exfremo_slope  = 0.0 _d 0
                0395 
                0396       hs_startdate1      = 0
                0397       hs_startdate2      = 0
                0398       hs_period          = 0.0 _d 0
                0399       hs_const           = 0.0 _d 0
                0400       hs_exfremo_intercept = 0.0 _d 0
                0401       hs_exfremo_slope   = 0.0 _d 0
                0402 
                0403       hl_startdate1      = 0
                0404       hl_startdate2      = 0
                0405       hl_period          = 0.0 _d 0
                0406       hl_const           = 0.0 _d 0
                0407       hl_exfremo_intercept = 0.0 _d 0
                0408       hl_exfremo_slope   = 0.0 _d 0
7f861c1808 Patr*0409 
                0410       sfluxstartdate1    = 0
                0411       sfluxstartdate2    = 0
                0412       sfluxperiod        = 0.0 _d 0
2458d0a95d Patr*0413       sfluxconst         = 0.0 _d 0
4bf6063982 Patr*0414       sflux_exfremo_intercept = 0.0 _d 0
                0415       sflux_exfremo_slope = 0.0 _d 0
7f861c1808 Patr*0416 
cee16b76ae Dimi*0417       evapstartdate1   = 0
                0418       evapstartdate2   = 0
                0419       evapperiod       = 0.0 _d 0
2458d0a95d Patr*0420       evapconst        = 0.0 _d 0
4bf6063982 Patr*0421       evap_exfremo_intercept = 0.0 _d 0
                0422       evap_exfremo_slope = 0.0 _d 0
cee16b76ae Dimi*0423 
7f861c1808 Patr*0424       precipstartdate1   = 0
                0425       precipstartdate2   = 0
                0426       precipperiod       = 0.0 _d 0
2458d0a95d Patr*0427       precipconst        = 0.0 _d 0
4bf6063982 Patr*0428       precip_exfremo_intercept = 0.0 _d 0
                0429       precip_exfremo_slope = 0.0 _d 0
7f861c1808 Patr*0430 
3752238fd8 Patr*0431       snowprecipstartdate1   = 0
                0432       snowprecipstartdate2   = 0
                0433       snowprecipperiod       = 0.0 _d 0
                0434       snowprecipconst        = 0.0 _d 0
                0435       snowprecip_exfremo_intercept = 0.0 _d 0
                0436       snowprecip_exfremo_slope = 0.0 _d 0
                0437 
a8fd6c497b Patr*0438       runoffstartdate1   = 0
                0439       runoffstartdate2   = 0
                0440       runoffperiod       = 0.0 _d 0
2458d0a95d Patr*0441       runoffconst        = 0.0 _d 0
4bf6063982 Patr*0442       runoff_exfremo_intercept = 0.0 _d 0
                0443       runoff_exfremo_slope = 0.0 _d 0
a8fd6c497b Patr*0444 
e603dbf008 Dimi*0445       runoftempconst              = 0.0 _d 0
                0446       runoftemp_exfremo_intercept = 0.0 _d 0
                0447       runoftemp_exfremo_slope     = 0.0 _d 0
                0448 
a66aad0124 Gael*0449       saltflxstartdate1  = 0
                0450       saltflxstartdate2  = 0
                0451       saltflxperiod      = 0.0 _d 0
                0452       saltflxconst       = 0.0 _d 0
                0453       saltflx_exfremo_intercept = 0.0 _d 0
                0454       saltflx_exfremo_slope = 0.0 _d 0
                0455 
7f861c1808 Patr*0456       ustressstartdate1  = 0
                0457       ustressstartdate2  = 0
                0458       ustressperiod      = 0.0 _d 0
2458d0a95d Patr*0459       ustressconst       = 0.0 _d 0
4bf6063982 Patr*0460       ustress_exfremo_intercept = 0.0 _d 0
                0461       ustress_exfremo_slope = 0.0 _d 0
7f861c1808 Patr*0462 
                0463       vstressstartdate1  = 0
                0464       vstressstartdate2  = 0
                0465       vstressperiod      = 0.0 _d 0
2458d0a95d Patr*0466       vstressconst       = 0.0 _d 0
4bf6063982 Patr*0467       vstress_exfremo_intercept = 0.0 _d 0
                0468       vstress_exfremo_slope = 0.0 _d 0
7f861c1808 Patr*0469 
                0470       uwindstartdate1    = 0
                0471       uwindstartdate2    = 0
                0472       uwindperiod        = 0.0 _d 0
2458d0a95d Patr*0473       uwindconst         = 0.0 _d 0
4bf6063982 Patr*0474       uwind_exfremo_intercept = 0.0 _d 0
                0475       uwind_exfremo_slope = 0.0 _d 0
7f861c1808 Patr*0476 
                0477       vwindstartdate1    = 0
                0478       vwindstartdate2    = 0
                0479       vwindperiod        = 0.0 _d 0
2458d0a95d Patr*0480       vwindconst         = 0.0 _d 0
4bf6063982 Patr*0481       vwind_exfremo_intercept = 0.0 _d 0
                0482       vwind_exfremo_slope = 0.0 _d 0
7f861c1808 Patr*0483 
3752238fd8 Patr*0484       wspeedstartdate1    = 0
                0485       wspeedstartdate2    = 0
                0486       wspeedperiod        = 0.0 _d 0
                0487       wspeedconst         = 0.0 _d 0
                0488       wspeed_exfremo_intercept = 0.0 _d 0
                0489       wspeed_exfremo_slope = 0.0 _d 0
                0490 
7f861c1808 Patr*0491       swfluxstartdate1   = 0
                0492       swfluxstartdate2   = 0
                0493       swfluxperiod       = 0.0 _d 0
2458d0a95d Patr*0494       swfluxconst        = 0.0 _d 0
4bf6063982 Patr*0495       swflux_exfremo_intercept = 0.0 _d 0
                0496       swflux_exfremo_slope = 0.0 _d 0
7f861c1808 Patr*0497 
                0498       lwfluxstartdate1   = 0
                0499       lwfluxstartdate2   = 0
                0500       lwfluxperiod       = 0.0 _d 0
2458d0a95d Patr*0501       lwfluxconst        = 0.0 _d 0
4bf6063982 Patr*0502       lwflux_exfremo_intercept = 0.0 _d 0
                0503       lwflux_exfremo_slope = 0.0 _d 0
7f861c1808 Patr*0504 
6060ec2938 Dimi*0505       swdownstartdate1   = 0
                0506       swdownstartdate2   = 0
                0507       swdownperiod       = 0.0 _d 0
2458d0a95d Patr*0508       swdownconst        = 0.0 _d 0
4bf6063982 Patr*0509       swdown_exfremo_intercept = 0.0 _d 0
                0510       swdown_exfremo_slope = 0.0 _d 0
6060ec2938 Dimi*0511 
                0512       lwdownstartdate1   = 0
                0513       lwdownstartdate2   = 0
                0514       lwdownperiod       = 0.0 _d 0
2458d0a95d Patr*0515       lwdownconst        = 0.0 _d 0
4bf6063982 Patr*0516       lwdown_exfremo_intercept = 0.0 _d 0
                0517       lwdown_exfremo_slope = 0.0 _d 0
                0518 
                0519       apressurestartdate1    = 0
                0520       apressurestartdate2    = 0
                0521       apressureperiod        = 0.0 _d 0
c49e52d441 Jean*0522       apressureconst         = surf_pRef
4bf6063982 Patr*0523       apressure_exfremo_intercept = 0.0 _d 0
                0524       apressure_exfremo_slope = 0.0 _d 0
6060ec2938 Dimi*0525 
497d85062c Jean*0526       tidePotStartdate1  = 0
                0527       tidePotStartdate2  = 0
                0528       tidePotPeriod      = 0.0 _d 0
                0529       tidePotConst       = 0.0 _d 0
                0530       tidePot_exfremo_intercept = 0. _d 0
                0531       tidePot_exfremo_slope = 0. _d 0
                0532 
                0533       areamaskstartdate1 = 0
                0534       areamaskstartdate2 = 0
                0535       areamaskperiod     = 0.0 _d 0
                0536       areamaskTauRelax   = 0.0 _d 0
                0537       areamaskconst      = 0.0 _d 0
203850bf7f Jean*0538       areamask_exfremo_intercept = 0. _d 0
                0539       areamask_exfremo_slope = 0. _d 0
8f277f2728 Gael*0540 
ad5cdab327 Patr*0541       climsststartdate1  = 0
                0542       climsststartdate2  = 0
                0543       climsstperiod      = 0
7b50f71112 Gael*0544       climsstTauRelax    = 0.0 _d 0
497d85062c Jean*0545       climsstconst       = 0.0 _d 0
ad5cdab327 Patr*0546       climsst_exfremo_intercept = 0.0 _d 0
                0547       climsst_exfremo_slope = 0.0 _d 0
                0548 
                0549       climsssstartdate1  = 0
                0550       climsssstartdate2  = 0
                0551       climsssperiod      = 0
7b50f71112 Gael*0552       climsssTauRelax    = 0.0 _d 0
497d85062c Jean*0553       climsssconst       = 0.0 _d 0
ad5cdab327 Patr*0554       climsss_exfremo_intercept = 0.0 _d 0
                0555       climsss_exfremo_slope = 0.0 _d 0
                0556 
de9be302a8 Patr*0557       climustrstartdate1  = 0
                0558       climustrstartdate2  = 0
                0559       climustrperiod      = 0
                0560       climustrTauRelax    = 0.0 _d 0
497d85062c Jean*0561       climustrconst       = 0.0 _d 0
de9be302a8 Patr*0562       climustr_exfremo_intercept = 0.0 _d 0
                0563       climustr_exfremo_slope = 0.0 _d 0
                0564 
                0565       climvstrstartdate1  = 0
                0566       climvstrstartdate2  = 0
                0567       climvstrperiod      = 0
                0568       climvstrTauRelax    = 0.0 _d 0
497d85062c Jean*0569       climvstrconst       = 0.0 _d 0
de9be302a8 Patr*0570       climvstr_exfremo_intercept = 0.0 _d 0
                0571       climvstr_exfremo_slope = 0.0 _d 0
                0572 
26d79ac7cb Jean*0573       useOBCSYearlyFields = .FALSE.
de416ebcde Patr*0574       obcsNstartdate1    = 0
                0575       obcsNstartdate2    = 0
                0576       obcsNperiod        = 0.0 _d 0
                0577       obcsSstartdate1    = 0
                0578       obcsSstartdate2    = 0
                0579       obcsSperiod        = 0.0 _d 0
                0580       obcsEstartdate1    = 0
                0581       obcsEstartdate2    = 0
                0582       obcsEperiod        = 0.0 _d 0
                0583       obcsWstartdate1    = 0
                0584       obcsWstartdate2    = 0
                0585       obcsWperiod        = 0.0 _d 0
7f861c1808 Patr*0586 
212017a383 Dimi*0587       siobNstartdate1    = UNSET_I
                0588       siobNstartdate2    = UNSET_I
                0589       siobNperiod        = UNSET_RL
                0590       siobSstartdate1    = UNSET_I
                0591       siobSstartdate2    = UNSET_I
                0592       siobSperiod        = UNSET_RL
                0593       siobEstartdate1    = UNSET_I
                0594       siobEstartdate2    = UNSET_I
                0595       siobEperiod        = UNSET_RL
                0596       siobWstartdate1    = UNSET_I
                0597       siobWstartdate2    = UNSET_I
                0598       siobWperiod        = UNSET_RL
                0599 
3752238fd8 Patr*0600       repeatPeriod       = 0.0 _d 0
                0601       windstressmax      = 2.0 _d 0
660c2f201c Curt*0602 
ad5cdab327 Patr*0603       exf_scal_BulkCdn   = 1.0  _d 0
                0604 
492dec36bd Jean*0605 C     Initialise freezing temperature of sea water
ad5cdab327 Patr*0606       climtempfreeze     = -1.9 _d 0
cd314a935c Dimi*0607 
492dec36bd Jean*0608 C     Data files.
7f861c1808 Patr*0609       hfluxfile          = ' '
                0610       atempfile          = ' '
                0611       aqhfile            = ' '
c994dbe735 Jean*0612       hs_file            = ' '
                0613       hl_file            = ' '
cee16b76ae Dimi*0614       evapfile           = ' '
7f861c1808 Patr*0615       precipfile         = ' '
3752238fd8 Patr*0616       snowprecipfile     = ' '
7f861c1808 Patr*0617       sfluxfile          = ' '
a8fd6c497b Patr*0618       runofffile         = ' '
e603dbf008 Dimi*0619       runoftempfile      = ' '
a66aad0124 Gael*0620       saltflxfile        = ' '
7f861c1808 Patr*0621       ustressfile        = ' '
                0622       vstressfile        = ' '
                0623       uwindfile          = ' '
                0624       vwindfile          = ' '
3752238fd8 Patr*0625       wspeedfile         = ' '
7f861c1808 Patr*0626       swfluxfile         = ' '
                0627       lwfluxfile         = ' '
6060ec2938 Dimi*0628       swdownfile         = ' '
                0629       lwdownfile         = ' '
fdb16198f0 Jean*0630       apressurefile      = ' '
497d85062c Jean*0631       tidePotFile        = ' '
8f277f2728 Gael*0632       areamaskfile       = ' '
ad5cdab327 Patr*0633       climsstfile        = ' '
                0634       climsssfile        = ' '
de9be302a8 Patr*0635       climustrfile       = ' '
                0636       climvstrfile       = ' '
7f861c1808 Patr*0637 
d7e09becc2 Jean*0638 C     Start Time.
54454651d3 Jean*0639       hfluxStartTime     = UNSET_RL
                0640       atempStartTime     = UNSET_RL
                0641       aqhStartTime       = UNSET_RL
                0642       hs_StartTime       = UNSET_RL
                0643       hl_StartTime       = UNSET_RL
                0644       evapStartTime      = UNSET_RL
                0645       precipStartTime    = UNSET_RL
                0646       snowprecipStartTime= UNSET_RL
                0647       sfluxStartTime     = UNSET_RL
                0648       runoffStartTime    = UNSET_RL
                0649       saltflxStartTime   = UNSET_RL
                0650       ustressStartTime   = UNSET_RL
                0651       vstressStartTime   = UNSET_RL
                0652       uwindStartTime     = UNSET_RL
                0653       vwindStartTime     = UNSET_RL
                0654       wspeedStartTime    = UNSET_RL
                0655       swfluxStartTime    = UNSET_RL
                0656       lwfluxStartTime    = UNSET_RL
                0657       swdownStartTime    = UNSET_RL
                0658       lwdownStartTime    = UNSET_RL
                0659       apressureStartTime = UNSET_RL
497d85062c Jean*0660       tidePotStartTime   = UNSET_RL
54454651d3 Jean*0661       areamaskStartTime  = UNSET_RL
                0662       climsstStartTime   = UNSET_RL
                0663       climsssStartTime   = UNSET_RL
                0664       climustrStartTime  = UNSET_RL
                0665       climvstrStartTime  = UNSET_RL
d078fa0cf5 Jean*0666       obcsNstartTime     = UNSET_RL
                0667       obcsSstartTime     = UNSET_RL
                0668       obcsEstartTime     = UNSET_RL
                0669       obcsWstartTime     = UNSET_RL
                0670       siobNstartTime     = UNSET_RL
                0671       siobSstartTime     = UNSET_RL
                0672       siobEstartTime     = UNSET_RL
                0673       siobWstartTime     = UNSET_RL
7f861c1808 Patr*0674 
492dec36bd Jean*0675 C     Initialise file type and field precision
8f134a052a Patr*0676       exf_iprec            = 32
4d9bc2cf3a Mart*0677       exf_iprec_obcs       = UNSET_I
8f134a052a Patr*0678       exf_yftype           = 'RL'
                0679       useExfYearlyFields   = .FALSE.
fa1f17bdcf Dimi*0680       twoDigitYear         = .FALSE.
7f861c1808 Patr*0681 
492dec36bd Jean*0682 C     Input scaling factors.
bdec91d862 Patr*0683       exf_inscal_hflux     =  1. _d 0
                0684       exf_inscal_sflux     =  1. _d 0
                0685       exf_inscal_ustress   =  1. _d 0
                0686       exf_inscal_vstress   =  1. _d 0
                0687       exf_inscal_uwind     =  1. _d 0
                0688       exf_inscal_vwind     =  1. _d 0
3752238fd8 Patr*0689       exf_inscal_wspeed    =  1. _d 0
bdec91d862 Patr*0690       exf_inscal_swflux    =  1. _d 0
                0691       exf_inscal_lwflux    =  1. _d 0
                0692       exf_inscal_precip    =  1. _d 0
c3c3169472 Jean*0693       exf_inscal_snowprecip=  1. _d 0
497d85062c Jean*0694 c     exf_inscal_sst       =  1. _d 0
                0695 c     exf_inscal_sss       =  1. _d 0
bdec91d862 Patr*0696       exf_inscal_atemp     =  1. _d 0
7e230c5c02 Dimi*0697       exf_offset_atemp     =  0. _d 0
bdec91d862 Patr*0698       exf_inscal_aqh       =  1. _d 0
c994dbe735 Jean*0699       exf_inscal_hs        =  1. _d 0
                0700       exf_inscal_hl        =  1. _d 0
bdec91d862 Patr*0701       exf_inscal_evap      =  1. _d 0
6060ec2938 Dimi*0702       exf_inscal_apressure =  1. _d 0
cea01ffd1b Patr*0703       exf_inscal_runoff    =  1. _d 0
e603dbf008 Dimi*0704       exf_inscal_runoftemp =  1. _d 0
a66aad0124 Gael*0705       exf_inscal_saltflx   =  1. _d 0
bdec91d862 Patr*0706       exf_inscal_swdown    =  1. _d 0
                0707       exf_inscal_lwdown    =  1. _d 0
ad5cdab327 Patr*0708       exf_inscal_climsst   =  1. _d 0
                0709       exf_inscal_climsss   =  1. _d 0
de9be302a8 Patr*0710       exf_inscal_climustr  =  1. _d 0
                0711       exf_inscal_climvstr  =  1. _d 0
497d85062c Jean*0712       exf_inscal_tidePot   =  1. _d 0
d877a5eaeb Patr*0713       exf_inscal_areamask  =  1. _d 0
6060ec2938 Dimi*0714 
492dec36bd Jean*0715 C     Output scaling factors.
bdec91d862 Patr*0716       exf_outscal_hflux    =  1. _d 0
                0717       exf_outscal_sflux    =  1. _d 0
                0718       exf_outscal_ustress  =  1. _d 0
                0719       exf_outscal_vstress  =  1. _d 0
                0720       exf_outscal_swflux   =  1. _d 0
6060ec2938 Dimi*0721       exf_outscal_sst      =  1. _d 0
                0722       exf_outscal_sss      =  1. _d 0
                0723       exf_outscal_apressure=  1. _d 0
497d85062c Jean*0724       exf_outscal_tidePot  =  1. _d 0
d877a5eaeb Patr*0725       exf_outscal_areamask =  1. _d 0
a8fd6c497b Patr*0726 
3bc048fd43 Dimi*0727 #ifdef USE_EXF_INTERPOLATION
c747f147c2 Jean*0728       ustress_lon0   = inp_lon0
                0729       uwind_lon0     = inp_lon0
                0730       vstress_lon0   = inp_lon0
                0731       hflux_lon0     = inp_lon0
                0732       sflux_lon0     = inp_lon0
                0733       swflux_lon0    = inp_lon0
                0734       runoff_lon0    = inp_lon0
a66aad0124 Gael*0735       saltflx_lon0   = inp_lon0
c747f147c2 Jean*0736       atemp_lon0     = inp_lon0
                0737       aqh_lon0       = inp_lon0
c994dbe735 Jean*0738       hs_lon0        = inp_lon0
                0739       hl_lon0        = inp_lon0
c747f147c2 Jean*0740       evap_lon0      = inp_lon0
                0741       precip_lon0    = inp_lon0
                0742       snowprecip_lon0= inp_lon0
                0743       vwind_lon0     = inp_lon0
                0744       wspeed_lon0    = inp_lon0
                0745       lwflux_lon0    = inp_lon0
                0746       swdown_lon0    = inp_lon0
                0747       lwdown_lon0    = inp_lon0
                0748       apressure_lon0 = inp_lon0
497d85062c Jean*0749       tidePot_lon0   = inp_lon0
c747f147c2 Jean*0750       areamask_lon0  = inp_lon0
                0751       vstress_lat0   = inp_lat0
                0752       vwind_lat0     = inp_lat0
                0753       wspeed_lat0    = inp_lat0
                0754       ustress_lat0   = inp_lat0
                0755       hflux_lat0     = inp_lat0
                0756       sflux_lat0     = inp_lat0
                0757       runoff_lat0    = inp_lat0
a66aad0124 Gael*0758       saltflx_lat0   = inp_lat0
c747f147c2 Jean*0759       swflux_lat0    = inp_lat0
                0760       atemp_lat0     = inp_lat0
                0761       aqh_lat0       = inp_lat0
c994dbe735 Jean*0762       hs_lat0        = inp_lat0
                0763       hl_lat0        = inp_lat0
c747f147c2 Jean*0764       evap_lat0      = inp_lat0
                0765       precip_lat0    = inp_lat0
                0766       snowprecip_lat0= inp_lat0
                0767       uwind_lat0     = inp_lat0
                0768       lwflux_lat0    = inp_lat0
                0769       swdown_lat0    = inp_lat0
                0770       lwdown_lat0    = inp_lat0
                0771       apressure_lat0 = inp_lat0
497d85062c Jean*0772       tidePot_lat0   = inp_lat0
c747f147c2 Jean*0773       areamask_lat0  = inp_lat0
056678d46d Jean*0774       ustress_nlon   = inp_gNx
                0775       ustress_nlat   = inp_gNy
                0776       vstress_nlon   = inp_gNx
                0777       vstress_nlat   = inp_gNy
                0778       hflux_nlon     = inp_gNx
                0779       hflux_nlat     = inp_gNy
                0780       sflux_nlon     = inp_gNx
                0781       sflux_nlat     = inp_gNy
                0782       swflux_nlon    = inp_gNx
                0783       swflux_nlat    = inp_gNy
                0784       runoff_nlon    = inp_gNx
                0785       runoff_nlat    = inp_gNy
                0786       saltflx_nlon   = inp_gNx
                0787       saltflx_nlat   = inp_gNy
                0788       atemp_nlon     = inp_gNx
                0789       atemp_nlat     = inp_gNy
                0790       aqh_nlon       = inp_gNx
                0791       aqh_nlat       = inp_gNy
                0792       hs_nlon        = inp_gNx
                0793       hs_nlat        = inp_gNy
                0794       hl_nlon        = inp_gNx
                0795       hl_nlat        = inp_gNy
                0796       evap_nlon      = inp_gNx
                0797       evap_nlat      = inp_gNy
                0798       precip_nlon    = inp_gNx
                0799       precip_nlat    = inp_gNy
                0800       snowprecip_nlon= inp_gNx
                0801       snowprecip_nlat= inp_gNy
                0802       uwind_nlon     = inp_gNx
                0803       uwind_nlat     = inp_gNy
                0804       vwind_nlon     = inp_gNx
                0805       vwind_nlat     = inp_gNy
                0806       wspeed_nlon    = inp_gNx
                0807       wspeed_nlat    = inp_gNy
                0808       lwflux_nlon    = inp_gNx
                0809       lwflux_nlat    = inp_gNy
                0810       swdown_nlon    = inp_gNx
                0811       swdown_nlat    = inp_gNy
                0812       lwdown_nlon    = inp_gNx
                0813       lwdown_nlat    = inp_gNy
                0814       apressure_nlon = inp_gNx
                0815       apressure_nlat = inp_gNy
                0816       tidePot_nlon   = inp_gNx
                0817       tidePot_nlat   = inp_gNy
                0818       areamask_nlon  = inp_gNx
                0819       areamask_nlat  = inp_gNy
c747f147c2 Jean*0820       ustress_lon_inc   = inp_dLon
                0821       vstress_lon_inc   = inp_dLon
                0822       hflux_lon_inc     = inp_dLon
                0823       sflux_lon_inc     = inp_dLon
                0824       swflux_lon_inc    = inp_dLon
                0825       runoff_lon_inc    = inp_dLon
a66aad0124 Gael*0826       saltflx_lon_inc   = inp_dLon
c747f147c2 Jean*0827       atemp_lon_inc     = inp_dLon
                0828       aqh_lon_inc       = inp_dLon
c994dbe735 Jean*0829       hs_lon_inc        = inp_dLon
                0830       hl_lon_inc        = inp_dLon
c747f147c2 Jean*0831       evap_lon_inc      = inp_dLon
                0832       precip_lon_inc    = inp_dLon
                0833       snowprecip_lon_inc= inp_dLon
                0834       uwind_lon_inc     = inp_dLon
                0835       vwind_lon_inc     = inp_dLon
                0836       wspeed_lon_inc    = inp_dLon
                0837       lwflux_lon_inc    = inp_dLon
                0838       swdown_lon_inc    = inp_dLon
                0839       lwdown_lon_inc    = inp_dLon
                0840       apressure_lon_inc = inp_dLon
497d85062c Jean*0841       tidePot_lon_inc   = inp_dLon
c747f147c2 Jean*0842       areamask_lon_inc  = inp_dLon
                0843 
                0844       climsst_lon0    = inp_lon0
                0845       climsss_lon0    = inp_lon0
                0846       climustr_lon0   = inp_lon0
                0847       climvstr_lon0   = inp_lon0
                0848       climsst_lat0    = inp_lat0
                0849       climsss_lat0    = inp_lat0
                0850       climustr_lat0   = inp_lat0
                0851       climvstr_lat0   = inp_lat0
056678d46d Jean*0852       climsst_nlon    = inp_gNx
                0853       climsst_nlat    = inp_gNy
                0854       climsss_nlon    = inp_gNx
                0855       climsss_nlat    = inp_gNy
                0856       climustr_nlon   = inp_gNx
                0857       climustr_nlat   = inp_gNy
                0858       climvstr_nlon   = inp_gNx
                0859       climvstr_nlat   = inp_gNy
c747f147c2 Jean*0860       climsst_lon_inc = inp_dLon
                0861       climsss_lon_inc = inp_dLon
                0862       climustr_lon_inc= inp_dLon
                0863       climvstr_lon_inc= inp_dLon
                0864 
                0865       DO j=1,MAX_LAT_INC
056678d46d Jean*0866         ustress_lat_inc(j)   = inp_dLat(j)
                0867         vstress_lat_inc(j)   = inp_dLat(j)
                0868         hflux_lat_inc(j)     = inp_dLat(j)
                0869         sflux_lat_inc(j)     = inp_dLat(j)
                0870         swflux_lat_inc(j)    = inp_dLat(j)
                0871         runoff_lat_inc(j)    = inp_dLat(j)
                0872         saltflx_lat_inc(j)   = inp_dLat(j)
                0873         atemp_lat_inc(j)     = inp_dLat(j)
                0874         aqh_lat_inc(j)       = inp_dLat(j)
                0875         hs_lat_inc(j)        = inp_dLat(j)
                0876         hl_lat_inc(j)        = inp_dLat(j)
                0877         evap_lat_inc(j)      = inp_dLat(j)
                0878         precip_lat_inc(j)    = inp_dLat(j)
                0879         snowprecip_lat_inc(j)= inp_dLat(j)
                0880         uwind_lat_inc(j)     = inp_dLat(j)
                0881         vwind_lat_inc(j)     = inp_dLat(j)
                0882         wspeed_lat_inc(j)    = inp_dLat(j)
                0883         lwflux_lat_inc(j)    = inp_dLat(j)
                0884         swdown_lat_inc(j)    = inp_dLat(j)
                0885         lwdown_lat_inc(j)    = inp_dLat(j)
                0886         apressure_lat_inc(j) = inp_dLat(j)
                0887         tidePot_lat_inc(j)   = inp_dLat(j)
                0888         areamask_lat_inc(j)  = inp_dLat(j)
                0889         climsst_lat_inc(j)   = inp_dLat(j)
                0890         climsss_lat_inc(j)   = inp_dLat(j)
                0891         climustr_lat_inc(j)  = inp_dLat(j)
                0892         climvstr_lat_inc(j)  = inp_dLat(j)
3bc048fd43 Dimi*0893       ENDDO
4aa4270510 Jean*0894 
                0895       ustress_interpMethod   = 12
                0896       vstress_interpMethod   = 22
                0897       hflux_interpMethod     =  1
                0898       sflux_interpMethod     =  1
                0899       swflux_interpMethod    =  1
                0900       runoff_interpMethod    =  1
a66aad0124 Gael*0901       saltflx_interpMethod   =  1
4aa4270510 Jean*0902       atemp_interpMethod     =  1
                0903       aqh_interpMethod       =  1
c994dbe735 Jean*0904       hs_interpMethod        =  1
                0905       hl_interpMethod        =  1
4aa4270510 Jean*0906       evap_interpMethod      =  1
                0907       precip_interpMethod    =  1
                0908       snowprecip_interpMethod=  1
                0909       uwind_interpMethod     = 12
                0910       vwind_interpMethod     = 22
                0911       wspeed_interpMethod    =  1
                0912       lwflux_interpMethod    =  1
                0913       swdown_interpMethod    =  1
                0914       lwdown_interpMethod    =  1
                0915       apressure_interpMethod =  1
497d85062c Jean*0916       tidePot_interpMethod   =  1
4aa4270510 Jean*0917       areamask_interpMethod  =  1
                0918       climsst_interpMethod   =  2
                0919       climsss_interpMethod   =  2
                0920       climustr_interpMethod  = 12
                0921       climvstr_interpMethod  = 22
                0922 
f593ce37b5 Jean*0923       exf_output_interp = .FALSE.
3bc048fd43 Dimi*0924 #endif /* USE_EXF_INTERPOLATION */
                0925 
d078fa0cf5 Jean*0926 C--   Next, read pkg/exf parameter file.
ad5cdab327 Patr*0927       WRITE(msgBuf,'(A)') 'EXF_READPARMS: opening data.exf'
                0928       CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
54454651d3 Jean*0929      &                    SQUEEZE_RIGHT, myThid )
9aaf43452b Patr*0930 
ad5cdab327 Patr*0931       CALL OPEN_COPY_DATA_FILE(
9aaf43452b Patr*0932      I                          'data.exf', 'EXF_READPARMS',
                0933      O                          iUnit,
                0934      I                          myThid )
                0935 
fdb16198f0 Jean*0936       WRITE(msgBuf,'(A)')
ad5cdab327 Patr*0937      &     'EXF_READPARMS: reading EXF_NML_01'
                0938       CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
54454651d3 Jean*0939      &                    SQUEEZE_RIGHT, myThid )
ad5cdab327 Patr*0940       READ(  iUnit, nml = EXF_NML_01 )
d078fa0cf5 Jean*0941 C-    Set default fldRepeatCycle to repeatPeriod
                0942       hfluxRepCycle      = repeatPeriod
                0943       atempRepCycle      = repeatPeriod
                0944       aqhRepCycle        = repeatPeriod
                0945       hs_RepCycle        = repeatPeriod
                0946       hl_RepCycle        = repeatPeriod
                0947       evapRepCycle       = repeatPeriod
                0948       precipRepCycle     = repeatPeriod
                0949       snowprecipRepCycle = repeatPeriod
                0950       sfluxRepCycle      = repeatPeriod
                0951       runoffRepCycle     = repeatPeriod
                0952       saltflxRepCycle    = repeatPeriod
                0953       ustressRepCycle    = repeatPeriod
                0954       vstressRepCycle    = repeatPeriod
                0955       uwindRepCycle      = repeatPeriod
                0956       vwindRepCycle      = repeatPeriod
                0957       wspeedRepCycle     = repeatPeriod
                0958       swfluxRepCycle     = repeatPeriod
                0959       lwfluxRepCycle     = repeatPeriod
                0960       swdownRepCycle     = repeatPeriod
                0961       lwdownRepCycle     = repeatPeriod
                0962       apressureRepCycle  = repeatPeriod
497d85062c Jean*0963       tidePotRepCycle    = repeatPeriod
d078fa0cf5 Jean*0964       areamaskRepCycle   = repeatPeriod
                0965       climsstRepCycle    = repeatPeriod
                0966       climsssRepCycle    = repeatPeriod
                0967       climustrRepCycle   = repeatPeriod
                0968       climvstrRepCycle   = repeatPeriod
                0969 C-
                0970       obcsNrepCycle      = repeatPeriod
                0971       obcsSrepCycle      = repeatPeriod
                0972       obcsErepCycle      = repeatPeriod
                0973       obcsWrepCycle      = repeatPeriod
                0974       siobNrepCycle      = UNSET_RL
                0975       siobSrepCycle      = UNSET_RL
                0976       siobErepCycle      = UNSET_RL
                0977       siobWrepCycle      = UNSET_RL
                0978 
fdb16198f0 Jean*0979       WRITE(msgBuf,'(A)')
ad5cdab327 Patr*0980      &     'EXF_READPARMS: reading EXF_NML_02'
                0981       CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
54454651d3 Jean*0982      &                    SQUEEZE_RIGHT, myThid )
ad5cdab327 Patr*0983       READ(  iUnit, nml = EXF_NML_02 )
fdb16198f0 Jean*0984       WRITE(msgBuf,'(A)')
ad5cdab327 Patr*0985      &     'EXF_READPARMS: reading EXF_NML_03'
                0986       CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
54454651d3 Jean*0987      &                    SQUEEZE_RIGHT, myThid )
ad5cdab327 Patr*0988       READ(  iUnit, nml = EXF_NML_03 )
f468b54d47 Mart*0989 #ifdef USE_EXF_INTERPOLATION
fdb16198f0 Jean*0990       WRITE(msgBuf,'(A)')
ad5cdab327 Patr*0991      &     'EXF_READPARMS: reading EXF_NML_04'
                0992       CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
54454651d3 Jean*0993      &                    SQUEEZE_RIGHT, myThid )
ad5cdab327 Patr*0994       READ(  iUnit, nml = EXF_NML_04 )
f468b54d47 Mart*0995 #endif /* USE_EXF_INTERPOLATION */
84f47ae434 Dimi*0996 
ad5cdab327 Patr*0997 #ifdef ALLOW_OBCS
f468b54d47 Mart*0998       IF ( useOBCS ) THEN
                0999        WRITE(msgBuf,'(A)')
                1000      &      'EXF_READPARMS: reading EXF_NML_OBCS'
                1001        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
54454651d3 Jean*1002      &                     SQUEEZE_RIGHT, myThid )
f468b54d47 Mart*1003        READ(  iUnit, nml = EXF_NML_OBCS )
fc584abced Jean*1004       ENDIF
f468b54d47 Mart*1005        IF(siobNstartdate1.EQ.UNSET_I ) siobNstartdate1=obcsNstartdate1
                1006        IF(siobNstartdate2.EQ.UNSET_I ) siobNstartdate2=obcsNstartdate2
                1007        IF(siobNperiod    .EQ.UNSET_RL) siobNperiod    =obcsNperiod
d078fa0cf5 Jean*1008        IF(siobNrepCycle  .EQ.UNSET_RL) siobNrepCycle  =obcsNrepCycle
f468b54d47 Mart*1009        IF(siobSstartdate1.EQ.UNSET_I ) siobSstartdate1=obcsSstartdate1
                1010        IF(siobSstartdate2.EQ.UNSET_I ) siobSstartdate2=obcsSstartdate2
                1011        IF(siobSperiod    .EQ.UNSET_RL) siobSperiod    =obcsSperiod
d078fa0cf5 Jean*1012        IF(siobSrepCycle  .EQ.UNSET_RL) siobSrepCycle  =obcsSrepCycle
f468b54d47 Mart*1013        IF(siobEstartdate1.EQ.UNSET_I ) siobEstartdate1=obcsEstartdate1
                1014        IF(siobEstartdate2.EQ.UNSET_I ) siobEstartdate2=obcsEstartdate2
                1015        IF(siobEperiod    .EQ.UNSET_RL) siobEperiod    =obcsEperiod
d078fa0cf5 Jean*1016        IF(siobErepCycle  .EQ.UNSET_RL) siobErepCycle  =obcsErepCycle
f468b54d47 Mart*1017        IF(siobWstartdate1.EQ.UNSET_I ) siobWstartdate1=obcsWstartdate1
                1018        IF(siobWstartdate2.EQ.UNSET_I ) siobWstartdate2=obcsWstartdate2
                1019        IF(siobWperiod    .EQ.UNSET_RL) siobWperiod    =obcsWperiod
d078fa0cf5 Jean*1020        IF(siobWrepCycle  .EQ.UNSET_RL) siobWrepCycle  =obcsWrepCycle
f468b54d47 Mart*1021 
                1022        IF(exf_iprec_obcs .EQ. UNSET_I) exf_iprec_obcs =exf_iprec
84f47ae434 Dimi*1023 #endif /* ALLOW_OBCS */
9aaf43452b Patr*1024 
fdb16198f0 Jean*1025       WRITE(msgBuf,'(A)')
9aaf43452b Patr*1026      &     'EXF_READPARMS: finished reading data.exf'
                1027       CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
54454651d3 Jean*1028      &                    SQUEEZE_RIGHT, myThid )
9aaf43452b Patr*1029 
7a77863887 Mart*1030 #ifdef SINGLE_DISK_IO
                1031       CLOSE(iUnit)
                1032 #else
                1033       CLOSE(iUnit,STATUS='DELETE')
                1034 #endif /* SINGLE_DISK_IO */
7f861c1808 Patr*1035 
ae1d4f326f Jean*1036 C--   Retired parameters
                1037       IF ( exf_yftype.NE.'RL' ) THEN
                1038        STOP 'S/R EXF_READPARAMS: value of exf_yftype not allowed'
                1039       ENDIF
                1040 
c3c3169472 Jean*1041 C--   Derive other parameters:
9f46642c85 Jean*1042       IF ( exf_verbose ) exf_debugLev = MAX( exf_debugLev, debLevD )
1ccd5d14b8 Jean*1043       IF ( .NOT.(useThSIce.OR.useSEAICE) ) diags_opOceWeighted=.FALSE.
20cf30c902 Patr*1044       hq = ht
c3c3169472 Jean*1045       stressIsOnCgrid = readStressOnCgrid
358649780a Gael*1046 #if ( defined (ALLOW_BULKFORMULAE) )
                1047       IF ( useAtmWind ) stressIsOnCgrid = .FALSE.
7f861c1808 Patr*1048 #endif
4aa4270510 Jean*1049 #ifdef USE_EXF_INTERPOLATION
                1050       IF ( (ustress_interpMethod.GE.1 .AND. ustressfile.NE.' ') .OR.
                1051      &     (vstress_interpMethod.GE.1 .AND. vstressfile.NE.' ') )
                1052      &   stressIsOnCgrid = .FALSE.
                1053 #endif /* USE_EXF_INTERPOLATION */
7f861c1808 Patr*1054 
d7e09becc2 Jean*1055       useExfZenAlbedo = select_ZenAlbedo.GE.1
                1056      &            .AND. select_ZenAlbedo.LE.3
f71b2ceff6 Gael*1057 
492dec36bd Jean*1058 C--   Overwrite tauThetaClimRelax but stop if already set.
                1059 C- Note: need this, even if EXF option ALLOW_CLIMSST_RELAXATION is undef;
                1060 C        this prevents to apply relaxation towards potentially wrong SST since,
                1061 C        with EXF, we skip the update of loaded SST in EXTERNAL_FIELDS_LOAD.
0318b69cae Jean*1062 C- Note2: let s see whether we can put this back under ifdef
1a95fc43cd Oliv*1063 C        ALLOW_CLIMSST_RELAXATION, but always call EXTERNAL_FIELDS_LOAD.
                1064 C        If ALLOW_CLIMSST_RELAXATION is undef, clim.relaxation could still
                1065 C        be done outside of exf.
                1066 #ifdef ALLOW_CLIMSST_RELAXATION
492dec36bd Jean*1067       IF ( tauThetaClimRelax.NE.0. _d 0 ) THEN
                1068         WRITE(msgBuf,'(2A)') 'EXF_READPARMS: ',
                1069      &   'with EXF, cannot use "tauThetaClimRelax" in "data"'
                1070         CALL PRINT_ERROR( msgBuf, myThid )
                1071         WRITE(msgBuf,'(2A)') 'since SST relax. is handled by EXF',
                1072      &   ' (data.exf, "climsstTauRelax")'
                1073         CALL PRINT_ERROR( msgBuf, myThid )
                1074         STOP 'ABNORMAL END: S/R EXF_READPARMS'
91be3bf9a5 Jean*1075       ENDIF
492dec36bd Jean*1076       tauThetaClimRelax = climsstTauRelax
1a95fc43cd Oliv*1077 #endif
492dec36bd Jean*1078 
1a95fc43cd Oliv*1079 #ifdef ALLOW_CLIMSSS_RELAXATION
492dec36bd Jean*1080 C--   Overwrite tauSaltClimRelax but stop if already set.
                1081       IF ( tauSaltClimRelax.NE.0. _d 0 ) THEN
                1082         WRITE(msgBuf,'(2A)') 'EXF_READPARMS: ',
                1083      &   'with EXF, cannot use "tauSaltClimRelax" in "data"'
                1084         CALL PRINT_ERROR( msgBuf, myThid )
                1085         WRITE(msgBuf,'(2A)') 'since SSS relax. is handled by EXF',
                1086      &   ' (data.exf, "climsssTauRelax")'
                1087         CALL PRINT_ERROR( msgBuf, myThid )
                1088         STOP 'ABNORMAL END: S/R EXF_READPARMS'
ae1d4f326f Jean*1089       ENDIF
492dec36bd Jean*1090       tauSaltClimRelax = climsssTauRelax
1a95fc43cd Oliv*1091 #endif
7b50f71112 Gael*1092 
492dec36bd Jean*1093 C     Complete the start date specifications for the forcing
                1094 C     fields to get a complete calendar date array.
c3c3169472 Jean*1095 C     => moved to EXF_INIT_FIXED
ad5cdab327 Patr*1096 
492dec36bd Jean*1097       _END_MASTER( myThid )
7f861c1808 Patr*1098       _BARRIER
                1099 
d7b4f7c409 Jean*1100       RETURN
                1101       END