File indexing completed on 2023-09-03 05:09:52 UTC
view on githubraw file Latest commit 74487008 on 2023-09-03 01:50:18 UTC
c8e3a3b543 Jean*0001 #include "PACKAGES_CONFIG.h"
0002 #include "CPP_OPTIONS.h"
7448700841 Mart*0003
0004
0005
c8e3a3b543 Jean*0006
0007
0008
0009
0010 SUBROUTINE DO_ATMOSPHERIC_PHYS(myTime, myIter, myThid)
0011
0012
067df0e288 Jean*0013
0014
c8e3a3b543 Jean*0015
0016
0017
0018
0019
0020
8f92343d9b Jean*0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
c8e3a3b543 Jean*0035
0036 IMPLICIT NONE
0037
0038 #include "SIZE.h"
0039 #include "EEPARAMS.h"
0040 #include "PARAMS.h"
5edeab65c1 Jean*0041 #include "GRID.h"
0042 #include "DYNVARS.h"
7448700841 Mart*0043
0044
0045
c8e3a3b543 Jean*0046
0047
0048
8440e8ae5d Jean*0049
0050
0051
c8e3a3b543 Jean*0052 _RL myTime
0053 INTEGER myIter
0054 INTEGER myThid
7418e6b1e6 Jean*0055
c8e3a3b543 Jean*0056
0057
0058
5edeab65c1 Jean*0059
0060
0061 INTEGER bi, bj
0062 INTEGER i, j, k
0063 _RL thetaRef
c8e3a3b543 Jean*0064
0065 #ifdef ALLOW_DEBUG
8440e8ae5d Jean*0066 IF (debugMode) CALL DEBUG_ENTER('DO_ATMOSPHERIC_PHYS',myThid)
c8e3a3b543 Jean*0067 #endif
067df0e288 Jean*0068
5edeab65c1 Jean*0069 IF ( fluidIsAir ) THEN
7448700841 Mart*0070
0071
0072
0073
0074
0075
5edeab65c1 Jean*0076 DO bj=myByLo(myThid),myByHi(myThid)
0077 DO bi=myBxLo(myThid),myBxHi(myThid)
0078
0079
0080
0081 DO k=1,Nr
0082 IF ( select_rStar.GE.1 .OR. selectSigmaCoord.GE.1 ) THEN
0083
0084 thetaRef = thetaConst
0085 ELSE
0086
0087 thetaRef = tRef(k)
0088 ENDIF
0089 DO j=1-OLy,sNy+OLy
0090 DO i=1-OLx,sNx+OLx
0091 rhoInSitu(i,j,k,bi,bj) =
0092 & ( theta(i,j,k,bi,bj)
0093 & *( salt(i,j,k,bi,bj)*atm_Rq + oneRL )
0094 & - thetaRef )*maskC(i,j,k,bi,bj)
0095 ENDDO
0096 ENDDO
0097 ENDDO
0098
0099 ENDDO
0100 ENDDO
0101 #ifdef ALLOW_AUTODIFF
0102 ELSE
0103 DO bj=myByLo(myThid),myByHi(myThid)
0104 DO bi=myBxLo(myThid),myBxHi(myThid)
0105 DO k=1,Nr
0106 DO j=1-OLy,sNy+OLy
0107 DO i=1-OLx,sNx+OLx
0108 rhoInSitu(i,j,k,bi,bj) = 0.
0109 ENDDO
0110 ENDDO
0111 ENDDO
0112 ENDDO
0113 ENDDO
0114 #endif /* ALLOW_AUTODIFF */
0115 ENDIF
0116
c8e3a3b543 Jean*0117 #ifdef ALLOW_FIZHI
067df0e288 Jean*0118 IF ( useFIZHI ) THEN
0119 CALL TIMER_START('FIZHI [DO_ATMOSPHERIC_PHYS]',myThid)
0120 CALL UPDATE_OCEAN_EXPORTS ( myTime, myIter, myThid )
0121 CALL UPDATE_EARTH_EXPORTS ( myTime, myIter, myThid )
0122 CALL UPDATE_CHEMISTRY_EXPORTS ( myTime, myIter, myThid )
0123 CALL FIZHI_WRAPPER ( myTime, myIter, myThid )
0124 CALL STEP_FIZHI_FG ( myTime, myIter, myThid, dTtracerLev(1) )
cb205d18b8 Jean*0125 CALL FIZHI_UPDATE_TIME ( myIter, myThid, deltaTClock )
067df0e288 Jean*0126 CALL TIMER_STOP ('FIZHI [DO_ATMOSPHERIC_PHYS]',myThid)
0127 ENDIF
123913d7e9 Jean*0128 #endif /* ALLOW_FIZHI */
0129
0130 #ifdef ALLOW_ATM_PHYS
0131
0132 IF ( useAtm_Phys ) THEN
0133 CALL TIMER_START('ATM_PHYS_DRIVER [DO_ATMOSPHERIC_PHYS]',myThid)
0134 CALL ATM_PHYS_DRIVER( myTime, myIter, myThid )
0135 CALL TIMER_STOP( 'ATM_PHYS_DRIVER [DO_ATMOSPHERIC_PHYS]',myThid)
0136 ENDIF
0137 #endif /* ALLOW_ATM_PHYS */
c8e3a3b543 Jean*0138
0139 #ifdef ALLOW_AIM
067df0e288 Jean*0140 IF ( useAIM ) THEN
c8e3a3b543 Jean*0141
0142 #ifdef ALLOW_DEBUG
8440e8ae5d Jean*0143 IF (debugMode) CALL DEBUG_CALL('AIM_DO_PHYSICS',myThid)
c8e3a3b543 Jean*0144 #endif
067df0e288 Jean*0145 CALL TIMER_START('AIM_DO_PHYSICS [DO_ATMOSPHERIC_PHYS]',myThid)
0146 CALL AIM_DO_PHYSICS( myTime, myIter, myThid )
0147 CALL TIMER_STOP( 'AIM_DO_PHYSICS [DO_ATMOSPHERIC_PHYS]',myThid)
c8e3a3b543 Jean*0148 ENDIF
0149 #endif /* ALLOW_AIM */
0150
0151 #ifdef ALLOW_DEBUG
8440e8ae5d Jean*0152 IF (debugMode) CALL DEBUG_LEAVE('DO_ATMOSPHERIC_PHYS',myThid)
c8e3a3b543 Jean*0153 #endif
0154
0155 RETURN
0156 END