Changeset 10141
- Timestamp:
- 2018-09-19T17:14:46+02:00 (6 years ago)
- Location:
- branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc_v3/NEMOGCM
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc_v3/NEMOGCM/CONFIG/SHARED/namelist_medusa_ref
r9258 r10141 305 305 scl_chl = 1.0 !! (IF key_oasis) scaling the exported to UM chlorophyll field 306 306 !! 307 !! FOAM !! DAF 308 ln_foam_medusa = .false. !! Calculate and save diagnostics for data assimilation 309 !! 307 310 / 308 311 !''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' … … 319 322 !! = (119 / 106) = 1.1226 mol O2 / mol C 320 323 !! xo2min : oxygen minimum concentration 324 !! xobs_xco2a: observed atmospheric xCO2 (not used if <= 0) 321 325 ! 322 326 &natroam … … 326 330 xthetarem = 1.1226 327 331 xo2min = 4.0 332 xobs_xco2a= -999.0 328 333 / 329 334 !''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -
branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc_v3/NEMOGCM/NEMO/OPA_SRC/ASM/asmbgc.F90
r10077 r10141 10 10 !! 'key_hadocc' : HadOCC model 11 11 !! 'key_medusa' : MEDUSA model 12 !! 'key_foam_medusa' : MEDUSA extras for FOAM OBS and ASM13 12 !! 'key_roam' : MEDUSA extras for carbonate cycle 14 13 !! 'key_karaml' : Kara mixed layer depth … … 56 55 & jptra 57 56 #endif 58 #if defined key_medusa && defined key_foam_medusa57 #if defined key_medusa 59 58 USE asmphyto2dbal_medusa, ONLY: & ! phyto2d balancing for MEDUSA 60 59 & asm_phyto2d_bal_medusa … … 161 160 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: pph_bkginc ! pph inc 162 161 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: po2_bkginc ! po2 inc 163 #if defined key_top164 162 REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE :: phyto2d_balinc ! Balancing incs from ocean colour 165 163 REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE :: phyto3d_balinc ! Balancing incs from p(l)chltot 166 164 REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE :: pco2_balinc ! Balancing incs from spco2/sfco2 167 165 REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE :: ph_balinc ! Balancing incs from pph 168 #endif 169 170 #if defined key_hadocc || (defined key_medusa && defined key_foam_medusa) 166 171 167 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: pgrow_avg_bkg ! Background phyto growth 172 168 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: ploss_avg_bkg ! Background phyto loss … … 174 170 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: mld_max_bkg ! Background max MLD 175 171 REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE :: tracer_bkg ! Background tracer state 176 #endif177 #if defined key_hadocc178 172 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: chl_bkg ! Background chl 179 173 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: cchl_p_bkg ! Background c:chl 180 #endif181 174 182 175 # include "domzgr_substitute.h90" … … 197 190 !!------------------------------------------------------------------------ 198 191 199 #if ! defined key_top || ( ! defined key_hadocc && ( ! defined key_medusa || ! defined key_foam_medusa ))192 #if ! defined key_top || ( ! defined key_hadocc && ! defined key_medusa ) 200 193 CALL ctl_stop( ' Attempting to assimilate biogeochemical observations', & 201 194 & ' but no compatible biogeochemical model is available' ) … … 206 199 & ln_slphynoninc .OR. ln_psi4inc .OR. ln_pphinc .OR. ln_po2inc ) THEN 207 200 CALL ctl_stop( ' Cannot assimilate PFTs, Si4, pH or O2 into HadOCC' ) 201 ENDIF 202 #endif 203 204 #if defined key_medusa 205 IF ( .NOT. ln_foam_medusa ) THEN 206 CALL ctl_stop( ' MEDUSA data assimilation options not turned on: set ln_foam_medusa' ) 208 207 ENDIF 209 208 #endif … … 517 516 !!------------------------------------------------------------------------ 518 517 519 #if defined key_top && ( defined key_hadocc || (defined key_medusa && defined key_foam_medusa))518 #if defined key_top && ( defined key_hadocc || defined key_medusa ) 520 519 IF ( ln_slchltotinc .OR. ln_slchldiainc .OR. ln_slchlnoninc .OR. & 521 520 & ln_schltotinc .OR. ln_slphytotinc .OR. ln_slphydiainc .OR. & … … 552 551 chl_bkg(:,:,:) = chl_bkg(:,:,:) * tmask(:,:,:) 553 552 cchl_p_bkg(:,:,:) = cchl_p_bkg(:,:,:) * tmask(:,:,:) 554 #elif defined key_medusa && defined key_foam_medusa553 #elif defined key_medusa 555 554 CALL iom_get( inum, jpdom_autoglo, 'medusa_chn', tracer_bkg(:,:,:,jpchn) ) 556 555 CALL iom_get( inum, jpdom_autoglo, 'medusa_chd', tracer_bkg(:,:,:,jpchd) ) … … 578 577 CALL iom_get( inum, jpdom_autoglo, 'hadocc_dic', tracer_bkg(:,:,:,jp_had_dic) ) 579 578 CALL iom_get( inum, jpdom_autoglo, 'hadocc_alk', tracer_bkg(:,:,:,jp_had_alk) ) 580 #elif defined key_medusa && defined key_foam_medusa579 #elif defined key_medusa 581 580 CALL iom_get( inum, jpdom_autoglo, 'medusa_zmi', tracer_bkg(:,:,:,jpzmi) ) 582 581 CALL iom_get( inum, jpdom_autoglo, 'medusa_zme', tracer_bkg(:,:,:,jpzme) ) … … 594 593 CALL iom_get( inum, jpdom_autoglo, 'hadocc_dic', tracer_bkg(:,:,:,jp_had_dic) ) 595 594 CALL iom_get( inum, jpdom_autoglo, 'hadocc_alk', tracer_bkg(:,:,:,jp_had_alk) ) 596 #elif defined key_medusa && defined key_foam_medusa595 #elif defined key_medusa 597 596 CALL iom_get( inum, jpdom_autoglo, 'medusa_dic', tracer_bkg(:,:,:,jpdic) ) 598 597 CALL iom_get( inum, jpdom_autoglo, 'medusa_alk', tracer_bkg(:,:,:,jpalk) ) … … 620 619 CALL iom_get( inum, jpdom_autoglo, 'hadocc_dic', tracer_bkg(:,:,:,jp_had_dic) ) 621 620 CALL iom_get( inum, jpdom_autoglo, 'hadocc_alk', tracer_bkg(:,:,:,jp_had_alk) ) 622 #elif defined key_medusa && defined key_foam_medusa621 #elif defined key_medusa 623 622 CALL iom_get( inum, jpdom_autoglo, 'medusa_dic', tracer_bkg(:,:,:,jpdic) ) 624 623 CALL iom_get( inum, jpdom_autoglo, 'medusa_alk', tracer_bkg(:,:,:,jpalk) ) … … 690 689 & ln_schltotinc .OR. ln_slphytotinc .OR. ln_slphydiainc .OR. & 691 690 & ln_slphynoninc ) THEN 692 #if defined key_medusa && defined key_foam_medusa691 #if defined key_medusa 693 692 CALL iom_rstput( kt, kt, inum, 'phy2d_chn', phyto2d_balinc(:,:,:,jpchn) ) 694 693 CALL iom_rstput( kt, kt, inum, 'phy2d_chd', phyto2d_balinc(:,:,:,jpchd) ) … … 721 720 722 721 IF ( ln_plchltotinc .OR. ln_pchltotinc ) THEN 723 #if defined key_medusa && defined key_foam_medusa722 #if defined key_medusa 724 723 CALL iom_rstput( kt, kt, inum, 'phy3d_chn', phyto3d_balinc(:,:,:,jpchn) ) 725 724 CALL iom_rstput( kt, kt, inum, 'phy3d_chd', phyto3d_balinc(:,:,:,jpchd) ) … … 733 732 734 733 IF ( ln_spco2inc ) THEN 735 #if defined key_medusa && defined key_foam_medusa734 #if defined key_medusa 736 735 CALL iom_rstput( kt, kt, inum, 'pco2_dic', pco2_balinc(:,:,:,jpdic) ) 737 736 CALL iom_rstput( kt, kt, inum, 'pco2_alk', pco2_balinc(:,:,:,jpalk) ) … … 741 740 #endif 742 741 ELSE IF ( ln_sfco2inc ) THEN 743 #if defined key_medusa && defined key_foam_medusa742 #if defined key_medusa 744 743 CALL iom_rstput( kt, kt, inum, 'fco2_dic', pco2_balinc(:,:,:,jpdic) ) 745 744 CALL iom_rstput( kt, kt, inum, 'fco2_alk', pco2_balinc(:,:,:,jpalk) ) … … 751 750 752 751 IF ( ln_pphinc ) THEN 753 #if defined key_medusa && defined key_foam_medusa752 #if defined key_medusa 754 753 CALL iom_rstput( kt, kt, inum, 'ph_dic', ph_balinc(:,:,:,jpdic) ) 755 754 CALL iom_rstput( kt, kt, inum, 'ph_alk', ph_balinc(:,:,:,jpalk) ) … … 806 805 CALL iom_rstput( kt, nitbkg_r, knum, 'hadocc_chl' , HADOCC_CHL(:,:,:) ) 807 806 CALL iom_rstput( kt, nitbkg_r, knum, 'hadocc_cchl' , cchl_p(:,:,:) ) 808 #elif defined key_medusa && defined key_foam_medusa807 #elif defined key_medusa 809 808 CALL iom_rstput( kt, nitbkg_r, knum, 'pgrow_avg' , pgrow_avg ) 810 809 CALL iom_rstput( kt, nitbkg_r, knum, 'ploss_avg' , ploss_avg ) … … 904 903 REAL(wp), DIMENSION(jpi,jpj) :: zinc_phytot ! Local phytot incs 905 904 REAL(wp), DIMENSION(jpi,jpj) :: zbkg_phytot ! Local phytot bkg 906 #if defined key_medusa && defined key_foam_medusa905 #if defined key_medusa 907 906 REAL(wp), DIMENSION(jpi,jpj) :: zinc_chldia ! Local chldia incs 908 907 REAL(wp), DIMENSION(jpi,jpj) :: zbkg_chldia ! Local chldia bkg … … 924 923 ! Total chlorophyll 925 924 IF ( ln_slchltotinc ) THEN 926 #if defined key_medusa && defined key_foam_medusa925 #if defined key_medusa 927 926 zbkg_chltot(:,:) = tracer_bkg(:,:,1,jpchn) + tracer_bkg(:,:,1,jpchd) 928 927 #elif defined key_hadocc … … 936 935 ENDIF 937 936 938 #if defined key_medusa && defined key_foam_medusa937 #if defined key_medusa 939 938 ! Diatom chlorophyll 940 939 IF ( ln_slchldiainc ) THEN … … 946 945 #endif 947 946 948 #if defined key_medusa && defined key_foam_medusa947 #if defined key_medusa 949 948 ! Non-diatom chlorophyll 950 949 IF ( ln_slchlnoninc ) THEN … … 958 957 ! Total phytoplankton carbon 959 958 IF ( ln_slphytotinc ) THEN 960 #if defined key_medusa && defined key_foam_medusa959 #if defined key_medusa 961 960 zbkg_phytot(:,:) = (trn(:,:,1,jpphn) * xthetapn) + (trn(:,:,1,jpphd) * xthetapd) 962 961 #elif defined key_hadocc … … 968 967 ENDIF 969 968 970 #if defined key_medusa && defined key_foam_medusa969 #if defined key_medusa 971 970 ! Diatom phytoplankton carbon 972 971 IF ( ln_slphydiainc ) THEN … … 978 977 #endif 979 978 980 #if defined key_medusa && defined key_foam_medusa979 #if defined key_medusa 981 980 ! Non-diatom phytoplankton carbon 982 981 IF ( ln_slphynoninc ) THEN … … 990 989 ! Select mixed layer 991 990 IF ( ll_asmdin ) THEN 992 #if defined key_top && ( defined key_hadocc || (defined key_medusa && defined key_foam_medusa))991 #if defined key_top && ( defined key_hadocc || defined key_medusa ) 993 992 CALL ctl_warn( ' Doing direct initialisation with ocean colour assimilation', & 994 993 & ' Mixed layer depth taken to be background maximum mld_max_bkg' ) … … 1026 1025 zincper = (nitiaufin_r - nitiaustr_r + 1) * rdt 1027 1026 1028 #if defined key_medusa && defined key_foam_medusa1027 #if defined key_medusa 1029 1028 CALL asm_phyto2d_bal_medusa( (ln_slchltotinc .OR. ln_schltotinc), & 1030 1029 & zinc_chltot, & … … 1084 1083 ! Add directly to trn and trb, rather than to tra, because tra gets 1085 1084 ! reset to zero at the start of trc_stp, called after this routine 1086 #if defined key_medusa && defined key_foam_medusa1085 #if defined key_medusa 1087 1086 WHERE( phyto2d_balinc(:,:,:,jp_msa0:jp_msa1) > 0.0_wp .OR. & 1088 1087 & trn(:,:,:,jp_msa0:jp_msa1) + phyto2d_balinc(:,:,:,jp_msa0:jp_msa1) * zincwgt > 0.0_wp ) … … 1120 1119 CALL ctl_warn( ' Doing direct initialisation with phyto2d assimilation', & 1121 1120 & ' Background state is taken from model rather than background file' ) 1122 #if defined key_medusa && defined key_foam_medusa1121 #if defined key_medusa 1123 1122 WHERE( phyto2d_balinc(:,:,:,jp_msa0:jp_msa1) > 0.0_wp .OR. & 1124 1123 & trn(:,:,:,jp_msa0:jp_msa1) + phyto2d_balinc(:,:,:,jp_msa0:jp_msa1) > 0.0_wp ) … … 1187 1186 ! 3) Subtract background from analysis to get chl incs 1188 1187 ! If rn_maxchlinc > 0 then cap total absolute chlorophyll increment at that value 1189 #if defined key_medusa && defined key_foam_medusa1188 #if defined key_medusa 1190 1189 bkg_chl(:,:,:) = tracer_bkg(:,:,:,jpchn) + tracer_bkg(:,:,:,jpchd) 1191 1190 #elif defined key_hadocc … … 1220 1219 ENDIF 1221 1220 1222 #if defined key_medusa && defined key_foam_medusa1221 #if defined key_medusa 1223 1222 ! Loop over each grid point partioning the increments based on existing ratios 1224 1223 DO jk = 1, jpk … … 1271 1270 ! Add directly to trn and trb, rather than to tra, because tra gets 1272 1271 ! reset to zero at the start of trc_stp, called after this routine 1273 #if defined key_medusa && defined key_foam_medusa1272 #if defined key_medusa 1274 1273 WHERE( phyto3d_balinc(:,:,:,jp_msa0:jp_msa1) > 0.0_wp .OR. & 1275 1274 & trn(:,:,:,jp_msa0:jp_msa1) + phyto3d_balinc(:,:,:,jp_msa0:jp_msa1) * zincwgt > 0.0_wp ) … … 1307 1306 CALL ctl_warn( ' Doing direct initialisation with phyto3d assimilation', & 1308 1307 & ' Background state is taken from model rather than background file' ) 1309 #if defined key_medusa && defined key_foam_medusa1308 #if defined key_medusa 1310 1309 WHERE( phyto3d_balinc(:,:,:,jp_msa0:jp_msa1) > 0.0_wp .OR. & 1311 1310 & trn(:,:,:,jp_msa0:jp_msa1) + phyto3d_balinc(:,:,:,jp_msa0:jp_msa1) > 0.0_wp ) … … 1388 1387 1389 1388 IF ( ln_sfco2inc ) THEN 1390 #if defined key_medusa && defined key_ foam_medusa && defined key_roam1389 #if defined key_medusa && defined key_roam 1391 1390 ! If assimilating fCO2, then convert to pCO2 using MEDUSA MOCSY subroutine 1392 1391 patm(1) = 1.0 … … 1421 1420 ENDIF 1422 1421 1423 #if defined key_medusa && defined key_foam_medusa1422 #if defined key_medusa 1424 1423 ! Account for phytoplankton balancing if required 1425 1424 IF ( ln_phytobal ) THEN … … 1456 1455 ! Select mixed layer 1457 1456 IF ( ll_asmdin ) THEN 1458 #if defined key_hadocc || (defined key_medusa && defined key_foam_medusa)1457 #if defined key_hadocc || defined key_medusa 1459 1458 CALL ctl_warn( ' Doing direct initialisation with pCO2 assimilation', & 1460 1459 & ' Mixed layer depth taken to be background maximum mld_max_bkg' ) … … 1541 1540 ! Add directly to trn and trb, rather than to tra, because tra gets 1542 1541 ! reset to zero at the start of trc_stp, called after this routine 1543 #if defined key_medusa && defined key_foam_medusa1542 #if defined key_medusa 1544 1543 WHERE( pco2_balinc(:,:,:,jp_msa0:jp_msa1) > 0.0_wp .OR. & 1545 1544 & trn(:,:,:,jp_msa0:jp_msa1) + pco2_balinc(:,:,:,jp_msa0:jp_msa1) * zincwgt > 0.0_wp ) … … 1578 1577 CALL ctl_warn( ' Doing direct initialisation with pCO2 assimilation', & 1579 1578 & ' Background state is taken from model rather than background file' ) 1580 #if defined key_medusa && defined key_foam_medusa1579 #if defined key_medusa 1581 1580 WHERE( pco2_balinc(:,:,:,jp_msa0:jp_msa1) > 0.0_wp .OR. & 1582 1581 & trn(:,:,:,jp_msa0:jp_msa1) + pco2_balinc(:,:,:,jp_msa0:jp_msa1) > 0.0_wp ) … … 1649 1648 !!------------------------------------------------------------------------ 1650 1649 1651 #if ! (defined key_medusa && defined key_foam_medusa)1650 #if ! defined key_medusa 1652 1651 CALL ctl_stop( ' pH balancing only implemented for MEDUSA' ) 1653 1652 #else … … 1858 1857 1859 1858 IF ( ln_pno3inc ) THEN 1860 #if defined key_hadocc || ( defined key_medusa && defined key_foam_medusa )1859 #if defined key_hadocc || defined key_medusa 1861 1860 #if defined key_hadocc 1862 1861 it = jp_had_nut 1863 #elif defined key_medusa && defined key_foam_medusa1862 #elif defined key_medusa 1864 1863 it = jpdin 1865 1864 #endif … … 1882 1881 1883 1882 IF ( ln_psi4inc ) THEN 1884 #if defined key_medusa && defined key_foam_medusa1883 #if defined key_medusa 1885 1884 it = jpsil 1886 1885 IF ( ln_phytobal ) THEN … … 1902 1901 1903 1902 IF ( ln_pdicinc ) THEN 1904 #if defined key_hadocc || ( defined key_medusa && defined key_foam_medusa )1903 #if defined key_hadocc || defined key_medusa 1905 1904 #if defined key_hadocc 1906 1905 it = jp_had_dic 1907 #elif defined key_medusa && defined key_foam_medusa1906 #elif defined key_medusa 1908 1907 it = jpdic 1909 1908 #endif … … 1926 1925 1927 1926 IF ( ln_palkinc ) THEN 1928 #if defined key_hadocc || ( defined key_medusa && defined key_foam_medusa )1927 #if defined key_hadocc || defined key_medusa 1929 1928 #if defined key_hadocc 1930 1929 it = jp_had_alk 1931 #elif defined key_medusa && defined key_foam_medusa1930 #elif defined key_medusa 1932 1931 it = jpalk 1933 1932 #endif … … 1950 1949 1951 1950 IF ( ln_po2inc ) THEN 1952 #if defined key_medusa && defined key_foam_medusa1951 #if defined key_medusa 1953 1952 it = jpoxy 1954 1953 IF ( ln_phytobal ) THEN … … 2002 2001 trb(:,:,:,jp_had_nut) = trb(:,:,:,jp_had_nut) + pno3_bkginc(:,:,:) * zincwgt 2003 2002 END WHERE 2004 #elif defined key_medusa && defined key_foam_medusa2003 #elif defined key_medusa 2005 2004 WHERE( pno3_bkginc(:,:,:) > 0.0_wp .OR. & 2006 2005 & trn(:,:,:,jpdin) + pno3_bkginc(:,:,:) * zincwgt > 0.0_wp ) … … 2014 2013 2015 2014 IF ( ln_psi4inc ) THEN 2016 #if defined key_medusa && defined key_foam_medusa2015 #if defined key_medusa 2017 2016 WHERE( psi4_bkginc(:,:,:) > 0.0_wp .OR. & 2018 2017 & trn(:,:,:,jpsil) + psi4_bkginc(:,:,:) * zincwgt > 0.0_wp ) … … 2032 2031 trb(:,:,:,jp_had_dic) = trb(:,:,:,jp_had_dic) + pdic_bkginc(:,:,:) * zincwgt 2033 2032 END WHERE 2034 #elif defined key_medusa && defined key_foam_medusa2033 #elif defined key_medusa 2035 2034 WHERE( pdic_bkginc(:,:,:) > 0.0_wp .OR. & 2036 2035 & trn(:,:,:,jpdic) + pdic_bkginc(:,:,:) * zincwgt > 0.0_wp ) … … 2050 2049 trb(:,:,:,jp_had_alk) = trb(:,:,:,jp_had_alk) + palk_bkginc(:,:,:) * zincwgt 2051 2050 END WHERE 2052 #elif defined key_medusa && defined key_foam_medusa2051 #elif defined key_medusa 2053 2052 WHERE( palk_bkginc(:,:,:) > 0.0_wp .OR. & 2054 2053 & trn(:,:,:,jpalk) + palk_bkginc(:,:,:) * zincwgt > 0.0_wp ) … … 2062 2061 2063 2062 IF ( ln_po2inc ) THEN 2064 #if defined key_medusa && defined key_foam_medusa2063 #if defined key_medusa 2065 2064 WHERE( po2_bkginc(:,:,:) > 0.0_wp .OR. & 2066 2065 & trn(:,:,:,jpoxy) + po2_bkginc(:,:,:) * zincwgt > 0.0_wp ) … … 2098 2097 CALL ctl_warn( ' Doing direct initialisation of HadOCC with 3D BGC assimilation', & 2099 2098 & ' Background state is taken from model rather than background file' ) 2100 #elif defined key_medusa && defined key_foam_medusa2099 #elif defined key_medusa 2101 2100 CALL ctl_warn( ' Doing direct initialisation of MEDUSA with 3D BGC assimilation', & 2102 2101 & ' Background state is taken from model rather than background file' ) … … 2110 2109 trb(:,:,:,jp_had_nut) = trn(:,:,:,jp_had_nut) 2111 2110 END WHERE 2112 #elif defined key_medusa && defined key_foam_medusa2111 #elif defined key_medusa 2113 2112 WHERE( pno3_bkginc(:,:,:) > 0.0_wp .OR. & 2114 2113 & trn(:,:,:,jpdin) + pno3_bkginc(:,:,:) > 0.0_wp ) … … 2122 2121 2123 2122 IF ( ln_psi4inc ) THEN 2124 #if defined key_medusa && defined key_foam_medusa2123 #if defined key_medusa 2125 2124 WHERE( psi4_bkginc(:,:,:) > 0.0_wp .OR. & 2126 2125 & trn(:,:,:,jpsil) + psi4_bkginc(:,:,:) > 0.0_wp ) … … 2140 2139 trb(:,:,:,jp_had_dic) = trn(:,:,:,jp_had_dic) 2141 2140 END WHERE 2142 #elif defined key_medusa && defined key_foam_medusa2141 #elif defined key_medusa 2143 2142 WHERE( pdic_bkginc(:,:,:) > 0.0_wp .OR. & 2144 2143 & trn(:,:,:,jpdic) + pdic_bkginc(:,:,:) > 0.0_wp ) … … 2158 2157 trb(:,:,:,jp_had_alk) = trn(:,:,:,jp_had_alk) 2159 2158 END WHERE 2160 #elif defined key_medusa && defined key_foam_medusa2159 #elif defined key_medusa 2161 2160 WHERE( palk_bkginc(:,:,:) > 0.0_wp .OR. & 2162 2161 & trn(:,:,:,jpalk) + palk_bkginc(:,:,:) > 0.0_wp ) … … 2170 2169 2171 2170 IF ( ln_po2inc ) THEN 2172 #if defined key_medusa && defined key_foam_medusa2171 #if defined key_medusa 2173 2172 WHERE( po2_bkginc(:,:,:) > 0.0_wp .OR. & 2174 2173 & trn(:,:,:,jpoxy) + po2_bkginc(:,:,:) > 0.0_wp ) -
branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc_v3/NEMOGCM/NEMO/OPA_SRC/ASM/asmphyto2dbal_medusa.F90
r10055 r10141 12 12 !! History : 3.6 ! 2017-08 (D. Ford) Adapted from asmphyto2dbal_hadocc 13 13 !!---------------------------------------------------------------------- 14 #if defined key_asminc && defined key_medusa && defined key_foam_medusa14 #if defined key_asminc && defined key_medusa 15 15 !!---------------------------------------------------------------------- 16 16 !! 'key_asminc' : assimilation increment interface 17 17 !! 'key_medusa' : MEDUSA model 18 !! 'key_foam_medusa' : MEDUSA extras for FOAM OBS and ASM19 18 !!---------------------------------------------------------------------- 20 19 !! asm_phyto2d_bal_medusa : routine to calculate increments to MEDUSA -
branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc_v3/NEMOGCM/NEMO/TOP_SRC/MEDUSA/air_sea.F90
r10055 r10141 74 74 jriver_alk, jriver_c, & 75 75 jriver_n, jriver_si, & 76 ln_foam_medusa, & 76 77 riv_alk, riv_c, riv_n, riv_si, & 77 78 zn_dms_chd, zn_dms_chn, zn_dms_din, & 78 79 zn_dms_mld, zn_dms_qsr, & 79 # if defined key_foam_medusa80 80 f2_pco2w, f2_fco2w, & 81 # endif82 81 xnln, xnld 83 82 USE trc, ONLY: med_diag … … 90 89 # else 91 90 USE trcco2_medusa, ONLY: trc_co2_medusa 92 # if defined key_foam_medusa93 91 USE mocsy_mainmod, ONLY: p2fCO2 94 # endif95 92 # endif 96 93 USE trcdms_medusa, ONLY: trc_dms_medusa … … 333 330 iters, ' AT (', ji, ', ', jj, ', 1) AT ', kt 334 331 endif 335 # if defined key_foam_medusa 336 !! DAF (Aug 2017): calculate fCO2 for observation operator337 CALL p2fCO2( f_pco2w, ztmp, f_pp0, 0.0, 1, f_fco2w )338 # endif 332 IF ( ln_foam_medusa ) THEN 333 !! DAF (Aug 2017): calculate fCO2 for observation operator 334 CALL p2fCO2( f_pco2w, ztmp, f_pp0, 0.0, 1, f_fco2w ) 335 ENDIF 339 336 ENDIF 340 337 ENDDO … … 516 513 CO2flux_conv 517 514 !! ENDIF 518 # if defined key_foam_medusa 519 !! DAF (Aug 2017): Save pCO2 and fCO2 for observation operator520 f2_pco2w(ji,jj) = f_pco2w(ji,jj)521 f2_fco2w(ji,jj) = f_pco2w(ji,jj)522 # endif 515 IF ( ln_foam_medusa ) THEN 516 !! DAF (Aug 2017): Save pCO2 and fCO2 for observation operator 517 f2_pco2w(ji,jj) = f_pco2w(ji,jj) 518 f2_fco2w(ji,jj) = f_pco2w(ji,jj) 519 ENDIF 523 520 IF ( lk_iomput ) THEN 524 521 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
r10055 r10141 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, & 48 ln_foam_medusa, mld_max, pgrow_avg, & 50 49 ploss_avg, phyt_avg, & 51 # endif52 50 za_sed_c, za_sed_ca, za_sed_fe, & 53 51 za_sed_n, za_sed_si, & … … 59 57 USE trc, ONLY: med_diag, nittrc000, trn 60 58 USE trcnam_trp, ONLY: ln_trcadv_cen2, ln_trcadv_tvd 61 # if defined key_foam_medusa62 59 USE zdfmxl, ONLY: hmld 63 # endif64 60 65 61 !! time (integer timestep) … … 120 116 # endif 121 117 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 118 IF ( ln_foam_medusa ) THEN 119 !!---------------------------------------------------------------------- 120 !! Diagnostics required for ocean colour assimilation: 121 !! Mixed layer average phytoplankton growth, loss and concentration 122 !! Maximum mixed layer depth 123 !!---------------------------------------------------------------------- 124 !! 125 DO jj = 2,jpjm1 126 DO ji = 2,jpim1 127 IF ( hmld(ji,jj) .GT. 0.0 ) THEN 128 pgrow_avg(ji,jj) = pgrow_avg(ji,jj) / hmld(ji,jj) 129 ploss_avg(ji,jj) = ploss_avg(ji,jj) / hmld(ji,jj) 130 phyt_avg(ji,jj) = phyt_avg(ji,jj) / hmld(ji,jj) 131 IF ( hmld(ji,jj) .GT. mld_max(ji,jj) ) THEN 132 mld_max(ji,jj) = hmld(ji,jj) 133 ENDIF 134 ENDIF 135 END DO 139 136 END DO 140 END DO 141 # endif 137 ENDIF 142 138 143 139 # if defined key_debug_medusa -
branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc_v3/NEMOGCM/NEMO/TOP_SRC/MEDUSA/bio_medusa_init.F90
r10055 r10141 35 35 USE bio_medusa_mod 36 36 USE par_oce, ONLY: jpi, jpj, jpk 37 # if defined key_foam_medusa38 37 USE sms_medusa, ONLY: jdms, pgrow_avg, ploss_avg, phyt_avg, mld_max 39 # else40 USE sms_medusa, ONLY: jdms41 # endif42 38 USE trc, ONLY: ln_diatrc, med_diag, nittrc000 43 39 USE in_out_manager, ONLY: lwp, numout … … 200 196 # endif 201 197 !! 202 # if defined key_foam_medusa203 198 pgrow_avg(:,:) = 0.0 204 199 ploss_avg(:,:) = 0.0 … … 207 202 mld_max(:,:) = 0.0 208 203 ENDIF 209 # endif210 204 !! 211 205 !! allocate and initiate 2D diag -
branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc_v3/NEMOGCM/NEMO/TOP_SRC/MEDUSA/plankton.F90
r10055 r10141 36 36 fdpn, fdpn2, fdzme, fdzme2, & 37 37 fdzmi, fdzmi2, fsdiss, fsin, & 38 # if defined key_foam_medusa39 38 fdep1, fprn, fprd, & 40 39 fgmepd, fgmepn, fgmipn, & 41 # endif42 40 zphd, zphn, zpds, zzme, zzmi 43 # if defined key_foam_medusa44 41 USE dom_oce, ONLY: e3t_0, e3t_n, gdepw_0, gdepw_n, tmask 45 42 USE par_kind, ONLY: wp 46 # else47 USE dom_oce, ONLY: tmask48 # endif49 43 USE par_oce, ONLY: jpim1, jpjm1 50 44 USE phytoplankton_mod, ONLY: phytoplankton 51 45 USE sms_medusa, ONLY: jmpd, jmpn, jmzme, jmzmi, & 52 # if defined key_foam_medusa 46 ln_foam_medusa, & 53 47 pgrow_avg, ploss_avg, phyt_avg, & 54 # endif55 48 xkphd, xkphn, xkzme, xkzmi, & 56 49 xmetapd, xmetapn, xmetazme, xmetazmi, & 57 50 xmpd, xmpn, xmzme, xmzmi, xsdiss 58 # if defined key_foam_medusa59 51 USE zdfmxl, ONLY: hmld 60 # endif61 52 USE zooplankton_mod, ONLY: zooplankton 62 53 63 # if defined key_foam_medusa64 54 !!* Substitution 65 55 # include "domzgr_substitute.h90" 66 # endif67 56 68 57 !! Level … … 71 60 INTEGER :: ji, jj 72 61 73 # if defined key_foam_medusa74 62 REAL(wp) :: fq0 75 # endif76 63 77 64 !!------------------------------------------------------------------- … … 212 199 ENDDO 213 200 214 # if defined key_foam_medusa 215 !! Mixed layer averages for ocean colour assimilation216 !!217 DO jj = 2,jpjm1218 DO ji = 2,jpim1219 IF (tmask(ji,jj,jk) == 1) THEN220 if (fdep1(ji,jj).le.hmld(ji,jj)) then221 !! this level is entirely in the mixed layer222 fq0 = 1.0223 elseif (fsdepw(ji,jj,jk).ge.hmld(ji,jj)) then224 !! this level is entirely below the mixed layer225 fq0 = 0.0226 else227 !! this level straddles the mixed layer228 fq0 = (hmld(ji,jj) - fsdepw(ji,jj,jk)) / fse3t(ji,jj,jk)229 endif230 !!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 ENDIF245 ENDDO246 ENDDO247 # endif 201 IF ( ln_foam_medusa ) THEN 202 !! Mixed layer averages for ocean colour assimilation 203 !! 204 DO jj = 2,jpjm1 205 DO ji = 2,jpim1 206 IF (tmask(ji,jj,jk) == 1) THEN 207 if (fdep1(ji,jj).le.hmld(ji,jj)) then 208 !! this level is entirely in the mixed layer 209 fq0 = 1.0 210 elseif (fsdepw(ji,jj,jk).ge.hmld(ji,jj)) then 211 !! this level is entirely below the mixed layer 212 fq0 = 0.0 213 else 214 !! this level straddles the mixed layer 215 fq0 = (hmld(ji,jj) - fsdepw(ji,jj,jk)) / fse3t(ji,jj,jk) 216 endif 217 !! 218 pgrow_avg(ji,jj) = pgrow_avg(ji,jj) + & 219 (((fprn(ji,jj) * zphn(ji,jj)) + & 220 (fprd(ji,jj) * zphd(ji,jj)) ) * & 221 fse3t(ji,jj,jk) * fq0) 222 ploss_avg(ji,jj) = ploss_avg(ji,jj) + & 223 ((fgmepd(ji,jj) + fdpd(ji,jj) + & 224 fdpd2(ji,jj) + & 225 fgmepn(ji,jj) + fdpn(ji,jj) + & 226 fdpn2(ji,jj) + fgmipn(ji,jj) ) * & 227 fse3t(ji,jj,jk) * fq0) 228 phyt_avg(ji,jj) = phyt_avg(ji,jj) + & 229 ((zphn(ji,jj) + zphd(ji,jj)) * & 230 fse3t(ji,jj,jk) * fq0) 231 ENDIF 232 ENDDO 233 ENDDO 234 ENDIF 248 235 249 236 END SUBROUTINE plankton -
branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc_v3/NEMOGCM/NEMO/TOP_SRC/MEDUSA/sms_medusa.F90
r10055 r10141 212 212 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: f2_ccd_arg !: 2D aragonite CCD depth 213 213 !! 214 #if defined key_foam_medusa215 214 !! 2D fields of pCO2 and fCO2 for observation operator 216 215 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: f2_pco2w !: 2D pCO2 217 216 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: f2_fco2w !: 2D fCO2 218 217 !! 219 #endif220 218 !! 2D fields of organic and inorganic material sedimented on the seafloor 221 219 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: zb_sed_n !: 2D organic nitrogen (before) … … 295 293 INTEGER :: co2_rec 296 294 REAL(wp) :: co2_yinit, co2_yend !: First and Last year read in the xCO2.atm file 295 REAL(wp) :: xobs_xco2a !: Observed atmospheric xCO2, from namelist 297 296 #endif 298 297 … … 305 304 #else 306 305 LOGICAL , PUBLIC :: lk_pi_co2 = .FALSE. !: PI xCO2 unused 307 # if defined key_foam_medusa308 REAL(wp) :: xobs_xco2a !: Observed atmospheric xCO2, read in309 # endif310 306 #endif 311 307 … … 358 354 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: cmask !: ??? 359 355 360 #if defined key_foam_medusa361 356 !!---------------------------------------------------------------------- 362 357 !! Parameters required for ocean colour assimilation 363 358 !!---------------------------------------------------------------------- 364 359 !! 360 LOGICAL :: ln_foam_medusa !: Flag to calculate and save diagnostics 365 361 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: pgrow_avg !: Mixed layer average phytoplankton growth 366 362 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: ploss_avg !: Mixed layer average phytoplankton loss … … 368 364 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: mld_max !: Maximum mixed layer depth 369 365 !! 370 #endif371 366 372 367 !!---------------------------------------------------------------------- … … 392 387 !* 2D and 3D fields of carbonate system parameters 393 388 ALLOCATE( f2_ccd_cal(jpi,jpj) , f2_ccd_arg(jpi,jpj) , & 394 # if defined key_foam_medusa395 389 f2_pco2w(jpi,jpj) , f2_fco2w(jpi,jpj) , & 396 # endif397 390 & f3_pH(jpi,jpj,jpk) , f3_h2co3(jpi,jpj,jpk), & 398 391 & f3_hco3(jpi,jpj,jpk) , f3_co3(jpi,jpj,jpk) , & … … 443 436 & ffln(jpi,jpj,jpk) , fflf(jpi,jpj,jpk) , & 444 437 & ffls(jpi,jpj,jpk) , cmask(jpi,jpj) , STAT=ierr(8) ) 445 # if defined key_foam_medusa 438 !* Fields for ocean colour data assimilation 446 439 ALLOCATE( pgrow_avg(jpi,jpj) , ploss_avg(jpi,jpj) , & 447 440 & phyt_avg(jpi,jpj) , mld_max(jpi,jpj) , STAT=ierr(9) ) 448 # endif449 441 #endif 450 442 ! -
branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc_v3/NEMOGCM/NEMO/TOP_SRC/MEDUSA/trcbio_medusa.F90
r10055 r10141 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, & 107 # if defined key_roam 108 xobs_xco2a, & 109 # endif 110 pgrow_avg, & 109 111 ploss_avg, phyt_avg, mld_max, & 110 # endif 111 lk_pi_co2 112 lk_pi_co2, ln_foam_medusa 112 113 USE trc, ONLY: ln_rsttr, nittrc000, trn 113 114 USE bio_medusa_init_mod, ONLY: bio_medusa_init … … 334 335 !! f_xco2a(:,:) = 284.725 !! CMIP5 pre-industrial pCO2 335 336 f_xco2a(:,:) = 284.317 !! CMIP6 pre-industrial pCO2 336 # if defined key_foam_medusa337 337 ELSEIF ( xobs_xco2a > 0.0 ) THEN 338 338 IF(lwp) WRITE(numout,*) ' using observed atm pCO2 = ', xobs_xco2a 339 339 f_xco2a(:,:) = xobs_xco2a 340 # endif341 340 ELSE 342 341 !! xCO2 from file … … 427 426 !! now use the NEMO calendar tool : nsec_month to be sure to call 428 427 !! at the beginning of a new month . 429 #if defined key_foam_medusa430 428 !! DAF: For FOAM we want to run daily 431 429 IF ( (kt == nittrc000 .AND. .NOT.ln_rsttr) .OR. & 432 (MOD(kt*rdt, 86400.0) == rdt) ) THEN 433 #else 434 IF ( (kt == nittrc000 .AND. .NOT.ln_rsttr) .OR. & 435 ( nsec_month .LE. INT(rdt) ) ) THEN 436 #endif 430 ( nsec_month .LE. INT(rdt) ) .OR. & 431 ( nsec_day .LE. INT(rdt) .AND. ln_foam_medusa ) ) THEN 437 432 IF ( lwp ) WRITE(numout,*) & 438 433 ' *** 3D carb chem call *** -- kt:', kt, & -
branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc_v3/NEMOGCM/NEMO/TOP_SRC/MEDUSA/trcini_medusa.F90
r10059 r10141 330 330 !!---------------------------------------------------------------------- 331 331 !! 332 # if defined key_foam_medusa333 332 IF( ( .NOT.lk_oasis ) .AND. ( .NOT.lk_pi_co2 ) .AND. ( xobs_xco2a <= 0.0 ) ) THEN 334 # else335 IF( ( .NOT.lk_oasis ) .AND. ( .NOT.lk_pi_co2 ) ) THEN336 # endif337 333 IF(lwp) WRITE(numout,*) ' trc_ini_medusa: initialisating atm CO2 record' 338 334 CALL trc_ini_medusa_co2atm -
branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc_v3/NEMOGCM/NEMO/TOP_SRC/MEDUSA/trcnam_medusa.F90
r10055 r10141 87 87 & xsdiss, & 88 88 & sedlam,sedlostpoc,jpkb,jdms,jdms_input,jdms_model, & 89 & scl_chl, chl_out, dmsmin, dmscut, dmsslp 89 & scl_chl, chl_out, dmsmin, dmscut, dmsslp, & 90 & ln_foam_medusa 90 91 #if defined key_roam 91 92 NAMELIST/natroam/ xthetaphy,xthetazoo,xthetanit, & 92 # if defined key_foam_medusa93 93 & xobs_xco2a, & 94 # endif95 94 & xthetarem,xo2min 96 95 #endif … … 258 257 dmscut = 1.72 !! Anderson DMS default 259 258 dmsslp = 8.24 !! Anderson DMS default 259 !! 260 ln_foam_medusa = .FALSE. 260 261 261 262 !REWIND(numnatm) … … 418 419 !! chl_out : select the chl field to send at the UM: 419 420 !! 1- Surf Chl ; 2- MLD Chl 421 !! 422 !! FOAM - observation operator and data assimilation 423 !! ln_foam_medusa : calculate required diagnostics 420 424 421 425 IF(lwp) THEN … … 493 497 & ' key_debug_medusa = INACTIVE' 494 498 # endif 495 #if defined key_foam_medusa496 WRITE(numout,*) &497 & ' key_foam_medusa = ACTIVE'498 #else499 WRITE(numout,*) &500 & ' key_foam_medusa = INACTIVE'501 #endif502 499 WRITE(numout,*) ' ' 503 500 … … 985 982 ENDIF 986 983 ENDIF ! IF lk_oasis=true 984 !! FOAM 985 WRITE(numout,*) '=== FOAM-related parameters' 986 WRITE(numout,*) & 987 & ' calculate diagnostics for data assimilation, ln_foam_medusa = ', ln_foam_medusa 987 988 !! 988 989 ENDIF … … 1040 1041 xthetarem = 0. 1041 1042 xo2min = 0. 1042 # if defined key_foam_medusa1043 1043 xobs_xco2a = 0. 1044 # endif1045 1044 1046 1045 !READ(numnatm,natroam) … … 1062 1061 !! xthetarem : oxygen consumption by carbon remineralisation 1063 1062 !! xo2min : oxygen minimum concentration 1064 # if defined key_foam_medusa 1065 !! xobs_xco2a : observed atmospheric xCO2 1066 # endif 1063 !! xobs_xco2a : observed atmospheric xCO2 (not used if <= 0) 1067 1064 1068 1065 IF(lwp) THEN … … 1082 1079 WRITE(numout,*) & 1083 1080 & ' oxygen minimum concentration xo2min = ', xo2min 1084 # if defined key_foam_medusa1085 1081 WRITE(numout,*) & 1086 & ' observed atmospheric xCO2 xobs_xco2a = ', xobs_xco2a 1087 # endif 1082 & ' observed atmospheric xCO2 (not used if <= 0) xobs_xco2a = ', xobs_xco2a 1088 1083 ENDIF 1089 1084 -
branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc_v3/NEMOGCM/NEMO/TOP_SRC/trcrst.F90
r10055 r10141 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_medusa48 47 USE obs_const, ONLY: obfillflt ! Observation operator fill value 49 #endif50 48 51 49 IMPLICIT NONE … … 342 340 ENDIF 343 341 ! 344 # if defined key_foam_medusa 345 !! 2D fields of pCO2 and fCO2 for observation operator on first timestep346 IF( iom_varid( numrtr, 'PCO2W', ldstop = .FALSE. ) > 0 ) THEN347 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 ELSE351 IF(lwp) WRITE(numout,*) ' MEDUSA pCO2 absent - setting to fill ...'352 f2_pco2w(:,:) = obfillflt * tmask(:,:,1)353 f2_fco2w(:,:) = obfillflt * tmask(:,:,1)354 ENDIF355 # endif 342 IF ( ln_foam_medusa ) THEN 343 !! 2D fields of pCO2 and fCO2 for observation operator on first timestep 344 IF( iom_varid( numrtr, 'PCO2W', ldstop = .FALSE. ) > 0 ) THEN 345 IF(lwp) WRITE(numout,*) ' MEDUSA pCO2 present - reading in ...' 346 CALL iom_get( numrtr, jpdom_autoglo, 'PCO2W', f2_pco2w(:,:) ) 347 CALL iom_get( numrtr, jpdom_autoglo, 'FCO2W', f2_fco2w(:,:) ) 348 ELSE 349 IF(lwp) WRITE(numout,*) ' MEDUSA pCO2 absent - setting to fill ...' 350 f2_pco2w(:,:) = obfillflt * tmask(:,:,1) 351 f2_fco2w(:,:) = obfillflt * tmask(:,:,1) 352 ENDIF 353 ENDIF 356 354 # endif 357 # if defined key_foam_medusa 358 !! Fields for ocean colour assimilation on first timestep359 IF( iom_varid( numrtr, 'pgrow_avg', ldstop = .FALSE. ) > 0 ) THEN360 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 ELSE366 IF(lwp) WRITE(numout,*) ' MEDUSA pgrow_avg absent - setting to zero ...'367 pgrow_avg(:,:) = 0.0368 ploss_avg(:,:) = 0.0369 phyt_avg(:,:) = 0.0370 mld_max(:,:) = 0.0371 ENDIF372 # endif 355 IF ( ln_foam_medusa ) THEN 356 !! Fields for ocean colour assimilation on first timestep 357 IF( iom_varid( numrtr, 'pgrow_avg', ldstop = .FALSE. ) > 0 ) THEN 358 IF(lwp) WRITE(numout,*) ' MEDUSA pgrow_avg present - reading in ...' 359 CALL iom_get( numrtr, jpdom_autoglo, 'pgrow_avg', pgrow_avg(:,:) ) 360 CALL iom_get( numrtr, jpdom_autoglo, 'ploss_avg', ploss_avg(:,:) ) 361 CALL iom_get( numrtr, jpdom_autoglo, 'phyt_avg', phyt_avg(:,:) ) 362 CALL iom_get( numrtr, jpdom_autoglo, 'mld_max', mld_max(:,:) ) 363 ELSE 364 IF(lwp) WRITE(numout,*) ' MEDUSA pgrow_avg absent - setting to zero ...' 365 pgrow_avg(:,:) = 0.0 366 ploss_avg(:,:) = 0.0 367 phyt_avg(:,:) = 0.0 368 mld_max(:,:) = 0.0 369 ENDIF 370 ENDIF 373 371 374 372 #endif … … 541 539 call trc_rst_dia_stat( f2_ccd_arg(:,:),'CCD_ARG') 542 540 !! 543 # if defined key_foam_medusa 544 !! Fields for observation operator on first timestep545 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 541 IF ( ln_foam_medusa ) THEN 542 !! Fields for observation operator on first timestep 543 IF(lwp) WRITE(numout,*) ' MEDUSA OBS fields - writing out ...' 544 CALL iom_rstput( kt, nitrst, numrtw, 'PCO2W', f2_pco2w(:,:) ) 545 CALL iom_rstput( kt, nitrst, numrtw, 'FCO2W', f2_fco2w(:,:) ) 546 ENDIF 549 547 # endif 550 # if defined key_foam_medusa 551 !! Fields for assimilation on first timestep552 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(:,:) )557 # endif 548 IF ( ln_foam_medusa ) THEN 549 !! Fields for assimilation on first timestep 550 IF(lwp) WRITE(numout,*) ' MEDUSA ASM fields - writing out ...' 551 CALL iom_rstput( kt, nitrst, numrtw, 'pgrow_avg', pgrow_avg(:,:) ) 552 CALL iom_rstput( kt, nitrst, numrtw, 'ploss_avg', ploss_avg(:,:) ) 553 CALL iom_rstput( kt, nitrst, numrtw, 'phyt_avg', phyt_avg(:,:) ) 554 CALL iom_rstput( kt, nitrst, numrtw, 'mld_max', mld_max(:,:) ) 555 ENDIF 558 556 !! 559 557 #endif
Note: See TracChangeset
for help on using the changeset viewer.