c $Header: /home/ubuntu/mnt/e9_copy/MITgcm/pkg/exf/exf_getffields.F,v 1.2.6.12 2003/06/19 15:31:51 heimbach Exp $ #include "EXF_CPPOPTIONS.h" subroutine exf_getffields( mycurrenttime, mycurrentiter, mythid ) c ================================================================== c SUBROUTINE exf_getffields c ================================================================== c c o Read-in atmospheric state and/or surface fluxes from files. c c heimbach@mit.edu, 23-May-2003 totally re-structured c c ================================================================== c SUBROUTINE exf_getffields c ================================================================== implicit none c == global variables == #include "EEPARAMS.h" #include "SIZE.h" #include "PARAMS.h" #include "DYNVARS.h" #include "GRID.h" #include "exf_param.h" #include "exf_fields.h" #include "exf_constants.h" #if (defined (ALLOW_ADJOINT_RUN) || \ defined (ALLOW_TANGENTLINEAR_RUN) || \ defined (ALLOW_ECCO_OPTIMIZATION)) # include "ctrl.h" # include "ctrl_dummy.h" #endif c == routine arguments == integer mythid integer mycurrentiter _RL mycurrenttime c == local variables == c == end of interface == c-- read forcing fields from files and temporal interpolation #ifdef ALLOW_ATM_WIND c Zonal wind. call exf_set_gen( & uwindfile, uwindstartdate, uwindperiod, & exf_inscal_uwind, & uwind, uwind0, uwind1, uwindmask, & mycurrenttime, mycurrentiter, mythid ) c Meridional wind. call exf_set_gen( & vwindfile, vwindstartdate, vwindperiod, & exf_inscal_vwind, & vwind, vwind0, vwind1, vwindmask, & mycurrenttime, mycurrentiter, mythid ) #ifdef ALLOW_UWIND_CONTROL call ctrl_get_gen ( & xx_uwind_file, xx_uwindstartdate, xx_uwindperiod, & maskw, uwind, xx_uwind0, xx_uwind1, xx_uwind_dummy, & mycurrenttime, mycurrentiter, mythid ) #endif #ifdef ALLOW_VWIND_CONTROL call ctrl_get_gen ( & xx_vwind_file, xx_vwindstartdate, xx_vwindperiod, & masks, vwind, xx_vwind0, xx_vwind1, xx_vwind_dummy, & mycurrenttime, mycurrentiter, mythid ) #endif #else /* ifndef ALLOW_ATM_WIND */ c Zonal wind stress. call exf_set_gen( & ustressfile, ustressstartdate, ustressperiod, & exf_inscal_ustress, & ustress, ustress0, ustress1, ustressmask, & mycurrenttime, mycurrentiter, mythid ) c Meridional wind stress. call exf_set_gen( & vstressfile, vstressstartdate, vstressperiod, & exf_inscal_vstress, & vstress, vstress0, vstress1, vstressmask, & mycurrenttime, mycurrentiter, mythid ) #endif /* ifndef ALLOW_ATM_WIND */ #ifdef ALLOW_ATM_TEMP c Atmospheric temperature. call exf_set_gen( & atempfile, atempstartdate, atempperiod, & exf_inscal_atemp, & atemp, atemp0, atemp1, atempmask, & mycurrenttime, mycurrentiter, mythid ) c Atmospheric humidity. call exf_set_gen( & aqhfile, aqhstartdate, aqhperiod, & exf_inscal_aqh, & aqh, aqh0, aqh1, aqhmask, & mycurrenttime, mycurrentiter, mythid ) c Net long wave radiative flux. call exf_set_gen( & lwfluxfile, lwfluxstartdate, lwfluxperiod, & exf_inscal_lwflux, & lwflux, lwflux0, lwflux1, lwfluxmask, & mycurrenttime, mycurrentiter, mythid ) c Precipitation. call exf_set_gen( & precipfile, precipstartdate, precipperiod, & exf_inscal_precip, & precip, precip0, precip1, precipmask, & mycurrenttime, mycurrentiter, mythid ) #ifdef ALLOW_ATEMP_CONTROL call ctrl_get_gen ( & xx_atemp_file, xx_atempstartdate, xx_atempperiod, & maskc, atemp, xx_atemp0, xx_atemp1, xx_atemp_dummy, & mycurrenttime, mycurrentiter, mythid ) #endif #ifdef ALLOW_AQH_CONTROL call ctrl_get_gen ( & xx_aqh_file, xx_aqhstartdate, xx_aqhperiod, & maskc, aqh, xx_aqh0, xx_aqh1, xx_aqh_dummy, & mycurrenttime, mycurrentiter, mythid ) #endif #else /* ifndef ALLOW_ATM_TEMP */ c Atmospheric heat flux. call exf_set_gen ( & hfluxfile, hfluxstartdate, hfluxperiod, exf_inscal_hflux, & hflux, hflux0, hflux1, hfluxmask, & mycurrenttime, mycurrentiter, mythid ) c Salt flux. call exf_set_gen ( & sfluxfile, sfluxstartdate, sfluxperiod, exf_inscal_sflux, & sflux, sflux0, sflux1, sfluxmask, & mycurrenttime, mycurrentiter, mythid ) #endif /* ifndef ALLOW_ATM_TEMP */ #if defined(ALLOW_ATM_TEMP) || defined(SHORTWAVE_HEATING) c Net short wave radiative flux. call exf_set_gen ( & swfluxfile, swfluxstartdate, swfluxperiod, exf_inscal_swflux, & swflux, swflux0, swflux1, swfluxmask, & mycurrenttime, mycurrentiter, mythid ) #endif #ifdef EXF_READ_EVAP c Evaporation call exf_set_gen ( & evapfile, evapstartdate, evapperiod, exf_inscal_evap, & evap, evap0, evap1, evapmask, & mycurrenttime, mycurrentiter, mythid ) #endif #ifdef ALLOW_DOWNWARD_RADIATION c Downward shortwave radiation. call exf_set_gen ( & swdownfile, swdownstartdate, swdownperiod, exf_inscal_swdown, & swdown, swdown0, swdown1, swdownmask, & mycurrenttime, mycurrentiter, mythid ) c Downward longwave radiation. call exf_set_gen ( & lwdownfile, lwdownstartdate, lwdownperiod, exf_inscal_lwdown, & lwdown, lwdown0, lwdown1, lwdownmask, & mycurrenttime, mycurrentiter, mythid ) #endif #ifdef ATMOSPHERIC_LOADING c Atmos. pressure forcing call exf_set_gen ( & apressurefile, apressurestartdate, apressureperiod, & exf_inscal_apressure, & apressure, apressure0, apressure1, apressuremask, & mycurrenttime, mycurrentiter, mythid ) #endif end