File indexing completed on 2018-03-02 18:38:18 UTC
view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
86c9075df5 Jean*0001 #include "CD_CODE_OPTIONS.h"
0002
0003
0004
0005
0006
0007
0008 SUBROUTINE CD_CODE_READ_PICKUP( myIter, myThid )
0009
0010
0011
0012
0013
0014 IMPLICIT NONE
0015 #include "SIZE.h"
0016 #include "EEPARAMS.h"
0017 #include "PARAMS.h"
958248ce20 Jean*0018 #include "CD_CODE_VARS.h"
86c9075df5 Jean*0019 #ifdef ALLOW_MNC
0020 #include "MNC_PARAMS.h"
0021 #endif
0022
0023
0024 INTEGER myIter
0025 INTEGER myThid
0026
0027
0028 #ifdef ALLOW_CD_CODE
0029
0030
0031 CHARACTER*(MAX_LEN_FNAM) fn
0032 CHARACTER*(10) suff
0033 INTEGER prec
0034
0035
df5a9764ba Jean*0036 IF ( pickupSuff.EQ.' ' ) THEN
0037 IF ( rwSuffixType.EQ.0 ) THEN
0038 WRITE(suff,'(I10.10)') myIter
0039 ELSE
0040 CALL RW_GET_SUFFIX( suff, startTime, myIter, myThid )
0041 ENDIF
86c9075df5 Jean*0042 ELSE
df5a9764ba Jean*0043 WRITE(suff,'(A10)') pickupSuff
86c9075df5 Jean*0044 ENDIF
958248ce20 Jean*0045 prec = precFloat64
0046
86c9075df5 Jean*0047 _BARRIER
0048
0049 #ifdef ALLOW_MNC
0050 IF (useMNC .AND. pickup_read_mnc) THEN
0051
0052 WRITE(fn,'(A)') 'pickup_cd'
0053 CALL MNC_FILE_CLOSE_ALL_MATCHING(fn, myThid)
0054 CALL MNC_CW_SET_UDIM(fn, 1, myThid)
0055 CALL MNC_CW_SET_CITER(fn, 3, 3, myIter, 0, myThid)
0056 CALL MNC_CW_SET_UDIM(fn, 1, myThid)
0057 CALL MNC_CW_RL_R('D',fn,0,0,'uVelD',uVelD, myThid)
0058 CALL MNC_CW_RL_R('D',fn,0,0,'vVelD',vVelD, myThid)
0059 CALL MNC_CW_RL_R('D',fn,0,0,'Unm1',Unm1, myThid)
0060 CALL MNC_CW_RL_R('D',fn,0,0,'Vnm1',Vnm1, myThid)
0061 CALL MNC_CW_RL_R('D',fn,0,0,'etaNm1', etaNm1, myThid)
0062 ENDIF
0063 #endif /* ALLOW_MNC */
0064
0065 WRITE(fn,'(A,A10)') 'pickup_cd.',suff
0066
0067 IF (pickup_read_mdsio) THEN
958248ce20 Jean*0068 CALL READ_REC_3D_RL( fn, prec, Nr, uVelD, 1, myIter, myThid )
0069 CALL READ_REC_3D_RL( fn, prec, Nr, vVelD, 2, myIter, myThid )
0070 CALL READ_REC_3D_RL( fn, prec, Nr, uNM1, 3, myIter, myThid )
0071 CALL READ_REC_3D_RL( fn, prec, Nr, vNM1, 4, myIter, myThid )
86c9075df5 Jean*0072 IF ( usePickupBeforeC54 ) THEN
958248ce20 Jean*0073 CALL READ_REC_3D_RL(fn,prec, 1, etaNm1,6*Nr+1,myIter,myThid)
86c9075df5 Jean*0074 ELSE
958248ce20 Jean*0075 CALL READ_REC_3D_RL(fn,prec, 1, etaNm1,4*Nr+1,myIter,myThid)
86c9075df5 Jean*0076 ENDIF
0077 ENDIF
958248ce20 Jean*0078
0079
377eeb88a2 Jean*0080 CALL EXCH_UV_DGRID_3D_RL( uVelD,vVelD, .TRUE., Nr, myThid )
0081 CALL EXCH_UV_XYZ_RL( uNM1,vNM1, .TRUE., myThid )
0082 CALL EXCH_XY_RL( etaNm1, myThid )
958248ce20 Jean*0083
86c9075df5 Jean*0084 #endif /* ALLOW_CD_CODE */
0085
0086 RETURN
0087 END