Changeset 10728 for branches/UKMO/AMM15_v3_6_STABLE_package_collate/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90
- Timestamp:
- 2019-02-28T13:10:20+01:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/AMM15_v3_6_STABLE_package_collate/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90
r9537 r10728 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_slchlnaninc, ln_slchlpicinc, ln_slchldininc, & 170 & ln_slchlnoninc, ln_schltotinc, ln_slphytotinc, & 171 & ln_slphydiainc, ln_slphynoninc, ln_spco2inc, & 172 & ln_sfco2inc, ln_plchltotinc, ln_pchltotinc, & 173 & ln_pno3inc, ln_psi4inc, ln_pdicinc, ln_palkinc, & 174 & ln_pphinc, ln_po2inc, ln_ppo4inc, & 165 175 & ln_asmdin, ln_asmiau, & 166 176 & nitbkg, nitdin, nitiaustr, nitiaufin, niaufn, & 167 & ln_salfix, salfixmin, nn_divdmp, nitavgbkg, mld_choice 177 & ln_salfix, salfixmin, nn_divdmp, nitavgbkg, & 178 & mld_choice, mld_choice_bgc, rn_maxchlinc 168 179 !!---------------------------------------------------------------------- 169 180 … … 205 216 WRITE(numout,*) 'asm_inc_init : Assimilation increment initialization :' 206 217 WRITE(numout,*) '~~~~~~~~~~~~' 207 WRITE(numout,*) ' Namelist nam asm: set assimilation increment parameters'218 WRITE(numout,*) ' Namelist nam_asminc : set assimilation increment parameters' 208 219 WRITE(numout,*) ' Logical switch for writing out background state ln_bkgwri = ', ln_bkgwri 209 220 WRITE(numout,*) ' Logical switch for writing mean background state ln_avgbkg = ', ln_avgbkg 221 WRITE(numout,*) ' Logical switch for writing out balancing increments ln_balwri = ', ln_balwri 210 222 WRITE(numout,*) ' Logical switch for applying tracer increments ln_trainc = ', ln_trainc 211 223 WRITE(numout,*) ' Logical switch for applying velocity increments ln_dyninc = ', ln_dyninc … … 213 225 WRITE(numout,*) ' Logical switch for Direct Initialization (DI) ln_asmdin = ', ln_asmdin 214 226 WRITE(numout,*) ' Logical switch for applying sea ice increments ln_seaiceinc = ', ln_seaiceinc 227 WRITE(numout,*) ' Logical switch for phytoplankton balancing ln_phytobal = ', ln_phytobal 228 WRITE(numout,*) ' Logical switch for applying slchltot increments ln_slchltotinc = ', ln_slchltotinc 229 WRITE(numout,*) ' Logical switch for applying slchldia increments ln_slchldiainc = ', ln_slchldiainc 230 WRITE(numout,*) ' Logical switch for applying slchlnon increments ln_slchlnoninc = ', ln_slchlnoninc 231 WRITE(numout,*) ' Logical switch for applying slchlnan increments ln_slchlnaninc = ', ln_slchlnaninc 232 WRITE(numout,*) ' Logical switch for applying slchlpic increments ln_slchlpicinc = ', ln_slchlpicinc 233 WRITE(numout,*) ' Logical switch for applying slchldin increments ln_slchldininc = ', ln_slchldininc 234 WRITE(numout,*) ' Logical switch for applying schltot increments ln_schltotinc = ', ln_schltotinc 235 WRITE(numout,*) ' Logical switch for applying slphytot increments ln_slphytotinc = ', ln_slphytotinc 236 WRITE(numout,*) ' Logical switch for applying slphydia increments ln_slphydiainc = ', ln_slphydiainc 237 WRITE(numout,*) ' Logical switch for applying slphynon increments ln_slphynoninc = ', ln_slphynoninc 238 WRITE(numout,*) ' Logical switch for applying spco2 increments ln_spco2inc = ', ln_spco2inc 239 WRITE(numout,*) ' Logical switch for applying sfco2 increments ln_sfco2inc = ', ln_sfco2inc 240 WRITE(numout,*) ' Logical switch for applying plchltot increments ln_plchltotinc = ', ln_plchltotinc 241 WRITE(numout,*) ' Logical switch for applying pchltot increments ln_pchltotinc = ', ln_pchltotinc 242 WRITE(numout,*) ' Logical switch for applying pno3 increments ln_pno3inc = ', ln_pno3inc 243 WRITE(numout,*) ' Logical switch for applying psi4 increments ln_psi4inc = ', ln_psi4inc 244 WRITE(numout,*) ' Logical switch for applying ppo4 increments ln_ppo4inc = ', ln_ppo4inc 245 WRITE(numout,*) ' Logical switch for applying pdic increments ln_pdicinc = ', ln_pdicinc 246 WRITE(numout,*) ' Logical switch for applying palk increments ln_palkinc = ', ln_palkinc 247 WRITE(numout,*) ' Logical switch for applying pph increments ln_pphinc = ', ln_pphinc 248 WRITE(numout,*) ' Logical switch for applying po2 increments ln_po2inc = ', ln_po2inc 215 249 WRITE(numout,*) ' Logical switch for Incremental Analysis Updating (IAU) ln_asmiau = ', ln_asmiau 216 250 WRITE(numout,*) ' Timestep of background in [0,nitend-nit000-1] nitbkg = ', nitbkg … … 223 257 WRITE(numout,*) ' Minimum salinity after applying the increments salfixmin = ', salfixmin 224 258 WRITE(numout,*) ' Choice of MLD for physics assimilation mld_choice = ', mld_choice 259 WRITE(numout,*) ' Choice of MLD for BGC assimilation mld_choice_bgc = ', mld_choice_bgc 260 WRITE(numout,*) ' Maximum absolute chlorophyll increment (<=0 = off) rn_maxchlinc = ', rn_maxchlinc 225 261 ENDIF 226 262 … … 263 299 WRITE(numout,*) ' iitavgbkg_date = ', iitavgbkg_date 264 300 ENDIF 301 IF ( ln_slchltotinc .OR. ln_slchldiainc .OR. ln_slchlnoninc .OR. & 302 & ln_slchlnaninc .OR. ln_slchlpicinc .OR. ln_slchldininc .OR. & 303 & ln_schltotinc .OR. ln_slphytotinc .OR. ln_slphydiainc .OR. & 304 & ln_slphynoninc .OR. ln_spco2inc .OR. ln_sfco2inc .OR. & 305 & ln_plchltotinc .OR. ln_pchltotinc .OR. ln_pno3inc .OR. & 306 & ln_psi4inc .OR. ln_pdicinc .OR. ln_palkinc .OR. & 307 & ln_pphinc .OR. ln_po2inc .OR. ln_ppo4inc ) THEN 308 lk_bgcinc = .TRUE. 309 ENDIF 265 310 266 311 IF ( nacc /= 0 ) & … … 274 319 275 320 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.', & 321 & .AND.( ( ln_trainc ).OR.( ln_dyninc ).OR.( ln_sshinc ).OR.( ln_seaiceinc ).OR. & 322 & ( lk_bgcinc ) )) & 323 & CALL ctl_stop( ' One or more of ln_trainc, ln_dyninc, ln_sshinc, ln_seaiceinc,', & 324 & ' ln_(bgc-variable)inc is set to .true.', & 278 325 & ' but ln_asmdin and ln_asmiau are both set to .false. :', & 279 326 & ' Inconsistent options') … … 284 331 285 332 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. :', & 333 & .AND.( .NOT. lk_bgcinc ) ) & 334 & CALL ctl_warn( ' ln_trainc, ln_dyninc, ln_sshinc, ln_seaiceinc,', & 335 & ' ln_(bgc-variable)inc are set to .false. :', & 288 336 & ' The assimilation increments are not applied') 289 337 … … 310 358 & ' Assim bkg averaging period is outside', & 311 359 & ' the cycle interval') 360 361 IF ( lk_bgcinc ) CALL asm_bgc_check_options 312 362 313 363 IF ( nstop > 0 ) RETURN ! if there are any errors then go no further … … 412 462 ssh_iau(:,:) = 0.0 413 463 #endif 414 IF ( ( ln_trainc ).OR.( ln_dyninc ).OR.( ln_sshinc ).OR.( ln_seaiceinc ) ) THEN 464 IF ( ( ln_trainc ).OR.( ln_dyninc ).OR.( ln_sshinc ).OR.( ln_seaiceinc ) & 465 & .OR.( lk_bgcinc ) ) THEN 415 466 416 467 !-------------------------------------------------------------------- … … 545 596 ENDIF 546 597 598 IF ( lk_bgcinc ) THEN 599 CALL asm_bgc_init_incs( inum ) 600 ENDIF 601 547 602 CALL iom_close( inum ) 548 603 … … 655 710 CALL iom_close( inum ) 656 711 712 ENDIF 713 714 IF ( lk_bgcinc ) THEN 715 CALL asm_bgc_init_bkg 657 716 ENDIF 658 717 ! … … 1276 1335 1277 1336 END SUBROUTINE seaice_asm_inc 1337 1338 1339 SUBROUTINE bgc_asm_inc( kt ) 1340 !!---------------------------------------------------------------------- 1341 !! *** ROUTINE bgc_asm_inc *** 1342 !! 1343 !! ** Purpose : Apply the biogeochemistry assimilation increments 1344 !! 1345 !! ** Method : Call relevant routines in asmbgc 1346 !! 1347 !! ** Action : Call relevant routines in asmbgc 1348 !! 1349 !!---------------------------------------------------------------------- 1350 !! 1351 INTEGER, INTENT(in ) :: kt ! Current time step 1352 ! 1353 INTEGER :: icycper ! Dimension of wgtiau 1354 !! 1355 !!---------------------------------------------------------------------- 1356 1357 icycper = SIZE( wgtiau ) 1358 1359 ! Ocean colour variables first 1360 IF ( ln_slchltotinc .OR. ln_slchldiainc .OR. ln_slchlnoninc .OR. & 1361 & ln_slchlnaninc .OR. ln_slchlpicinc .OR. ln_slchldininc .OR. & 1362 & ln_schltotinc .OR. ln_slphytotinc .OR. ln_slphydiainc .OR. & 1363 & ln_slphynoninc ) THEN 1364 CALL phyto2d_asm_inc( kt, ln_asmdin, ln_asmiau, icycper, wgtiau ) 1365 ENDIF 1366 1367 ! Surface pCO2/fCO2 next 1368 IF ( ln_sfco2inc .OR. ln_spco2inc ) THEN 1369 CALL pco2_asm_inc( kt, ln_asmdin, ln_asmiau, icycper, wgtiau, & 1370 & ln_trainc, t_bkginc, s_bkginc ) 1371 ENDIF 1372 1373 ! Profile pH next 1374 IF ( ln_pphinc ) THEN 1375 CALL ph_asm_inc( kt, ln_asmdin, ln_asmiau, icycper, wgtiau, & 1376 & ln_trainc, t_bkginc, s_bkginc ) 1377 ENDIF 1378 1379 ! Then chlorophyll profiles 1380 IF ( ln_plchltotinc .OR. ln_pchltotinc ) THEN 1381 CALL phyto3d_asm_inc( kt, ln_asmdin, ln_asmiau, icycper, wgtiau ) 1382 ENDIF 1383 1384 ! Remaining bgc profile variables 1385 IF ( ln_pno3inc .OR. ln_psi4inc .OR. ln_pdicinc .OR. & 1386 & ln_palkinc .OR. ln_po2inc .OR. ln_ppo4inc ) THEN 1387 CALL bgc3d_asm_inc( kt, ln_asmdin, ln_asmiau, icycper, wgtiau ) 1388 ENDIF 1389 1390 END SUBROUTINE bgc_asm_inc 1278 1391 1279 1392 !!======================================================================
Note: See TracChangeset
for help on using the changeset viewer.