Changeset 5260 for branches/2014/dev_r4650_UKMO10_Tidally_Meaned_Diagnostics/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90
- Timestamp:
- 2015-05-12T12:37:15+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2014/dev_r4650_UKMO10_Tidally_Meaned_Diagnostics/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90
r4624 r5260 56 56 LOGICAL, PUBLIC, PARAMETER :: lk_asminc = .FALSE. !: No assimilation increments 57 57 #endif 58 LOGICAL, PUBLIC :: ln_bkgwri !: No output of the background state fields59 LOGICAL, PUBLIC :: ln_asmiau !: No applying forcing with an assimilation increment60 LOGICAL, PUBLIC :: ln_asmdin !: No direct initialization61 LOGICAL, PUBLIC :: ln_trainc !: No tracer (T and S) assimilation increments62 LOGICAL, PUBLIC :: ln_dyninc !: No dynamics (u and v) assimilation increments63 LOGICAL, PUBLIC :: ln_sshinc !: No sea surface height assimilation increment64 LOGICAL, PUBLIC :: ln_seaiceinc !: No sea ice concentration increment65 LOGICAL, PUBLIC :: ln_salfix !: Apply minimum salinity check58 LOGICAL, PUBLIC :: ln_bkgwri = .FALSE. !: No output of the background state fields 59 LOGICAL, PUBLIC :: ln_asmiau = .FALSE. !: No applying forcing with an assimilation increment 60 LOGICAL, PUBLIC :: ln_asmdin = .FALSE. !: No direct initialization 61 LOGICAL, PUBLIC :: ln_trainc = .FALSE. !: No tracer (T and S) assimilation increments 62 LOGICAL, PUBLIC :: ln_dyninc = .FALSE. !: No dynamics (u and v) assimilation increments 63 LOGICAL, PUBLIC :: ln_sshinc = .FALSE. !: No sea surface height assimilation increment 64 LOGICAL, PUBLIC :: ln_seaiceinc !: No sea ice concentration increment 65 LOGICAL, PUBLIC :: ln_salfix = .FALSE. !: Apply minimum salinity check 66 66 LOGICAL, PUBLIC :: ln_temnofreeze = .FALSE. !: Don't allow the temperature to drop below freezing 67 INTEGER, PUBLIC :: nn_divdmp !: Apply divergence damping filter nn_divdmp times67 INTEGER, PUBLIC :: nn_divdmp !: Apply divergence damping filter nn_divdmp times 68 68 69 69 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: t_bkg , s_bkg !: Background temperature and salinity … … 109 109 !! ** Action : 110 110 !!---------------------------------------------------------------------- 111 INTEGER :: ji, jj, jk 112 INTEGER :: jt 113 INTEGER :: imid 114 INTEGER :: inum 111 INTEGER :: ji, jj, jk, jt ! dummy loop indices 112 INTEGER :: imid, inum ! local integers 113 INTEGER :: ios ! Local integer output status for namelist read 115 114 INTEGER :: iiauper ! Number of time steps in the IAU period 116 115 INTEGER :: icycper ! Number of time steps in the cycle … … 120 119 INTEGER :: iitiaustr_date ! Date YYYYMMDD of IAU interval start time step 121 120 INTEGER :: iitiaufin_date ! Date YYYYMMDD of IAU interval final time step 122 INTEGER :: ios ! Local integer output status for namelist read 123 121 ! 124 122 REAL(wp) :: znorm ! Normalization factor for IAU weights 125 REAL(wp) :: ztotwgt ! Value of time-integrated IAU weights 126 ! (should be equal to one) 123 REAL(wp) :: ztotwgt ! Value of time-integrated IAU weights (should be equal to one) 127 124 REAL(wp) :: z_inc_dateb ! Start date of interval on which increment is valid 128 125 REAL(wp) :: z_inc_datef ! End date of interval on which increment is valid 129 126 REAL(wp) :: zdate_bkg ! Date in background state file for DI 130 127 REAL(wp) :: zdate_inc ! Time axis in increments file 131 132 REAL(wp), POINTER, DIMENSION(:,:) :: hdiv128 ! 129 REAL(wp), POINTER, DIMENSION(:,:) :: hdiv ! 2D workspace 133 130 !! 134 131 NAMELIST/nam_asminc/ ln_bkgwri, & … … 136 133 & ln_asmdin, ln_asmiau, & 137 134 & nitbkg, nitdin, nitiaustr, nitiaufin, niaufn, & 138 & ln_salfix, salfixmin, & 139 & nn_divdmp 135 & ln_salfix, salfixmin, nn_divdmp 140 136 !!---------------------------------------------------------------------- 141 137 … … 143 139 ! Read Namelist nam_asminc : assimilation increment interface 144 140 !----------------------------------------------------------------------- 145 146 141 ln_seaiceinc = .FALSE. 147 142 ln_temnofreeze = .FALSE. … … 186 181 icycper = nitend - nit000 + 1 ! Cycle interval length 187 182 188 ! Date of final time step 189 CALL calc_date( nit000, nitend, ndate0, iitend_date ) 190 191 ! Background time for Jb referenced to ndate0 192 CALL calc_date( nit000, nitbkg_r, ndate0, iitbkg_date ) 193 194 ! Background time for DI referenced to ndate0 195 CALL calc_date( nit000, nitdin_r, ndate0, iitdin_date ) 196 197 ! IAU start time referenced to ndate0 198 CALL calc_date( nit000, nitiaustr_r, ndate0, iitiaustr_date ) 199 200 ! IAU end time referenced to ndate0 201 CALL calc_date( nit000, nitiaufin_r, ndate0, iitiaufin_date ) 202 183 CALL calc_date( nit000, nitend , ndate0, iitend_date ) ! Date of final time step 184 CALL calc_date( nit000, nitbkg_r , ndate0, iitbkg_date ) ! Background time for Jb referenced to ndate0 185 CALL calc_date( nit000, nitdin_r , ndate0, iitdin_date ) ! Background time for DI referenced to ndate0 186 CALL calc_date( nit000, nitiaustr_r, ndate0, iitiaustr_date ) ! IAU start time referenced to ndate0 187 CALL calc_date( nit000, nitiaufin_r, ndate0, iitiaufin_date ) ! IAU end time referenced to ndate0 188 ! 203 189 IF(lwp) THEN 204 190 WRITE(numout,*) … … 237 223 & ' Inconsistent options') 238 224 239 IF ( ( ln_bkgwri ).AND.( ( ln_asmdin ).OR.( ln_asmiau ) ) ) &240 & CALL ctl_stop( ' ln_bkgwri and either ln_asmdin or ln_asmiau are set to .true.:', &241 & ' The background state must be written before applying the increments')242 243 225 IF ( ( niaufn /= 0 ).AND.( niaufn /= 1 ) ) & 244 226 & CALL ctl_stop( ' niaufn /= 0 or niaufn /=1 :', & … … 675 657 ! used to prevent the applied increments taking the temperature below the local freezing point 676 658 677 DO jk =1, jpkm1678 fzptnz (:,:,jk) = tfreez( tsn(:,:,jk,jp_sal), fsdept(:,:,jk) )679 END DO659 DO jk = 1, jpkm1 660 fzptnz(:,:,jk) = eos_fzp( tsn(:,:,jk,jp_sal), fsdept(:,:,jk) ) 661 END DO 680 662 681 663 IF ( ln_asmiau ) THEN … … 692 674 IF(lwp) THEN 693 675 WRITE(numout,*) 694 WRITE(numout,*) 'tra_asm_inc : Tracer IAU at time step = ', & 695 & kt,' with IAU weight = ', wgtiau(it) 676 WRITE(numout,*) 'tra_asm_inc : Tracer IAU at time step = ', kt,' with IAU weight = ', wgtiau(it) 696 677 WRITE(numout,*) '~~~~~~~~~~~~' 697 678 ENDIF … … 741 722 IF (ln_temnofreeze) THEN 742 723 ! Do not apply negative increments if the temperature will fall below freezing 743 WHERE(t_bkginc(:,:,:) > 0.0_wp .OR. & 744 & tsn(:,:,:,jp_tem) + t_bkginc(:,:,:) > fzptnz(:,:,:) ) 724 WHERE( t_bkginc(:,:,:) > 0.0_wp .OR. tsn(:,:,:,jp_tem) + t_bkginc(:,:,:) > fzptnz(:,:,:) ) 745 725 tsn(:,:,:,jp_tem) = t_bkg(:,:,:) + t_bkginc(:,:,:) 746 726 END WHERE … … 751 731 ! Do not apply negative increments if the salinity will fall below a specified 752 732 ! minimum value salfixmin 753 WHERE(s_bkginc(:,:,:) > 0.0_wp .OR. & 754 & tsn(:,:,:,jp_sal) + s_bkginc(:,:,:) > salfixmin ) 733 WHERE( s_bkginc(:,:,:) > 0.0_wp .OR. tsn(:,:,:,jp_sal) + s_bkginc(:,:,:) > salfixmin ) 755 734 tsn(:,:,:,jp_sal) = s_bkg(:,:,:) + s_bkginc(:,:,:) 756 735 END WHERE … … 759 738 ENDIF 760 739 761 tsb(:,:,:,:) = tsn(:,:,:,:) ! Update before fields 762 763 CALL eos( tsb, rhd, rhop, gdept_0(:,:,:) ) ! Before potential and in situ densities 764 765 IF( ln_zps .AND. .NOT. lk_c1d ) & 766 & CALL zps_hde( nit000, jpts, tsb, & ! Partial steps: before horizontal derivative 767 & gtsu, gtsv, rhd, & ! of T, S, rd at the bottom ocean level 768 & gru , grv ) 740 tsb(:,:,:,:) = tsn(:,:,:,:) ! Update before fields 741 742 CALL eos( tsb, rhd, rhop, gdept_0(:,:,:) ) ! Before potential and in situ densities 743 !!gm fabien 744 ! CALL eos( tsb, rhd, rhop ) ! Before potential and in situ densities 745 !!gm 746 747 748 IF( ln_zps .AND. .NOT. lk_c1d .AND. .NOT. ln_isfcav) & 749 & CALL zps_hde ( kt, jpts, tsb, gtsu, gtsv, & ! Partial steps: before horizontal gradient 750 & rhd, gru , grv ) ! of t, s, rd at the last ocean level 751 IF( ln_zps .AND. .NOT. lk_c1d .AND. ln_isfcav) & 752 & CALL zps_hde_isf( nit000, jpts, tsb, gtsu, gtsv, & ! Partial steps for top cell (ISF) 753 & rhd, gru , grv , aru , arv , gzu , gzv , ge3ru , ge3rv , & 754 & gtui, gtvi, grui, grvi, arui, arvi, gzui, gzvi, ge3rui, ge3rvi ) ! of t, s, rd at the last ocean level 769 755 770 756 #if defined key_zdfkpp 771 757 CALL eos( tsn, rhd, fsdept_n(:,:,:) ) ! Compute rhd 758 !!gm fabien CALL eos( tsn, rhd ) ! Compute rhd 772 759 #endif 773 760
Note: See TracChangeset
for help on using the changeset viewer.