Changeset 4946 for branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/OPA_SRC/ASM
- Timestamp:
- 2014-12-02T10:38:20+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90
r4932 r4946 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,*) … … 671 657 ! used to prevent the applied increments taking the temperature below the local freezing point 672 658 673 DO jk =1, jpkm1674 fzptnz (:,:,jk) = tfreez( tsn(:,:,jk,jp_sal), fsdept(:,:,jk) )675 END DO659 DO jk = 1, jpkm1 660 fzptnz(:,:,jk) = eos_fzp( tsn(:,:,jk,jp_sal), fsdept(:,:,jk) ) 661 END DO 676 662 677 663 IF ( ln_asmiau ) THEN … … 688 674 IF(lwp) THEN 689 675 WRITE(numout,*) 690 WRITE(numout,*) 'tra_asm_inc : Tracer IAU at time step = ', & 691 & kt,' with IAU weight = ', wgtiau(it) 676 WRITE(numout,*) 'tra_asm_inc : Tracer IAU at time step = ', kt,' with IAU weight = ', wgtiau(it) 692 677 WRITE(numout,*) '~~~~~~~~~~~~' 693 678 ENDIF … … 737 722 IF (ln_temnofreeze) THEN 738 723 ! Do not apply negative increments if the temperature will fall below freezing 739 WHERE(t_bkginc(:,:,:) > 0.0_wp .OR. & 740 & tsn(:,:,:,jp_tem) + t_bkginc(:,:,:) > fzptnz(:,:,:) ) 724 WHERE( t_bkginc(:,:,:) > 0.0_wp .OR. tsn(:,:,:,jp_tem) + t_bkginc(:,:,:) > fzptnz(:,:,:) ) 741 725 tsn(:,:,:,jp_tem) = t_bkg(:,:,:) + t_bkginc(:,:,:) 742 726 END WHERE … … 747 731 ! Do not apply negative increments if the salinity will fall below a specified 748 732 ! minimum value salfixmin 749 WHERE(s_bkginc(:,:,:) > 0.0_wp .OR. & 750 & tsn(:,:,:,jp_sal) + s_bkginc(:,:,:) > salfixmin ) 733 WHERE( s_bkginc(:,:,:) > 0.0_wp .OR. tsn(:,:,:,jp_sal) + s_bkginc(:,:,:) > salfixmin ) 751 734 tsn(:,:,:,jp_sal) = s_bkg(:,:,:) + s_bkginc(:,:,:) 752 735 END WHERE … … 758 741 759 742 CALL eos( tsb, rhd, rhop, gdept_0(:,:,:) ) ! Before potential and in situ densities 760 743 !!gm fabien 744 ! CALL eos( tsb, rhd, rhop ) ! Before potential and in situ densities 745 !!gm 746 747 761 748 IF( ln_zps .AND. .NOT. lk_c1d ) & 762 749 & CALL zps_hde( nit000, jpts, tsb, gtsu, gtsv, & ! Partial steps: before horizontal gradient … … 766 753 #if defined key_zdfkpp 767 754 CALL eos( tsn, rhd, fsdept_n(:,:,:) ) ! Compute rhd 755 !!gm fabien CALL eos( tsn, rhd ) ! Compute rhd 768 756 #endif 769 757
Note: See TracChangeset
for help on using the changeset viewer.