/[MITgcm]/MITgcm/pkg/exf/exf_readparms.F
ViewVC logotype

Diff of /MITgcm/pkg/exf/exf_readparms.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.30 by heimbach, Thu May 25 18:32:56 2006 UTC revision 1.43 by heimbach, Wed Apr 18 19:55:34 2007 UTC
# Line 50  c     == global variables == Line 50  c     == global variables ==
50  #include "SIZE.h"  #include "SIZE.h"
51  #include "PARAMS.h"  #include "PARAMS.h"
52  #include "cal.h"  #include "cal.h"
53  #include "exf.h"  #include "EXF_PARAM.h"
54  #include "exf_param.h"  #include "EXF_CONSTANTS.h"
 #include "exf_constants.h"  
55    
56  c     == routine arguments ==  c     == routine arguments ==
57    
# Line 60  c     == routine arguments == Line 59  c     == routine arguments ==
59    
60  c     == local variables ==  c     == local variables ==
61    
62        integer i        integer i, idummy
63        integer date_array(4), difftime(4)        integer date_array(4), difftime(4)
64        integer iUnit        integer iUnit
65    
# Line 69  c     == local variables == Line 68  c     == local variables ==
68  c     == end of interface ==  c     == end of interface ==
69    
70  c     Surface flux data.  c     Surface flux data.
71        namelist /exf_nml/        NAMELIST /EXF_NML_01/
72       &      windstressmax,       repeatPeriod,       &      windstressmax,       repeatPeriod,   exf_albedo,  
73       &         exf_albedo,      surfEmittance,       &   ocean_emissivity,     ice_emissivity, snow_emissivity,
74         &   exf_scal_BulkCdn,     climtempfreeze,
75         &          exf_iprec,  exf_yftype,
76         & useExfYearlyFields,  twoDigitYear,         useExfCheckRange
77    
78          NAMELIST /EXF_NML_02/
79         &          hfluxfile,          atempfile,       aqhfile,
80         &          sfluxfile,         precipfile,    runofffile,
81         &        ustressfile,        vstressfile,      evapfile,
82         &     snowprecipfile,          uwindfile,     vwindfile,
83         &         wspeedfile,         swfluxfile,    lwfluxfile,
84         &      apressurefile,         swdownfile,    lwdownfile,
85         &        climsstfile,        climsssfile,      
86       &    hfluxstartdate1,    hfluxstartdate2,   hfluxperiod,       &    hfluxstartdate1,    hfluxstartdate2,   hfluxperiod,
87       &    atempstartdate1,    atempstartdate2,   atempperiod,       &    atempstartdate1,    atempstartdate2,   atempperiod,
88       &      aqhstartdate1,      aqhstartdate2,     aqhperiod,       &      aqhstartdate1,      aqhstartdate2,     aqhperiod,
# Line 89  c     Surface flux data. Line 100  c     Surface flux data.
100       &   lwfluxstartdate1,   lwfluxstartdate2,  lwfluxperiod,       &   lwfluxstartdate1,   lwfluxstartdate2,  lwfluxperiod,
101       &   swdownstartdate1,   swdownstartdate2,  swdownperiod,       &   swdownstartdate1,   swdownstartdate2,  swdownperiod,
102       &   lwdownstartdate1,   lwdownstartdate2,  lwdownperiod,       &   lwdownstartdate1,   lwdownstartdate2,  lwdownperiod,
      &    obcsNstartdate1,    obcsNstartdate2,   obcsNperiod,  
      &    obcsSstartdate1,    obcsSstartdate2,   obcsSperiod,  
      &    obcsEstartdate1,    obcsEstartdate2,   obcsEperiod,  
      &    obcsWstartdate1,    obcsWstartdate2,   obcsWperiod,  
103       &apressurestartdate1,apressurestartdate2,apressureperiod,       &apressurestartdate1,apressurestartdate2,apressureperiod,
104       &          hfluxfile,          atempfile,       aqhfile,       &  climsststartdate1,  climsststartdate2,  climsstperiod,
105       &          sfluxfile,         precipfile,    runofffile,       &  climsssstartdate1,  climsssstartdate2,  climsssperiod
106       &        ustressfile,        vstressfile,      evapfile,  
107       &     snowprecipfile,        NAMELIST /EXF_NML_03/
      &          uwindfile,          vwindfile,    wspeedfile,  
      &         swfluxfile,         lwfluxfile, apressurefile,  
      &         swdownfile,         lwdownfile,  
      &          exf_iprec,  exf_yftype,  
      & useExfYearlyFields,  twoDigitYear,         useExfCheckRange,  
108       &   exf_inscal_hflux,  exf_inscal_sflux,      exf_inscal_evap,       &   exf_inscal_hflux,  exf_inscal_sflux,      exf_inscal_evap,
109       & exf_inscal_ustress,  exf_inscal_vstress,       & exf_inscal_ustress,  exf_inscal_vstress,
110       &   exf_inscal_uwind,  exf_inscal_vwind,    exf_inscal_wspeed,       &   exf_inscal_uwind,  exf_inscal_vwind,    exf_inscal_wspeed,
# Line 111  c     Surface flux data. Line 113  c     Surface flux data.
113       &  exf_inscal_swflux,  exf_inscal_lwflux,   exf_inscal_precip,       &  exf_inscal_swflux,  exf_inscal_lwflux,   exf_inscal_precip,
114       &  exf_inscal_runoff,  exf_inscal_apressure, exf_inscal_snowprecip,       &  exf_inscal_runoff,  exf_inscal_apressure, exf_inscal_snowprecip,
115       &  exf_inscal_swdown,  exf_inscal_lwdown,       &  exf_inscal_swdown,  exf_inscal_lwdown,
116         & exf_inscal_climsst, exf_inscal_climsss,
117       &  exf_outscal_hflux,  exf_outscal_ustress, exf_outscal_vstress,       &  exf_outscal_hflux,  exf_outscal_ustress, exf_outscal_vstress,
118       & exf_outscal_swflux,  exf_outscal_sst,     exf_outscal_sss,       & exf_outscal_swflux,  exf_outscal_sst,     exf_outscal_sss,
119       &  exf_outscal_sflux,  exf_outscal_apressure,       &  exf_outscal_sflux,  exf_outscal_apressure,
120       &         hfluxconst,   atempconst,            aqhconst,       &  hfluxconst, atempconst, aqhconst, sfluxconst, evapconst,
121       &         sfluxconst,    evapconst,       &  precipconst, snowprecipconst, runoffconst, ustressconst,
122       &        precipconst,   snowprecipconst,       &  vstressconst, uwindconst, vwindconst, wspeedconst, swfluxconst,
123       &        runoffconst, ustressconst,        vstressconst,       &  lwfluxconst, swdownconst, lwdownconst, apressureconst,
124       &         uwindconst,   vwindconst,         wspeedconst,       &  climsstconst,   climsssconst,
      &        swfluxconst,  lwfluxconst,  
      &        swdownconst,  lwdownconst,  
      &         apressureconst,  
125       &     hflux_exfremo_intercept, hflux_exfremo_slope,       &     hflux_exfremo_intercept, hflux_exfremo_slope,
126       &     atemp_exfremo_intercept, atemp_exfremo_slope,       &     atemp_exfremo_intercept, atemp_exfremo_slope,
127       &     aqh_exfremo_intercept, aqh_exfremo_slope,       &     aqh_exfremo_intercept, aqh_exfremo_slope,
# Line 139  c     Surface flux data. Line 139  c     Surface flux data.
139       &     lwflux_exfremo_intercept, lwflux_exfremo_slope,       &     lwflux_exfremo_intercept, lwflux_exfremo_slope,
140       &     swdown_exfremo_intercept, swdown_exfremo_slope,       &     swdown_exfremo_intercept, swdown_exfremo_slope,
141       &     lwdown_exfremo_intercept, lwdown_exfremo_slope,       &     lwdown_exfremo_intercept, lwdown_exfremo_slope,
142       &     apressure_exfremo_intercept, apressure_exfremo_slope       &     apressure_exfremo_intercept, apressure_exfremo_slope,
143         &     climsst_exfremo_intercept, climsst_exfremo_slope,
144         &     climsss_exfremo_intercept, climsss_exfremo_slope
145    
146          NAMELIST /EXF_NML_04/
147         & idummy
148  #ifdef USE_EXF_INTERPOLATION  #ifdef USE_EXF_INTERPOLATION
149       & ,ustress_lon0, ustress_lon_inc, ustress_lat0, ustress_lat_inc,       & , ustress_lon0, ustress_lon_inc, ustress_lat0, ustress_lat_inc,
      & ustress_nlon, ustress_nlat,  
150       & vstress_lon0, vstress_lon_inc, vstress_lat0, vstress_lat_inc,       & vstress_lon0, vstress_lon_inc, vstress_lat0, vstress_lat_inc,
151       & vstress_nlon, vstress_nlat,       & ustress_nlon, ustress_nlat, vstress_nlon, vstress_nlat,
152       & hflux_lon0, hflux_lon_inc, hflux_lat0, hflux_lat_inc,       & hflux_lon0, hflux_lon_inc, hflux_lat0, hflux_lat_inc,
      & hflux_nlon, hflux_nlat,  
153       & sflux_lon0, sflux_lon_inc, sflux_lat0, sflux_lat_inc,       & sflux_lon0, sflux_lon_inc, sflux_lat0, sflux_lat_inc,
154       & sflux_nlon, sflux_nlat,       & hflux_nlon, hflux_nlat, sflux_nlon, sflux_nlat,
155       & swflux_lon0, swflux_lon_inc, swflux_lat0, swflux_lat_inc,       & swflux_lon0, swflux_lon_inc, swflux_lat0, swflux_lat_inc,
156       & swflux_nlon, swflux_nlat,       & lwflux_lon0, lwflux_lon_inc, lwflux_lat0, lwflux_lat_inc,
157       & runoff_lon0, runoff_lon_inc, runoff_lat0, runoff_lat_inc,       & swflux_nlon, swflux_nlat, lwflux_nlon, lwflux_nlat,
      & runoff_nlon, runoff_nlat,  
158       & atemp_lon0, atemp_lon_inc, atemp_lat0, atemp_lat_inc,       & atemp_lon0, atemp_lon_inc, atemp_lat0, atemp_lat_inc,
159       & atemp_nlon, atemp_nlat,       & atemp_nlon, atemp_nlat,
160       & aqh_lon0, aqh_lon_inc, aqh_lat0, aqh_lat_inc,       & aqh_lon0, aqh_lon_inc, aqh_lat0, aqh_lat_inc, aqh_nlon, aqh_nlat,
161       & aqh_nlon, aqh_nlat,       &evap_lon0,evap_lon_inc,evap_lat0,evap_lat_inc,evap_nlon,evap_nlat,
162       & evap_lon0, evap_lon_inc, evap_lat0, evap_lat_inc,       & precip_lon0, precip_lon_inc, precip_lat0, precip_lat_inc,
163       & evap_nlon, evap_nlat,       & runoff_lon0, runoff_lon_inc, runoff_lat0, runoff_lat_inc,
164       & precip_lon0, precip_lon_inc,       & precip_nlon, precip_nlat, runoff_nlon, runoff_nlat,
165       & precip_lat0, precip_lat_inc,       & snowprecip_lon0, snowprecip_lon_inc, snowprecip_nlon,
166       & precip_nlon, precip_nlat,       & snowprecip_lat0, snowprecip_lat_inc, snowprecip_nlat,
      & snowprecip_lon0, snowprecip_lon_inc,  
      & snowprecip_lat0, snowprecip_lat_inc,  
      & snowprecip_nlon, snowprecip_nlat,  
167       & uwind_lon0, uwind_lon_inc, uwind_lat0, uwind_lat_inc,       & uwind_lon0, uwind_lon_inc, uwind_lat0, uwind_lat_inc,
      & uwind_nlon, uwind_nlat,  
168       & vwind_lon0, vwind_lon_inc, vwind_lat0, vwind_lat_inc,       & vwind_lon0, vwind_lon_inc, vwind_lat0, vwind_lat_inc,
169       & vwind_nlon, vwind_nlat,       & uwind_nlon, uwind_nlat, vwind_nlon, vwind_nlat,
170       & wspeed_lon0, wspeed_lon_inc, wspeed_lat0, wspeed_lat_inc,       & wspeed_lon0, wspeed_lon_inc, wspeed_lat0, wspeed_lat_inc,
171       & wspeed_nlon, wspeed_nlat,       & wspeed_nlon, wspeed_nlat,
      & lwflux_lon0, lwflux_lon_inc, lwflux_lat0, lwflux_lat_inc,  
      & lwflux_nlon, lwflux_nlat,  
172       & swdown_lon0, swdown_lon_inc, swdown_lat0, swdown_lat_inc,       & swdown_lon0, swdown_lon_inc, swdown_lat0, swdown_lat_inc,
      & swdown_nlon, swdown_nlat,  
173       & lwdown_lon0, lwdown_lon_inc, lwdown_lat0, lwdown_lat_inc,       & lwdown_lon0, lwdown_lon_inc, lwdown_lat0, lwdown_lat_inc,
174       & lwdown_nlon, lwdown_nlat,       & swdown_nlon, swdown_nlat, lwdown_nlon, lwdown_nlat,
175       & apressure_lon0,apressure_lon_inc,apressure_nlon,       & apressure_lon0,apressure_lon_inc,apressure_nlon,
176       & apressure_lat0,apressure_lat_inc,apressure_nlat       & apressure_lat0,apressure_lat_inc,apressure_nlat,
177         & climsst_lon0, climsst_lon_inc, climsst_nlon,
178         & climsst_lat0, climsst_lat_inc, climsst_nlat,
179         & climsss_lon0, climsss_lon_inc, climsss_nlon,
180         & climsss_lat0, climsss_lat_inc, climsss_nlat
181  #endif  #endif
182    
183          NAMELIST /EXF_NML_OBCS/
184         &    obcsNstartdate1,    obcsNstartdate2,   obcsNperiod,
185         &    obcsSstartdate1,    obcsSstartdate2,   obcsSperiod,
186         &    obcsEstartdate1,    obcsEstartdate2,   obcsEperiod,
187         &    obcsWstartdate1,    obcsWstartdate2,   obcsWperiod
188    
189        _BEGIN_MASTER(mythid)        _BEGIN_MASTER(mythid)
190    
191  c     Set default values.  c     Set default values.
192    
193        year2sec           = 365.*86400.        year2sec           = 365.*86400.
194          exf_monFreq        = monitorFreq
195    
196  c     Calendar data.  c     Calendar data.
197        hfluxstartdate1    = 0        hfluxstartdate1    = 0
# Line 314  c     Calendar data. Line 320  c     Calendar data.
320        apressure_exfremo_intercept = 0.0 _d 0        apressure_exfremo_intercept = 0.0 _d 0
321        apressure_exfremo_slope = 0.0 _d 0        apressure_exfremo_slope = 0.0 _d 0
322    
323          climsststartdate1  = 0
324          climsststartdate2  = 0
325          climsstperiod      = 0
326          climsstconst         = 0.0 _d 0
327          climsst_exfremo_intercept = 0.0 _d 0
328          climsst_exfremo_slope = 0.0 _d 0
329    
330          climsssstartdate1  = 0
331          climsssstartdate2  = 0
332          climsssperiod      = 0
333          climsssconst         = 0.0 _d 0
334          climsss_exfremo_intercept = 0.0 _d 0
335          climsss_exfremo_slope = 0.0 _d 0
336    
337        obcsNstartdate1    = 0        obcsNstartdate1    = 0
338        obcsNstartdate2    = 0        obcsNstartdate2    = 0
339        obcsNperiod        = 0.0 _d 0        obcsNperiod        = 0.0 _d 0
# Line 334  c     Calendar data. Line 354  c     Calendar data.
354        exf_albedo         = 0.1 _d 0        exf_albedo         = 0.1 _d 0
355        windstressmax      = 2.0 _d 0        windstressmax      = 2.0 _d 0
356  c--   this default is chosen to be backward compatible with  c--   this default is chosen to be backward compatible with
357  c--   an earlier setting of 5.5 = surfEmittance*stefanBoltzmann  c--   an earlier setting of 5.5 = ocean_emissivity*stefanBoltzmann
358        surfEmittance       = 5.50D-8/5.670D-8        ocean_emissivity   = 5.50D-8/5.670D-8
359          ice_emissivity     = 0.98 _d 0
360          snow_emissivity    = 0.98 _d 0
361    
362          exf_scal_BulkCdn   = 1.0  _d 0
363    
364    c     Initialise freezing temperature of sea water
365          climtempfreeze     = -1.9 _d 0
366    
367  c     Data files.  c     Data files.
368        hfluxfile          = ' '        hfluxfile          = ' '
# Line 356  c     Data files. Line 383  c     Data files.
383        swdownfile         = ' '        swdownfile         = ' '
384        lwdownfile         = ' '        lwdownfile         = ' '
385        apressurefile      = ' '        apressurefile      = ' '
386          climsstfile        = ' '
387          climsssfile        = ' '
388    
389  c     Start dates.  c     Start dates.
390        hfluxstartdate     = 0.        hfluxstartdate     = 0.
# Line 380  c     Start dates. Line 409  c     Start dates.
409        obcsEstartdate     = 0.        obcsEstartdate     = 0.
410        obcsWstartdate     = 0.        obcsWstartdate     = 0.
411        apressurestartdate = 0.        apressurestartdate = 0.
412          climsststartdate   = 0.
413          climsssstartdate   = 0.
414    
415  c     Initialise file type and field precision  c     Initialise file type and field precision
416        exf_iprec            = 32        exf_iprec            = 32
# Line 410  c     Input scaling factors. Line 441  c     Input scaling factors.
441        exf_inscal_runoff    =  1. _d 0        exf_inscal_runoff    =  1. _d 0
442        exf_inscal_swdown    =  1. _d 0        exf_inscal_swdown    =  1. _d 0
443        exf_inscal_lwdown    =  1. _d 0        exf_inscal_lwdown    =  1. _d 0
444          exf_inscal_climsst   =  1. _d 0
445          exf_inscal_climsss   =  1. _d 0
446    
447  c     Output scaling factors.  c     Output scaling factors.
448        exf_outscal_hflux    =  1. _d 0        exf_outscal_hflux    =  1. _d 0
# Line 512  c     Output scaling factors. Line 545  c     Output scaling factors.
545        swdown_lon_inc    = delX(1)        swdown_lon_inc    = delX(1)
546        lwdown_lon_inc    = delX(1)        lwdown_lon_inc    = delX(1)
547        apressure_lon_inc = delX(1)        apressure_lon_inc = delX(1)
548          climsst_lon0    = thetaMin + delX(1) / 2
549          climsss_lon0    = thetaMin + delX(1) / 2
550          climsst_lat0    = phimin   + delY(1) / 2
551          climsss_lat0    = phimin   + delY(1) / 2
552          climsst_nlon    = Nx
553          climsst_nlat    = Ny
554          climsss_nlon    = Nx
555          climsss_nlat    = Ny
556          climsst_lon_inc = delX(1)
557          climsss_lon_inc = delX(1)
558        DO i=1,MAX_LAT_INC        DO i=1,MAX_LAT_INC
559           IF (i.LT.Ny) THEN           IF (i.LT.Ny) THEN
560              vstress_lat_inc(i)   =  delY(i)              vstress_lat_inc(i)   =  delY(i)
# Line 532  c     Output scaling factors. Line 575  c     Output scaling factors.
575              swdown_lat_inc(i)    = (delY(i) + delY(i)) / 2.              swdown_lat_inc(i)    = (delY(i) + delY(i)) / 2.
576              lwdown_lat_inc(i)    = (delY(i) + delY(i)) / 2.              lwdown_lat_inc(i)    = (delY(i) + delY(i)) / 2.
577              apressure_lat_inc(i) = (delY(i) + delY(i)) / 2.              apressure_lat_inc(i) = (delY(i) + delY(i)) / 2.
578                climsst_lat_inc(i)   = (delY(i) + delY(i)) / 2.
579                climsss_lat_inc(i)   = (delY(i) + delY(i)) / 2.
580           ELSE           ELSE
581              ustress_lat_inc(i)   = 0.              ustress_lat_inc(i)   = 0.
582              vstress_lat_inc(i)   = 0.              vstress_lat_inc(i)   = 0.
# Line 551  c     Output scaling factors. Line 596  c     Output scaling factors.
596              swdown_lat_inc(i)    = 0.              swdown_lat_inc(i)    = 0.
597              lwdown_lat_inc(i)    = 0.              lwdown_lat_inc(i)    = 0.
598              apressure_lat_inc(i) = 0.              apressure_lat_inc(i) = 0.
599                climsst_lat_inc(i)   = 0.
600                climsss_lat_inc(i)   = 0.
601           ENDIF           ENDIF
602        ENDDO        ENDDO
603  #endif /* USE_EXF_INTERPOLATION */  #endif /* USE_EXF_INTERPOLATION */
604    
 c     Check for the availability of the right calendar version.  
       if ( calendarversion .ne. usescalendarversion ) then  
          print*,' exf_readparms: You are not using the appropriate'  
          print*,'           version of the calendar package.'  
          print*  
          print*,' You are using Calendar version: ', calendarversion  
          print*,' Please use    Calendar version: ', usescalendarversion  
          stop ' stopped in exf_readparms.'  
       endif  
   
605  c     Next, read the forcing data file.  c     Next, read the forcing data file.
606          WRITE(msgBuf,'(A)') 'EXF_READPARMS: opening data.exf'        WRITE(msgBuf,'(A)') 'EXF_READPARMS: opening data.exf'
607          CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
608       &                    SQUEEZE_RIGHT , 1)       &     SQUEEZE_RIGHT , 1)
609    
610          CALL OPEN_COPY_DATA_FILE(        CALL OPEN_COPY_DATA_FILE(
611       I                          'data.exf', 'EXF_READPARMS',       I                          'data.exf', 'EXF_READPARMS',
612       O                          iUnit,       O                          iUnit,
613       I                          myThid )       I                          myThid )
614    
615        READ(  iUnit, nml = exf_nml )        WRITE(msgBuf,'(A)')
616         &     'EXF_READPARMS: reading EXF_NML_01'
617          CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
618         &     SQUEEZE_RIGHT , 1)
619          READ(  iUnit, nml = EXF_NML_01 )
620          WRITE(msgBuf,'(A)')
621         &     'EXF_READPARMS: reading EXF_NML_02'
622          CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
623         &     SQUEEZE_RIGHT , 1)
624          READ(  iUnit, nml = EXF_NML_02 )
625          WRITE(msgBuf,'(A)')
626         &     'EXF_READPARMS: reading EXF_NML_03'
627          CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
628         &     SQUEEZE_RIGHT , 1)
629          READ(  iUnit, nml = EXF_NML_03 )
630          WRITE(msgBuf,'(A)')
631         &     'EXF_READPARMS: reading EXF_NML_04'
632          CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
633         &     SQUEEZE_RIGHT , 1)
634          READ(  iUnit, nml = EXF_NML_04 )
635    #ifdef ALLOW_OBCS
636          WRITE(msgBuf,'(A)')
637         &     'EXF_READPARMS: reading EXF_NML_OBCS'
638          CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
639         &     SQUEEZE_RIGHT , 1)
640          READ(  iUnit, nml = EXF_NML_OBCS )
641    #endif
642    
643        WRITE(msgBuf,'(A)')        WRITE(msgBuf,'(A)')
644       &     'EXF_READPARMS: finished reading data.exf'       &     'EXF_READPARMS: finished reading data.exf'
# Line 590  c     Complete the start date specificat Line 653  c     Complete the start date specificat
653  c     fields to get a complete calendar date array.  c     fields to get a complete calendar date array.
654    
655  #ifdef ALLOW_ATM_WIND  #ifdef ALLOW_ATM_WIND
656        if ( uwindfile .NE. ' ' ) then        if ( uwindfile .NE. ' ' .and. uwindperiod .gt. 0. ) then
657           call cal_FullDate  ( uwindstartdate1    ,      uwindstartdate2,           call cal_FullDate  ( uwindstartdate1    ,      uwindstartdate2,
658       &        date_array                        ,mythid )       &        date_array                        ,mythid )
659           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
660           call cal_ToSeconds ( difftime,    uwindstartdate     ,mythid )           call cal_ToSeconds ( difftime,    uwindstartdate     ,mythid )
661           uwindstartdate     = modelstart   + uwindstartdate           uwindstartdate     = modelstart   + uwindstartdate
662        endif        endif
663        if ( vwindfile .NE. ' ' ) then        if ( vwindfile .NE. ' ' .and. vwindperiod .gt. 0. ) then
664           call cal_FullDate  ( vwindstartdate1    ,      vwindstartdate2,           call cal_FullDate  ( vwindstartdate1    ,      vwindstartdate2,
665       &        date_array                        ,mythid )       &        date_array                        ,mythid )
666           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
667           call cal_ToSeconds ( difftime,    vwindstartdate     ,mythid )           call cal_ToSeconds ( difftime,    vwindstartdate     ,mythid )
668           vwindstartdate     = modelstart   + vwindstartdate           vwindstartdate     = modelstart   + vwindstartdate
669        endif        endif
670        if ( wspeedfile .NE. ' ' ) then        if ( wspeedfile .NE. ' ' .and. wspeedperiod .gt. 0. ) then
671           call cal_FullDate  ( wspeedstartdate1, wspeedstartdate2,           call cal_FullDate  ( wspeedstartdate1, wspeedstartdate2,
672       &        date_array                        ,mythid )       &        date_array                        ,mythid )
673           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
# Line 612  c     fields to get a complete calendar Line 675  c     fields to get a complete calendar
675           wspeedstartdate     = modelstart   + wspeedstartdate           wspeedstartdate     = modelstart   + wspeedstartdate
676        endif        endif
677  #else  #else
678        if ( ustressfile .NE. ' ' ) then        if ( ustressfile .NE. ' ' .and. ustressperiod .gt. 0. ) then
679           call cal_FullDate  ( ustressstartdate1  ,    ustressstartdate2,           call cal_FullDate  ( ustressstartdate1  ,    ustressstartdate2,
680       &        date_array                        ,mythid )       &        date_array                        ,mythid )
681           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
682           call cal_ToSeconds ( difftime,  ustressstartdate     ,mythid )           call cal_ToSeconds ( difftime,  ustressstartdate     ,mythid )
683           ustressstartdate   = modelstart + ustressstartdate           ustressstartdate   = modelstart + ustressstartdate
684        endif        endif
685        if ( vstressfile .NE. ' ' ) then        if ( vstressfile .NE. ' ' .and. vstressperiod .gt. 0. ) then
686           call cal_FullDate  ( vstressstartdate1  ,    vstressstartdate2,           call cal_FullDate  ( vstressstartdate1  ,    vstressstartdate2,
687       &        date_array                        ,mythid )       &        date_array                        ,mythid )
688           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
# Line 629  c     fields to get a complete calendar Line 692  c     fields to get a complete calendar
692  #endif  #endif
693    
694  #ifdef ALLOW_ATM_TEMP  #ifdef ALLOW_ATM_TEMP
695        if ( atempfile .NE. ' ' ) then        if ( atempfile .NE. ' ' .and. atempperiod .gt. 0. ) then
696           call cal_FullDate  ( atempstartdate1    ,      atempstartdate2,           call cal_FullDate  ( atempstartdate1    ,      atempstartdate2,
697       &        date_array                        ,mythid )       &        date_array                        ,mythid )
698           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
699           call cal_ToSeconds ( difftime,    atempstartdate     ,mythid )           call cal_ToSeconds ( difftime,    atempstartdate     ,mythid )
700           atempstartdate     = modelstart   + atempstartdate           atempstartdate     = modelstart   + atempstartdate
701        endif        endif
702        if ( aqhfile .NE. ' ' ) then        if ( aqhfile .NE. ' ' .and. aqhperiod .gt. 0. ) then
703           call cal_FullDate  ( aqhstartdate1      ,        aqhstartdate2,           call cal_FullDate  ( aqhstartdate1      ,        aqhstartdate2,
704       &        date_array                        ,mythid )       &        date_array                        ,mythid )
705           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
706           call cal_ToSeconds ( difftime,      aqhstartdate     ,mythid )           call cal_ToSeconds ( difftime,      aqhstartdate     ,mythid )
707           aqhstartdate       = modelstart     + aqhstartdate           aqhstartdate       = modelstart     + aqhstartdate
708        endif        endif
709        if ( lwfluxfile .NE. ' ' ) then        if ( lwfluxfile .NE. ' ' .and. lwfluxperiod .gt. 0. ) then
710           call cal_FullDate  ( lwfluxstartdate1   ,     lwfluxstartdate2,           call cal_FullDate  ( lwfluxstartdate1   ,     lwfluxstartdate2,
711       &        date_array                        ,mythid )       &        date_array                        ,mythid )
712           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
713           call cal_ToSeconds ( difftime,   lwfluxstartdate     ,mythid )           call cal_ToSeconds ( difftime,   lwfluxstartdate     ,mythid )
714           lwfluxstartdate    = modelstart  + lwfluxstartdate           lwfluxstartdate    = modelstart  + lwfluxstartdate
715        endif        endif
716        if ( precipfile .NE. ' ' ) then        if ( precipfile .NE. ' ' .and. precipperiod .gt. 0. ) then
717           call cal_FullDate  ( precipstartdate1   ,     precipstartdate2,           call cal_FullDate  ( precipstartdate1   ,     precipstartdate2,
718       &        date_array                        ,mythid )       &        date_array                        ,mythid )
719           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
720           call cal_ToSeconds ( difftime,   precipstartdate     ,mythid )           call cal_ToSeconds ( difftime,   precipstartdate     ,mythid )
721           precipstartdate    = modelstart  + precipstartdate           precipstartdate    = modelstart  + precipstartdate
722        endif        endif
723        if ( snowprecipfile .NE. ' ' ) then        if ( snowprecipfile .NE. ' ' .and. snowprecipperiod .gt. 0. ) then
724           call cal_FullDate( snowprecipstartdate1, snowprecipstartdate2,           call cal_FullDate( snowprecipstartdate1, snowprecipstartdate2,
725       &        date_array                        ,mythid )       &        date_array                        ,mythid )
726           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
# Line 665  c     fields to get a complete calendar Line 728  c     fields to get a complete calendar
728           snowprecipstartdate    = modelstart  + snowprecipstartdate           snowprecipstartdate    = modelstart  + snowprecipstartdate
729        endif        endif
730  #else  #else
731        if ( hfluxfile .NE. ' ' ) then        if ( hfluxfile .NE. ' ' .and. hfluxperiod .gt. 0. ) then
732           call cal_FullDate  ( hfluxstartdate1    ,      hfluxstartdate2,           call cal_FullDate  ( hfluxstartdate1    ,      hfluxstartdate2,
733       &        date_array                        ,mythid )       &        date_array                        ,mythid )
734           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
735           call cal_ToSeconds ( difftime,    hfluxstartdate     ,mythid )           call cal_ToSeconds ( difftime,    hfluxstartdate     ,mythid )
736           hfluxstartdate     = modelstart   + hfluxstartdate           hfluxstartdate     = modelstart   + hfluxstartdate
737        endif        endif
738        if ( sfluxfile .NE. ' ' ) then        if ( sfluxfile .NE. ' ' .and. sfluxperiod .gt. 0. ) then
739           call cal_FullDate  ( sfluxstartdate1    ,      sfluxstartdate2,           call cal_FullDate  ( sfluxstartdate1    ,      sfluxstartdate2,
740       &        date_array                        ,mythid )       &        date_array                        ,mythid )
741           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
# Line 682  c     fields to get a complete calendar Line 745  c     fields to get a complete calendar
745  #endif  #endif
746    
747  #if defined(ALLOW_ATM_TEMP) || defined(SHORTWAVE_HEATING)  #if defined(ALLOW_ATM_TEMP) || defined(SHORTWAVE_HEATING)
748        if ( swfluxfile .NE. ' ' ) then        if ( swfluxfile .NE. ' ' .and. swfluxperiod .gt. 0. ) then
749           call cal_FullDate  ( swfluxstartdate1   ,     swfluxstartdate2,           call cal_FullDate  ( swfluxstartdate1   ,     swfluxstartdate2,
750       &        date_array                        ,mythid )       &        date_array                        ,mythid )
751           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
# Line 692  c     fields to get a complete calendar Line 755  c     fields to get a complete calendar
755  #endif  #endif
756    
757  #ifdef EXF_READ_EVAP  #ifdef EXF_READ_EVAP
758        if ( evapfile .NE. ' ' ) then        if ( evapfile .NE. ' ' .and. evapperiod .gt. 0. ) then
759           call cal_FullDate  ( evapstartdate1     ,       evapstartdate2,           call cal_FullDate  ( evapstartdate1     ,       evapstartdate2,
760       &        date_array                        ,mythid )       &        date_array                        ,mythid )
761           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
# Line 702  c     fields to get a complete calendar Line 765  c     fields to get a complete calendar
765  #endif  #endif
766    
767  #ifdef ALLOW_RUNOFF  #ifdef ALLOW_RUNOFF
768        if ( runofffile .NE. ' ' .AND. runoffperiod .NE. 0. ) then        if ( runofffile .NE. ' ' .AND. runoffperiod .gt. 0. ) then
769           call cal_FullDate  ( runoffstartdate1   ,     runoffstartdate2,           call cal_FullDate  ( runoffstartdate1   ,     runoffstartdate2,
770       &        date_array                        ,mythid )       &        date_array                        ,mythid )
771           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
# Line 712  c     fields to get a complete calendar Line 775  c     fields to get a complete calendar
775  #endif  #endif
776    
777  #ifdef ALLOW_DOWNWARD_RADIATION  #ifdef ALLOW_DOWNWARD_RADIATION
778        if ( swdownfile .NE. ' ' ) then        if ( swdownfile .NE. ' ' .and. swdownperiod .gt. 0. ) then
779           call cal_FullDate  ( swdownstartdate1   ,     swdownstartdate2,           call cal_FullDate  ( swdownstartdate1   ,     swdownstartdate2,
780       &        date_array                        ,mythid )       &        date_array                        ,mythid )
781           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
782           call cal_ToSeconds ( difftime,   swdownstartdate     ,mythid )           call cal_ToSeconds ( difftime,   swdownstartdate     ,mythid )
783           swdownstartdate    = modelstart  + swdownstartdate           swdownstartdate    = modelstart  + swdownstartdate
784        endif        endif
785        if ( lwdownfile .NE. ' ' ) then        if ( lwdownfile .NE. ' ' .and. lwdownperiod .gt. 0. ) then
786           call cal_FullDate  ( lwdownstartdate1   ,     lwdownstartdate2,           call cal_FullDate  ( lwdownstartdate1   ,     lwdownstartdate2,
787       &        date_array                        ,mythid )       &        date_array                        ,mythid )
788           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
# Line 729  c     fields to get a complete calendar Line 792  c     fields to get a complete calendar
792  #endif  #endif
793    
794  #ifdef ATMOSPHERIC_LOADING  #ifdef ATMOSPHERIC_LOADING
795        if ( apressurefile .NE. ' ' ) then        if ( apressurefile .NE. ' ' .and. apressureperiod .gt. 0. ) then
796           call cal_FullDate  ( apressurestartdate1,  apressurestartdate2,           call cal_FullDate  ( apressurestartdate1,  apressurestartdate2,
797       &        date_array                        ,mythid )       &        date_array                        ,mythid )
798           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
# Line 740  c     fields to get a complete calendar Line 803  c     fields to get a complete calendar
803    
804  #ifdef ALLOW_OBCS  #ifdef ALLOW_OBCS
805  #ifdef ALLOW_OBCS_NORTH  #ifdef ALLOW_OBCS_NORTH
806        if ( obcsNperiod .NE. 0 ) then        if ( obcsNperiod .gt. 0 ) then
807           call cal_FullDate  ( obcsNstartdate1    ,      obcsNstartdate2,           call cal_FullDate  ( obcsNstartdate1    ,      obcsNstartdate2,
808       &        date_array                        ,mythid )       &        date_array                        ,mythid )
809           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
# Line 749  c     fields to get a complete calendar Line 812  c     fields to get a complete calendar
812        endif        endif
813  #endif  #endif
814  #ifdef ALLOW_OBCS_SOUTH  #ifdef ALLOW_OBCS_SOUTH
815        if ( obcsSperiod .NE. 0 ) then        if ( obcsSperiod .gt. 0 ) then
816           call cal_FullDate  ( obcsSstartdate1    ,      obcsSstartdate2,           call cal_FullDate  ( obcsSstartdate1    ,      obcsSstartdate2,
817       &        date_array                        ,mythid )       &        date_array                        ,mythid )
818           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
# Line 758  c     fields to get a complete calendar Line 821  c     fields to get a complete calendar
821        endif        endif
822  #endif  #endif
823  #ifdef ALLOW_OBCS_EAST  #ifdef ALLOW_OBCS_EAST
824        if ( obcsEperiod .NE. 0 ) then        if ( obcsEperiod .gt. 0 ) then
825           call cal_FullDate  ( obcsEstartdate1    ,      obcsEstartdate2,           call cal_FullDate  ( obcsEstartdate1    ,      obcsEstartdate2,
826       &        date_array                        ,mythid )       &        date_array                        ,mythid )
827           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
# Line 767  c     fields to get a complete calendar Line 830  c     fields to get a complete calendar
830        endif        endif
831  #endif  #endif
832  #ifdef ALLOW_OBCS_WEST  #ifdef ALLOW_OBCS_WEST
833        if ( obcsNperiod .NE. 0 ) then        if ( obcsNperiod .gt. 0 ) then
834           call cal_FullDate  ( obcsWstartdate1    ,      obcsWstartdate2,           call cal_FullDate  ( obcsWstartdate1    ,      obcsWstartdate2,
835       &        date_array                        ,mythid )       &        date_array                        ,mythid )
836           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)           call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
# Line 777  c     fields to get a complete calendar Line 840  c     fields to get a complete calendar
840  #endif  #endif
841  #endif /* ALLOW_OBCS */  #endif /* ALLOW_OBCS */
842    
843    #ifdef USE_EXF_INTERPOLATION
844          if ( climsst_nlat .GT. MAX_LAT_INC )
845         & stop 'stopped in exf_clim_readparms: climsst_nlat > MAX_LAT_INC'
846          if ( climsss_nlat .GT. MAX_LAT_INC )
847         & stop 'stopped in exf_clim_readparms: climsss_nlat > MAX_LAT_INC'
848    #endif
849    
850    #ifdef ALLOW_CLIMSST_RELAXATION
851          if ( climsstfile .NE. ' ' .AND. climsstperiod .NE. 0. ) then
852             call cal_FullDate( climsststartdate1, climsststartdate2,
853         &        date_array,                  mythid )
854             call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
855             call cal_ToSeconds (difftime,       climsststartdate  ,mythid)
856             climsststartdate=modelstart+climsststartdate
857          endif
858    #endif
859    
860    #ifdef ALLOW_CLIMSSS_RELAXATION
861          if ( climsssfile .NE. ' ' .AND. climsssperiod .NE. 0. ) then
862             call cal_FullDate( climsssstartdate1, climsssstartdate2,
863         &        date_array,                  mythid )
864             call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
865             call cal_ToSeconds (difftime,       climsssstartdate  ,mythid)
866             climsssstartdate=modelstart+climsssstartdate
867          endif
868    #endif
869    
870        _END_MASTER( mythid )        _END_MASTER( mythid )
871    
872        _BARRIER        _BARRIER
# Line 784  c     fields to get a complete calendar Line 874  c     fields to get a complete calendar
874  c--   Summarize the External forcing's setup.  c--   Summarize the External forcing's setup.
875        call exf_summary( mythid )        call exf_summary( mythid )
876    
 c--   set climatology parameters  
       call exf_clim_readparms( mythid )  
   
 c--   summarize climatologic forcing configuration  
       call exf_clim_summary( mythid )  
   
877        end        end

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.43

  ViewVC Help
Powered by ViewVC 1.1.22