Changeset 2063
- Timestamp:
- 2010-08-25T12:28:28+02:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/dev_r1821_sbccpl_icecat/NEMO/OPA_SRC/SBC/sbccpl.F90
r1766 r2063 88 88 INTEGER, PARAMETER :: jpr_cal = 29 ! calving 89 89 INTEGER, PARAMETER :: jpr_taum = 30 ! wind stress module 90 #if ! defined key_cpl_carbon_cycle91 INTEGER, PARAMETER :: jprcv = 30 ! total number of fields received92 #else93 90 INTEGER, PARAMETER :: jpr_co2 = 31 94 91 INTEGER, PARAMETER :: jprcv = 31 ! total number of fields received 95 #endif 92 ! 96 93 INTEGER, PARAMETER :: jps_fice = 1 ! ice fraction 97 94 INTEGER, PARAMETER :: jps_toce = 2 ! ocean temperature … … 108 105 INTEGER, PARAMETER :: jps_ivy1 = 13 ! 109 106 INTEGER, PARAMETER :: jps_ivz1 = 14 ! 110 #if ! defined key_cpl_carbon_cycle111 INTEGER, PARAMETER :: jpsnd = 14 ! total number of fields sended112 #else113 107 INTEGER, PARAMETER :: jps_co2 = 15 114 108 INTEGER, PARAMETER :: jpsnd = 15 ! total number of fields sended 115 #endif 116 ! !!** namelist namsbc_cpl ** 117 ! Send to the atmosphere ! 118 CHARACTER(len=100) :: cn_snd_temperature = 'oce only' ! 'oce only' 'weighted oce and ice' or 'mixed oce-ice' 119 CHARACTER(len=100) :: cn_snd_albedo = 'none' ! 'none' 'weighted ice' or 'mixed oce-ice' 120 CHARACTER(len=100) :: cn_snd_thickness = 'none' ! 'none' or 'weighted ice and snow' 121 CHARACTER(len=100) :: cn_snd_crt_nature = 'none' ! 'none' 'oce only' 'weighted oce and ice' or 'mixed oce-ice' 122 CHARACTER(len=100) :: cn_snd_crt_refere = 'spherical' ! 'spherical' or 'cartesian' 123 CHARACTER(len=100) :: cn_snd_crt_orient = 'local grid' ! 'eastward-northward' or 'local grid' 124 CHARACTER(len=100) :: cn_snd_crt_grid = 'T' ! always at 'T' point 125 #if defined key_cpl_carbon_cycle 126 CHARACTER(len=100) :: cn_snd_co2 = 'none' ! 'none' or 'coupled' 127 #endif 128 ! Received from the atmosphere ! 129 CHARACTER(len=100) :: cn_rcv_tau_nature = 'oce only' ! 'oce only' 'oce and ice' or 'mixed oce-ice' 130 CHARACTER(len=100) :: cn_rcv_tau_refere = 'spherical' ! 'spherical' or 'cartesian' 131 CHARACTER(len=100) :: cn_rcv_tau_orient = 'local grid' ! 'eastward-northward' or 'local grid' 132 CHARACTER(len=100) :: cn_rcv_tau_grid = 'T' ! 'T', 'U,V', 'U,V,I', 'T,I', or 'T,U,V' 133 CHARACTER(len=100) :: cn_rcv_w10m = 'none' ! 'none' or 'coupled' 134 CHARACTER(len=100) :: cn_rcv_dqnsdt = 'none' ! 'none' or 'coupled' 135 CHARACTER(len=100) :: cn_rcv_qsr = 'oce only' ! 'oce only' 'conservative' 'oce and ice' or 'mixed oce-ice' 136 CHARACTER(len=100) :: cn_rcv_qns = 'oce only' ! 'oce only' 'conservative' 'oce and ice' or 'mixed oce-ice' 137 CHARACTER(len=100) :: cn_rcv_emp = 'oce only' ! 'oce only' 'conservative' or 'oce and ice' 138 CHARACTER(len=100) :: cn_rcv_rnf = 'coupled' ! 'coupled' 'climato' or 'mixed' 139 CHARACTER(len=100) :: cn_rcv_cal = 'none' ! 'none' or 'coupled' 140 CHARACTER(len=100) :: cn_rcv_taumod = 'none' ! 'none' or 'coupled' 141 #if defined key_cpl_carbon_cycle 142 CHARACTER(len=100) :: cn_rcv_co2 = 'none' ! 'none' or 'coupled' 143 #endif 109 ! 110 ! !!** namelist namsbc_cpl ** 111 TYPE :: FLD_C 112 CHARACTER(len = 32) :: cldes ! desciption of the coupling strategy 113 CHARACTER(len = 32) :: clcat ! multiple ice categories strategy 114 CHARACTER(len = 32) :: clvref ! reference of vector ('spherical' or 'cartesian') 115 CHARACTER(len = 32) :: clvor ! orientation of vector fields ('eastward-northward' or 'local grid') 116 CHARACTER(len = 32) :: clvgrd ! grids on which is located the vector fields 117 END TYPE FLD_C 118 ! Send to the atmosphere ! 119 TYPE(FLD_C) :: sn_snd_temp ! 'oce only' 'weighted oce and ice' or 'mixed oce-ice' 120 TYPE(FLD_C) :: sn_snd_alb ! 'none' 'weighted ice' or 'mixed oce-ice' 121 TYPE(FLD_C) :: sn_snd_thick ! 'none' or 'weighted ice and snow' 122 TYPE(FLD_C) :: sn_snd_crt ! 'none' 'oce only' 'weighted oce and ice' or 'mixed oce-ice' 123 TYPE(FLD_C) :: sn_snd_co2 ! 'none' or 'coupled' 124 ! Received from the atmosphere ! 125 TYPE(FLD_C) :: sn_rcv_w10m ! 'none' or 'coupled' 126 TYPE(FLD_C) :: sn_rcv_taumod ! 'none' or 'coupled' 127 TYPE(FLD_C) :: sn_rcv_tau ! 'oce only' 'oce and ice' or 'mixed oce-ice' 128 TYPE(FLD_C) :: sn_rcv_dqnsdt ! 'none' or 'coupled' 129 TYPE(FLD_C) :: sn_rcv_qsr ! 'oce only' 'conservative' 'oce and ice' or 'mixed oce-ice' 130 TYPE(FLD_C) :: sn_rcv_qns ! 'oce only' 'conservative' 'oce and ice' or 'mixed oce-ice' 131 TYPE(FLD_C) :: sn_rcv_emp ! 'oce only' 'conservative' or 'oce and ice' 132 TYPE(FLD_C) :: sn_rcv_rnf ! 'coupled' 'climato' or 'mixed' 133 TYPE(FLD_C) :: sn_rcv_cal ! 'none' or 'coupled' 134 TYPE(FLD_C) :: sn_rcv_co2 ! 'none' or 'coupled' 144 135 145 136 !! CHARACTER(len=100), PUBLIC :: cn_rcv_rnf !: ??? ==>> !!gm treat this case in a different maner 146 137 147 CHARACTER(len=100), DIMENSION(4) :: cn_snd_crt ! array combining cn_snd_crt_*148 CHARACTER(len=100), DIMENSION(4) :: cn_rcv_tau ! array combining cn_rcv_tau_*149 150 138 REAL(wp), DIMENSION(jpi,jpj) :: albedo_oce_mix ! ocean albedo sent to atmosphere (mix clear/overcast sky) 151 152 139 REAL(wp), DIMENSION(jpi,jpj,jprcv) :: frcv ! all fields recieved from the atmosphere 153 140 INTEGER , DIMENSION( jprcv) :: nrcvinfo ! OASIS info argument … … 178 165 !! 179 166 INTEGER :: jn ! dummy loop index 167 CHARACTER(len = 256) :: clname ! generic name of the NetCDF flux file 180 168 REAL(wp), DIMENSION(jpi,jpj) :: zacs, zaos ! 2D workspace (clear & overcast sky albedos) 181 169 !! 182 NAMELIST/namsbc_cpl/ cn_snd_temperature, cn_snd_albedo , cn_snd_thickness, & 183 cn_snd_crt_nature, cn_snd_crt_refere , cn_snd_crt_orient, cn_snd_crt_grid , & 184 cn_rcv_w10m , cn_rcv_taumod , & 185 cn_rcv_tau_nature, cn_rcv_tau_refere , cn_rcv_tau_orient, cn_rcv_tau_grid , & 186 cn_rcv_dqnsdt , cn_rcv_qsr , cn_rcv_qns , cn_rcv_emp , cn_rcv_rnf , cn_rcv_cal 187 #if defined key_cpl_carbon_cycle 188 NAMELIST/namsbc_cpl_co2/ cn_snd_co2, cn_rcv_co2 189 #endif 170 NAMELIST/namsbc_cpl/ sn_snd_temp, sn_snd_alb , sn_snd_thick, sn_snd_crt , sn_snd_co2, & 171 & sn_rcv_w10m, sn_rcv_taumod, sn_rcv_tau , sn_rcv_dqnsdt, sn_rcv_qsr, & 172 & sn_rcv_qns , sn_rcv_emp , sn_rcv_rnf , sn_rcv_cal , sn_rcv_co2 190 173 !!--------------------------------------------------------------------- 191 174 … … 193 176 ! Namelist informations ! 194 177 ! ================================ ! 178 179 ! default definitions 180 ! ! description ! multiple ! vector ! vector ! vector ! 181 ! ! ! categories ! reference ! orientation ! grids ! 182 ! send 183 sn_snd_temp = FLD_C( 'weighted oce and ice', 'no' , '' , '' , '' ) 184 sn_snd_alb = FLD_C( 'weighted ice' , 'no' , '' , '' , '' ) 185 sn_snd_thick = FLD_C( 'none' , 'no' , '' , '' , '' ) 186 sn_snd_crt = FLD_C( 'none' , 'no' , 'spherical' , 'eastward-northward' , 'T' ) 187 sn_snd_co2 = FLD_C( 'none' , 'no' , '' , '' , '' ) 188 ! receive 189 sn_rcv_w10m = FLD_C( 'none' , 'no' , '' , '' , '' ) 190 sn_rcv_taumod = FLD_C( 'coupled' , 'no' , '' , '' , '' ) 191 sn_rcv_tau = FLD_C( 'oce only' , 'no' , 'cartesian' , 'eastward-northward', 'U,V' ) 192 sn_rcv_dqnsdt = FLD_C( 'coupled' , 'no' , '' , '' , '' ) 193 sn_rcv_qsr = FLD_C( 'oce and ice' , 'no' , '' , '' , '' ) 194 sn_rcv_qns = FLD_C( 'oce and ice' , 'no' , '' , '' , '' ) 195 sn_rcv_emp = FLD_C( 'conservative' , 'no' , '' , '' , '' ) 196 sn_rcv_rnf = FLD_C( 'coupled' , 'no' , '' , '' , '' ) 197 sn_rcv_cal = FLD_C( 'coupled' , 'no' , '' , '' , '' ) 198 sn_rcv_co2 = FLD_C( 'none' , 'no' , '' , '' , '' ) 195 199 196 200 REWIND( numnam ) ! ... read namlist namsbc_cpl … … 201 205 WRITE(numout,*)'sbc_cpl_init : namsbc_cpl namelist ' 202 206 WRITE(numout,*)'~~~~~~~~~~~~' 203 WRITE(numout,*)' received fields' 204 WRITE(numout,*)' 10m wind module cn_rcv_w10m = ', cn_rcv_w10m 205 WRITE(numout,*)' surface stress - nature cn_rcv_tau_nature = ', cn_rcv_tau_nature 206 WRITE(numout,*)' - referential cn_rcv_tau_refere = ', cn_rcv_tau_refere 207 WRITE(numout,*)' - orientation cn_rcv_tau_orient = ', cn_rcv_tau_orient 208 WRITE(numout,*)' - mesh cn_rcv_tau_grid = ', cn_rcv_tau_grid 209 WRITE(numout,*)' non-solar heat flux sensitivity cn_rcv_dqnsdt = ', cn_rcv_dqnsdt 210 WRITE(numout,*)' solar heat flux cn_rcv_qsr = ', cn_rcv_qsr 211 WRITE(numout,*)' non-solar heat flux cn_rcv_qns = ', cn_rcv_qns 212 WRITE(numout,*)' freshwater budget cn_rcv_emp = ', cn_rcv_emp 213 WRITE(numout,*)' runoffs cn_rcv_rnf = ', cn_rcv_rnf 214 WRITE(numout,*)' calving cn_rcv_cal = ', cn_rcv_cal 215 WRITE(numout,*)' stress module cn_rcv_taumod = ', cn_rcv_taumod 216 WRITE(numout,*)' sent fields' 217 WRITE(numout,*)' surface temperature cn_snd_temperature = ', cn_snd_temperature 218 WRITE(numout,*)' albedo cn_snd_albedo = ', cn_snd_albedo 219 WRITE(numout,*)' ice/snow thickness cn_snd_thickness = ', cn_snd_thickness 220 WRITE(numout,*)' surface current - nature cn_snd_crt_nature = ', cn_snd_crt_nature 221 WRITE(numout,*)' - referential cn_snd_crt_refere = ', cn_snd_crt_refere 222 WRITE(numout,*)' - orientation cn_snd_crt_orient = ', cn_snd_crt_orient 223 WRITE(numout,*)' - mesh cn_snd_crt_grid = ', cn_snd_crt_grid 224 ENDIF 225 226 #if defined key_cpl_carbon_cycle 227 REWIND( numnam ) ! ... read namlist namsbc_cpl_co2 228 READ ( numnam, namsbc_cpl_co2 ) 229 IF(lwp) THEN ! control print 230 WRITE(numout,*) 231 WRITE(numout,*)'sbc_cpl_init : namsbc_cpl_co2 namelist ' 232 WRITE(numout,*)'~~~~~~~~~~~~' 233 WRITE(numout,*)' received fields' 234 WRITE(numout,*)' atm co2 cn_rcv_co2 = ', cn_rcv_co2 235 WRITE(numout,*)' sent fields' 236 WRITE(numout,*)' oce co2 flux cn_snd_co2 = ', cn_snd_co2 237 WRITE(numout,*) 238 ENDIF 239 #endif 240 ! save current & stress in an array and suppress possible blank in the name 241 cn_snd_crt(1) = TRIM( cn_snd_crt_nature ) ; cn_snd_crt(2) = TRIM( cn_snd_crt_refere ) 242 cn_snd_crt(3) = TRIM( cn_snd_crt_orient ) ; cn_snd_crt(4) = TRIM( cn_snd_crt_grid ) 243 cn_rcv_tau(1) = TRIM( cn_rcv_tau_nature ) ; cn_rcv_tau(2) = TRIM( cn_rcv_tau_refere ) 244 cn_rcv_tau(3) = TRIM( cn_rcv_tau_orient ) ; cn_rcv_tau(4) = TRIM( cn_rcv_tau_grid ) 207 WRITE(numout,*)' received fields (mutiple ice categogies)' 208 WRITE(numout,*)' 10m wind module = ', TRIM(sn_rcv_w10m%cldes ), ' (', TRIM(sn_rcv_w10m%clcat ), ')' 209 WRITE(numout,*)' stress module = ', TRIM(sn_rcv_taumod%cldes), ' (', TRIM(sn_rcv_taumod%clcat), ')' 210 WRITE(numout,*)' surface stress = ', TRIM(sn_rcv_tau%cldes ), ' (', TRIM(sn_rcv_tau%clcat ), ')' 211 WRITE(numout,*)' - referential = ', sn_rcv_tau%clvref 212 WRITE(numout,*)' - orientation = ', sn_rcv_tau%clvor 213 WRITE(numout,*)' - mesh = ', sn_rcv_tau%clvgrd 214 WRITE(numout,*)' non-solar heat flux sensitivity = ', TRIM(sn_rcv_dqnsdt%cldes), ' (', TRIM(sn_rcv_dqnsdt%clcat), ')' 215 WRITE(numout,*)' solar heat flux = ', TRIM(sn_rcv_qsr%cldes ), ' (', TRIM(sn_rcv_qsr%clcat ), ')' 216 WRITE(numout,*)' non-solar heat flux = ', TRIM(sn_rcv_qns%cldes ), ' (', TRIM(sn_rcv_qns%clcat ), ')' 217 WRITE(numout,*)' freshwater budget = ', TRIM(sn_rcv_emp%cldes ), ' (', TRIM(sn_rcv_emp%clcat ), ')' 218 WRITE(numout,*)' runoffs = ', TRIM(sn_rcv_rnf%cldes ), ' (', TRIM(sn_rcv_rnf%clcat ), ')' 219 WRITE(numout,*)' calving = ', TRIM(sn_rcv_cal%cldes ), ' (', TRIM(sn_rcv_cal%clcat ), ')' 220 WRITE(numout,*)' atm co2 = ', TRIM(sn_rcv_co2%cldes ), ' (', TRIM(sn_rcv_co2%clcat ), ')' 221 WRITE(numout,*)' sent fields (mutiple ice categogies)' 222 WRITE(numout,*)' surface temperature = ', TRIM(sn_snd_temp%cldes ), ' (', TRIM(sn_snd_temp%clcat ), ')' 223 WRITE(numout,*)' albedo = ', TRIM(sn_snd_alb%cldes ), ' (', TRIM(sn_snd_alb%clcat ), ')' 224 WRITE(numout,*)' ice/snow thickness = ', TRIM(sn_snd_thick%cldes ), ' (', TRIM(sn_snd_thick%clcat ), ')' 225 WRITE(numout,*)' surface current = ', TRIM(sn_snd_crt%cldes ), ' (', TRIM(sn_snd_crt%clcat ), ')' 226 WRITE(numout,*)' - referential = ', sn_snd_crt%clvref 227 WRITE(numout,*)' - orientation = ', sn_snd_crt%clvor 228 WRITE(numout,*)' - mesh = ', sn_snd_crt%clvgrd 229 WRITE(numout,*)' oce co2 flux = ', TRIM(sn_snd_co2%cldes ), ' (', TRIM(sn_snd_co2%clcat ), ')' 230 ENDIF 245 231 246 232 ! ================================ ! … … 274 260 srcv(jpr_itz2)%clname = 'O_ITauz2' ! 3rd - - - - 275 261 ! 276 srcv(jpr_otx1:jpr_itz2)%nsgn = -1 ! Vectors: change of sign at north fold 262 ! Vectors: change of sign at north fold ONLY if on the local grid 263 IF( TRIM( sn_rcv_tau%clvor ) == 'local grid' ) srcv(jpr_otx1:jpr_itz2)%nsgn = -1. 277 264 278 265 ! ! Set grid and action 279 SELECT CASE( TRIM( cn_rcv_tau(4) ) )! 'T', 'U,V', 'U,V,I', 'U,V,F', 'T,I', 'T,F', or 'T,U,V'266 SELECT CASE( TRIM( sn_rcv_tau%clvgrd ) ) ! 'T', 'U,V', 'U,V,I', 'U,V,F', 'T,I', 'T,F', or 'T,U,V' 280 267 CASE( 'T' ) 281 268 srcv(jpr_otx1:jpr_itz2)%clgrid = 'T' ! oce and ice components given at T-point … … 323 310 srcv(jpr_itx1:jpr_itz2)%laction = .TRUE. ! receive ice components on grid 1 & 2 324 311 CASE default 325 CALL ctl_stop( 'sbc_cpl_init: wrong definition of cn_rcv_tau(4)' )312 CALL ctl_stop( 'sbc_cpl_init: wrong definition of sn_rcv_tau%clvgrd' ) 326 313 END SELECT 327 314 ! 328 IF( TRIM( cn_rcv_tau(2)) == 'spherical' ) & ! spherical: 3rd component not received315 IF( TRIM( sn_rcv_tau%clvref ) == 'spherical' ) & ! spherical: 3rd component not received 329 316 & srcv( (/jpr_otz1, jpr_otz2, jpr_itz1, jpr_itz2/) )%laction = .FALSE. 330 317 ! 331 IF( TRIM( cn_rcv_tau(1)) /= 'oce and ice' ) THEN ! 'oce and ice' case ocean stress on ocean mesh used318 IF( TRIM( sn_rcv_tau%cldes ) /= 'oce and ice' ) THEN ! 'oce and ice' case ocean stress on ocean mesh used 332 319 srcv(jpr_itx1:jpr_itz2)%laction = .FALSE. ! ice components not received 333 320 srcv(jpr_itx1)%clgrid = 'U' ! ocean stress used after its transformation … … 347 334 srcv(jpr_semp)%clname = 'OISubMSn' ! ice solid water budget = sublimation - solid precipitation 348 335 srcv(jpr_oemp)%clname = 'OOEvaMPr' ! ocean water budget = ocean Evap - ocean precip 349 SELECT CASE( TRIM( cn_rcv_emp) )336 SELECT CASE( TRIM( sn_rcv_emp%cldes ) ) 350 337 CASE( 'oce only' ) ; srcv( jpr_oemp )%laction = .TRUE. 351 338 CASE( 'conservative' ) ; srcv( (/jpr_rain, jpr_snow, jpr_ievp, jpr_tevp/) )%laction = .TRUE. 352 339 CASE( 'oce and ice' ) ; srcv( (/jpr_ievp, jpr_sbpr, jpr_semp, jpr_oemp/) )%laction = .TRUE. 353 CASE default ; CALL ctl_stop( 'sbc_cpl_init: wrong definition of cn_rcv_emp' )340 CASE default ; CALL ctl_stop( 'sbc_cpl_init: wrong definition of sn_rcv_emp%cldes' ) 354 341 END SELECT 355 342 … … 357 344 ! ! Runoffs & Calving ! 358 345 ! ! ------------------------- ! 359 srcv(jpr_rnf )%clname = 'O_Runoff' ; IF( TRIM( cn_rcv_rnf) == 'coupled' ) srcv(jpr_rnf)%laction = .TRUE.360 IF( TRIM( cn_rcv_rnf) == 'climato' ) THEN ; ln_rnf = .TRUE.361 ELSE ; ln_rnf = .FALSE.346 srcv(jpr_rnf )%clname = 'O_Runoff' ; IF( TRIM( sn_rcv_rnf%cldes ) == 'coupled' ) srcv(jpr_rnf)%laction = .TRUE. 347 IF( TRIM( sn_rcv_rnf%cldes ) == 'climato' ) THEN ; ln_rnf = .TRUE. 348 ELSE ; ln_rnf = .FALSE. 362 349 ENDIF 363 srcv(jpr_cal )%clname = 'OCalving' ; IF( TRIM( cn_rcv_cal) == 'coupled' ) srcv(jpr_cal)%laction = .TRUE.350 srcv(jpr_cal )%clname = 'OCalving' ; IF( TRIM( sn_rcv_cal%cldes ) == 'coupled' ) srcv(jpr_cal)%laction = .TRUE. 364 351 365 352 ! ! ------------------------- ! … … 369 356 srcv(jpr_qnsice)%clname = 'O_QnsIce' 370 357 srcv(jpr_qnsmix)%clname = 'O_QnsMix' 371 SELECT CASE( TRIM( cn_rcv_qns ) )358 SELECT CASE( TRIM( sn_rcv_qns%cldes ) ) 372 359 CASE( 'oce only' ) ; srcv( jpr_qnsoce )%laction = .TRUE. 373 360 CASE( 'conservative' ) ; srcv( (/jpr_qnsice, jpr_qnsmix/) )%laction = .TRUE. 374 361 CASE( 'oce and ice' ) ; srcv( (/jpr_qnsice, jpr_qnsoce/) )%laction = .TRUE. 375 362 CASE( 'mixed oce-ice' ) ; srcv( jpr_qnsmix )%laction = .TRUE. 376 CASE default ; CALL ctl_stop( 'sbc_cpl_init: wrong definition of cn_rcv_qns' )363 CASE default ; CALL ctl_stop( 'sbc_cpl_init: wrong definition of sn_rcv_qns%cldes' ) 377 364 END SELECT 378 365 … … 383 370 srcv(jpr_qsrice)%clname = 'O_QsrIce' 384 371 srcv(jpr_qsrmix)%clname = 'O_QsrMix' 385 SELECT CASE( TRIM( cn_rcv_qsr) )372 SELECT CASE( TRIM( sn_rcv_qsr%cldes ) ) 386 373 CASE( 'oce only' ) ; srcv( jpr_qsroce )%laction = .TRUE. 387 374 CASE( 'conservative' ) ; srcv( (/jpr_qsrice, jpr_qsrmix/) )%laction = .TRUE. 388 375 CASE( 'oce and ice' ) ; srcv( (/jpr_qsrice, jpr_qsroce/) )%laction = .TRUE. 389 376 CASE( 'mixed oce-ice' ) ; srcv( jpr_qsrmix )%laction = .TRUE. 390 CASE default ; CALL ctl_stop( 'sbc_cpl_init: wrong definition of cn_rcv_qsr' )377 CASE default ; CALL ctl_stop( 'sbc_cpl_init: wrong definition of sn_rcv_qsr%cldes' ) 391 378 END SELECT 392 379 … … 395 382 ! ! ------------------------- ! 396 383 srcv(jpr_dqnsdt)%clname = 'O_dQnsdT' 397 IF( TRIM( cn_rcv_dqnsdt) == 'coupled' ) srcv(jpr_dqnsdt)%laction = .TRUE.384 IF( TRIM( sn_rcv_dqnsdt%cldes ) == 'coupled' ) srcv(jpr_dqnsdt)%laction = .TRUE. 398 385 ! 399 386 ! non solar sensitivity mandatory for ice model 400 IF( TRIM( cn_rcv_dqnsdt) == 'none' .AND. k_ice /= 0 ) &401 CALL ctl_stop( 'sbc_cpl_init: cn_rcv_dqnsdtmust be coupled in namsbc_cpl namelist' )387 IF( TRIM( sn_rcv_dqnsdt%cldes ) == 'none' .AND. k_ice /= 0 ) & 388 CALL ctl_stop( 'sbc_cpl_init: sn_rcv_dqnsdt%cldes must be coupled in namsbc_cpl namelist' ) 402 389 ! non solar sensitivity mandatory for mixed oce-ice solar radiation coupling technique 403 IF( TRIM( cn_rcv_dqnsdt ) == 'none' .AND. TRIM( cn_rcv_qns ) == 'mixed oce-ice' ) &404 CALL ctl_stop( 'sbc_cpl_init: namsbc_cpl namelist mismatch between cn_rcv_qns and cn_rcv_dqnsdt' )390 IF( TRIM( sn_rcv_dqnsdt%cldes ) == 'none' .AND. TRIM( sn_rcv_qns%cldes ) == 'mixed oce-ice' ) & 391 CALL ctl_stop( 'sbc_cpl_init: namsbc_cpl namelist mismatch between sn_rcv_qns%cldes and sn_rcv_dqnsdt%cldes' ) 405 392 ! ! ------------------------- ! 406 393 ! ! Ice Qsr penetration ! … … 415 402 ! ! 10m wind module ! 416 403 ! ! ------------------------- ! 417 srcv(jpr_w10m)%clname = 'O_Wind10' ; IF( TRIM( cn_rcv_w10m) == 'coupled' ) srcv(jpr_w10m)%laction = .TRUE.404 srcv(jpr_w10m)%clname = 'O_Wind10' ; IF( TRIM(sn_rcv_w10m %cldes ) == 'coupled' ) srcv(jpr_w10m)%laction = .TRUE. 418 405 ! 419 406 ! ! ------------------------- ! 420 407 ! ! wind stress module ! 421 408 ! ! ------------------------- ! 422 srcv(jpr_taum)%clname = 'O_TauMod' ; IF( TRIM( cn_rcv_taumod) == 'coupled' ) srcv(jpr_taum)%laction = .TRUE.409 srcv(jpr_taum)%clname = 'O_TauMod' ; IF( TRIM(sn_rcv_taumod%cldes) == 'coupled' ) srcv(jpr_taum)%laction = .TRUE. 423 410 lhftau = srcv(jpr_taum)%laction 424 411 425 #if defined key_cpl_carbon_cycle426 412 ! ! ------------------------- ! 427 413 ! ! Atmospheric CO2 ! 428 414 ! ! ------------------------- ! 429 srcv(jpr_co2 )%clname = 'O_AtmCO2' ; IF( TRIM(cn_rcv_co2 ) == 'coupled' ) srcv(jpr_co2 )%laction = .TRUE. 430 #endif 415 srcv(jpr_co2 )%clname = 'O_AtmCO2' ; IF( TRIM(sn_rcv_co2%cldes ) == 'coupled' ) srcv(jpr_co2 )%laction = .TRUE. 431 416 432 417 ! ================================ ! … … 446 431 ssnd(jps_tice)%clname = 'O_TepIce' 447 432 ssnd(jps_tmix)%clname = 'O_TepMix' 448 SELECT CASE( TRIM( cn_snd_temperature) )433 SELECT CASE( TRIM( sn_snd_temp%cldes ) ) 449 434 CASE( 'oce only' ) ; ssnd( jps_toce )%laction = .TRUE. 450 435 CASE( 'weighted oce and ice' ) ; ssnd( (/jps_toce, jps_tice/) )%laction = .TRUE. 451 436 CASE( 'mixed oce-ice' ) ; ssnd( jps_tmix )%laction = .TRUE. 452 CASE default ; CALL ctl_stop( 'sbc_cpl_init: wrong definition of cn_snd_temperature' )437 CASE default ; CALL ctl_stop( 'sbc_cpl_init: wrong definition of sn_snd_temp%cldes' ) 453 438 END SELECT 454 439 … … 458 443 ssnd(jps_albice)%clname = 'O_AlbIce' 459 444 ssnd(jps_albmix)%clname = 'O_AlbMix' 460 SELECT CASE( TRIM( cn_snd_albedo) )445 SELECT CASE( TRIM( sn_snd_alb%cldes ) ) 461 446 CASE( 'none' ) ! nothing to do 462 447 CASE( 'weighted ice' ) ; ssnd(jps_albice)%laction = .TRUE. 463 448 CASE( 'mixed oce-ice' ) ; ssnd(jps_albmix)%laction = .TRUE. 464 CASE default ; CALL ctl_stop( 'sbc_cpl_init: wrong definition of cn_snd_albedo' )449 CASE default ; CALL ctl_stop( 'sbc_cpl_init: wrong definition of sn_snd_alb%cldes' ) 465 450 END SELECT 466 451 ! … … 468 453 ! 1. sending mixed oce-ice albedo or 469 454 ! 2. receiving mixed oce-ice solar radiation 470 IF ( TRIM ( cn_snd_albedo ) == 'mixed oce-ice' .OR. TRIM ( cn_rcv_qsr) == 'mixed oce-ice' ) THEN455 IF ( TRIM ( sn_snd_alb%cldes ) == 'mixed oce-ice' .OR. TRIM ( sn_rcv_qsr%cldes ) == 'mixed oce-ice' ) THEN 471 456 CALL albedo_oce( zaos, zacs ) 472 457 ! Due to lack of information on nebulosity : mean clear/overcast sky … … 481 466 ssnd(jps_hsnw)%clname = 'O_SnwTck' 482 467 IF( k_ice /= 0 ) ssnd(jps_fice)%laction = .TRUE. ! if ice treated in the ocean (even in climato case) 483 IF( TRIM( cn_snd_thickness ) == 'weighted ice and snow' ) ssnd( (/jps_hice, jps_hsnw/) )%laction = .TRUE.468 IF( TRIM( sn_snd_thick%cldes ) == 'weighted ice and snow' ) ssnd( (/jps_hice, jps_hsnw/) )%laction = .TRUE. 484 469 485 470 ! ! ------------------------- ! … … 493 478 ssnd(jps_ocx1:jps_ivz1)%nsgn = -1 ! vectors: change of the sign at the north fold 494 479 495 IF( cn_snd_crt(4) /= 'T' ) CALL ctl_stop( 'cn_snd_crt(4)must be equal to T' )480 IF( sn_snd_crt%clvgrd /= 'T' ) CALL ctl_stop( 'sn_snd_crt%clvgrd must be equal to T' ) 496 481 ssnd(jps_ocx1:jps_ivz1)%clgrid = 'T' ! all oce and ice components on the same unique grid 497 482 498 483 ssnd(jps_ocx1:jps_ivz1)%laction = .TRUE. ! default: all are send 499 IF( TRIM( cn_snd_crt(2)) == 'spherical' ) ssnd( (/jps_ocz1, jps_ivz1/) )%laction = .FALSE.500 SELECT CASE( TRIM( cn_snd_crt(1)) )484 IF( TRIM( sn_snd_crt%clvref ) == 'spherical' ) ssnd( (/jps_ocz1, jps_ivz1/) )%laction = .FALSE. 485 SELECT CASE( TRIM( sn_snd_crt%cldes ) ) 501 486 CASE( 'none' ) ; ssnd(jps_ocx1:jps_ivz1)%laction = .FALSE. 502 487 CASE( 'oce only' ) ; ssnd(jps_ivx1:jps_ivz1)%laction = .FALSE. 503 488 CASE( 'weighted oce and ice' ) ! nothing to do 504 489 CASE( 'mixed oce-ice' ) ; ssnd(jps_ivx1:jps_ivz1)%laction = .FALSE. 505 CASE default ; CALL ctl_stop( 'sbc_cpl_init: wrong definition of cn_snd_crt(1)' )490 CASE default ; CALL ctl_stop( 'sbc_cpl_init: wrong definition of sn_snd_crt%cldes' ) 506 491 END SELECT 507 492 508 #if defined key_cpl_carbon_cycle509 493 ! ! ------------------------- ! 510 494 ! ! CO2 flux ! 511 495 ! ! ------------------------- ! 512 ssnd(jps_co2)%clname = 'O_CO2FLX' ; IF( TRIM( cn_snd_co2) == 'coupled' ) ssnd(jps_co2 )%laction = .TRUE.513 #endif 496 ssnd(jps_co2)%clname = 'O_CO2FLX' ; IF( TRIM(sn_snd_co2%cldes) == 'coupled' ) ssnd(jps_co2 )%laction = .TRUE. 497 514 498 ! 515 499 ! ================================ ! … … 594 578 IF( nrcvinfo(jpr_otx1) == OASIS_Rcv ) THEN 595 579 ! 596 IF( TRIM( cn_rcv_tau(2) ) == 'cartesian' ) THEN! 2 components on the sphere580 IF( TRIM( sn_rcv_tau%clvref ) == 'cartesian' ) THEN ! 2 components on the sphere 597 581 ! ! (cartesian to spherical -> 3 to 2 components) 598 582 ! … … 611 595 ENDIF 612 596 ! 613 IF( TRIM( cn_rcv_tau(3)) == 'eastward-northward' ) THEN ! 2 components oriented along the local grid614 ! ! (geographical to local grid -> rotate the components)597 IF( TRIM( sn_rcv_tau%clvor ) == 'eastward-northward' ) THEN ! 2 components oriented along the local grid 598 ! ! (geographical to local grid -> rotate the components) 615 599 CALL rot_rep( frcv(:,:,jpr_otx1), frcv(:,:,jpr_oty1), srcv(jpr_otx1)%clgrid, 'en->i', ztx ) 616 600 frcv(:,:,jpr_otx1) = ztx(:,:) ! overwrite 1st component on the 1st grid … … 722 706 ! 723 707 ! ! total freshwater fluxes over the ocean (emp, emps) 724 SELECT CASE( TRIM( cn_rcv_emp ) )! evaporation - precipitation708 SELECT CASE( TRIM( sn_rcv_emp%cldes ) ) ! evaporation - precipitation 725 709 CASE( 'conservative' ) 726 710 emp(:,:) = frcv(:,:,jpr_tevp) - ( frcv(:,:,jpr_rain) + frcv(:,:,jpr_snow) ) … … 728 712 emp(:,:) = frcv(:,:,jpr_oemp) 729 713 CASE default 730 CALL ctl_stop( 'sbc_cpl_rcv: wrong definition of cn_rcv_emp' )714 CALL ctl_stop( 'sbc_cpl_rcv: wrong definition of sn_rcv_emp%cldes' ) 731 715 END SELECT 732 716 ! … … 737 721 !!gm : this seems to be internal cooking, not sure to need that in a generic interface 738 722 !!gm at least should be optional... 739 !! IF( TRIM( cn_rcv_rnf) == 'coupled' ) THEN ! add to the total freshwater budget723 !! IF( TRIM( sn_rcv_rnf%cldes ) == 'coupled' ) THEN ! add to the total freshwater budget 740 724 !! ! remove negative runoff 741 725 !! zcumulpos = SUM( MAX( frcv(:,:,jpr_rnf), 0.e0 ) * e1t(:,:) * e2t(:,:) * tmask_i(:,:) ) … … 819 803 ! ! ======================= ! 820 804 ! 821 IF( TRIM( cn_rcv_tau(2) ) == 'cartesian' ) THEN! 2 components on the sphere805 IF( TRIM( sn_rcv_tau%clvref ) == 'cartesian' ) THEN ! 2 components on the sphere 822 806 ! ! (cartesian to spherical -> 3 to 2 components) 823 807 CALL geo2oce( frcv(:,:,jpr_itx1), frcv(:,:,jpr_ity1), frcv(:,:,jpr_itz1), & … … 835 819 ENDIF 836 820 ! 837 IF( TRIM( cn_rcv_tau(3)) == 'eastward-northward' ) THEN ! 2 components oriented along the local grid838 ! ! (geographical to local grid -> rotate the components)821 IF( TRIM( sn_rcv_tau%clvor ) == 'eastward-northward' ) THEN ! 2 components oriented along the local grid 822 ! ! (geographical to local grid -> rotate the components) 839 823 CALL rot_rep( frcv(:,:,jpr_itx1), frcv(:,:,jpr_ity1), srcv(jpr_itx1)%clgrid, 'en->i', ztx ) 840 824 frcv(:,:,jpr_itx1) = ztx(:,:) ! overwrite 1st component on the 1st grid … … 1054 1038 ! ! solid precipitation - sublimation (emp_ice) 1055 1039 ! ! solid Precipitation (sprecip) 1056 SELECT CASE( TRIM( cn_rcv_emp) )1040 SELECT CASE( TRIM( sn_rcv_emp%cldes ) ) 1057 1041 CASE( 'conservative' ) ! received fields: jpr_rain, jpr_snow, jpr_ievp, jpr_tevp 1058 1042 pemp_tot(:,:) = frcv(:,:,jpr_tevp) - frcv(:,:,jpr_rain) - frcv(:,:,jpr_snow) … … 1103 1087 1104 1088 ! ! ========================= ! 1105 SELECT CASE( TRIM( cn_rcv_qns ) )! non solar heat fluxes ! (qns)1089 SELECT CASE( TRIM( sn_rcv_qns%cldes ) ) ! non solar heat fluxes ! (qns) 1106 1090 ! ! ========================= ! 1107 1091 CASE( 'conservative' ) ! the required fields are directly provided … … 1140 1124 1141 1125 ! ! ========================= ! 1142 SELECT CASE( TRIM( cn_rcv_qsr ) )! solar heat fluxes ! (qsr)1126 SELECT CASE( TRIM( sn_rcv_qsr%cldes ) ) ! solar heat fluxes ! (qsr) 1143 1127 ! ! ========================= ! 1144 1128 CASE( 'conservative' ) … … 1157 1141 END SELECT 1158 1142 1159 SELECT CASE( TRIM( cn_rcv_dqnsdt) )1143 SELECT CASE( TRIM( sn_rcv_dqnsdt%cldes ) ) 1160 1144 CASE ('coupled') 1161 1145 pdqns_ice(:,:,1) = frcv(:,:,jpr_dqnsdt) … … 1190 1174 ! ! Surface temperature ! in Kelvin 1191 1175 ! ! ------------------------- ! 1192 SELECT CASE( cn_snd_temperature)1176 SELECT CASE( sn_snd_temp%cldes ) 1193 1177 CASE( 'oce only' ) ; ztmp1(:,:) = tn(:,:,1) + rt0 1194 1178 CASE( 'weighted oce and ice' ) ; ztmp1(:,:) = ( tn(:,:,1) + rt0 ) * zfr_l(:,:) 1195 1179 ztmp2(:,:) = tn_ice(:,:,1) * fr_i(:,:) 1196 1180 CASE( 'mixed oce-ice' ) ; ztmp1(:,:) = ( tn(:,:,1) + rt0 ) * zfr_l(:,:) + tn_ice(:,:,1) * fr_i(:,:) 1197 CASE default ; CALL ctl_stop( 'sbc_cpl_snd: wrong definition of cn_snd_temperature' )1181 CASE default ; CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_temp' ) 1198 1182 END SELECT 1199 1183 IF( ssnd(jps_toce)%laction ) CALL cpl_prism_snd( jps_toce, isec, ztmp1, info ) … … 1237 1221 ! i-1 i i 1238 1222 ! i i+1 (for I) 1239 SELECT CASE( TRIM( cn_snd_crt(1)) )1223 SELECT CASE( TRIM( sn_snd_crt%cldes ) ) 1240 1224 CASE( 'oce only' ) ! C-grid ==> T 1241 1225 DO jj = 2, jpjm1 … … 1318 1302 ! 1319 1303 ! 1320 IF( TRIM( cn_snd_crt(3) ) == 'eastward-northward' ) THEN! Rotation of the components1304 IF( TRIM( sn_snd_crt%clvor ) == 'eastward-northward' ) THEN ! Rotation of the components 1321 1305 ! ! Ocean component 1322 1306 CALL rot_rep( zotx1, zoty1, ssnd(jps_ocx1)%clgrid, 'ij->e', ztmp1 ) ! 1st component … … 1333 1317 ! 1334 1318 ! spherical coordinates to cartesian -> 2 components to 3 components 1335 IF( TRIM( cn_snd_crt(2)) == 'cartesian' ) THEN1319 IF( TRIM( sn_snd_crt%clvref ) == 'cartesian' ) THEN 1336 1320 ztmp1(:,:) = zotx1(:,:) ! ocean currents 1337 1321 ztmp2(:,:) = zoty1(:,:)
Note: See TracChangeset
for help on using the changeset viewer.