Back to home page

darwin3

 
 

    


File indexing completed on 2024-12-17 18:38:02 UTC

view on githubraw file Latest commit d9e107d1 on 2019-08-12 17:47:14 UTC
b55e95f1ff Oliv*0001 #include "RADTRANS_OPTIONS.h"
                0002 #include "EXF_OPTIONS.h"
                0003 
                0004 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
                0005 CBOP
                0006 C     !ROUTINE: RADTRANS_INIT_VARIA
                0007 
                0008 C     !INTERFACE:
                0009       SUBROUTINE RADTRANS_INIT_VARIA( myThid )
                0010 
                0011 C     !DESCRIPTION:
                0012 C     Initialize radtrans constants
                0013 
                0014 C     !USES:
                0015       IMPLICIT NONE
                0016 #include "EEPARAMS.h"
                0017 #include "SIZE.h"
                0018 #include "GRID.h"
                0019 #include "PARAMS.h"
d9e107d180 Oliv*0020 #include "EXF_INTERP_SIZE.h"
b55e95f1ff Oliv*0021 #include "RADTRANS_SIZE.h"
                0022 #include "RADTRANS_PARAMS.h"
d9e107d180 Oliv*0023 #include "RADTRANS_EXF_PARAMS.h"
b55e95f1ff Oliv*0024 #include "RADTRANS_FIELDS.h"
                0025 
                0026 C     !INPUT PARAMETERS:
                0027       INTEGER myThid
                0028 CEOP
                0029 
                0030 #ifdef ALLOW_RADTRANS
                0031 #ifdef ALLOW_EXF
                0032 
                0033       INTEGER l
a720384a8b Oliv*0034       CHARACTER*8 fld
b55e95f1ff Oliv*0035 
                0036 C     these load constant forcing fields
                0037 
                0038       DO l = 1, nlam
a720384a8b Oliv*0039        WRITE(fld,'(A,I3.3)') 'RT_Ed', l
                0040        CALL exf_init_fld (
                0041      &     fld, RT_Edfile(l), RT_E_mask,
                0042      &     RT_E_period, RT_inscal_Ed(l), RT_Ed_const(l),
b55e95f1ff Oliv*0043      &     RT_Ed_sfc(1-OLx,1-OLy,1,1,l),
                0044      &     RT_Ed0(1-OLx,1-OLy,1,1,l),
                0045      &     RT_Ed1(1-OLx,1-OLy,1,1,l),
                0046 #ifdef USE_EXF_INTERPOLATION
                0047      &     RT_E_lon0, RT_E_lon_inc,
                0048      &     RT_E_lat0, RT_E_lat_inc,
                0049      &     RT_E_nlon, RT_E_nlat, xC, yC, RT_E_interpMethod,
                0050 #endif
                0051      &     mythid )
                0052 
a720384a8b Oliv*0053        WRITE(fld,'(A,I3.3)') 'RT_Es', l
                0054        CALL exf_init_fld (
                0055      &     fld, RT_Esfile(l), RT_E_mask,
                0056      &     RT_E_period, RT_inscal_Es(l), RT_Es_const(l),
b55e95f1ff Oliv*0057      &     RT_Es_sfc(1-OLx,1-OLy,1,1,l),
                0058      &     RT_Es0(1-OLx,1-OLy,1,1,l),
                0059      &     RT_Es1(1-OLx,1-OLy,1,1,l),
                0060 #ifdef USE_EXF_INTERPOLATION
                0061      &     RT_E_lon0, RT_E_lon_inc,
                0062      &     RT_E_lat0, RT_E_lat_inc,
                0063      &     RT_E_nlon, RT_E_nlat, xC, yC, RT_E_interpMethod,
                0064 #endif
                0065      &     mythid )
                0066       ENDDO
                0067 
a720384a8b Oliv*0068       CALL exf_init_fld (
                0069      &     'RT_ice', RT_icefile, RT_icemask,
                0070      &     RT_iceperiod, RT_inscal_ice, RT_iceconst,
                0071      &     RT_iceFrac, RT_ice0, RT_ice1,
b55e95f1ff Oliv*0072 #ifdef USE_EXF_INTERPOLATION
                0073      &     RT_ice_lon0, RT_ice_lon_inc,
                0074      &     RT_ice_lat0, RT_ice_lat_inc,
                0075      &     RT_ice_nlon, RT_ice_nlat, xC, yC, RT_ice_interpMethod,
                0076 #endif
                0077      &     mythid )
                0078 
                0079 
                0080       IF (RT_loadFieldsEarly) THEN
                0081        DO l = 1, nlam
a720384a8b Oliv*0082         WRITE(fld,'(A,I3.3)') 'RT_Ed', l
                0083         CALL exf_set_fld(
                0084      &     fld, RT_Edfile(l), RT_E_mask,
                0085      &     RT_E_StartTime, RT_E_period, RT_E_RepCycle,
b55e95f1ff Oliv*0086      &     RT_inscal_Ed(l),
                0087      &     RT_Ed_exfremo_intercept(l), RT_Ed_exfremo_slope(l),
                0088      &     RT_Ed_sfc(1-OLx,1-OLy,1,1,l),
                0089      &     RT_Ed0(1-OLx,1-OLy,1,1,l),
                0090      &     RT_Ed1(1-OLx,1-OLy,1,1,l),
                0091 #ifdef USE_EXF_INTERPOLATION
                0092      &     RT_E_lon0, RT_E_lon_inc,
                0093      &     RT_E_lat0, RT_E_lat_inc,
                0094      &     RT_E_nlon, RT_E_nlat, xC, yC, RT_E_interpMethod,
                0095 #endif
                0096      &     starttime, nIter0, mythid )
                0097 
a720384a8b Oliv*0098         WRITE(fld,'(A,I3.3)') 'RT_Es', l
                0099         CALL exf_set_fld(
                0100      &     fld, RT_Esfile(l), RT_E_mask,
                0101      &     RT_E_StartTime, RT_E_period, RT_E_RepCycle,
b55e95f1ff Oliv*0102      &     RT_inscal_Es(l),
                0103      &     RT_Es_exfremo_intercept(l), RT_Es_exfremo_slope(l),
                0104      &     RT_Es_sfc(1-OLx,1-OLy,1,1,l),
                0105      &     RT_Es0(1-OLx,1-OLy,1,1,l),
                0106      &     RT_Es1(1-OLx,1-OLy,1,1,l),
                0107 #ifdef USE_EXF_INTERPOLATION
                0108      &     RT_E_lon0, RT_E_lon_inc,
                0109      &     RT_E_lat0, RT_E_lat_inc,
                0110      &     RT_E_nlon, RT_E_nlat, xC, yC, RT_E_interpMethod,
                0111 #endif
                0112      &     starttime, nIter0, mythid )
                0113        ENDDO
                0114 
                0115 C      these load time-varying forcing fields
                0116 C      (usually done in RT_fields_load, but may be needed for chl)
a720384a8b Oliv*0117        CALL exf_set_fld(
                0118      &     'RT_ice', RT_icefile, RT_icemask,
                0119      &     RT_iceStartTime, RT_iceperiod, RT_iceRepCycle,
b55e95f1ff Oliv*0120      &     RT_inscal_ice,
                0121      &     RT_ice_exfremo_intercept, RT_ice_exfremo_slope,
a720384a8b Oliv*0122      &     RT_iceFrac, RT_ice0, RT_ice1,
b55e95f1ff Oliv*0123 #ifdef USE_EXF_INTERPOLATION
                0124      &     RT_ice_lon0, RT_ice_lon_inc,
                0125      &     RT_ice_lat0, RT_ice_lat_inc,
                0126      &     RT_ice_nlon, RT_ice_nlat, xC, yC, RT_ice_interpMethod,
                0127 #endif
                0128      &     starttime, nIter0, mythid )
                0129 
                0130        DO l = 1, nlam
                0131         _EXCH_XY_RL( RT_Ed_sfc(1-OLx,1-OLy,1,1,l), myThid )
                0132         _EXCH_XY_RL( RT_Es_sfc(1-OLx,1-OLy,1,1,l), myThid )
                0133        ENDDO
                0134        _EXCH_XY_RL( RT_iceFrac, myThid )
                0135 
                0136 C     endif RT_loadFieldsEarly
                0137       ENDIF
                0138 
                0139 #endif /* ALLOW_EXF */
                0140 #endif /* ALLOW_RADTRANS */
                0141 
                0142       RETURN
                0143       END