Back to home page

MITgcm

 
 

    


File indexing completed on 2018-03-02 18:37:20 UTC

view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
ad0ca66649 Ed H*0001 #include "AIM_OPTIONS.h"
                0002 
                0003 CBOP
                0004 C     !ROUTINE: AIM_MNC_INIT
                0005 
                0006 C     !INTERFACE:
                0007       SUBROUTINE AIM_MNC_INIT( myThid )
                0008 
36651eeba7 Jean*0009 C     !DESCRIPTION:
ad0ca66649 Ed H*0010 C     Initialize MNC variables for AIM.
                0011 
                0012 C     !USES:
                0013       IMPLICIT NONE
                0014 #include "AIM_SIZE.h"
                0015 #include "EEPARAMS.h"
                0016 #include "PARAMS.h"
                0017 #include "AIM_PARAMS.h"
78ad6fc820 Ed H*0018 #ifdef ALLOW_MNC
                0019 #include "MNC_SIZE.h"
                0020 #include "MNC_PARAMS.h"
                0021 #endif
ad0ca66649 Ed H*0022 
                0023 C     !INPUT/OUTPUT PARAMETERS:
                0024       INTEGER myThid
                0025 CEOP
                0026 
36651eeba7 Jean*0027 #ifdef ALLOW_MNC
25c7945514 Dani*0028 C     == Local variables ==
                0029       CHARACTER*55 ln_var
36651eeba7 Jean*0030       INTEGER i,j, ndim
                0031       INTEGER CW_MAX_LOC
                0032       PARAMETER ( CW_MAX_LOC = 6 )
                0033       CHARACTER*(MNC_MAX_CHAR) dn(CW_MAX_LOC)
                0034       INTEGER dim(CW_MAX_LOC), ib(CW_MAX_LOC), ie(CW_MAX_LOC)
                0035 
                0036 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
25c7945514 Dani*0037 
78ad6fc820 Ed H*0038 
ad0ca66649 Ed H*0039       CALL MNC_CW_ADD_VNAME('USTRtave', 'U_xy_Hn__-__t',3,4,myThid)
25c7945514 Dani*0040       ln_var='u-stress'
                0041       CALL MNC_CW_ADD_VATTR_TEXT('USTRtave','long_name',ln_var,myThid)
209026a3a6 Dani*0042       CALL MNC_CW_ADD_VATTR_TEXT('USTRtave','units','Pa',myThid)
ad0ca66649 Ed H*0043 
                0044       CALL MNC_CW_ADD_VNAME('VSTRtave', 'V_xy_Hn__-__t',3,4,myThid)
25c7945514 Dani*0045       ln_var='v-stress'
                0046       CALL MNC_CW_ADD_VATTR_TEXT('VSTRtave','long_name',ln_var, myThid)
209026a3a6 Dani*0047       CALL MNC_CW_ADD_VATTR_TEXT('VSTRtave','units','Pa', myThid)
ad0ca66649 Ed H*0048 
                0049       CALL MNC_CW_ADD_VNAME('TSRtave', 'Cen_xy_Hn__-__t',3,4,myThid)
25c7945514 Dani*0050       ln_var='top-of-atm. shortwave radiation'
                0051       CALL MNC_CW_ADD_VATTR_TEXT('TSRtave','long_name',ln_var, myThid)
209026a3a6 Dani*0052       CALL MNC_CW_ADD_VATTR_TEXT('TSRtave','units','W/m2', myThid)
ad0ca66649 Ed H*0053 
                0054       CALL MNC_CW_ADD_VNAME('OLRtave', 'Cen_xy_Hn__-__t',3,4,myThid)
25c7945514 Dani*0055       ln_var='outgoing longwave radiation'
                0056       CALL MNC_CW_ADD_VATTR_TEXT('OLRtave','long_name',ln_var, myThid)
209026a3a6 Dani*0057       CALL MNC_CW_ADD_VATTR_TEXT('OLRtave','units','W/m2', myThid)
ad0ca66649 Ed H*0058 
                0059       CALL MNC_CW_ADD_VNAME('SSRtave', 'Cen_xy_Hn__-__t',3,4,myThid)
25c7945514 Dani*0060       ln_var='surface shortwave radiation'
                0061       CALL MNC_CW_ADD_VATTR_TEXT('SSRtave','long_name',ln_var, myThid)
209026a3a6 Dani*0062       CALL MNC_CW_ADD_VATTR_TEXT('SSRtave','units','W/m2', myThid)
ad0ca66649 Ed H*0063 
209026a3a6 Dani*0064       CALL MNC_CW_ADD_VNAME('SLRtave', 'Cen_xy_Hn__-__t',3,4,myThid)
25c7945514 Dani*0065       ln_var='surface longwave radiation'
                0066       CALL MNC_CW_ADD_VATTR_TEXT('SLRtave','long_name',ln_var,myThid)
209026a3a6 Dani*0067       CALL MNC_CW_ADD_VATTR_TEXT('SLRtave','units','W/m2', myThid)
ad0ca66649 Ed H*0068 
                0069       CALL MNC_CW_ADD_VNAME('SHFtave', 'Cen_xy_Hn__-__t',3,4,myThid)
25c7945514 Dani*0070       ln_var='sensible heat flux'
                0071       CALL MNC_CW_ADD_VATTR_TEXT('SHFtave','long_name',ln_var,myThid)
209026a3a6 Dani*0072       CALL MNC_CW_ADD_VATTR_TEXT('SHFtave','units','W/m2', myThid)
                0073 
                0074       CALL MNC_CW_ADD_VNAME('EVAPtave', 'Cen_xy_Hn__-__t',3,4,myThid)
25c7945514 Dani*0075       ln_var='evaporation'
                0076       CALL MNC_CW_ADD_VATTR_TEXT('EVAPtave','long_name',ln_var,myThid)
                0077       CALL MNC_CW_ADD_VATTR_TEXT('EVAPtave','units','g/(m2 s)',myThid)
ad0ca66649 Ed H*0078 
                0079       CALL MNC_CW_ADD_VNAME('PRECNVtave', 'Cen_xy_Hn__-__t',3,4,myThid)
25c7945514 Dani*0080       ln_var='convective precipitation'
                0081       CALL MNC_CW_ADD_VATTR_TEXT('PRECNVtave','long_name',ln_var,myThid)
                0082       CALL MNC_CW_ADD_VATTR_TEXT('PRECNVtave','units','g/(m2 s)',myThid)
ad0ca66649 Ed H*0083 
                0084       CALL MNC_CW_ADD_VNAME('PRECLStave', 'Cen_xy_Hn__-__t',3,4,myThid)
25c7945514 Dani*0085       ln_var='large-scale precipitation'
                0086       CALL MNC_CW_ADD_VATTR_TEXT('PRECLStave','long_name',ln_var,myThid)
                0087       CALL MNC_CW_ADD_VATTR_TEXT('PRECLStave','units','g/(m2 s)',myThid)
ad0ca66649 Ed H*0088 
                0089       CALL MNC_CW_ADD_VNAME('CLOUDCtave', 'Cen_xy_Hn__-__t',3,4,myThid)
25c7945514 Dani*0090       ln_var='total cloud cover'
                0091       CALL MNC_CW_ADD_VATTR_TEXT('CLOUDCtave','long_name',ln_var,myThid)
                0092       CALL MNC_CW_ADD_VATTR_TEXT('CLOUDCtave','units','fraction',myThid)
ad0ca66649 Ed H*0093 
                0094       CALL MNC_CW_ADD_VNAME('CLTOPtave', 'Cen_xy_Hn__-__t',3,4,myThid)
25c7945514 Dani*0095       ln_var='normalized pressure at cloud top'
                0096       CALL MNC_CW_ADD_VATTR_TEXT('CLTOPtave','long_name',ln_var,myThid)
ad0ca66649 Ed H*0097       CALL MNC_CW_ADD_VATTR_TEXT('CLTOPtave','units','---', myThid)
                0098 
                0099       CALL MNC_CW_ADD_VNAME('CBMFtave', 'Cen_xy_Hn__-__t',3,4,myThid)
25c7945514 Dani*0100       ln_var='cloud-base mass flux'
                0101       CALL MNC_CW_ADD_VATTR_TEXT('CBMFtave','long_name',ln_var,myThid)
                0102       CALL MNC_CW_ADD_VATTR_TEXT('CBMFtave','units','---',myThid)
ad0ca66649 Ed H*0103 
                0104       CALL MNC_CW_ADD_VNAME('DRAGtave', 'Cen_xy_Hn__-__t',3,4,myThid)
25c7945514 Dani*0105       ln_var='surface Drag term (= Cd*Rho*|V|) (land+sea combined)'
                0106       CALL MNC_CW_ADD_VATTR_TEXT('DRAGtave','long_name',ln_var,myThid)
ad0ca66649 Ed H*0107       CALL MNC_CW_ADD_VATTR_TEXT('DRAGtave','units','---', myThid)
                0108 
                0109       CALL MNC_CW_ADD_VNAME('aimV0tave', 'Cen_xy_Hn__-__t',3,4,myThid)
25c7945514 Dani*0110       ln_var='surface wind speed'
                0111       CALL MNC_CW_ADD_VATTR_TEXT('aimV0tave','long_name',ln_var,myThid)
                0112       CALL MNC_CW_ADD_VATTR_TEXT('aimV0tave','units','---',myThid)
ad0ca66649 Ed H*0113 
                0114       CALL MNC_CW_ADD_VNAME('aimT0tave', 'Cen_xy_Hn__-__t',3,4,myThid)
25c7945514 Dani*0115       ln_var='surface air absolute temp.'
                0116       CALL MNC_CW_ADD_VATTR_TEXT('aimT0tave','long_name',ln_var,myThid)
                0117       CALL MNC_CW_ADD_VATTR_TEXT('aimT0tave','units','K',myThid)
ad0ca66649 Ed H*0118 
                0119       CALL MNC_CW_ADD_VNAME('aimQ0tave', 'Cen_xy_Hn__-__t',3,4,myThid)
25c7945514 Dani*0120       ln_var='surface air spec. humidity'
                0121       CALL MNC_CW_ADD_VATTR_TEXT('aimQ0tave','long_name',ln_var,myThid)
                0122       CALL MNC_CW_ADD_VATTR_TEXT('aimQ0tave','units','g/kg',myThid)
ad0ca66649 Ed H*0123 
                0124       CALL MNC_CW_ADD_VNAME('EnFxPrtave', 'Cen_xy_Hn__-__t',3,4,myThid)
25c7945514 Dani*0125       ln_var='energy flux associated with precip. (snow, rain temp)'
                0126       CALL MNC_CW_ADD_VATTR_TEXT('EnFxPrtave','long_name',ln_var,myThid)
209026a3a6 Dani*0127       CALL MNC_CW_ADD_VATTR_TEXT('EnFxPrtave','units','W/m2', myThid)
ad0ca66649 Ed H*0128 
                0129       CALL MNC_CW_ADD_VNAME('albedotave', 'Cen_xy_Hn__-__t',3,4,myThid)
25c7945514 Dani*0130       ln_var='surface albedo'
                0131       CALL MNC_CW_ADD_VATTR_TEXT('albedotave','long_name',ln_var,myThid)
                0132       CALL MNC_CW_ADD_VATTR_TEXT('albedotave','units','fraction',myThid)
ad0ca66649 Ed H*0133 
                0134       CALL MNC_CW_ADD_VNAME('dTsurftave', 'Cen_xy_Hn__-__t',3,4,myThid)
25c7945514 Dani*0135       ln_var='surf. Temp change from 1 iter to the next one (>0)'
                0136       CALL MNC_CW_ADD_VATTR_TEXT('dTsurftave','long_name',ln_var,myThid)
209026a3a6 Dani*0137       CALL MNC_CW_ADD_VATTR_TEXT('dTsurftave','units','K', myThid)
ad0ca66649 Ed H*0138 
                0139       CALL MNC_CW_ADD_VNAME('aimRHtave', 'Cen_xy_Hn__C__t',4,5,myThid)
25c7945514 Dani*0140       ln_var='Relative Humidity'
                0141       CALL MNC_CW_ADD_VATTR_TEXT('aimRHtave','long_name',ln_var,myThid)
                0142       CALL MNC_CW_ADD_VATTR_TEXT('aimRHtave','units','fraction',myThid)
ad0ca66649 Ed H*0143 
78ad6fc820 Ed H*0144 C     Non-halo-ed variables
                0145       DO i = 1,CW_MAX_LOC
                0146         DO j = 1,MNC_MAX_CHAR
                0147           dn(i)(j:j) = ' '
                0148         ENDDO
                0149         dim(i) = 0
                0150         ib(i) = 0
                0151         ie(i) = 0
                0152       ENDDO
                0153 
                0154       ndim = 1
                0155       dn(ndim)(1:1) = 'X'
                0156       dim(ndim) = sNx
                0157       ib(ndim)  = 1
                0158       ie(ndim)  = sNx
                0159       ndim = ndim + 1
                0160       dn(ndim)(1:1) = 'Y'
                0161       dim(ndim) = sNy
                0162       ib(ndim)  = 1
                0163       ie(ndim)  = sNy
                0164       ndim = ndim + 1
                0165       dn(ndim)(1:1) = 'T'
                0166       dim(ndim) = -1
                0167       ib(ndim)  = 1
                0168       ie(ndim)  = 1
                0169       CALL MNC_CW_ADD_GNAME('AIM_xyt',  ndim, dim,dn,ib,ie, myThid)
                0170       ndim = 3
                0171       dn(ndim)(1:4) = 'Zaim'
                0172       dim(ndim) = NLEV
                0173       ib(ndim)  = 1
                0174       ie(ndim)  = NLEV
                0175       ndim = ndim + 1
                0176       dn(ndim)(1:1) = 'T'
                0177       dim(ndim) = -1
                0178       ib(ndim)  = 1
                0179       ie(ndim)  = 1
                0180       CALL MNC_CW_ADD_GNAME('AIM_xyzt', ndim, dim,dn,ib,ie, myThid)
                0181 
                0182 
                0183       CALL MNC_CW_ADD_VNAME('aim_DRAG0','AIM_xyt',0,0,myThid)
                0184       CALL MNC_CW_ADD_VATTR_TEXT('aim_DRAG0','units','---',myThid)
                0185 
                0186       CALL MNC_CW_ADD_VNAME('aim_SPEED0','AIM_xyt',0,0,myThid)
                0187       CALL MNC_CW_ADD_VATTR_TEXT('aim_SPEED0','units','---',myThid)
                0188 
                0189       CALL MNC_CW_ADD_VNAME('aim_TSR','AIM_xyt',0,0,myThid)
                0190       CALL MNC_CW_ADD_VATTR_TEXT('aim_TSR','units','---',myThid)
                0191 
                0192       CALL MNC_CW_ADD_VNAME('aim_OLR','AIM_xyt',0,0,myThid)
                0193       CALL MNC_CW_ADD_VATTR_TEXT('aim_OLR','units','---',myThid)
                0194 
                0195       CALL MNC_CW_ADD_VNAME('aim_SSR0','AIM_xyt',0,0,myThid)
                0196       CALL MNC_CW_ADD_VATTR_TEXT('aim_SSR0','units','---',myThid)
                0197 
                0198       CALL MNC_CW_ADD_VNAME('aim_SLR0','AIM_xyt',0,0,myThid)
                0199       CALL MNC_CW_ADD_VATTR_TEXT('aim_SLR0','units','---',myThid)
                0200 
                0201       CALL MNC_CW_ADD_VNAME('aim_SHF0','AIM_xyt',0,0,myThid)
                0202       CALL MNC_CW_ADD_VATTR_TEXT('aim_SHF0','units','---',myThid)
                0203 
                0204       CALL MNC_CW_ADD_VNAME('aim_EVAP0','AIM_xyt',0,0,myThid)
                0205       CALL MNC_CW_ADD_VATTR_TEXT('aim_EVAP0','units','---',myThid)
                0206 
                0207       CALL MNC_CW_ADD_VNAME('aim_PRECNV','AIM_xyt',0,0,myThid)
                0208       CALL MNC_CW_ADD_VATTR_TEXT('aim_PRECNV','units','---',myThid)
                0209 
                0210       CALL MNC_CW_ADD_VNAME('aim_PRECLS','AIM_xyt',0,0,myThid)
                0211       CALL MNC_CW_ADD_VATTR_TEXT('aim_PRECLS','units','---',myThid)
                0212 
                0213       CALL MNC_CW_ADD_VNAME('aim_CLOUDC','AIM_xyt',0,0,myThid)
                0214       CALL MNC_CW_ADD_VATTR_TEXT('aim_CLOUDC','units','---',myThid)
                0215 
                0216       CALL MNC_CW_ADD_VNAME('aim_CLTOP','AIM_xyt',0,0,myThid)
                0217       CALL MNC_CW_ADD_VATTR_TEXT('aim_CLTOP','units','---',myThid)
                0218 
                0219       CALL MNC_CW_ADD_VNAME('aim_CBMF','AIM_xyt',0,0,myThid)
                0220       CALL MNC_CW_ADD_VATTR_TEXT('aim_CBMF','units','---',myThid)
                0221 
                0222       CALL MNC_CW_ADD_VNAME('aim_T0','AIM_xyt',0,0,myThid)
                0223       CALL MNC_CW_ADD_VATTR_TEXT('aim_T0','units','---',myThid)
                0224 
                0225       CALL MNC_CW_ADD_VNAME('aim_Q0','AIM_xyt',0,0,myThid)
                0226       CALL MNC_CW_ADD_VATTR_TEXT('aim_Q0','units','---',myThid)
                0227 
                0228       CALL MNC_CW_ADD_VNAME('aim_EnPrec','AIM_xyt',0,0,myThid)
                0229       CALL MNC_CW_ADD_VATTR_TEXT('aim_EnPrec','units','J/g',myThid)
                0230 
                0231       CALL MNC_CW_ADD_VNAME('aim_alb10','AIM_xyt',0,0,myThid)
                0232       CALL MNC_CW_ADD_VATTR_TEXT('aim_alb10','units','---',myThid)
                0233 
                0234       CALL MNC_CW_ADD_VNAME('aim_dTsurf1','AIM_xyt',0,0,myThid)
                0235       CALL MNC_CW_ADD_VATTR_TEXT('aim_dTsurf1','units','---',myThid)
                0236 
                0237       CALL MNC_CW_ADD_VNAME('aim_TSWclr','AIM_xyt',0,0,myThid)
                0238       CALL MNC_CW_ADD_VATTR_TEXT('aim_TSWclr','units','---',myThid)
                0239 
                0240       CALL MNC_CW_ADD_VNAME('aim_OLWclr','AIM_xyt',0,0,myThid)
                0241       CALL MNC_CW_ADD_VATTR_TEXT('aim_OLWclr','units','---',myThid)
                0242 
                0243       CALL MNC_CW_ADD_VNAME('aim_SSWclr','AIM_xyt',0,0,myThid)
                0244       CALL MNC_CW_ADD_VATTR_TEXT('aim_SSWclr','units','---',myThid)
                0245 
                0246       CALL MNC_CW_ADD_VNAME('aim_SLWclr','AIM_xyt',0,0,myThid)
                0247       CALL MNC_CW_ADD_VATTR_TEXT('aim_SLWclr','units','---',myThid)
                0248 
36651eeba7 Jean*0249 #endif /* ALLOW_MNC */
ad0ca66649 Ed H*0250 
                0251       RETURN
                0252       END