Back to home page

darwin3

 
 

    


File indexing completed on 2024-12-17 18:38:01 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 CBOP
                0005 C !ROUTINE: RADTRANS_FIELDS_LOAD
                0006 
                0007 C !INTERFACE: ==========================================================
                0008       SUBROUTINE RADTRANS_FIELDS_LOAD( mytime, myiter, mythid )
                0009 
                0010 C !DESCRIPTION:
                0011 C     Load and interpolate forcing fields for radtrans package
                0012 
                0013 C !USES: ===============================================================
                0014       IMPLICIT NONE
                0015 #include "SIZE.h"
                0016 #include "GRID.h"
                0017 #include "EEPARAMS.h"
                0018 #include "PARAMS.h"
d9e107d180 Oliv*0019 #include "EXF_INTERP_SIZE.h"
b55e95f1ff Oliv*0020 #include "RADTRANS_SIZE.h"
                0021 #include "RADTRANS_PARAMS.h"
d9e107d180 Oliv*0022 #include "RADTRANS_EXF_PARAMS.h"
b55e95f1ff Oliv*0023 #include "RADTRANS_FIELDS.h"
                0024 
                0025 C !INPUT PARAMETERS: ===================================================
                0026       _RL     mytime
                0027       integer myiter
                0028       integer mythid
                0029 CEOP
                0030 
                0031 #ifdef ALLOW_RADTRANS
                0032 
                0033 C !LOCAL VARIABLES: ====================================================
                0034       INTEGER bi,bj
                0035       INTEGER i,j,k,l
a720384a8b Oliv*0036       CHARACTER*8 fld
b55e95f1ff Oliv*0037 
                0038 #ifdef ALLOW_EXF
                0039 c--   read forcing fields from files and temporal interpolation
                0040 
                0041       IF (.NOT.(RT_loadFieldsEarly.AND.myiter.EQ.niter0)) THEN
                0042        DO l = 1, nlam
a720384a8b Oliv*0043         WRITE(fld,'(A,I3.3)') 'RT_Ed', l
                0044         CALL exf_set_fld(
                0045      &     fld, RT_Edfile(l), RT_E_mask,
                0046      &     RT_E_StartTime, RT_E_period, RT_E_RepCycle,
b55e95f1ff Oliv*0047      &     RT_inscal_Ed(l),
                0048      &     RT_Ed_exfremo_intercept(l), RT_Ed_exfremo_slope(l),
                0049      &     RT_Ed_sfc(1-OLx,1-OLy,1,1,l),
                0050      &     RT_Ed0(1-OLx,1-OLy,1,1,l),
                0051      &     RT_Ed1(1-OLx,1-OLy,1,1,l),
                0052 #ifdef USE_EXF_INTERPOLATION
                0053      &     RT_E_lon0, RT_E_lon_inc,
                0054      &     RT_E_lat0, RT_E_lat_inc,
                0055      &     RT_E_nlon, RT_E_nlat, xC, yC, RT_E_interpMethod,
                0056 #endif
                0057      &     mytime, myiter, mythid )
                0058 
a720384a8b Oliv*0059         WRITE(fld,'(A,I3.3)') 'RT_Es', l
                0060         CALL exf_set_fld(
                0061      &     fld, RT_Esfile(l), RT_E_mask,
                0062      &     RT_E_StartTime, RT_E_period, RT_E_RepCycle,
b55e95f1ff Oliv*0063      &     RT_inscal_Es(l),
                0064      &     RT_Es_exfremo_intercept(l), RT_Es_exfremo_slope(l),
                0065      &     RT_Es_sfc(1-OLx,1-OLy,1,1,l),
                0066      &     RT_Es0(1-OLx,1-OLy,1,1,l),
                0067      &     RT_Es1(1-OLx,1-OLy,1,1,l),
                0068 #ifdef USE_EXF_INTERPOLATION
                0069      &     RT_E_lon0, RT_E_lon_inc,
                0070      &     RT_E_lat0, RT_E_lat_inc,
                0071      &     RT_E_nlon, RT_E_nlat, xC, yC, RT_E_interpMethod,
                0072 #endif
                0073      &     mytime, myiter, mythid )
                0074        ENDDO
                0075 
a720384a8b Oliv*0076        CALL exf_set_fld(
                0077      &     'RT_ice', RT_icefile, RT_icemask,
                0078      &     RT_iceStartTime, RT_iceperiod, RT_iceRepCycle,
b55e95f1ff Oliv*0079      &     RT_inscal_ice,
                0080      &     RT_ice_exfremo_intercept, RT_ice_exfremo_slope,
a720384a8b Oliv*0081      &     RT_iceFrac, RT_ice0, RT_ice1,
b55e95f1ff Oliv*0082 #ifdef USE_EXF_INTERPOLATION
                0083      &     RT_ice_lon0, RT_ice_lon_inc,
                0084      &     RT_ice_lat0, RT_ice_lat_inc,
                0085      &     RT_ice_nlon, RT_ice_nlat, xC, yC, RT_ice_interpMethod,
                0086 #endif
                0087      &     mytime, myiter, mythid )
                0088 
                0089        DO l = 1, nlam
                0090         _EXCH_XY_RL( RT_Ed_sfc(1-OLx,1-OLy,1,1,l), myThid )
                0091         _EXCH_XY_RL( RT_Es_sfc(1-OLx,1-OLy,1,1,l), myThid )
                0092        ENDDO
                0093        _EXCH_XY_RL( RT_iceFrac, myThid )
                0094 
                0095 C     endif .NOT.(RT_loadFieldsEarly.AND.myiter.EQ.niter0)
                0096       ENDIF
                0097 
                0098       CALL RADTRANS_MONITOR(myTime, myIter, myThid)
                0099 
                0100 #ifdef ALLOW_DIAGNOSTICS
                0101       IF (useDIAGNOSTICS) THEN
                0102        CALL DIAGNOSTICS_FILL(RT_iceFrac,'RTice   ',0,1,0,0,0,myThid)
                0103       ENDIF
                0104 #endif /* ALLOW_DIAGNOSTICS */
                0105 
                0106 #endif /* ALLOW_EXF */
                0107 
                0108 #endif /* ALLOW_RADTRANS */
                0109 
                0110       RETURN
                0111       END