Changeset 10574 for branches/UKMO/AMM15_v3_6_STABLE_package_collate_BGC_DA/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90
- Timestamp:
- 2019-01-24T16:48:24+01:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/AMM15_v3_6_STABLE_package_collate_BGC_DA/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90
r9537 r10574 52 52 USE bdy_oce, ONLY: bdytmask 53 53 #endif 54 USE asmbgc ! Biogeochemistry assimilation 54 55 55 56 IMPLICIT NONE … … 62 63 PUBLIC ssh_asm_inc !: Apply the SSH increment 63 64 PUBLIC seaice_asm_inc !: Apply the seaice increment 65 PUBLIC bgc_asm_inc !: Apply the biogeochemistry increments 64 66 65 67 #if defined key_asminc … … 76 78 LOGICAL, PUBLIC :: ln_sshinc = .FALSE. !: No sea surface height assimilation increment 77 79 LOGICAL, PUBLIC :: ln_seaiceinc !: No sea ice concentration increment 80 LOGICAL, PUBLIC :: lk_bgcinc = .FALSE. !: No biogeochemistry increments 78 81 LOGICAL, PUBLIC :: ln_salfix = .FALSE. !: Apply minimum salinity check 79 82 LOGICAL, PUBLIC :: ln_temnofreeze = .FALSE. !: Don't allow the temperature to drop below freezing … … 161 164 ! so only apply surft increments. 162 165 !! 163 NAMELIST/nam_asminc/ ln_bkgwri, ln_avgbkg, 166 NAMELIST/nam_asminc/ ln_bkgwri, ln_avgbkg, ln_balwri, & 164 167 & ln_trainc, ln_dyninc, ln_sshinc, & 168 & ln_phytobal, ln_slchltotinc, ln_slchldiainc, & 169 & ln_slchlnoninc, ln_schltotinc, ln_slphytotinc, & 170 & ln_slphydiainc, ln_slphynoninc, ln_spco2inc, & 171 & ln_sfco2inc, ln_plchltotinc, ln_pchltotinc, & 172 & ln_pno3inc, ln_psi4inc, ln_pdicinc, ln_palkinc, & 173 & ln_pphinc, ln_po2inc, & 165 174 & ln_asmdin, ln_asmiau, & 166 175 & nitbkg, nitdin, nitiaustr, nitiaufin, niaufn, & 167 & ln_salfix, salfixmin, nn_divdmp, nitavgbkg, mld_choice 176 & ln_salfix, salfixmin, nn_divdmp, nitavgbkg, & 177 & mld_choice, mld_choice_bgc, rn_maxchlinc 168 178 !!---------------------------------------------------------------------- 169 179 … … 205 215 WRITE(numout,*) 'asm_inc_init : Assimilation increment initialization :' 206 216 WRITE(numout,*) '~~~~~~~~~~~~' 207 WRITE(numout,*) ' Namelist nam asm: set assimilation increment parameters'217 WRITE(numout,*) ' Namelist nam_asminc : set assimilation increment parameters' 208 218 WRITE(numout,*) ' Logical switch for writing out background state ln_bkgwri = ', ln_bkgwri 209 219 WRITE(numout,*) ' Logical switch for writing mean background state ln_avgbkg = ', ln_avgbkg 220 WRITE(numout,*) ' Logical switch for writing out balancing increments ln_balwri = ', ln_balwri 210 221 WRITE(numout,*) ' Logical switch for applying tracer increments ln_trainc = ', ln_trainc 211 222 WRITE(numout,*) ' Logical switch for applying velocity increments ln_dyninc = ', ln_dyninc … … 213 224 WRITE(numout,*) ' Logical switch for Direct Initialization (DI) ln_asmdin = ', ln_asmdin 214 225 WRITE(numout,*) ' Logical switch for applying sea ice increments ln_seaiceinc = ', ln_seaiceinc 226 WRITE(numout,*) ' Logical switch for phytoplankton balancing ln_phytobal = ', ln_phytobal 227 WRITE(numout,*) ' Logical switch for applying slchltot increments ln_slchltotinc = ', ln_slchltotinc 228 WRITE(numout,*) ' Logical switch for applying slchldia increments ln_slchldiainc = ', ln_slchldiainc 229 WRITE(numout,*) ' Logical switch for applying slchlnon increments ln_slchlnoninc = ', ln_slchlnoninc 230 WRITE(numout,*) ' Logical switch for applying schltot increments ln_schltotinc = ', ln_schltotinc 231 WRITE(numout,*) ' Logical switch for applying slphytot increments ln_slphytotinc = ', ln_slphytotinc 232 WRITE(numout,*) ' Logical switch for applying slphydia increments ln_slphydiainc = ', ln_slphydiainc 233 WRITE(numout,*) ' Logical switch for applying slphynon increments ln_slphynoninc = ', ln_slphynoninc 234 WRITE(numout,*) ' Logical switch for applying spco2 increments ln_spco2inc = ', ln_spco2inc 235 WRITE(numout,*) ' Logical switch for applying sfco2 increments ln_sfco2inc = ', ln_sfco2inc 236 WRITE(numout,*) ' Logical switch for applying plchltot increments ln_plchltotinc = ', ln_plchltotinc 237 WRITE(numout,*) ' Logical switch for applying pchltot increments ln_pchltotinc = ', ln_pchltotinc 238 WRITE(numout,*) ' Logical switch for applying pno3 increments ln_pno3inc = ', ln_pno3inc 239 WRITE(numout,*) ' Logical switch for applying psi4 increments ln_psi4inc = ', ln_psi4inc 240 WRITE(numout,*) ' Logical switch for applying pdic increments ln_pdicinc = ', ln_pdicinc 241 WRITE(numout,*) ' Logical switch for applying palk increments ln_palkinc = ', ln_palkinc 242 WRITE(numout,*) ' Logical switch for applying pph increments ln_pphinc = ', ln_pphinc 243 WRITE(numout,*) ' Logical switch for applying po2 increments ln_po2inc = ', ln_po2inc 215 244 WRITE(numout,*) ' Logical switch for Incremental Analysis Updating (IAU) ln_asmiau = ', ln_asmiau 216 245 WRITE(numout,*) ' Timestep of background in [0,nitend-nit000-1] nitbkg = ', nitbkg … … 223 252 WRITE(numout,*) ' Minimum salinity after applying the increments salfixmin = ', salfixmin 224 253 WRITE(numout,*) ' Choice of MLD for physics assimilation mld_choice = ', mld_choice 254 WRITE(numout,*) ' Choice of MLD for BGC assimilation mld_choice_bgc = ', mld_choice_bgc 255 WRITE(numout,*) ' Maximum absolute chlorophyll increment (<=0 = off) rn_maxchlinc = ', rn_maxchlinc 225 256 ENDIF 226 257 … … 263 294 WRITE(numout,*) ' iitavgbkg_date = ', iitavgbkg_date 264 295 ENDIF 296 IF ( ln_slchltotinc .OR. ln_slchldiainc .OR. ln_slchlnoninc .OR. & 297 & ln_schltotinc .OR. ln_slphytotinc .OR. ln_slphydiainc .OR. & 298 & ln_slphynoninc .OR. ln_spco2inc .OR. ln_sfco2inc .OR. & 299 & ln_plchltotinc .OR. ln_pchltotinc .OR. ln_pno3inc .OR. & 300 & ln_psi4inc .OR. ln_pdicinc .OR. ln_palkinc .OR. & 301 & ln_pphinc .OR. ln_po2inc ) THEN 302 lk_bgcinc = .TRUE. 303 ENDIF 265 304 266 305 IF ( nacc /= 0 ) & … … 274 313 275 314 IF ( ( ( .NOT. ln_asmdin ).AND.( .NOT. ln_asmiau ) ) & 276 .AND.( ( ln_trainc ).OR.( ln_dyninc ).OR.( ln_sshinc ) .OR. ( ln_seaiceinc) )) & 277 & CALL ctl_stop( ' One or more of ln_trainc, ln_dyninc, ln_sshinc and ln_seaiceinc is set to .true.', & 315 & .AND.( ( ln_trainc ).OR.( ln_dyninc ).OR.( ln_sshinc ).OR.( ln_seaiceinc ).OR. & 316 & ( lk_bgcinc ) )) & 317 & CALL ctl_stop( ' One or more of ln_trainc, ln_dyninc, ln_sshinc, ln_seaiceinc,', & 318 & ' ln_(bgc-variable)inc is set to .true.', & 278 319 & ' but ln_asmdin and ln_asmiau are both set to .false. :', & 279 320 & ' Inconsistent options') … … 284 325 285 326 IF ( ( .NOT. ln_trainc ).AND.( .NOT. ln_dyninc ).AND.( .NOT. ln_sshinc ).AND.( .NOT. ln_seaiceinc ) & 286 & ) & 287 & CALL ctl_warn( ' ln_trainc, ln_dyninc, ln_sshinc and ln_seaiceinc are set to .false. :', & 327 & .AND.( .NOT. lk_bgcinc ) ) & 328 & CALL ctl_warn( ' ln_trainc, ln_dyninc, ln_sshinc, ln_seaiceinc,', & 329 & ' ln_(bgc-variable)inc are set to .false. :', & 288 330 & ' The assimilation increments are not applied') 289 331 … … 310 352 & ' Assim bkg averaging period is outside', & 311 353 & ' the cycle interval') 354 355 IF ( lk_bgcinc ) CALL asm_bgc_check_options 312 356 313 357 IF ( nstop > 0 ) RETURN ! if there are any errors then go no further … … 412 456 ssh_iau(:,:) = 0.0 413 457 #endif 414 IF ( ( ln_trainc ).OR.( ln_dyninc ).OR.( ln_sshinc ).OR.( ln_seaiceinc ) ) THEN 458 IF ( ( ln_trainc ).OR.( ln_dyninc ).OR.( ln_sshinc ).OR.( ln_seaiceinc ) & 459 & .OR.( lk_bgcinc ) ) THEN 415 460 416 461 !-------------------------------------------------------------------- … … 545 590 ENDIF 546 591 592 IF ( lk_bgcinc ) THEN 593 CALL asm_bgc_init_incs( inum ) 594 ENDIF 595 547 596 CALL iom_close( inum ) 548 597 … … 655 704 CALL iom_close( inum ) 656 705 706 ENDIF 707 708 IF ( lk_bgcinc ) THEN 709 CALL asm_bgc_init_bkg 657 710 ENDIF 658 711 ! … … 1276 1329 1277 1330 END SUBROUTINE seaice_asm_inc 1331 1332 1333 SUBROUTINE bgc_asm_inc( kt ) 1334 !!---------------------------------------------------------------------- 1335 !! *** ROUTINE bgc_asm_inc *** 1336 !! 1337 !! ** Purpose : Apply the biogeochemistry assimilation increments 1338 !! 1339 !! ** Method : Call relevant routines in asmbgc 1340 !! 1341 !! ** Action : Call relevant routines in asmbgc 1342 !! 1343 !!---------------------------------------------------------------------- 1344 !! 1345 INTEGER, INTENT(in ) :: kt ! Current time step 1346 ! 1347 INTEGER :: icycper ! Dimension of wgtiau 1348 !! 1349 !!---------------------------------------------------------------------- 1350 1351 icycper = SIZE( wgtiau ) 1352 1353 ! Ocean colour variables first 1354 IF ( ln_slchltotinc .OR. ln_slchldiainc .OR. ln_slchlnoninc .OR. & 1355 & ln_schltotinc .OR. ln_slphytotinc .OR. ln_slphydiainc .OR. & 1356 & ln_slphynoninc ) THEN 1357 CALL phyto2d_asm_inc( kt, ln_asmdin, ln_asmiau, icycper, wgtiau ) 1358 ENDIF 1359 1360 ! Surface pCO2/fCO2 next 1361 IF ( ln_sfco2inc .OR. ln_spco2inc ) THEN 1362 CALL pco2_asm_inc( kt, ln_asmdin, ln_asmiau, icycper, wgtiau, & 1363 & ln_trainc, t_bkginc, s_bkginc ) 1364 ENDIF 1365 1366 ! Profile pH next 1367 IF ( ln_pphinc ) THEN 1368 CALL ph_asm_inc( kt, ln_asmdin, ln_asmiau, icycper, wgtiau, & 1369 & ln_trainc, t_bkginc, s_bkginc ) 1370 ENDIF 1371 1372 ! Then chlorophyll profiles 1373 IF ( ln_plchltotinc .OR. ln_pchltotinc ) THEN 1374 CALL phyto3d_asm_inc( kt, ln_asmdin, ln_asmiau, icycper, wgtiau ) 1375 ENDIF 1376 1377 ! Remaining bgc profile variables 1378 IF ( ln_pno3inc .OR. ln_psi4inc .OR. ln_pdicinc .OR. & 1379 & ln_palkinc .OR. ln_po2inc ) THEN 1380 CALL bgc3d_asm_inc( kt, ln_asmdin, ln_asmiau, icycper, wgtiau ) 1381 ENDIF 1382 1383 END SUBROUTINE bgc_asm_inc 1278 1384 1279 1385 !!======================================================================
Note: See TracChangeset
for help on using the changeset viewer.