c $Header: /home/ubuntu/mnt/e9_copy/MITgcm/pkg/exf/Attic/exf_clim_readparms.F,v 1.5 2003/10/20 06:25:16 dimitri Exp $ #include "EXF_OPTIONS.h" subroutine exf_clim_readparms( I mythid & ) c ================================================================== c SUBROUTINE exf_clim_readparms c ================================================================== c c o This routine initialises the climatologic forcing c c started: Ralf.Giering@FastOpt.de 25-Mai-20000 c c ================================================================== c SUBROUTINE exf_clim_readparms c ================================================================== implicit none c == global variables == #include "EEPARAMS.h" #include "SIZE.h" #include "cal.h" #include "exf.h" #include "exf_param.h" #include "exf_clim_param.h" c == routine arguments == integer mythid c == local variables == integer i integer date_array(4), difftime(4) c == end of interface == c Surface flux data. namelist /exf_clim_nml/ & climtempstartdate1, climtempstartdate2, climtempperiod, & climsaltstartdate1, climsaltstartdate2, climsaltperiod, & climsststartdate1, climsststartdate2, climsstperiod, & climsssstartdate1, climsssstartdate2, climsssperiod, & climtempfile, climsaltfile, climsstfile, & climsssfile, climsstconst, climsssconst, & exf_clim_iprec, exf_clim_yftype #ifdef USE_EXF_INTERPOLATION & ,climsst_lon0, climsst_lon_inc, & climsst_lat0, climsst_lat_inc, & climsst_nlon, climsst_nlat, & climsss_lon0, climsss_lon_inc, & climsss_lat0, climsss_lat_inc, & climsss_nlon, climsss_nlat #endif _BEGIN_MASTER(mythid) c Set default values. c Calendar data. climtempstartdate1 = 0 climtempstartdate2 = 0 climtempperiod = 0 climsaltstartdate1 = 0 climsaltstartdate2 = 0 climsaltperiod = 0 climsststartdate1 = 0 climsststartdate2 = 0 climsstperiod = 0 climsssstartdate1 = 0 climsssstartdate2 = 0 climsssperiod = 0 c Data files. climtempfile = ' ' climsaltfile = ' ' climsstfile = ' ' climsssfile = ' ' c Start dates. climtempstartdate = 0 climsaltstartdate = 0 climsststartdate = 0 climsssstartdate = 0 c Initialise constant values for relax. to constant SST, SSS climsstconst = 0. _d 0 climsssconst = 0. _d 0 c Initialise file type and field precision exf_clim_iprec = 32 exf_clim_yftype = 'RL' c Check for the availability of the right calendar version. if ( calendarversion .ne. usescalendarversion ) then print*,' exf_Init: You are not using the appropriate' print*,' version of the calendar package.' print* print*,' Please use Calendar version: ', & usescalendarversion stop ' stopped in exf_Init.' endif c Next, read the forcing data file. call nml_filter( 'data.exf_clim', scrunit1, myThid ) if (scrunit1 .eq. 0) then stop 'exf_clim_readparms: reading namelist failed' end if read( scrunit1, nml = exf_clim_nml ) close( scrunit1 ) c Complete the start date specifications for the forcing c fields to get a complete calendar date array. c check for consistency if (.NOT. (exf_clim_iprec .EQ. 32 & .OR. exf_clim_iprec .EQ. 64)) then stop 'stopped in exf_clim_readparms: value of iprec not allowed' else if & (.NOT. (exf_clim_yftype .EQ. 'RS' & .OR. exf_clim_yftype .EQ. 'RL')) & then stop 'stopped in exf_clim_readparms: value of yftype not allowed' end if #ifdef ALLOW_CLIMTEMP_RELAXATION call cal_FullDate( climtempstartdate1, climtempstartdate2, & date_array, mythid ) call cal_TimePassed(modelstartdate,date_array,difftime,mythid) call cal_ToSeconds (difftime, climtempstartdate ,mythid) climtempstartdate=modelstart+climtempstartdate #endif #ifdef ALLOW_CLIMSALT_RELAXATION call cal_FullDate( climsaltstartdate1, climsaltstartdate2, & date_array, mythid ) call cal_TimePassed(modelstartdate,date_array,difftime,mythid) call cal_ToSeconds (difftime, climsaltstartdate ,mythid) climsaltstartdate=modelstart+climsaltstartdate #endif #ifdef ALLOW_CLIMSST_RELAXATION call cal_FullDate( climsststartdate1, climsststartdate2, & date_array, mythid ) call cal_TimePassed(modelstartdate,date_array,difftime,mythid) call cal_ToSeconds (difftime, climsststartdate ,mythid) climsststartdate=modelstart+climsststartdate #endif #ifdef ALLOW_CLIMSSS_RELAXATION call cal_FullDate( climsssstartdate1, climsssstartdate2, & date_array, mythid ) call cal_TimePassed(modelstartdate,date_array,difftime,mythid) call cal_ToSeconds (difftime, climsssstartdate ,mythid) climsssstartdate=modelstart+climsssstartdate #endif _END_MASTER( mythid ) _BARRIER end