Skip to content
This repository has been archived by the owner on Oct 23, 2020. It is now read-only.

Commit

Permalink
Merge pull request #598 from akturner/cice/geographical_vectors_am
Browse files Browse the repository at this point in the history
Geographical vectors analysis member
  • Loading branch information
akturner committed Oct 15, 2015
2 parents 4a26097 + ee52711 commit 2f46b26
Show file tree
Hide file tree
Showing 12 changed files with 636 additions and 758 deletions.
84 changes: 1 addition & 83 deletions src/core_cice/Registry.xml
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,6 @@
<var name="iceVolumeCategory"/>
<var name="snowVolumeCategory"/>
<var name="surfaceTemperature"/>
<var name="iceThickness"/>
<var name="snowThickness"/>
<var name="iceAreaCell"/>
<var name="iceAreaVertex"/>
<var name="iceVolumeCell"/>
Expand Down Expand Up @@ -706,53 +704,6 @@
<var name="basisGradientV" type="real" dimensions="maxEdges maxEdges nCells Time" name_in_code="basisGradientV"/>
</var_struct>

<!-- geographical output -->
<var_struct name="velocity_geographical" time_levs="1">
<var name="uVelocityGeo" type="real" dimensions="nVertices Time" name_in_code="uVelocityGeo"/>
<var name="vVelocityGeo" type="real" dimensions="nVertices Time" name_in_code="vVelocityGeo"/>
<var name="stressDivergenceUGeo" type="real" dimensions="nVertices Time" name_in_code="stressDivergenceUGeo"/>
<var name="stressDivergenceVGeo" type="real" dimensions="nVertices Time" name_in_code="stressDivergenceVGeo"/>
<var name="airStressVertexUGeo" type="real" dimensions="nVertices Time" name_in_code="airStressVertexUGeo"/>
<var name="airStressVertexVGeo" type="real" dimensions="nVertices Time" name_in_code="airStressVertexVGeo"/>
<var name="oceanStressUGeo" type="real" dimensions="nVertices Time" name_in_code="oceanStressUGeo"/>
<var name="oceanStressVGeo" type="real" dimensions="nVertices Time" name_in_code="oceanStressVGeo"/>
<var name="surfaceTiltForceUGeo" type="real" dimensions="nVertices Time" name_in_code="surfaceTiltForceUGeo"/>
<var name="surfaceTiltForceVGeo" type="real" dimensions="nVertices Time" name_in_code="surfaceTiltForceVGeo"/>
<var name="uOceanVelocityVertexGeo" type="real" dimensions="nVertices Time" name_in_code="uOceanVelocityVertexGeo"/>
<var name="vOceanVelocityVertexGeo" type="real" dimensions="nVertices Time" name_in_code="vOceanVelocityVertexGeo"/>
</var_struct>
<!--
<var_struct name="mesh_test" time_levs="1">
<var name="vectorCellU" type="real" dimensions="nCells Time" name_in_code="vectorCellU"/>
<var name="vectorCellV" type="real" dimensions="nCells Time" name_in_code="vectorCellV"/>
<var name="vectorVertexU" type="real" dimensions="nVertices Time" name_in_code="vectorVertexU"/>
<var name="vectorVertexV" type="real" dimensions="nVertices Time" name_in_code="vectorVertexV"/>
<var name="vectorCellURotate" type="real" dimensions="nCells Time" name_in_code="vectorCellURotate"/>
<var name="vectorCellVRotate" type="real" dimensions="nCells Time" name_in_code="vectorCellVRotate"/>
<var name="vectorVertexURotate" type="real" dimensions="nVertices Time" name_in_code="vectorVertexURotate"/>
<var name="vectorVertexVRotate" type="real" dimensions="nVertices Time" name_in_code="vectorVertexVRotate"/>
<var name="vectorVertexUInterpolate" type="real" dimensions="nVertices Time" name_in_code="vectorVertexUInterpolate"/>
<var name="vectorVertexVInterpolate" type="real" dimensions="nVertices Time" name_in_code="vectorVertexVInterpolate"/>
<var name="vectorVertexURotateInterpolate" type="real" dimensions="nVertices Time" name_in_code="vectorVertexURotateInterpolate"/>
<var name="vectorVertexVRotateInterpolate" type="real" dimensions="nVertices Time" name_in_code="vectorVertexVRotateInterpolate"/>
<var name="vectorCellURotateRotate" type="real" dimensions="nCells Time" name_in_code="vectorCellURotateRotate"/>
<var name="vectorCellVRotateRotate" type="real" dimensions="nCells Time" name_in_code="vectorCellVRotateRotate"/>
<var name="vectorVertexURotateRotate" type="real" dimensions="nVertices Time" name_in_code="vectorVertexURotateRotate"/>
<var name="vectorVertexVRotateRotate" type="real" dimensions="nVertices Time" name_in_code="vectorVertexVRotateRotate"/>
<var name="vectorVertexURotateInterpolateRotate" type="real" dimensions="nVertices Time" name_in_code="vectorVertexURotateInterpolateRotate"/>
<var name="vectorVertexVRotateInterpolateRotate" type="real" dimensions="nVertices Time" name_in_code="vectorVertexVRotateInterpolateRotate"/>
<var name="vectorCellUDiff" type="real" dimensions="nCells Time" name_in_code="vectorCellUDiff"/>
<var name="vectorCellVDiff" type="real" dimensions="nCells Time" name_in_code="vectorCellVDiff"/>
<var name="vectorVertexUDiff" type="real" dimensions="nVertices Time" name_in_code="vectorVertexUDiff"/>
<var name="vectorVertexVDiff" type="real" dimensions="nVertices Time" name_in_code="vectorVertexVDiff"/>
<var name="vectorVertexUInterpolateDiff" type="real" dimensions="nVertices Time" name_in_code="vectorVertexUInterpolateDiff"/>
<var name="vectorVertexVInterpolateDiff" type="real" dimensions="nVertices Time" name_in_code="vectorVertexVInterpolateDiff"/>
<var name="vectorVertexUDiffRotate" type="real" dimensions="nVertices Time" name_in_code="vectorVertexUDiffRotate"/>
<var name="vectorVertexVDiffRotate" type="real" dimensions="nVertices Time" name_in_code="vectorVertexVDiffRotate"/>
<var name="vectorVertexUDiffNoRotate" type="real" dimensions="nVertices Time" name_in_code="vectorVertexUDiffNoRotate"/>
<var name="vectorVertexVDiffNoRotate" type="real" dimensions="nVertices Time" name_in_code="vectorVertexVDiffNoRotate"/>
</var_struct>
-->
<!-- column physics -->

<!-- ridging -->
Expand Down Expand Up @@ -920,23 +871,14 @@
<var name="categoryThicknessLimits" type="real" dimensions="nCategoriesP1" name_in_code="categoryThicknessLimits"/>
</var_struct>

<!-- Plotting -->
<var_struct name="plotting" time_levs="1">
<var name="iceAreaCategoryPlot" type="real" dimensions="nCells Time" name_in_code="iceAreaCategoryPlot"/>
<var name="iceVolumeCategoryPlot" type="real" dimensions="nCells Time" name_in_code="iceVolumeCategoryPlot"/>
<var name="snowVolumeCategoryPlot" type="real" dimensions="nCells Time" name_in_code="snowVolumeCategoryPlot"/>
<var name="surfaceTemperaturePlot" type="real" dimensions="nCells Time" name_in_code="surfaceTemperaturePlot"/>
<var name="iceThickness" type="real" dimensions="nCells Time" name_in_code="iceThickness"/>
<var name="snowThickness" type="real" dimensions="nCells Time" name_in_code="snowThickness"/>
</var_struct>

<!-- Regions -->
<var_struct name="regions" time_levs="1">
<var name="regionMask" type="integer" dimensions="nRegions nCells" name_in_code="regionMask"/>
</var_struct>

<!-- Diagnostics -->
<var_struct name="diagnostics" time_levs="1">
<var name="xtime" type="text" dimensions="Time"/>
<var name="meltOnset" type="real" dimensions="nCells" name_in_code="meltOnset"/>
<var name="freezeOnset" type="real" dimensions="nCells" name_in_code="freezeOnset"/>
<var name="iceAreaTendencyTransport" type="real" dimensions="nCells" name_in_code="iceAreaTendencyTransport"/>
Expand All @@ -945,29 +887,5 @@
<var name="freezingMeltingPotentialInitial" type="real" dimensions="nCells" name_in_code="freezingMeltingPotentialInitial"/>
</var_struct>

<!-- Global diagnostics -->
<var_struct name="global_diagnostics" time_levs="1">
<var name="xtime" type="text" dimensions="Time"/>
<var name="iceAreaCategoryMin" type="real" dimensions="nCategories Time" name_in_code="iceAreaCategoryMin"/>
<var name="iceAreaCategoryMax" type="real" dimensions="nCategories Time" name_in_code="iceAreaCategoryMax"/>
<var name="iceVolumeCategoryMin" type="real" dimensions="nCategories Time" name_in_code="iceVolumeCategoryMin"/>
<var name="iceVolumeCategoryMax" type="real" dimensions="nCategories Time" name_in_code="iceVolumeCategoryMax"/>
<var name="snowVolumeCategoryMin" type="real" dimensions="nCategories Time" name_in_code="snowVolumeCategoryMin"/>
<var name="snowVolumeCategoryMax" type="real" dimensions="nCategories Time" name_in_code="snowVolumeCategoryMax"/>
<var name="surfaceTemperatureMin" type="real" dimensions="nCategories Time" name_in_code="surfaceTemperatureMin"/>
<var name="surfaceTemperatureMax" type="real" dimensions="nCategories Time" name_in_code="surfaceTemperatureMax"/>
<var name="iceThicknessCategoryMin" type="real" dimensions="nCategories Time" name_in_code="iceThicknessCategoryMin"/>
<var name="iceThicknessCategoryMax" type="real" dimensions="nCategories Time" name_in_code="iceThicknessCategoryMax"/>
<var name="snowThicknessCategoryMin" type="real" dimensions="nCategories Time" name_in_code="snowThicknessCategoryMin"/>
<var name="snowThicknessCategoryMax" type="real" dimensions="nCategories Time" name_in_code="snowThicknessCategoryMax"/>
<var name="snowThicknessCategoryLocMax" type="integer" dimensions="nCategories Time" name_in_code="snowThicknessCategoryLocMax"/>
<var name="globalIceArea" type="real" dimensions="nHemispheres Time" name_in_code="globalIceArea"/>
<var name="globalIceExtent" type="real" dimensions="nHemispheres Time" name_in_code="globalIceExtent"/>
<var name="globalIceVolume" type="real" dimensions="nHemispheres Time" name_in_code="globalIceVolume"/>
<var name="globalIceThickness" type="real" dimensions="nHemispheres Time" name_in_code="globalIceThickness"/>
<var name="globalSnowVolume" type="real" dimensions="nHemispheres Time" name_in_code="globalSnowVolume"/>
<var name="globalSnowThickness" type="real" dimensions="nHemispheres Time" name_in_code="globalSnowThickness"/>
</var_struct>

#include "analysis_members/Registry_cice_analysis_members.xml"
</registry>
2 changes: 1 addition & 1 deletion src/core_cice/analysis_members/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

OBJS = mpas_cice_analysis_driver.o

MEMBERS = mpas_cice_high_frequency_output.o mpas_cice_temperatures.o mpas_cice_regional_statistics.o mpas_cice_ridging_diagnostics.o mpas_cice_conservation_check.o
MEMBERS = mpas_cice_high_frequency_output.o mpas_cice_temperatures.o mpas_cice_regional_statistics.o mpas_cice_ridging_diagnostics.o mpas_cice_conservation_check.o mpas_cice_geographical_vectors.o

all: $(OBJS)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
#include "Registry_cice_regional_statistics.xml"
#include "Registry_cice_ridging_diagnostics.xml"
#include "Registry_cice_conservation_check.xml"
#include "Registry_cice_geographical_vectors.xml"
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<nml_record name="AM_geographicalVectors" mode="forward;analysis">
<nml_option name="config_AM_geographicalVectors_enable" type="logical" default_value=".true." units="unitless"
description="If true, ocean analysis member geographicalVectors is called."
possible_values=".true. or .false."
/>
<nml_option name="config_AM_geographicalVectors_compute_interval" type="character" default_value="dt" units="unitless"
description="Timestamp determining how often analysis member computation should be performed."
possible_values="Any valid time stamp, 'dt', or 'output_interval'"
/>
<nml_option name="config_AM_geographicalVectors_stream_name" type="character" default_value="output" units="unitless"
description="Name of the stream that the geographicalVectors analysis member should be tied to."
possible_values="Any existing stream name or 'none'"
/>
<nml_option name="config_AM_geographicalVectors_compute_on_startup" type="logical" default_value=".false." units="unitless"
description="Logical flag determining if an analysis member computation occurs on start-up."
possible_values=".true. or .false."
/>
<nml_option name="config_AM_geographicalVectors_write_on_startup" type="logical" default_value=".false." units="unitless"
description="Logical flag determining if an analysis member write occurs on start-up."
possible_values=".true. or .false."
/>
</nml_record>
<packages>
<package name="geographicalVectorsAMPKG" description="This package includes variables required for the geographicalVectors analysis member."/>
</packages>
<var_struct name="geographicalVectorsAM" time_levs="1" packages="geographicalVectorsAMPKG">
<var name="uVelocityGeo" type="real" dimensions="nVertices Time" units="m/s"
description="True eastwards ice velocity"
/>
<var name="vVelocityGeo" type="real" dimensions="nVertices Time" units="m/s"
description="True northwards ice velocity"
/>
<var name="stressDivergenceUGeo" type="real" dimensions="nVertices Time" units="N/m^2"
description="True eastwards stress divergence"
/>
<var name="stressDivergenceVGeo" type="real" dimensions="nVertices Time" units="N/m^2"
description="True northwards stress divergence"
/>
<var name="airStressVertexUGeo" type="real" dimensions="nVertices Time" units="N/m^2"
description="True eastwards sea ice-air stress"
/>
<var name="airStressVertexVGeo" type="real" dimensions="nVertices Time" units="N/m^2"
description="True northwards sea ice-air stress"
/>
<var name="oceanStressUGeo" type="real" dimensions="nVertices Time" units="N/m^2"
description="True eastwards sea ice-ocean stress"
/>
<var name="oceanStressVGeo" type="real" dimensions="nVertices Time" units="N/m^2"
description="True northwards sea ice-ocean stress"
/>
<var name="surfaceTiltForceUGeo" type="real" dimensions="nVertices Time" units="N/m^2"
description="True eastwards sea surface tilt stress"
/>
<var name="surfaceTiltForceVGeo" type="real" dimensions="nVertices Time" units="N/m^2"
description="True northwards sea surface tilt stress"
/>
<var name="uOceanVelocityVertexGeo" type="real" dimensions="nVertices Time" units="m/s"
description="True eastwards ocean velocity"
/>
<var name="vOceanVelocityVertexGeo" type="real" dimensions="nVertices Time" units="m/s"
description="True northwards ocean velocity"
/>
</var_struct>
12 changes: 12 additions & 0 deletions src/core_cice/analysis_members/mpas_cice_analysis_driver.F
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ module cice_analysis_driver
use cice_regional_statistics
use cice_ridging_diagnostics
use cice_conservation_check
use cice_geographical_vectors
! use cice_TEMP_LATE

implicit none
Expand Down Expand Up @@ -138,6 +139,7 @@ subroutine cice_analysis_setup_packages(configPool, packagePool, err)!{{{
call mpas_pool_add_config(analysisMemberList, 'regionalStatistics', 1)
call mpas_pool_add_config(analysisMemberList, 'ridgingDiagnostics', 1)
call mpas_pool_add_config(analysisMemberList, 'conservationCheck', 1)
call mpas_pool_add_config(analysisMemberList, 'geographicalVectors', 1)
! write(6,*) ' debug: mpas_pool_add_config'
! call mpas_pool_add_config(analysisMemberList, 'surfaceAreaWeightedAverages', 1)
! call mpas_pool_add_config(analysisMemberList, 'TEMPLATE', 1)
Expand Down Expand Up @@ -823,6 +825,8 @@ subroutine cice_init_analysis_members(domain, analysisMemberName, iErr)!{{{
call cice_init_ridging_diagnostics(domain, err_tmp)
else if ( analysisMemberName(1:nameLength) == 'conservationCheck' ) then
call cice_init_conservation_check(domain, err_tmp)
else if ( analysisMemberName(1:nameLength) == 'geographicalVectors' ) then
call cice_init_geographical_vectors(domain, err_tmp)
! else if ( analysisMemberName(1:nameLength) == 'surfaceAreaWeightedAverages' ) then
! call cice_init_surface_area_weighted_averages(domain, err_tmp)
! else if ( analysisMemberName(1:nameLength) == 'TEMPLATE' ) then
Expand Down Expand Up @@ -866,6 +870,8 @@ subroutine cice_precompute_analysis_members(domain, timeLevel, analysisMemberNam
call cice_precompute_ridging_diagnostics(domain, timeLevel, err_tmp)
else if ( analysisMemberName(1:nameLength) == 'conservationCheck' ) then
call cice_precompute_conservation_check(domain, timeLevel, err_tmp)
else if ( analysisMemberName(1:nameLength) == 'geographicalVectors' ) then
call cice_precompute_geographical_vectors(domain, timeLevel, err_tmp)
! else if ( analysisMemberName(1:nameLength) == 'surfaceAreaWeightedAverages' ) then
! call cice_precompute_surface_area_weighted_averages(domain, timeLevel, err_tmp)
! else if ( analysisMemberName(1:nameLength) == 'TEMPLATE' ) then
Expand Down Expand Up @@ -909,6 +915,8 @@ subroutine cice_compute_analysis_members(domain, timeLevel, analysisMemberName,
call cice_compute_ridging_diagnostics(domain, timeLevel, err_tmp)
else if ( analysisMemberName(1:nameLength) == 'conservationCheck' ) then
call cice_compute_conservation_check(domain, timeLevel, err_tmp)
else if ( analysisMemberName(1:nameLength) == 'geographicalVectors' ) then
call cice_compute_geographical_vectors(domain, timeLevel, err_tmp)
! else if ( analysisMemberName(1:nameLength) == 'surfaceAreaWeightedAverages' ) then
! call cice_compute_surface_area_weighted_averages(domain, timeLevel, err_tmp)
! else if ( analysisMemberName(1:nameLength) == 'TEMPLATE' ) then
Expand Down Expand Up @@ -951,6 +959,8 @@ subroutine cice_restart_analysis_members(domain, analysisMemberName, iErr)!{{{
call cice_restart_ridging_diagnostics(domain, err_tmp)
else if ( analysisMemberName(1:nameLength) == 'conservationCheck' ) then
call cice_restart_conservation_check(domain, err_tmp)
else if ( analysisMemberName(1:nameLength) == 'geographicalVectors' ) then
call cice_restart_geographical_vectors(domain, err_tmp)
! else if ( analysisMemberName(1:nameLength) == 'surfaceAreaWeightedAverages' ) then
! call cice_restart_surface_area_weighted_averages(domain, err_tmp)
! else if ( analysisMemberName(1:nameLength) == 'TEMPLATE' ) then
Expand Down Expand Up @@ -993,6 +1003,8 @@ subroutine cice_finalize_analysis_members(domain, analysisMemberName, iErr)!{{{
call cice_finalize_ridging_diagnostics(domain, err_tmp)
else if ( analysisMemberName(1:nameLength) == 'conservationCheck' ) then
call cice_finalize_conservation_check(domain, err_tmp)
else if ( analysisMemberName(1:nameLength) == 'geographicalVectors' ) then
call cice_finalize_geographical_vectors(domain, err_tmp)
! else if ( analysisMemberName(1:nameLength) == 'surfaceAreaWeightedAverages' ) then
! call cice_finalize_surface_area_weighted_averages(domain, err_tmp)
! else if ( analysisMemberName(1:nameLength) == 'TEMPLATE' ) then
Expand Down
Loading

0 comments on commit 2f46b26

Please sign in to comment.