New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 5756 – NEMO

Changeset 5756


Ignore:
Timestamp:
2015-09-23T15:26:27+02:00 (9 years ago)
Author:
dancopsey
Message:

Using absolute tolerance for land ice mass change. Also do not allow negative numbers. If it goes negative remember the previous mass and wait for it to increase above that (passing zero as iceberg flux in the mean time).

Location:
branches/UKMO/dev_r5518_coupling_GSI7_GSI8_landice/NEMOGCM/NEMO/OPA_SRC/SBC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r5518_coupling_GSI7_GSI8_landice/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_oce.F90

    r5708 r5756  
    157157   REAL(wp), PUBLIC    ::   rn_greenland_calving_fraction  ! Set fraction of total freshwater flux for iceberg calving - remainder goes to iceshelf melting. 
    158158   REAL(wp), PUBLIC    ::   rn_antarctica_calving_fraction ! Set fraction of total freshwater flux for iceberg calving - remainder goes to iceshelf melting. 
    159    REAL(wp), PUBLIC    ::   rn_iceshelf_fluxes_tolerance   ! Fractional threshold for detecting differences in icesheet masses.  
     159   REAL(wp), PUBLIC    ::   rn_iceshelf_fluxes_tolerance   ! Absolute tolerance for detecting differences in icesheet masses.  
    160160 
    161161   !! * Substitutions 
  • branches/UKMO/dev_r5518_coupling_GSI7_GSI8_landice/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90

    r5708 r5756  
    12801280         zgreenland_icesheet_mass_in = zgreenland_icesheet_mass_in / zmask_sum 
    12811281         greenland_icesheet_timelapsed = greenland_icesheet_timelapsed + rdt          
    1282          IF( ABS( zgreenland_icesheet_mass_in - greenland_icesheet_mass )/( greenland_icesheet_mass + zepsilon ) > zepsilon ) THEN 
     1282         IF( ABS( zgreenland_icesheet_mass_in - greenland_icesheet_mass ) > zepsilon ) THEN 
    12831283            zgreenland_icesheet_mass_b = greenland_icesheet_mass 
    1284             greenland_icesheet_mass = zgreenland_icesheet_mass_in 
     1284             
     1285            ! Only update the mass if it has increased 
     1286            IF ( (zgreenland_icesheet_mass_in - greenland_icesheet_mass) > 0.0 ) THEN 
     1287               greenland_icesheet_mass = zgreenland_icesheet_mass_in 
     1288            ENDIF 
     1289             
    12851290            IF( zgreenland_icesheet_mass_b /= 0.0 ) & 
    12861291           &     greenland_icesheet_mass_rate_of_change = ( greenland_icesheet_mass - zgreenland_icesheet_mass_b ) / greenland_icesheet_timelapsed  
    12871292            greenland_icesheet_timelapsed = 0.0_wp        
    12881293         ENDIF 
    1289          IF(lwp) WRITE(numout,*) 'Greenland icesheet mass (kg) is ', greenland_icesheet_mass 
     1294         IF(lwp) WRITE(numout,*) 'Greenland icesheet mass (kg) read in is ', zgreenland_icesheet_mass_in 
     1295         IF(lwp) WRITE(numout,*) 'Greenland icesheet mass (kg) used is    ', greenland_icesheet_mass 
    12901296         IF(lwp) WRITE(numout,*) 'Greenland icesheet mass rate of change (kg/s) is ', greenland_icesheet_mass_rate_of_change 
    12911297         IF(lwp) WRITE(numout,*) 'Greenland icesheet seconds lapsed since last change is ', greenland_icesheet_timelapsed 
     
    13021308         zantarctica_icesheet_mass_in = zantarctica_icesheet_mass_in / zmask_sum 
    13031309         antarctica_icesheet_timelapsed = antarctica_icesheet_timelapsed + rdt          
    1304          IF( ABS( zantarctica_icesheet_mass_in - antarctica_icesheet_mass )/( antarctica_icesheet_mass + zepsilon ) > zepsilon ) THEN 
     1310         IF( ABS( zantarctica_icesheet_mass_in - antarctica_icesheet_mass ) > zepsilon ) THEN 
    13051311            zantarctica_icesheet_mass_b = antarctica_icesheet_mass 
    1306             antarctica_icesheet_mass = zantarctica_icesheet_mass_in 
     1312             
     1313            ! Only update the mass if it has increased 
     1314            IF ( (zantarctica_icesheet_mass_in - antarctica_icesheet_mass) > 0.0 ) THEN 
     1315               antarctica_icesheet_mass = zantarctica_icesheet_mass_in 
     1316            END IF 
     1317             
    13071318            IF( zantarctica_icesheet_mass_b /= 0.0 ) & 
    13081319          &      antarctica_icesheet_mass_rate_of_change = ( antarctica_icesheet_mass - zantarctica_icesheet_mass_b ) / antarctica_icesheet_timelapsed  
    13091320            antarctica_icesheet_timelapsed = 0.0_wp        
    13101321         ENDIF 
    1311          IF(lwp) WRITE(numout,*) 'Antarctica icesheet mass (kg) is ', antarctica_icesheet_mass 
     1322         IF(lwp) WRITE(numout,*) 'Antarctica icesheet mass (kg) read in is ', zantarctica_icesheet_mass_in 
     1323         IF(lwp) WRITE(numout,*) 'Antarctica icesheet mass (kg) used is    ', antarctica_icesheet_mass 
    13121324         IF(lwp) WRITE(numout,*) 'Antarctica icesheet mass rate of change (kg/s) is ', antarctica_icesheet_mass_rate_of_change 
    13131325         IF(lwp) WRITE(numout,*) 'Antarctica icesheet seconds lapsed since last change is ', antarctica_icesheet_timelapsed 
Note: See TracChangeset for help on using the changeset viewer.