Changeset 10055
- Timestamp:
- 2018-08-20T15:17:09+02:00 (5 years ago)
- Location:
- branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc_v3/NEMOGCM
- Files:
-
- 16 edited
- 4 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc_v3/NEMOGCM/CONFIG/SHARED/namelist_ref
r8447 r10055 1287 1287 &nam_asminc ! assimilation increments ('key_asminc') 1288 1288 !----------------------------------------------------------------------- 1289 ln_bkgwri = .false. ! Logical switch for writing out background state 1290 ln_trainc = .false. ! Logical switch for applying tracer increments 1291 ln_dyninc = .false. ! Logical switch for applying velocity increments 1292 ln_sshinc = .false. ! Logical switch for applying SSH increments 1293 ln_asmdin = .false. ! Logical switch for Direct Initialization (DI) 1294 ln_asmiau = .false. ! Logical switch for Incremental Analysis Updating (IAU) 1295 ln_seaiceinc = .false. ! Logical switch for applying sea ice increments 1289 ln_bkgwri = .false. ! Logical switch for writing out background state 1290 ln_balwri = .false. ! Logical switch for writing out balancing increments 1291 ln_trainc = .false. ! Logical switch for applying tracer increments 1292 ln_dyninc = .false. ! Logical switch for applying velocity increments 1293 ln_sshinc = .false. ! Logical switch for applying SSH increments 1294 ln_asmdin = .false. ! Logical switch for Direct Initialization (DI) 1295 ln_asmiau = .false. ! Logical switch for Incremental Analysis Updating (IAU) 1296 ln_seaiceinc = .false. ! Logical switch for applying sea ice increments 1297 ln_phytobal = .false. ! Logical switch for phytoplankton multivariate balancing 1298 ln_slchltotinc = .false. ! Logical switch for applying slchltot increments 1299 ln_slchldiainc = .false. ! Logical switch for applying slchldia increments 1300 ln_slchlnoninc = .false. ! Logical switch for applying slchlnon increments 1301 ln_schltotinc = .false. ! Logical switch for applying schltot increments 1302 ln_slphytotinc = .false. ! Logical switch for applying slphytot increments 1303 ln_slphydiainc = .false. ! Logical switch for applying slphydia increments 1304 ln_slphynoninc = .false. ! Logical switch for applying slphynon increments 1305 ln_sfco2inc = .false. ! Logical switch for applying sfCO2 increments 1306 ln_spco2inc = .false. ! Logical switch for applying spCO2 increments 1307 ln_plchltotinc = .false. ! Logical switch for applying plchltot increments 1308 ln_pchltotinc = .false. ! Logical switch for applying pchltot increments 1309 ln_pno3inc = .false. ! Logical switch for applying pno3 increments 1310 ln_psi4inc = .false. ! Logical switch for applying psi4 increments 1311 ln_pdicinc = .false. ! Logical switch for applying pdic increments 1312 ln_palkinc = .false. ! Logical switch for applying palk increments 1313 ln_pphinc = .false. ! Logical switch for applying pph increments 1314 ln_po2inc = .false. ! Logical switch for applying po2 increments 1296 1315 ln_temnofreeze = .false. ! Logical to not add increments if temperature would fall below freezing 1297 nitbkg = 0 ! Timestep of background in [0,nitend-nit000-1] 1298 nitdin = 0 ! Timestep of background for DI in [0,nitend-nit000-1] 1299 nitiaustr = 1 ! Timestep of start of IAU interval in [0,nitend-nit000-1] 1300 nitiaufin = 15 ! Timestep of end of IAU interval in [0,nitend-nit000-1] 1301 niaufn = 0 ! Type of IAU weighting function 1302 ln_salfix = .false. ! Logical switch for ensuring that the sa > salfixmin 1303 salfixmin = -9999 ! Minimum salinity after applying the increments 1304 nn_divdmp = 0 ! Number of iterations of divergence damping operator 1316 nitbkg = 0 ! Timestep of background in [0,nitend-nit000-1] 1317 nitdin = 0 ! Timestep of background for DI in [0,nitend-nit000-1] 1318 nitiaustr = 1 ! Timestep of start of IAU interval in [0,nitend-nit000-1] 1319 nitiaufin = 15 ! Timestep of end of IAU interval in [0,nitend-nit000-1] 1320 niaufn = 0 ! Type of IAU weighting function 1321 ln_salfix = .false. ! Logical switch for ensuring that the sa > salfixmin 1322 salfixmin = -9999 ! Minimum salinity after applying the increments 1323 nn_divdmp = 0 ! Number of iterations of divergence damping operator 1324 mld_choice_bgc = 1 ! MLD criterion to use for biogeochemistry assimilation 1325 rn_maxchlinc = -999.0 ! maximum absolute non-log chlorophyll increment from ocean colour assimilation 1326 ! <= 0 implies no maximum applied (switch turned off) 1327 ! > 0 implies maximum absolute chl increment capped at this value 1305 1328 / 1306 1329 !----------------------------------------------------------------------- -
branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc_v3/NEMOGCM/NEMO/OPA_SRC/ASM/asmbkg.F90
r9321 r10055 49 49 #if defined key_lim3 50 50 USE ice 51 #endif 52 #if defined key_top 53 USE asmbgc, ONLY: asm_bgc_bkg_wri 51 54 #endif 52 55 USE timing … … 125 128 IF(nn_timing == 2) CALL timing_stop('iom_rstput') 126 129 ! 130 #if defined key_top 131 CALL asm_bgc_bkg_wri( kt, inum ) 132 ! 133 #endif 127 134 CALL iom_close( inum ) 128 135 ENDIF -
branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc_v3/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90
r8400 r10055 44 44 #endif 45 45 USE sbc_oce ! Surface boundary condition variables. 46 USE asmbgc ! Biogeochemistry assimilation 46 47 47 48 IMPLICIT NONE … … 54 55 PUBLIC ssh_asm_inc !: Apply the SSH increment 55 56 PUBLIC seaice_asm_inc !: Apply the seaice increment 57 PUBLIC bgc_asm_inc !: Apply the biogeochemistry increments 56 58 57 59 #if defined key_asminc … … 67 69 LOGICAL, PUBLIC :: ln_sshinc = .FALSE. !: No sea surface height assimilation increment 68 70 LOGICAL, PUBLIC :: ln_seaiceinc !: No sea ice concentration increment 71 LOGICAL, PUBLIC :: lk_bgcinc = .FALSE. !: No biogeochemistry increments 69 72 LOGICAL, PUBLIC :: ln_salfix = .FALSE. !: Apply minimum salinity check 70 73 LOGICAL, PUBLIC :: ln_temnofreeze = .FALSE. !: Don't allow the temperature to drop below freezing … … 133 136 REAL(wp), POINTER, DIMENSION(:,:) :: hdiv ! 2D workspace 134 137 !! 135 NAMELIST/nam_asminc/ ln_bkgwri, 138 NAMELIST/nam_asminc/ ln_bkgwri, ln_balwri, & 136 139 & ln_trainc, ln_dyninc, ln_sshinc, & 140 & ln_phytobal, ln_slchltotinc, ln_slchldiainc, & 141 & ln_slchlnoninc, ln_schltotinc, ln_slphytotinc, & 142 & ln_slphydiainc, ln_slphynoninc, ln_spco2inc, & 143 & ln_sfco2inc, ln_plchltotinc, ln_pchltotinc, & 144 & ln_pno3inc, ln_psi4inc, ln_pdicinc, ln_palkinc, & 145 & ln_pphinc, ln_po2inc, & 137 146 & ln_asmdin, ln_asmiau, & 138 147 & nitbkg, nitdin, nitiaustr, nitiaufin, niaufn, & 139 148 & ln_salfix, salfixmin, nn_divdmp, & 140 & ln_seaiceinc, ln_temnofreeze 149 & ln_seaiceinc, ln_temnofreeze, & 150 & mld_choice_bgc, rn_maxchlinc 141 151 !!---------------------------------------------------------------------- 142 152 … … 161 171 WRITE(numout,*) 'asm_inc_init : Assimilation increment initialization :' 162 172 WRITE(numout,*) '~~~~~~~~~~~~' 163 WRITE(numout,*) ' Namelist nam asm: set assimilation increment parameters'173 WRITE(numout,*) ' Namelist nam_asminc : set assimilation increment parameters' 164 174 WRITE(numout,*) ' Logical switch for writing out background state ln_bkgwri = ', ln_bkgwri 175 WRITE(numout,*) ' Logical switch for writing out balancing increments ln_balwri = ', ln_balwri 165 176 WRITE(numout,*) ' Logical switch for applying tracer increments ln_trainc = ', ln_trainc 166 177 WRITE(numout,*) ' Logical switch for applying velocity increments ln_dyninc = ', ln_dyninc … … 168 179 WRITE(numout,*) ' Logical switch for Direct Initialization (DI) ln_asmdin = ', ln_asmdin 169 180 WRITE(numout,*) ' Logical switch for applying sea ice increments ln_seaiceinc = ', ln_seaiceinc 181 WRITE(numout,*) ' Logical switch for phytoplankton balancing ln_phytobal = ', ln_phytobal 182 WRITE(numout,*) ' Logical switch for applying slchltot increments ln_slchltotinc = ', ln_slchltotinc 183 WRITE(numout,*) ' Logical switch for applying slchldia increments ln_slchldiainc = ', ln_slchldiainc 184 WRITE(numout,*) ' Logical switch for applying slchlnon increments ln_slchlnoninc = ', ln_slchlnoninc 185 WRITE(numout,*) ' Logical switch for applying schltot increments ln_schltotinc = ', ln_schltotinc 186 WRITE(numout,*) ' Logical switch for applying slphytot increments ln_slphytotinc = ', ln_slphytotinc 187 WRITE(numout,*) ' Logical switch for applying slphydia increments ln_slphydiainc = ', ln_slphydiainc 188 WRITE(numout,*) ' Logical switch for applying slphynon increments ln_slphynoninc = ', ln_slphynoninc 189 WRITE(numout,*) ' Logical switch for applying spco2 increments ln_spco2inc = ', ln_spco2inc 190 WRITE(numout,*) ' Logical switch for applying sfco2 increments ln_sfco2inc = ', ln_sfco2inc 191 WRITE(numout,*) ' Logical switch for applying plchltot increments ln_plchltotinc = ', ln_plchltotinc 192 WRITE(numout,*) ' Logical switch for applying pchltot increments ln_pchltotinc = ', ln_pchltotinc 193 WRITE(numout,*) ' Logical switch for applying pno3 increments ln_pno3inc = ', ln_pno3inc 194 WRITE(numout,*) ' Logical switch for applying psi4 increments ln_psi4inc = ', ln_psi4inc 195 WRITE(numout,*) ' Logical switch for applying pdic increments ln_pdicinc = ', ln_pdicinc 196 WRITE(numout,*) ' Logical switch for applying palk increments ln_palkinc = ', ln_palkinc 197 WRITE(numout,*) ' Logical switch for applying pph increments ln_pphinc = ', ln_pphinc 198 WRITE(numout,*) ' Logical switch for applying po2 increments ln_po2inc = ', ln_po2inc 170 199 WRITE(numout,*) ' Logical switch for Incremental Analysis Updating (IAU) ln_asmiau = ', ln_asmiau 171 200 WRITE(numout,*) ' Timestep of background in [0,nitend-nit000-1] nitbkg = ', nitbkg … … 176 205 WRITE(numout,*) ' Logical switch for ensuring that the sa > salfixmin ln_salfix = ', ln_salfix 177 206 WRITE(numout,*) ' Minimum salinity after applying the increments salfixmin = ', salfixmin 207 WRITE(numout,*) ' Choice of MLD for BGC assimilation mld_choice_bgc = ', mld_choice_bgc 208 WRITE(numout,*) ' Maximum absolute chlorophyll increment (<=0 = off) rn_maxchlinc = ', rn_maxchlinc 178 209 ENDIF 179 210 … … 212 243 WRITE(numout,*) ' iitiaufin_date = ', iitiaufin_date 213 244 ENDIF 245 246 IF ( ln_slchltotinc .OR. ln_slchldiainc .OR. ln_slchlnoninc .OR. & 247 & ln_schltotinc .OR. ln_slphytotinc .OR. ln_slphydiainc .OR. & 248 & ln_slphynoninc .OR. ln_spco2inc .OR. ln_sfco2inc .OR. & 249 & ln_plchltotinc .OR. ln_pchltotinc .OR. ln_pno3inc .OR. & 250 & ln_psi4inc .OR. ln_pdicinc .OR. ln_palkinc .OR. & 251 & ln_pphinc .OR. ln_po2inc ) THEN 252 lk_bgcinc = .TRUE. 253 ENDIF 214 254 215 255 IF ( nacc /= 0 ) & … … 223 263 224 264 IF ( ( ( .NOT. ln_asmdin ).AND.( .NOT. ln_asmiau ) ) & 225 .AND.( ( ln_trainc ).OR.( ln_dyninc ).OR.( ln_sshinc ) .OR. ( ln_seaiceinc) )) & 226 & CALL ctl_stop( ' One or more of ln_trainc, ln_dyninc, ln_sshinc and ln_seaiceinc is set to .true.', & 265 & .AND.( ( ln_trainc ).OR.( ln_dyninc ).OR.( ln_sshinc ).OR.( ln_seaiceinc ).OR. & 266 & ( lk_bgcinc ) )) & 267 & CALL ctl_stop( ' One or more of ln_trainc, ln_dyninc, ln_sshinc, ln_seaiceinc,', & 268 & ' ln_(bgc-variable)inc is set to .true.', & 227 269 & ' but ln_asmdin and ln_asmiau are both set to .false. :', & 228 270 & ' Inconsistent options') … … 233 275 234 276 IF ( ( .NOT. ln_trainc ).AND.( .NOT. ln_dyninc ).AND.( .NOT. ln_sshinc ).AND.( .NOT. ln_seaiceinc ) & 235 & ) & 236 & CALL ctl_warn( ' ln_trainc, ln_dyninc, ln_sshinc and ln_seaiceinc are set to .false. :', & 277 & .AND.( .NOT. lk_bgcinc ) ) & 278 & CALL ctl_warn( ' ln_trainc, ln_dyninc, ln_sshinc, ln_seaiceinc,', & 279 & ' ln_(bgc-variable)inc are set to .false. :', & 237 280 & ' The assimilation increments are not applied') 238 281 … … 254 297 & ' Background time step for Direct Initialization is outside', & 255 298 & ' the cycle interval') 299 300 IF ( lk_bgcinc ) CALL asm_bgc_check_options 256 301 257 302 IF ( nstop > 0 ) RETURN ! if there are any errors then go no further … … 350 395 ssh_iau(:,:) = 0.0 351 396 #endif 352 IF ( ( ln_trainc ).OR.( ln_dyninc ).OR.( ln_sshinc ).OR.( ln_seaiceinc ) ) THEN 397 IF ( ( ln_trainc ).OR.( ln_dyninc ).OR.( ln_sshinc ).OR.( ln_seaiceinc ) & 398 & .OR.( lk_bgcinc ) ) THEN 353 399 354 400 !-------------------------------------------------------------------- … … 424 470 ENDIF 425 471 472 IF ( lk_bgcinc ) THEN 473 CALL asm_bgc_init_incs( inum ) 474 ENDIF 475 426 476 CALL iom_close( inum ) 427 477 … … 534 584 CALL iom_close( inum ) 535 585 586 ENDIF 587 588 IF ( lk_bgcinc ) THEN 589 CALL asm_bgc_init_bkg 536 590 ENDIF 537 591 ! … … 1155 1209 1156 1210 END SUBROUTINE seaice_asm_inc 1211 1212 1213 SUBROUTINE bgc_asm_inc( kt ) 1214 !!---------------------------------------------------------------------- 1215 !! *** ROUTINE bgc_asm_inc *** 1216 !! 1217 !! ** Purpose : Apply the biogeochemistry assimilation increments 1218 !! 1219 !! ** Method : Call relevant routines in asmbgc 1220 !! 1221 !! ** Action : Call relevant routines in asmbgc 1222 !! 1223 !!---------------------------------------------------------------------- 1224 !! 1225 INTEGER, INTENT(in ) :: kt ! Current time step 1226 ! 1227 INTEGER :: icycper ! Dimension of wgtiau 1228 !! 1229 !!---------------------------------------------------------------------- 1230 1231 icycper = SIZE( wgtiau ) 1232 1233 ! Ocean colour variables first 1234 IF ( ln_slchltotinc .OR. ln_slchldiainc .OR. ln_slchlnoninc .OR. & 1235 & ln_schltotinc .OR. ln_slphytotinc .OR. ln_slphydiainc .OR. & 1236 & ln_slphynoninc ) THEN 1237 CALL phyto2d_asm_inc( kt, ln_asmdin, ln_asmiau, icycper, wgtiau ) 1238 ENDIF 1239 1240 ! Surface pCO2/fCO2 next 1241 IF ( ln_sfco2inc .OR. ln_spco2inc ) THEN 1242 CALL pco2_asm_inc( kt, ln_asmdin, ln_asmiau, icycper, wgtiau, & 1243 & ln_trainc, t_bkginc, s_bkginc ) 1244 ENDIF 1245 1246 ! Profile pH next 1247 IF ( ln_pphinc ) THEN 1248 CALL ph_asm_inc( kt, ln_asmdin, ln_asmiau, icycper, wgtiau, & 1249 & ln_trainc, t_bkginc, s_bkginc ) 1250 ENDIF 1251 1252 ! Then chlorophyll profiles 1253 IF ( ln_plchltotinc .OR. ln_pchltotinc ) THEN 1254 CALL phyto3d_asm_inc( kt, ln_asmdin, ln_asmiau, icycper, wgtiau ) 1255 ENDIF 1256 1257 ! Remaining bgc profile variables 1258 IF ( ln_pno3inc .OR. ln_psi4inc .OR. ln_pdicinc .OR. & 1259 & ln_palkinc .OR. ln_po2inc ) THEN 1260 CALL bgc3d_asm_inc( kt, ln_asmdin, ln_asmiau, icycper, wgtiau ) 1261 ENDIF 1262 1263 END SUBROUTINE bgc_asm_inc 1157 1264 1158 1265 !!====================================================================== -
branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc_v3/NEMOGCM/NEMO/OPA_SRC/ASM/asmpar.F90
r6486 r10055 20 20 & c_asmtrj = 'assim_trj', & !: Filename for storing the 21 21 !: reference trajectory 22 & c_asminc = 'assim_background_increments' 22 & c_asminc = 'assim_background_increments', & !: Filename for storing the 23 23 !: increments to the background 24 24 !: state 25 & c_asmbal = 'assim.balincs' !: Filename for storing the 26 !: balancing increments calculated 27 !: for biogeochemistry 25 28 26 29 INTEGER, PUBLIC :: nitbkg_r !: Background time step referenced to nit000 -
branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc_v3/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftmx.F90
r7179 r10055 38 38 LOGICAL, PUBLIC, PARAMETER :: lk_zdftmx = .TRUE. !: tidal mixing flag 39 39 40 ! !!* Namelist namzdf_tmx : tidal mixing *41 REAL(wp) :: rn_htmx ! vertical decay scale for turbulence (meters)42 REAL(wp) :: rn_n2min ! threshold of the Brunt-Vaisala frequency (s-1)43 REAL(wp) :: rn_tfe ! tidal dissipation efficiency (St Laurent et al. 2002)44 REAL(wp) :: rn_me ! mixing efficiency (Osborn 1980)45 LOGICAL 46 REAL(wp) :: rn_tfe_itf ! ITF tidal dissipation efficiency (St Laurent et al. 2002)47 48 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: en_tmx ! energy available for tidal mixing (W/m2)49 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) 50 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: az_tmx ! coefficient used to evaluate the tidal induced Kz40 ! !!* Namelist namzdf_tmx : tidal mixing * 41 REAL(wp) :: rn_htmx ! vertical decay scale for turbulence (meters) 42 REAL(wp) :: rn_n2min ! threshold of the Brunt-Vaisala frequency (s-1) 43 REAL(wp) :: rn_tfe ! tidal dissipation efficiency (St Laurent et al. 2002) 44 REAL(wp) :: rn_me ! mixing efficiency (Osborn 1980) 45 LOGICAL, PUBLIC :: ln_tmx_itf ! Indonesian Through Flow (ITF): Koch-Larrouy et al. (2007) parameterization 46 REAL(wp) :: rn_tfe_itf ! ITF tidal dissipation efficiency (St Laurent et al. 2002) 47 48 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: en_tmx ! energy available for tidal mixing (W/m2) 49 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:), PUBLIC :: mask_itf ! mask to use over Indonesian area 50 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: az_tmx ! coefficient used to evaluate the tidal induced Kz 51 51 52 52 !! * Substitutions -
branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc_v3/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90
r9321 r10055 61 61 USE asminc ! assimilation increments 62 62 USE asmbkg ! writing out state trajectory 63 USE asmbgc ! biogeochemical assimilation increments 63 64 USE diaptr ! poleward transports (dia_ptr_init routine) 64 65 USE diadct ! sections transports (dia_dct_init routine) … … 160 161 IF( ln_dyninc ) CALL dyn_asm_inc( nit000 - 1 ) ! Dynamics 161 162 IF( ln_sshinc ) CALL ssh_asm_inc( nit000 - 1 ) ! SSH 163 IF( lk_bgcinc ) CALL bgc_asm_inc( nit000 - 1 ) ! BGC 162 164 ENDIF 163 165 ENDIF … … 191 193 192 194 IF( lk_diaobs ) CALL dia_obs_wri 195 ! 196 IF( ( lk_asminc ).AND.( ln_balwri ) ) CALL asm_bgc_bal_wri( nitend ) ! Output balancing increments 193 197 ! 194 198 IF( ln_icebergs ) CALL icb_end( nitend ) -
branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc_v3/NEMOGCM/NEMO/OPA_SRC/step.F90
r8400 r10055 253 253 ! Passive Tracer Model 254 254 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 255 IF( lk_asminc .AND. ln_asmiau .AND. lk_bgcinc ) & 256 & CALL bgc_asm_inc( kstp ) ! biogeochemistry assimilation 255 257 CALL trc_stp( kstp ) ! time-stepping 256 258 #endif -
branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc_v3/NEMOGCM/NEMO/TOP_SRC/MEDUSA/air_sea.F90
r10020 r10055 77 77 zn_dms_chd, zn_dms_chn, zn_dms_din, & 78 78 zn_dms_mld, zn_dms_qsr, & 79 # if defined key_foam_medusa 80 f2_pco2w, f2_fco2w, & 81 # endif 79 82 xnln, xnld 80 83 USE trc, ONLY: med_diag … … 87 90 # else 88 91 USE trcco2_medusa, ONLY: trc_co2_medusa 92 # if defined key_foam_medusa 93 USE mocsy_mainmod, ONLY: p2fCO2 94 # endif 89 95 # endif 90 96 USE trcdms_medusa, ONLY: trc_dms_medusa … … 327 333 iters, ' AT (', ji, ', ', jj, ', 1) AT ', kt 328 334 endif 335 # if defined key_foam_medusa 336 !! DAF (Aug 2017): calculate fCO2 for observation operator 337 CALL p2fCO2( f_pco2w, ztmp, f_pp0, 0.0, 1, f_fco2w ) 338 # endif 329 339 ENDIF 330 340 ENDDO … … 506 516 CO2flux_conv 507 517 !! ENDIF 518 # if defined key_foam_medusa 519 !! DAF (Aug 2017): Save pCO2 and fCO2 for observation operator 520 f2_pco2w(ji,jj) = f_pco2w(ji,jj) 521 f2_fco2w(ji,jj) = f_pco2w(ji,jj) 522 # endif 508 523 IF ( lk_iomput ) THEN 509 524 IF( med_diag%ATM_PCO2%dgsave ) THEN -
branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc_v3/NEMOGCM/NEMO/TOP_SRC/MEDUSA/bio_medusa_fin.F90
r10020 r10055 46 46 f3_co3, f3_h2co3, f3_hco3, & 47 47 f3_omarg, f3_omcal, f3_pH, & 48 # if defined key_foam_medusa 49 mld_max, pgrow_avg, & 50 ploss_avg, phyt_avg, & 51 # endif 48 52 za_sed_c, za_sed_ca, za_sed_fe, & 49 53 za_sed_n, za_sed_si, & … … 55 59 USE trc, ONLY: med_diag, nittrc000, trn 56 60 USE trcnam_trp, ONLY: ln_trcadv_cen2, ln_trcadv_tvd 61 # if defined key_foam_medusa 62 USE zdfmxl, ONLY: hmld 63 # endif 57 64 58 65 !! time (integer timestep) … … 113 120 # endif 114 121 122 # if defined key_foam_medusa 123 !!---------------------------------------------------------------------- 124 !! Diagnostics required for ocean colour assimilation: 125 !! Mixed layer average phytoplankton growth, loss and concentration 126 !! Maximum mixed layer depth 127 !!---------------------------------------------------------------------- 128 !! 129 DO jj = 2,jpjm1 130 DO ji = 2,jpim1 131 IF ( hmld(ji,jj) .GT. 0.0 ) THEN 132 pgrow_avg(ji,jj) = pgrow_avg(ji,jj) / hmld(ji,jj) 133 ploss_avg(ji,jj) = ploss_avg(ji,jj) / hmld(ji,jj) 134 phyt_avg(ji,jj) = phyt_avg(ji,jj) / hmld(ji,jj) 135 IF ( hmld(ji,jj) .GT. mld_max(ji,jj) ) THEN 136 mld_max(ji,jj) = hmld(ji,jj) 137 ENDIF 138 ENDIF 139 END DO 140 END DO 141 # endif 142 115 143 # if defined key_debug_medusa 116 144 !! AXY (12/07/17) -
branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc_v3/NEMOGCM/NEMO/TOP_SRC/MEDUSA/bio_medusa_init.F90
r10020 r10055 35 35 USE bio_medusa_mod 36 36 USE par_oce, ONLY: jpi, jpj, jpk 37 # if defined key_foam_medusa 38 USE sms_medusa, ONLY: jdms, pgrow_avg, ploss_avg, phyt_avg, mld_max 39 # else 37 40 USE sms_medusa, ONLY: jdms 41 # endif 38 42 USE trc, ONLY: ln_diatrc, med_diag, nittrc000 39 43 USE in_out_manager, ONLY: lwp, numout … … 195 199 fslowsinkc(:,:) = 0.0 196 200 # endif 201 !! 202 # if defined key_foam_medusa 203 pgrow_avg(:,:) = 0.0 204 ploss_avg(:,:) = 0.0 205 phyt_avg(:,:) = 0.0 206 IF( kt == nittrc000 ) THEN 207 mld_max(:,:) = 0.0 208 ENDIF 209 # endif 197 210 !! 198 211 !! allocate and initiate 2D diag -
branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc_v3/NEMOGCM/NEMO/TOP_SRC/MEDUSA/plankton.F90
r8441 r10055 36 36 fdpn, fdpn2, fdzme, fdzme2, & 37 37 fdzmi, fdzmi2, fsdiss, fsin, & 38 # if defined key_foam_medusa 39 fdep1, fprn, fprd, & 40 fgmepd, fgmepn, fgmipn, & 41 # endif 38 42 zphd, zphn, zpds, zzme, zzmi 43 # if defined key_foam_medusa 44 USE dom_oce, ONLY: e3t_0, e3t_n, gdepw_0, gdepw_n, tmask 45 USE par_kind, ONLY: wp 46 # else 39 47 USE dom_oce, ONLY: tmask 48 # endif 40 49 USE par_oce, ONLY: jpim1, jpjm1 41 50 USE phytoplankton_mod, ONLY: phytoplankton 42 51 USE sms_medusa, ONLY: jmpd, jmpn, jmzme, jmzmi, & 52 # if defined key_foam_medusa 53 pgrow_avg, ploss_avg, phyt_avg, & 54 # endif 43 55 xkphd, xkphn, xkzme, xkzmi, & 44 56 xmetapd, xmetapn, xmetazme, xmetazmi, & 45 57 xmpd, xmpn, xmzme, xmzmi, xsdiss 58 # if defined key_foam_medusa 59 USE zdfmxl, ONLY: hmld 60 # endif 46 61 USE zooplankton_mod, ONLY: zooplankton 62 63 # if defined key_foam_medusa 64 !!* Substitution 65 # include "domzgr_substitute.h90" 66 # endif 47 67 48 68 !! Level … … 50 70 51 71 INTEGER :: ji, jj 72 73 # if defined key_foam_medusa 74 REAL(wp) :: fq0 75 # endif 52 76 53 77 !!------------------------------------------------------------------- … … 188 212 ENDDO 189 213 214 # if defined key_foam_medusa 215 !! Mixed layer averages for ocean colour assimilation 216 !! 217 DO jj = 2,jpjm1 218 DO ji = 2,jpim1 219 IF (tmask(ji,jj,jk) == 1) THEN 220 if (fdep1(ji,jj).le.hmld(ji,jj)) then 221 !! this level is entirely in the mixed layer 222 fq0 = 1.0 223 elseif (fsdepw(ji,jj,jk).ge.hmld(ji,jj)) then 224 !! this level is entirely below the mixed layer 225 fq0 = 0.0 226 else 227 !! this level straddles the mixed layer 228 fq0 = (hmld(ji,jj) - fsdepw(ji,jj,jk)) / fse3t(ji,jj,jk) 229 endif 230 !! 231 pgrow_avg(ji,jj) = pgrow_avg(ji,jj) + & 232 (((fprn(ji,jj) * zphn(ji,jj)) + & 233 (fprd(ji,jj) * zphd(ji,jj)) ) * & 234 fse3t(ji,jj,jk) * fq0) 235 ploss_avg(ji,jj) = ploss_avg(ji,jj) + & 236 ((fgmepd(ji,jj) + fdpd(ji,jj) + & 237 fdpd2(ji,jj) + & 238 fgmepn(ji,jj) + fdpn(ji,jj) + & 239 fdpn2(ji,jj) + fgmipn(ji,jj) ) * & 240 fse3t(ji,jj,jk) * fq0) 241 phyt_avg(ji,jj) = phyt_avg(ji,jj) + & 242 ((zphn(ji,jj) + zphd(ji,jj)) * & 243 fse3t(ji,jj,jk) * fq0) 244 ENDIF 245 ENDDO 246 ENDDO 247 # endif 248 190 249 END SUBROUTINE plankton 191 250 -
branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc_v3/NEMOGCM/NEMO/TOP_SRC/MEDUSA/sms_medusa.F90
r9385 r10055 212 212 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: f2_ccd_arg !: 2D aragonite CCD depth 213 213 !! 214 #if defined key_foam_medusa 215 !! 2D fields of pCO2 and fCO2 for observation operator 216 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: f2_pco2w !: 2D pCO2 217 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: f2_fco2w !: 2D fCO2 218 !! 219 #endif 214 220 !! 2D fields of organic and inorganic material sedimented on the seafloor 215 221 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: zb_sed_n !: 2D organic nitrogen (before) … … 299 305 #else 300 306 LOGICAL , PUBLIC :: lk_pi_co2 = .FALSE. !: PI xCO2 unused 307 # if defined key_foam_medusa 308 REAL(wp) :: xobs_xco2a !: Observed atmospheric xCO2, read in 309 # endif 301 310 #endif 302 311 … … 349 358 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: cmask !: ??? 350 359 360 #if defined key_foam_medusa 361 !!---------------------------------------------------------------------- 362 !! Parameters required for ocean colour assimilation 363 !!---------------------------------------------------------------------- 364 !! 365 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: pgrow_avg !: Mixed layer average phytoplankton growth 366 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: ploss_avg !: Mixed layer average phytoplankton loss 367 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: phyt_avg !: Mixed layer average phytoplankton 368 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: mld_max !: Maximum mixed layer depth 369 !! 370 #endif 371 351 372 !!---------------------------------------------------------------------- 352 373 !! NEMO/TOP 3.3 , NEMO Consortium (2010) … … 361 382 !!---------------------------------------------------------------------- 362 383 USE lib_mpp , ONLY: ctl_warn 363 INTEGER :: ierr( 8) ! Local variables384 INTEGER :: ierr(9) ! Local variables 364 385 !!---------------------------------------------------------------------- 365 386 ierr(:) = 0 … … 371 392 !* 2D and 3D fields of carbonate system parameters 372 393 ALLOCATE( f2_ccd_cal(jpi,jpj) , f2_ccd_arg(jpi,jpj) , & 394 # if defined key_foam_medusa 395 f2_pco2w(jpi,jpj) , f2_fco2w(jpi,jpj) , & 396 # endif 373 397 & f3_pH(jpi,jpj,jpk) , f3_h2co3(jpi,jpj,jpk), & 374 398 & f3_hco3(jpi,jpj,jpk) , f3_co3(jpi,jpj,jpk) , & … … 419 443 & ffln(jpi,jpj,jpk) , fflf(jpi,jpj,jpk) , & 420 444 & ffls(jpi,jpj,jpk) , cmask(jpi,jpj) , STAT=ierr(8) ) 445 # if defined key_foam_medusa 446 ALLOCATE( pgrow_avg(jpi,jpj) , ploss_avg(jpi,jpj) , & 447 & phyt_avg(jpi,jpj) , mld_max(jpi,jpj) , STAT=ierr(9) ) 448 # endif 421 449 #endif 422 450 ! -
branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc_v3/NEMOGCM/NEMO/TOP_SRC/MEDUSA/trcbio_medusa.F90
r10020 r10055 105 105 USE sbc_oce, ONLY: lk_oasis 106 106 USE sms_medusa, ONLY: hist_pco2, co2_yinit, co2_yend, & 107 # if defined key_foam_medusa 108 xobs_xco2a, pgrow_avg, & 109 ploss_avg, phyt_avg, mld_max, & 110 # endif 107 111 lk_pi_co2 108 112 USE trc, ONLY: ln_rsttr, nittrc000, trn … … 330 334 !! f_xco2a(:,:) = 284.725 !! CMIP5 pre-industrial pCO2 331 335 f_xco2a(:,:) = 284.317 !! CMIP6 pre-industrial pCO2 336 # if defined key_foam_medusa 337 ELSEIF ( xobs_xco2a > 0.0 ) THEN 338 IF(lwp) WRITE(numout,*) ' using observed atm pCO2 = ', xobs_xco2a 339 f_xco2a(:,:) = xobs_xco2a 340 # endif 332 341 ELSE 333 342 !! xCO2 from file … … 418 427 !! now use the NEMO calendar tool : nsec_month to be sure to call 419 428 !! at the beginning of a new month . 429 #if defined key_foam_medusa 430 !! DAF: For FOAM we want to run daily 431 IF ( (kt == nittrc000 .AND. .NOT.ln_rsttr) .OR. & 432 (MOD(kt*rdt, 86400.0) == rdt) ) THEN 433 #else 420 434 IF ( (kt == nittrc000 .AND. .NOT.ln_rsttr) .OR. & 421 435 ( nsec_month .LE. INT(rdt) ) ) THEN 436 #endif 422 437 IF ( lwp ) WRITE(numout,*) & 423 438 ' *** 3D carb chem call *** -- kt:', kt, & -
branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc_v3/NEMOGCM/NEMO/TOP_SRC/MEDUSA/trcini_medusa.F90
r9385 r10055 330 330 !!---------------------------------------------------------------------- 331 331 !! 332 # if defined key_foam_medusa 333 IF( ( .NOT.lk_oasis ) .AND. ( .NOT.lk_pi_co2 ) .AND. ( xobs_xco2a > 0.0 ) ) THEN 334 # else 332 335 IF( ( .NOT.lk_oasis ) .AND. ( .NOT.lk_pi_co2 ) ) THEN 336 # endif 333 337 IF(lwp) WRITE(numout,*) ' trc_ini_medusa: initialisating atm CO2 record' 334 338 CALL trc_ini_medusa_co2atm -
branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc_v3/NEMOGCM/NEMO/TOP_SRC/MEDUSA/trcnam_medusa.F90
r9258 r10055 90 90 #if defined key_roam 91 91 NAMELIST/natroam/ xthetaphy,xthetazoo,xthetanit, & 92 # if defined key_foam_medusa 93 & xobs_xco2a, & 94 # endif 92 95 & xthetarem,xo2min 93 96 #endif … … 490 493 & ' key_debug_medusa = INACTIVE' 491 494 # endif 495 #if defined key_foam_medusa 496 WRITE(numout,*) & 497 & ' key_foam_medusa = ACTIVE' 498 #else 499 WRITE(numout,*) & 500 & ' key_foam_medusa = INACTIVE' 501 #endif 492 502 WRITE(numout,*) ' ' 493 503 … … 1030 1040 xthetarem = 0. 1031 1041 xo2min = 0. 1042 # if defined key_foam_medusa 1043 xobs_xco2a = 0. 1044 # endif 1032 1045 1033 1046 !READ(numnatm,natroam) … … 1049 1062 !! xthetarem : oxygen consumption by carbon remineralisation 1050 1063 !! xo2min : oxygen minimum concentration 1064 # if defined key_foam_medusa 1065 !! xobs_xco2a : observed atmospheric xCO2 1066 # endif 1051 1067 1052 1068 IF(lwp) THEN … … 1066 1082 WRITE(numout,*) & 1067 1083 & ' oxygen minimum concentration xo2min = ', xo2min 1084 # if defined key_foam_medusa 1085 WRITE(numout,*) & 1086 & ' observed atmospheric xCO2 xobs_xco2a = ', xobs_xco2a 1087 # endif 1068 1088 ENDIF 1069 1089 -
branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc_v3/NEMOGCM/NEMO/TOP_SRC/trcrst.F90
r9975 r10055 45 45 USE oce, ONLY: CO2Flux_out_cpl, DMS_out_cpl, chloro_out_cpl !! Coupling variable 46 46 USE trcstat 47 #if defined key_foam_medusa 48 USE obs_const, ONLY: obfillflt ! Observation operator fill value 49 #endif 47 50 48 51 IMPLICIT NONE … … 338 341 IF(lwp) WRITE(numout,*) 'Or don t start from uncomplete restart...' 339 342 ENDIF 343 ! 344 # if defined key_foam_medusa 345 !! 2D fields of pCO2 and fCO2 for observation operator on first timestep 346 IF( iom_varid( numrtr, 'PCO2W', ldstop = .FALSE. ) > 0 ) THEN 347 IF(lwp) WRITE(numout,*) ' MEDUSA pCO2 present - reading in ...' 348 CALL iom_get( numrtr, jpdom_autoglo, 'PCO2W', f2_pco2w(:,:) ) 349 CALL iom_get( numrtr, jpdom_autoglo, 'FCO2W', f2_fco2w(:,:) ) 350 ELSE 351 IF(lwp) WRITE(numout,*) ' MEDUSA pCO2 absent - setting to fill ...' 352 f2_pco2w(:,:) = obfillflt * tmask(:,:,1) 353 f2_fco2w(:,:) = obfillflt * tmask(:,:,1) 354 ENDIF 355 # endif 340 356 # endif 341 357 # if defined key_foam_medusa 358 !! Fields for ocean colour assimilation on first timestep 359 IF( iom_varid( numrtr, 'pgrow_avg', ldstop = .FALSE. ) > 0 ) THEN 360 IF(lwp) WRITE(numout,*) ' MEDUSA pgrow_avg present - reading in ...' 361 CALL iom_get( numrtr, jpdom_autoglo, 'pgrow_avg', pgrow_avg(:,:) ) 362 CALL iom_get( numrtr, jpdom_autoglo, 'ploss_avg', ploss_avg(:,:) ) 363 CALL iom_get( numrtr, jpdom_autoglo, 'phyt_avg', phyt_avg(:,:) ) 364 CALL iom_get( numrtr, jpdom_autoglo, 'mld_max', mld_max(:,:) ) 365 ELSE 366 IF(lwp) WRITE(numout,*) ' MEDUSA pgrow_avg absent - setting to zero ...' 367 pgrow_avg(:,:) = 0.0 368 ploss_avg(:,:) = 0.0 369 phyt_avg(:,:) = 0.0 370 mld_max(:,:) = 0.0 371 ENDIF 372 # endif 342 373 343 374 #endif … … 510 541 call trc_rst_dia_stat( f2_ccd_arg(:,:),'CCD_ARG') 511 542 !! 543 # if defined key_foam_medusa 544 !! Fields for observation operator on first timestep 545 IF(lwp) WRITE(numout,*) ' MEDUSA OBS fields - writing out ...' 546 CALL iom_rstput( kt, nitrst, numrtw, 'PCO2W', f2_pco2w(:,:) ) 547 CALL iom_rstput( kt, nitrst, numrtw, 'FCO2W', f2_fco2w(:,:) ) 548 # endif 549 # endif 550 # if defined key_foam_medusa 551 !! Fields for assimilation on first timestep 552 IF(lwp) WRITE(numout,*) ' MEDUSA ASM fields - writing out ...' 553 CALL iom_rstput( kt, nitrst, numrtw, 'pgrow_avg', pgrow_avg(:,:) ) 554 CALL iom_rstput( kt, nitrst, numrtw, 'ploss_avg', ploss_avg(:,:) ) 555 CALL iom_rstput( kt, nitrst, numrtw, 'phyt_avg', phyt_avg(:,:) ) 556 CALL iom_rstput( kt, nitrst, numrtw, 'mld_max', mld_max(:,:) ) 512 557 # endif 513 558 !!
Note: See TracChangeset
for help on using the changeset viewer.